From c8ebcf5c2a18a37aa45253a8a63c28bbcd4b989e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Apr 2011 23:39:39 +0300 Subject: Change imageset offset work not like default offset, but as additional offset. --- src/resources/spritedef.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/resources/spritedef.cpp') diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index db1c3d0c3..e6a65926e 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -221,10 +221,10 @@ void SpriteDef::loadAnimation(xmlNodePtr animationNode, for_each_xml_child_node(frameNode, animationNode) { const int delay = XML::getProperty(frameNode, "delay", 0); - int offsetX = XML::getProperty(frameNode, "offsetX", - imageSet->getOffsetX()); - int offsetY = XML::getProperty(frameNode, "offsetY", - imageSet->getOffsetY()); + int offsetX = XML::getProperty(frameNode, "offsetX", 0) + + imageSet->getOffsetX(); + int offsetY = XML::getProperty(frameNode, "offsetY", 0) + + imageSet->getOffsetY(); offsetY -= imageSet->getHeight() - 32; offsetX -= imageSet->getWidth() / 2 - 16; -- cgit v1.2.3-70-g09d2