[Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.98,1.99 rscfile.cpp,1.40,1.41 saga.h,1.122,1.123

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Sep 21 03:13:16 CEST 2005


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

Modified Files:
	game.cpp rscfile.cpp saga.h 
Log Message:
Added a GAME_SWAPENDIAN flag so that game files can be labelled as having
the opposite byte order of the rest of the files. This is needed for the
multi-OS version. (Now it crashes with a "RAWInputStream() wrong musicInfo"
message instead, but it's still an improvement.)


Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- game.cpp	2 Sep 2005 20:17:52 -0000	1.98
+++ game.cpp	21 Sep 2005 10:09:58 -0000	1.99
@@ -334,7 +334,7 @@
 	{"ite.rsc", GAME_RESOURCEFILE},
 	{"scripts.rsc", GAME_SCRIPTFILE},
 	{"sounds.rsc", GAME_SOUNDFILE},
-	{"Inherit the Earth Voices", GAME_VOICEFILE},
+	{"Inherit the Earth Voices", GAME_VOICEFILE | GAME_SWAPENDIAN},
 	{"music.rsc", GAME_MUSICFILE}
 };
 

Index: rscfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- rscfile.cpp	9 Sep 2005 10:40:49 -0000	1.40
+++ rscfile.cpp	21 Sep 2005 10:09:58 -0000	1.41
@@ -268,12 +268,15 @@
 	byte *tableBuffer;
 	size_t tableSize;
 	bool isMacBinary;
-	
+
 	if (!context->file->open(context->fileName)) {
 		return false;
 	}
 
 	context->isBigEndian = _vm->isBigEndian();
+
+	if (context->fileType & GAME_SWAPENDIAN)
+		context->isBigEndian = !context->isBigEndian;
 	
 	isMacBinary = (context->fileType & GAME_MACBINARY) > 0;
 	context->fileType &= ~GAME_MACBINARY;
@@ -287,7 +290,6 @@
 			return false;
 		}
 	}
-	
 
 	//process internal patch files
 	if (GAME_PATCHFILE & context->fileType) {
@@ -328,7 +330,6 @@
 			}
 		}
 	}
-	
 
 	return true;
 }

Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- saga.h	9 Sep 2005 10:40:49 -0000	1.122
+++ saga.h	21 Sep 2005 10:09:58 -0000	1.123
@@ -295,7 +295,8 @@
 	GAME_MUSICFILE_GM = 1 << 6,
 	GAME_MUSICFILE_FM = 1 << 7,
 	GAME_PATCHFILE    = 1 << 8,
-	GAME_MACBINARY    = 1 << 9
+	GAME_MACBINARY    = 1 << 9,
+	GAME_SWAPENDIAN   = 1 << 10
 };
 
 enum GameSoundTypes {





More information about the Scummvm-git-logs mailing list