diff options
author | Nicolas Bacca | 2003-07-08 22:44:45 +0000 |
---|---|---|
committer | Nicolas Bacca | 2003-07-08 22:44:45 +0000 |
commit | 61ab6933c55591d76dc5c1775f2dd6db5c62de2c (patch) | |
tree | 9b94ad75ed1380c0688a8b08e35177c4fd643ac9 | |
parent | 4fb3e9a448cb30e89e1de0e49bb83d32ef27c62d (diff) | |
download | scummvm-rg350-61ab6933c55591d76dc5c1775f2dd6db5c62de2c.tar.gz scummvm-rg350-61ab6933c55591d76dc5c1775f2dd6db5c62de2c.tar.bz2 scummvm-rg350-61ab6933c55591d76dc5c1775f2dd6db5c62de2c.zip |
Update to new virtual functions, protected members and so on, take one
svn-id: r8870
-rw-r--r-- | backends/wince/pocketpc.cpp | 6 | ||||
-rw-r--r-- | backends/wince/smartphone.cpp | 6 | ||||
-rw-r--r-- | backends/wince/wince.cpp | 30 | ||||
-rw-r--r-- | backends/wince/wince.h | 10 |
4 files changed, 37 insertions, 15 deletions
diff --git a/backends/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp index 0048c2b8da..967af9f334 100644 --- a/backends/wince/pocketpc.cpp +++ b/backends/wince/pocketpc.cpp @@ -223,7 +223,7 @@ BOOL PPCWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, OSystem_W 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 @@ BOOL PPCWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, OSystem_W 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 @@ BOOL PPCWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, OSystem_W 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; diff --git a/backends/wince/smartphone.cpp b/backends/wince/smartphone.cpp index 39e613a95d..15429a0b42 100644 --- a/backends/wince/smartphone.cpp +++ b/backends/wince/smartphone.cpp @@ -300,13 +300,13 @@ void SmartfonSave(OSystem_WINCE3 *wm, BOOL repeat) { 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 @@ void SmartfonSkip(OSystem_WINCE3 *wm, BOOL repeat) { 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; } diff --git a/backends/wince/wince.cpp b/backends/wince/wince.cpp index de76d959c1..4495abedf9 100644 --- a/backends/wince/wince.cpp +++ b/backends/wince/wince.cpp @@ -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 @@ void runGame(char *game_name) { /* 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 @@ LRESULT CALLBACK OSystem_WINCE3::WndProc(HWND hWnd, UINT message, WPARAM wParam, 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 @@ void action_save() { 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 @@ void action_skip() { system = (OSystem_WINCE3*)g_scumm->_system; if (is_simon) { - ((SimonEngine*)engine)->_exit_cutscene = true; + system->addEventKeyPressed(mapKey(VK_ESCAPE)); return; } @@ -1184,7 +1188,7 @@ void action_skip() { 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)); } @@ -1328,6 +1332,18 @@ void OSystem_WINCE3::set_palette(const byte *colors, uint start, uint num) { 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() { force_full = true; diff --git a/backends/wince/wince.h b/backends/wince/wince.h index 411e169d89..7e52cc5e5b 100644 --- a/backends/wince/wince.h +++ b/backends/wince/wince.h @@ -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" @@ -164,6 +164,12 @@ public: 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); |