[Scummvm-cvs-logs] CVS: scummvm/simon intern.h,1.10,1.11 items.cpp,1.45,1.46 simon.cpp,1.142,1.143

Travis Howell kirben at users.sourceforge.net
Mon Jan 13 21:26:05 CET 2003


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

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

Add hopefully the final simon target, not support at all yet.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- intern.h	14 Jan 2003 04:25:38 -0000	1.10
+++ intern.h	14 Jan 2003 05:25:31 -0000	1.11
@@ -138,7 +138,7 @@
 	GAME_TALKIE = 4,
 	GAME_DEMO = 8,
 	GAME_MAC = 16,
-	GAME_CD32 = 32,
+	GAME_AMIGA = 32,
 
 	GAME_SIMON1DOS = 0,
 	GAME_SIMON2DOS = GAME_SIMON2,
@@ -148,7 +148,8 @@
 	GAME_SIMON2WIN = GAME_SIMON2 + GAME_WIN + GAME_TALKIE,
 	GAME_SIMON1DEMO = GAME_DEMO,
 	GAME_SIMON2MAC = GAME_SIMON2WIN + GAME_MAC,
-	GAME_SIMON1CD32 = GAME_SIMON1TALKIE + GAME_CD32
+	GAME_SIMON1AMIGA = GAME_AMIGA,
+	GAME_SIMON1CD32 = GAME_SIMON1TALKIE + GAME_AMIGA
 };
 
 #endif

Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- items.cpp	11 Jan 2003 15:38:37 -0000	1.45
+++ items.cpp	14 Jan 2003 05:25:31 -0000	1.46
@@ -991,7 +991,7 @@
 					uint d = _array_4[a];
 					if (d != 0)
 						talk_with_speech(d, b);
-				} else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS || _game == GAME_SIMON2DOS) {
+				} else if (!(_game & GAME_TALKIE)) {
 					const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]);
 					ThreeValues *tv = getThreeValues(b);
 
@@ -1244,7 +1244,7 @@
 			offs = getOffsetOfChild2Param(child, 0x100);
 			talk_with_speech(child->array[offs] + 3550, a);
 		}
-	} else if (_game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS || _game == GAME_SIMON2DOS) {
+	} else if (!(_game & GAME_TALKIE)) {
 		if (child != NULL && child->avail_props & 1) {
 			const char *s = (const char *)getStringPtrByID(child->array[0]);
 			char buf[256];

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- simon.cpp	14 Jan 2003 04:25:38 -0000	1.142
+++ simon.cpp	14 Jan 2003 05:25:31 -0000	1.143
@@ -54,7 +54,7 @@
 	"GAMEPC",									/* gamepc_filename */
 };
 
-static const GameSpecificSettings simon1cd32_settings = {
+static const GameSpecificSettings simon1amiga_settings = {
 	1,										/* VGA_DELAY_BASE */
 	1576 / 4,									/* TABLE_INDEX_BASE */
 	1460 / 4,									/* TEXT_INDEX_BASE */
@@ -67,8 +67,8 @@
 	"",										/* wav_filename */
 	"",										/* voc_filename */
 	"SIMON.MP3",									/* mp3_filename */
-	"",									/* voc_effects_filename */
-	"",									/* mp3_effects_filename */
+	"",										/* voc_effects_filename */
+	"",										/* mp3_effects_filename */
 	"gameamiga",									/* gamepc_filename */
 };
 
@@ -983,7 +983,7 @@
 
 uint SimonState::loadTextFile(const char *filename, byte *dst)
 {
-	if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+	if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
 		return loadTextFile_simon1(filename, dst);
 	else
 		return loadTextFile_gme(filename, dst);
@@ -991,7 +991,7 @@
 
 File *SimonState::openTablesFile(const char *filename)
 {
-	if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+	if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
 		return openTablesFile_simon1(filename);
 	else
 		return openTablesFile_gme(filename);
@@ -999,7 +999,7 @@
 
 void SimonState::closeTablesFile(File *in)
 {
-	if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
+	if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
 		closeTablesFile_simon1(in);
 	else
 		closeTablesFile_gme(in);
@@ -1491,7 +1491,7 @@
 void SimonState::loadIconFile()
 {
 	File in;
-	if (_game == GAME_SIMON1CD32)
+	if (_game & GAME_AMIGA)
 		in.open("icon.pkd", _gameDataPath);
 	else
 		in.open("ICON.DAT", _gameDataPath);
@@ -1897,6 +1897,7 @@
 
 	case GAME_SIMON1DEMO:
 	case GAME_SIMON1DOS:
+	case GAME_SIMON1AMIGA:
 	case GAME_SIMON2DOS:
 		talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
 		break;
@@ -4364,21 +4365,21 @@
 
 void SimonState::read_vga_from_datfile_1(uint vga_id)
 {
-	if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+	if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
 		File in;
 		char buf[50];
 		uint32 size;
-		if (vga_id == 23) {
-			if (_game == GAME_SIMON1CD32)
-				sprintf(buf, "0112.out"); 
-			else
-				sprintf(buf, "0112.VGA"); 
-		}
-		if (vga_id == 328) {
-			if (_game == GAME_SIMON1CD32)
-				sprintf(buf, "0119.out"); 
-			else
-				sprintf(buf, "0119.VGA"); 
+		if (vga_id == 23) 
+			vga_id = 112;
+		if (vga_id == 328)
+			vga_id = 119;
+
+		if (_game == GAME_SIMON1CD32) {
+			sprintf(buf, "0%d.out", vga_id); 
+		} else if (_game == GAME_SIMON1AMIGA) {
+			sprintf(buf, "0%d.pkd", vga_id); 
+		} else {
+			sprintf(buf, "0%d.VGA", vga_id); 
 		}
 
 		in.open(buf, _gameDataPath);
@@ -4401,16 +4402,19 @@
 
 byte *SimonState::read_vga_from_datfile_2(uint id)
 {
-	if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+	if (_game & GAME_AMIGA || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
 		File in;
 		char buf[50];
 		uint32 size;
 		byte *dst;
 
-		if (_game == GAME_SIMON1CD32)
+		if (_game == GAME_SIMON1CD32) {
 			sprintf(buf, "%.3d%d.out", id >> 1, (id & 1) + 1);
-		else
+		} else if (_game == GAME_SIMON1AMIGA) {
+			sprintf(buf, "%.3d%d.pkd", id >> 1, (id & 1) + 1);
+		} else {
 			sprintf(buf, "%.3d%d.VGA", id >> 1, (id & 1) + 1);
+		}
 
 		in.open(buf, _gameDataPath);
 		if (in.isOpen() == false)
@@ -4448,7 +4452,7 @@
 
 void SimonState::openGameFile()
 {
-	if (_game != GAME_SIMON1CD32 && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) {
+	if (!(_game & GAME_AMIGA) && _game != GAME_SIMON1DEMO && _game != GAME_SIMON1DOS) {
 		_game_file = new File();
 		_game_file->open(gss->gme_filename, _gameDataPath);
 
@@ -4634,8 +4638,8 @@
 		gss = &simon2win_settings;
 	} else if (_game == GAME_SIMON2DOS) {
 		gss = &simon2dos_settings;
-	} else if (_game == GAME_SIMON1CD32) {
-		gss = &simon1cd32_settings;
+	} else if (_game & GAME_AMIGA) {
+		gss = &simon1amiga_settings;
 	} else if (_game == GAME_SIMON1DEMO) {
 		gss = &simon1demo_settings;
 	} else {
@@ -4999,7 +5003,7 @@
 		_vc70_var1 = 0xFFFF;
 		_vc72_var3 = 0xFFFF;
 		_midi_unk2 = 0xFFFF;
-	} else if (!(_game & GAME_DEMO) && (_game != GAME_SIMON1CD32)){ // Simon 1 music
+	} else if (!(_game & GAME_DEMO) && !(_game & GAME_AMIGA)){ // Simon 1 music
 		midi.shutdown();
 		if (_game & GAME_WIN) {	
 			_game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);





More information about the Scummvm-git-logs mailing list