[Scummvm-cvs-logs] CVS: scummvm/simon game.cpp,1.2,1.3 intern.h,1.44,1.45 simon.cpp,1.536,1.537

kirben kirben at users.sourceforge.net
Fri Nov 11 22:45:03 CET 2005


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

Modified Files:
	game.cpp intern.h simon.cpp 
Log Message:

Fix simon1cd32 regression.


Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/game.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game.cpp	12 Nov 2005 06:22:18 -0000	1.2
+++ game.cpp	12 Nov 2005 06:44:03 -0000	1.3
@@ -224,6 +224,14 @@
 };
 
 // Simon the Sorcerer 2
+static GameFileDescription SIMON2DOS_GameFiles[] = {
+	{"game32", GAME_BASEFILE},
+	{"icon.dat", GAME_ICONFILE},
+	{"simon2.gme", GAME_GMEFILE},
+	{"stripped.txt", GAME_STRFILE},
+	{"tbllist", GAME_TBLFILE},
+};
+
 static GameFileDescription SIMON2_GameFiles[] = {
 	{"gsptr30", GAME_BASEFILE},
 	{"icon.dat", GAME_ICONFILE},
@@ -265,7 +273,7 @@
 		GType_SIMON1,
 		GID_SIMON1CD32,
 		"Simon the Sorcerer 1 (Amiga CD32)",
-		ARRAYSIZE(SIMON1_GameFiles),
+		ARRAYSIZE(SIMON1CD32_GameFiles),
 		SIMON1CD32_GameFiles,
 		GF_TALKIE | GF_OLD_BUNDLE,
 		Common::EN_USA,
@@ -408,8 +416,8 @@
 		GType_SIMON2,
 		GID_SIMON2DOS,
 		"Simon the Sorcerer 2 (DOS Floppy)",
-		ARRAYSIZE(SIMON2_GameFiles),
-		SIMON2_GameFiles,
+		ARRAYSIZE(SIMON2DOS_GameFiles),
+		SIMON2DOS_GameFiles,
 		0,
 		Common::EN_USA,
 		Common::kPlatformPC,

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- intern.h	12 Nov 2005 06:22:18 -0000	1.44
+++ intern.h	12 Nov 2005 06:44:03 -0000	1.45
@@ -149,7 +149,8 @@
 
 enum GameFeatures {
 	GF_TALKIE     = 1 << 0,
-	GF_OLD_BUNDLE = 1 << 1
+	GF_OLD_BUNDLE = 1 << 1,
+	GF_CRUNCHED   = 1 << 2
 };
 
 enum GameFileTypes {

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.536
retrieving revision 1.537
diff -u -d -r1.536 -r1.537
--- simon.cpp	12 Nov 2005 06:22:18 -0000	1.536
+++ simon.cpp	12 Nov 2005 06:44:03 -0000	1.537
@@ -1314,7 +1314,7 @@
 					// TODO
 				} else if (getGameType() == GType_SIMON2) {
 					_sound->loadSfxTable(_gameFile, _gameOffsetsPtr[atoi(filename + 6) - 1 + SOUND_INDEX_BASE]);
-				} else if (getFeatures() & GF_TALKIE) {
+				} else if (getPlatform() == Common::kPlatformWindows) {
 					memcpy(filename, "SFXXXX", 6);
 					_sound->readSfxFile(filename);
 				}
@@ -3562,7 +3562,7 @@
 #define SD_TYPE_LITERAL (0)
 #define SD_TYPE_MATCH   (1)
 
-static bool decrunch_file_amiga (byte *src, byte *dst, uint32 size) {
+static bool decrunchFile(byte *src, byte *dst, uint32 size) {
 	byte *s = src + size - 4;
 	uint32 destlen = READ_BE_UINT32 (s);
 	uint32 bb, x, y;
@@ -3675,11 +3675,11 @@
 			error("read_vga_from_datfile_1: can't open %s", buf);
 		size = in.size();
 
-		if (getPlatform() == Common::kPlatformAmiga) {
+		if (getFeatures() & GF_CRUNCHED) {
 			byte *buffer = new byte[size];
 			if (in.read(buffer, size) != size)
 				error("read_vga_from_datfile_1: read failed");
-			decrunch_file_amiga (buffer, _vgaBufferPointers[11].vgaFile2, size);
+			decrunchFile(buffer, _vgaBufferPointers[11].vgaFile2, size);
 			delete [] buffer;
 		} else {
 			if (in.read(_vgaBufferPointers[11].vgaFile2, size) != size)
@@ -3721,12 +3721,12 @@
 			error("read_vga_from_datfile_2: can't open %s", buf);
 		size = in.size();
 
-		if (getPlatform() == Common::kPlatformAmiga) {
+		if (getFeatures() & GF_CRUNCHED) {
 			byte *buffer = new byte[size];
 			if (in.read(buffer, size) != size)
 				error("read_vga_from_datfile_2: read failed");
 			dst = setup_vga_destination (READ_BE_UINT32(buffer + size - 4) + extraBuffer);
-			decrunch_file_amiga (buffer, dst, size);
+			decrunchFile(buffer, dst, size);
 			delete[] buffer;
 		} else {
 			dst = setup_vga_destination(size + extraBuffer);





More information about the Scummvm-git-logs mailing list