[Scummvm-cvs-logs] SF.net SVN: scummvm:[33892] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Fri Aug 15 06:30:46 CEST 2008


Revision: 33892
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33892&view=rev
Author:   peres001
Date:     2008-08-15 04:30:45 +0000 (Fri, 15 Aug 2008)

Log Message:
-----------
Made coordinates and frame number protected into Zone and Animation, and changed client code to use get/set. This will allow various simplifications (e.g. when calculating Z), and is a step towards correct handling of interactive zones of Zone/Animation in BRA.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/callables_ns.cpp
    scummvm/trunk/engines/parallaction/debug.cpp
    scummvm/trunk/engines/parallaction/exec_ns.cpp
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/objects.h
    scummvm/trunk/engines/parallaction/parallaction.cpp
    scummvm/trunk/engines/parallaction/parallaction_ns.cpp
    scummvm/trunk/engines/parallaction/parser_br.cpp
    scummvm/trunk/engines/parallaction/parser_ns.cpp
    scummvm/trunk/engines/parallaction/saveload.cpp
    scummvm/trunk/engines/parallaction/walk.cpp

Modified: scummvm/trunk/engines/parallaction/callables_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables_ns.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/callables_ns.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -211,23 +211,19 @@
 			}
 		}
 
-		_introSarcData1 = _introSarcData3 - _moveSarcZone1->_left;
-		a->_z = _introSarcData3;
-		a->_frame = _moveSarcZone1->_top - (_introSarcData1 / 20);
-		_introSarcData3 = _moveSarcZone1->_left;
+		_introSarcData1 = _introSarcData3 - _moveSarcZone1->getX();
+		a->setZ(_introSarcData3);
+		a->setF(_moveSarcZone1->getY() - (_introSarcData1 / 20));
+		_introSarcData3 = _moveSarcZone1->getX();
 
 		if (_introSarcData1 > 0) {
-			a->_left = _introSarcData1 / 2;
+			a->setX(_introSarcData1 / 2);
+			a->setY(2);
 		} else {
-			a->_left = -_introSarcData1 / 2;
+			a->setX(-_introSarcData1 / 2);
+			a->setY(-2);
 		}
 
-		if (_introSarcData1 > 0) {
-			a->_top = 2;
-		} else {
-			a->_top = -2;
-		}
-
 		return;
 
 	}
@@ -236,11 +232,11 @@
 	_moveSarcZone1->translate(_introSarcData1, -_introSarcData1 / 20);
 	_moveSarcZone0->translate(_introSarcData1, -_introSarcData1 / 20);
 
-	if (_moveSarcZones[0]->_left == 35 &&
-		_moveSarcZones[1]->_left == 68 &&
-		_moveSarcZones[2]->_left == 101 &&
-		_moveSarcZones[3]->_left == 134 &&
-		_moveSarcZones[4]->_left == 167) {
+	if (_moveSarcZones[0]->getX() == 35 &&
+		_moveSarcZones[1]->getX() == 68 &&
+		_moveSarcZones[2]->getX() == 101 &&
+		_moveSarcZones[3]->getX() == 134 &&
+		_moveSarcZones[4]->getX() == 167) {
 
 		a = findAnimation("finito");
 
@@ -482,8 +478,8 @@
 
 	Graphics::drawLine(oldx, oldy, newx, newy, 0, zeroMask, &_gfx->_backgroundInfo);
 
-	_rightHandAnim->_left = newx;
-	_rightHandAnim->_top = newy - 20;
+	_rightHandAnim->setX(newx);
+	_rightHandAnim->setY(newy - 20);
 
 	index++;
 
@@ -496,10 +492,10 @@
 void Parallaction_ns::_c_shade(void *parm) {
 
 	Common::Rect r(
-		_rightHandAnim->_left - 36,
-		_rightHandAnim->_top - 36,
-		_rightHandAnim->_left,
-		_rightHandAnim->_top
+		_rightHandAnim->getX() - 36,
+		_rightHandAnim->getY() - 36,
+		_rightHandAnim->getX(),
+		_rightHandAnim->getY()
 	);
 
 	uint16 _di = r.left/4 + r.top * _gfx->_backgroundInfo->mask.internalWidth;

Modified: scummvm/trunk/engines/parallaction/debug.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/debug.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/debug.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -157,7 +157,7 @@
 				"+--------------------+---+---+---+---+--------+--------+\n");
 	for ( ; b != e; b++) {
 		ZonePtr z = *b;
-		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_name, z->_left, z->_top, z->_right, z->_bottom, z->_type, z->_flags );
+		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", z->_name, z->getX(), z->getY(), z->getX() + z->width(), z->getY() + z->height(), z->_type, z->_flags );
 	}
 	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
 
@@ -175,7 +175,7 @@
 				"+--------------------+---+---+---+---+--------+--------+\n");
 	for ( ; b != e; b++) {
 		AnimationPtr a = *b;
-		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", a->_name, a->_left, a->_top, a->_z, a->_frame, a->_type, a->_flags );
+		DebugPrintf("|%-20s|%3i|%3i|%3i|%3i|%8x|%8x|\n", a->_name, a->getX(), a->getY(), a->getZ(), a->getF(), a->_type, a->_flags );
 	}
 	DebugPrintf("+--------------------+---+---+---+---+--------+--------+\n");
 

Modified: scummvm/trunk/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_ns.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/exec_ns.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -126,7 +126,7 @@
 	Graphics::Surface v18;
 	v18.w = inst->_a->width();
 	v18.h = inst->_a->height();
-	v18.pixels = inst->_a->getFrameData(inst->_a->_frame);
+	v18.pixels = inst->_a->getFrameData(inst->_a->getF());
 
 	int16 x = inst->_opA.getValue();
 	int16 y = inst->_opB.getValue();
@@ -331,14 +331,14 @@
 			if (anim->_flags & kFlagsNoMasked)
 				layer = LAYER_FOREGROUND;
 			else
-				layer = _gfx->_backgroundInfo->getLayer(anim->_top + anim->height());
+				layer = _gfx->_backgroundInfo->getLayer(anim->getY() + anim->height());
 
 			if (obj) {
 				_gfx->showGfxObj(obj, true);
-				obj->frame =  anim->_frame;
-				obj->x = anim->_left;
-				obj->y = anim->_top;
-				obj->z = anim->_z;
+				obj->frame =  anim->getF();
+				obj->x = anim->getX();
+				obj->y = anim->getY();
+				obj->z = anim->getZ();
 				obj->layer = layer;
 			}
 		}
@@ -401,7 +401,7 @@
 		AnimationPtr a = (*it)->_anim;
 
 		if (a->_flags & kFlagsCharacter)
-			a->_z = a->_top + a->height();
+			a->setZ(a->getY() + a->height());
 
 		if ((a->_flags & kFlagsActing) == 0)
 			continue;
@@ -409,7 +409,7 @@
 		runScript(*it, a);
 
 		if (a->_flags & kFlagsCharacter)
-			a->_z = a->_top + a->height();
+			a->setZ(a->getY() + a->height());
 	}
 
 	_modCounter++;
@@ -680,7 +680,7 @@
 		if (!r.contains(_si, _di)) {
 
 			// out of Zone, so look for special values
-			if ((z->_left == -2) || (z->_left == -3)) {
+			if ((z->getX() == -2) || (z->getX() == -3)) {
 
 				// WORKAROUND: this huge condition is needed because we made TypeData a collection of structs
 				// instead of an union. So, merge->_obj1 and get->_icon were just aliases in the original engine,
@@ -699,15 +699,15 @@
 				}
 			}
 
-			if (z->_left != -1)
+			if (z->getX() != -1)
 				continue;
-			if (_si < _char._ani->_left)
+			if (_si < _char._ani->getX())
 				continue;
-			if (_si > (_char._ani->_left + _char._ani->width()))
+			if (_si > (_char._ani->getX() + _char._ani->width()))
 				continue;
-			if (_di < _char._ani->_top)
+			if (_di < _char._ani->getY())
 				continue;
-			if (_di > (_char._ani->_top + _char._ani->height()))
+			if (_di > (_char._ani->getY() + _char._ani->height()))
 				continue;
 
 		}
@@ -729,8 +729,8 @@
 		AnimationPtr a = *ait;
 
 		_a = (a->_flags & kFlagsActive) ? 1 : 0;															   // _a: active Animation
-		_e = ((_si >= a->_left + a->width()) || (_si <= a->_left)) ? 0 : 1;		// _e: horizontal range
-		_f = ((_di >= a->_top + a->height()) || (_di <= a->_top)) ? 0 : 1;		// _f: vertical range
+		_e = ((_si >= a->getX() + a->width()) || (_si <= a->getX())) ? 0 : 1;		// _e: horizontal range
+		_f = ((_di >= a->getY() + a->height()) || (_di <= a->getY())) ? 0 : 1;		// _f: vertical range
 
 		_b = ((type != 0) || (a->_type == kZoneYou)) ? 0 : 1;										 // _b: (no type specified) AND (Animation is not the character)
 		_c = (a->_type & 0xFFFF0000) ? 0 : 1;															// _c: Animation is not an object

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -441,7 +441,7 @@
 		for (; b != e; b++) {
 			ZonePtr z = *b;
 			if (z->_type & kZonePath) {
-				surf->frameRect(Common::Rect(z->_left, z->_top, z->_right, z->_bottom), 2);
+				surf->frameRect(Common::Rect(z->getX(), z->getY(), z->getX() + z->width(), z->getY() + z->height()), 2);
 			}
 		}
 		g_system->unlockScreen();

Modified: scummvm/trunk/engines/parallaction/objects.h
===================================================================
--- scummvm/trunk/engines/parallaction/objects.h	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/objects.h	2008-08-15 04:30:45 UTC (rev 33892)
@@ -297,12 +297,15 @@
 #define ZONENAME_LENGTH 32
 
 struct Zone {
-	char			_name[ZONENAME_LENGTH];
-
+protected:
 	int16			_left;
 	int16			_top;
 	int16			_right;
 	int16			_bottom;
+
+public:
+	char			_name[ZONENAME_LENGTH];
+
 	uint32			_type;
 	uint32			_flags;
 	uint			_label;
@@ -323,6 +326,20 @@
 	void translate(int16 x, int16 y);
 	virtual uint16 width() const;
 	virtual uint16 height() const;
+
+	void setBox(int16 left, int16 top, int16 right, int16 bottom) {
+		setX(left);
+		setY(top);
+		_right = right;
+		_bottom = bottom;
+	}
+
+	// getters/setters
+	virtual int16 getX() 			{ return _left; }
+	virtual void  setX(int16 value) { _left = value; }
+
+	virtual int16 getY() 			{ return _top; }
+	virtual void  setY(int16 value) { _top = value; }
 };
 
 
@@ -479,13 +496,14 @@
 typedef Common::List<ProgramPtr> ProgramList;
 
 struct Animation : public Zone {
+protected:
+	int16		_frame;
+	int16		_z;
+public:
 
 	GfxObj		*gfxobj;
 	char		*_scriptName;
-	int16		_frame;
-	int16		_z;
 
-
 	Animation();
 	virtual ~Animation();
 	virtual uint16 width() const;

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -352,9 +352,9 @@
 
 	if (_input->_inputMode == Input::kInputModeGame) {
 		_programExec->runScripts(_location._programs.begin(), _location._programs.end());
-		_char._ani->_z = _char._ani->height() + _char._ani->_top;
+		_char._ani->setZ(_char._ani->height() + _char._ani->getY());
 		if (_char._ani->gfxobj) {
-			_char._ani->gfxobj->z = _char._ani->_z;
+			_char._ani->gfxobj->z = _char._ani->getZ();
 		}
 		_char._walker->walk();
 		drawAnimations();
@@ -452,7 +452,7 @@
 		// NOTE : this condition has been relaxed compared to the original, to allow the engine
 		// to retain special - needed - zones that were lost across location switches.
 		ZonePtr z = *it;
-		if (((z->_top == -1) || (z->_left == -2)) && ((_engineFlags & kEngineQuit) == 0)) {
+		if (((z->getY() == -1) || (z->getX() == -2)) && ((_engineFlags & kEngineQuit) == 0)) {
 			debugC(2, kDebugExec, "freeZones preserving zone '%s'", z->_name);
 			it++;
 		} else {
@@ -510,10 +510,10 @@
 
 	_dummy = false;
 
-	_ani->_left = 150;
-	_ani->_top = 100;
-	_ani->_z = 10;
-	_ani->_frame = 0;
+	_ani->setX(150);
+	_ani->setY(100);
+	_ani->setZ(10);
+	_ani->setF(0);
 	_ani->_flags = kFlagsActive | kFlagsNoName;
 	_ani->_type = kZoneYou;
 	strncpy(_ani->_name, "yourself", ZONENAME_LENGTH);
@@ -540,18 +540,18 @@
 
 void Character::getFoot(Common::Point &foot) {
 	Common::Rect rect;
-	_ani->gfxobj->getRect(_ani->_frame, rect);
+	_ani->gfxobj->getRect(_ani->getF(), rect);
 
-	foot.x = _ani->_left + (rect.left + rect.width() / 2);
-	foot.y = _ani->_top + (rect.top + rect.height());
+	foot.x = _ani->getX() + (rect.left + rect.width() / 2);
+	foot.y = _ani->getY() + (rect.top + rect.height());
 }
 
 void Character::setFoot(const Common::Point &foot) {
 	Common::Rect rect;
-	_ani->gfxobj->getRect(_ani->_frame, rect);
+	_ani->gfxobj->getRect(_ani->getF(), rect);
 
-	_ani->_left = foot.x - (rect.left + rect.width() / 2);
-	_ani->_top = foot.y - (rect.top + rect.height());
+	_ani->setX(foot.x - (rect.left + rect.width() / 2));
+	_ani->setY(foot.y - (rect.top + rect.height()));
 }
 
 #if 0
@@ -675,7 +675,7 @@
 	_step++;
 
 	if (dist.x == 0 && dist.y == 0) {
-		_ani->_frame = frames->stillFrame[_direction];
+		_ani->setF(frames->stillFrame[_direction]);
 		return;
 	}
 
@@ -685,7 +685,7 @@
 		dist.y = -dist.y;
 
 	_direction = (dist.x > dist.y) ? ((to.x > pos.x) ? WALK_LEFT : WALK_RIGHT) : ((to.y > pos.y) ? WALK_DOWN : WALK_UP);
-	_ani->_frame = frames->firstWalkFrame[_direction] + (_step / frames->frameRepeat[_direction]) % frames->numWalkFrames[_direction];
+	_ani->setF(frames->firstWalkFrame[_direction] + (_step / frames->frameRepeat[_direction]) % frames->numWalkFrames[_direction]);
 }
 
 

Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -319,9 +319,9 @@
 	parseLocation(_saveData1);
 
 	if (_location._startPosition.x != -1000) {
-		_char._ani->_left = _location._startPosition.x;
-		_char._ani->_top = _location._startPosition.y;
-		_char._ani->_frame = _location._startFrame;
+		_char._ani->setX(_location._startPosition.x);
+		_char._ani->setY(_location._startPosition.y);
+		_char._ani->setF(_location._startFrame);
 		_location._startPosition.y = -1000;
 		_location._startPosition.x = -1000;
 	}

Modified: scummvm/trunk/engines/parallaction/parser_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_br.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/parser_br.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -331,14 +331,14 @@
 	// TODO: handle background horizontal flip (via a context parameter)
 
 	if (_tokens[nextToken][0] != '\0') {
-		_vm->_char._ani->_left = atoi(_tokens[nextToken]);
+		_vm->_char._ani->setX(atoi(_tokens[nextToken]));
 		nextToken++;
-		_vm->_char._ani->_top = atoi(_tokens[nextToken]);
+		_vm->_char._ani->setY(atoi(_tokens[nextToken]));
 		nextToken++;
 	}
 
 	if (_tokens[nextToken][0] != '\0') {
-		_vm->_char._ani->_frame = atoi(_tokens[nextToken]);
+		_vm->_char._ani->setF(atoi(_tokens[nextToken]));
 	}
 }
 
@@ -716,10 +716,7 @@
 		ctxt.z->_linkedAnim = _vm->findAnimation(_tokens[1]);
 		ctxt.z->_linkedName = strdup(_tokens[1]);
 	} else {
-		ctxt.z->_left = atoi(_tokens[1]);
-		ctxt.z->_top = atoi(_tokens[2]);
-		ctxt.z->_right = atoi(_tokens[3]);
-		ctxt.z->_bottom = atoi(_tokens[4]);
+		ctxt.z->setBox(atoi(_tokens[1]), atoi(_tokens[2]), atoi(_tokens[3]), atoi(_tokens[4]));
 	}
 }
 
@@ -824,10 +821,10 @@
 DECLARE_ANIM_PARSER(position)  {
 	debugC(7, kDebugParser, "ANIM_PARSER(position) ");
 
-	ctxt.a->_left = atoi(_tokens[1]);
-	ctxt.a->_top = atoi(_tokens[2]);
-	ctxt.a->_z = atoi(_tokens[3]);
-	ctxt.a->_frame = atoi(_tokens[4]);
+	ctxt.a->setX(atoi(_tokens[1]));
+	ctxt.a->setY(atoi(_tokens[2]));
+	ctxt.a->setZ(atoi(_tokens[3]));
+	ctxt.a->setF(atoi(_tokens[4]));
 }
 
 
@@ -843,12 +840,14 @@
 DECLARE_ANIM_PARSER(endanimation)  {
 	debugC(7, kDebugParser, "ANIM_PARSER(endanimation) ");
 
-
+#if 0
+	// I have disabled the following code since it seems useless.
+	// I will remove it after mask processing is done.
 	if (ctxt.a->gfxobj) {
 		ctxt.a->_right = ctxt.a->width();
 		ctxt.a->_bottom = ctxt.a->height();
 	}
-
+#endif
 	ctxt.a->_flags |= 0x1000000;
 
 	_parser->popTables();

Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -264,9 +264,9 @@
 DECLARE_ANIM_PARSER(position)  {
 	debugC(7, kDebugParser, "ANIM_PARSER(position) ");
 
-	ctxt.a->_left = atoi(_tokens[1]);
-	ctxt.a->_top = atoi(_tokens[2]);
-	ctxt.a->_z = atoi(_tokens[3]);
+	ctxt.a->setX(atoi(_tokens[1]));
+	ctxt.a->setY(atoi(_tokens[2]));
+	ctxt.a->setZ(atoi(_tokens[3]));
 }
 
 
@@ -985,12 +985,12 @@
 	_vm->switchBackground(_vm->_location._name, mask);
 
 	if (_tokens[2][0] != '\0') {
-		_vm->_char._ani->_left = atoi(_tokens[2]);
-		_vm->_char._ani->_top = atoi(_tokens[3]);
+		_vm->_char._ani->setX(atoi(_tokens[2]));
+		_vm->_char._ani->setY(atoi(_tokens[3]));
 	}
 
 	if (_tokens[4][0] != '\0') {
-		_vm->_char._ani->_frame = atoi(_tokens[4]);
+		_vm->_char._ani->setF(atoi(_tokens[4]));
 	}
 }
 
@@ -1309,11 +1309,7 @@
 
 DECLARE_ZONE_PARSER(limits)  {
 	debugC(7, kDebugParser, "ZONE_PARSER(limits) ");
-
-	ctxt.z->_left = atoi(_tokens[1]);
-	ctxt.z->_top = atoi(_tokens[2]);
-	ctxt.z->_right = atoi(_tokens[3]);
-	ctxt.z->_bottom = atoi(_tokens[4]);
+	ctxt.z->setBox(atoi(_tokens[1]), atoi(_tokens[2]), atoi(_tokens[3]), atoi(_tokens[4]));
 }
 
 
@@ -1404,8 +1400,8 @@
 
 			GfxObj *obj = _vm->_gfx->loadGet(_tokens[1]);
 			obj->frame = 0;
-			obj->x = z->_left;
-			obj->y = z->_top;
+			obj->x = z->getX();
+			obj->y = z->getY();
 			_vm->_gfx->showGfxObj(obj, visible);
 
 			data->gfxobj = obj;
@@ -1467,8 +1463,8 @@
 
 			GfxObj *obj = _vm->_gfx->loadDoor(_tokens[1]);
 			obj->frame = frame;
-			obj->x = z->_left;
-			obj->y = z->_top;
+			obj->x = z->getX();
+			obj->y = z->getY();
 			_vm->_gfx->showGfxObj(obj, true);
 
 			data->gfxobj = obj;

Modified: scummvm/trunk/engines/parallaction/saveload.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/saveload.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/saveload.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -207,9 +207,9 @@
 
 	sprintf(s, "%s\n", _saveData1);
 	f->writeString(s);
-	sprintf(s, "%d\n", _char._ani->_left);
+	sprintf(s, "%d\n", _char._ani->getX());
 	f->writeString(s);
-	sprintf(s, "%d\n", _char._ani->_top);
+	sprintf(s, "%d\n", _char._ani->getY());
 	f->writeString(s);
 	sprintf(s, "%d\n", _score);
 	f->writeString(s);

Modified: scummvm/trunk/engines/parallaction/walk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/walk.cpp	2008-08-15 03:59:45 UTC (rev 33891)
+++ scummvm/trunk/engines/parallaction/walk.cpp	2008-08-15 04:30:45 UTC (rev 33892)
@@ -479,7 +479,7 @@
 	_char.setFoot(foot);
 #endif
 
-	_ch->_ani->_frame = _dirFrame;	// temporary solution
+	_ch->_ani->setF(_dirFrame);	// temporary solution
 
 #if 0
 	// TODO: support scrolling ;)
@@ -515,7 +515,7 @@
 	GfxObj *obj = _ch->_ani->gfxobj;
 
 	Common::Rect rect;
-	obj->getRect(_ch->_ani->_frame, rect);
+	obj->getRect(_ch->_ani->getF(), rect);
 
 	uint scale;
 	if (rect.bottom > _vm->_location._zeta0) {
@@ -609,11 +609,11 @@
 
 	if (_fieldC) {
 		debugC(9, kDebugWalk, "PathWalker_BR::walk, foot moved from (%i, %i) to (%i, %i)\n", _startFoot.x, _startFoot.y, newpos.x, newpos.y);
-		_ch->_ani->_frame = walkFrame + _dirFrame + 1;
+		_ch->_ani->setF(walkFrame + _dirFrame + 1);
 		_startFoot.x = newpos.x;
 		_startFoot.y = newpos.y;
 		_ch->setFoot(_startFoot);
-		_ch->_ani->_z = newpos.y;
+		_ch->_ani->setZ(newpos.y);
 	}
 
 	if (_fieldC || !_ch->_walkPath.empty()) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list