[Scummvm-cvs-logs] CVS: scummvm/scumm/smush insane.cpp,1.16,1.17 insane.h,1.10,1.11 smush_player.cpp,1.72,1.73

Eugene Sandulenko sev at users.sourceforge.net
Tue Dec 16 13:36:02 CET 2003


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

Modified Files:
	insane.cpp insane.h smush_player.cpp 
Log Message:
 o Another batch of proper variables naming
 o Implemented support functions for every scene
 o Started work on IACT containing scenes

IACT for insane would be INSANE Action rater that IMUSE Action


Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- insane.cpp	15 Dec 2003 00:58:45 -0000	1.16
+++ insane.cpp	16 Dec 2003 21:35:30 -0000	1.17
@@ -34,6 +34,8 @@
 #include "scumm/imuse_digi.h"
 
 #include "scumm/smush/smush_player.h"
+#include "scumm/smush/chunk_type.h"
+#include "scumm/smush/chunk.h"
 #include "scumm/smush/insane.h"
 
 #ifdef INSANE
@@ -47,6 +49,7 @@
 // tovista2.san
 
[...3395 lines suppressed...]
+	par1 = b.getWord();
+	par2 = b.getWord();
+
+	if (!par2) {
+		if (isBitSet(par1))
+			_player->_skipNext = true;
+
+		return;
+	}
+
+	if (isBitSet(par1) != isBitSet(par2))
+		_player->_skipNext = true;
+}
+
+bool Insane::isBitSet(int n) {
+	// FIXME: implement
+	return 0;
 }
 
 void Insane::smlayer_setActorFacing(int actornum, int actnum, int frame, int direction) {

Index: insane.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- insane.h	14 Dec 2003 06:47:22 -0000	1.10
+++ insane.h	16 Dec 2003 21:35:30 -0000	1.11
@@ -27,6 +27,7 @@
 #include "scumm/nut_renderer.h"
 
 #include "scumm/smush/smush_player.h"
+#include "scumm/smush/chunk.h"
 
 #ifdef INSANE
 
@@ -63,6 +64,9 @@
 	void procPreRendering(void);
 	void procPostRendering(byte *renderBitmap, int32 codecparam, int32 setupsan12,
 						   int32 setupsan13, int32 curFrame, int32 maxFrame);
+	void procIACT(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void procSKIP(Chunk &b);
 	void escapeKeyHandler(void);
 
  private:
@@ -253,15 +257,6 @@
   
 	struct enemy _enemy[9];
   
-	struct act {
-		int32 actor;
-		byte  state;
-		int32 room;
-		int32 facing;
-		int32 tilt;
-		int32 frame;
-	};
-  
 	struct fluConf {
 		int sceneId;
 		byte *fluPtr;
@@ -286,27 +281,36 @@
 
 	struct sceneProp _sceneProp[139];
 
+	struct act {
+		int32 actor;
+		byte  state;
+		int32 room;
+		int32 animTilt;
+		int32 tilt;
+		int32 frame;
+	};
+  
 	struct actor {
 		int32 damage;
 		int32 maxdamage;
 		int32 field_8;
-		int32 field_C;
+		int32 frame;
+		int32 tilt;
+		int32 cursorX;
 		int32 speed;
-		int32 field_14;
-		int32 field_18;
 		int32 x;
 		int32 y;
 		int32 y1;
 		int32 x1;
-		int32 field_2C;
-		int32 field_30;
+		int32 weaponClass;
+		int32 animWeaponClass;
 		int32 field_34;
 		int32 field_38;
 		bool  lost;
 		bool  kicking;
 		bool  field_44;
 		int32 field_48;
-		int32 field_4C;
+		bool  defunct;
 		int32 scenePropSubIdx;
 		int32 field_54;
 		int32 runningSound;
@@ -395,7 +399,7 @@
 	void switchSceneIfNeeded(void);
 	int smush_changeState(int state);
 	void init_actStruct(int actornum, int actnum, int32 actorval, byte state, 
-						  int32 room, int32 facing, int32 tilt, int32 frame);
+						  int32 room, int32 animtilt, int32 tilt, int32 frame);
 	void init_enemyStruct(int n, int32 handler, int32 initializer,
 							   int32 field_8, int32 maxdamage, int32 field_10,
 							   int32 field_14, int32 sound, const char *filename,
@@ -498,9 +502,19 @@
 	int32 calcEnemyDamage(bool arg_0, bool arg_4);
 	void ouchSoundEnemy(void);
 	bool weaponEnemyIsEffective(void);
-
-	void blah(void);
-
+	void iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	void iactScene21(byte *renderBitmap, int32 codecparam, int32 setupsan12,
+				  int32 setupsan13, Chunk &b, int32 size, int32 flags);
+	bool isBitSet(int n);
 };
 } // End of namespace Insane
 

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- smush_player.cpp	15 Dec 2003 20:33:40 -0000	1.72
+++ smush_player.cpp	16 Dec 2003 21:35:30 -0000	1.73
@@ -782,7 +782,15 @@
 			handleDeltaPalette(*sub);
 			break;
 		case TYPE_IACT:
+#ifdef INSANE
+			// FIXME: check parameters
+			if (_insanity)
+				_scumm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0);
+			else
+				handleImuseAction(*sub);
+#else
 			handleImuseAction(*sub);
+#endif
 			break;
 		case TYPE_STOR:
 			handleStore(*sub);
@@ -791,7 +799,14 @@
 			handleFetch(*sub);
 			break;
 		case TYPE_SKIP:
+#ifdef INSANE
+			if (_insanity)
+				_scumm->_insane->procSKIP(*sub);
+			else
+				handleSkip(*sub);
+#else
 			handleSkip(*sub);
+#endif
 			break;
 		case TYPE_TEXT:
 			handleTextResource(*sub);
@@ -975,8 +990,6 @@
 void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos) {
 	Chunk *sub;
 	
-	debug(0, "seekSan(%s, %s, %d)", file, directory, pos);
-
 	if (file) {
 		if (_base)
 			delete _base;
@@ -993,7 +1006,7 @@
 	if (pos != 8)
 		_base->seek(pos, FileChunk::seek_start);
 
-	// FIXME: is this really applicable? HACK
+	// FIXME: is this really applicable for FLU files? HACK
 	_frame = 0;
 }
 





More information about the Scummvm-git-logs mailing list