[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.134,1.135 res.cpp,1.38,1.39 simon.h,1.156,1.157 vga.cpp,1.145,1.146

kirben kirben at users.sourceforge.net
Wed Nov 9 17:19:03 CET 2005


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23807/simon

Modified Files:
	items.cpp res.cpp simon.h vga.cpp 
Log Message:

Add another wrapper for endian difference in FF.


Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- items.cpp	10 Nov 2005 00:53:00 -0000	1.134
+++ items.cpp	10 Nov 2005 01:18:09 -0000	1.135
@@ -1012,8 +1012,8 @@
 
 		case 182:{									/* load beard */
 				if (_game == GAME_FEEBLEFILES) {
-					// Load Smacker filename
-					debug(1,"Load Smacker: %s", getStringPtrByID(getNextStringID()));
+					// Load video file
+					debug(1,"Load video file: %s", getStringPtrByID(getNextStringID()));
 				} else if (_game & GF_SIMON2) {
 					goto invalid_opcode;
 				} else {
@@ -1024,8 +1024,8 @@
 
 		case 183:{									/* unload beard */
 				if (_game == GAME_FEEBLEFILES) {
-					// Play Smacker
-					debug(1, "Play Smacker");
+					// Play video
+					debug(1, "Play video");
 				} else if (_game & GF_SIMON2) {
 					goto invalid_opcode;
 				} else {
@@ -1039,10 +1039,11 @@
 			}
 			break;
 
-		case 185:{									/* midi sfx file number */
+		case 185:{									/* load sound files */
 				if (_game & GF_SIMON2)
 					goto invalid_opcode;
-					_soundFileId = getVarOrWord();
+
+				_soundFileId = getVarOrWord();
 				if (_game == GAME_SIMON1CD32) {
 					char buf[10];
 					sprintf(buf, "%d%s", _soundFileId, "Effects");
@@ -1621,7 +1622,7 @@
 }
 
 void SimonEngine::o_unk_120(uint a) {
-	uint16 id = TO_BE_16(a);
+	uint16 id = to16Wrapper(a);
 	_lockWord |= 0x8000;
 	_vcPtr = (byte *)&id;
 	vc15_wakeup_id();
@@ -1647,7 +1648,7 @@
 }
 
 void SimonEngine::o_kill_sprite_simon1(uint a) {
-	uint16 b = TO_BE_16(a);
+	uint16 b = to16Wrapper(a);
 	_lockWord |= 0x8000;
 	_vcPtr = (byte *)&b;
 	vc60_killSprite();
@@ -1657,8 +1658,8 @@
 void SimonEngine::o_kill_sprite_simon2(uint a, uint b) {
 	uint16 items[2];
 
-	items[0] = TO_BE_16(a);
-	items[1] = TO_BE_16(b);
+	items[0] = to16Wrapper(a);
+	items[1] = to16Wrapper(b);
 
 	_lockWord |= 0x8000;
 	_vcPtr = (byte *)&items;

Index: res.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/res.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- res.cpp	18 Oct 2005 01:30:22 -0000	1.38
+++ res.cpp	10 Nov 2005 01:18:09 -0000	1.39
@@ -113,6 +113,13 @@
 	" ", " ", "BT ", " ", "B ", " ", "BBBB ", " ", " ", "BBBB ", "B ", "B ", "B ", "B "
 };
 
+uint16 SimonEngine::to16Wrapper(uint value) {
+	if (_game == GAME_FEEBLEFILES)
+		return TO_LE_16(value);
+	else
+		return TO_BE_16(value);
+}
+
 uint16 SimonEngine::readUint16Wrapper(const void *src) {
 	if (_game == GAME_FEEBLEFILES)
 		return READ_LE_UINT16(src);

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- simon.h	10 Nov 2005 00:53:00 -0000	1.156
+++ simon.h	10 Nov 2005 01:18:09 -0000	1.157
@@ -385,6 +385,7 @@
 	virtual ~SimonEngine();
 
 protected:
+	uint16 to16Wrapper(uint value);
 	uint16 readUint16Wrapper(const void *src);
 
 	int allocGamePcVars(Common::File *in);

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- vga.cpp	10 Nov 2005 00:53:00 -0000	1.145
+++ vga.cpp	10 Nov 2005 01:18:09 -0000	1.146
@@ -1664,7 +1664,7 @@
 	_vgaCurFileId = vc_read_next_word();
 	_vgaCurSpriteId = vc_read_next_word();
 
-	tmp = TO_BE_16(vc_read_next_word());
+	tmp = to16Wrapper(vc_read_next_word());
 
 	vc_ptr_org = _vcPtr;
 	_vcPtr = (byte *)&tmp;





More information about the Scummvm-git-logs mailing list