Update to new virtual functions, protected members and so on, take one

svn-id: r8870
This commit is contained in:
Nicolas Bacca 2003-07-08 22:44:45 +00:00
parent 4fb3e9a448
commit 61ab6933c5
4 changed files with 37 additions and 15 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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);