[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.334,1.335 charset.cpp,1.21,1.22 intern.h,1.21,1.22

Chris Apers chrilith at users.sourceforge.net
Wed Nov 12 08:02:02 CET 2003


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

Modified Files:
	simon.cpp charset.cpp intern.h 
Log Message:
Preliminary support of Simon games on PalmOS

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -d -r1.334 -r1.335
--- simon.cpp	10 Nov 2003 01:04:11 -0000	1.334
+++ simon.cpp	12 Nov 2003 16:00:09 -0000	1.335
@@ -106,6 +106,17 @@
 
 namespace Simon {
 
+#ifdef __PALM_OS__
+#define PTR(a) a
+static const GameSpecificSettings *simon1_settings;
+static const GameSpecificSettings *simon1acorn_settings;
+static const GameSpecificSettings *simon1amiga_settings;
+static const GameSpecificSettings *simon1demo_settings;
+static const GameSpecificSettings *simon2win_settings;
+static const GameSpecificSettings *simon2mac_settings;
+static const GameSpecificSettings *simon2dos_settings;
+#else
+#define PTR(a) &a;
 static const GameSpecificSettings simon1_settings = {
 	1,										// VGA_DELAY_BASE
 	1576 / 4,									// TABLE_INDEX_BASE
@@ -231,7 +242,7 @@
 	"",										// mp3_effects_filename
 	"GAME32",									// gamepc_filename
 };
-
+#endif
 
 SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
 	: Engine(syst), midi (syst) {
@@ -242,19 +253,19 @@
 	_game = (byte)detector->_game.features;
 
 	if (_game & GF_MAC)
-		gss = &simon2mac_settings;
+		gss = PTR(simon2mac_settings);
 	else if ((_game & GF_SIMON2) && (_game & GF_TALKIE))
-		gss = &simon2win_settings;
+		gss = PTR(simon2win_settings);
 	else if (_game & GF_SIMON2)
-		gss = &simon2dos_settings;
+		gss = PTR(simon2dos_settings);
 	else if (_game & GF_ACORN)
-		gss =&simon1acorn_settings;
+		gss =PTR(simon1acorn_settings);
 	else if (_game & GF_AMIGA)
-		gss = &simon1amiga_settings;
+		gss = PTR(simon1amiga_settings);
 	else if (_game & GF_DEMO)
-		gss = &simon1demo_settings;
+		gss = PTR(simon1demo_settings);
 	else
-		gss = &simon1_settings;
+		gss = PTR(simon1_settings);
 
 	_key_pressed = 0;
 
@@ -3498,6 +3509,10 @@
 	_key_pressed = 0;
 }
 
+#ifdef __PALM_OS__
+static const byte *_simon1_cursor;
+static const byte **_simon2_cursors;
+#else
 static const byte _simon1_cursor[256] = {
 	0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
 	0xe1,0xe1,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
@@ -3688,7 +3703,8 @@
 	  0xff,0xff,0xff,0xff,0xff,0xe5,0xe9,0xec,0xe9,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,
 	  0xff,0xff,0xff,0xff,0xff,0xe5,0xe8,0xe9,0xe8,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,
 	  0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0xe5,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff },
-}; 
+};
+#endif
 
 void SimonEngine::draw_mouse_pointer() {
 	if (_game & GF_SIMON2)
@@ -5130,3 +5146,32 @@
 }
 
 } // End of namespace Simon
+
+#ifdef __PALM_OS__
+#include "scumm_globals.h"
+
+_GINIT(Simon_Simon)
+_GSETPTR(Simon::simon1_settings, GBVARS_SIMON1SETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon1acorn_settings, GBVARS_SIMON1ACORNSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon1amiga_settings, GBVARS_SIMON1AMIGASETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon1demo_settings, GBVARS_SIMON1DEMOSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon2win_settings, GBVARS_SIMON2WINSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon2mac_settings, GBVARS_SIMON2MACSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::simon2dos_settings, GBVARS_SIMON2DOSSETTINGS_INDEX, Simon::GameSpecificSettings, GBVARS_SIMON)
+_GSETPTR(Simon::_simon1_cursor, GBVARS_SIMON1CURSOR_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::_simon2_cursors, GBVARS_SIMON2CURSORS_INDEX, const byte*, GBVARS_SIMON)
+_GEND
+
+_GRELEASE(Simon_Simon)
+_GRELEASEPTR(GBVARS_SIMON1SETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON1ACORNSETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON1AMIGASETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON1DEMOSETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON2WINSETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON2MACSETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON2DOSSETTINGS_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON1CURSOR_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SIMON2CURSORS_INDEX, GBVARS_SIMON)
+_GEND
+
+#endif

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/charset.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- charset.cpp	26 Oct 2003 04:03:51 -0000	1.21
+++ charset.cpp	12 Nov 2003 16:00:10 -0000	1.22
@@ -285,6 +285,14 @@
 		fcs->textRow++;
 }
 
+#ifdef __PALM_OS__
+static const byte *french_video_font;
+static const byte *german_video_font;
+static const byte *hebrew_video_font;
+static const byte *italian_video_font;
+static const byte *spanish_video_font;
+static const byte *video_font;
+#else
 static const byte french_video_font[] = {
 	0, 0, 0, 0, 0, 0, 0, 0,
 	32, 112, 112, 32, 32, 0, 32, 0,
@@ -890,6 +898,7 @@
 	252, 252, 252, 252, 252, 252, 252, 252,
 	240, 240, 240, 240, 240, 240, 240, 240,
 };
+#endif
 
 void SimonEngine::video_putchar_drawchar(FillOrCopyStruct *fcs, uint x, uint y, byte chr) {
 	const byte *src;
@@ -934,3 +943,33 @@
 }
 
 } // End of namespace Simon
+
+static const byte *french_video_font;
+static const byte *german_video_font;
+static const byte *hebrew_video_font;
+static const byte *italian_video_font;
+static const byte *spanish_video_font;
+static const byte *video_font;
+
+#ifdef __PALM_OS__
+#include "scumm_globals.h"
+
+_GINIT(Simon_Charset)
+_GSETPTR(Simon::french_video_font, GBVARS_FRENCHVIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::german_video_font, GBVARS_GERMANVIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::hebrew_video_font, GBVARS_HEBREWVIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::italian_video_font, GBVARS_ITALIANVIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::spanish_video_font, GBVARS_SPANISHVIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GSETPTR(Simon::video_font, GBVARS_VIDEOFONT_INDEX, byte, GBVARS_SIMON)
+_GEND
+
+_GRELEASE(Simon_Charset)
+_GRELEASEPTR(GBVARS_FRENCHVIDEOFONT_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_GERMANVIDEOFONT_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_HEBREWVIDEOFONT_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_ITALIANVIDEOFONT_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_SPANISHVIDEOFONT_INDEX, GBVARS_SIMON)
+_GRELEASEPTR(GBVARS_VIDEOFONT_INDEX, GBVARS_SIMON)
+_GEND
+
+#endif

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- intern.h	3 Oct 2003 19:42:27 -0000	1.21
+++ intern.h	12 Nov 2003 16:00:11 -0000	1.22
@@ -127,6 +127,7 @@
 	uint TABLES_MEM_SIZE;
 	uint MUSIC_INDEX_BASE;
 	uint SOUND_INDEX_BASE;
+#ifndef __PALM_OS__
 	const char *gme_filename;
 	const char *wav_filename;
 	const char *voc_filename;
@@ -134,6 +135,15 @@
 	const char *voc_effects_filename;
 	const char *mp3_effects_filename;
  	const char *gamepc_filename;
+ #else
+	const char gme_filename[12];
+	const char wav_filename[12];
+	const char voc_filename[12];
+	const char mp3_filename[12];
+	const char voc_effects_filename[12];
+	const char mp3_effects_filename[12];
+ 	const char gamepc_filename[12]; 
+ #endif
 };
 
 } // End of namespace Simon





More information about the Scummvm-git-logs mailing list