[Scummvm-cvs-logs] SF.net SVN: scummvm: [26436] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Apr 9 17:40:11 CEST 2007


Revision: 26436
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26436&view=rev
Author:   drmccoy
Date:     2007-04-09 08:40:10 -0700 (Mon, 09 Apr 2007)

Log Message:
-----------
Small glitch/different goblin handling fix for Gob3

Modified Paths:
--------------
    scummvm/trunk/engines/gob/goblin.h
    scummvm/trunk/engines/gob/goblin_v2.cpp
    scummvm/trunk/engines/gob/goblin_v3.cpp

Modified: scummvm/trunk/engines/gob/goblin.h
===================================================================
--- scummvm/trunk/engines/gob/goblin.h	2007-04-09 14:00:23 UTC (rev 26435)
+++ scummvm/trunk/engines/gob/goblin.h	2007-04-09 15:40:10 UTC (rev 26436)
@@ -302,6 +302,9 @@
 
 class Goblin_v3 : public Goblin_v2 {
 public:
+	virtual void placeObject(Gob_Object * objDesc, char animated,
+			int16 index, int16 x, int16 y, int16 state);
+
 	Goblin_v3(GobEngine *vm);
 	virtual ~Goblin_v3() {};
 

Modified: scummvm/trunk/engines/gob/goblin_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/goblin_v2.cpp	2007-04-09 14:00:23 UTC (rev 26435)
+++ scummvm/trunk/engines/gob/goblin_v2.cpp	2007-04-09 15:40:10 UTC (rev 26436)
@@ -426,9 +426,6 @@
 		}
 
 		if (animData->frame >= framesCount) {
-			if (animData->nextState == -1) // TODO: This should never happen
-				return;
-
 			state = animData->nextState;
 			animation = obj->goblinStates[state][0].animation;
 			layer = obj->goblinStates[state][0].layer;

Modified: scummvm/trunk/engines/gob/goblin_v3.cpp
===================================================================
--- scummvm/trunk/engines/gob/goblin_v3.cpp	2007-04-09 14:00:23 UTC (rev 26435)
+++ scummvm/trunk/engines/gob/goblin_v3.cpp	2007-04-09 15:40:10 UTC (rev 26436)
@@ -107,4 +107,25 @@
 	}
 }
 
+void Goblin_v3::placeObject(Gob_Object *objDesc, char animated,
+		int16 index, int16 x, int16 y, int16 state) {
+
+	Mult::Mult_Object &obj = _vm->_mult->_objects[index];
+	Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
+
+	if ((state != -1) && (obj.goblinStates[state] != 0)) {
+		if (state == 8)
+			objAnim.curLookDir = 0;
+		else if (state == 9)
+			objAnim.curLookDir = 4;
+		else if (state == 28)
+			objAnim.curLookDir = 6;
+		else if (state == 29)
+			objAnim.curLookDir = 2;
+	}
+
+	Goblin_v2::placeObject(objDesc, animated, index, x, y, state);
+
+}
+
 } // End of namespace Gob


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