From 83c5c2ae4eedf789fe5b23163fcc5b1ef43c9dcb Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sun, 3 Jun 2007 19:29:13 +0000 Subject: new functionality for the predictive input dialog for smartphones svn-id: r27071 --- backends/platform/wince/CEActionsSmartphone.cpp | 9 ++-- backends/platform/wince/wince-sdl.cpp | 62 +++++++++++++++++++------ backends/platform/wince/wince-sdl.h | 1 + 3 files changed, 55 insertions(+), 17 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 3d85ebc68e..042fc4bd55 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -43,7 +43,7 @@ const String smartphoneActionNames[] = { "Save", "Skip", "Zone", - "FT Cheat", + "Multi Function", "Bind Keys", "Keyboard", "Rotate", @@ -152,9 +152,12 @@ void CEActionsSmartphone::initInstanceGame() { _key_action[SMARTPHONE_ACTION_SKIP].setAscii(KEY_ALL_SKIP); // Zone _action_enabled[SMARTPHONE_ACTION_ZONE] = true; - // FT Cheat + // Multi function key _action_enabled[SMARTPHONE_ACTION_FT_CHEAT] = true; - _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V + if (is_agi) + _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(SDLK_PAUSE); + else + _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V // Bind keys _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true; } diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 8ef7412530..a096be0a4a 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -330,7 +330,7 @@ bool OSystem_WINCE3::isOzone() { OSystem_WINCE3::OSystem_WINCE3() : OSystem_SDL(), _orientationLandscape(0), _newOrientation(0), _panelInitialized(false), - _panelVisible(true), _panelStateForced(false), _forceHideMouse(false), + _panelVisible(true), _panelStateForced(false), _forceHideMouse(false), _unfilteredkeys(false), _freeLook(false), _forcePanelInvisible(false), _toolbarHighDrawn(false), _zoomUp(false), _zoomDown(false), _scalersChanged(false), _monkeyKeyboard(false), _lastKeyPressed(0), _tapTime(0), _saveToolbarState(false), _saveActiveToolbar(NAME_MAIN_PANEL), _rbutton(false), _hasfocus(true), @@ -771,6 +771,7 @@ void OSystem_WINCE3::setFeatureState(Feature f, bool enable) { switch(f) { case kFeatureFullscreenMode: return; + case kFeatureVirtualKeyboard: if (_hasSmartphoneResolution) return; @@ -790,6 +791,12 @@ void OSystem_WINCE3::setFeatureState(Feature f, bool enable) { //_toolbarHandler.setVisible(_saveToolbarState); } return; + + case kFeatureDisableKeyFiltering: + if (_hasSmartphoneResolution) + _unfilteredkeys = enable; + return; + default: OSystem_SDL::setFeatureState(f, enable); } @@ -2067,11 +2074,23 @@ void OSystem_WINCE3::addDirtyRect(int x, int y, int w, int h, bool mouseRect) { OSystem_SDL::addDirtyRect(x, y, w, h, false); } -static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode) +static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) { if (GUI::Actions::Instance()->mappingActive()) return key; + if (unfilter) { + switch (key) { + case SDLK_ESCAPE: + return SDLK_BACKSPACE; + case SDLK_F8: + return SDLK_ASTERISK; + case SDLK_F9: + return SDLK_HASH; + } + return key; + } + if (key >= SDLK_KP0 && key <= SDLK_KP9) { return key - SDLK_KP0 + '0'; } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { @@ -2113,9 +2132,9 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) { while(SDL_PollEvent(&ev)) { switch(ev.type) { case SDL_KEYDOWN: - // KMOD_RESERVED is used if the key has been injected by an external buffer debug(1, "Key down %X %s", ev.key.keysym.sym, SDL_GetKeyName((SDLKey)ev.key.keysym.sym)); - if (ev.key.keysym.mod != KMOD_RESERVED) { + // KMOD_RESERVED is used if the key has been injected by an external buffer + if (ev.key.keysym.mod != KMOD_RESERVED && !_unfilteredkeys) { keyEvent = true; _lastKeyPressed = ev.key.keysym.sym; _keyRepeatTime = currentTime; @@ -2125,19 +2144,27 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) { return true; } - event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = ev.key.keysym.sym; - event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode); - if (GUI_Actions::Instance()->mappingActive()) event.kbd.flags = 0xFF; + else if (ev.key.keysym.sym == SDLK_PAUSE) { + _lastKeyPressed = 0; + event.type = Common::EVENT_PREDICTIVE_DIALOG; + return true; + } + + event.type = Common::EVENT_KEYDOWN; + if (!_unfilteredkeys) + event.kbd.keycode = ev.key.keysym.sym; + else + event.kbd.keycode = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); + event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); return true; case SDL_KEYUP: - // KMOD_RESERVED is used if the key has been injected by an external buffer debug(1, "Key up %X %s", ev.key.keysym.sym, SDL_GetKeyName((SDLKey)ev.key.keysym.sym)); - if (ev.key.keysym.mod != KMOD_RESERVED) { + // KMOD_RESERVED is used if the key has been injected by an external buffer + if (ev.key.keysym.mod != KMOD_RESERVED && !_unfilteredkeys) { keyEvent = true; _lastKeyPressed = 0; @@ -2145,12 +2172,19 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) { return true; } - event.type = Common::EVENT_KEYUP; - event.kbd.keycode = ev.key.keysym.sym; - event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode); - if (GUI_Actions::Instance()->mappingActive()) event.kbd.flags = 0xFF; + else if (ev.key.keysym.sym == SDLK_PAUSE) { + _lastKeyPressed = 0; + return false; // chew up the show agi dialog key up event + } + + event.type = Common::EVENT_KEYUP; + if (!_unfilteredkeys) + event.kbd.keycode = ev.key.keysym.sym; + else + event.kbd.keycode = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); + event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); return true; diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h index 0e8e5e53ba..056996f0de 100644 --- a/backends/platform/wince/wince-sdl.h +++ b/backends/platform/wince/wince-sdl.h @@ -189,6 +189,7 @@ private: bool _panelInitialized; // only initialize the toolbar once bool _monkeyKeyboard; // forced keyboard for Monkey Island copy protection + bool _unfilteredkeys; // discard key mapping temporarily (agi pred. dialog) static bool _soundMaster; // turn off sound after all calculations // static since needed by the SDL callback int _orientationLandscape; // current orientation -- cgit v1.2.3 From b6bc1ef9a6dff1d1a0f09f9331ee1b3ecb8736e0 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Tue, 5 Jun 2007 18:55:41 +0000 Subject: the FT cheat key is now called multi function key (pending commit for sucker punch in indy) svn-id: r27111 --- backends/platform/wince/CEActionsSmartphone.cpp | 10 +++++----- backends/platform/wince/CEActionsSmartphone.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 042fc4bd55..081a2e6713 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -153,11 +153,11 @@ void CEActionsSmartphone::initInstanceGame() { // Zone _action_enabled[SMARTPHONE_ACTION_ZONE] = true; // Multi function key - _action_enabled[SMARTPHONE_ACTION_FT_CHEAT] = true; + _action_enabled[SMARTPHONE_ACTION_MULTI] = true; if (is_agi) - _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(SDLK_PAUSE); + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); else - _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(86); // shift-V // Bind keys _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true; } @@ -179,7 +179,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { return true; case SMARTPHONE_ACTION_SAVE: case SMARTPHONE_ACTION_SKIP: - case SMARTPHONE_ACTION_FT_CHEAT: + case SMARTPHONE_ACTION_MULTI: EventsBuffer::simulateKey(&_key_action[action], false); return true; } @@ -189,7 +189,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { switch (action) { case SMARTPHONE_ACTION_SAVE: case SMARTPHONE_ACTION_SKIP: - case SMARTPHONE_ACTION_FT_CHEAT: + case SMARTPHONE_ACTION_MULTI: EventsBuffer::simulateKey(&_key_action[action], true); return true; case SMARTPHONE_ACTION_RIGHTCLICK: diff --git a/backends/platform/wince/CEActionsSmartphone.h b/backends/platform/wince/CEActionsSmartphone.h index 648d0ae4cf..590302ef26 100644 --- a/backends/platform/wince/CEActionsSmartphone.h +++ b/backends/platform/wince/CEActionsSmartphone.h @@ -45,7 +45,7 @@ enum smartphoneActionType { SMARTPHONE_ACTION_SAVE, SMARTPHONE_ACTION_SKIP, SMARTPHONE_ACTION_ZONE, - SMARTPHONE_ACTION_FT_CHEAT, + SMARTPHONE_ACTION_MULTI, SMARTPHONE_ACTION_BINDKEYS, SMARTPHONE_ACTION_KEYBOARD, SMARTPHONE_ACTION_ROTATE, -- cgit v1.2.3 From fb8a569fdf4290409766fecfb8a3037f8f4e3be1 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Tue, 5 Jun 2007 19:06:54 +0000 Subject: renaming to multi-function key. Also, reverting to softkey A for default keymap (compatibility on first run) svn-id: r27112 --- backends/platform/wince/CEActionsPocket.cpp | 15 +++++++++------ backends/platform/wince/CEActionsPocket.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index 2bb79850e3..d902fd89fc 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -49,7 +49,7 @@ const String pocketActionNames[] = { "Free look", "Zoom up", "Zoom down", - "FT Cheat", + "Multi Function", "Bind Keys", "Cursor Up", "Cursor Down", @@ -99,7 +99,7 @@ GUI::Actions() _action_enabled[POCKET_ACTION_DOWN] = true; _action_enabled[POCKET_ACTION_LEFT] = true; _action_enabled[POCKET_ACTION_RIGHT] = true; - _action_mapping[POCKET_ACTION_LEFTCLICK] = SDLK_RETURN; + _action_mapping[POCKET_ACTION_LEFTCLICK] = SDLK_F1; _action_mapping[POCKET_ACTION_UP] = SDLK_UP; _action_mapping[POCKET_ACTION_DOWN] = SDLK_DOWN; _action_mapping[POCKET_ACTION_LEFT] = SDLK_LEFT; @@ -189,8 +189,11 @@ void CEActionsPocket::initInstanceGame() { _action_enabled[POCKET_ACTION_ZOOM_DOWN] = true; } // FT Cheat - _action_enabled[POCKET_ACTION_FT_CHEAT] = true; - _key_action[POCKET_ACTION_FT_CHEAT].setAscii(86); // shift-V + _action_enabled[POCKET_ACTION_MULTI] = true; + if (is_agi) + _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_PAUSE); + else + _key_action[POCKET_ACTION_MULTI].setAscii(86); // shift-V // Key bind method _action_enabled[POCKET_ACTION_BINDKEYS] = true; } @@ -213,7 +216,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { case POCKET_ACTION_PAUSE: case POCKET_ACTION_SAVE: case POCKET_ACTION_SKIP: - case POCKET_ACTION_FT_CHEAT: + case POCKET_ACTION_MULTI: EventsBuffer::simulateKey(&_key_action[action], false); return true; @@ -225,7 +228,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { case POCKET_ACTION_PAUSE: case POCKET_ACTION_SAVE: case POCKET_ACTION_SKIP: - case POCKET_ACTION_FT_CHEAT: + case POCKET_ACTION_MULTI: EventsBuffer::simulateKey(&_key_action[action], true); return true; case POCKET_ACTION_KEYBOARD: diff --git a/backends/platform/wince/CEActionsPocket.h b/backends/platform/wince/CEActionsPocket.h index 0f6430d443..9749ca60ef 100644 --- a/backends/platform/wince/CEActionsPocket.h +++ b/backends/platform/wince/CEActionsPocket.h @@ -48,7 +48,7 @@ enum pocketActionType { POCKET_ACTION_FREELOOK, POCKET_ACTION_ZOOM_UP, POCKET_ACTION_ZOOM_DOWN, - POCKET_ACTION_FT_CHEAT, + POCKET_ACTION_MULTI, POCKET_ACTION_BINDKEYS, POCKET_ACTION_UP, POCKET_ACTION_DOWN, -- cgit v1.2.3 From a7271cb9dd6fedabea6ce12dc8de249cc220b284 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Thu, 7 Jun 2007 20:34:15 +0000 Subject: NDS : Attempt to not buffer overrun VRAM when doing saveGameBackBuffer/restoreGameBackBuffer when CPU scaler is on svn-id: r27176 --- backends/platform/ds/arm9/source/dsmain.cpp | 46 +++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 153ecfab87..21602c4f34 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -333,27 +333,49 @@ void initSprites() { void saveGameBackBuffer() { #ifdef DISABLE_SCUMM if (savedBuffer == NULL) savedBuffer = new u8[gameWidth * gameHeight]; - for (int r = 0; r < 200; r++) { - memcpy(savedBuffer + (r * gameWidth), ((u8 *) (get8BitBackBuffer())) + (r * 512), gameWidth); + if(isCpuScalerEnabled()) + { + memcpy(savedBuffer, get8BitBackBuffer(), gameWidth * gameHeight); } + else + { + for (int r = 0; r < gameHeight; r++) { + memcpy(savedBuffer + (r * gameWidth), ((u8 *) (get8BitBackBuffer())) + (r * 512), gameWidth); + } + } #endif } void restoreGameBackBuffer() { #ifdef DISABLE_SCUMM if (savedBuffer) { - for (int r = 0; r < 200; r++) { - memcpy(((u8 *) (BG_GFX_SUB)) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); - memcpy(((u8 *) (get8BitBackBuffer())) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); - } + if(isCpuScalerEnabled()) + { + memcpy(get8BitBackBuffer(), savedBuffer, gameWidth * gameHeight); + // TODO Synchronize with framebuffer if necessary + } + else + { + for (int r = 0; r < gameHeight; r++) { + memcpy(((u8 *) (BG_GFX_SUB)) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); + memcpy(((u8 *) (get8BitBackBuffer())) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); + } + } + delete savedBuffer; savedBuffer = NULL; } -#endif - -#ifndef DISABLE_SCUMM - memset(get8BitBackBuffer(), 0, 512 * 256); - memset(BG_GFX_SUB, 0, 512 * 256); +#else + if(isCpuScalerEnabled()) + { + memset(get8BitBackBuffer(), 0, 320 * 200); + // TODO Synchronize with framebuffer if necessary + } + else + { + memset(get8BitBackBuffer(), 0, 512 * 256); + memset(BG_GFX_SUB, 0, 512 * 256); + } if (Scumm::g_scumm) { Scumm::g_scumm->markRectAsDirty(Scumm::kMainVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); Scumm::g_scumm->markRectAsDirty(Scumm::kTextVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); @@ -728,7 +750,7 @@ void displayMode16BitFlipBuffer() { } else if (isCpuScalerEnabled()) { - //#define SCALER_PROFILE + #define SCALER_PROFILE #ifdef SCALER_PROFILE TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1024; -- cgit v1.2.3 From e35ba53b7e358e1ba4f29a9d0af75dee78f7acc9 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Thu, 7 Jun 2007 20:52:49 +0000 Subject: Symbian PORT updated with CE mappings svn-id: r27178 --- backends/platform/symbian/src/SymbianActions.cpp | 9 ++++++--- backends/platform/symbian/src/SymbianActions.h | 4 ++-- backends/platform/symbian/src/SymbianOS.cpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index cb2652eac4..2c67c06bba 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -47,7 +47,7 @@ const Common::String actionNames[] = { "Save", "Skip", "Zone", - "FT Cheat", + "Multi Function", "Swap character", "Skip text", "Pause", @@ -174,8 +174,11 @@ void SymbianActions::initInstanceGame() { _action_enabled[ACTION_ZONE] = true; // FT Cheat - _action_enabled[ACTION_FT_CHEAT] = true; - _key_action[ACTION_FT_CHEAT].setAscii(86); // shift-V + _action_enabled[ACTION_MULTI] = true; + if (is_agi) + _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); + else + _key_action[ACTION_MULTI].setAscii(86); // shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h index 0facde763c..cbd333e500 100644 --- a/backends/platform/symbian/src/SymbianActions.h +++ b/backends/platform/symbian/src/SymbianActions.h @@ -34,7 +34,7 @@ namespace GUI { -#define ACTION_VERSION 6 +#define ACTION_VERSION 7 enum actionType { ACTION_UP = 0, @@ -46,7 +46,7 @@ enum actionType { ACTION_SAVE, ACTION_SKIP, ACTION_ZONE, - ACTION_FT_CHEAT, + ACTION_MULTI, ACTION_SWAPCHAR, ACTION_SKIP_TEXT, ACTION_PAUSE, diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 737795182e..80f9491d2a 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -348,7 +348,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { case GUI::ACTION_SAVE: case GUI::ACTION_SKIP: - case GUI::ACTION_FT_CHEAT: + case GUI::ACTION_MULTI: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: case GUI::ACTION_SWAPCHAR: -- cgit v1.2.3 From 6433964b689bf3955f0fca30dd47cde7d4e9f000 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Fri, 8 Jun 2007 06:09:09 +0000 Subject: adding F1 for bargon and KP0 for indy3 functionality to multi function key svn-id: r27185 --- backends/platform/wince/CEActionsPocket.cpp | 10 +++++++--- backends/platform/wince/CEActionsSmartphone.cpp | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index d902fd89fc..cfc029536e 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -188,12 +188,16 @@ void CEActionsPocket::initInstanceGame() { _action_enabled[POCKET_ACTION_ZOOM_UP] = true; _action_enabled[POCKET_ACTION_ZOOM_DOWN] = true; } - // FT Cheat + // Multi function key _action_enabled[POCKET_ACTION_MULTI] = true; if (is_agi) - _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_PAUSE); + _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + else if (is_gob) + _key_action[POCKET_ACTION_MULTI].setAscii(315); // bargon : F1 to start + else if (gameid == "atlantis") + _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[POCKET_ACTION_MULTI].setAscii(86); // shift-V + _key_action[POCKET_ACTION_MULTI].setAscii(86); // FT cheat : shift-V // Key bind method _action_enabled[POCKET_ACTION_BINDKEYS] = true; } diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 081a2e6713..309aefd95d 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -155,9 +155,13 @@ void CEActionsSmartphone::initInstanceGame() { // Multi function key _action_enabled[SMARTPHONE_ACTION_MULTI] = true; if (is_agi) - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + else if (is_gob) + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(315); // bargon : F1 to start + else if (gameid == "atlantis") + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(86); // shift-V + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(86); // FT cheat : shift-V // Bind keys _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true; } -- cgit v1.2.3 From e8cb48e28d7e6b0d0415948862e341e3ae957ac1 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Fri, 8 Jun 2007 06:15:14 +0000 Subject: fix bug #1674683 (GOB2 can't save): send 0xD for enter svn-id: r27187 --- backends/platform/wince/CEgui/PanelKeyboard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp index 8a17a4c1c4..99bd125431 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.cpp +++ b/backends/platform/wince/CEgui/PanelKeyboard.cpp @@ -62,7 +62,7 @@ namespace CEGUI { keyAscii = VK_BACK; keyCode = keyAscii; } else { // Enter - keyAscii = 13; keyCode = 10; + keyAscii = 13; keyCode = 13; } } -- cgit v1.2.3 From 067f43a21247e34d6010d1000aac83d223526d7f Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Fri, 8 Jun 2007 06:28:59 +0000 Subject: .txt is the device-friendly extension for text files svn-id: r27189 --- backends/platform/wince/README-WinCE | 506 ------------------------------- backends/platform/wince/README-WinCE.txt | 506 +++++++++++++++++++++++++++++++ 2 files changed, 506 insertions(+), 506 deletions(-) delete mode 100644 backends/platform/wince/README-WinCE create mode 100644 backends/platform/wince/README-WinCE.txt (limited to 'backends/platform') diff --git a/backends/platform/wince/README-WinCE b/backends/platform/wince/README-WinCE deleted file mode 100644 index b1fc585e22..0000000000 --- a/backends/platform/wince/README-WinCE +++ /dev/null @@ -1,506 +0,0 @@ -ScummVM Windows CE FAQ -Last updated: 2006-06-20 -Release version: 0.9.0 ------------------------------------------------------------------------- - -This document is intended to give common answers to specific ScummVM -issues on Windows CE, in 3 sections - * "General questions" : browse this section to get started and see - general issues - * "Game specific questions" : lists some common game specific issues - * "Support and links" : how to get support if you're still puzzled - ------------------------------------------------------------------------- -General questions ------------------------------------------------------------------------- - -Which devices are supported ? ------------------------------ - -Official build --------------- - -The official build is based on the ARM architecture and should work with any -Pocket PC 2000, Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone -2002, Smartphone 2003 or Windows Mobile based device. - -Support for old ARM architectures (Handheld PCs, Palm Size PCs) and other CPUs -(MIPS, SH3) is discontinued. Feel free to generate builds for these -architectures and contact me to include them on ScummVM website. - -Full support ------------- - -* ARM based Windows Mobile handhelds with QVGA resolution (240x320) slower - than 200 MHz (PocketPC platform) - -All AdLib first generation games should work properly on these devices. -Sam'n'Max will be a bit too slow to be played with music. -More recent games (The Dig, Curse of Monkey Island, Broken Sword series) -and all VGA games will probably be too slow to be enjoyable. - -* ARM based Windows Mobile handhelds with QVGA resolution (240x320) faster - than 200 MHz - -All games should work properly on these devices. -VGA games will be resized and the font gets hard to read in this case (be sure -to install the talkie version the game :p) - -* ARM based Windows Mobile handhelds with VGA resolution (640x480) - -All non VGA games should work properly on these devices. They can be resized -with different scalers (not all desktop scalers are supported due to Embedded -Visual C++ very personal interpretation of the C++ standard). -VGA games will be displayed in true VGA mode, which can takes a lot of memory -and slow down the game (especially during scrollings). It will get better in -the next releases or with faster devices. - -* Windows Mobile Smartphones (176x220 or 240x320) - -Early support is provided for all 320x200 games. -The font can get hard to read (you should prefer talkie games, or wear glasses) - -* Support for Windows Mobile 5 is experimental but should work. "Flipping" devices -such as the HTC Wizard or HTC Universal work only in portait (closed) mode for the -moment. - -Partial / Discontinued support ------------------------------- - -Support for the following devices is not complete, not working properly or -discontinued because the device is now obsolete. Feel free to contribute and -improve the port for your favorite device, or use the last release built with -the previous port architecture (0.5.1) which was less resource hungry and -supported more exotic devices. - -* "Paletted" devices (non "true color") - -These devices will be supported through the GDI layer which will slow down the -games a lot. You can try to disable the music/sound effects to get a better -game experience. - -* "Mono" devices - -I don't even think anything will be displayed on these devices :) you can try -and report your success ... - -* MIPS/SH3 devices with QVGA resolution (240x320), "true color" - -Some devices may be a bit too slow, especially if direct screen access (GAPI) -is not supported on these devices. - -* ARM/MIPS/SH3 devices with VGA resolution (640x480) (Palm Size PC / Handheld - PC platform) - -True VGA games will probably be too slow to run properly on these devices even -if they can support them ... - -* ARM/MIPS/SH3 devices with desktop resolution (800x600) (Handheld PC platform) - -No, there will never be ANY scaler supporting 800x600 resolution, because -320x200 games CANNOT be resized to a 800x600 by a simple operation. - -And the device will probably be too slow to perform any kind of graphic -transform anyway :) - -How do I install ScummVM for Windows CE ? ------------------------------------------ - -If the current release includes a .EXE installer, ScummVM for Windows CE -will be installed without hassle. -Otherwise, you'll unzip the release on your desktop computer, and copy -all files on your device. - -If you're using a Pocket PC 2000 operating system, be sure to have GAPI -installed - it's available on Microsoft website http://www.microsoft.com - -How do I install a game ? -------------------------- - -You'll at least need to copy all the data files from your game, in a -sub-directory of your game directory. - -You'll need to put the data files in a directory named after ScummVM game -name (see "Supported Game" section in ScummVM readme) for the games having -"generic" data files (.LFL files). Recent games can be put in any directory. - -You can compress the multimedia files (sound/video) as described in the -ScummVM readme. - -You can compress the audio tracks of Loom or Monkey Island 1 as described in -the ScummVM readme. If you are running these games on a slow device with Ogg -Vorbis compression, it's recommended to sample the files to 11 kHz (this sample -rate is not supported by other versions of ScummVM). - -If you need more details, you can check SirDave's mini-manual online available -at: http://forums.scummvm.org/viewtopic.php?t=936 -and at: http://www.pocketmatrix.com/forums/viewtopic.php?t=8606 - -How do I run a game ? ---------------------- - -If it's the first time you're running ScummVM for Windows CE, have installed or -removed games, you need to rescan your game directory. - * Select Scan, tap the root directory of your games, and tap "Yes" to begin - an automatic scan of the installed games. - -Usually all games are detected and you can start playing right away. If your -game is not detected check its directory name and your data files. - -To play a game, tap on its name then tap the "Play" button or double tap its -name. - -How do I play a game on a Pocket PC or Handheld PC device ? ------------------------------------------------------------ - -The stylus is your mouse cursor, and a tap is a left mouse button click. - -As the Pocket PC lacks some keys, a toolbar is displayed at the bottom of the -screen to make the most common functions just a tap away - * The disk icon opens ScummVM options menu to save your game, or change your - current game settings. - * The movie icon skips a non interactive sequence, the current dialog or - behaves like the ESC key on a regular keyboard - * The sound icon turns all sound effects and music off and on - * The key icon allow you to map a key action to a device button. - * The monkey icon switches between portrait, landscape and inverse landscape - mode. - -You can map additional actions on your device hardware buttons using the -"Options" / "Key" menu in the ScummVM options menu. To associate an action to -a key, tap the action, then the "Map" button and press the hardware key. -The following actions are available - * Pause : pause the game - * Save : open ScummVM option menu - * Quit : quit ScummVM (without saving, be careful when using it) - * Skip : skip a non interactive sequence, the current dialog or - behaves like the ESC key on a regular keyboard - * Hide : hide or display the toolbar - - YOU MUST HIDE THE TOOLBAR TO SCROLL THROUGH THE INVENTORY IN ZAK - - * Keyboard : hide or display the virtual keyboard - - YOU MUST DISPLAY THE KEYBOARD TO FIGHT IN INDIANA JONES 3 - - * Sound : turns all sound effects and music off and on - * Right click : acts as a right mouse button click - - YOU MUST MAP THIS ACTION TO PLAY THE FOLLOWING GAMES - - - SAM & MAX, BENEATH A STEEL SKY, CURSE OF MONKEY ISLAND - - * Cursor : hide or display the mouse cursor - * Free look : go in or out of free-look mode. In this mode, you can tap - the screen to look for interesting locations without walking. - * Zoom up : magnify the upper part of the screen for 640x480 games - rendered on a 320x240 device. - * Zoom down : magnify the lower part of the screen for 640x480 games - rendered on a 320x240 device. - * FT Cheat : win a Full Throttle action sequence - * Bind keys : map a key action to a device button - * Up,Down,Left: - Right, : emulate mouse/stylus behavior - Left Click : - -If you start a game when a Right click mapping is necessary, ScummVM will ask -you to map one of your hardware key to this action before playing. Just press -the key you want to map if you see this message. - -How do I hide the toolbar ? ----------------------------- - -A shortcut is available to hide the toolbar directly from the game screen from -release 0.8.0. Double tapping the stylus at the top of the screen will switch -between a visible toolbar panel, a virtual keyboard, and an invisible panel. -If any part of the screen is obscured by the toolbar (like the load/save game -dialogs) you can use the invisible panel mode to get to it. For 320x200 games -on QVGA Pocket PCs, when the panel is hidden the game screen is resized to -320x240 for better gaming experience. - -How do I play a game on a Microsoft Smartphone device ? -------------------------------------------------------- - -When playing on a Smartphone, the cursor and mouse buttons are emulated by -a set of default keys : - 4 Move up - 6 Move down - 8 Move left - 2 Move right - Hotkey 1 Left mouse button click - Hotkey 2 Right mouse button click - Return/Action Open the key mapping menu - -Note that this means that the input will be "inversed" on a 240x320 (Windows -Mobile 2005) Smartphone. You'll have to remap the keys. - -A few options are also emulated by a set of default keys : - - 0 Options menu - Back Skip - # Zone option - -The cursor will move faster if you keep the key down. You can tweak this -behaviour in the configuration file described below. - -The "Zone" key is a *very* valuable addition allowing you to jump quickly -between three screen zones : the game zone, the verbs zone and the inventory -zone. When you switch to a zone the cursor will be reset to its former location -in this zone. - -There are two more actions available for mapping: - - Keyboard: Shows hides a virtual keyboard which can be use whenever text - input is required in a game, or a dialog. - - Rotate : Flips the screen orientation between normal and inverse landscape. - -You can change the keys mapping during the game in the key mapping menu. - -Note that you'll need to push the Action button (center of the pad) to quit -a Simon game. - -How can I apply a ScummVM command line option (f.e. to change the language) ---------------------------------------------------------------------------- - -See the section regarding the configuration file (scummvm.ini) in ScummVM -README file - the same keywords apply. - -Some parameters are specific to this port : - -game specific section (f.e. [monkey2]) - performance options - -high_sample_rate bool Desktop quality (22 kHz) sound output if set. - 11 kHz otherwise. - The default is 11 kHz. - If you have a fast device, you can set this to - true to enjoy better sound effects and music. -FM_high_quality bool Desktop quality FM synthesis if set. Lower - quality otherwise. The default is low quality. - You can change this if you have a fast device. -sound_thread_priority int Set the priority of the sound thread - (given to SetThreadPriority API) -Smush_force_redraw int Force a Smush frame redraw every X missed - frames. Mainly used for Full Throttle action - sequences. Setting it lower gives more - priority to screen redraws. Setting it higher - gives more priority to stylus/keyboard input. - The default is 30. - -game specific section (f.e. [monkey2]) - game options - -landscape int 0: Portrait, 1: Landscape, 2: Inverse Landscape - -[scummvm] section - keys definition - -You usually do not wish to modify these values directly, as they are set -by the option dialog, and are only given here for reference. - -action_mapping_version int Mapping version linked to ScummVM version. -action_mapping string Hex codes describing the key associated to - each different action. - -[scummvm] section - mouse emulation tuning - -You can tweak these parameters to customize how the cursor is handled. - -repeatTrigger int Number of milliseconds a key must be held to - consider being repeated. - -repeatX int Number of key repeat events before changing - horizontal cursor behaviour. -stepX1 int Horizontal cursor offset value when the key is - not repeated. -stepX2 int Horizontal cursor offset value when the key is - repeated less than repeatX. -stepX3 int Horizontal cursor offset value when the key is - repeated more than repeatX. - - -repeatY int Number of key repeat events before changing - vertical cursor behaviour. -stepY1 int Vertical cursor offset value when the key is - not repeated. -stepY2 int Horizontal cursor offset value when the key is - repeated less than repeatY. -stepY3 int Vertical cursor offset value when the key is - repeated more than repeatY. - -Game xxx is too slow on my device ---------------------------------- - -Even if it shouldn't happen (this port is running almost correctly on a -80 / 120 MHz first generation SPV phone), you can try some things : - - * Disable sound in the engine (see the global README) - * Play with the priority of the sound thread (change the - sound_thread_priority value - the higher the lower priority) - -And don't forget to report your progress in the ScummVM forum ! - ------------------------------------------------------------------------- -Game specific questions ------------------------------------------------------------------------- - --------------------------- --- Beneath a Steel Sky -- --------------------------- - -Introduction movie is too slow or never ends ... -------------------------------------------------- - -Skip it :) - -How can I open the inventory in Beneath a Steel Sky ? ---------------------------------------------------- - -Tap the top of the screen. Check your stylus calibration if you still cannot -open it. - -How can I use an item in Beneath a Steel Sky ? ----------------------------------------------- - -You need to map the right click button (see the General Questions section). - ----------------------------- --- Curse of Monkey Island -- ----------------------------- - -How can I open the inventory in Curse of Monkey Island ? ------------------------------------------------------- - -You need to map the right click button (see the General Questions section). - -I'm experiencing random crashes ... ------------------------------------- - -This game has high memory requirements, and may crash sometimes on low -memory devices. Continue your game with the latest automatically saved -game and everything should be fine. -You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN) -to lower these requirements. - -Sound synchronization is lost in Curse of Monkey Island videos --------------------------------------------------------------- - -This is a port bug which is very noticeable in VGA mode. It can probably be -fixed with a faster blitting routine or a faster device. - --------------------- --- Full Throttle -- --------------------- - -I'm experiencing random crashes ... ------------------------------------- - -This game has high memory requirements, and may crash sometimes on low -memory devices. Continue your game with the latest automatically saved -game and everything should be fine. -You can consider removing the voice file (MONSTER.SOU) and disable the -music to lower these requirements. - ----------------------------------------- --- Indiana Jones and the Last Crusade -- ----------------------------------------- - -How can I fight in Indiana Jones and the Last Crusade ? ------------------------------------------------------ - -You need to map the keyboard button (see the General Questions section). - ---------------- --- Sam & Max -- ---------------- - -How can I change the current action ? -------------------------------------- - -You need to map the right click button (see the General Questions section). - -How can I exit a mini game ? ----------------------------- - -Use the skip toolbar icon (see the General Questions section). - -------------------- --- Simon 1 and 2 -- --------------------- - -How can I save or quit in Simon ? --------------------------------- - -"Use" (use the use verb :p) the postcard. The ScummVM option dialog is disabled -in Simon games. - -On Smartphone, you'll need to push the Action button (center of the pad) to -quit the game. - -------------- --- The Dig -- -------------- - -I'm experiencing random crashes ... ------------------------------------- - -This game has high memory requirements, and may crash sometimes on low -memory devices. Continue your game with the latest automatically saved -game and everything should be fine. -You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN) -to lower these requirements. - --------------------- --- Zak Mc Kracken -- --------------------- - -How can I scroll through my inventory items in Zak Mc Kracken ? -------------------------------------------------------------- - -You need to map the hide toolbar button (see the General Questions section) or -double tap at the top of the screen (from 0.8.0+) - --------------------- --- Broken Sword 2 -- --------------------- - -I've installed the movies pack but they are not playing -------------------------------------------------------- - -MPEG 2 playback takes too much memory in the current release, and may prevent -movies from playing in VGA mode. This may get better in the next releases. - ----------------- --- Gobliiins -- ----------------- - -Cursor is grabled after loading a game --------------------------------------- - -Due to a bug in 0.8.0, you'll have to tap the stylus somewhere on the game -screen between 2 letters when entering a code. Otherwise the cursor will get -garbled. - -This has not been retested for 0.8.1 but should be fixed. - ------------------------------------------------------------------------- -Support ------------------------------------------------------------------------- - -Help, I've read everything and ... ------------------------------------ - -Luckily, as there is a huge variety of Windows Mobile devices, a specific forum -is dedicated to this ScummVM port. You can ask your question on the WinCE -ScummVM forum available at http://forums.scummvm.org/viewforum.php?f=6 - -Some older questions and very nice tutorials are still available on the historic -PocketMatrix forum at http://www.pocketmatrix.com/forums/viewforum.php?f=20 -where the community is always glad to help and have dealt with all my bugs for more -than three years now :) - -I think I found a bug, ScummVM crashes in ... ---------------------------------------------- - -See the "Reporting Bugs" section in ScummVM readme. - -If you have a Pocket PC or Handheld PC, be sure to include its resolution (obtained -on the second dialog displayed on the "About" menu) in your bug report. - -If you cannot reproduce this bug on another ScummVM version, you can cross -post your bug report on ScummVM forums. - ------------------------------------------------------------------------- -Good Luck and Happy Adventuring! -The ScummVM team. -http://www.scummvm.org/ ------------------------------------------------------------------------- diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt new file mode 100644 index 0000000000..b1fc585e22 --- /dev/null +++ b/backends/platform/wince/README-WinCE.txt @@ -0,0 +1,506 @@ +ScummVM Windows CE FAQ +Last updated: 2006-06-20 +Release version: 0.9.0 +------------------------------------------------------------------------ + +This document is intended to give common answers to specific ScummVM +issues on Windows CE, in 3 sections + * "General questions" : browse this section to get started and see + general issues + * "Game specific questions" : lists some common game specific issues + * "Support and links" : how to get support if you're still puzzled + +------------------------------------------------------------------------ +General questions +------------------------------------------------------------------------ + +Which devices are supported ? +----------------------------- + +Official build +-------------- + +The official build is based on the ARM architecture and should work with any +Pocket PC 2000, Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone +2002, Smartphone 2003 or Windows Mobile based device. + +Support for old ARM architectures (Handheld PCs, Palm Size PCs) and other CPUs +(MIPS, SH3) is discontinued. Feel free to generate builds for these +architectures and contact me to include them on ScummVM website. + +Full support +------------ + +* ARM based Windows Mobile handhelds with QVGA resolution (240x320) slower + than 200 MHz (PocketPC platform) + +All AdLib first generation games should work properly on these devices. +Sam'n'Max will be a bit too slow to be played with music. +More recent games (The Dig, Curse of Monkey Island, Broken Sword series) +and all VGA games will probably be too slow to be enjoyable. + +* ARM based Windows Mobile handhelds with QVGA resolution (240x320) faster + than 200 MHz + +All games should work properly on these devices. +VGA games will be resized and the font gets hard to read in this case (be sure +to install the talkie version the game :p) + +* ARM based Windows Mobile handhelds with VGA resolution (640x480) + +All non VGA games should work properly on these devices. They can be resized +with different scalers (not all desktop scalers are supported due to Embedded +Visual C++ very personal interpretation of the C++ standard). +VGA games will be displayed in true VGA mode, which can takes a lot of memory +and slow down the game (especially during scrollings). It will get better in +the next releases or with faster devices. + +* Windows Mobile Smartphones (176x220 or 240x320) + +Early support is provided for all 320x200 games. +The font can get hard to read (you should prefer talkie games, or wear glasses) + +* Support for Windows Mobile 5 is experimental but should work. "Flipping" devices +such as the HTC Wizard or HTC Universal work only in portait (closed) mode for the +moment. + +Partial / Discontinued support +------------------------------ + +Support for the following devices is not complete, not working properly or +discontinued because the device is now obsolete. Feel free to contribute and +improve the port for your favorite device, or use the last release built with +the previous port architecture (0.5.1) which was less resource hungry and +supported more exotic devices. + +* "Paletted" devices (non "true color") + +These devices will be supported through the GDI layer which will slow down the +games a lot. You can try to disable the music/sound effects to get a better +game experience. + +* "Mono" devices + +I don't even think anything will be displayed on these devices :) you can try +and report your success ... + +* MIPS/SH3 devices with QVGA resolution (240x320), "true color" + +Some devices may be a bit too slow, especially if direct screen access (GAPI) +is not supported on these devices. + +* ARM/MIPS/SH3 devices with VGA resolution (640x480) (Palm Size PC / Handheld + PC platform) + +True VGA games will probably be too slow to run properly on these devices even +if they can support them ... + +* ARM/MIPS/SH3 devices with desktop resolution (800x600) (Handheld PC platform) + +No, there will never be ANY scaler supporting 800x600 resolution, because +320x200 games CANNOT be resized to a 800x600 by a simple operation. + +And the device will probably be too slow to perform any kind of graphic +transform anyway :) + +How do I install ScummVM for Windows CE ? +----------------------------------------- + +If the current release includes a .EXE installer, ScummVM for Windows CE +will be installed without hassle. +Otherwise, you'll unzip the release on your desktop computer, and copy +all files on your device. + +If you're using a Pocket PC 2000 operating system, be sure to have GAPI +installed - it's available on Microsoft website http://www.microsoft.com + +How do I install a game ? +------------------------- + +You'll at least need to copy all the data files from your game, in a +sub-directory of your game directory. + +You'll need to put the data files in a directory named after ScummVM game +name (see "Supported Game" section in ScummVM readme) for the games having +"generic" data files (.LFL files). Recent games can be put in any directory. + +You can compress the multimedia files (sound/video) as described in the +ScummVM readme. + +You can compress the audio tracks of Loom or Monkey Island 1 as described in +the ScummVM readme. If you are running these games on a slow device with Ogg +Vorbis compression, it's recommended to sample the files to 11 kHz (this sample +rate is not supported by other versions of ScummVM). + +If you need more details, you can check SirDave's mini-manual online available +at: http://forums.scummvm.org/viewtopic.php?t=936 +and at: http://www.pocketmatrix.com/forums/viewtopic.php?t=8606 + +How do I run a game ? +--------------------- + +If it's the first time you're running ScummVM for Windows CE, have installed or +removed games, you need to rescan your game directory. + * Select Scan, tap the root directory of your games, and tap "Yes" to begin + an automatic scan of the installed games. + +Usually all games are detected and you can start playing right away. If your +game is not detected check its directory name and your data files. + +To play a game, tap on its name then tap the "Play" button or double tap its +name. + +How do I play a game on a Pocket PC or Handheld PC device ? +----------------------------------------------------------- + +The stylus is your mouse cursor, and a tap is a left mouse button click. + +As the Pocket PC lacks some keys, a toolbar is displayed at the bottom of the +screen to make the most common functions just a tap away + * The disk icon opens ScummVM options menu to save your game, or change your + current game settings. + * The movie icon skips a non interactive sequence, the current dialog or + behaves like the ESC key on a regular keyboard + * The sound icon turns all sound effects and music off and on + * The key icon allow you to map a key action to a device button. + * The monkey icon switches between portrait, landscape and inverse landscape + mode. + +You can map additional actions on your device hardware buttons using the +"Options" / "Key" menu in the ScummVM options menu. To associate an action to +a key, tap the action, then the "Map" button and press the hardware key. +The following actions are available + * Pause : pause the game + * Save : open ScummVM option menu + * Quit : quit ScummVM (without saving, be careful when using it) + * Skip : skip a non interactive sequence, the current dialog or + behaves like the ESC key on a regular keyboard + * Hide : hide or display the toolbar + - YOU MUST HIDE THE TOOLBAR TO SCROLL THROUGH THE INVENTORY IN ZAK - + * Keyboard : hide or display the virtual keyboard + - YOU MUST DISPLAY THE KEYBOARD TO FIGHT IN INDIANA JONES 3 - + * Sound : turns all sound effects and music off and on + * Right click : acts as a right mouse button click + - YOU MUST MAP THIS ACTION TO PLAY THE FOLLOWING GAMES - + - SAM & MAX, BENEATH A STEEL SKY, CURSE OF MONKEY ISLAND - + * Cursor : hide or display the mouse cursor + * Free look : go in or out of free-look mode. In this mode, you can tap + the screen to look for interesting locations without walking. + * Zoom up : magnify the upper part of the screen for 640x480 games + rendered on a 320x240 device. + * Zoom down : magnify the lower part of the screen for 640x480 games + rendered on a 320x240 device. + * FT Cheat : win a Full Throttle action sequence + * Bind keys : map a key action to a device button + * Up,Down,Left: + Right, : emulate mouse/stylus behavior + Left Click : + +If you start a game when a Right click mapping is necessary, ScummVM will ask +you to map one of your hardware key to this action before playing. Just press +the key you want to map if you see this message. + +How do I hide the toolbar ? +---------------------------- + +A shortcut is available to hide the toolbar directly from the game screen from +release 0.8.0. Double tapping the stylus at the top of the screen will switch +between a visible toolbar panel, a virtual keyboard, and an invisible panel. +If any part of the screen is obscured by the toolbar (like the load/save game +dialogs) you can use the invisible panel mode to get to it. For 320x200 games +on QVGA Pocket PCs, when the panel is hidden the game screen is resized to +320x240 for better gaming experience. + +How do I play a game on a Microsoft Smartphone device ? +------------------------------------------------------- + +When playing on a Smartphone, the cursor and mouse buttons are emulated by +a set of default keys : + 4 Move up + 6 Move down + 8 Move left + 2 Move right + Hotkey 1 Left mouse button click + Hotkey 2 Right mouse button click + Return/Action Open the key mapping menu + +Note that this means that the input will be "inversed" on a 240x320 (Windows +Mobile 2005) Smartphone. You'll have to remap the keys. + +A few options are also emulated by a set of default keys : + + 0 Options menu + Back Skip + # Zone option + +The cursor will move faster if you keep the key down. You can tweak this +behaviour in the configuration file described below. + +The "Zone" key is a *very* valuable addition allowing you to jump quickly +between three screen zones : the game zone, the verbs zone and the inventory +zone. When you switch to a zone the cursor will be reset to its former location +in this zone. + +There are two more actions available for mapping: + - Keyboard: Shows hides a virtual keyboard which can be use whenever text + input is required in a game, or a dialog. + - Rotate : Flips the screen orientation between normal and inverse landscape. + +You can change the keys mapping during the game in the key mapping menu. + +Note that you'll need to push the Action button (center of the pad) to quit +a Simon game. + +How can I apply a ScummVM command line option (f.e. to change the language) +--------------------------------------------------------------------------- + +See the section regarding the configuration file (scummvm.ini) in ScummVM +README file - the same keywords apply. + +Some parameters are specific to this port : + +game specific section (f.e. [monkey2]) - performance options + +high_sample_rate bool Desktop quality (22 kHz) sound output if set. + 11 kHz otherwise. + The default is 11 kHz. + If you have a fast device, you can set this to + true to enjoy better sound effects and music. +FM_high_quality bool Desktop quality FM synthesis if set. Lower + quality otherwise. The default is low quality. + You can change this if you have a fast device. +sound_thread_priority int Set the priority of the sound thread + (given to SetThreadPriority API) +Smush_force_redraw int Force a Smush frame redraw every X missed + frames. Mainly used for Full Throttle action + sequences. Setting it lower gives more + priority to screen redraws. Setting it higher + gives more priority to stylus/keyboard input. + The default is 30. + +game specific section (f.e. [monkey2]) - game options + +landscape int 0: Portrait, 1: Landscape, 2: Inverse Landscape + +[scummvm] section - keys definition + +You usually do not wish to modify these values directly, as they are set +by the option dialog, and are only given here for reference. + +action_mapping_version int Mapping version linked to ScummVM version. +action_mapping string Hex codes describing the key associated to + each different action. + +[scummvm] section - mouse emulation tuning + +You can tweak these parameters to customize how the cursor is handled. + +repeatTrigger int Number of milliseconds a key must be held to + consider being repeated. + +repeatX int Number of key repeat events before changing + horizontal cursor behaviour. +stepX1 int Horizontal cursor offset value when the key is + not repeated. +stepX2 int Horizontal cursor offset value when the key is + repeated less than repeatX. +stepX3 int Horizontal cursor offset value when the key is + repeated more than repeatX. + + +repeatY int Number of key repeat events before changing + vertical cursor behaviour. +stepY1 int Vertical cursor offset value when the key is + not repeated. +stepY2 int Horizontal cursor offset value when the key is + repeated less than repeatY. +stepY3 int Vertical cursor offset value when the key is + repeated more than repeatY. + +Game xxx is too slow on my device +--------------------------------- + +Even if it shouldn't happen (this port is running almost correctly on a +80 / 120 MHz first generation SPV phone), you can try some things : + + * Disable sound in the engine (see the global README) + * Play with the priority of the sound thread (change the + sound_thread_priority value - the higher the lower priority) + +And don't forget to report your progress in the ScummVM forum ! + +------------------------------------------------------------------------ +Game specific questions +------------------------------------------------------------------------ + +-------------------------- +-- Beneath a Steel Sky -- +-------------------------- + +Introduction movie is too slow or never ends ... +------------------------------------------------- + +Skip it :) + +How can I open the inventory in Beneath a Steel Sky ? +--------------------------------------------------- + +Tap the top of the screen. Check your stylus calibration if you still cannot +open it. + +How can I use an item in Beneath a Steel Sky ? +---------------------------------------------- + +You need to map the right click button (see the General Questions section). + +---------------------------- +-- Curse of Monkey Island -- +---------------------------- + +How can I open the inventory in Curse of Monkey Island ? +------------------------------------------------------ + +You need to map the right click button (see the General Questions section). + +I'm experiencing random crashes ... +------------------------------------ + +This game has high memory requirements, and may crash sometimes on low +memory devices. Continue your game with the latest automatically saved +game and everything should be fine. +You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN) +to lower these requirements. + +Sound synchronization is lost in Curse of Monkey Island videos +-------------------------------------------------------------- + +This is a port bug which is very noticeable in VGA mode. It can probably be +fixed with a faster blitting routine or a faster device. + +-------------------- +-- Full Throttle -- +-------------------- + +I'm experiencing random crashes ... +------------------------------------ + +This game has high memory requirements, and may crash sometimes on low +memory devices. Continue your game with the latest automatically saved +game and everything should be fine. +You can consider removing the voice file (MONSTER.SOU) and disable the +music to lower these requirements. + +---------------------------------------- +-- Indiana Jones and the Last Crusade -- +---------------------------------------- + +How can I fight in Indiana Jones and the Last Crusade ? +----------------------------------------------------- + +You need to map the keyboard button (see the General Questions section). + +--------------- +-- Sam & Max -- +--------------- + +How can I change the current action ? +------------------------------------- + +You need to map the right click button (see the General Questions section). + +How can I exit a mini game ? +---------------------------- + +Use the skip toolbar icon (see the General Questions section). + +------------------- +-- Simon 1 and 2 -- +-------------------- + +How can I save or quit in Simon ? +-------------------------------- + +"Use" (use the use verb :p) the postcard. The ScummVM option dialog is disabled +in Simon games. + +On Smartphone, you'll need to push the Action button (center of the pad) to +quit the game. + +------------- +-- The Dig -- +------------- + +I'm experiencing random crashes ... +------------------------------------ + +This game has high memory requirements, and may crash sometimes on low +memory devices. Continue your game with the latest automatically saved +game and everything should be fine. +You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN) +to lower these requirements. + +-------------------- +-- Zak Mc Kracken -- +-------------------- + +How can I scroll through my inventory items in Zak Mc Kracken ? +------------------------------------------------------------- + +You need to map the hide toolbar button (see the General Questions section) or +double tap at the top of the screen (from 0.8.0+) + +-------------------- +-- Broken Sword 2 -- +-------------------- + +I've installed the movies pack but they are not playing +------------------------------------------------------- + +MPEG 2 playback takes too much memory in the current release, and may prevent +movies from playing in VGA mode. This may get better in the next releases. + +---------------- +-- Gobliiins -- +---------------- + +Cursor is grabled after loading a game +-------------------------------------- + +Due to a bug in 0.8.0, you'll have to tap the stylus somewhere on the game +screen between 2 letters when entering a code. Otherwise the cursor will get +garbled. + +This has not been retested for 0.8.1 but should be fixed. + +------------------------------------------------------------------------ +Support +------------------------------------------------------------------------ + +Help, I've read everything and ... +----------------------------------- + +Luckily, as there is a huge variety of Windows Mobile devices, a specific forum +is dedicated to this ScummVM port. You can ask your question on the WinCE +ScummVM forum available at http://forums.scummvm.org/viewforum.php?f=6 + +Some older questions and very nice tutorials are still available on the historic +PocketMatrix forum at http://www.pocketmatrix.com/forums/viewforum.php?f=20 +where the community is always glad to help and have dealt with all my bugs for more +than three years now :) + +I think I found a bug, ScummVM crashes in ... +--------------------------------------------- + +See the "Reporting Bugs" section in ScummVM readme. + +If you have a Pocket PC or Handheld PC, be sure to include its resolution (obtained +on the second dialog displayed on the "About" menu) in your bug report. + +If you cannot reproduce this bug on another ScummVM version, you can cross +post your bug report on ScummVM forums. + +------------------------------------------------------------------------ +Good Luck and Happy Adventuring! +The ScummVM team. +http://www.scummvm.org/ +------------------------------------------------------------------------ -- cgit v1.2.3 From a3e8f765a6be500357b99d693b21266dbc428137 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 18:09:24 +0000 Subject: Updated Symbian OS Prediction handling Updated AGI to only enable predictive input after dictionary was found. svn-id: r27206 --- backends/platform/symbian/src/SymbianOS.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 80f9491d2a..d5c869ac91 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -88,8 +88,10 @@ void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) { else { } - - return; + break; + case kFeatureDisableKeyFiltering: + GUI::Actions::Instance()->beginMapping(enable); + break;; default: OSystem_SDL::setFeatureState(f, enable); } @@ -345,16 +347,21 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { } return true; - + case GUI::ACTION_MULTI: { + GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); + // if key code is pause, then change event to interactive or just fall through + if(key.keycode() == SDLK_PAUSE) { + event.type = Common::EVENT_PREDICTIVE_DIALOG; + return true; + } + } case GUI::ACTION_SAVE: case GUI::ACTION_SKIP: - case GUI::ACTION_MULTI: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: case GUI::ACTION_SWAPCHAR: case GUI::ACTION_FASTMODE: - case GUI::ACTION_DEBUGGER: - { + case GUI::ACTION_DEBUGGER: { GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); ev.key.keysym.sym = (SDLKey) key.ascii(); ev.key.keysym.scancode= key.keycode(); -- cgit v1.2.3 From d0d4c4da34e142ea05e3b8984392630f3cf03a69 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 20:09:36 +0000 Subject: Added read file sharing by default. Required for Gob2. svn-id: r27213 --- backends/platform/symbian/src/SymbianOS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index d5c869ac91..4901480bf9 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -453,7 +453,9 @@ FILE* symbian_fopen(const char* name, const char* mode) { if ((modeLen > 1 && mode[1] == '+') || (modeLen > 2 && mode[2] == '+')) { fileMode = fileMode| EFileWrite; } - + + fileMode = fileMode| EFileShareReadersOnly; + switch(mode[0]) { case 'a': if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { -- cgit v1.2.3 From e1fbe5f02f0ebb26f3ca1e1710e581471f3c47bc Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 20:41:35 +0000 Subject: Updated actions for SymbianOS svn-id: r27215 --- backends/platform/symbian/src/SymbianActions.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 2c67c06bba..1b2e4e6aac 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -176,9 +176,13 @@ void SymbianActions::initInstanceGame() { // FT Cheat _action_enabled[ACTION_MULTI] = true; if (is_agi) - _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); + _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + else if (is_gob) + _key_action[ACTION_MULTI].setAscii(315); // bargon : F1 to start + else if (gameid == "atlantis") + _key_action[ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[ACTION_MULTI].setAscii(86); // shift-V + _key_action[ACTION_MULTI].setAscii(86); // FT cheat : shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; -- cgit v1.2.3 From 3f5084497a9fc3ac5935bf73930c3f5b67113937 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 21:10:01 +0000 Subject: Removed line in makefile not needed anymore svn-id: r27216 --- backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in | 2 +- backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in | 1 - backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in index eebd4764f5..4ec5c01e71 100644 --- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in +++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in @@ -67,7 +67,7 @@ EPOCHEAPSIZE 2048000 32000000 ALWAYS_BUILD_AS_ARM MACRO S60 MACRO S60V3 -MACRO EPOC_AS_APP + //START_AUTO_MACROS_SLAVE// // empty base file, will be updated by Perl build scripts diff --git a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in index c3ebae01d7..3e9c408c96 100644 --- a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in +++ b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in @@ -39,7 +39,6 @@ AIF ScummVm.Aif ..\res\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp UID 0x100039ce 0x101f9b57 MACRO UIQ -MACRO EPOC_AS_APP //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in index 8620237b3a..ce5bb22867 100644 --- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in +++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in @@ -66,7 +66,7 @@ UID 0x100039ce 0xA0000657 MACRO UIQ MACRO UIQ3 -MACRO EPOC_AS_APP + ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// -- cgit v1.2.3 From 6c9e50c8a81315afe76246800962cdf4f15d5fb5 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 21:29:18 +0000 Subject: Updated filesharing mode to full sharing. Now scummvm.ini works again. svn-id: r27218 --- backends/platform/symbian/src/SymbianOS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 4901480bf9..0bb67c97b9 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -454,7 +454,7 @@ FILE* symbian_fopen(const char* name, const char* mode) { fileMode = fileMode| EFileWrite; } - fileMode = fileMode| EFileShareReadersOnly; + fileMode = fileMode| EFileShareAny; switch(mode[0]) { case 'a': -- cgit v1.2.3 From 910ff9289b7024f2b2264c088116be2828ff3373 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sat, 9 Jun 2007 08:40:39 +0000 Subject: fix keys getting stuck in virtual keyboard svn-id: r27232 --- backends/platform/wince/CEgui/PanelKeyboard.cpp | 34 +++++++++++++++++++++---- backends/platform/wince/CEgui/PanelKeyboard.h | 3 ++- 2 files changed, 31 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp index 99bd125431..fdbb3b4e32 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.cpp +++ b/backends/platform/wince/CEgui/PanelKeyboard.cpp @@ -35,6 +35,9 @@ namespace CEGUI { PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() { setBackground(reference); + _state = false; + _lastKey.setAscii(0); + _lastKey.setKeycode(0); } @@ -42,6 +45,7 @@ namespace CEGUI { } bool PanelKeyboard::action(int x, int y, bool pushed) { + Key key; if (checkInside(x, y)) { int keyAscii = 0; @@ -67,14 +71,34 @@ namespace CEGUI { } if (keyAscii != 0) { - _key.setAscii(keyAscii); - _key.setKeycode(tolower(keyCode)); - return EventsBuffer::simulateKey(&_key, pushed); + if (_state && pushed && keyCode != _lastKey.keycode()) // if cursor is still down and off the current key + return false; + else if (_state && !pushed && keyCode != _lastKey.keycode()) { // cursor is up but off the current key + keyAscii = _lastKey.ascii(); + keyCode = _lastKey.keycode(); + } + _state = pushed; + _lastKey.setAscii(keyAscii); + _lastKey.setKeycode(tolower(keyCode)); + + key.setAscii(keyAscii); + key.setKeycode(tolower(keyCode)); + return EventsBuffer::simulateKey(&key, pushed); } - else + else if (_state && !pushed) { // cursor is in some forbidden region and is up + _state = false; + key.setAscii(_lastKey.ascii()); + key.setKeycode(_lastKey.keycode()); + return EventsBuffer::simulateKey(&key, false); + } else return false; } - else + else if (_state && !pushed) { // cursor left the keyboard area and is up + _state = false; + key.setAscii(_lastKey.ascii()); + key.setKeycode(_lastKey.keycode()); + return EventsBuffer::simulateKey(&key, false); + } else return false; } } diff --git a/backends/platform/wince/CEgui/PanelKeyboard.h b/backends/platform/wince/CEgui/PanelKeyboard.h index fe586b3727..d0182ce5fe 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.h +++ b/backends/platform/wince/CEgui/PanelKeyboard.h @@ -44,7 +44,8 @@ namespace CEGUI { virtual ~PanelKeyboard(); virtual bool action(int x, int y, bool pushed); private: - Key _key; + bool _state; + Key _lastKey; }; } -- cgit v1.2.3 From a170e6e01840aeb8fed6bf35a665ccac7a9a06c2 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sat, 9 Jun 2007 09:29:07 +0000 Subject: Changed makefiles to default to armi binaries svn-id: r27239 --- backends/platform/symbian/mmp/scummvm_agi.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_agos.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_base.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_cine.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_cruise.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_gob.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_kyra.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_lure.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_parallaction.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_queen.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_saga.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_scumm.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_sky.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_sword1.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_sword2.mmp.in | 1 + backends/platform/symbian/mmp/scummvm_touche.mmp.in | 1 + 16 files changed, 16 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in index f6b47c3458..66a743879a 100644 --- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_agi.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in index 05ec375b51..f3f265d273 100644 --- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_agos.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in index a1f3f1b261..dd9eb0d4ea 100644 --- a/backends/platform/symbian/mmp/scummvm_base.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_base.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM // Note: the LIB:*.lib statements are used by AdaptAllMMPs.pl, so don't remove them! //START_AUTO_MACROS_MASTER// diff --git a/backends/platform/symbian/mmp/scummvm_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in index d8dcd62718..18309f6f9d 100644 --- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_CINE.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in index 05092777b0..43fc2cbf8a 100644 --- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_cruise.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in index 34c4f82bd1..247ff33011 100644 --- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_gob.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in index 899384003f..257eb92420 100644 --- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_kyra.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in index 1a52efbc69..29afe56182 100644 --- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_lure.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in index 4c1bd99614..ad8b885ee1 100644 --- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_parallaction.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in index b5a65b6cef..5b90efd1d1 100644 --- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_queen.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in index 4f6555a049..880c99fbb2 100644 --- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_saga.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in index cdf454e663..16ae2e763a 100644 --- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_scumm.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in index 8748956564..e07b918efb 100644 --- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_sky.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in index 2bd6febc76..0bea7fdcb7 100644 --- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_sword1.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in index ddd299ce75..a7eaa4c4f5 100644 --- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_sword2.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in index 787d9f33bf..84d9bd13fb 100644 --- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in +++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in @@ -30,6 +30,7 @@ TARGET scummvm_touche.lib TARGETTYPE lib OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings +ALWAYS_BUILD_AS_ARM //START_AUTO_MACROS_SLAVE// -- cgit v1.2.3 From 8eae29816ae7036ef4401747863ad770c44efc51 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Sat, 9 Jun 2007 09:41:45 +0000 Subject: disable lure and cruise engines svn-id: r27240 --- backends/platform/psp/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile index 648adcd881..da1d40dbee 100644 --- a/backends/platform/psp/Makefile +++ b/backends/platform/psp/Makefile @@ -6,6 +6,9 @@ DISABLE_SCALERS = true DISABLE_HQ_SCALERS = true +DISABLE_LURE = 1 +DISABLE_CRUISE = 1 + srcdir = ../../.. VPATH = $(srcdir) HAVE_GCC3 = false -- cgit v1.2.3 From 3e416bf6013ea3c26ccd979d3fcdc09c08419d86 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Sat, 9 Jun 2007 09:44:52 +0000 Subject: enable lure and cruise again; I accidentally committed this to trunk instead of branch-0-10-0 previously =) svn-id: r27243 --- backends/platform/psp/Makefile | 3 --- 1 file changed, 3 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile index da1d40dbee..648adcd881 100644 --- a/backends/platform/psp/Makefile +++ b/backends/platform/psp/Makefile @@ -6,9 +6,6 @@ DISABLE_SCALERS = true DISABLE_HQ_SCALERS = true -DISABLE_LURE = 1 -DISABLE_CRUISE = 1 - srcdir = ../../.. VPATH = $(srcdir) HAVE_GCC3 = false -- cgit v1.2.3 From 80432ef36a514065a190290a7bacc456996cc486 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sat, 9 Jun 2007 10:06:05 +0000 Subject: add nippon support svn-id: r27244 --- backends/platform/wince/CEActionsPocket.cpp | 17 +++++++++++++++-- backends/platform/wince/CEActionsSmartphone.cpp | 15 ++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index cfc029536e..81de8e779c 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -127,11 +127,12 @@ void CEActionsPocket::initInstanceGame() { bool is_cine = (gameid == "cine"); bool is_touche = (gameid == "touche"); bool is_agi = (gameid == "agi"); + bool is_parallaction = (gameid == "parallaction"); GUI_Actions::initInstanceGame(); // See if a right click mapping could be needed - if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche) + if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche || is_parallaction) _right_click_needed = true; // See if a "hide toolbar" mapping could be needed @@ -157,6 +158,9 @@ void CEActionsPocket::initInstanceGame() { } else if (is_agi) { _action_enabled[POCKET_ACTION_SAVE] = true; _key_action[POCKET_ACTION_SAVE].setAscii(SDLK_ESCAPE); + } else if (is_parallaction) { + _action_enabled[POCKET_ACTION_SAVE] = true; + _key_action[POCKET_ACTION_SAVE].setAscii(SDLK_s); } else { _action_enabled[POCKET_ACTION_SAVE] = true; _key_action[POCKET_ACTION_SAVE].setAscii(319); // F5 key @@ -164,7 +168,7 @@ void CEActionsPocket::initInstanceGame() { // Quit _action_enabled[POCKET_ACTION_QUIT] = true; // Skip - if (!is_cine) + if (!is_cine && !is_parallaction) _action_enabled[POCKET_ACTION_SKIP] = true; if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche) _key_action[POCKET_ACTION_SKIP].setAscii(VK_ESCAPE); @@ -233,6 +237,15 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { case POCKET_ACTION_SAVE: case POCKET_ACTION_SKIP: case POCKET_ACTION_MULTI: + if (action == POCKET_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") { + // FIXME: This is a temporary solution. The engine should handle its own menus. + // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience + GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); + if (alert.runModal() == GUI::kMessageOK) + _key_action[action].setAscii(SDLK_l); + else + _key_action[action].setAscii(SDLK_s); + } EventsBuffer::simulateKey(&_key_action[action], true); return true; case POCKET_ACTION_KEYBOARD: diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 309aefd95d..e65af8fc53 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -117,11 +117,12 @@ void CEActionsSmartphone::initInstanceGame() { bool is_cine = (gameid == "cine"); bool is_touche = (gameid == "touche"); bool is_agi = (gameid == "agi"); + bool is_parallaction = (gameid == "parallaction"); GUI_Actions::initInstanceGame(); // See if a right click mapping could be needed - if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche) + if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche || is_parallaction) _right_click_needed = true; // Initialize keys for different actions @@ -140,6 +141,9 @@ void CEActionsSmartphone::initInstanceGame() { } else if (is_agi) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE); + } else if (is_parallaction) { + _action_enabled[SMARTPHONE_ACTION_SAVE] = true; + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_s); } else { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setAscii(319); // F5 key @@ -194,6 +198,15 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { case SMARTPHONE_ACTION_SAVE: case SMARTPHONE_ACTION_SKIP: case SMARTPHONE_ACTION_MULTI: + if (action == SMARTPHONE_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") { + // FIXME: This is a temporary solution. The engine should handle its own menus. + // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience + GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); + if (alert.runModal() == GUI::kMessageOK) + _key_action[action].setAscii(SDLK_l); + else + _key_action[action].setAscii(SDLK_s); + } EventsBuffer::simulateKey(&_key_action[action], true); return true; case SMARTPHONE_ACTION_RIGHTCLICK: -- cgit v1.2.3 From 7e6efd8eac713b000caedb8625d72f6ecfc225d1 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sat, 9 Jun 2007 17:25:46 +0000 Subject: fix bugs 1734068, 1723144: cursor trails when scrolling svn-id: r27250 --- backends/platform/wince/wince-sdl.cpp | 5 +++++ backends/platform/wince/wince-sdl.h | 1 + 2 files changed, 6 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index a096be0a4a..4a61b3eacb 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1590,6 +1590,11 @@ void OSystem_WINCE3::internUpdateScreen() { _forceFull = false; } +bool OSystem_WINCE3::grabRawScreen(Graphics::Surface *surf) { + undrawMouse(); + return OSystem_SDL::grabRawScreen(surf); +} + bool OSystem_WINCE3::saveScreenshot(const char *filename) { assert(_hwscreen != NULL); diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h index 056996f0de..41b71bba02 100644 --- a/backends/platform/wince/wince-sdl.h +++ b/backends/platform/wince/wince-sdl.h @@ -97,6 +97,7 @@ public: void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); void showOverlay(); void hideOverlay(); + bool grabRawScreen(Graphics::Surface *surf); // GUI and action stuff void swap_panel_visibility(); -- cgit v1.2.3 From 62ca2f9d51543be39489977bc1f541f665e21156 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sat, 9 Jun 2007 21:13:47 +0000 Subject: Updated actions for paralall svn-id: r27256 --- backends/platform/symbian/src/SymbianActions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 1b2e4e6aac..2c13a407ed 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -138,7 +138,8 @@ void SymbianActions::initInstanceGame() { bool is_cine = (gameid == "cine"); bool is_touche = (gameid == "touche"); bool is_agi = (gameid == "agi"); - + bool is_parallaction = (gameid == "parallaction"); + Actions::initInstanceGame(); // Initialize keys for different actions @@ -156,6 +157,8 @@ void SymbianActions::initInstanceGame() { _key_action[ACTION_SAVE].setAscii(SDLK_F10); // F10 } else if (is_agi) { _key_action[ACTION_SAVE].setAscii(SDLK_ESCAPE); + } else if (is_parallaction) { + _key_action[ACTION_SAVE].setAscii(SDLK_s); } else { _key_action[ACTION_SAVE].setAscii(SDLK_F5); // F5 key } @@ -173,7 +176,7 @@ void SymbianActions::initInstanceGame() { // Zone _action_enabled[ACTION_ZONE] = true; - // FT Cheat + // Multi function key _action_enabled[ACTION_MULTI] = true; if (is_agi) _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog -- cgit v1.2.3 From f164c6c14e6484e553256d81e5ea861dfb9a9e5c Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sun, 10 Jun 2007 08:19:16 +0000 Subject: formatting svn-id: r27285 --- backends/platform/wince/CEDevice.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp index a76360f590..855c601741 100644 --- a/backends/platform/wince/CEDevice.cpp +++ b/backends/platform/wince/CEDevice.cpp @@ -53,15 +53,13 @@ DWORD CEDevice::reg_access(TCHAR *key, TCHAR *val, DWORD data) { return data; cbdata = sizeof(DWORD); - if (RegQueryValueEx(regkey, val, NULL, NULL, (LPBYTE) &tmpval, &cbdata) != ERROR_SUCCESS) - { + if (RegQueryValueEx(regkey, val, NULL, NULL, (LPBYTE) &tmpval, &cbdata) != ERROR_SUCCESS) { RegCloseKey(regkey); return data; } cbdata = sizeof(DWORD); - if (RegSetValueEx(regkey, val, 0, REG_DWORD, (LPBYTE) &data, cbdata) != ERROR_SUCCESS) - { + if (RegSetValueEx(regkey, val, 0, REG_DWORD, (LPBYTE) &data, cbdata) != ERROR_SUCCESS) { RegCloseKey(regkey); return data; } @@ -78,8 +76,7 @@ void CEDevice::backlight_xchg() { REG_disp = reg_access(TEXT("ControlPanel\\Power"), TEXT("Display"), REG_disp); h = CreateEvent(NULL, FALSE, FALSE, TEXT("BackLightChangeEvent")); - if (h) - { + if (h) { SetEvent(h); CloseHandle(h); } -- cgit v1.2.3 From 2687f21df558206a9db1f8fce87fbb87e4eb1baa Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sun, 10 Jun 2007 08:20:16 +0000 Subject: drop some debugging leftovers svn-id: r27287 --- backends/platform/wince/wince-sdl.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 4a61b3eacb..0ee6f6e60d 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -314,9 +314,6 @@ void OSystem_WINCE3::initScreenInfos() { _isOzone = 0; SDL_Rect **r; r = SDL_ListModes(NULL, 0); - printf("listmodes: %dx%d\n", r[0]->w, r[0]->h); - //_platformScreenWidth = GetSystemMetrics(SM_CXSCREEN); - //_platformScreenHeight = GetSystemMetrics(SM_CYSCREEN); _platformScreenWidth = r[0]->w; _platformScreenHeight = r[0]->h; } -- cgit v1.2.3 From 6e399af2e56da0e73a075e91696729803cdb6e1e Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sun, 10 Jun 2007 08:23:12 +0000 Subject: re-add flac support which I had totally forgotten about. Builders must update to the newest libpack. Also enable parallaction by default svn-id: r27289 --- backends/platform/wince/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index cc9e2951be..626f24de95 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -20,7 +20,7 @@ DISABLE_LURE = 1 #DISABLE_SWORD1 = 1 #DISABLE_SWORD2 = 1 #DISABLE_TOUCHE = 1 -DISABLE_PARALLACTION = 1 +#DISABLE_PARALLACTION = 1 DISABLE_CRUISE = 1 #DISABLE_HQ_SCALERS = 1 @@ -38,7 +38,7 @@ ECHO = echo -n CAT = cat AS = arm-wince-pe-as -DEFINES := -D_WIN32_WCE=300 -DARM -D__ARM__ -D_ARM_ -DUNICODE -DSCUMM_NEED_ALIGNMENT -DFPM_DEFAULT -DUSE_MAD -DNONSTANDARD_PORT -DUSE_TREMOR -DUSE_VORBIS -DUSE_MPEG2 -DWIN32 -DUSE_ZLIB +DEFINES := -D_WIN32_WCE=300 -DARM -D__ARM__ -D_ARM_ -DUNICODE -DSCUMM_NEED_ALIGNMENT -DFPM_DEFAULT -DUSE_MAD -DNONSTANDARD_PORT -DUSE_TREMOR -DUSE_VORBIS -DUSE_MPEG2 -DWIN32 -DUSE_ZLIB -DUSE_FLAC DEFINES += -D__stdcall= -Dcdecl= -D__cdecl__= -D__cdecl= -Wno-multichar #DEFINES += -DDEBUG -DUSE_WINDBG -g @@ -49,7 +49,7 @@ CFLAGS := -O3 -march=armv4 -mtune=xscale CXXFLAGS := $(CFLAGS) LDFLAGS := -Llibs/lib -L$(wince_gcc_root)/lib -LIBS := -lSDL -lzlib -lmad -lmpeg2 -ltremorce --entry WinMainCRTStartup +LIBS := -lSDL -lzlib -lmad -lmpeg2 -ltremorce -lFLAC --entry WinMainCRTStartup TARGET = scummvm.exe OBJS := @@ -71,7 +71,6 @@ include $(srcdir)/Makefile.common all: dist dist: $(TARGET) -# bzip2 -fvk $(TARGET) $(STRIP) $(TARGET) PocketSCUMM.o: -- cgit v1.2.3 From ef4cfc38d40c9f233063b35bd36d879774f8db32 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Sun, 10 Jun 2007 12:11:36 +0000 Subject: update the port readme (USE broom WITH cobwebs) svn-id: r27307 --- backends/platform/wince/README-WinCE.txt | 467 +++++++++++++++++++------------ 1 file changed, 285 insertions(+), 182 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt index b1fc585e22..fd67cdc551 100644 --- a/backends/platform/wince/README-WinCE.txt +++ b/backends/platform/wince/README-WinCE.txt @@ -1,12 +1,34 @@ ScummVM Windows CE FAQ -Last updated: 2006-06-20 -Release version: 0.9.0 +Last updated: $Date$ +Release version: 0.10.0 +------------------------------------------------------------------------ + +New in this version +------------------- + +0.10.0: +Major improvements have taken place in this version, mostly for behind- +the-scenes stuff. First, we have migrated to GCC for building the Windows +CE port. This helped take care of some obscure compiler bugs which where +in there for quite a long time. It has also lead to efficient code +generation due to GCC's advanced capabilities and consequently increased +runtime speed. The second important change was the overhaul of the SDL +library port. The benefits from this are twofold: The real-time code paths +have been optimized, including contributed ARM assembly code for critical +functions. Further, the screen display and mouse/keyboard input code has +been partially rewritten to allow for increased compatibility across all +devices. +Due to the update of keyboard handling code, the keycodes have changed +slightly. Running this version of ScummVM will overwrite your key bindings +with the new defaults. See the section on how to play on Smartphones below +for the new default keybindings. + ------------------------------------------------------------------------ This document is intended to give common answers to specific ScummVM issues on Windows CE, in 3 sections * "General questions" : browse this section to get started and see - general issues + general issues * "Game specific questions" : lists some common game specific issues * "Support and links" : how to get support if you're still puzzled @@ -26,43 +48,40 @@ Pocket PC 2000, Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone Support for old ARM architectures (Handheld PCs, Palm Size PCs) and other CPUs (MIPS, SH3) is discontinued. Feel free to generate builds for these -architectures and contact me to include them on ScummVM website. +architectures and contact us to include them on ScummVM website. -Full support ------------- +Games supported +--------------- -* ARM based Windows Mobile handhelds with QVGA resolution (240x320) slower - than 200 MHz (PocketPC platform) +The Windows CE port of ScummVM supports all available game engines. -All AdLib first generation games should work properly on these devices. -Sam'n'Max will be a bit too slow to be played with music. -More recent games (The Dig, Curse of Monkey Island, Broken Sword series) -and all VGA games will probably be too slow to be enjoyable. +ScummVM distinguishes devices based on two characteristics: Type and resolution. +Supported types of devices are Smartphones (usually no stylus) and Pocket PCs +(stylus). The supported resolutions are 176x220 (Smartphone), 240x240 (QVGA +square), 240x320 (QVGA), 320x240 (QVGA landscape), 480x640 (VGA). Devices with +resolutions larger than VGA should also be supported with automatic screen +centering. -* ARM based Windows Mobile handhelds with QVGA resolution (240x320) faster - than 200 MHz +* Low resolution Smartphones (176x220) -All games should work properly on these devices. -VGA games will be resized and the font gets hard to read in this case (be sure -to install the talkie version the game :p) +Support is only provided for all 320x200 or 320x240 games. The font can get +hard to read (you should prefer talkie games, or wear glasses :-P) +Games with 640x480 resolution such as COMI or BSWORD cannot be scaled down +to this resolution and still be playable. -* ARM based Windows Mobile handhelds with VGA resolution (640x480) +* QVGA square devices (240x240) -All non VGA games should work properly on these devices. They can be resized -with different scalers (not all desktop scalers are supported due to Embedded -Visual C++ very personal interpretation of the C++ standard). -VGA games will be displayed in true VGA mode, which can takes a lot of memory -and slow down the game (especially during scrollings). It will get better in -the next releases or with faster devices. +Only 320x200 or 320x240 games are supported due to lack of downsampling scaler. -* Windows Mobile Smartphones (176x220 or 240x320) +* QVGA Pocket PCs or Smartphones (240x320 or 320x240) -Early support is provided for all 320x200 games. -The font can get hard to read (you should prefer talkie games, or wear glasses) +All games are playable in these devices. Landscape devices may not be able to +rotate the screen around. -* Support for Windows Mobile 5 is experimental but should work. "Flipping" devices -such as the HTC Wizard or HTC Universal work only in portait (closed) mode for the -moment. +* VGA (640x480) or higher Pocket PCs + +All non VGA games should work properly on these devices. They can be resized +with different scalers. VGA games will be displayed in true VGA mode. Partial / Discontinued support ------------------------------ @@ -106,13 +125,12 @@ transform anyway :) How do I install ScummVM for Windows CE ? ----------------------------------------- -If the current release includes a .EXE installer, ScummVM for Windows CE -will be installed without hassle. -Otherwise, you'll unzip the release on your desktop computer, and copy -all files on your device. +Simple! Unpack the release package on your desktop pc, then copy all its contents +to a folder on your device. Typically, you should at least have scummvm.exe, +modern.ini and modern.zip in the same directory. Finally, upload your beloved games +and fire it up :-) -If you're using a Pocket PC 2000 operating system, be sure to have GAPI -installed - it's available on Microsoft website http://www.microsoft.com +Some devices (like Pocket PC 2000) require GAPI to be present. How do I install a game ? ------------------------- @@ -141,13 +159,13 @@ How do I run a game ? If it's the first time you're running ScummVM for Windows CE, have installed or removed games, you need to rescan your game directory. - * Select Scan, tap the root directory of your games, and tap "Yes" to begin + * Select Add Game, tap the root directory of your games, and tap "Yes" to begin an automatic scan of the installed games. Usually all games are detected and you can start playing right away. If your game is not detected check its directory name and your data files. -To play a game, tap on its name then tap the "Play" button or double tap its +To play a game, tap on its name then tap the "Start" button or double tap its name. How do I play a game on a Pocket PC or Handheld PC device ? @@ -158,183 +176,246 @@ The stylus is your mouse cursor, and a tap is a left mouse button click. As the Pocket PC lacks some keys, a toolbar is displayed at the bottom of the screen to make the most common functions just a tap away * The disk icon opens ScummVM options menu to save your game, or change your - current game settings. + current game settings (depends on the game) * The movie icon skips a non interactive sequence, the current dialog or - behaves like the ESC key on a regular keyboard + behaves like the ESC key on a regular keyboard (depends on the game) * The sound icon turns all sound effects and music off and on - * The key icon allow you to map a key action to a device button. + * The key icon allow you to map a key action to a device button * The monkey icon switches between portrait, landscape and inverse landscape - mode. + mode (depends on the display drivers) You can map additional actions on your device hardware buttons using the "Options" / "Key" menu in the ScummVM options menu. To associate an action to a key, tap the action, then the "Map" button and press the hardware key. -The following actions are available - * Pause : pause the game - * Save : open ScummVM option menu - * Quit : quit ScummVM (without saving, be careful when using it) - * Skip : skip a non interactive sequence, the current dialog or - behaves like the ESC key on a regular keyboard - * Hide : hide or display the toolbar - - YOU MUST HIDE THE TOOLBAR TO SCROLL THROUGH THE INVENTORY IN ZAK - - * Keyboard : hide or display the virtual keyboard - - YOU MUST DISPLAY THE KEYBOARD TO FIGHT IN INDIANA JONES 3 - - * Sound : turns all sound effects and music off and on - * Right click : acts as a right mouse button click - - YOU MUST MAP THIS ACTION TO PLAY THE FOLLOWING GAMES - - - SAM & MAX, BENEATH A STEEL SKY, CURSE OF MONKEY ISLAND - - * Cursor : hide or display the mouse cursor - * Free look : go in or out of free-look mode. In this mode, you can tap - the screen to look for interesting locations without walking. - * Zoom up : magnify the upper part of the screen for 640x480 games - rendered on a 320x240 device. - * Zoom down : magnify the lower part of the screen for 640x480 games - rendered on a 320x240 device. - * FT Cheat : win a Full Throttle action sequence - * Bind keys : map a key action to a device button - * Up,Down,Left: - Right, : emulate mouse/stylus behavior - Left Click : +The following actions are available : + + * Pause : pause the game + * Save : open ScummVM option menu + * Quit : quit ScummVM (without saving, be careful when using it) + * Skip : skip a non interactive sequence, the current dialog or + behaves like the ESC key on a regular keyboard + * Hide : hide or display the toolbar + * Keyboard : hide or display the virtual keyboard + * Sound : turns all sound effects and music off and on + * Right click : acts as a right mouse button click + * Cursor : hide or display the mouse cursor + * Free look : go in or out of free-look mode. In this mode, you can tap + the screen to look for interesting locations without walking. + * Zoom up : magnify the upper part of the screen for 640x480 games + rendered on a QVGA device. + * Zoom down : magnify the lower part of the screen for 640x480 games + rendered on a QVGA device. + * Multi Function : this key performs a different function depending on the game + : Full Throttle -> win an action sequence (cheat) + : Fate of Atlantis -> sucker punch (cheat) + : Bargon -> F1 (start the game) + : All AGI games -> bring up the predictive input dialog + * Bind keys : map a key action to a device button + * Up,Down,Left : + Right, : emulate mouse/stylus behavior + Left Click : + +The default key bindings for Pocket PCs are (note that not all keys are mapped): + * Up, Down, Left, Right : (dpad) arrow keys + * Left Click : softkey A If you start a game when a Right click mapping is necessary, ScummVM will ask you to map one of your hardware key to this action before playing. Just press the key you want to map if you see this message. -How do I hide the toolbar ? ----------------------------- +Notes: +- THE TOOLBAR CAN BE CYCLED BY DOUBLE TAPPING (SEE BELOW) +- YOU MUST HIDE THE TOOLBAR TO SCROLL THROUGH THE INVENTORY IN ZAK +- YOU MUST DISPLAY THE KEYBOARD TO FIGHT IN INDIANA JONES 3 +- YOU MUST MAP THE RIGHT CLICK ACTION TO PLAY SEVERAL GAMES -A shortcut is available to hide the toolbar directly from the game screen from -release 0.8.0. Double tapping the stylus at the top of the screen will switch -between a visible toolbar panel, a virtual keyboard, and an invisible panel. -If any part of the screen is obscured by the toolbar (like the load/save game -dialogs) you can use the invisible panel mode to get to it. For 320x200 games -on QVGA Pocket PCs, when the panel is hidden the game screen is resized to -320x240 for better gaming experience. - -How do I play a game on a Microsoft Smartphone device ? -------------------------------------------------------- - -When playing on a Smartphone, the cursor and mouse buttons are emulated by -a set of default keys : - 4 Move up - 6 Move down - 8 Move left - 2 Move right - Hotkey 1 Left mouse button click - Hotkey 2 Right mouse button click - Return/Action Open the key mapping menu +How do I hide the toolbar ? +--------------------------- -Note that this means that the input will be "inversed" on a 240x320 (Windows -Mobile 2005) Smartphone. You'll have to remap the keys. +Note: THIS IS A VERY USEFUL AND SOMETIMES NECESSARY SHORTCUT -A few options are also emulated by a set of default keys : +Double tapping the stylus at the top of the screen will switch between a +visible toolbar panel, a virtual keyboard, and hiding panel. If any part of +the screen is obscured by the toolbar (like the load/save game dialogs) you can +use the invisible panel mode to get to it. For 320x200 games on QVGA Pocket +PCs, when the panel is hidden the game screen is resized to 320x240 (aspect +ratio correction) for better gaming experience. - 0 Options menu - Back Skip - # Zone option +How do I play a game on a Smartphone device ? +--------------------------------------------- +On non-stylus devices, the mouse cursor is emulated via a set of keys. The cursor will move faster if you keep the key down. You can tweak this behaviour in the configuration file described below. +Here is +the list of available actions for Smartphones: + + * Up,Down,Left : + Right, : emulate mouse/stylus behavior + Left Click : + Right Click : + * Save : open ScummVM option menu + * Skip : skip a non interactive sequence, the current dialog or + behaves like the ESC key on a regular keyboard + * Zone : switch between the 3 different mouse zones + * Multi Function : this key performs a different function depending on the game + : Full Throttle -> win an action sequence (cheat) + : Fate of Atlantis -> sucker punch (cheat) + : Bargon -> F1 (start the game) + : All AGI games -> bring up the predictive input dialog + * Bind keys : map a key action to a device button + * Keyboard : hide or display the virtual keyboard + * Rotate : rotate the screen (also rotates dpad keys) + * Quit : quit ScummVM (without saving, be careful when using it) + The "Zone" key is a *very* valuable addition allowing you to jump quickly between three screen zones : the game zone, the verbs zone and the inventory zone. When you switch to a zone the cursor will be reset to its former location in this zone. -There are two more actions available for mapping: - - Keyboard: Shows hides a virtual keyboard which can be use whenever text - input is required in a game, or a dialog. - - Rotate : Flips the screen orientation between normal and inverse landscape. +The default key map for these actions is: -You can change the keys mapping during the game in the key mapping menu. + * Up, Down, Left, Right : (dpad) arrow keys + * Left Click : softkey A + * Right Click : softkey B + * Save : call/talk + * Skip : back + * Zone : 9 + * Multi Function : 8 + * Bind keys : end call + * Keyboard : (dpad) enter + * Rotate : 5 + * Quit : 0 -Note that you'll need to push the Action button (center of the pad) to quit -a Simon game. +You can change the key mapping at any time by bringing up the key mapping menu +(Bind keys action). -How can I apply a ScummVM command line option (f.e. to change the language) ---------------------------------------------------------------------------- +How do I tweak the configuration of ScummVM ? +--------------------------------------------- See the section regarding the configuration file (scummvm.ini) in ScummVM README file - the same keywords apply. Some parameters are specific to this port : -game specific section (f.e. [monkey2]) - performance options - -high_sample_rate bool Desktop quality (22 kHz) sound output if set. - 11 kHz otherwise. - The default is 11 kHz. - If you have a fast device, you can set this to - true to enjoy better sound effects and music. -FM_high_quality bool Desktop quality FM synthesis if set. Lower - quality otherwise. The default is low quality. - You can change this if you have a fast device. -sound_thread_priority int Set the priority of the sound thread - (given to SetThreadPriority API) -Smush_force_redraw int Force a Smush frame redraw every X missed - frames. Mainly used for Full Throttle action - sequences. Setting it lower gives more - priority to screen redraws. Setting it higher - gives more priority to stylus/keyboard input. - The default is 30. - -game specific section (f.e. [monkey2]) - game options - -landscape int 0: Portrait, 1: Landscape, 2: Inverse Landscape +Game specific sections (f.e. [monkey2]) - performance options + + * high_sample_rate bool Desktop quality (22 kHz) sound output if set. + 11 kHz otherwise. The default is 11 kHz. + If you have a fast device, you can set this to + true to enjoy better sound effects and music. + * FM_high_quality bool Desktop quality FM synthesis if set. Lower + quality otherwise. The default is low quality. + You can change this if you have a fast device. + * sound_thread_priority int Set the priority of the sound thread (0, 1, 2). + Depending on the release, this is set to 1 + internally (above normal). If you get sound + stuttering try setting this to a higher value. + Set to 0 if your device is fast enough or if + you prefer better audio/video synchronization. + * Smush_force_redraw int Force a Smush frame redraw every X missed + frames. Mainly used for Full Throttle action + sequences. Setting it lower gives more + priority to screen redraws. Setting it higher + gives more priority to stylus/keyboard input. + The default is 30. + +Game specific sections (f.e. [monkey2]) - game options + + * landscape int 0: Portrait, 1: Landscape, 2: Inverse Landscape + You can also use this in the [scummvm] section + in QVGA Pocket PCs to display the launcher in + landscape, for example, at startup. [scummvm] section - keys definition You usually do not wish to modify these values directly, as they are set by the option dialog, and are only given here for reference. -action_mapping_version int Mapping version linked to ScummVM version. -action_mapping string Hex codes describing the key associated to - each different action. + * action_mapping_version int Mapping version linked to ScummVM version. + * action_mapping string Hex codes describing the key associated to + each different action. + * debuglevel int Debug Level 1 is used by the WinCE port + for reporting diagnostic output in the + scummvm_stdout.txt and scummvm.stderr.txt + files in the current working directory. [scummvm] section - mouse emulation tuning You can tweak these parameters to customize how the cursor is handled. -repeatTrigger int Number of milliseconds a key must be held to - consider being repeated. + * repeatTrigger int Number of milliseconds a key must be held to + consider being repeated. + * repeatX int Number of key repeat events before changing + horizontal cursor behaviour. + * stepX1 int Horizontal cursor offset value when the key is + not repeated. + * stepX2 int Horizontal cursor offset value when the key is + repeated less than repeatX. + * stepX3 int Horizontal cursor offset value when the key is + repeated more than repeatX. + * repeatY int Number of key repeat events before changing + vertical cursor behaviour. + * stepY1 int Vertical cursor offset value when the key is + not repeated. + * stepY2 int Horizontal cursor offset value when the key is + repeated less than repeatY. + * stepY3 int Vertical cursor offset value when the key is + repeated more than repeatY. -repeatX int Number of key repeat events before changing - horizontal cursor behaviour. -stepX1 int Horizontal cursor offset value when the key is - not repeated. -stepX2 int Horizontal cursor offset value when the key is - repeated less than repeatX. -stepX3 int Horizontal cursor offset value when the key is - repeated more than repeatX. +------------------------------------------------------------------------ +Game specific questions +------------------------------------------------------------------------ +--------------- +-- All Games -- +--------------- -repeatY int Number of key repeat events before changing - vertical cursor behaviour. -stepY1 int Vertical cursor offset value when the key is - not repeated. -stepY2 int Horizontal cursor offset value when the key is - repeated less than repeatY. -stepY3 int Vertical cursor offset value when the key is - repeated more than repeatY. +I need to press a special key +----------------------------- -Game xxx is too slow on my device ---------------------------------- +Bring up the virtual keyboard. On Smartphones take a look at the Keyboard action above. +On Pocket PCs it's easier to double-tap at the top of the screen. -Even if it shouldn't happen (this port is running almost correctly on a -80 / 120 MHz first generation SPV phone), you can try some things : +The panel is obscuring the playfield area +----------------------------------------- - * Disable sound in the engine (see the global README) - * Play with the priority of the sound thread (change the - sound_thread_priority value - the higher the lower priority) +Double tap at the top of the screen to hide it. As an aside, the aspect ratio +correction scaler will kick in if the game/device combo is appropriate. -And don't forget to report your progress in the ScummVM forum ! +How do I name my save games ? +----------------------------- ------------------------------------------------------------------------- -Game specific questions ------------------------------------------------------------------------- +Use the virtual keyboard (Keyboard action). + +ScummVM is stuck for some reason +-------------------------------- + +Bind and use the quit action to quit. + +I cannot rotate the screen to landscape/inverse landscape +--------------------------------------------------------- + +Depending on the video driver, ScummVM may opt to not provide such functionality. +In general, when ScummVM starts in normal "portrait" orientation, the device driver +reports better display characteristics and you should consider launching from portrait. + +I'm having problems. Is there diagnostic output available ? +----------------------------------------------------------- + +Insert a line in the [scummvm] section of scummvm.ini with the following: +debuglevel=1 +Run ScummVM. When it closes scummvm_stdout.txt and scummvm_stderr.txt files will be +available at the program directory (see section above). + +ScummVM crashes and returns to desktop +-------------------------------------- + +File a bug report including diagnostic output (see previous question). -------------------------- --- Beneath a Steel Sky -- +-- Beneath a Steel Sky -- -------------------------- Introduction movie is too slow or never ends ... @@ -374,11 +455,10 @@ to lower these requirements. Sound synchronization is lost in Curse of Monkey Island videos -------------------------------------------------------------- -This is a port bug which is very noticeable in VGA mode. It can probably be -fixed with a faster blitting routine or a faster device. +Use a faster device :-( -------------------- --- Full Throttle -- +-- Full Throttle -- -------------------- I'm experiencing random crashes ... @@ -415,7 +495,7 @@ Use the skip toolbar icon (see the General Questions section). ------------------- -- Simon 1 and 2 -- --------------------- +------------------- How can I save or quit in Simon ? -------------------------------- @@ -444,33 +524,56 @@ to lower these requirements. -------------------- How can I scroll through my inventory items in Zak Mc Kracken ? -------------------------------------------------------------- +--------------------------------------------------------------- You need to map the hide toolbar button (see the General Questions section) or double tap at the top of the screen (from 0.8.0+) --------------------- --- Broken Sword 2 -- --------------------- +------------------------ +-- Broken Sword 1 & 2 -- +------------------------ -I've installed the movies pack but they are not playing -------------------------------------------------------- +I've installed the movies pack but they are not playing/they are slow +--------------------------------------------------------------------- MPEG 2 playback takes too much memory in the current release, and may prevent -movies from playing in VGA mode. This may get better in the next releases. +movies from playing in VGA mode. Consider changing to the DXA cutscene pack +which is many times faster. ----------------- +--------------- -- Gobliiins -- ----------------- +--------------- -Cursor is grabled after loading a game --------------------------------------- +How do I enter a code ? +----------------------- + +Use the virtual keyboard. + +------------------- +-- Bargon Attack -- +------------------- + +How do I start the game (F1 : Game, F2 : Demo) +---------------------------------------------- + +Use the Multi Function action. + +---------------------- +-- AGI engine games -- +---------------------- -Due to a bug in 0.8.0, you'll have to tap the stylus somewhere on the game -screen between 2 letters when entering a code. Otherwise the cursor will get -garbled. +Do you expect me to play these games on keyboard less devices ? +--------------------------------------------------------------- -This has not been retested for 0.8.1 but should be fixed. +Sure we do :-) +If you want to get some mileage on your stylus you can use the virtual keyboard. +There is a very useful alternative though, the AGI engine's predictive input dialog. +It requires a dictionary to be present. Just tap on the command line or use the +Multi Function action to bring it up. On Smartphones, when the dialog is shown +all key mapping is disabled temporarily (including mouse emulation). Input is +performed either by pressing the phone's numeric keypad keys and dpad enter to +close the dialog, or by navigating the buttons using the dpad arrows and pressing +with dpad enter. Check the main Readme file for more information on this. ------------------------------------------------------------------------ Support @@ -479,14 +582,14 @@ Support Help, I've read everything and ... ----------------------------------- -Luckily, as there is a huge variety of Windows Mobile devices, a specific forum +Luckily, as there is a huge variety of Windows CE devices, a specific forum is dedicated to this ScummVM port. You can ask your question on the WinCE ScummVM forum available at http://forums.scummvm.org/viewforum.php?f=6 Some older questions and very nice tutorials are still available on the historic PocketMatrix forum at http://www.pocketmatrix.com/forums/viewforum.php?f=20 -where the community is always glad to help and have dealt with all my bugs for more -than three years now :) +where the community is always glad to help and have dealt with all the bugs for +many years now :) I think I found a bug, ScummVM crashes in ... --------------------------------------------- -- cgit v1.2.3 From e6383eb8c3383a9342f21d452d65b940548827ac Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 10 Jun 2007 18:15:27 +0000 Subject: Added reference to COPYRIGHT file in various places svn-id: r27325 --- backends/platform/gp2x/build/bundle.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'backends/platform') diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh index b5e3161c9b..93ae45f0e3 100644 --- a/backends/platform/gp2x/build/bundle.sh +++ b/backends/platform/gp2x/build/bundle.sh @@ -23,6 +23,7 @@ cp ../../../../scummvm.gp2x ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../AUTHORS ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../README ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../COPYING ./scummvm-gp2x-`date '+%Y-%m-%d'`/ +cp ../../../../COPYRIGHT ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../NEWS ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../gui/themes/modern.ini ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../gui/themes/modern.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/ -- cgit v1.2.3 From a896ec3aad99f0f4ee930b808dc569de5d53c7f2 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sun, 10 Jun 2007 19:43:48 +0000 Subject: Updated makefile scripts with correct documents. svn-id: r27329 --- backends/platform/symbian/README | 38 +++++++++++++++------- .../symbian/S60/scummvm-CVS-SymbianS60v1.pkg | 10 ++++++ .../symbian/S60/scummvm-CVS-SymbianS60v2.pkg | 11 ++++++- .../platform/symbian/S60v3/ScummVM_S60v3.mmp.in | 2 +- .../symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg | 10 ++++++ .../symbian/S80/scummvm-CVS-SymbianS80.pkg | 10 +++++- .../symbian/S90/scummvm-CVS-SymbianS90.pkg | 9 +++++ .../symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg | 9 +++++ .../symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg | 2 +- backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in | 2 +- .../symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg | 9 +++++ backends/platform/symbian/src/SymbianOS.cpp | 9 +++-- 12 files changed, 102 insertions(+), 19 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README index 3a4b6142ad..cbc6a12494 100644 --- a/backends/platform/symbian/README +++ b/backends/platform/symbian/README @@ -2,9 +2,9 @@ ScummVM - ScummVM ported to EPOC/SymbianOS Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - Copyright (C) 2005 ScummVM Team + Copyright (C) 2007 Lars 'AnotherGuest' Persson + Copyright (C) 2007 Jurgen 'SumthinWicked' Braam + Copyright (C) 2007 ScummVM Team $Id$ @@ -13,19 +13,35 @@ About ScummVM -------------- The original ports (uptil 0.7.1) were made by Andreas Karlsson and Lars Persson. The main transition to 0.8.0CVS and all relevant changes were done by Jurgen Braam. - Jurgen and Lars are currently working together to finalize the transfer to CVS. - + Jurgen and Lars have successfully transfered all needed changes into CVS, with additional helpful tools for Symbian OS + + Release version: 0.10.0 + * This version is only supported on Symbian OS 9 devices due to compiler constraints for older devices. (That means UIQ3 and S60V3 devices) + * Updated to SDL version 1.2.11 (previous version used was 1.2.8) + * Information about S60 devices can be found here http://wiki.scummvm.org/index.php/SymbianOS_S60 + * Information about UIQ devices can be found here http://wiki.scummvm.org/index.php/SymbianOS_UIQ + * Best source of general information is the ScummVM forum, http://forums.scummvm.org + * SVN builds (not frequently updated) can be found at http://anotherguest.k0.se + + +Games supported +--------------- + The Symbian port of ScumVM supports all but Sword1 & 2 games. Some games might not run properly due to screenresolution or memory constraints. + -Nescessary components ---------------------- +Building ScummVM +--------------------- + + Nescessary components + --------------------- Building ScummVM yourself using the UIQ 2.1/Nokia S60 SDK/Nokia S80 SDK/Nokia S90 SDK framework is not an easy task! Lets just say the framework needs quite some time to set up and takes a while to get used to. If you choose to continue you will need the following items: - - UIQ 2.1 SDK (To build for UIQ devices); + - UIQ 2.1 SDK (To build for UIQ2 devices); http://www.symbian.com/developer/sdks_uiq.asp - - Nokia S60 1st, 2nd edition (3rd edition has not been tested) SDK (To build for S60 devices) + - Nokia S60 1st, 2nd edition,3rd edition SDK (To build for S60 devices) - Nokia S80 SDK (To build for S80 devices) @@ -58,8 +74,8 @@ Nescessary components http://libmpeg2.sourceforge.net/ -Building ScummVM ------------------ + Compiling ScummVM + ----------------- ECompXL: this is a tool that will compress your executable with GZIP and glue it to a predefined loader app. The app will uncompress your application at runtime and run it without you even knowing it. A really interesting byproduct diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg index 8c001e2927..9e664961c4 100644 --- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg +++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg @@ -39,6 +39,16 @@ "\epoc32\release\armi\urel\ScummVM.aif"-"!:\system\apps\ScummVM\ScummVM.aif" "\epoc32\release\armi\urel\ScummVM.rsc"-"!:\system\apps\ScummVM\ScummVM.rsc" +"..\..\..\..\dists\pred.dic"-"c:\system\apps\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\system\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\system\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\system\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg index b2eb086488..1518dc9517 100644 --- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg +++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg @@ -6,7 +6,7 @@ ;&EN ; UID is the app's UID -#{"ScummVM S60v2"},(0x101f9b57),0,80,3 +#{"ScummVM S60v2"},(0x101f9b57),0,100,0 ; Platform type (0x101F6F88), 0, 0, 0, {"Series60ProductID"} @@ -16,6 +16,15 @@ "\epoc32\release\armi\urel\ScummVM.exe"-"!:\system\apps\ScummVM\ScummVM.exe" "\epoc32\data\z\system\apps\ScummVM\ScummVM.aif"-"!:\system\apps\ScummVM\ScummVM.aif" "\epoc32\data\z\system\apps\ScummVM\ScummVM.rsc"-"!:\system\apps\ScummVM\ScummVM.rsc" +"..\..\..\..\dists\pred.dic"-"c:\system\apps\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\system\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\system\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\system\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in index 4ec5c01e71..4ba5d43bcd 100644 --- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in +++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in @@ -62,7 +62,7 @@ SOURCE c24 ScummxLarge.bmp SOURCE 8 ScummxLargeMask.bmp END -EPOCSTACKSIZE 0x0000F000 +EPOCSTACKSIZE 80000 EPOCHEAPSIZE 2048000 32000000 ALWAYS_BUILD_AS_ARM MACRO S60 diff --git a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg index 73cbad17cd..2f4f9469bc 100644 --- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg +++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg @@ -48,6 +48,16 @@ "\epoc32\data\Z\resource\APPS\scummvm.MIF"- "!:\resource\apps\scummvm.MIF" "\epoc32\data\z\private\10003a3f\apps\scummvm_reg.rsc"-"!:\private\10003a3f\import\apps\scummvm_reg.rsc" +"..\..\..\..\dists\pred.dic"-"c:\data\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\resource\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\resource\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\resource\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\resource\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\resource\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"c:\data\scummvm\scummvm.ini",FILENULL ""-"c:\data\scummvm\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg index 6daf9081c7..8fc4c60217 100644 --- a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg +++ b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg @@ -38,7 +38,15 @@ "\epoc32\release\armi\urel\ScummVM.exe"-"!:\system\apps\ScummVM\ScummVM.exe" "\epoc32\data\z\system\apps\ScummVM\ScummVM.aif"-"!:\system\apps\ScummVM\ScummVM.aif" "\epoc32\data\z\system\apps\ScummVM\ScummVM.rsc"-"!:\system\apps\ScummVM\ScummVM.rsc" - +"..\..\..\..\dists\pred.dic"-"c:\system\apps\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\system\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\system\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\system\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg index 09ed915e35..70238c9593 100644 --- a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg +++ b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg @@ -38,6 +38,15 @@ "\epoc32\release\armi\urel\ScummVM.exe"-"!:\system\apps\ScummVM\ScummVM.exe" "\epoc32\data\z\system\apps\ScummVM\ScummVM.aif"-"!:\system\apps\ScummVM\ScummVM.aif" "\epoc32\data\z\system\apps\ScummVM\ScummVM.rsc"-"!:\system\apps\ScummVM\ScummVM.rsc" +"..\..\..\..\dists\pred.dic"-"c:\system\apps\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\system\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\system\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\system\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg index f8aca7fd52..86f0028e02 100644 --- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg +++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg @@ -37,6 +37,15 @@ "\epoc32\release\armi\urel\ScummVM.app"-"!:\system\apps\ScummVM\ScummVM.app" "\epoc32\data\z\system\apps\ScummVM\ScummVM.aif"-"!:\system\apps\ScummVM\ScummVM.aif" "\epoc32\data\z\system\apps\ScummVM\ScummVM.rsc"-"!:\system\apps\ScummVM\ScummVM.rsc" +"..\..\..\..\dists\pred.dic"-"c:\system\apps\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\system\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\system\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\system\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg index a07149b702..e0d36c477a 100644 --- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg +++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg @@ -6,7 +6,7 @@ ;&EN ; UID is the app's UID -#{"ScummVM SE"},(0x101f9b57),0,80,3 +#{"ScummVM SE"},(0x101f9b57),0,100,0 ; Platform type (0x101F617B), 2, 0, 0, {"UIQ20ProductID"} diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in index ce5bb22867..e6ba0ea743 100644 --- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in +++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in @@ -46,7 +46,7 @@ TARGETPATH \Resource\Apps LANG SC END -EPOCSTACKSIZE 0x0000FFFF +EPOCSTACKSIZE 80000 EPOCHEAPSIZE 3000000 32000000 START BITMAP ScummVM.mbm diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg index 1e529127f9..402852c2f4 100644 --- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg +++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg @@ -46,6 +46,15 @@ "\epoc32\Data\Z\resource\apps\scummvm_loc.rsc"- "!:\resource\apps\scummvm_loc.rsc" "\epoc32\data\Z\resource\APPS\scummvm.MBM"- "!:\resource\apps\scummvm.MBM" "\epoc32\data\z\private\10003a3f\apps\scummvm_reg.rsc"-"!:\private\10003a3f\import\apps\scummvm_reg.rsc" +"..\..\..\..\dists\pred.dic"-"c:\shared\scummvm\pred.dic" + +; Scummvm Documentation +"..\..\..\..\COPYRIGHT"-"!:\resource\apps\scummvm\COPYRIGHT", FT, TC +"..\..\..\..\COPYING"-"!:\resource\apps\scummvm\COPYING", FT, TC +"..\README"-"!:\system\apps\scummvm\SYMBIAN_README", FT, TC +"..\..\..\..\AUTHORS"-"!:\resource\apps\scummvm\AUTHORS" +"..\..\..\..\README"-"!:\resource\apps\scummvm\README" +"..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS" ; Config/log files: 'empty' will automagically be removed on uninstall ""-"c:\shared\scummvm\scummvm.ini",FILENULL diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 0bb67c97b9..8da3207dff 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -106,6 +106,10 @@ OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0) { } void OSystem_SDL_Symbian::initBackend() { + char predfile[256]; + strcpy(predfile, Symbian::GetExecutablePath()); + strcat(predfile, "pred.dic"); + ConfMan.set("predictive_dictionary", predfile); ConfMan.setBool("FM_high_quality", false); #if !defined(S60) || defined(S60V3) // S60 has low quality as default ConfMan.setBool("FM_medium_quality", true); @@ -145,7 +149,7 @@ bool OSystem_SDL_Symbian::setGraphicsMode(const char * /*name*/) { return OSystem_SDL::setGraphicsMode(getDefaultGraphicsMode()); } -void OSystem_SDL_Symbian::quitWithErrorMsg(const char *msg) { +void OSystem_SDL_Symbian::quitWithErrorMsg(const char * /*aMsg*/) { CEikonEnv::Static()->AlertWin(_L("quitWithErrorMsg()")) ; @@ -433,7 +437,7 @@ struct TSymbianFileEntry { FILE* symbian_fopen(const char* name, const char* mode) { TSymbianFileEntry* fileEntry = new TSymbianFileEntry; - + if (fileEntry != NULL) { TInt modeLen = strlen(mode); @@ -480,7 +484,6 @@ FILE* symbian_fopen(const char* name, const char* mode) { break; } } - return (FILE*) fileEntry; } -- cgit v1.2.3 From d7412b65f4926306857539a4841b13e46fe93321 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sun, 10 Jun 2007 19:50:02 +0000 Subject: Added default signing keys for Symbian OS 9. Password is scummvm svn-id: r27330 --- backends/platform/symbian/res/scummvm.cer | 21 +++++++++++++++++++++ backends/platform/symbian/res/scummvm.key | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 backends/platform/symbian/res/scummvm.cer create mode 100644 backends/platform/symbian/res/scummvm.key (limited to 'backends/platform') diff --git a/backends/platform/symbian/res/scummvm.cer b/backends/platform/symbian/res/scummvm.cer new file mode 100644 index 0000000000..70b765e6b4 --- /dev/null +++ b/backends/platform/symbian/res/scummvm.cer @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDXTCCAxqgAwIBAgIBADALBgcqhkjOOAQDBQAwgZIxEDAOBgNVBAoTB1NjdW1t +Vk0xfjB8BgNVBAMTdVNjdW1tVk0gUzYwdjM3OThiOTk0MDg2OTFhZThlZWM2N2Zl +NGUxYmZjOTQ1YTI0YjRmYjZmMTlmMGJiNzE2N2FjYWEwYzBlNjc0OTM3MmEyY2Qw +YjNiMmY5MWRmMGQyNTQwZjdlYzc0YzllNzhhYWJlMzkwZTAeFw0wNzA2MTAxOTQ4 +NTJaFw0wODA2MDkxOTQ4NTJaMIGSMRAwDgYDVQQKEwdTY3VtbVZNMX4wfAYDVQQD +E3VTY3VtbVZNIFM2MHYzNzk4Yjk5NDA4NjkxYWU4ZWVjNjdmZTRlMWJmYzk0NWEy +NGI0ZmI2ZjE5ZjBiYjcxNjdhY2FhMGMwZTY3NDkzNzJhMmNkMGIzYjJmOTFkZjBk +MjU0MGY3ZWM3NGM5ZTc4YWFiZTM5MGUwggG3MIIBKwYHKoZIzjgEATCCAR4CgYEA +ydXBoDldKAiq3DmfGPwReY9qHEMEh4AyuK5N4M7PvCSYUWU6sWp9PQJ1DDXOm54o +k8IicM9/dmNdQVAGah2Oi5wizbaYV3HkFufLQOQdaOFg7uclJKp+4cnPsG8lz4DS +j6o9kRxANZ9vJgE7qxWG5HnEPNm/l0mDbyWbtbAT//sCFQDCZT2JjR+U+o2orfUL +tcojrwdLSQKBgGdx5eoIaGOxIXgP7ttNdL+7qOYMJD2wI93o5eRiLOaTme276pr3 +oYv3VVRZJa6UXD298b705ia/XQqO6KA9QJgPMjJnwD/8ydcZyZqmX6sNpv6dc7AN +y/6BJN6DO0xUc9BTkQr4cYBhfkc1mYTBzxOj7bi4aATBjcCXzDXXyT2bA4GFAAKB +gQCXsapLABnAVfz60pOQt+Kcl3x+/Rz+vXoItLg3O8cVjooi/q0uaaXF/AnO2njb +lLHbQX3zmv/+tvD2PSyFtgNgscyTf/EECqWMK94Lb0/Jw1rvdNO86eWzsW7UzArF +5KjJbUn64+PTSU8m7GTqGN4NFh6yFBk//Z2ljy+Zt0WZBDALBgcqhkjOOAQDBQAD +MAAwLQIUJUCWx57QyGsiPM5w5qvX3ZYF0/kCFQC47QWyrzi4dr2y2iDNWsln7La4 +Qw== +-----END CERTIFICATE----- diff --git a/backends/platform/symbian/res/scummvm.key b/backends/platform/symbian/res/scummvm.key new file mode 100644 index 0000000000..62e3d3858c --- /dev/null +++ b/backends/platform/symbian/res/scummvm.key @@ -0,0 +1,15 @@ +-----BEGIN DSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,AA4358B4EE40C19C + +OyPKZgptp6jQoGEckxKO4fHS9IL72F0rHduv4qguYHdKeyjREgWDN6+/QhI3SQWu +9bch/oyo/mhO6ZcLjOukBVaygYNw8VTnuEUITmPPrLo7Hcrs12y5jr6MCJ1XBho8 +K0eBwJpqEYFlRZcGqLhJVcPbREEZAOY522MsnT4V3Sa2yerK0AWMSXSTjWRPVxlo +RdqB7vdU/zp3FZvV1gXp+aAOb0WoUbZZYo5r4JnHS+6DGHJfWtXucz4VhcrYxLa8 +xNE3WvTvnIyudG1Yc4J5pl0fpS7wBHQHFtqv2ncRWhY49r9RNR6bfMLZULZj8mwo +QRYkUeaAkdEkTiYlVl/KQ1i3Hh1qupaQwxF/WqCtfbvLA6KlzYLllTnGwsRHujid +f97fGt1z8uWGtzDWQzKW3nY0I2psAA/bCYwL88G1aOPEyp4Ql1lkyxRm4Tw7Zu5M +pF09dAgkFVvPH5Bn7o05ZS9ruNhF5K/5QNg3WTVDhZEqkqiXWRGXaEhc6ZfoK/+H +ne1d3+QfKEX8rxAtjX1hVNkNG1ivmIExpa45wUmSE2pOIj31ny0gK1tCv4mdgEDL +elR3M/oAw0BdxBn9LqmDaQ== +-----END DSA PRIVATE KEY----- -- cgit v1.2.3 From d27ceffef186a2f32b5951cf05871cbd002ee893 Mon Sep 17 00:00:00 2001 From: Kostas Nakos Date: Mon, 11 Jun 2007 08:38:33 +0000 Subject: adding compilation pointer svn-id: r27353 --- backends/platform/wince/README-WinCE.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt index fd67cdc551..17371f9c57 100644 --- a/backends/platform/wince/README-WinCE.txt +++ b/backends/platform/wince/README-WinCE.txt @@ -9,7 +9,7 @@ New in this version 0.10.0: Major improvements have taken place in this version, mostly for behind- the-scenes stuff. First, we have migrated to GCC for building the Windows -CE port. This helped take care of some obscure compiler bugs which where +CE port. This helped take care of some obscure compiler bugs which were in there for quite a long time. It has also lead to efficient code generation due to GCC's advanced capabilities and consequently increased runtime speed. The second important change was the overhaul of the SDL @@ -20,8 +20,8 @@ been partially rewritten to allow for increased compatibility across all devices. Due to the update of keyboard handling code, the keycodes have changed slightly. Running this version of ScummVM will overwrite your key bindings -with the new defaults. See the section on how to play on Smartphones below -for the new default keybindings. +with the new defaults. See the section on how to play on Smartphones and +Pocket PCs below for the new default keybindings. ------------------------------------------------------------------------ @@ -81,7 +81,7 @@ rotate the screen around. * VGA (640x480) or higher Pocket PCs All non VGA games should work properly on these devices. They can be resized -with different scalers. VGA games will be displayed in true VGA mode. +with different scalers. Moreover, VGA games will be displayed in true VGA mode. Partial / Discontinued support ------------------------------ @@ -139,7 +139,7 @@ You'll at least need to copy all the data files from your game, in a sub-directory of your game directory. You'll need to put the data files in a directory named after ScummVM game -name (see "Supported Game" section in ScummVM readme) for the games having +name (see "Supported Games" section in ScummVM readme) for the games having "generic" data files (.LFL files). Recent games can be put in any directory. You can compress the multimedia files (sound/video) as described in the @@ -602,6 +602,13 @@ on the second dialog displayed on the "About" menu) in your bug report. If you cannot reproduce this bug on another ScummVM version, you can cross post your bug report on ScummVM forums. +I want to compile my own ScummVM for Windows CE +----------------------------------------------- + +Take a look at: +http://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE + + ------------------------------------------------------------------------ Good Luck and Happy Adventuring! The ScummVM team. -- cgit v1.2.3 From 86f433b3c41500a456dcbf523a0cb51b848966a9 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Mon, 11 Jun 2007 19:30:24 +0000 Subject: Include Kyra.dat and sky.cpt in the sis file. queen.tbl not included due to the size. svn-id: r27364 --- backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg | 4 ++++ backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg | 4 ++++ backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg | 4 ++++ backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg | 5 +++++ backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg | 4 ++++ backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg | 4 ++++ backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg | 4 ++++ backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg | 4 ++++ backends/platform/symbian/src/SymbianOS.cpp | 5 +---- 9 files changed, 34 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg index 9e664961c4..d15f549207 100644 --- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg +++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg @@ -49,6 +49,10 @@ "..\..\..\..\README"-"!:\system\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg index 1518dc9517..5e0c8bfdaa 100644 --- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg +++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg @@ -26,6 +26,10 @@ "..\..\..\..\README"-"!:\system\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg index 2f4f9469bc..12d5b37be2 100644 --- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg +++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg @@ -58,6 +58,10 @@ "..\..\..\..\README"-"!:\resource\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"c:\shared\scummvm\kyra.dat" +"..\sky.cpt"-"c:\shared\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"c:\data\scummvm\scummvm.ini",FILENULL ""-"c:\data\scummvm\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg index 8fc4c60217..db94745b35 100644 --- a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg +++ b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg @@ -47,6 +47,11 @@ "..\..\..\..\AUTHORS"-"!:\system\apps\scummvm\AUTHORS" "..\..\..\..\README"-"!:\system\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" + +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg index 70238c9593..6752bc3813 100644 --- a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg +++ b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg @@ -48,6 +48,10 @@ "..\..\..\..\README"-"!:\system\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg index 86f0028e02..d55d70c823 100644 --- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg +++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg @@ -47,6 +47,10 @@ "..\..\..\..\README"-"!:\system\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\system\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL ""-"!:\system\apps\ScummVM\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg index e0d36c477a..8783f25337 100644 --- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg +++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg @@ -22,6 +22,10 @@ ""-"!:\system\apps\ScummVM\scummvm.stderr.txt",FILENULL ""-"!:\system\apps\ScummVM\sdl.ini",FILENULL +; Common datafiles needed for some games +"..\kyra.dat"-"!:\system\apps\scummvm\kyra.dat" +"..\sky.cpt"-"!:\system\apps\scummvm\sky.cpt" + ; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini. ; It will remove the config file, std***.txt files & dirs on uninstall. diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg index 402852c2f4..f92b013cd7 100644 --- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg +++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg @@ -56,6 +56,10 @@ "..\..\..\..\README"-"!:\resource\apps\scummvm\README" "..\..\..\..\NEWS"-"!:\resource\apps\scummvm\NEWS" +; Common datafiles needed for some games +"..\kyra.dat"-"c:\shared\scummvm\kyra.dat" +"..\sky.cpt"-"c:\shared\scummvm\sky.cpt" + ; Config/log files: 'empty' will automagically be removed on uninstall ""-"c:\shared\scummvm\scummvm.ini",FILENULL ""-"c:\shared\scummvm\scummvm.stdout.txt",FILENULL diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 8da3207dff..c992c97316 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -106,10 +106,7 @@ OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0) { } void OSystem_SDL_Symbian::initBackend() { - char predfile[256]; - strcpy(predfile, Symbian::GetExecutablePath()); - strcat(predfile, "pred.dic"); - ConfMan.set("predictive_dictionary", predfile); + ConfMan.set("extrapath", Symbian::GetExecutablePath()); ConfMan.setBool("FM_high_quality", false); #if !defined(S60) || defined(S60V3) // S60 has low quality as default ConfMan.setBool("FM_medium_quality", true); -- cgit v1.2.3 From 72cfa9d8293aa897a89d577d9844a2a286d8f0e2 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Tue, 12 Jun 2007 07:14:04 +0000 Subject: NDS : Attempt to not buffer overrun VRAM when doing saveGameBackBuffer/restoreGameBackBuffer ported to branch 0.10.0 svn-id: r27374 --- backends/platform/ds/arm9/source/dsmain.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 21602c4f34..644b66671a 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -750,7 +750,7 @@ void displayMode16BitFlipBuffer() { } else if (isCpuScalerEnabled()) { - #define SCALER_PROFILE + //#define SCALER_PROFILE #ifdef SCALER_PROFILE TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1024; @@ -2505,4 +2505,3 @@ int main(void) int main() { DS::main(); } - -- cgit v1.2.3 From 03d82560c76e6dc61b63afc1897bd239f1e8550f Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Fri, 15 Jun 2007 09:04:08 +0000 Subject: DS : * grabRawScreen should work with the scaler enabled * the address given to DC_FlushRange in grabRawScreen was mixing a u16 base address and a u8 stride, skipping every odd line and buffer-overrunning (if I'm not mistaken :) ) svn-id: r27415 --- backends/platform/ds/arm9/source/osystem_ds.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 9ff2c5ba63..35cf81ef4b 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -477,14 +477,17 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { surf->create(DS::getGameWidth(), DS::getGameHeight(), 1); // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing - // TODO: Change this to work with the software scalar (hint: video ram format is different) + + size_t imageStrideInBytes = isCpuScalerEnabled() DS::getGameWidth() ? 512; + size_t imageStrideInWords = imageStrideInBytes / 2; + u16* image = (u16 *) DS::get8BitBackBuffer(); for (int y = 0; y < DS::getGameHeight(); y++) { - DC_FlushRange((image + (y * 512)), DS::getGameWidth()); + DC_FlushRange(image + (y * imageStrideInWords), DS::getGameWidth()); for (int x = 0; x < DS::getGameWidth() >> 1; x++) { - *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = *(image + y * 256 + x); + *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y * imageStrideInWords + x]; } } -- cgit v1.2.3 From f80799cd5be7489fb4ab3fbb7fc55ecac25d1a6d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 15 Jun 2007 21:21:42 +0000 Subject: Fix for bug #1690813: BASS: Crash when changing scalers during intro svn-id: r27435 --- backends/platform/sdl/graphics.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 212eb43585..e0b7de28ab 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -1597,6 +1597,8 @@ void OSystem_SDL::displayMessageOnOSD(const char *msg) { assert (_transactionMode == kTransactionNone); assert(msg); + Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends + uint i; // Lock the OSD surface for drawing -- cgit v1.2.3 From 37021c43a49aaaaa5f1c6866f9dddce961d842d9 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Sat, 16 Jun 2007 10:33:48 +0000 Subject: Fixed arrow keys (hard and emu) svn-id: r27453 --- backends/platform/PalmOS/Src/base_event.cpp | 196 ++++++++++++++++++---------- 1 file changed, 129 insertions(+), 67 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp index d28fd913c0..c2220d56a1 100644 --- a/backends/platform/PalmOS/Src/base_event.cpp +++ b/backends/platform/PalmOS/Src/base_event.cpp @@ -93,73 +93,137 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { sound_handler(); for(;;) { + // check for hardkey repeat for mouse emulation + keyCurrentState = KeyCurrentState(); + // if it was a key pressed, let the keyup event raise - if (_wasKey) { - // check for hardkey repeat for mouse emulation - keyCurrentState = KeyCurrentState(); - - if (!(keyCurrentState & _keyExtraMask)) { - _lastKeyRepeat = 0; - - } else if (getMillis() >= (_keyExtraRepeat + _keyExtraDelay)) { - _keyExtraRepeat = getMillis(); - - if (gVars->arrowKeys) { -/* if HARD_KEY(Up, chrUpArrow) - else if HARD_KEY(Down, chrDownArrow) - else if HARD_KEY(Left, chrLeftArrow) - else if HARD_KEY(Right, chrRightArrow) -*/ - } else { - // button released ? - if (_keyExtraPressed) { - if (_keyExtraPressed & _keyExtra.bitActionA) { - if (!(keyCurrentState & _keyExtra.bitActionA)) { - _keyExtraPressed &= ~_keyExtra.bitActionA; - - event.type = Common::EVENT_LBUTTONUP; - event.mouse.x = _mouseCurState.x; - event.mouse.y = _mouseCurState.y; - return true; - } - } - - if (_keyExtraPressed & _keyExtra.bitActionB) { - if (!(keyCurrentState & _keyExtra.bitActionB)) { - _keyExtraPressed &= ~_keyExtra.bitActionB; - - event.type = Common::EVENT_RBUTTONUP; - event.mouse.x = _mouseCurState.x; - event.mouse.y = _mouseCurState.y; - return true; - } - } + if (_keyExtraPressed) { + if (gVars->arrowKeys) { + if (_keyExtraPressed & _keyExtra.bitLeft) { + if (!(keyCurrentState & _keyExtra.bitLeft)) { + _keyExtraPressed &= ~_keyExtra.bitLeft; + + event.type = Common::EVENT_KEYUP; + event.kbd.keycode = 276; + event.kbd.ascii = event.kbd.keycode; + event.kbd.flags = 0; + return true; + } + } + if (_keyExtraPressed & _keyExtra.bitRight) { + if (!(keyCurrentState & _keyExtra.bitRight)) { + _keyExtraPressed &= ~_keyExtra.bitRight; + + event.type = Common::EVENT_KEYUP; + event.kbd.keycode = 275; + event.kbd.ascii = event.kbd.keycode; + event.kbd.flags = 0; + return true; + } + } + if (_keyExtraPressed & _keyExtra.bitUp) { + if (!(keyCurrentState & _keyExtra.bitUp)) { + _keyExtraPressed &= ~_keyExtra.bitUp; + + event.type = Common::EVENT_KEYUP; + event.kbd.keycode = 273; + event.kbd.ascii = event.kbd.keycode; + event.kbd.flags = 0; + return true; + } + } + if (_keyExtraPressed & _keyExtra.bitDown) { + if (!(keyCurrentState & _keyExtra.bitDown)) { + _keyExtraPressed &= ~_keyExtra.bitDown; + + event.type = Common::EVENT_KEYUP; + event.kbd.keycode = 274; + event.kbd.ascii = event.kbd.keycode; + event.kbd.flags = 0; + return true; } + } + } - Int8 sx = 0; - Int8 sy = 0; - - if (keyCurrentState & _keyExtra.bitUp) - sy = -1; - else if (keyCurrentState & _keyExtra.bitDown) - sy = +1; - - if (keyCurrentState & _keyExtra.bitLeft) - sx = -1; - else if (keyCurrentState & _keyExtra.bitRight) - sx = +1; - - if (sx || sy) { - simulate_mouse(event, sx, sy, &x, &y); - event.type = Common::EVENT_MOUSEMOVE; - event.mouse.x = x; - event.mouse.y = y; - warpMouse(x, y); + if (_keyExtraPressed & _keyExtra.bitActionA) { + if (!(keyCurrentState & _keyExtra.bitActionA)) { + _keyExtraPressed &= ~_keyExtra.bitActionA; - return true; - } + event.type = Common::EVENT_LBUTTONUP; + event.mouse.x = _mouseCurState.x; + event.mouse.y = _mouseCurState.y; + return true; + } + } + + if (_keyExtraPressed & _keyExtra.bitActionB) { + if (!(keyCurrentState & _keyExtra.bitActionB)) { + _keyExtraPressed &= ~_keyExtra.bitActionB; + + event.type = Common::EVENT_RBUTTONUP; + event.mouse.x = _mouseCurState.x; + event.mouse.y = _mouseCurState.y; + return true; } } + + // no more event till up is raised + return false; + } + + if (!(keyCurrentState & _keyExtraMask)) { + _lastKeyRepeat = 0; + + } else if (getMillis() >= (_keyExtraRepeat + _keyExtraDelay)) { + _keyExtraRepeat = getMillis(); + + if (gVars->arrowKeys) { + if (keyCurrentState & _keyExtra.bitLeft) { + _keyExtraPressed |= _keyExtra.bitLeft; + event.kbd.keycode = 276; + + } else if (keyCurrentState & _keyExtra.bitRight) { + _keyExtraPressed |= _keyExtra.bitRight; + event.kbd.keycode = 275; + + } else if (keyCurrentState & _keyExtra.bitUp) { + _keyExtraPressed |= _keyExtra.bitUp; + event.kbd.keycode = 273; + + } else if (keyCurrentState & _keyExtra.bitDown) { + _keyExtraPressed |= _keyExtra.bitDown; + event.kbd.keycode = 274; + } + + event.type = Common::EVENT_KEYDOWN; + event.kbd.ascii = event.kbd.keycode; + event.kbd.flags = 0; + return true; + + } else { + Int8 sx = 0; + Int8 sy = 0; + + if (keyCurrentState & _keyExtra.bitUp) + sy = -1; + else if (keyCurrentState & _keyExtra.bitDown) + sy = +1; + + if (keyCurrentState & _keyExtra.bitLeft) + sx = -1; + else if (keyCurrentState & _keyExtra.bitRight) + sx = +1; + + if (sx || sy) { + simulate_mouse(event, sx, sy, &x, &y); + event.type = Common::EVENT_MOUSEMOVE; + event.mouse.x = x; + event.mouse.y = y; + warpMouse(x, y); + + return true; + } + } } #if defined(COMPILE_OS5) && defined(PALMOS_ARM) @@ -177,9 +241,9 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { k = 273; break; case chrDownArrow: k = 274; break; - case chrLeftArrow: - k = 275; break; case chrRightArrow: + k = 275; break; + case chrLeftArrow: k = 276; break; } @@ -225,9 +289,9 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { k = 273; break; case chrDownArrow: k = 274; break; - case chrLeftArrow: - k = 275; break; case chrRightArrow: + k = 275; break; + case chrLeftArrow: k = 276; break; } @@ -249,13 +313,11 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { ((ev.data.keyDown.chr == vchrAttnStateChanged) || (ev.data.keyDown.chr == vchrAttnUnsnooze))); - // graffiti strokes, auto-off, etc... if (!handled) if (SysHandleEvent(&ev)) continue; - switch(ev.eType) { case penMoveEvent: get_coordinates(&ev, x, y); -- cgit v1.2.3 From 6e9200f73944ac5ad56efa40201375dc508b0bcc Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Sat, 16 Jun 2007 10:34:48 +0000 Subject: Fixed compilation svn-id: r27454 --- backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp index 3955bd39d5..641d646bb2 100755 --- a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp +++ b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp @@ -28,7 +28,8 @@ #include "formUtil.h" #include "games.h" #include "start.h" -#include "common/util.h" + +#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) static Char **items = NULL; Int16 selectedEngine = -1; -- cgit v1.2.3 From 7a5b89309e22f0ff71e6c13f04fef8c85c243afd Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Sat, 16 Jun 2007 10:37:59 +0000 Subject: Use the old and faster 1.5x scaler when available svn-id: r27455 --- backends/platform/PalmOS/Src/be_os5.h | 3 +- backends/platform/PalmOS/Src/os5_gfx.cpp | 8 ++++-- backends/platform/PalmOS/Src/os5_renderer.cpp | 40 +++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/be_os5.h b/backends/platform/PalmOS/Src/be_os5.h index fc5f9e667f..13e8b4ff20 100644 --- a/backends/platform/PalmOS/Src/be_os5.h +++ b/backends/platform/PalmOS/Src/be_os5.h @@ -131,8 +131,7 @@ private: void calc_scale(); void render_landscapeAny(RectangleType &r, PointType &p); - void render_landscape(RectangleType &r, PointType &p); - void render_portrait(RectangleType &r, PointType &p); + void render_landscape15x(RectangleType &r, PointType &p); void render_1x(RectangleType &r, PointType &p); WinHandle alloc_screen(Coord w, Coord h); virtual void draw_osd(UInt16 id, Int32 x, Int32 y, Boolean show, UInt8 color = 0); diff --git a/backends/platform/PalmOS/Src/os5_gfx.cpp b/backends/platform/PalmOS/Src/os5_gfx.cpp index 247acf6f46..cff9e79abe 100644 --- a/backends/platform/PalmOS/Src/os5_gfx.cpp +++ b/backends/platform/PalmOS/Src/os5_gfx.cpp @@ -137,9 +137,13 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) { } if (_stretched) { - calc_scale(); OPTIONS_SET(kOptDisableOnScrDisp); - _render = &OSystem_PalmOS5::render_landscapeAny; + if (_screenHeight == 200 && _screenDest.h == 300) { + _render = &OSystem_PalmOS5::render_landscape15x; + } else { + _render = &OSystem_PalmOS5::render_landscapeAny; + calc_scale(); + } } else { OPTIONS_RST(kOptDisableOnScrDisp); _render = &OSystem_PalmOS5::render_1x; diff --git a/backends/platform/PalmOS/Src/os5_renderer.cpp b/backends/platform/PalmOS/Src/os5_renderer.cpp index fdae35acd5..4580db4d53 100644 --- a/backends/platform/PalmOS/Src/os5_renderer.cpp +++ b/backends/platform/PalmOS/Src/os5_renderer.cpp @@ -76,3 +76,43 @@ void OSystem_PalmOS5::render_landscapeAny(RectangleType &r, PointType &p) { p.y = _screenOffset.y + o; RctSetRectangle(&r, 0, 0, _screenDest.w, _screenDest.h - o); } + +void OSystem_PalmOS5::render_landscape15x(RectangleType &r, PointType &p) { + Coord x, y, o = 0; + int16 *dst = _workScreenP; + + if (_overlayVisible) { + int16 *src = _overlayP; + + for (y = 0; y < 100; y++) { + // draw 2 lines + for (x = 0; x < 320; x++) { + *dst++ = *src++; + *dst++ = *src; + *dst++ = *src++; + } + // copy the second to the next line + MemMove(dst, dst - 480, 480 * 2); + dst += 480; + } + } else { + byte *src = _offScreenP; + o = _current_shake_pos; + + for (y = 0; y < 100; y++) { + // draw 2 lines + for (x = 0; x < 320; x++) { + *dst++ = _nativePal[*src++]; + *dst++ = _nativePal[*src]; + *dst++ = _nativePal[*src++]; + } + // copy the second to the next line + MemMove(dst, dst - 480, 480 * 2); + dst += 480; + } + } + + p.x = _screenOffset.x; + p.y = _screenOffset.y + o; + RctSetRectangle(&r, 0, 0, 480, 300 - o); +} -- cgit v1.2.3 From 0d53aa1e99fe0f5f0e842aed4bce43d9b275d0b6 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Sat, 16 Jun 2007 10:38:44 +0000 Subject: Cleanup svn-id: r27456 --- backends/platform/PalmOS/Src/launcher/games.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/launcher/games.h b/backends/platform/PalmOS/Src/launcher/games.h index c277bec4cc..d807d6b64d 100644 --- a/backends/platform/PalmOS/Src/launcher/games.h +++ b/backends/platform/PalmOS/Src/launcher/games.h @@ -186,14 +186,14 @@ static const struct { { "cine", "Delphine Cinematique v1.0" }, { "queen", "Flight of the Amazon Queen" }, { "lure", "Lure of the Tempress" }, - { "gob", "Gobliiins, Bargon Attack and more ..." }, + { "gob", "Gobliiins, Bargon Attack and more" }, { "kyra", "Kyrandia" }, { "parallaction", "Parallaction" }, { "saga", "SAGA Engine" }, { "scumm", "Scumm Games" }, { "agi", "Sierra AGI" }, { "touche", "Touche: The Adventures of the Fifth Musketeer" }, - { "cruise", "Cruise for a Corpse" }, + { "cruise", "Beta -> Cruise for a Corpse" }, }; // protos -- cgit v1.2.3 From 6498d669d0597897951e4c9eebb73419750a94c4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 16 Jun 2007 16:46:13 +0000 Subject: Patch #1721826: ARM asm versions of sound rate conversion/mixing code svn-id: r27467 --- backends/platform/wince/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index 626f24de95..94cb6029f6 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -25,6 +25,8 @@ DISABLE_CRUISE = 1 #DISABLE_HQ_SCALERS = 1 +USE_ARM_SOUND_ASM = 1 + CXX = arm-wince-pe-g++ LD = arm-wince-pe-g++ AR = arm-wince-pe-ar cru -- cgit v1.2.3 From 29bfadcdd76c746b4fc12edc9bc264a7a538db49 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 17 Jun 2007 10:30:34 +0000 Subject: NDS: Compile fixes svn-id: r27508 --- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 +- backends/platform/ds/arm9/source/osystem_ds.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 35cf81ef4b..43fd629a2f 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -478,7 +478,7 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing - size_t imageStrideInBytes = isCpuScalerEnabled() DS::getGameWidth() ? 512; + size_t imageStrideInBytes = DS::isCpuScalerEnabled() ? DS::getGameWidth() : 512; size_t imageStrideInWords = imageStrideInBytes / 2; u16* image = (u16 *) DS::get8BitBackBuffer(); diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index b6d6f5b7bc..316f45bb6e 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -159,4 +159,9 @@ void OSystem_DS::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) //consolePrintf("coltorgb\n"); } +namespace DS +{ +bool isCpuScalerEnabled(); +} + #endif -- cgit v1.2.3 From e5107cb9807b884e8b84ff25733d60575902039d Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 17 Jun 2007 19:37:07 +0000 Subject: NDS: setKeyboardEnable shouldn't overrun VRAM anymore when CPU scaler is on svn-id: r27515 --- backends/platform/ds/arm9/source/dsmain.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 644b66671a..45f0a16deb 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -1018,11 +1018,19 @@ void setKeyboardEnable(bool en) { // Copy the sub screen VRAM from the top screen - they should always be // the same. u16* buffer = get8BitBackBuffer(); - - for (int r = 0; r < (512 * 256) >> 1; r++) { - BG_GFX_SUB[r] = buffer[r]; - } - + + if(isCpuScalerEnabled()) + { + for (int y = 0; y < gameHeight; ++y) + for (int x = 0; x < gameWidth / 2; ++x) + BG_GFX_SUB[y*256 + x] = buffer[y*gameWidth/2 + x]; + } + else + { + for (int r = 0; r < (512 * 256) >> 1; r++) { + BG_GFX_SUB[r] = buffer[r]; + } + } SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE; // Turn on game layer } else { -- cgit v1.2.3 From 1e048c1de6c68a9900ed5fa6de7852652317e74e Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Mon, 18 Jun 2007 07:06:24 +0000 Subject: NDS : Suppressed unneccessary complications regarding the backbuffer when CPU-scaled, basically it has the same stride than the regular one (512b) so most code doesn't have to change svn-id: r27517 --- backends/platform/ds/arm9/source/dsmain.cpp | 55 +++++-------------------- backends/platform/ds/arm9/source/osystem_ds.cpp | 13 +++--- 2 files changed, 17 insertions(+), 51 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 45f0a16deb..860aa41828 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -333,49 +333,25 @@ void initSprites() { void saveGameBackBuffer() { #ifdef DISABLE_SCUMM if (savedBuffer == NULL) savedBuffer = new u8[gameWidth * gameHeight]; - if(isCpuScalerEnabled()) - { - memcpy(savedBuffer, get8BitBackBuffer(), gameWidth * gameHeight); - } - else - { - for (int r = 0; r < gameHeight; r++) { - memcpy(savedBuffer + (r * gameWidth), ((u8 *) (get8BitBackBuffer())) + (r * 512), gameWidth); - } - } + for (int r = 0; r < gameHeight; r++) { + memcpy(savedBuffer + (r * gameWidth), ((u8 *) (get8BitBackBuffer())) + (r * 512), gameWidth); #endif } void restoreGameBackBuffer() { #ifdef DISABLE_SCUMM if (savedBuffer) { - if(isCpuScalerEnabled()) - { - memcpy(get8BitBackBuffer(), savedBuffer, gameWidth * gameHeight); - // TODO Synchronize with framebuffer if necessary - } - else - { - for (int r = 0; r < gameHeight; r++) { - memcpy(((u8 *) (BG_GFX_SUB)) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); - memcpy(((u8 *) (get8BitBackBuffer())) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); - } - } + for (int r = 0; r < gameHeight; r++) { + memcpy(((u8 *) (BG_GFX_SUB)) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); + memcpy(((u8 *) (get8BitBackBuffer())) + (r * 512), savedBuffer + (r * gameWidth), gameWidth); + } delete savedBuffer; savedBuffer = NULL; } #else - if(isCpuScalerEnabled()) - { - memset(get8BitBackBuffer(), 0, 320 * 200); - // TODO Synchronize with framebuffer if necessary - } - else - { - memset(get8BitBackBuffer(), 0, 512 * 256); - memset(BG_GFX_SUB, 0, 512 * 256); - } + memset(get8BitBackBuffer(), 0, 512 * 256); + memset(BG_GFX_SUB, 0, 512 * 256); if (Scumm::g_scumm) { Scumm::g_scumm->markRectAsDirty(Scumm::kMainVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); Scumm::g_scumm->markRectAsDirty(Scumm::kTextVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); @@ -1019,18 +995,9 @@ void setKeyboardEnable(bool en) { // the same. u16* buffer = get8BitBackBuffer(); - if(isCpuScalerEnabled()) - { - for (int y = 0; y < gameHeight; ++y) - for (int x = 0; x < gameWidth / 2; ++x) - BG_GFX_SUB[y*256 + x] = buffer[y*gameWidth/2 + x]; - } - else - { - for (int r = 0; r < (512 * 256) >> 1; r++) { - BG_GFX_SUB[r] = buffer[r]; - } - } + for (int r = 0; r < (512 * 256) >> 1; r++) + BG_GFX_SUB[r] = buffer[r]; + SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE; // Turn on game layer } else { diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 43fd629a2f..a804369b26 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -173,8 +173,8 @@ void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int u16* src = (u16 *) buf; if (DS::getKeyboardEnable()) { - - for (int dy = y; dy < y + h; dy++) { + for (int dy = y; dy < y + h; dy++) + { u16* dest = bg + (dy << 8) + (x >> 1); DC_FlushRange(src, w << 1); @@ -185,7 +185,8 @@ void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int } } else { - for (int dy = y; dy < y + h; dy++) { + for (int dy = y; dy < y + h; dy++) + { u16* dest1 = bg + (dy << 8) + (x >> 1); u16* dest2 = bgSub + (dy << 8) + (x >> 1); @@ -478,16 +479,14 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing - size_t imageStrideInBytes = DS::isCpuScalerEnabled() ? DS::getGameWidth() : 512; - size_t imageStrideInWords = imageStrideInBytes / 2; u16* image = (u16 *) DS::get8BitBackBuffer(); for (int y = 0; y < DS::getGameHeight(); y++) { - DC_FlushRange(image + (y * imageStrideInWords), DS::getGameWidth()); + DC_FlushRange(image + (y << 8), DS::getGameWidth()); for (int x = 0; x < DS::getGameWidth() >> 1; x++) { - *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y * imageStrideInWords + x]; + *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y << 8 + x]; } } -- cgit v1.2.3 From 019cbf0e6c7957543379115cb95d1b96704405e6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 18 Jun 2007 12:34:29 +0000 Subject: Added FIXME to dsmain.cpp about it not using SCUMMVM_VERSION (thus adding one more headache to the release process) svn-id: r27531 --- backends/platform/ds/arm9/source/dsmain.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 860aa41828..becb0205cb 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -2312,6 +2312,8 @@ int main(void) consolePrintf("-------------------------------\n"); consolePrintf("ScummVM DS\n"); consolePrintf("Ported by Neil Millstone\n"); + FIXME: Change this code to make use of base/internal_version.h + resp. uses gScummVMVersion from base/version.h consolePrintf("Version 0.10.0SVN "); #if defined(DS_BUILD_A) consolePrintf("build A\n"); -- cgit v1.2.3 From e5c205a3241dddaa49856bc8f2f09856e5dae3ad Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 18 Jun 2007 12:43:39 +0000 Subject: Added backends/platform/ds/arm9/makefile(.in) to tools/update-version.pl svn-id: r27533 --- backends/platform/ds/arm9/makefile | 4 +- backends/platform/ds/arm9/makefile.in | 350 ++++++++++++++++++++++++++++++++++ 2 files changed, 352 insertions(+), 2 deletions(-) create mode 100644 backends/platform/ds/arm9/makefile.in (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index f28abd2b77..cb41774064 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -333,8 +333,8 @@ endif #--------------------------------------------------------------------------------- %.nds: %.bin - @echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.9.0;DS Port" - ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.9.1;DS Port" + @echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.11.0svn;DS Port" + ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM 0.11.0svn;DS Port" dsbuild $@ -l ../ndsloader.bin padbin 16 $(basename $@).ds.gba diff --git a/backends/platform/ds/arm9/makefile.in b/backends/platform/ds/arm9/makefile.in new file mode 100644 index 0000000000..e7a7da4a59 --- /dev/null +++ b/backends/platform/ds/arm9/makefile.in @@ -0,0 +1,350 @@ +#BUILD_PLUGINS = 1 +#libndsdir = $(DEVKITPRO)/libnds +libndsdir = /home/neil/devkitpro/libnds + +# Select the build you want by uncommenting one of the following lines: + +DS_BUILD_A = 1 +#DS_BUILD_B = 1 +#DS_BUILD_C = 1 +#DS_BUILD_D = 1 + +# Uncomment the following line to build in support for MP3 audio +# using libmad: +USE_MAD = 1 + +# Uncomment the following line to enable support for the +# ace DS Debugger (remembering to make the same change in the arm7 makefile): +#USE_DEBUGGER = 1 +# NOTE: The header and libs for the debugger is assumed to be in the libnds +# folder. + +VPATH = $(srcdir) + +# Command to build libmad is: +# ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork' + + +ifdef DS_BUILD_A + DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A + LOGO = logoa.bmp + DISABLE_HE = 1 + #DISABLE_SCUMM = 1 + DISABLE_SCUMM_7_8 = 1 + DISABLE_AGOS = 1 + DISABLE_SKY = 1 + DISABLE_SWORD1 = 1 + DISABLE_SWORD2 = 1 + DISABLE_QUEEN = 1 + DISABLE_SAGA = 1 + DISABLE_KYRA = 1 + DISABLE_GOB = 1 + DISABLE_LURE = 1 + DISABLE_CINE = 1 + DISABLE_AGI = 1 + DISABLE_TOUCHE = 1 + DISABLE_PARALLACTION = 1 + BUILD=scummvm-A +endif + +ifdef DS_BUILD_B + DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_B + LOGO = logob.bmp + DISABLE_HE = 1 + DISABLE_SCUMM = 1 + DISABLE_SCUMM_7_8 = 1 + DISABLE_AGOS = 1 + #DISABLE_SKY = 1 + DISABLE_SWORD1 = 1 + DISABLE_SWORD2 = 1 + #DISABLE_QUEEN = 1 + DISABLE_SAGA = 1 + DISABLE_KYRA = 1 + DISABLE_GOB = 1 + DISABLE_LURE = 1 + DISABLE_CINE = 1 + DISABLE_AGI = 1 + DISABLE_TOUCHE = 1 + DISABLE_PARALLACTION = 1 + BUILD=scummvm-B +endif + +ifdef DS_BUILD_C + DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_C + LOGO = logoc.bmp + DISABLE_HE = 1 + DISABLE_SCUMM = 1 + DISABLE_SCUMM_7_8 = 1 + #DISABLE_AGOS = 1 + DISABLE_SKY = 1 + DISABLE_SWORD1 = 1 + DISABLE_SWORD2 = 1 + DISABLE_QUEEN = 1 + DISABLE_SAGA = 1 + #DISABLE_KYRA = 1 + #DISABLE_GOB = 1 + DISABLE_LURE = 1 + DISABLE_CINE = 1 + DISABLE_AGI = 1 + DISABLE_TOUCHE = 1 + DISABLE_PARALLACTION = 1 + BUILD=scummvm-C +endif + +ifdef DS_BUILD_D + DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_D + LOGO = logoc.bmp + DISABLE_HE = 1 + DISABLE_SCUMM = 1 + DISABLE_SCUMM_7_8 = 1 + DISABLE_AGOS = 1 + DISABLE_SKY = 1 + DISABLE_SWORD1 = 1 + DISABLE_SWORD2 = 1 + DISABLE_QUEEN = 1 + DISABLE_SAGA = 1 + DISABLE_KYRA = 1 + DISABLE_GOB = 1 + DISABLE_LURE = 1 + #DISABLE_CINE = 1 + #DISABLE_AGI = 1 + DISABLE_TOUCHE = 1 + DISABLE_PARALLACTION = 1 + BUILD=scummvm-A +endif + + +ARM7BIN := -7 $(CURDIR)/../../arm7/arm7.bin +ICON := -b ../../../logo.bmp "ScummVM;By Neil Millstone;" + +CC = arm-eabi-gcc +CXX = arm-eabi-g++ + +CFLAGS = -Wno-multichar -Wall -Os\ + -Wno-multichar -mcpu=arm9tdmi -mtune=arm9tdmi \ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math -mthumb-interwork + +ifdef USE_DEBUGGER + DEFINES += -DUSE_DEBUGGER + CFLAGS += -g +endif + +CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-non-virtual-dtor \ + -fno-exceptions -fno-rtti + +ASFLAGS = -mcpu=arm9tdmi -mthumb-interwork +DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_FANCY_THEMES -DDISABLE_DEFAULT_SAVEFILEMANAGER +ifdef USE_MAD + DEFINES += -DUSE_MAD +endif + + +LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt + +INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/compressor -I$(portdir)/source/fat \ + -I$(srcdir)/backends/fs -I$(srcdir)/backends/fs/ds -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\ + -I$(srcdir)/scumm -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\ + -I$(portdir)/source/libcartreset + + +LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9 +ifdef USE_MAD + LIBS += -lmad +endif +ifdef USE_DEBUGGER + LIBS += -ldsdebugger -ldswifi9 +endif + +#-Lscumm -lscumm -Lbase -lbase -Lcommon -lcommon -Lgraphics -lgraphics -Lgui -lgui -Lsound -lsound +EXECUTABLE = scummvm.elf +PLUGIN_PREFIX = +PLUGIN_SUFFIX = .plg +PLUGIN_EXTRA_DEPS = plugin.x plugin.syms scummvm.elf +PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,-Tplugin.x,--just-symbols,scummvm.elf,--retain-symbols-file,plugin.syms -L$(ronindir)/lib +MKDIR = mkdir -p +RM = rm -f +RM_REC = rm -rf +AR = arm-eabi-ar cru +RANLIB = arm-eabi-ranlib +OBJCOPY = arm-eabi-objcopy +AS = arm-eabi-as +HAVE_GCC3 = true +DISABLE_SCALERS = true + +ifdef BUILD_PLUGINS +DEFINES += -DDYNAMIC_MODULES +PRE_OBJS_FLAGS = -Wl,--whole-archive +POST_OBJS_FLAGS = -Wl,--no-whole-archive +endif + +PORT_OBJS := $(portdir)/source/blitters.o $(portdir)/source/cdaudio.o $(portdir)/source/dsmain.o \ + $(portdir)/../../../fs/ds/ds-fs.o $(portdir)/source/gbampsave.o $(portdir)/source/scummhelp.o\ + $(portdir)/source/osystem_ds.o $(portdir)/source/portdefs.o $(portdir)/source/ramsave.o\ + $(portdir)/source/scummconsole.o $(portdir)/source/touchkeyboard.o $(portdir)/source/zipreader.o\ + $(portdir)/source/dsoptions.o $(portdir)/source/keys.o + +DATA_OBJS := $(portdir)/data/icons.o $(portdir)/data/keyboard.o $(portdir)/data/keyboard_pal.o $(portdir)/data/default_font.o + + +COMPRESSOR_OBJS := $(portdir)/source/compressor/lz.o + +FAT_OBJS := $(portdir)/source/fat/disc_io.o $(portdir)/source/fat/gba_nds_fat.o\ + $(portdir)/source/fat/io_fcsr.o $(portdir)/source/fat/io_m3cf.o\ + $(portdir)/source/fat/io_mpcf.o $(portdir)/source/fat/io_sccf.o\ + $(portdir)/source/fat/io_m3sd.o\ + $(portdir)/source/fat/io_nmmc.o $(portdir)/source/fat/io_scsd.o \ + $(portdir)/source/fat/io_scsd_asm.o \ + $(portdir)/source/fat/io_njsd.o \ + $(portdir)/source/fat/io_mmcf.o \ + $(portdir)/source/fat/io_sd_common.o \ + $(portdir)/source/fat/io_m3_common.o \ + $(portdir)/source/fat/io_dldi.o \ + $(portdir)/source/fat/m3sd.o + + +# $(portdir)/source/fat/io_cf_common.o $(portdir)/source/fat/io_m3_common.o\ +# $(portdir)/source/fat/io_sd_common.o $(portdir)/source/fat/io_scsd_s.o \ +# $(portdir)/source/fat/io_sc_common.o $(portdir)/source/fat/io_sd_common.o + +LIBCARTRESET_OBJS := $(portdir)/source/libcartreset/cartreset.o + + + +OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) + + + +MODULE_DIRS += . + +ndsall: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + make -C ./$(BUILD) -f ../makefile scummvm.nds + +include $(srcdir)/Makefile.common + +clean: + $(RM) $(OBJS) $(EXECUTABLE) + rm -fr $(BUILD) + +plugin_dist : + find . -name '*.plg' | while read p; do \ + sh-elf-strip -g -o "`basename \"$$p\" | tr '[:lower:]' '[:upper:]'`" "$$p"; \ + done + +dist : SCUMMVM.BIN plugins plugin_dist + + +#--------------------------------------------------------------------------------- +# canned command sequence for binary data +#--------------------------------------------------------------------------------- +#define bin2o +# bin2s $< | $(AS) -mthumb -mthumb-interwork -o $(@) +# echo "extern const u8" `(echo $( `(echo $(> `(echo $(> `(echo $( `(echo $(> `(echo $(> `(echo $( $(*).h +# echo "extern const u32" $(notdir $(*))_size[]";" >> $(*).h +# +# echo $(*).h +# rm $(*).tmp +#endef + +############## +# Replacement rule for the one in makefile.common +############## +ifndef HAVE_GCC3 +# If you use GCC, disable the above and enable this for intelligent +# dependency tracking. +.cpp.o: + $(MKDIR) $(*D)/$(DEPDIR) + $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +# $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d + $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" + $(RM) "$(*D)/$(DEPDIR)/$(*F).d2" +else +# If you even have GCC 3.x, you can use this build rule, which is safer; the above +# rule can get you into a bad state if you Ctrl-C at the wrong moment. +# Also, with this GCC inserts additional dummy rules for the involved headers, +# which ensures a smooth compilation even if said headers become obsolete. +.cpp.o: + $(MKDIR) $(*D)/$(DEPDIR) +# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +endif + + +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.nds: %.bin + @echo ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM @VERSION@;DS Port" + ndstool -c $@ -9 scummvm.bin $(ARM7BIN) -b ../../$(LOGO) "$(shell basename $@);ScummVM @VERSION@;DS Port" + dsbuild $@ -l ../ndsloader.bin + + padbin 16 $(basename $@).ds.gba + +#--------------------------------------------------------------------------------- +%.bin: %.elf + $(OBJCOPY) -S scummvm.elf scummvm-stripped.elf + $(OBJCOPY) -O binary scummvm-stripped.elf scummvm.bin + +#%.o: %.s +# $(MKDIR) $(*D)/$(DEPDIR) +# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + -- cgit v1.2.3 From 8c881acd48ea9b58ef0b38b0fd2f9c3fddb20a70 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 18 Jun 2007 13:41:51 +0000 Subject: Update versions. svn-id: r27536 --- backends/platform/maemo/hildon.cpp | 2 +- backends/platform/maemo/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/maemo/hildon.cpp b/backends/platform/maemo/hildon.cpp index cd23617685..314e1de502 100644 --- a/backends/platform/maemo/hildon.cpp +++ b/backends/platform/maemo/hildon.cpp @@ -28,7 +28,7 @@ #include #define OSSO_APP_NAME "scummvm" -#define OSSO_APP_VERSION "0.9.0CVS" +#define OSSO_APP_VERSION "0.11.0SVN" #define OSSO_APP_SERVICE "org.scummvm."OSSO_APP_NAME #define OSSO_APP_OBJECT "/org/scummvm/"OSSO_APP_NAME #define OSSO_APP_IFACE "org.scummvm."OSSO_APP_NAME diff --git a/backends/platform/maemo/main.cpp b/backends/platform/maemo/main.cpp index 40b2efb626..7d0b5cf821 100644 --- a/backends/platform/maemo/main.cpp +++ b/backends/platform/maemo/main.cpp @@ -41,7 +41,7 @@ #include #define OSSO_APP_NAME "scummvm" -#define OSSO_APP_VERSION "0.9.0CVS" +#define OSSO_APP_VERSION "0.11.0SVN" void set_doubling(unsigned char enable) { return; -- cgit v1.2.3 From dc62023190055f909d1a5183b8c1396051a7cfa2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 18 Jun 2007 14:18:42 +0000 Subject: Use the SCUMMVM_VERSION macro from base/internal_version.h in the maemo backend code, instead of hardcoding it (one potential headache less, yippie) svn-id: r27537 --- backends/platform/maemo/hildon.cpp | 3 ++- backends/platform/maemo/main.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/maemo/hildon.cpp b/backends/platform/maemo/hildon.cpp index 314e1de502..d4f2aa122d 100644 --- a/backends/platform/maemo/hildon.cpp +++ b/backends/platform/maemo/hildon.cpp @@ -26,9 +26,10 @@ #include #include #include +#include "base/internal_version.h" #define OSSO_APP_NAME "scummvm" -#define OSSO_APP_VERSION "0.11.0SVN" +#define OSSO_APP_VERSION SCUMMVM_VERSION #define OSSO_APP_SERVICE "org.scummvm."OSSO_APP_NAME #define OSSO_APP_OBJECT "/org/scummvm/"OSSO_APP_NAME #define OSSO_APP_IFACE "org.scummvm."OSSO_APP_NAME diff --git a/backends/platform/maemo/main.cpp b/backends/platform/maemo/main.cpp index 7d0b5cf821..73a5aff7bc 100644 --- a/backends/platform/maemo/main.cpp +++ b/backends/platform/maemo/main.cpp @@ -33,6 +33,7 @@ #include "backends/platform/maemo/maemo-sdl.h" #include "base/main.h" +#include "base/internal_version.h" #include #include #include @@ -41,7 +42,7 @@ #include #define OSSO_APP_NAME "scummvm" -#define OSSO_APP_VERSION "0.11.0SVN" +#define OSSO_APP_VERSION SCUMMVM_VERSION void set_doubling(unsigned char enable) { return; -- cgit v1.2.3 From b51f2f3212ae8a5abbdce4d947ec2d1cad1a0b6f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Jun 2007 22:39:59 +0000 Subject: Implemented the OSystem framebuffer API, as discussed on scummvm-devel. All changes are just fine, and won't cause any compile problems or regressions, despite the fact that I can't test most of the non-SDL backend changes, at an improbability level of two to the power of two hundred and seventy-six thousand to one against - possibly much higher. Anything you still can't cope with is therefore your own problem. Please relax. svn-id: r27548 --- backends/platform/PalmOS/Src/be_os5.h | 5 ++- backends/platform/PalmOS/Src/os5_gfx.cpp | 17 ++++++--- backends/platform/dc/dc.h | 6 ++- backends/platform/dc/display.cpp | 27 +++++++------ backends/platform/ds/arm9/source/osystem_ds.cpp | 21 +++++++++-- backends/platform/ds/arm9/source/osystem_ds.h | 5 ++- backends/platform/gp2x/gp2x-common.h | 7 +--- backends/platform/gp2x/graphics.cpp | 34 ++++++----------- backends/platform/gp32/gp32_osys.cpp | 16 +++++--- backends/platform/gp32/gp32_osys.h | 5 ++- backends/platform/null/null.cpp | 10 +++-- backends/platform/ps2/Gs2dScreen.cpp | 24 ++++++------ backends/platform/ps2/Gs2dScreen.h | 6 ++- backends/platform/ps2/systemps2.cpp | 11 ++++-- backends/platform/ps2/systemps2.h | 3 +- backends/platform/psp/osys_psp.cpp | 17 ++++++--- backends/platform/psp/osys_psp.h | 4 +- backends/platform/sdl/graphics.cpp | 50 +++++++++++++------------ backends/platform/sdl/sdl-common.h | 12 +++--- backends/platform/sdl/sdl.cpp | 1 + backends/platform/wince/wince-sdl.cpp | 10 ++++- backends/platform/wince/wince-sdl.h | 3 +- 22 files changed, 175 insertions(+), 119 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/be_os5.h b/backends/platform/PalmOS/Src/be_os5.h index 13e8b4ff20..bb38c51ca6 100644 --- a/backends/platform/PalmOS/Src/be_os5.h +++ b/backends/platform/PalmOS/Src/be_os5.h @@ -110,6 +110,8 @@ private: typedef void (OSystem_PalmOS5::*RendererProc)(RectangleType &r, PointType &p); RendererProc _render; + Graphics::Surface _framebuffer; + OverlayColor *_overlayP; WinHandle _overlayH, _workScreenH; int16 *_workScreenP; @@ -168,7 +170,8 @@ public: void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void clearScreen(); - bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); void setCursorPalette(const byte *colors, uint start, uint num); void disableCursorPalette(bool disable); diff --git a/backends/platform/PalmOS/Src/os5_gfx.cpp b/backends/platform/PalmOS/Src/os5_gfx.cpp index cff9e79abe..be5d28bc56 100644 --- a/backends/platform/PalmOS/Src/os5_gfx.cpp +++ b/backends/platform/PalmOS/Src/os5_gfx.cpp @@ -219,13 +219,18 @@ void OSystem_PalmOS5::copyRectToScreen(const byte *buf, int pitch, int x, int y, } } -bool OSystem_PalmOS5::grabRawScreen(Graphics::Surface *surf) { - assert(surf); +Graphics::Surface *OSystem_PalmOS5::lockScreen() { + _framebuffer.pixels = _offScreenP; + _framebuffer.w = _screenWidth; + _framebuffer.h = _screenHeight; + _framebuffer.pitch = _screenWidth; + _framebuffer.bytesPerPixel = 1; + + return &_framebuffer; +} - surf->create(_screenWidth, _screenHeight, 1); - MemMove(surf->pixels, _offScreenP, _screenWidth * _screenHeight); - - return true; +void OSystem_PalmOS5::unlockScreen() { + // The screen is always completely update anyway, so we don't have to force a full update here. } void OSystem_PalmOS5::int_updateScreen() { diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 01e86a561b..fa47ed21f5 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -81,8 +81,8 @@ class OSystem_Dreamcast : public OSystem { // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - // Copies the current screen contents to a new surface. - bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); // Clear the screen to black. void clearScreen(); @@ -213,6 +213,8 @@ class OSystem_Dreamcast : public OSystem { void *ovl_tx[NUM_BUFFERS]; unsigned short palette[256], cursor_palette[256]; + Graphics::Surface _framebuffer; + int temp_sound_buffer[RING_BUFFER_SAMPLES>>SOUND_BUFFER_SHIFT]; void checkSound(); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 73312cafed..da9f6e83ff 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -609,19 +609,24 @@ int OSystem_Dreamcast::getGraphicsMode() const return 0; } -bool OSystem_Dreamcast::grabRawScreen(Graphics::Surface *surf) +Graphics::Surface *OSystem_Dreamcast::lockScreen() { - if(!screen || !surf) - return false; + if (!screen) + return 0; - surf->create(_screen_w, _screen_h, 1); - unsigned char *src = screen, *dst = (unsigned char *)surf->pixels; - for(int h = _screen_h; h>0; --h) { - memcpy(dst, src, _screen_w); - src += SCREEN_W; - dst += _screen_w; - } - return true; + _framebuffer.pixels = screen; + _framebuffer.w = _screen_w; + _framebuffer.h = _screen_h; + _framebuffer.pitch = SCREEN_W; + _framebuffer.bytesPerPixel = 1; + + return &_framebuffer; +} + +void OSystem_Dreamcast::unlockScreen() +{ + // Force screen update + _screen_dirty = true; } void OSystem_Dreamcast::clearScreen() diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index a804369b26..cad6ad6b78 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -474,8 +474,13 @@ Common::SaveFileManager* OSystem_DS::getSavefileManager() } } -bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { - surf->create(DS::getGameWidth(), DS::getGameHeight(), 1); +Graphics::Surface *OSystem_DS::lockScreen() { + // For now, we create a full temporary screen surface, to which we copy the + // the screen content. Later unlockScreen will copy everything back. + // Not very nice nor efficient, but at least works, and is not worse + // than in the bad old times where we used grabRawScreen + copyRectToScreen. + + _framebuffer.create(DS::getGameWidth(), DS::getGameHeight(), 1); // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing @@ -486,11 +491,19 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { DC_FlushRange(image + (y << 8), DS::getGameWidth()); for (int x = 0; x < DS::getGameWidth() >> 1; x++) { - *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y << 8 + x]; + *(((u16 *) (_framebuffer.pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y << 8 + x]; } } - return true; + return &_framebuffer; +} + +void OSystem_DS::unlockScreen() { + // Copy temp framebuffer back to screen + copyRectToScreen((byte *)_framebuffer.pixels, _framebuffer.pitch, 0, 0, _framebuffer.w, _framebuffer.h); + + // Free memory + _framebuffer.free(); } void OSystem_DS::setFocusRectangle(const Common::Rect& rect) { diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 316f45bb6e..58b940af2c 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -53,6 +53,8 @@ public: DSAudioMixer* _mixer; DSTimerManager* _timer; + Graphics::Surface _framebuffer; + static OSystem_DS* _instance; typedef void (*SoundProc)(void *param, byte *buf, int len); @@ -127,7 +129,8 @@ public: void addEvent(Common::Event& e); bool isEventQueueEmpty() { return queuePos == 0; } - virtual bool grabRawScreen(Graphics::Surface* surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); virtual void setFocusRectangle(const Common::Rect& rect); diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h index 4c91a00247..68f2fb997e 100644 --- a/backends/platform/gp2x/gp2x-common.h +++ b/backends/platform/gp2x/gp2x-common.h @@ -90,11 +90,8 @@ public: // The screen will not be updated to reflect the new bitmap void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); - // Copies the screen to a buffer - bool grabRawScreen(Graphics::Surface *surf); - - // Clear the screen - void clearScreen(); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); // Update the dirty areas of the screen void updateScreen(); diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index a482689e43..c3ed5c627c 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -687,22 +687,6 @@ void OSystem_GP2X::setZoomOnMouse() { } } -void OSystem_GP2X::clearScreen() { - assert (_transactionMode == kTransactionNone); - - // Try to lock the screen surface - if (SDL_LockSurface(_screen) == -1) - error("SDL_LockSurface failed: %s", SDL_GetError()); - - byte *dst = (byte *)_screen->pixels; - - // Clear the screen - memset(dst, 0, _screenWidth * _screenHeight); - - // Unlock the screen surface - SDL_UnlockSurface(_screen); -} - void OSystem_GP2X::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { assert (_transactionMode == kTransactionNone); assert(src); @@ -772,15 +756,19 @@ void OSystem_GP2X::copyRectToScreen(const byte *src, int pitch, int x, int y, in SDL_UnlockSurface(_screen); } -// TIDY: DIRTY HACK: Try a REALLY simple version of grabRawScreen to -// debug why it will not work on the GP2X. -bool OSystem_GP2X::grabRawScreen(Graphics::Surface *surf) { - assert(surf); +Graphics::Surface *OSystem_GP2X::lockScreen() { + _framebuffer.pixels = _screen->pixels; + _framebuffer.w = _screen->w; + _framebuffer.h = _screen->h; + _framebuffer.pitch = _screen->pitch; + _framebuffer.bytesPerPixel = 1; - surf->create(_screenWidth, _screenHeight, 1); - memcpy(surf->pixels, _screen->pixels, _screenWidth * _screenHeight); + return &_framebuffer; +} - return true; +void OSystem_GP2X::unlockScreen() { + // Force screen update + _forceFull = true; } void OSystem_GP2X::addDirtyRect(int x, int y, int w, int h, bool realCoordinates) { diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp index ab2ac1616b..1cb5eb2d9f 100644 --- a/backends/platform/gp32/gp32_osys.cpp +++ b/backends/platform/gp32/gp32_osys.cpp @@ -209,14 +209,18 @@ void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, in } } -bool OSystem_GP32::grabRawScreen(Graphics::Surface *surf) { - assert(surf); +Graphics::Surface *OSystem_GP32::lockScreen() { + _framebuffer.pixels = _gameScreen; + _framebuffer.w = _screenWidth; + _framebuffer.h = _screenHeight; + _framebuffer.pitch = _screenWidth; + _framebuffer.bytesPerPixel = 1; - surf->create(_screenWidth, _screenHeight, 1); - - memcpy(surf->pixels, _gameScreen, _screenWidth * _screenHeight); + return &_framebuffer; +} - return true; +void OSystem_GP32::unlockScreen() { + // The screen is always completely update anyway, so we don't have to force a full update here. } //TODO: Implement Dirty rect? diff --git a/backends/platform/gp32/gp32_osys.h b/backends/platform/gp32/gp32_osys.h index fa8a0903ad..94578e8e15 100644 --- a/backends/platform/gp32/gp32_osys.h +++ b/backends/platform/gp32/gp32_osys.h @@ -49,6 +49,8 @@ protected: uint16 *_tmpScreen, *_hwScreen; OverlayColor *_overlayBuffer; + Graphics::Surface _framebuffer; + int _overlayWidth, _overlayHeight; bool _overlayVisible; uint32 _shakePos; @@ -111,7 +113,8 @@ public: void grabOverlay(OverlayColor *buf, int pitch); void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); int16 getOverlayHeight(); int16 getOverlayWidth(); diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp index 963b3429f5..250ca0fb29 100644 --- a/backends/platform/null/null.cpp +++ b/backends/platform/null/null.cpp @@ -63,7 +63,8 @@ public: virtual void grabPalette(byte *colors, uint start, uint num); virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); - virtual bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); virtual void setShakePos(int shakeOffset); virtual void showOverlay(); @@ -189,8 +190,11 @@ void OSystem_NULL::copyRectToScreen(const byte *buf, int pitch, int x, int y, in void OSystem_NULL::updateScreen() { } -bool OSystem_NULL::grabRawScreen(Graphics::Surface *surf) { - return false; +Graphics::Surface *OSystem_NULL::lockScreen() { + return 0; +} + +void OSystem_NULL::unlockScreen() { } void OSystem_NULL::setShakePos(int shakeOffset) { diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp index 4829027f15..1de3c5e8c8 100644 --- a/backends/platform/ps2/Gs2dScreen.cpp +++ b/backends/platform/ps2/Gs2dScreen.cpp @@ -364,13 +364,6 @@ void Gs2dScreen::copyScreenRect(const uint8 *buf, int pitch, int x, int y, int w } } -void Gs2dScreen::clearScreen(void) { - WaitSema(g_DmacSema); - memset(_screenBuf, 0, _width * _height); - _screenChanged = true; - SignalSema(g_DmacSema); -} - void Gs2dScreen::setPalette(const uint32 *pal, uint8 start, uint16 num) { assert(start + num <= 256); @@ -393,11 +386,20 @@ void Gs2dScreen::grabPalette(uint32 *pal, uint8 start, uint16 num) { } } -void Gs2dScreen::grabScreen(Graphics::Surface *surf) { - assert(surf); +Graphics::Surface *Gs2dScreen::lockScreen() { WaitSema(g_DmacSema); - surf->create(_width, _height, 1); - memcpy(surf->pixels, _screenBuf, _width * _height); + + _framebuffer.pixels = _screen->pixels; + _framebuffer.w = _screen->w; + _framebuffer.h = _screen->h; + _framebuffer.pitch = _screen->pitch; + _framebuffer.bytesPerPixel = 1; + + return &_framebuffer; +} + +void Gs2dScreen::unlockScreen() { + _screenChanged = true; SignalSema(g_DmacSema); } diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h index 353e577980..471ec87789 100644 --- a/backends/platform/ps2/Gs2dScreen.h +++ b/backends/platform/ps2/Gs2dScreen.h @@ -56,13 +56,13 @@ public: void copyPrintfOverlay(const uint8* buf); void clearPrintfOverlay(void); - void clearScreen(void); void copyScreenRect(const uint8 *buf, int pitch, int x, int y, int w, int h); void setPalette(const uint32 *pal, uint8 start, uint16 num); void updateScreen(void); void grabPalette(uint32 *pal, uint8 start, uint16 num); - void grabScreen(Graphics::Surface *surf); + Graphics::Surface *lockScreen(); + void unlockScreen(); //- overlay routines void copyOverlayRect(const uint16 *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h); void grabOverlay(uint16 *buf, uint16 pitch); @@ -99,6 +99,8 @@ private: uint32 _mouseScaleX, _mouseScaleY; uint8 _mTraCol; + Graphics::Surface _framebuffer; + int _shakePos; bool _showMouse, _showOverlay, _screenChanged, _overlayChanged, _clutChanged; diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 80d5ab9c83..32290bddea 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -326,7 +326,7 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) { } _screen->wantAnim(false); - _screen->clearScreen(); + clearScreen(); } OSystem_PS2::~OSystem_PS2(void) { @@ -510,9 +510,12 @@ void OSystem_PS2::copyRectToScreen(const byte *buf, int pitch, int x, int y, int _screen->copyScreenRect((const uint8*)buf, pitch, x, y, w, h); } -bool OSystem_PS2::grabRawScreen(Graphics::Surface *surf) { - _screen->grabScreen(surf); - return true; +Graphics::Surface *OSystem_PS2::lockScreen() { + return _screen->lockScreen(); +} + +void OSystem_PS2::unlockScreen() { + _screen->unlockScreen(); } void OSystem_PS2::updateScreen(void) { diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index 4a3764666e..b5c84d3b95 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -56,7 +56,8 @@ public: virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); virtual void setShakePos(int shakeOffset); virtual void grabPalette(byte *colors, uint start, uint num); - virtual bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); virtual void updateScreen(); virtual void showOverlay(); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index bee422d36f..f7c18e5142 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -209,13 +209,18 @@ void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int } } -bool OSystem_PSP::grabRawScreen(Graphics::Surface *surf) { - assert(surf); +Graphics::Surface *OSystem_PSP::lockScreen() { + _framebuffer.pixels = _offscreen; + _framebuffer.w = _screenWidth; + _framebuffer.h = _screenHeight; + _framebuffer.pitch = _screenWidth; + _framebuffer.bytesPerPixel = 1; - surf->create(_screenWidth, _screenHeight, 1); - memcpy(surf->pixels, _offscreen, _screenWidth * _screenHeight); - - return true; + return &_framebuffer; +} + +void OSystem_PSP::unlockScreen() { + // The screen is always completely update anyway, so we don't have to force a full update here. } void OSystem_PSP::updateScreen() { diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index b833f5e179..c7a5c06051 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -62,6 +62,7 @@ protected: bool _overlayVisible; uint32 _shakePos; + Graphics::Surface _framebuffer; bool _mouseVisible; int _mouseX, _mouseY; @@ -101,7 +102,8 @@ public: virtual int16 getHeight(); virtual void setPalette(const byte *colors, uint start, uint num); virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - virtual bool grabRawScreen(Graphics::Surface *surf); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); virtual void updateScreen(); virtual void setShakePos(int shakeOffset); diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index e0b7de28ab..f93c806aa8 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -761,22 +761,6 @@ void OSystem_SDL::setAspectRatioCorrection(bool enable) { } } -void OSystem_SDL::clearScreen() { - assert (_transactionMode == kTransactionNone); - - // Try to lock the screen surface - if (SDL_LockSurface(_screen) == -1) - error("SDL_LockSurface failed: %s", SDL_GetError()); - - byte *dst = (byte *)_screen->pixels; - - // Clear the screen - memset(dst, 0, _screenWidth * _screenHeight); - - // Unlock the screen surface - SDL_UnlockSurface(_screen); -} - void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { assert (_transactionMode == kTransactionNone); assert(src); @@ -848,24 +832,44 @@ void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int SDL_UnlockSurface(_screen); } -bool OSystem_SDL::grabRawScreen(Graphics::Surface *surf) { - assert(_screen); - assert(surf); +Graphics::Surface *OSystem_SDL::lockScreen() { + assert (_transactionMode == kTransactionNone); - Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends + // Lock the graphics mutex + lockMutex(_graphicsMutex); - surf->create(_screenWidth, _screenHeight, _screen->format->BytesPerPixel); + // paranoia check + assert(!_screenIsLocked); + _screenIsLocked = true; // Try to lock the screen surface if (SDL_LockSurface(_screen) == -1) error("SDL_LockSurface failed: %s", SDL_GetError()); - memcpy(surf->pixels, _screen->pixels, _screenWidth * _screenHeight * _screen->format->BytesPerPixel); + _framebuffer.pixels = _screen->pixels; + _framebuffer.w = _screen->w; + _framebuffer.h = _screen->h; + _framebuffer.pitch = _screen->pitch; + _framebuffer.bytesPerPixel = 1; + + return &_framebuffer; +} + +void OSystem_SDL::unlockScreen() { + assert (_transactionMode == kTransactionNone); + + // paranoia check + assert(_screenIsLocked); + _screenIsLocked = false; // Unlock the screen surface SDL_UnlockSurface(_screen); - return true; + // Trigger a full screen update + _forceFull = true; + + // Finally unlock the graphics mutex + unlockMutex(_graphicsMutex); } void OSystem_SDL::addDirtyRect(int x, int y, int w, int h, bool realCoordinates) { diff --git a/backends/platform/sdl/sdl-common.h b/backends/platform/sdl/sdl-common.h index e66ca71e7f..4795b22a53 100644 --- a/backends/platform/sdl/sdl-common.h +++ b/backends/platform/sdl/sdl-common.h @@ -92,11 +92,8 @@ public: // The screen will not be updated to reflect the new bitmap virtual void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) - // Copies the screen to a buffer - bool grabRawScreen(Graphics::Surface *surf); - - // Clear the screen - void clearScreen(); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); // Update the dirty areas of the screen void updateScreen(); @@ -218,6 +215,8 @@ protected: // unseen game screen SDL_Surface *_screen; + + // TODO: We could get rid of the following two vars and just use _screen instead int _screenWidth, _screenHeight; // temporary screen (for scalers) @@ -274,6 +273,9 @@ protected: int _mode; int _transactionMode; bool _fullscreen; + + bool _screenIsLocked; + Graphics::Surface _framebuffer; /** Current video mode flags (see DF_* constants) */ uint32 _modeFlags; diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 0fe16e0520..fe78bd4236 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -243,6 +243,7 @@ OSystem_SDL::OSystem_SDL() _savefile(0), _mixer(0), _timer(0), + _screenIsLocked(false), _graphicsMutex(0), _transactionMode(kTransactionNone) { // allocate palette storage diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 0ee6f6e60d..92012c7159 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1587,9 +1587,15 @@ void OSystem_WINCE3::internUpdateScreen() { _forceFull = false; } -bool OSystem_WINCE3::grabRawScreen(Graphics::Surface *surf) { +Graphics::Surface *OSystem_WINCE3::lockScreen() { + // FIXME: Fingolfing asks: Why is undrawMouse() needed here? + // Please document this. undrawMouse(); - return OSystem_SDL::grabRawScreen(surf); + return OSystem_SDL::lockScreen(); +} + +void OSystem_WINCE3::unlockScreen() { + OSystem_SDL::unlockScreen(); } bool OSystem_WINCE3::saveScreenshot(const char *filename) { diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h index 41b71bba02..e74c438807 100644 --- a/backends/platform/wince/wince-sdl.h +++ b/backends/platform/wince/wince-sdl.h @@ -97,7 +97,8 @@ public: void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); void showOverlay(); void hideOverlay(); - bool grabRawScreen(Graphics::Surface *surf); + Graphics::Surface *lockScreen(); + void unlockScreen(); // GUI and action stuff void swap_panel_visibility(); -- cgit v1.2.3 From 129955ab5511a8dbcd78560ee6f46d6a67e43e92 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 20 Jun 2007 19:11:36 +0000 Subject: Fix for bug #1740241 (PSP: revision 27553 doesn't build) svn-id: r27559 --- backends/platform/psp/osys_psp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'backends/platform') diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index c7a5c06051..d5d3669a22 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -27,6 +27,7 @@ #include "common/scummsys.h" #include "common/system.h" #include "backends/intern.h" +#include "graphics/surface.h" #include -- cgit v1.2.3 From bd9ba26109ff741a541204481b6ad8ef15fefd0b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 21 Jun 2007 18:35:15 +0000 Subject: Modified version of patch #1740493 (EVENTS: Event Key Codes) svn-id: r27592 --- backends/platform/sdl/events.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index bc7f0eecde..f865282876 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -265,7 +265,7 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { return true; event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = ev.key.keysym.sym; + event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym; event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode); return true; @@ -278,7 +278,7 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { return true; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = ev.key.keysym.sym; + event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym; event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode); b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState()); @@ -337,19 +337,19 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYDOWN; switch (ev.jbutton.button) { case JOY_BUT_ESCAPE: - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); break; case JOY_BUT_PERIOD: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case JOY_BUT_SPACE: - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); break; case JOY_BUT_F5: - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); break; } @@ -367,19 +367,19 @@ bool OSystem_SDL::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYUP; switch (ev.jbutton.button) { case JOY_BUT_ESCAPE: - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); break; case JOY_BUT_PERIOD: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case JOY_BUT_SPACE: - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); break; case JOY_BUT_F5: - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); break; } -- cgit v1.2.3 From 55f93678b8589b74922609d55774222ee7119f55 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 17:51:51 +0000 Subject: Heavily modified/reduced version of patch #1741454 (EVENTS: ASCII enum) svn-id: r27612 --- backends/platform/sdl/events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index f865282876..8738e63d95 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -52,7 +52,7 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + 315; + return key - SDLK_F1 + ASCII_F1; } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { return key - SDLK_KP0 + '0'; } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { -- cgit v1.2.3 From 2496c5b5549f7b3b3f1d7777812631505f8d578f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 22 Jun 2007 18:57:07 +0000 Subject: fix compile (thanks salty-horse!) svn-id: r27614 --- backends/platform/sdl/events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index 8738e63d95..c13c011efa 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -52,7 +52,7 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + ASCII_F1; + return key - SDLK_F1 + Common::ASCII_F1; } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { return key - SDLK_KP0 + '0'; } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { -- cgit v1.2.3 From 2b23374468549722c8068d448d9bbf5e100d7301 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 20:04:44 +0000 Subject: Converted lots of code to use Common::ASCII_* and COMMON::KEYCODE_* constants. This also revealed the evil mixing of keycodes and ascii we do in many places :-/ svn-id: r27616 --- backends/platform/PalmOS/Src/base_event.cpp | 42 ++-- backends/platform/PalmOS/Src/zodiac_event.cpp | 4 +- backends/platform/dc/input.cpp | 16 +- backends/platform/dc/selector.cpp | 2 +- backends/platform/dc/softkbd.cpp | 4 +- backends/platform/ds/arm9/source/dsmain.cpp | 10 +- backends/platform/ds/arm9/source/dsoptions.cpp | 4 +- backends/platform/ds/arm9/source/touchkeyboard.cpp | 46 ++-- backends/platform/ds/arm9/source/touchkeyboard.h | 69 ------ backends/platform/gp2x/events.cpp | 32 +-- backends/platform/gp32/gp32_osys.cpp | 12 +- backends/platform/morphos/morphos.cpp | 2 +- backends/platform/ps2/ps2input.cpp | 239 ++++++++++--------- backends/platform/ps2/sdlkeys.h | 264 --------------------- backends/platform/psp/osys_psp.cpp | 12 +- backends/platform/psp/osys_psp_gu.cpp | 28 +-- backends/platform/sdl/events.cpp | 12 +- backends/platform/wince/CEActionsSmartphone.cpp | 10 +- 18 files changed, 239 insertions(+), 569 deletions(-) delete mode 100644 backends/platform/ps2/sdlkeys.h (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp index c2220d56a1..620195deeb 100644 --- a/backends/platform/PalmOS/Src/base_event.cpp +++ b/backends/platform/PalmOS/Src/base_event.cpp @@ -104,7 +104,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitLeft; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 276; + event.kbd.keycode = Common::KEYCODE_LEFT; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -115,7 +115,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitRight; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 275; + event.kbd.keycode = Common::KEYCODE_RIGHT; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -126,7 +126,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitUp; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 273; + event.kbd.keycode = Common::KEYCODE_UP; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -137,7 +137,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitDown; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 274; + event.kbd.keycode = Common::KEYCODE_DOWN; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -180,19 +180,19 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { if (gVars->arrowKeys) { if (keyCurrentState & _keyExtra.bitLeft) { _keyExtraPressed |= _keyExtra.bitLeft; - event.kbd.keycode = 276; + event.kbd.keycode = Common::KEYCODE_LEFT; } else if (keyCurrentState & _keyExtra.bitRight) { _keyExtraPressed |= _keyExtra.bitRight; - event.kbd.keycode = 275; + event.kbd.keycode = Common::KEYCODE_RIGHT; } else if (keyCurrentState & _keyExtra.bitUp) { _keyExtraPressed |= _keyExtra.bitUp; - event.kbd.keycode = 273; + event.kbd.keycode = Common::EVENT_KEYUP; } else if (keyCurrentState & _keyExtra.bitDown) { _keyExtraPressed |= _keyExtra.bitDown; - event.kbd.keycode = 274; + event.kbd.keycode = Common::KEYCODE_DOWN; } event.type = Common::EVENT_KEYDOWN; @@ -238,13 +238,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // arrow keys case chrUpArrow: - k = 273; break; + k = Common::KEYCODE_UP; break; case chrDownArrow: - k = 274; break; + k = Common::KEYCODE_DOWN; break; case chrRightArrow: - k = 275; break; + k = Common::KEYCODE_RIGHT; break; case chrLeftArrow: - k = 276; break; + k = Common::KEYCODE_LEFT; break; } if (k) { @@ -261,16 +261,16 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // ESC key case vchrLaunch: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 27; - event.kbd.ascii = 27; + event.kbd.keycode = Common::KEYCODE_ESCAPE; + event.kbd.ascii = Common::KEYCODE_ESCAPE; event.kbd.flags = 0; return true; // F5 = menu case vchrMenu: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 319; - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be changed to KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; @@ -286,13 +286,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // arrow keys case chrUpArrow: - k = 273; break; + k = Common::KEYCODE_UP; break; case chrDownArrow: - k = 274; break; + k = Common::KEYCODE_DOWN; break; case chrRightArrow: - k = 275; break; + k = Common::KEYCODE_RIGHT; break; case chrLeftArrow: - k = 276; break; + k = Common::KEYCODE_LEFT; break; } if (k) { @@ -411,7 +411,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // F1 -> F10 key if (key >= '0' && key <= '9' && mask == (Common::KBD_CTRL|Common::KBD_ALT)) { - key = (key == '0') ? 324 : (315 + key - '1'); + key = (key == '0') ? 324 : (Common::ASCII_F1 + key - '1'); mask = 0; #ifdef STDLIB_TRACE_MEMORY diff --git a/backends/platform/PalmOS/Src/zodiac_event.cpp b/backends/platform/PalmOS/Src/zodiac_event.cpp index 4962ad2b72..3ee2a32654 100644 --- a/backends/platform/PalmOS/Src/zodiac_event.cpp +++ b/backends/platform/PalmOS/Src/zodiac_event.cpp @@ -46,8 +46,8 @@ bool OSystem_PalmZodiac::check_event(Common::Event &event, EventPtr ev) { // F5 = menu case vchrThumbWheelBack: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 319; - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp index 7a5e5911d8..f3638a28db 100644 --- a/backends/platform/dc/input.cpp +++ b/backends/platform/dc/input.cpp @@ -48,7 +48,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = 319; + if(!(buttons & 8)) newkey = Common::ASCII_F5; else if(!(buttons & 512)) newkey = ' '; else if(!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15]; @@ -69,7 +69,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = 319; + if(!(buttons & 8)) newkey = Common::ASCII_F5; mouse_x += pad->cond.mouse.axis1; mouse_y += pad->cond.mouse.axis2; @@ -101,22 +101,22 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, "=¯`{ }+*½<>?" : "-^@[ ];:§,./")[key - 0x2d]; else if(key >= 0x3a && key <= 0x43) - newkey = key+(315-0x3a); + newkey = key+(Common::ASCII_F1-0x3a); else if(key >= 0x54 && key <= 0x57) newkey = "/*-+"[key-0x54]; else switch(key) { case 0x27: case 0x62: newkey = ((shift & 0x22)? '~' : '0'); break; case 0x28: case 0x58: - newkey = 13; break; + newkey = Common::KEYCODE_RETURN; break; case 0x29: - newkey = 27; break; + newkey = Common::KEYCODE_ESCAPE; break; case 0x2a: - newkey = 8; break; + newkey = Common::KEYCODE_BACKSPACE; break; case 0x2b: - newkey = 9; break; + newkey = Common::KEYCODE_TAB; break; case 0x2c: - newkey = ' '; break; + newkey = Common::KEYCODE_SPACE; break; case 0x4c: if((shift & 0x11) && (shift & 0x44)) exit(0); diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp index a4fec642fe..8262a39614 100644 --- a/backends/platform/dc/selector.cpp +++ b/backends/platform/dc/selector.cpp @@ -364,7 +364,7 @@ int gameMenu(Game *games, int num_games) event = handleInput(locked_get_pads(), mousex, mousey, shiftFlags); setimask(mask); - if(event==-Common::EVENT_LBUTTONDOWN || event==13 || event==319) { + if(event==-Common::EVENT_LBUTTONDOWN || event==13 || event==Common::ASCII_F5) { int selected_game = top_game + selector_pos; for(int fade=0; fade<=256; fade+=4) { diff --git a/backends/platform/dc/softkbd.cpp b/backends/platform/dc/softkbd.cpp index e8436fc30a..58b492f6db 100644 --- a/backends/platform/dc/softkbd.cpp +++ b/backends/platform/dc/softkbd.cpp @@ -52,7 +52,7 @@ static const char key_names[] = static const short key_codes[] = { - 27, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + Common::KEYCODE_ESCAPE, Common::ASCII_F1, Common::ASCII_F2, Common::ASCII_F3, Common::ASCII_F4, Common::ASCII_F5, Common::ASCII_F6, Common::ASCII_F7, Common::ASCII_F8, Common::ASCII_F9, Common::ASCII_F10, K('1','!'), K('2','"'), K('3','#'), K('4','$'), K('5','%'), K('6','&'), K('7','\''), K('8','('), K('9',')'), K('0','~'), K('-','='), K('q','Q'), K('w','W'), K('e','E'), K('r','R'), K('t','T'), @@ -61,7 +61,7 @@ static const short key_codes[] = K('h','H'), K('j','J'), K('k','K'), K('l','L'), K(';','+'), K(':','*'), K('z','Z'), K('x','X'), K('c','C'), K('v','V'), K('b','B'), K('n','N'), K('m','M'), K(',','<'), K('.','>'), K('/','?'), K('\\','_'), - ~Common::KBD_SHIFT, ~Common::KBD_CTRL, ~Common::KBD_ALT, ' ', 8, 13 + ~Common::KBD_SHIFT, ~Common::KBD_CTRL, ~Common::KBD_ALT, ' ', Common::KEYCODE_BACKSPACE, Common::KEYCODE_RETURN }; SoftKeyboard::SoftKeyboard(const OSystem_Dreamcast *_os) diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index becb0205cb..be5d0a14a2 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -1226,7 +1226,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysChanged()) & KEY_UP) { event.type = getKeyEvent(leftHandedSwap(KEY_UP)); - event.kbd.keycode = SDLK_UP; + event.kbd.keycode = Common::KEYCODE_UP; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1234,7 +1234,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysChanged()) & KEY_DOWN) { event.type = getKeyEvent(leftHandedSwap(KEY_DOWN)); - event.kbd.keycode = SDLK_DOWN; + event.kbd.keycode = Common::KEYCODE_DOWN; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1242,7 +1242,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysDown()) & KEY_A) { event.type = getKeyEvent(leftHandedSwap(KEY_A)); - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1253,8 +1253,8 @@ void addEventsToQueue() { if ((getKeysChanged() & KEY_START)) { event.type = getKeyEvent(KEY_START); - event.kbd.keycode = 319; // F5 - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; system->addEvent(event); } diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp index 58df3dc863..171d1e044c 100644 --- a/backends/platform/ds/arm9/source/dsoptions.cpp +++ b/backends/platform/ds/arm9/source/dsoptions.cpp @@ -158,8 +158,8 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint Common::Event event; event.type = Common::EVENT_KEYDOWN; - event.kbd.ascii = SDLK_DOWN; - event.kbd.keycode = SDLK_DOWN; + event.kbd.ascii = 0; + event.kbd.keycode = Common::KEYCODE_DOWN; OSystem_DS::instance()->addEvent(event); event.type = Common::EVENT_KEYUP; diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 3f1d6f8064..88e78f165c 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -56,9 +56,9 @@ key_data keys[DS_NUM_KEYS] = { {35, 17, 0, '8'}, {36, 19, 0, '9'}, {27, 21, 0, '0'}, - {45, 23, 0, SDLK_MINUS}, - {50, 25, 0, SDLK_EQUALS}, - {52, 27, 0, SDLK_BACKSPACE}, + {45, 23, 0, Common::KEYCODE_MINUS}, + {50, 25, 0, Common::KEYCODE_EQUALS}, + {52, 27, 0, Common::KEYCODE_BACKSPACE}, // Top row {'Q'-'A' + 1, 4, 2, 'Q'}, @@ -71,8 +71,8 @@ key_data keys[DS_NUM_KEYS] = { {'I'-'A' + 1, 18, 2, 'I'}, {'O'-'A' + 1, 20, 2, 'O'}, {'P'-'A' + 1, 22, 2, 'P'}, - {43, 24, 2, SDLK_LEFTBRACKET}, - {44, 26, 2, SDLK_RIGHTBRACKET}, + {43, 24, 2, Common::KEYCODE_LEFTBRACKET}, + {44, 26, 2, Common::KEYCODE_RIGHTBRACKET}, // Middle row {55, 3, 4, DS_CAPSLOCK}, @@ -85,9 +85,9 @@ key_data keys[DS_NUM_KEYS] = { {'J'-'A' + 1, 17, 4, 'J'}, {'K'-'A' + 1, 19, 4, 'K'}, {'L'-'A' + 1, 21, 4, 'L'}, - {42, 23, 4, SDLK_SEMICOLON}, - {41, 25, 4, SDLK_QUOTE}, - {46, 27, 4, SDLK_RETURN}, + {42, 23, 4, Common::KEYCODE_SEMICOLON}, + {41, 25, 4, Common::KEYCODE_QUOTE}, + {46, 27, 4, Common::KEYCODE_RETURN}, // Bottom row {51, 4, 6, DS_SHIFT}, @@ -98,26 +98,26 @@ key_data keys[DS_NUM_KEYS] = { {'B'-'A' + 1, 14, 6, 'B'}, {'N'-'A' + 1, 16, 6, 'N'}, {'M'-'A' + 1, 18, 6, 'M'}, - {38, 20, 6, SDLK_COMMA}, - {39, 22, 6, SDLK_PERIOD}, - {40, 24, 6, SDLK_SLASH}, + {38, 20, 6, Common::KEYCODE_COMMA}, + {39, 22, 6, Common::KEYCODE_PERIOD}, + {40, 24, 6, Common::KEYCODE_SLASH}, // Space bar - {47, 9, 8, SDLK_SPACE}, - {48, 11, 8, SDLK_SPACE}, - {48, 13, 8, SDLK_SPACE}, - {48, 15, 8, SDLK_SPACE}, - {48, 17, 8, SDLK_SPACE}, - {49, 19, 8, SDLK_SPACE}, + {47, 9, 8, Common::KEYCODE_SPACE}, + {48, 11, 8, Common::KEYCODE_SPACE}, + {48, 13, 8, Common::KEYCODE_SPACE}, + {48, 15, 8, Common::KEYCODE_SPACE}, + {48, 17, 8, Common::KEYCODE_SPACE}, + {49, 19, 8, Common::KEYCODE_SPACE}, // Cursor arrows - {52, 27, 8, SDLK_LEFT}, - {54, 29, 8, SDLK_DOWN}, - {53, 31, 8, SDLK_RIGHT}, - {51, 29, 6, SDLK_UP}, + {52, 27, 8, Common::KEYCODE_LEFT}, + {54, 29, 8, Common::KEYCODE_DOWN}, + {53, 31, 8, Common::KEYCODE_RIGHT}, + {51, 29, 6, Common::KEYCODE_UP}, // Close button - {56, 30, 0, SDLK_UNKNOWN}, + {56, 30, 0, 0}, }; @@ -237,7 +237,7 @@ void addKeyboardEvents() { Common::Event event; // consolePrintf("Key: %d\n", r); - if ((keys[r].character == SDLK_UNKNOWN)) { + if ((keys[r].character == 0)) { // Close button DS::closed = true; } else if ((keys[r].character >= '0') && (keys[r].character <= '9')) { diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h index 53fd25e12a..e8f5fda37e 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.h +++ b/backends/platform/ds/arm9/source/touchkeyboard.h @@ -25,75 +25,6 @@ namespace DS { -enum SDLKey { - SDLK_UNKNOWN = 0, SDLK_FIRST = 0, SDLK_BACKSPACE = 8, SDLK_TAB = 9, - SDLK_CLEAR = 12, SDLK_RETURN = 13, SDLK_PAUSE = 19, SDLK_ESCAPE = 27, - SDLK_SPACE = 32, SDLK_EXCLAIM = 33, SDLK_QUOTEDBL = 34, SDLK_HASH = 35, - SDLK_DOLLAR = 36, SDLK_AMPERSAND = 38, SDLK_QUOTE = 39, SDLK_LEFTPAREN = 40, - SDLK_RIGHTPAREN = 41, SDLK_ASTERISK = 42, SDLK_PLUS = 43, SDLK_COMMA = 44, - SDLK_MINUS = 45, SDLK_PERIOD = 46, SDLK_SLASH = 47, SDLK_0 = 48, - SDLK_1 = 49, SDLK_2 = 50, SDLK_3 = 51, SDLK_4 = 52, - SDLK_5 = 53, SDLK_6 = 54, SDLK_7 = 55, SDLK_8 = 56, - SDLK_9 = 57, SDLK_COLON = 58, SDLK_SEMICOLON = 59, SDLK_LESS = 60, - SDLK_EQUALS = 61, SDLK_GREATER = 62, SDLK_QUESTION = 63, SDLK_AT = 64, - SDLK_LEFTBRACKET = 91, SDLK_BACKSLASH = 92, SDLK_RIGHTBRACKET = 93, SDLK_CARET = 94, - SDLK_UNDERSCORE = 95, SDLK_BACKQUOTE = 96, SDLK_a = 97, SDLK_b = 98, - SDLK_c = 99, SDLK_d = 100, SDLK_e = 101, SDLK_f = 102, - SDLK_g = 103, SDLK_h = 104, SDLK_i = 105, SDLK_j = 106, - SDLK_k = 107, SDLK_l = 108, SDLK_m = 109, SDLK_n = 110, - SDLK_o = 111, SDLK_p = 112, SDLK_q = 113, SDLK_r = 114, - SDLK_s = 115, SDLK_t = 116, SDLK_u = 117, SDLK_v = 118, - SDLK_w = 119, SDLK_x = 120, SDLK_y = 121, SDLK_z = 122, - SDLK_DELETE = 127, SDLK_WORLD_0 = 160, SDLK_WORLD_1 = 161, SDLK_WORLD_2 = 162, - SDLK_WORLD_3 = 163, SDLK_WORLD_4 = 164, SDLK_WORLD_5 = 165, SDLK_WORLD_6 = 166, - SDLK_WORLD_7 = 167, SDLK_WORLD_8 = 168, SDLK_WORLD_9 = 169, SDLK_WORLD_10 = 170, - SDLK_WORLD_11 = 171, SDLK_WORLD_12 = 172, SDLK_WORLD_13 = 173, SDLK_WORLD_14 = 174, - SDLK_WORLD_15 = 175, SDLK_WORLD_16 = 176, SDLK_WORLD_17 = 177, SDLK_WORLD_18 = 178, - SDLK_WORLD_19 = 179, SDLK_WORLD_20 = 180, SDLK_WORLD_21 = 181, SDLK_WORLD_22 = 182, - SDLK_WORLD_23 = 183, SDLK_WORLD_24 = 184, SDLK_WORLD_25 = 185, SDLK_WORLD_26 = 186, - SDLK_WORLD_27 = 187, SDLK_WORLD_28 = 188, SDLK_WORLD_29 = 189, SDLK_WORLD_30 = 190, - SDLK_WORLD_31 = 191, SDLK_WORLD_32 = 192, SDLK_WORLD_33 = 193, SDLK_WORLD_34 = 194, - SDLK_WORLD_35 = 195, SDLK_WORLD_36 = 196, SDLK_WORLD_37 = 197, SDLK_WORLD_38 = 198, - SDLK_WORLD_39 = 199, SDLK_WORLD_40 = 200, SDLK_WORLD_41 = 201, SDLK_WORLD_42 = 202, - SDLK_WORLD_43 = 203, SDLK_WORLD_44 = 204, SDLK_WORLD_45 = 205, SDLK_WORLD_46 = 206, - SDLK_WORLD_47 = 207, SDLK_WORLD_48 = 208, SDLK_WORLD_49 = 209, SDLK_WORLD_50 = 210, - SDLK_WORLD_51 = 211, SDLK_WORLD_52 = 212, SDLK_WORLD_53 = 213, SDLK_WORLD_54 = 214, - SDLK_WORLD_55 = 215, SDLK_WORLD_56 = 216, SDLK_WORLD_57 = 217, SDLK_WORLD_58 = 218, - SDLK_WORLD_59 = 219, SDLK_WORLD_60 = 220, SDLK_WORLD_61 = 221, SDLK_WORLD_62 = 222, - SDLK_WORLD_63 = 223, SDLK_WORLD_64 = 224, SDLK_WORLD_65 = 225, SDLK_WORLD_66 = 226, - SDLK_WORLD_67 = 227, SDLK_WORLD_68 = 228, SDLK_WORLD_69 = 229, SDLK_WORLD_70 = 230, - SDLK_WORLD_71 = 231, SDLK_WORLD_72 = 232, SDLK_WORLD_73 = 233, SDLK_WORLD_74 = 234, - SDLK_WORLD_75 = 235, SDLK_WORLD_76 = 236, SDLK_WORLD_77 = 237, SDLK_WORLD_78 = 238, - SDLK_WORLD_79 = 239, SDLK_WORLD_80 = 240, SDLK_WORLD_81 = 241, SDLK_WORLD_82 = 242, - SDLK_WORLD_83 = 243, SDLK_WORLD_84 = 244, SDLK_WORLD_85 = 245, SDLK_WORLD_86 = 246, - SDLK_WORLD_87 = 247, SDLK_WORLD_88 = 248, SDLK_WORLD_89 = 249, SDLK_WORLD_90 = 250, - SDLK_WORLD_91 = 251, SDLK_WORLD_92 = 252, SDLK_WORLD_93 = 253, SDLK_WORLD_94 = 254, - SDLK_WORLD_95 = 255, SDLK_KP0 = 256, SDLK_KP1 = 257, SDLK_KP2 = 258, - SDLK_KP3 = 259, SDLK_KP4 = 260, SDLK_KP5 = 261, SDLK_KP6 = 262, - SDLK_KP7 = 263, SDLK_KP8 = 264, SDLK_KP9 = 265, SDLK_KP_PERIOD = 266, - SDLK_KP_DIVIDE = 267, SDLK_KP_MULTIPLY = 268, SDLK_KP_MINUS = 269, SDLK_KP_PLUS = 270, - SDLK_KP_ENTER = 271, SDLK_KP_EQUALS = 272, SDLK_UP = 273, SDLK_DOWN = 274, - SDLK_RIGHT = 275, SDLK_LEFT = 276, SDLK_INSERT = 277, SDLK_HOME = 278, - SDLK_END = 279, SDLK_PAGEUP = 280, SDLK_PAGEDOWN = 281, SDLK_F1 = 282, - SDLK_F2 = 283, SDLK_F3 = 284, SDLK_F4 = 285, SDLK_F5 = 286, - SDLK_F6 = 287, SDLK_F7 = 288, SDLK_F8 = 289, SDLK_F9 = 290, - SDLK_F10 = 291, SDLK_F11 = 292, SDLK_F12 = 293, SDLK_F13 = 294, - SDLK_F14 = 295, SDLK_F15 = 296, SDLK_NUMLOCK = 300, SDLK_CAPSLOCK = 301, - SDLK_SCROLLOCK = 302, SDLK_RSHIFT = 303, SDLK_LSHIFT = 304, SDLK_RCTRL = 305, - SDLK_LCTRL = 306, SDLK_RALT = 307, SDLK_LALT = 308, SDLK_RMETA = 309, - SDLK_LMETA = 310, SDLK_LSUPER = 311, SDLK_RSUPER = 312, SDLK_MODE = 313, - SDLK_COMPOSE = 314, SDLK_HELP = 315, SDLK_PRINT = 316, SDLK_SYSREQ = 317, - SDLK_BREAK = 318, SDLK_MENU = 319, SDLK_POWER = 320, SDLK_EURO = 321, - SDLK_UNDO = 322, SDLK_LAST -}; - -enum SDLMod { - KMOD_NONE = 0x0000, KMOD_LSHIFT = 0x0001, KMOD_RSHIFT = 0x0002, KMOD_LCTRL = 0x0040, - KMOD_RCTRL = 0x0080, KMOD_LALT = 0x0100, KMOD_RALT = 0x0200, KMOD_LMETA = 0x0400, - KMOD_RMETA = 0x0800, KMOD_NUM = 0x1000, KMOD_CAPS = 0x2000, KMOD_MODE = 0x4000, - KMOD_RESERVED = 0x8000 -}; - void drawKeyboard(int tileBase, int mapBase, u16* saveSpace); void restoreVRAM(int tileBase, int mapBase, u16* saveSpace); void addKeyboardEvents(); diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp index 80cdad924b..72b188afd2 100644 --- a/backends/platform/gp2x/events.cpp +++ b/backends/platform/gp2x/events.cpp @@ -65,7 +65,7 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + 315; + return key - SDLK_F1 + Common::ASCII_F1; } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { return key - SDLK_KP0 + '0'; } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { @@ -468,10 +468,10 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { break; case GP2X_BUTTON_R: if (GP2X_BUTTON_STATE_L == TRUE) { - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0); } else { - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); } break; @@ -479,28 +479,28 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { event.type = Common::EVENT_QUIT; } else { - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); } break; case GP2X_BUTTON_A: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_Y: if (GP2X_BUTTON_STATE_L == TRUE) { setZoomOnMouse(); } else { - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); } break; case JOY_BUT_RETURN: - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0); break; case JOY_BUT_ZERO: - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0); break; @@ -514,7 +514,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { // displayMessageOnOSD("Left Trigger Pressed"); // break; // } else if ((ev.jbutton.button == GP2X_BUTTON_R) && (ev.jbutton.button != GP2X_BUTTON_L)) { - // event.kbd.keycode = SDLK_F5; + // event.kbd.keycode = Common::KEYCODE_F5; // event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); // break; // } else { @@ -525,7 +525,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { displayMessageOnOSD("Setting CPU Speed at 230MHz"); GP2X_setCpuspeed(200); - //event.kbd.keycode = SDLK_PLUS; + //event.kbd.keycode = Common::KEYCODE_PLUS; //event.kbd.ascii = mapKey(SDLK_PLUS, ev.key.keysym.mod, 0); } else { GP2X_mixer_move_volume(1); @@ -536,7 +536,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { displayMessageOnOSD("Setting CPU Speed at 60MHz"); GP2X_setCpuspeed(60); - //event.kbd.keycode = SDLK_MINUS; + //event.kbd.keycode = Common::KEYCODE_MINUS; //event.kbd.ascii = mapKey(SDLK_MINUS, ev.key.keysym.mod, 0); } else { GP2X_mixer_move_volume(0); @@ -564,26 +564,26 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { event.kbd.flags = 0; switch (ev.jbutton.button) { case GP2X_BUTTON_SELECT: - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_A: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_Y: -// event.kbd.keycode = SDLK_SPACE; +// event.kbd.keycode = Common::KEYCODE_SPACE; // event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_START: - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_L: GP2X_BUTTON_STATE_L = FALSE; break; case GP2X_BUTTON_R: - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_VOLUP: diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp index 1cb5eb2d9f..1f07b0660d 100644 --- a/backends/platform/gp32/gp32_osys.cpp +++ b/backends/platform/gp32/gp32_osys.cpp @@ -528,8 +528,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYDOWN; if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; - else - event.kbd.keycode = event.kbd.ascii = 319; + else { + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; + } return true; } if (ev.button == GPC_VK_SELECT) { // SELECT = pause @@ -600,8 +602,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYUP; if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; - else - event.kbd.keycode = event.kbd.ascii = 319; + else { + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; + } return true; } if (ev.button == GPC_VK_SELECT) { diff --git a/backends/platform/morphos/morphos.cpp b/backends/platform/morphos/morphos.cpp index 66525a7664..7375ecbe46 100644 --- a/backends/platform/morphos/morphos.cpp +++ b/backends/platform/morphos/morphos.cpp @@ -838,7 +838,7 @@ bool OSystem_MorphOS::pollEvent(Common::Event &event) /* * Function key */ - event.kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+315; + event.kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+Common::ASCII_F1; event.kbd.keycode = 0; } else if (ScummMsg->Code == RAWKEY_F11 || ScummMsg->Code == RAWKEY_F12) diff --git a/backends/platform/ps2/ps2input.cpp b/backends/platform/ps2/ps2input.cpp index a3f4a31e8f..a17d38b80d 100644 --- a/backends/platform/ps2/ps2input.cpp +++ b/backends/platform/ps2/ps2input.cpp @@ -31,7 +31,6 @@ #include "backends/platform/ps2/ps2input.h" #include "backends/platform/ps2/ps2pad.h" #include "backends/platform/ps2/systemps2.h" -#include "backends/platform/ps2/sdlkeys.h" #include "common/events.h" #include "common/system.h" @@ -96,15 +95,15 @@ void Ps2Input::warpTo(uint16 x, uint16 y) { #define PAD_CHECK_TIME 20 int Ps2Input::mapKey(int key, int mod) { // copied from sdl backend - if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + 315; - } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { - return key - SDLK_KP0 + '0'; - } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { + if (key >= Common::KEYCODE_F1 && key <= Common::KEYCODE_F9) { + return key - Common::KEYCODE_F1 + Common::ASCII_F1; + } else if (key >= Common::KEYCODE_KP0 && key <= Common::KEYCODE_KP9) { + return key - Common::KEYCODE_KP0 + '0'; + } else if (key >= Common::KEYCODE_UP && key <= Common::KEYCODE_PAGEDOWN) { return key; } else if (key >= 'a' && key <= 'z' && mod & Common::KBD_SHIFT) { return key & ~0x20; - } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) { + } else if (key >= Common::KEYCODE_NUMLOCK && key <= Common::KEYCODE_EURO) { return 0; } return key; @@ -142,17 +141,17 @@ bool Ps2Input::pollEvent(Common::Event *event) { PS2KbdRawKey key; if (PS2KbdReadRaw(&key) == 1) { if (_usbToSdlk[key.key]) { - if ((_usbToSdlk[key.key] == SDLK_LSHIFT) || (_usbToSdlk[key.key] == SDLK_RSHIFT)) { + if ((_usbToSdlk[key.key] == Common::KEYCODE_LSHIFT) || (_usbToSdlk[key.key] == Common::KEYCODE_RSHIFT)) { if (key.state & 1) _keyFlags |= Common::KBD_SHIFT; else _keyFlags &= ~Common::KBD_SHIFT; - } else if ((_usbToSdlk[key.key] == SDLK_LCTRL) || (_usbToSdlk[key.key] == SDLK_RCTRL)) { + } else if ((_usbToSdlk[key.key] == Common::KEYCODE_LCTRL) || (_usbToSdlk[key.key] == Common::KEYCODE_RCTRL)) { if (key.state & 1) _keyFlags |= Common::KBD_CTRL; else _keyFlags &= ~Common::KBD_CTRL; - } else if ((_usbToSdlk[key.key] == SDLK_LALT) || (_usbToSdlk[key.key] == SDLK_RALT)) { + } else if ((_usbToSdlk[key.key] == Common::KEYCODE_LALT) || (_usbToSdlk[key.key] == Common::KEYCODE_RALT)) { if (key.state & 1) _keyFlags |= Common::KBD_ALT; else @@ -256,106 +255,106 @@ const int Ps2Input::_usbToSdlk[0x100] = { /* 01 */ 0, /* 02 */ 0, /* 03 */ 0, - /* 04 */ SDLK_a, - /* 05 */ SDLK_b, - /* 06 */ SDLK_c, - /* 07 */ SDLK_d, - /* 08 */ SDLK_e, - /* 09 */ SDLK_f, - /* 0A */ SDLK_g, - /* 0B */ SDLK_h, - /* 0C */ SDLK_i, - /* 0D */ SDLK_j, - /* 0E */ SDLK_k, - /* 0F */ SDLK_l, - /* 10 */ SDLK_m, - /* 11 */ SDLK_n, - /* 12 */ SDLK_o, - /* 13 */ SDLK_p, - /* 14 */ SDLK_q, - /* 15 */ SDLK_r, - /* 16 */ SDLK_s, - /* 17 */ SDLK_t, - /* 18 */ SDLK_u, - /* 19 */ SDLK_v, - /* 1A */ SDLK_w, - /* 1B */ SDLK_x, - /* 1C */ SDLK_y, - /* 1D */ SDLK_z, - /* 1E */ SDLK_1, - /* 1F */ SDLK_2, - /* 20 */ SDLK_3, - /* 21 */ SDLK_4, - /* 22 */ SDLK_5, - /* 23 */ SDLK_6, - /* 24 */ SDLK_7, - /* 25 */ SDLK_8, - /* 26 */ SDLK_9, - /* 27 */ SDLK_0, - /* 28 */ SDLK_RETURN, - /* 29 */ SDLK_ESCAPE, - /* 2A */ SDLK_BACKSPACE, - /* 2B */ SDLK_TAB, - /* 2C */ SDLK_SPACE, - /* 2D */ SDLK_MINUS, - /* 2E */ SDLK_EQUALS, - /* 2F */ SDLK_LEFTBRACKET, - /* 30 */ SDLK_RIGHTBRACKET, - /* 31 */ SDLK_BACKSLASH, - /* 32 */ SDLK_HASH, - /* 33 */ SDLK_SEMICOLON, - /* 34 */ SDLK_QUOTE, - /* 35 */ SDLK_BACKQUOTE, - /* 36 */ SDLK_COMMA, - /* 37 */ SDLK_PERIOD, - /* 38 */ SDLK_SLASH, - /* 39 */ SDLK_CAPSLOCK, - /* 3A */ SDLK_F1, - /* 3B */ SDLK_F2, - /* 3C */ SDLK_F3, - /* 3D */ SDLK_F4, - /* 3E */ SDLK_F5, - /* 3F */ SDLK_F6, - /* 40 */ SDLK_F7, - /* 41 */ SDLK_F8, - /* 42 */ SDLK_F9, - /* 43 */ SDLK_F10, - /* 44 */ SDLK_F11, - /* 45 */ SDLK_F12, - /* 46 */ SDLK_PRINT, - /* 47 */ SDLK_SCROLLOCK, - /* 48 */ SDLK_PAUSE, - /* 49 */ SDLK_INSERT, - /* 4A */ SDLK_HOME, - /* 4B */ SDLK_PAGEUP, - /* 4C */ SDLK_DELETE, - /* 4D */ SDLK_END, - /* 4E */ SDLK_PAGEDOWN, - /* 4F */ SDLK_RIGHT, - /* 50 */ SDLK_LEFT, - /* 51 */ SDLK_DOWN, - /* 52 */ SDLK_UP, - /* 53 */ SDLK_NUMLOCK, - /* 54 */ SDLK_KP_DIVIDE, - /* 55 */ SDLK_KP_MULTIPLY, - /* 56 */ SDLK_KP_MINUS, - /* 57 */ SDLK_KP_PLUS, - /* 58 */ SDLK_KP_ENTER, - /* 59 */ SDLK_KP1, - /* 5A */ SDLK_KP2, - /* 5B */ SDLK_KP3, - /* 5C */ SDLK_KP4, - /* 5D */ SDLK_KP5, - /* 5E */ SDLK_KP6, - /* 5F */ SDLK_KP7, - /* 60 */ SDLK_KP8, - /* 61 */ SDLK_KP9, - /* 62 */ SDLK_KP0, - /* 63 */ SDLK_KP_PERIOD, + /* 04 */ Common::KEYCODE_a, + /* 05 */ Common::KEYCODE_b, + /* 06 */ Common::KEYCODE_c, + /* 07 */ Common::KEYCODE_d, + /* 08 */ Common::KEYCODE_e, + /* 09 */ Common::KEYCODE_f, + /* 0A */ Common::KEYCODE_g, + /* 0B */ Common::KEYCODE_h, + /* 0C */ Common::KEYCODE_i, + /* 0D */ Common::KEYCODE_j, + /* 0E */ Common::KEYCODE_k, + /* 0F */ Common::KEYCODE_l, + /* 10 */ Common::KEYCODE_m, + /* 11 */ Common::KEYCODE_n, + /* 12 */ Common::KEYCODE_o, + /* 13 */ Common::KEYCODE_p, + /* 14 */ Common::KEYCODE_q, + /* 15 */ Common::KEYCODE_r, + /* 16 */ Common::KEYCODE_s, + /* 17 */ Common::KEYCODE_t, + /* 18 */ Common::KEYCODE_u, + /* 19 */ Common::KEYCODE_v, + /* 1A */ Common::KEYCODE_w, + /* 1B */ Common::KEYCODE_x, + /* 1C */ Common::KEYCODE_y, + /* 1D */ Common::KEYCODE_z, + /* 1E */ Common::KEYCODE_1, + /* 1F */ Common::KEYCODE_2, + /* 20 */ Common::KEYCODE_3, + /* 21 */ Common::KEYCODE_4, + /* 22 */ Common::KEYCODE_5, + /* 23 */ Common::KEYCODE_6, + /* 24 */ Common::KEYCODE_7, + /* 25 */ Common::KEYCODE_8, + /* 26 */ Common::KEYCODE_9, + /* 27 */ Common::KEYCODE_0, + /* 28 */ Common::KEYCODE_RETURN, + /* 29 */ Common::KEYCODE_ESCAPE, + /* 2A */ Common::KEYCODE_BACKSPACE, + /* 2B */ Common::KEYCODE_TAB, + /* 2C */ Common::KEYCODE_SPACE, + /* 2D */ Common::KEYCODE_MINUS, + /* 2E */ Common::KEYCODE_EQUALS, + /* 2F */ Common::KEYCODE_LEFTBRACKET, + /* 30 */ Common::KEYCODE_RIGHTBRACKET, + /* 31 */ Common::KEYCODE_BACKSLASH, + /* 32 */ Common::KEYCODE_HASH, + /* 33 */ Common::KEYCODE_SEMICOLON, + /* 34 */ Common::KEYCODE_QUOTE, + /* 35 */ Common::KEYCODE_BACKQUOTE, + /* 36 */ Common::KEYCODE_COMMA, + /* 37 */ Common::KEYCODE_PERIOD, + /* 38 */ Common::KEYCODE_SLASH, + /* 39 */ Common::KEYCODE_CAPSLOCK, + /* 3A */ Common::KEYCODE_F1, + /* 3B */ Common::KEYCODE_F2, + /* 3C */ Common::KEYCODE_F3, + /* 3D */ Common::KEYCODE_F4, + /* 3E */ Common::KEYCODE_F5, + /* 3F */ Common::KEYCODE_F6, + /* 40 */ Common::KEYCODE_F7, + /* 41 */ Common::KEYCODE_F8, + /* 42 */ Common::KEYCODE_F9, + /* 43 */ Common::KEYCODE_F10, + /* 44 */ Common::KEYCODE_F11, + /* 45 */ Common::KEYCODE_F12, + /* 46 */ Common::KEYCODE_PRINT, + /* 47 */ Common::KEYCODE_SCROLLOCK, + /* 48 */ Common::KEYCODE_PAUSE, + /* 49 */ Common::KEYCODE_INSERT, + /* 4A */ Common::KEYCODE_HOME, + /* 4B */ Common::KEYCODE_PAGEUP, + /* 4C */ Common::KEYCODE_DELETE, + /* 4D */ Common::KEYCODE_END, + /* 4E */ Common::KEYCODE_PAGEDOWN, + /* 4F */ Common::KEYCODE_RIGHT, + /* 50 */ Common::KEYCODE_LEFT, + /* 51 */ Common::KEYCODE_DOWN, + /* 52 */ Common::KEYCODE_UP, + /* 53 */ Common::KEYCODE_NUMLOCK, + /* 54 */ Common::KEYCODE_KP_DIVIDE, + /* 55 */ Common::KEYCODE_KP_MULTIPLY, + /* 56 */ Common::KEYCODE_KP_MINUS, + /* 57 */ Common::KEYCODE_KP_PLUS, + /* 58 */ Common::KEYCODE_KP_ENTER, + /* 59 */ Common::KEYCODE_KP1, + /* 5A */ Common::KEYCODE_KP2, + /* 5B */ Common::KEYCODE_KP3, + /* 5C */ Common::KEYCODE_KP4, + /* 5D */ Common::KEYCODE_KP5, + /* 5E */ Common::KEYCODE_KP6, + /* 5F */ Common::KEYCODE_KP7, + /* 60 */ Common::KEYCODE_KP8, + /* 61 */ Common::KEYCODE_KP9, + /* 62 */ Common::KEYCODE_KP0, + /* 63 */ Common::KEYCODE_KP_PERIOD, /* 64 */ 0, /* 65 */ 0, /* 66 */ 0, - /* 67 */ SDLK_KP_EQUALS, + /* 67 */ Common::KEYCODE_KP_EQUALS, /* 68 */ 0, /* 69 */ 0, /* 6A */ 0, @@ -476,13 +475,13 @@ const int Ps2Input::_usbToSdlk[0x100] = { /* DD */ 0, /* DE */ 0, /* DF */ 0, - /* E0 */ SDLK_LCTRL, - /* E1 */ SDLK_LSHIFT, - /* E2 */ SDLK_LALT, + /* E0 */ Common::KEYCODE_LCTRL, + /* E1 */ Common::KEYCODE_LSHIFT, + /* E2 */ Common::KEYCODE_LALT, /* E3 */ 0, - /* E4 */ SDLK_RCTRL, - /* E5 */ SDLK_RSHIFT, - /* E6 */ SDLK_RALT, + /* E4 */ Common::KEYCODE_RCTRL, + /* E5 */ Common::KEYCODE_RSHIFT, + /* E6 */ Common::KEYCODE_RALT, /* E7 */ 0, /* E8 */ 0, /* E9 */ 0, @@ -511,22 +510,22 @@ const int Ps2Input::_usbToSdlk[0x100] = { }; const int Ps2Input::_padCodes[16] = { - SDLK_1, // Select + Common::KEYCODE_1, // Select 0, // L3 0, // R3 - SDLK_F5, // Start + Common::KEYCODE_F5, // Start 0, // Up 0, // Right 0, // Down 0, // Left - SDLK_KP0, // L2 + Common::KEYCODE_KP0, // L2 0, // R2 - SDLK_n, // L1 - SDLK_y, // R1 - SDLK_ESCAPE, // Triangle + Common::KEYCODE_n, // L1 + Common::KEYCODE_y, // R1 + Common::KEYCODE_ESCAPE, // Triangle 0, // Circle => Right mouse button 0, // Cross => Left mouse button - SDLK_RETURN // Square + Common::KEYCODE_RETURN // Square }; const int Ps2Input::_padFlags[16] = { diff --git a/backends/platform/ps2/sdlkeys.h b/backends/platform/ps2/sdlkeys.h deleted file mode 100644 index b2f783cedd..0000000000 --- a/backends/platform/ps2/sdlkeys.h +++ /dev/null @@ -1,264 +0,0 @@ -/* copied from SDK_keysym.h */ - -#ifndef __SDLKEYS_H__ -#define __SDLKEYS_H__ - -enum SdlKeyCodes { - SDLK_UNKNOWN = 0, - SDLK_FIRST = 0, - SDLK_BACKSPACE = 8, - SDLK_TAB = 9, - SDLK_CLEAR = 12, - SDLK_RETURN = 13, - SDLK_PAUSE = 19, - SDLK_ESCAPE = 27, - SDLK_SPACE = 32, - SDLK_EXCLAIM = 33, - SDLK_QUOTEDBL = 34, - SDLK_HASH = 35, - SDLK_DOLLAR = 36, - SDLK_AMPERSAND = 38, - SDLK_QUOTE = 39, - SDLK_LEFTPAREN = 40, - SDLK_RIGHTPAREN = 41, - SDLK_ASTERISK = 42, - SDLK_PLUS = 43, - SDLK_COMMA = 44, - SDLK_MINUS = 45, - SDLK_PERIOD = 46, - SDLK_SLASH = 47, - SDLK_0 = 48, - SDLK_1 = 49, - SDLK_2 = 50, - SDLK_3 = 51, - SDLK_4 = 52, - SDLK_5 = 53, - SDLK_6 = 54, - SDLK_7 = 55, - SDLK_8 = 56, - SDLK_9 = 57, - SDLK_COLON = 58, - SDLK_SEMICOLON = 59, - SDLK_LESS = 60, - SDLK_EQUALS = 61, - SDLK_GREATER = 62, - SDLK_QUESTION = 63, - SDLK_AT = 64, - /* - Skip uppercase letters - */ - SDLK_LEFTBRACKET = 91, - SDLK_BACKSLASH = 92, - SDLK_RIGHTBRACKET = 93, - SDLK_CARET = 94, - SDLK_UNDERSCORE = 95, - SDLK_BACKQUOTE = 96, - SDLK_a = 97, - SDLK_b = 98, - SDLK_c = 99, - SDLK_d = 100, - SDLK_e = 101, - SDLK_f = 102, - SDLK_g = 103, - SDLK_h = 104, - SDLK_i = 105, - SDLK_j = 106, - SDLK_k = 107, - SDLK_l = 108, - SDLK_m = 109, - SDLK_n = 110, - SDLK_o = 111, - SDLK_p = 112, - SDLK_q = 113, - SDLK_r = 114, - SDLK_s = 115, - SDLK_t = 116, - SDLK_u = 117, - SDLK_v = 118, - SDLK_w = 119, - SDLK_x = 120, - SDLK_y = 121, - SDLK_z = 122, - SDLK_DELETE = 127, - /* End of ASCII mapped keysyms */ - - /* International keyboard syms */ - SDLK_WORLD_0 = 160, /* 0xA0 */ - SDLK_WORLD_1 = 161, - SDLK_WORLD_2 = 162, - SDLK_WORLD_3 = 163, - SDLK_WORLD_4 = 164, - SDLK_WORLD_5 = 165, - SDLK_WORLD_6 = 166, - SDLK_WORLD_7 = 167, - SDLK_WORLD_8 = 168, - SDLK_WORLD_9 = 169, - SDLK_WORLD_10 = 170, - SDLK_WORLD_11 = 171, - SDLK_WORLD_12 = 172, - SDLK_WORLD_13 = 173, - SDLK_WORLD_14 = 174, - SDLK_WORLD_15 = 175, - SDLK_WORLD_16 = 176, - SDLK_WORLD_17 = 177, - SDLK_WORLD_18 = 178, - SDLK_WORLD_19 = 179, - SDLK_WORLD_20 = 180, - SDLK_WORLD_21 = 181, - SDLK_WORLD_22 = 182, - SDLK_WORLD_23 = 183, - SDLK_WORLD_24 = 184, - SDLK_WORLD_25 = 185, - SDLK_WORLD_26 = 186, - SDLK_WORLD_27 = 187, - SDLK_WORLD_28 = 188, - SDLK_WORLD_29 = 189, - SDLK_WORLD_30 = 190, - SDLK_WORLD_31 = 191, - SDLK_WORLD_32 = 192, - SDLK_WORLD_33 = 193, - SDLK_WORLD_34 = 194, - SDLK_WORLD_35 = 195, - SDLK_WORLD_36 = 196, - SDLK_WORLD_37 = 197, - SDLK_WORLD_38 = 198, - SDLK_WORLD_39 = 199, - SDLK_WORLD_40 = 200, - SDLK_WORLD_41 = 201, - SDLK_WORLD_42 = 202, - SDLK_WORLD_43 = 203, - SDLK_WORLD_44 = 204, - SDLK_WORLD_45 = 205, - SDLK_WORLD_46 = 206, - SDLK_WORLD_47 = 207, - SDLK_WORLD_48 = 208, - SDLK_WORLD_49 = 209, - SDLK_WORLD_50 = 210, - SDLK_WORLD_51 = 211, - SDLK_WORLD_52 = 212, - SDLK_WORLD_53 = 213, - SDLK_WORLD_54 = 214, - SDLK_WORLD_55 = 215, - SDLK_WORLD_56 = 216, - SDLK_WORLD_57 = 217, - SDLK_WORLD_58 = 218, - SDLK_WORLD_59 = 219, - SDLK_WORLD_60 = 220, - SDLK_WORLD_61 = 221, - SDLK_WORLD_62 = 222, - SDLK_WORLD_63 = 223, - SDLK_WORLD_64 = 224, - SDLK_WORLD_65 = 225, - SDLK_WORLD_66 = 226, - SDLK_WORLD_67 = 227, - SDLK_WORLD_68 = 228, - SDLK_WORLD_69 = 229, - SDLK_WORLD_70 = 230, - SDLK_WORLD_71 = 231, - SDLK_WORLD_72 = 232, - SDLK_WORLD_73 = 233, - SDLK_WORLD_74 = 234, - SDLK_WORLD_75 = 235, - SDLK_WORLD_76 = 236, - SDLK_WORLD_77 = 237, - SDLK_WORLD_78 = 238, - SDLK_WORLD_79 = 239, - SDLK_WORLD_80 = 240, - SDLK_WORLD_81 = 241, - SDLK_WORLD_82 = 242, - SDLK_WORLD_83 = 243, - SDLK_WORLD_84 = 244, - SDLK_WORLD_85 = 245, - SDLK_WORLD_86 = 246, - SDLK_WORLD_87 = 247, - SDLK_WORLD_88 = 248, - SDLK_WORLD_89 = 249, - SDLK_WORLD_90 = 250, - SDLK_WORLD_91 = 251, - SDLK_WORLD_92 = 252, - SDLK_WORLD_93 = 253, - SDLK_WORLD_94 = 254, - SDLK_WORLD_95 = 255, /* 0xFF */ - - /* Numeric keypad */ - SDLK_KP0 = 256, - SDLK_KP1 = 257, - SDLK_KP2 = 258, - SDLK_KP3 = 259, - SDLK_KP4 = 260, - SDLK_KP5 = 261, - SDLK_KP6 = 262, - SDLK_KP7 = 263, - SDLK_KP8 = 264, - SDLK_KP9 = 265, - SDLK_KP_PERIOD = 266, - SDLK_KP_DIVIDE = 267, - SDLK_KP_MULTIPLY = 268, - SDLK_KP_MINUS = 269, - SDLK_KP_PLUS = 270, - SDLK_KP_ENTER = 271, - SDLK_KP_EQUALS = 272, - - /* Arrows + Home/End pad */ - SDLK_UP = 273, - SDLK_DOWN = 274, - SDLK_RIGHT = 275, - SDLK_LEFT = 276, - SDLK_INSERT = 277, - SDLK_HOME = 278, - SDLK_END = 279, - SDLK_PAGEUP = 280, - SDLK_PAGEDOWN = 281, - - /* Function keys */ - SDLK_F1 = 282, - SDLK_F2 = 283, - SDLK_F3 = 284, - SDLK_F4 = 285, - SDLK_F5 = 286, - SDLK_F6 = 287, - SDLK_F7 = 288, - SDLK_F8 = 289, - SDLK_F9 = 290, - SDLK_F10 = 291, - SDLK_F11 = 292, - SDLK_F12 = 293, - SDLK_F13 = 294, - SDLK_F14 = 295, - SDLK_F15 = 296, - - /* Key state modifier keys */ - SDLK_NUMLOCK = 300, - SDLK_CAPSLOCK = 301, - SDLK_SCROLLOCK = 302, - SDLK_RSHIFT = 303, - SDLK_LSHIFT = 304, - SDLK_RCTRL = 305, - SDLK_LCTRL = 306, - SDLK_RALT = 307, - SDLK_LALT = 308, - SDLK_RMETA = 309, - SDLK_LMETA = 310, - SDLK_LSUPER = 311, /* Left "Windows" key */ - SDLK_RSUPER = 312, /* Right "Windows" key */ - SDLK_MODE = 313, /* "Alt Gr" key */ - SDLK_COMPOSE = 314, /* Multi-key compose key */ - - /* Miscellaneous function keys */ - SDLK_HELP = 315, - SDLK_PRINT = 316, - SDLK_SYSREQ = 317, - SDLK_BREAK = 318, - SDLK_MENU = 319, - SDLK_POWER = 320, /* Power Macintosh power key */ - SDLK_EURO = 321, /* Some european keyboards */ - SDLK_UNDO = 322, /* Atari keyboard has Undo */ - - /* Add any other keys here */ - - SDLK_LAST -}; - -#endif - - diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index f7c18e5142..20a50c1b47 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -447,19 +447,19 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { event.kbd.flags = 0; if (buttonsChanged & PSP_CTRL_LTRIGGER) { - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = 27; } else if (buttonsChanged & PSP_CTRL_RTRIGGER) { - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = 13; } else if (buttonsChanged & PSP_CTRL_START) { - event.kbd.keycode = SDLK_F5; - event.kbd.ascii = 319; + event.kbd.keycode = Common::KEYCODE_F5; + event.kbd.ascii = Common::ASCII_F5; /* } else if (buttonsChanged & PSP_CTRL_SELECT) { - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = '0'; */ } else if (buttonsChanged & PSP_CTRL_SQUARE) { - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = '.'; } diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index 5175460007..d40f1559ec 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -59,11 +59,11 @@ unsigned char *keyboard_letters; unsigned char *keyboard_letters_shift; unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', '`'}; -unsigned int kbd_code[] = {SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0, SDLK_MINUS, SDLK_EQUALS, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET, - SDLK_BACKSLASH, SDLK_SEMICOLON, SDLK_QUOTE, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_BACKQUOTE}; +unsigned int kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, + Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -unsigned int kbd_code_cl[] = {SDLK_EXCLAIM, SDLK_AT, SDLK_HASH, SDLK_DOLLAR, 37, SDLK_CARET, SDLK_AMPERSAND, SDLK_ASTERISK, SDLK_LEFTPAREN, SDLK_RIGHTPAREN, SDLK_UNDERSCORE, - SDLK_PLUS, 123, 125, 124, SDLK_COLON, SDLK_QUOTEDBL, SDLK_LESS, SDLK_GREATER, SDLK_QUESTION, 126}; +unsigned int kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, + Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) @@ -487,7 +487,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_LEFT) && !(pad.Buttons & PSP_CTRL_LEFT)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_LEFT; + event.kbd.keycode = Common::KEYCODE_LEFT; _prevButtons = pad.Buttons; return true; } @@ -495,7 +495,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_RIGHT) && !(pad.Buttons & PSP_CTRL_RIGHT)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_RIGHT; + event.kbd.keycode = Common::KEYCODE_RIGHT; _prevButtons = pad.Buttons; return true; } @@ -503,7 +503,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_UP) && !(pad.Buttons & PSP_CTRL_UP)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_UP; + event.kbd.keycode = Common::KEYCODE_UP; _prevButtons = pad.Buttons; return true; } @@ -511,7 +511,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_DOWN) && !(pad.Buttons & PSP_CTRL_DOWN)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_DOWN; + event.kbd.keycode = Common::KEYCODE_DOWN; _prevButtons = pad.Buttons; return true; } @@ -535,19 +535,19 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { switch(_keySelected) { case 27: event.kbd.ascii = ' '; - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; break; case 28: event.kbd.ascii = 127; - event.kbd.keycode = SDLK_DELETE; + event.kbd.keycode = Common::KEYCODE_DELETE; break; case 29: event.kbd.ascii = 8; - event.kbd.keycode = SDLK_BACKSPACE; + event.kbd.keycode = Common::KEYCODE_BACKSPACE; break; case 30: event.kbd.ascii = 13; - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; break; } } else { @@ -555,11 +555,11 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { case 0: event.kbd.flags = 0; event.kbd.ascii = 'a'+_keySelected-1; - event.kbd.keycode = SDLK_a + _keySelected-1; + event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; break; case CAPS_LOCK: event.kbd.ascii = 'A'+_keySelected-1; - event.kbd.keycode = SDLK_a + _keySelected-1; + event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; event.kbd.flags = Common::KBD_SHIFT; break; case SYMBOLS: diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index c13c011efa..56636dfaa9 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -455,21 +455,21 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // Map menu key to f5 (scumm menu) if (ev.key.keysym.sym == 306) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); return true; } // Map action key to action if (ev.key.keysym.sym == 291) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_TAB; + event.kbd.keycode = Common::KEYCODE_TAB; event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); return true; } // Map OK key to skip cinematic if (ev.key.keysym.sym == 292) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); return true; } @@ -485,7 +485,7 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // Map menu key (f11) to f5 (scumm menu) if (ev.key.keysym.sym == SDLK_F11) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); } // Nap center (space) to tab (default action ) @@ -493,13 +493,13 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // else if (ev.key.keysym.sym == SDLK_SPACE) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_TAB; + event.kbd.keycode = Common::KEYCODE_TAB; event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); } // Since we stole space (pause) above we'll rebind it to the tab key on the keyboard else if (ev.key.keysym.sym == SDLK_TAB) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); } else { // Let the events fall through if we didn't change them, this may not be the best way to diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index e65af8fc53..55af5085a2 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -131,13 +131,13 @@ void CEActionsSmartphone::initInstanceGame() { _action_enabled[SMARTPHONE_ACTION_SAVE] = false; else if (is_queen) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(286); // F1 key for FOTAQ + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(63); + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_QUESTION); } else if (is_cine) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(291); //F10 + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F10); //F10 } else if (is_agi) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE); @@ -146,7 +146,7 @@ void CEActionsSmartphone::initInstanceGame() { _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_s); } else { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(319); // F5 key + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(Common::ASCII_F5); // F5 key } // Skip _action_enabled[SMARTPHONE_ACTION_SKIP] = true; @@ -161,7 +161,7 @@ void CEActionsSmartphone::initInstanceGame() { if (is_agi) _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(315); // bargon : F1 to start + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(Common::ASCII_F1); // bargon : F1 to start else if (gameid == "atlantis") _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else -- cgit v1.2.3 From 4b50a4ffe2fca6004a742fcb94cb0ebc1522475b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 20:40:17 +0000 Subject: Potential fix for PSP build problems svn-id: r27620 --- backends/platform/psp/osys_psp_gu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index d40f1559ec..55c7fa96a2 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -59,10 +59,10 @@ unsigned char *keyboard_letters; unsigned char *keyboard_letters_shift; unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', '`'}; -unsigned int kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, +KeyCode kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -unsigned int kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, +KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) -- cgit v1.2.3 From 264008f2b34e90f8f81649fa56baa76f2cf9a7e4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 20:43:30 +0000 Subject: Oops, forgot Common:: qualifier svn-id: r27621 --- backends/platform/psp/osys_psp_gu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index 55c7fa96a2..91bf71a2a9 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -59,10 +59,10 @@ unsigned char *keyboard_letters; unsigned char *keyboard_letters_shift; unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', '`'}; -KeyCode kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, +Common::KeyCode kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, +Common::KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) -- cgit v1.2.3 From 85bf0f6d6b03097290fbcbc18357756c048f8a8f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 20:51:13 +0000 Subject: Added Common::KEYCODE_INALID svn-id: r27622 --- backends/platform/ds/arm9/source/touchkeyboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 88e78f165c..931f9a716a 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -117,7 +117,7 @@ key_data keys[DS_NUM_KEYS] = { {51, 29, 6, Common::KEYCODE_UP}, // Close button - {56, 30, 0, 0}, + {56, 30, 0, Common::KEYCODE_INALID}, }; @@ -237,7 +237,7 @@ void addKeyboardEvents() { Common::Event event; // consolePrintf("Key: %d\n", r); - if ((keys[r].character == 0)) { + if ((keys[r].character == Common::KEYCODE_INALID)) { // Close button DS::closed = true; } else if ((keys[r].character >= '0') && (keys[r].character <= '9')) { -- cgit v1.2.3 From 2fa0a5c457e0aea4edffb49aa80a04a59b6e9994 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 21:16:07 +0000 Subject: Cleaning up after myself (I blame it on, err, uhh... the Vogons?) svn-id: r27625 --- backends/platform/ds/arm9/source/touchkeyboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 931f9a716a..8f7af668d8 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -117,7 +117,7 @@ key_data keys[DS_NUM_KEYS] = { {51, 29, 6, Common::KEYCODE_UP}, // Close button - {56, 30, 0, Common::KEYCODE_INALID}, + {56, 30, 0, Common::KEYCODE_INVALID}, }; @@ -237,7 +237,7 @@ void addKeyboardEvents() { Common::Event event; // consolePrintf("Key: %d\n", r); - if ((keys[r].character == Common::KEYCODE_INALID)) { + if ((keys[r].character == Common::KEYCODE_INVALID)) { // Close button DS::closed = true; } else if ((keys[r].character >= '0') && (keys[r].character <= '9')) { -- cgit v1.2.3 From cd8f5dc52129e82edcbf24ea881b52271f610fb3 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Fri, 22 Jun 2007 22:06:25 +0000 Subject: fix compilation by casting the %, {, }, | and ~ keycode "magic" numbers to Common::KeyCode svn-id: r27632 --- backends/platform/psp/osys_psp_gu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index 91bf71a2a9..a939229c84 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -62,8 +62,8 @@ unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ' Common::KeyCode kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -Common::KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, - Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; +Common::KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, (Common::KeyCode)37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, + Common::KEYCODE_PLUS, (Common::KeyCode)123, (Common::KeyCode)125, (Common::KeyCode)124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, (Common::KeyCode)126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) @@ -555,11 +555,11 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { case 0: event.kbd.flags = 0; event.kbd.ascii = 'a'+_keySelected-1; - event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); break; case CAPS_LOCK: event.kbd.ascii = 'A'+_keySelected-1; - event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); event.kbd.flags = Common::KBD_SHIFT; break; case SYMBOLS: -- cgit v1.2.3 From 05a70fc8e404bd2003e8faa3bc1d4564918eca03 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 23:43:17 +0000 Subject: Produce 'correct' keycode/ascii values for function keys svn-id: r27642 --- backends/platform/PalmOS/Src/base_event.cpp | 13 +++++++++---- backends/platform/PalmOS/Src/zodiac_event.cpp | 2 +- backends/platform/ds/arm9/source/dsmain.cpp | 2 +- backends/platform/gp32/gp32_osys.cpp | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp index 620195deeb..a3913529b6 100644 --- a/backends/platform/PalmOS/Src/base_event.cpp +++ b/backends/platform/PalmOS/Src/base_event.cpp @@ -262,14 +262,14 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { case vchrLaunch: event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_ESCAPE; - event.kbd.ascii = Common::KEYCODE_ESCAPE; + event.kbd.ascii = Common::ASCII_ESCAPE; event.kbd.flags = 0; return true; // F5 = menu case vchrMenu: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be changed to KEYCODE_F5 + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; @@ -411,8 +411,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // F1 -> F10 key if (key >= '0' && key <= '9' && mask == (Common::KBD_CTRL|Common::KBD_ALT)) { - key = (key == '0') ? 324 : (Common::ASCII_F1 + key - '1'); - mask = 0; + key = (key - '0' + 10 - 1) % 10; // '0' -> 9, '1' -> 0, '2' -> 1, ... + _wasKey = true; + event.type = Common::EVENT_KEYDOWN; + event.kbd.keycode = Common::KEYCODE_F1 + key; + event.kbd.ascii = Common::ASCII_F1 + key; + event.kbd.flags = 0; + return true; #ifdef STDLIB_TRACE_MEMORY // print memory diff --git a/backends/platform/PalmOS/Src/zodiac_event.cpp b/backends/platform/PalmOS/Src/zodiac_event.cpp index 3ee2a32654..84ecc27097 100644 --- a/backends/platform/PalmOS/Src/zodiac_event.cpp +++ b/backends/platform/PalmOS/Src/zodiac_event.cpp @@ -46,7 +46,7 @@ bool OSystem_PalmZodiac::check_event(Common::Event &event, EventPtr ev) { // F5 = menu case vchrThumbWheelBack: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index be5d0a14a2..af5addac66 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -1253,7 +1253,7 @@ void addEventsToQueue() { if ((getKeysChanged() & KEY_START)) { event.type = getKeyEvent(KEY_START); - event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; system->addEvent(event); diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp index 1f07b0660d..f6e0a10bbc 100644 --- a/backends/platform/gp32/gp32_osys.cpp +++ b/backends/platform/gp32/gp32_osys.cpp @@ -529,7 +529,7 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; else { - event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; } return true; @@ -603,7 +603,7 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; else { - event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = Common::ASCII_F5; } return true; -- cgit v1.2.3 From f97cbb8294eb35fbd3af38fbe37ac35a82c64121 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Jun 2007 00:05:32 +0000 Subject: Update GUI::Key constructs svn-id: r27643 --- backends/platform/sdl/events.cpp | 2 +- backends/platform/symbian/src/SymbianActions.cpp | 36 +++++++++++------------- backends/platform/wince/CEActionsPocket.cpp | 30 ++++++++++---------- backends/platform/wince/CEActionsSmartphone.cpp | 28 +++++++++--------- backends/platform/wince/CEgui/PanelKeyboard.cpp | 15 ++++------ backends/platform/wince/CEkeys/EventsBuffer.cpp | 7 ++--- backends/platform/wince/wince-sdl.cpp | 2 +- 7 files changed, 56 insertions(+), 64 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index 56636dfaa9..2b3c2c18fe 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -59,7 +59,7 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) return key; } else if (unicode) { return unicode; - } else if (key >= 'a' && key <= 'z' && mod & KMOD_SHIFT) { + } else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) { return key & ~0x20; } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) { return 0; diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 2c13a407ed..3809253032 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -122,7 +122,7 @@ void SymbianActions::initInstanceMain(OSystem *mainSystem) { // Skip _action_enabled[ACTION_SKIP] = true; - _key_action[ACTION_SKIP].setAscii(SDLK_ESCAPE); + _key_action[ACTION_SKIP].setKey(SDLK_ESCAPE); } void SymbianActions::initInstanceGame() { @@ -150,28 +150,27 @@ void SymbianActions::initInstanceGame() { _action_enabled[ACTION_SAVE] = true; if (is_queen) { - _key_action[ACTION_SAVE].setAscii(SDLK_F1); // F1 key for FOTAQ + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { - _key_action[ACTION_SAVE].setAscii(63); + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); } else if (is_cine) { - _key_action[ACTION_SAVE].setAscii(SDLK_F10); // F10 + _key_action[ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10 } else if (is_agi) { - _key_action[ACTION_SAVE].setAscii(SDLK_ESCAPE); + _key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { - _key_action[ACTION_SAVE].setAscii(SDLK_s); + _key_action[ACTION_SAVE].setKey('s', SDLK_s); } else { - _key_action[ACTION_SAVE].setAscii(SDLK_F5); // F5 key + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F5 key } } // Enable fast mode _action_enabled[ACTION_FASTMODE] = true; - _key_action[ACTION_FASTMODE].setAscii('f'); - _key_action[ACTION_FASTMODE].setFlags(KMOD_CTRL); + _key_action[ACTION_FASTMODE].setKey('f', SDLK_f, KMOD_CTRL); // Swap character _action_enabled[ACTION_SWAPCHAR] = true; - _key_action[ACTION_SWAPCHAR].setAscii('b'); // b + _key_action[ACTION_SWAPCHAR].setKey('b'); // b // Zone _action_enabled[ACTION_ZONE] = true; @@ -179,31 +178,30 @@ void SymbianActions::initInstanceGame() { // Multi function key _action_enabled[ACTION_MULTI] = true; if (is_agi) - _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + _key_action[ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[ACTION_MULTI].setAscii(315); // bargon : F1 to start + _key_action[ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start else if (gameid == "atlantis") - _key_action[ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch + _key_action[ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[ACTION_MULTI].setAscii(86); // FT cheat : shift-V + _key_action[ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; - _key_action[ACTION_DEBUGGER].setAscii('d'); - _key_action[ACTION_DEBUGGER].setFlags(KMOD_CTRL); + _key_action[ACTION_DEBUGGER].setKey('d', SDLK_d, KMOD_CTRL); // Skip text if (!is_cine) _action_enabled[ACTION_SKIP_TEXT] = true; if (is_queen) { - _key_action[ACTION_SKIP_TEXT].setAscii(SDLK_SPACE); + _key_action[ACTION_SKIP_TEXT].setKey(SDLK_SPACE); } else { - _key_action[ACTION_SKIP_TEXT].setAscii(SDLK_PERIOD); + _key_action[ACTION_SKIP_TEXT].setKey(SDLK_PERIOD); } // Pause - _key_action[ACTION_PAUSE].setAscii(' '); + _key_action[ACTION_PAUSE].setKey(' '); _action_enabled[ACTION_PAUSE] = true; // Quit diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index 81de8e779c..efada68ad9 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -141,29 +141,29 @@ void CEActionsPocket::initInstanceGame() { // Initialize keys for different actions // Pause - _key_action[POCKET_ACTION_PAUSE].setAscii(VK_SPACE); + _key_action[POCKET_ACTION_PAUSE].setKey(VK_SPACE); _action_enabled[POCKET_ACTION_PAUSE] = true; // Save if (is_simon || is_sword2 || is_gob || is_kyra || is_touche) _action_enabled[POCKET_ACTION_SAVE] = false; else if (is_queen) { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(286); // F1 key for FOTAQ + _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(63); + _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); } else if (is_cine) { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(291); // F10 + _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10 } else if (is_agi) { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(SDLK_ESCAPE); + _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(SDLK_s); + _key_action[POCKET_ACTION_SAVE].setKey('s', SDLK_s); } else { _action_enabled[POCKET_ACTION_SAVE] = true; - _key_action[POCKET_ACTION_SAVE].setAscii(319); // F5 key + _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F5 key } // Quit _action_enabled[POCKET_ACTION_QUIT] = true; @@ -171,9 +171,9 @@ void CEActionsPocket::initInstanceGame() { if (!is_cine && !is_parallaction) _action_enabled[POCKET_ACTION_SKIP] = true; if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche) - _key_action[POCKET_ACTION_SKIP].setAscii(VK_ESCAPE); + _key_action[POCKET_ACTION_SKIP].setKey(VK_ESCAPE); else - _key_action[POCKET_ACTION_SKIP].setAscii(KEY_ALL_SKIP); + _key_action[POCKET_ACTION_SKIP].setKey(KEY_ALL_SKIP); // Hide _action_enabled[POCKET_ACTION_HIDE] = true; // Keyboard @@ -195,13 +195,13 @@ void CEActionsPocket::initInstanceGame() { // Multi function key _action_enabled[POCKET_ACTION_MULTI] = true; if (is_agi) - _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + _key_action[POCKET_ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[POCKET_ACTION_MULTI].setAscii(315); // bargon : F1 to start + _key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start else if (gameid == "atlantis") - _key_action[POCKET_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch + _key_action[POCKET_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[POCKET_ACTION_MULTI].setAscii(86); // FT cheat : shift-V + _key_action[POCKET_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Key bind method _action_enabled[POCKET_ACTION_BINDKEYS] = true; } @@ -242,9 +242,9 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) { // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); if (alert.runModal() == GUI::kMessageOK) - _key_action[action].setAscii(SDLK_l); + _key_action[action].setKey(SDLK_l); else - _key_action[action].setAscii(SDLK_s); + _key_action[action].setKey(SDLK_s); } EventsBuffer::simulateKey(&_key_action[action], true); return true; diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 55af5085a2..c92217b1b9 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -131,41 +131,41 @@ void CEActionsSmartphone::initInstanceGame() { _action_enabled[SMARTPHONE_ACTION_SAVE] = false; else if (is_queen) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F5); // F1 key for FOTAQ + _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_QUESTION); + _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); } else if (is_cine) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F10); //F10 + _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); //F10 } else if (is_agi) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE); + _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_s); + _key_action[SMARTPHONE_ACTION_SAVE].setKey('s', SDLK_s); } else { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(Common::ASCII_F5); // F5 key + _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F5 key } // Skip _action_enabled[SMARTPHONE_ACTION_SKIP] = true; if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche) - _key_action[SMARTPHONE_ACTION_SKIP].setAscii(VK_ESCAPE); + _key_action[SMARTPHONE_ACTION_SKIP].setKey(VK_ESCAPE); else - _key_action[SMARTPHONE_ACTION_SKIP].setAscii(KEY_ALL_SKIP); + _key_action[SMARTPHONE_ACTION_SKIP].setKey(KEY_ALL_SKIP); // Zone _action_enabled[SMARTPHONE_ACTION_ZONE] = true; // Multi function key _action_enabled[SMARTPHONE_ACTION_MULTI] = true; if (is_agi) - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + _key_action[SMARTPHONE_ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(Common::ASCII_F1); // bargon : F1 to start + _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1) // bargon : F1 to start else if (gameid == "atlantis") - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch + _key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(86); // FT cheat : shift-V + _key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Bind keys _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true; } @@ -203,9 +203,9 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) { // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save"); if (alert.runModal() == GUI::kMessageOK) - _key_action[action].setAscii(SDLK_l); + _key_action[action].setKey(SDLK_l); else - _key_action[action].setAscii(SDLK_s); + _key_action[action].setKey(SDLK_s); } EventsBuffer::simulateKey(&_key_action[action], true); return true; diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp index fdbb3b4e32..79b833f84b 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.cpp +++ b/backends/platform/wince/CEgui/PanelKeyboard.cpp @@ -36,8 +36,7 @@ namespace CEGUI { PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() { setBackground(reference); _state = false; - _lastKey.setAscii(0); - _lastKey.setKeycode(0); + _lastKey.setKey(0); } @@ -78,25 +77,21 @@ namespace CEGUI { keyCode = _lastKey.keycode(); } _state = pushed; - _lastKey.setAscii(keyAscii); - _lastKey.setKeycode(tolower(keyCode)); + _lastKey.setKey(keyAscii, tolower(keyCode)); - key.setAscii(keyAscii); - key.setKeycode(tolower(keyCode)); + key.setKey(keyAscii, tolower(keyCode)); return EventsBuffer::simulateKey(&key, pushed); } else if (_state && !pushed) { // cursor is in some forbidden region and is up _state = false; - key.setAscii(_lastKey.ascii()); - key.setKeycode(_lastKey.keycode()); + key = _lastKey; return EventsBuffer::simulateKey(&key, false); } else return false; } else if (_state && !pushed) { // cursor left the keyboard area and is up _state = false; - key.setAscii(_lastKey.ascii()); - key.setKeycode(_lastKey.keycode()); + key = _lastKey; return EventsBuffer::simulateKey(&key, false); } else return false; diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp index c8b09f611a..19978c23dc 100644 --- a/backends/platform/wince/CEkeys/EventsBuffer.cpp +++ b/backends/platform/wince/CEkeys/EventsBuffer.cpp @@ -32,10 +32,9 @@ namespace CEKEYS { SDL_Event ev = {0}; if (!key->keycode()) - key->setKeycode(key->ascii()); - - if (!key->ascii()) - key->setAscii(key->keycode()); + key->setKey(key->ascii(), key->ascii()); + else if (!key->ascii()) + key->setKey(key->keycode()); ev.type = (pushed ? SDL_KEYDOWN : SDL_KEYUP); ev.key.keysym.mod = (SDLMod)key->flags(); diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 92012c7159..c8aa6de838 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -2105,7 +2105,7 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) return key; } else if (unicode) { return unicode; - } else if (key >= 'a' && key <= 'z' && mod & KMOD_SHIFT) { + } else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) { return key & ~0x20; } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) { return 0; -- cgit v1.2.3 From 8151111ee822e51a00c734c0ccfe2fe7bbd03719 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 23 Jun 2007 12:16:43 +0000 Subject: Add missing semi-colon. svn-id: r27660 --- backends/platform/wince/CEActionsSmartphone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index c92217b1b9..227318d552 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -161,7 +161,7 @@ void CEActionsSmartphone::initInstanceGame() { if (is_agi) _key_action[SMARTPHONE_ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1) // bargon : F1 to start + _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start else if (gameid == "atlantis") _key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch else -- cgit v1.2.3 From f0a25f7a9b221f7f7a4ae38cbc1df13b78589b42 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sat, 23 Jun 2007 16:37:42 +0000 Subject: Tweaks to WinCE makefile. The choice of which libraries to use (zlib, tremorce, mad, mpeg2 etc) is now made by a single define per library towards the top of the makefile. Given that developers tend to have different options selected on their local builds, hopefully this will minimise the changes on aubsequent svn updates. svn-id: r27676 --- backends/platform/wince/Makefile | 97 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 91 insertions(+), 6 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index 94cb6029f6..0d9556e967 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -3,9 +3,20 @@ # $URL$ # $Id$ +######################################################################## +## Set this to point to where the tools are installed on your system + wince_gcc_root = /cygdrive/e/wince-gcc-root -srcdir = ../../.. -VPATH = $(srcdir) + + +######################################################################## +## Do you want a debug build or not? + +#WINCE_DEBUG_BUILD = 1 + + +######################################################################## +## Disable whichever engines you want here #DISABLE_SCUMM = 1 #DISABLE_SKY = 1 @@ -23,9 +34,33 @@ DISABLE_LURE = 1 #DISABLE_PARALLACTION = 1 DISABLE_CRUISE = 1 -#DISABLE_HQ_SCALERS = 1 +######################################################################## +## Pick which libraries you want to use here + +USE_MAD = 1 +USE_MPEG2 = 1 +USE_TREMOR = 1 +#USE_TREMOLO = 1 +USE_FLAC = 1 +USE_ZLIB = 1 + + +######################################################################## +## You're probably not going to want to change these defines... + +#DISABLE_HQ_SCALERS = 1 USE_ARM_SOUND_ASM = 1 +USE_ARM_SMUSH = 1 + + +######################################################################## +## Hopefully you shouldn't need to change anything below here. ## +######################################################################## + + +srcdir = ../../.. +VPATH = $(srcdir) CXX = arm-wince-pe-g++ LD = arm-wince-pe-g++ @@ -40,9 +75,19 @@ ECHO = echo -n CAT = cat AS = arm-wince-pe-as -DEFINES := -D_WIN32_WCE=300 -DARM -D__ARM__ -D_ARM_ -DUNICODE -DSCUMM_NEED_ALIGNMENT -DFPM_DEFAULT -DUSE_MAD -DNONSTANDARD_PORT -DUSE_TREMOR -DUSE_VORBIS -DUSE_MPEG2 -DWIN32 -DUSE_ZLIB -DUSE_FLAC +######################################################################## +## Set up defines, includes, cflags etc + +DEFINES := -D_WIN32_WCE=300 -DARM -D__ARM__ -D_ARM_ -DUNICODE -DSCUMM_NEED_ALIGNMENT +DEFINES += -DFPM_DEFAULT + +DEFINES += -DNONSTANDARD_PORT +DEFINES += -DWIN32 DEFINES += -D__stdcall= -Dcdecl= -D__cdecl__= -D__cdecl= -Wno-multichar -#DEFINES += -DDEBUG -DUSE_WINDBG -g + +ifdef WINCE_DEBUG_BUILD +DEFINES += -DDEBUG -DUSE_WINDBG -g +endif INCLUDES := -I$(srcdir) -I. -I$(srcdir)/engines -Imissing/gcc -Ilibs/include -Ilibs/include/sdl -ICEgui -ICEkeys -I$(wince_gcc_root)/include @@ -51,7 +96,47 @@ CFLAGS := -O3 -march=armv4 -mtune=xscale CXXFLAGS := $(CFLAGS) LDFLAGS := -Llibs/lib -L$(wince_gcc_root)/lib -LIBS := -lSDL -lzlib -lmad -lmpeg2 -ltremorce -lFLAC --entry WinMainCRTStartup +LIBS := -lSDL + +ifdef USE_ZLIB +DEFINES += -DUSE_ZLIB +LIBS += -lzlib +endif + +ifdef USE_MAD +DEFINES += -DUSE_MAD +LIBS += -lmad +endif + +ifdef USE_MPEG2 +DEFINES += -DUSE_MPEG2 +LIBS += -lmpeg2 +endif + +ifdef USE_TREMOR +DEFINES += -DUSE_TREMOR -DUSE_VORBIS +LIBS += -ltremorce +endif + +ifdef USE_TREMOLO +DEFINES += -DUSE_TREMOR -DUSE_VORBIS +INCLUDES += -Ilibs/include/tremolo +LIBS += -llibTremolo +endif + +ifdef USE_FLAC +DEFINES += -DUSE_FLAC +LIBS += -lFLAC +endif + +ifdef USE_ARM_SMUSH +DEFINES += -DUSE_ARM_SMUSH +endif + +LIBS += --entry WinMainCRTStartup + +######################################################################## +# Targets follow here TARGET = scummvm.exe OBJS := -- cgit v1.2.3 From 90c2210dae8c91fa8babc6b05564e15c9d445d18 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sat, 23 Jun 2007 17:15:36 +0000 Subject: Add a couple of casts from int to (Common:KeyCode) in the WinCE specific code. 2 of the 4 casts are lifted from the standard sdl/events.cpp file. The other 2 (casting the results of mapKeyCE before assigning to event.kbd.keycode look correct to me too, but might bear double checking. svn-id: r27680 --- backends/platform/wince/wince-sdl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index c8aa6de838..2d6e9a4302 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -2162,9 +2162,9 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYDOWN; if (!_unfilteredkeys) - event.kbd.keycode = ev.key.keysym.sym; + event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym; else - event.kbd.keycode = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); + event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); return true; @@ -2189,9 +2189,9 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYUP; if (!_unfilteredkeys) - event.kbd.keycode = ev.key.keysym.sym; + event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym; else - event.kbd.keycode = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); + event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys); return true; -- cgit v1.2.3