aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bacca2003-12-22 11:25:51 +0000
committerNicolas Bacca2003-12-22 11:25:51 +0000
commit7ab78ea26a7d42ea208df7057cefe65128731a02 (patch)
tree4c8ba0d0c89f9047d5328f77f0ecb9c2323230df
parent42cea0975a39b570a2e0a463530a0dc0534db8b3 (diff)
downloadscummvm-rg350-7ab78ea26a7d42ea208df7057cefe65128731a02.tar.gz
scummvm-rg350-7ab78ea26a7d42ea208df7057cefe65128731a02.tar.bz2
scummvm-rg350-7ab78ea26a7d42ea208df7057cefe65128731a02.zip
Preliminary support for queen in the old codebase ...
svn-id: r11852
-rw-r--r--backends/wince/findgame.cpp17
-rw-r--r--backends/wince/pocketpc.cpp5
-rw-r--r--backends/wince/smartphone.cpp6
-rw-r--r--backends/wince/wince.cpp23
-rw-r--r--backends/wince/wince.h1
5 files changed, 41 insertions, 11 deletions
diff --git a/backends/wince/findgame.cpp b/backends/wince/findgame.cpp
index 169b3b9672..90cfc97dea 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 8236979641..dc86ba50c0 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 1fc620a1d6..ff1695ffe3 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 345f7b3e88..06d54d845a 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 bbcd18c302..4fcc2d0548 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"