[Scummvm-cvs-logs] CVS: scummvm/backends/wince pocketpc.cpp,1.24,1.25 smartphone.cpp,1.6,1.7 wince.cpp,1.11,1.12 wince.h,1.5,1.6

Nicolas Bacca arisme at users.sourceforge.net
Tue Jul 8 15:45:21 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1:/tmp/cvs-serv3481

Modified Files:
	pocketpc.cpp smartphone.cpp wince.cpp wince.h 
Log Message:
Update to new virtual functions, protected members and so on, take one

Index: pocketpc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/pocketpc.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- pocketpc.cpp	1 Jun 2003 09:41:54 -0000	1.24
+++ pocketpc.cpp	8 Jul 2003 22:44:43 -0000	1.25
@@ -223,7 +223,7 @@
 						if (g_scumm->_features & GF_OLD256 || g_scumm->_gameId == GID_CMI)
 							wm->_event.kbd.ascii = 319;
 						else
-							wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_SAVELOADDIALOG_KEY];
+							wm->_event.kbd.ascii = g_scumm->VAR_SAVELOADDIALOG_KEY;
 						break;
 					case ToolbarMode:
 						SetScreenMode(!GetScreenMode());
@@ -235,7 +235,7 @@
 						if (is_demo)
 							do_quit();
 						if (is_simon) {
-							((SimonEngine*)engine)->_exit_cutscene = true;
+							wm->_event.kbd.ascii = mapKey(VK_ESCAPE);
 							break;
 						}
 						wm->_event.event_code = OSystem::EVENT_KEYDOWN;
@@ -243,7 +243,7 @@
 							wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_CUTSCENEEXIT_KEY];
 						else
 						if (g_scumm->_talkDelay > 0)
-							wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_TALKSTOP_KEY];						
+							wm->_event.kbd.ascii = g_scumm->VAR_TALKSTOP_KEY;						
 						else
 							wm->_event.kbd.ascii = mapKey(VK_ESCAPE);
 						break;

Index: smartphone.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/smartphone.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smartphone.cpp	1 Jun 2003 09:41:54 -0000	1.6
+++ smartphone.cpp	8 Jul 2003 22:44:45 -0000	1.7
@@ -300,13 +300,13 @@
 		if (g_scumm->_features & GF_OLD256)
 			wm->_event.kbd.ascii = 319;
 		else
-			wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_SAVELOADDIALOG_KEY];
+			wm->_event.kbd.ascii = g_scumm->VAR_SAVELOADDIALOG_KEY;
 }
 
 void SmartfonSkip(OSystem_WINCE3 *wm, BOOL repeat) {
 
 		if (is_simon) {
-			((SimonEngine*)engine)->_exit_cutscene = true;
+			wm->_event.kbd.ascii = VK_ESCAPE;
 			return;
 		}
 		wm->_event.event_code = OSystem::EVENT_KEYDOWN;
@@ -314,7 +314,7 @@
 			wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_CUTSCENEEXIT_KEY];
 		else 
 		if (g_scumm->_talkDelay > 0)
-			wm->_event.kbd.ascii = g_scumm->_vars[g_scumm->VAR_TALKSTOP_KEY];						
+			wm->_event.kbd.ascii = g_scumm->VAR_TALKSTOP_KEY;						
 		else
 			wm->_event.kbd.ascii = VK_ESCAPE;						
 }

Index: wince.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- wince.cpp	6 Jul 2003 18:56:19 -0000	1.11
+++ wince.cpp	8 Jul 2003 22:44:45 -0000	1.12
@@ -21,6 +21,10 @@
 
 #include "wince.h"
 
+#ifdef USE_VORBIS
+#include <vorbis/vorbisfile.h>
+#endif
+
 #if _WIN32_WCE >= 300
 
 #include <Aygshell.h>
@@ -842,9 +846,9 @@
 
 	/* Start the engine */
 
-	is_simon = (detector._gameId >= GID_SIMON_FIRST);
+	is_simon = (detector._game.id >= GID_SIMON_FIRST);
 
-	if (smartphone || detector._gameId == GID_SAMNMAX || detector._gameId == GID_FT || detector._gameId == GID_DIG || detector._gameId == GID_CMI)
+	if (smartphone || detector._game.id == GID_SAMNMAX || detector._game.id == GID_FT || detector._game.id == GID_DIG || detector._game.id == GID_CMI)
 		hide_cursor = FALSE;
 	else
 		hide_cursor = TRUE;	
@@ -871,8 +875,8 @@
 		wm = (OSystem_WINCE3*)GetWindowLong(hWnd, GWL_USERDATA);
 	
 	if (!select_game && monkey_keyboard && (
-			g_scumm->_vars[g_scumm->VAR_ROOM] != 108 &&		// monkey 2
-			g_scumm->_vars[g_scumm->VAR_ROOM] != 90)) {		// monkey 1 floppy
+			g_scumm->VAR_ROOM != 108 &&		// monkey 2
+			g_scumm->VAR_ROOM != 90)) {		// monkey 1 floppy
 		monkey_keyboard = false;
 		draw_keyboard = false;
 		toolbar_drawn = false;
@@ -1139,7 +1143,7 @@
 	if (g_scumm->_features & GF_OLD256 || g_scumm->_gameId == GID_CMI)
 		system->addEventKeyPressed(319);
 	else
-		system->addEventKeyPressed(g_scumm->_vars[g_scumm->VAR_SAVELOADDIALOG_KEY]);						
+		system->addEventKeyPressed(g_scumm->VAR_SAVELOADDIALOG_KEY);						
 }
 
 void action_quit() {
@@ -1176,7 +1180,7 @@
 	system = (OSystem_WINCE3*)g_scumm->_system;
 
 	if (is_simon) {
-		((SimonEngine*)engine)->_exit_cutscene = true;
+		system->addEventKeyPressed(mapKey(VK_ESCAPE));
 		return;
 	}
 
@@ -1184,7 +1188,7 @@
 		system->addEventKeyPressed(g_scumm->_vars[g_scumm->VAR_CUTSCENEEXIT_KEY]);
 	else 
 	if (g_scumm->_talkDelay > 0)
-		system->addEventKeyPressed(g_scumm->_vars[g_scumm->VAR_TALKSTOP_KEY]);						
+		system->addEventKeyPressed(g_scumm->VAR_TALKSTOP_KEY);						
 	else
 		system->addEventKeyPressed(mapKey(VK_ESCAPE));
 }
@@ -1326,6 +1330,18 @@
 	palette_update();
 
 	num_of_dirty_square = MAX_NUMBER_OF_DIRTY_SQUARES;
+}
+
+int16 OSystem_WINCE3::get_height() {
+        return _screenHeight;
+}
+
+int16 OSystem_WINCE3::get_width() {
+        return _screenWidth;
+}
+
+void OSystem_WINCE3::clear_sound_proc() {
+        SDL_CloseAudio();
 }
 
 void OSystem_WINCE3::load_gfx_mode() {

Index: wince.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- wince.h	5 Jul 2003 15:17:46 -0000	1.5
+++ wince.h	8 Jul 2003 22:44:45 -0000	1.6
@@ -39,12 +39,12 @@
 #include "resource.h"
 
 #include "scumm.h"
-#include "debug.h"
+//#include "debug.h"
 #include "screen.h"
 #include "gui/newgui.h"
 #include "sound/mididrv.h"
 #include "gameDetector.h"
-#include "simon/simon.h"
+//#include "simon/simon.h"
 #include "gapi_keys.h"
 #include "config-file.h"
 
@@ -163,6 +163,12 @@
 	void lock_mutex(MutexRef);
 	void unlock_mutex(MutexRef);
 	void delete_mutex(MutexRef);
+
+	// New helpers
+
+	int16 get_height();
+	int16 get_width();
+	void clear_sound_proc();
 
 	// Windows callbacks & stuff
 	static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);





More information about the Scummvm-git-logs mailing list