[Scummvm-cvs-logs] CVS: scummvm/simon intern.h,1.23,1.24 simon.cpp,1.346,1.347

Travis Howell kirben at users.sourceforge.net
Mon Dec 1 22:24:00 CET 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv27579/simon

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

Cleanup


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- intern.h	1 Dec 2003 00:45:16 -0000	1.23
+++ intern.h	2 Dec 2003 06:23:05 -0000	1.24
@@ -141,25 +141,26 @@
 } // End of namespace Simon
 
 enum {
-	GF_SIMON2 = 1 << 0,
-	GF_WIN    = 1 << 1,
-	GF_TALKIE = 1 << 2,
-	GF_DEMO   = 1 << 3,
-	GF_MAC    = 1 << 4,
-	GF_AMIGA  = 1 << 5,
-	GF_ACORN  = 1 << 6
+	GF_SIMON2     = 1 << 0,
+	GF_WIN        = 1 << 1,
+	GF_TALKIE     = 1 << 2,
+	GF_DEMO       = 1 << 3,
+	GF_MAC        = 1 << 4,
+	GF_AMIGA      = 1 << 5,
+	GF_ACORN      = 1 << 6,
+	GF_OLD_BUNDLE = 1 << 7
 };
 
 enum {
-	GAME_SIMON1DOS = 0,
+	GAME_SIMON1DOS = GF_OLD_BUNDLE,
 	GAME_SIMON2DOS = GF_SIMON2,
 	GAME_SIMON1TALKIE = GF_TALKIE,
 	GAME_SIMON2TALKIE = GF_SIMON2 | GF_TALKIE,
 	GAME_SIMON1WIN = GF_WIN | GF_TALKIE,
 	GAME_SIMON2WIN = GF_SIMON2 | GF_WIN | GF_TALKIE,
-	GAME_SIMON1DEMO = GF_DEMO,
+	GAME_SIMON1DEMO = GF_DEMO | GF_OLD_BUNDLE,
 	GAME_SIMON2MAC =  GF_SIMON2 | GF_WIN | GF_TALKIE | GF_MAC,
-	GAME_SIMON1AMIGA = GF_AMIGA,
+	GAME_SIMON1AMIGA = GF_AMIGA | GF_OLD_BUNDLE,
 	GAME_SIMON1CD32 = GF_TALKIE | GF_AMIGA,
 	GAME_SIMON1ACORN = GF_TALKIE | GF_ACORN
 };

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -d -r1.346 -r1.347
--- simon.cpp	2 Dec 2003 05:53:31 -0000	1.346
+++ simon.cpp	2 Dec 2003 06:23:05 -0000	1.347
@@ -1226,21 +1226,21 @@
 }
 
 uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
-	if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+	if (_game & GF_OLD_BUNDLE)
 		return loadTextFile_simon1(filename, dst);
 	else
 		return loadTextFile_gme(filename, dst);
 }
 
 File *SimonEngine::openTablesFile(const char *filename) {
-	if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+	if (_game & GF_OLD_BUNDLE)
 		return openTablesFile_simon1(filename);
 	else
 		return openTablesFile_gme(filename);
 }
 
 void SimonEngine::closeTablesFile(File *in) {
-	if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+	if (_game & GF_OLD_BUNDLE) {
 		in->close();
 		delete in;
 	}
@@ -3294,7 +3294,8 @@
 
 	if (fcs->fcs_data->unk4 != -1) {
 		delete_hitarea_by_index(fcs->fcs_data->unk4);
-		fcs_unk_5(fcs, fcs_index);
+		if (!(_game & GF_SIMON2))
+			fcs_unk_5(fcs, fcs_index);
 	}
 
 	free(fcs->fcs_data);
@@ -3308,7 +3309,7 @@
 void SimonEngine::fcs_unk_5(FillOrCopyStruct *fcs, uint fcs_index) {
 	if (_game == GAME_SIMON1WIN) {
 		o_kill_sprite_simon1(0x80);
-	} else if (!(_game & GF_SIMON2)) {
+	} else {
 		o_kill_sprite_simon1(0x81);
 		start_vga_code(0, 1, 0x81, 0, 0, 0xE);
 	}
@@ -4362,7 +4363,7 @@
 #undef SD_TYPE_MATCH
 
 void SimonEngine::read_vga_from_datfile_1(uint vga_id) {
-	if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+	if (_game & GF_OLD_BUNDLE) {
 		File in;
 		char buf[50];
 		uint32 size;
@@ -4404,7 +4405,7 @@
 }
 
 byte *SimonEngine::read_vga_from_datfile_2(uint id) {
-	if (_game & GF_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+	if (_game & GF_OLD_BUNDLE) {
 		File in;
 		char buf[50];
 		uint32 size;
@@ -4456,7 +4457,7 @@
 }
 
 void SimonEngine::openGameFile() {
-	if (!(_game & GF_AMIGA) && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) {
+	if (!(_game & GF_OLD_BUNDLE)) {
 		_game_file = new File();
 		_game_file->open(gss->gme_filename, _gameDataPath);
 





More information about the Scummvm-git-logs mailing list