From 7ab78ea26a7d42ea208df7057cefe65128731a02 Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Mon, 22 Dec 2003 11:25:51 +0000 Subject: [PATCH] Preliminary support for queen in the old codebase ... svn-id: r11852 --- backends/wince/findgame.cpp | 17 ++++++++++++++++- backends/wince/pocketpc.cpp | 5 ++++- backends/wince/smartphone.cpp | 6 +++++- backends/wince/wince.cpp | 23 +++++++++++++++-------- backends/wince/wince.h | 1 + 5 files changed, 41 insertions(+), 11 deletions(-) diff --git a/backends/wince/findgame.cpp b/backends/wince/findgame.cpp index 169b3b96723..90cfc97dea5 100644 --- a/backends/wince/findgame.cpp +++ b/backends/wince/findgame.cpp @@ -41,7 +41,7 @@ #define CURRENT_GAMES_VERSION 7 -#define MAX_GAMES 32 +#define MAX_GAMES 34 int MAX_DIRECTORY = 40; #define MAX_DISPLAYED_DIRECTORIES 7 @@ -296,6 +296,21 @@ static const ScummGame GameList[] = { "sword2alt", 0 }, + + { + "Flight of Amazon Queen", + "Completable", + "", "queen.tbl", "queen.1", + "queen", + 0 + }, + { + "Flight of Amazon Queen", + "Completable", + "", "queen.tbl", "queen.1c", + "queen", + 0 + }, { NULL, NULL, NULL, NULL, NULL, NULL, 0 } diff --git a/backends/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp index 8236979641f..dc86ba50c00 100644 --- a/backends/wince/pocketpc.cpp +++ b/backends/wince/pocketpc.cpp @@ -31,6 +31,7 @@ extern bool freelook; extern bool is_simon; extern bool is_bass; extern bool is_sword2; +extern bool is_queen; extern int num_of_dirty_square; extern bool toolbar_drawn; extern Engine *engine; @@ -242,6 +243,8 @@ BOOL PPCWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, OSystem_W */ /*}*/ wm->_event.event_code = OSystem::EVENT_KEYDOWN; + if (is_queen) + wm->_event.kbd.keycode = 282; if (is_bass) wm->_event.kbd.ascii = 63; else @@ -258,7 +261,7 @@ BOOL PPCWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, OSystem_W do_quit(); wm->_event.event_code = OSystem::EVENT_KEYDOWN; - if (is_simon || is_bass || is_sword2) { + if (is_simon || is_bass || is_sword2 || is_queen) { wm->_event.kbd.ascii = mapKey(VK_ESCAPE); wm->_event.kbd.keycode = mapKey(VK_ESCAPE); break; diff --git a/backends/wince/smartphone.cpp b/backends/wince/smartphone.cpp index 1fc620a1d6d..ff1695ffe3d 100644 --- a/backends/wince/smartphone.cpp +++ b/backends/wince/smartphone.cpp @@ -59,6 +59,7 @@ extern TCHAR* getGameName(int); extern Engine *engine; extern bool is_simon; extern bool is_bass; +extern bool is_queen; extern bool sound_activated; extern void Cls(); @@ -320,6 +321,9 @@ void SmartfonSave(OSystem_WINCE3 *wm, int repeat) { return; wm->_event.event_code = OSystem::EVENT_KEYDOWN; + if (is_queen) + wm->_event.kbd.keycode = 282; + else if (is_bass) wm->_event.kbd.ascii = 63; else @@ -330,7 +334,7 @@ void SmartfonSkip(OSystem_WINCE3 *wm, int repeat) { wm->_event.event_code = OSystem::EVENT_KEYDOWN; - if (is_simon || is_bass) { + if (is_simon || is_bass || is_queen) { wm->_event.kbd.ascii = VK_ESCAPE; wm->_event.kbd.keycode = VK_ESCAPE; return; diff --git a/backends/wince/wince.cpp b/backends/wince/wince.cpp index 345f7b3e889..06d54d845a4 100644 --- a/backends/wince/wince.cpp +++ b/backends/wince/wince.cpp @@ -366,6 +366,7 @@ Engine *engine; bool is_simon; bool is_bass; bool is_sword2; +bool is_queen; //extern Scumm *g_scumm; //extern SimonEngine *g_simon; //OSystem *g_system; @@ -856,6 +857,12 @@ void runGame(char *game_name) { hide_toolbar = true; */ + // Special games switches + is_simon = (strcmp(game_name, "simon") == 0); + is_bass = (strcmp(game_name, "sky") == 0); + is_sword2 = (strcmp(game_name, "sword2") == 0); + is_queen = (strcmp(game_name, "queen") == 0); + // Keyboard activated for Monkey Island 2 and Monkey 1 floppy if (strcmp(game_name, "monkey2") == 0 || strcmp(game_name, "monkeyvga") == 0 || @@ -869,7 +876,7 @@ void runGame(char *game_name) { } //new_audio_rate = (strcmp(game_name, "dig") == 0 || strcmp(game_name, "monkey") == 0); - new_audio_rate = (strcmp(game_name, "dig") == 0 || strcmp(game_name, "ft") == 0 || strcmp(game_name, "comi") == 0 || is_sword2); + new_audio_rate = (strcmp(game_name, "dig") == 0 || strcmp(game_name, "ft") == 0 || strcmp(game_name, "comi") == 0 || is_sword2 || is_queen); #ifdef USE_VORBIS // Modify the sample rate on the fly if OGG is involved @@ -878,6 +885,7 @@ void runGame(char *game_name) { new_audio_rate = checkOggSampleRate(_directory); #endif + ConfMan.set("versioninfo", gScummVMVersion, Common::ConfigManager::kApplicationDomain); // Load the plugins @@ -900,11 +908,7 @@ void runGame(char *game_name) { /* Start the engine */ - is_simon = (strcmp(detector._plugin->getName(), "simon") == 0); - is_bass = (strcmp(detector._plugin->getName(), "sky") == 0); - is_sword2 = (strcmp(detector._plugin->getName(), "sword2") == 0); - - if (smartphone || strcmp(game_name, "samnmax") == 0 || strcmp(game_name, "dig") == 0 || strcmp(game_name, "ft") == 0 || strcmp(game_name, "comi") == 0 || is_sword2) + if (smartphone || strcmp(game_name, "samnmax") == 0 || strcmp(game_name, "dig") == 0 || strcmp(game_name, "ft") == 0 || strcmp(game_name, "comi") == 0 || is_sword2 || is_queen) hide_cursor = FALSE; else hide_cursor = TRUE; @@ -916,7 +920,7 @@ void runGame(char *game_name) { /* See if we need to force a mapping */ - if (!smartphone && (is_bass || strcmp(game_name, "samnmax") || strcmp(game_name, "comi") || is_sword2) && !isRightClickSet()) { + if (!smartphone && (is_bass || strcmp(game_name, "samnmax") || strcmp(game_name, "comi") || is_sword2 || is_queen) && !isRightClickSet()) { Cls(); drawWaitSelectKey(); _force_get_key_mapping = true; @@ -1191,6 +1195,9 @@ void action_save() { if (is_simon) return; else + if (is_queen) + mainClass->addEventKeyPressed(282); // "F1" + else if (is_bass) mainClass->addEventKeyPressed(63); else @@ -1241,7 +1248,7 @@ void action_skip() { //OSystem_WINCE3* system; //system = (OSystem_WINCE3*)g_scumm->_system; - if (is_simon || is_bass || is_sword2) { + if (is_simon || is_bass || is_sword2 || is_queen) { //system->addEventKeyPressed(mapKey(VK_ESCAPE)); mainClass->addEventKeyPressed(mapKey(VK_ESCAPE)); return; diff --git a/backends/wince/wince.h b/backends/wince/wince.h index bbcd18c302d..4fcc2d05483 100644 --- a/backends/wince/wince.h +++ b/backends/wince/wince.h @@ -48,6 +48,7 @@ //#include "simon/simon.h" #include "gapi_keys.h" #include "common/config-manager.h" +#include "base/gameDetector.h" #include "SDL.h"