[Scummvm-cvs-logs] CVS: scummvm/scumm/smush insane.cpp,1.9,1.10 insane.h,1.6,1.7

Eugene Sandulenko sev at users.sourceforge.net
Fri Dec 12 19:41:01 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv12319

Modified Files:
	insane.cpp insane.h 
Log Message:
 o first scene is completable, although it seems to me that enemy moving
   is wrong, as he never approaches Ben
 o fix warnings
 o more correct names to some procedures
 o cleanup


Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- insane.cpp	12 Dec 2003 14:29:58 -0000	1.9
+++ insane.cpp	13 Dec 2003 03:40:54 -0000	1.10
@@ -46,6 +46,14 @@
 // tovista1.san
 // tovista2.san
 
+// TODO:
+// o Fix wrong enemy animation
+// o Proper SAN seeking/switching. Now it just crashes
+// o TRS file support. Everything is in place, I just need to figure out function parameters
+// o FLU files support
+// o Kill bugs
+// o Code review/cleanup
+
[...1550 lines suppressed...]
+		(_actor[1].x - _actor[0].x < weaponMinRange(1)) ||
+		!_actor[0].kicking)
+		return false;
+
+	return true;
 }
 
 void Insane::actor13Reaction(int32 buttons) {
@@ -5704,9 +6720,9 @@
 	int32 buttons;
 
 	if (_actor[1].enemyHandler != -1)
-		buttons = enemyHandler(_actor[1].enemyHandler, 0, 1, _actor[1].probability);
+		buttons = enemyHandler(_actor[1].enemyHandler, 1, 0, _actor[1].probability);
 	else
-		buttons = enemyHandler(EN_TORQUE, 0, 1, _actor[1].probability);
+		buttons = enemyHandler(EN_TORQUE, 1, 0, _actor[1].probability);
 
 	if (_actor[1].speed) {
 		_actor[1].field_18 += _actor[1].field_14 / 40;

Index: insane.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- insane.h	12 Dec 2003 14:29:59 -0000	1.6
+++ insane.h	13 Dec 2003 03:40:54 -0000	1.7
@@ -246,8 +246,8 @@
 		int32 costume4;
 		int32 costume6;
 		int32 costume5;
-		int16 field_2C;
-		int32 field_30;
+		int16 costumevar;
+		int32 maxframe;
 		int32 field_34;
 	};
   
@@ -459,10 +459,10 @@
 	int32 weaponMinRange(int32 actornum);
 	void switchBenWeapon(void);
 	void prepareScenePropScene(int32 scenePropNum, bool arg_4, bool arg_8);
-	int32 calcDamage(bool arg_0, bool arg_4);
+	int32 calcBenDamage(bool arg_0, bool arg_4);
 	int32 weaponDamage(int32 actornum);
 	void proc47(int32 actornum, int32 val);
-	bool weaponIsEffective(void);
+	bool weaponBenIsEffective(void);
 	bool actor1StateFlags(int state);
 	bool actor0StateFlags1(int state);
 	bool actor0StateFlags2(int state);
@@ -470,12 +470,12 @@
 	void init_scenePropStruct(int32 n, int32 n1, int32 actornum, int32 sound, int32 trsId,
 							  byte r, byte g, byte b, int32 counter, int32 maxCounter,
 							  int32 index);
-	int32 setProperActorState(void);
+	int32 setBenState(void);
 	bool smlayer_actorNeedRedraw(int actornum, int actnum);
 	void reinitActors(void);
 	void smush_setPaletteValue(int where, int r, int g, int b);
 	char *handleTrsTag(int32 trsFilePtr, int32 trsId);
-	void enemyOuchSound(void);
+	void ouchSoundBen(void);
 	void smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32 step1, 
 							   int32 step2, int32 setupsan1, byte *fluPtr, int32 numFrames);
 	void smush_setupSanFromStart(const char *filename, int32 setupsan2, int32 step1, 
@@ -494,7 +494,10 @@
 	void setEnemyAnimation(int32 actornum, int anim);
 	void chooseEnemyWeaponAnim(int buttons);
 	void switchEnemyWeapon(void);
-	void enemyDustAction(void);
+	void setEnemyState(void);
+	int32 calcEnemyDamage(bool arg_0, bool arg_4);
+	void ouchSoundEnemy(void);
+	bool weaponEnemyIsEffective(void);
 
 	void blah(void);
 





More information about the Scummvm-git-logs mailing list