aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Cawley2019-11-10 16:34:25 +0000
committerEugene Sandulenko2019-11-17 22:33:56 +0100
commitf2b9f7bb76c041825bef1dcee3abf17d923898da (patch)
tree9ead87f005a086b6c1cb2cfe4e81d846e3e691dc
parentc5a5e0f68a8d740f37f234e773988e8f58273466 (diff)
downloadscummvm-rg350-f2b9f7bb76c041825bef1dcee3abf17d923898da.tar.gz
scummvm-rg350-f2b9f7bb76c041825bef1dcee3abf17d923898da.tar.bz2
scummvm-rg350-f2b9f7bb76c041825bef1dcee3abf17d923898da.zip
BACKENDS: Remove the Windows CE port
-rw-r--r--.gitignore16
-rw-r--r--audio/softsynth/opl/mame.cpp4
-rw-r--r--backends/events/sdl/sdl-events.cpp2
-rw-r--r--backends/events/wincesdl/wincesdl-events.cpp344
-rw-r--r--backends/events/wincesdl/wincesdl-events.h66
-rw-r--r--backends/fs/stdiostream.cpp3
-rw-r--r--backends/fs/windows/windows-fs.cpp15
-rw-r--r--backends/fs/windows/windows-fs.h4
-rw-r--r--backends/graphics/sdl/sdl-graphics.h2
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp6
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.cpp1655
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.h207
-rw-r--r--backends/midi/windows.cpp2
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.cpp190
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.h49
-rw-r--r--backends/module.mk10
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp365
-rw-r--r--backends/platform/wince/CEActionsPocket.h91
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp296
-rw-r--r--backends/platform/wince/CEActionsSmartphone.h77
-rw-r--r--backends/platform/wince/CEDevice.cpp152
-rw-r--r--backends/platform/wince/CEDevice.h49
-rw-r--r--backends/platform/wince/CEException.cpp156
-rw-r--r--backends/platform/wince/CEException.h34
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp101
-rw-r--r--backends/platform/wince/CELauncherDialog.h41
-rw-r--r--backends/platform/wince/CEScaler.cpp88
-rw-r--r--backends/platform/wince/CEScaler.h37
-rw-r--r--backends/platform/wince/CEgui/CEGUI.h26
-rw-r--r--backends/platform/wince/CEgui/GUIElement.cpp121
-rw-r--r--backends/platform/wince/CEgui/GUIElement.h67
-rw-r--r--backends/platform/wince/CEgui/ItemAction.cpp48
-rw-r--r--backends/platform/wince/CEgui/ItemAction.h45
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.cpp93
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.h55
-rw-r--r--backends/platform/wince/CEgui/Panel.cpp80
-rw-r--r--backends/platform/wince/CEgui/Panel.h60
-rw-r--r--backends/platform/wince/CEgui/PanelItem.cpp44
-rw-r--r--backends/platform/wince/CEgui/PanelItem.h48
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.cpp98
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.h49
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.cpp83
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.h47
-rw-r--r--backends/platform/wince/CEgui/Toolbar.cpp35
-rw-r--r--backends/platform/wince/CEgui/Toolbar.h43
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.cpp125
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.h65
-rw-r--r--backends/platform/wince/CEkeys/CEKeys.h23
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.cpp78
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.h44
-rw-r--r--backends/platform/wince/Makefile255
-rw-r--r--backends/platform/wince/PocketSCUMM.rc24
-rw-r--r--backends/platform/wince/README-WinCE.txt823
-rw-r--r--backends/platform/wince/images/Action.bmpbin2102 -> 0 bytes
-rw-r--r--backends/platform/wince/images/DiskwFolder.bmpbin2102 -> 0 bytes
-rw-r--r--backends/platform/wince/images/MonkeyLandscape.bmpbin630 -> 0 bytes
-rw-r--r--backends/platform/wince/images/MonkeyPortrait.bmpbin630 -> 0 bytes
-rw-r--r--backends/platform/wince/images/SoundOff.bmpbin2102 -> 0 bytes
-rw-r--r--backends/platform/wince/images/SoundOn.bmpbin2102 -> 0 bytes
-rw-r--r--backends/platform/wince/images/bindkeys.bmpbin2102 -> 0 bytes
-rw-r--r--backends/platform/wince/images/keyboard.bmpbin38454 -> 0 bytes
-rw-r--r--backends/platform/wince/images/panelbig.bmpbin13878 -> 0 bytes
-rw-r--r--backends/platform/wince/images/scumm_icon.icobin4286 -> 0 bytes
-rw-r--r--backends/platform/wince/missing/errno.h4
-rw-r--r--backends/platform/wince/missing/fopen.h11
-rw-r--r--backends/platform/wince/missing/missing.cpp211
-rw-r--r--backends/platform/wince/missing/time.h33
-rw-r--r--backends/platform/wince/module.mk36
-rw-r--r--backends/platform/wince/portdefs.h86
-rw-r--r--backends/platform/wince/resource.h11
-rw-r--r--backends/platform/wince/smartLandScale.s187
-rw-r--r--backends/platform/wince/stub.cpp55
-rw-r--r--backends/platform/wince/wince-sdl.cpp716
-rw-r--r--backends/platform/wince/wince-sdl.h91
-rw-r--r--backends/platform/wince/wince.mk11
-rw-r--r--backends/plugins/sdl/sdl-provider.cpp2
-rw-r--r--backends/plugins/win32/win32-provider.cpp4
-rw-r--r--backends/saves/default/default-saves.cpp10
-rw-r--r--backends/saves/windows/windows-saves.cpp2
-rw-r--r--base/commandLine.cpp4
-rw-r--r--base/main.cpp8
-rw-r--r--base/plugins.cpp2
-rw-r--r--common/inttypes.h5
-rw-r--r--common/scummsys.h4
-rwxr-xr-xconfigure64
-rw-r--r--engines/drascula/drascula.cpp28
-rw-r--r--engines/engine.cpp12
-rw-r--r--engines/lure/menu.cpp2
-rw-r--r--engines/scumm/input.cpp14
-rw-r--r--engines/sky/control.cpp3
-rw-r--r--gui/Actions.cpp14
-rw-r--r--gui/KeysDialog.cpp8
92 files changed, 30 insertions, 8149 deletions
diff --git a/.gitignore b/.gitignore
index 3c3d0b9d7c..7d603b3b6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,22 +77,6 @@ lib*.a
!/backends/platform/symbian/*/ScummVM_*_App.mmp
/backends/platform/symbian/*/BLD.INF
-/backends/platform/wince/scummvm.exe*
-/backends/platform/wince/sound
-/backends/platform/wince/tools
-/backends/platform/wince/gui
-/backends/platform/wince/engines
-/backends/platform/wince/common
-/backends/platform/wince/libs
-/backends/platform/wince/graphics
-/backends/platform/wince/base
-/backends/platform/wince/backends
-/backends/platform/wince/.deps
-/backends/platform/wince/libscummvm.a
-/backends/platform/wince/plugins
-/backends/platform/wince/scummvm.dll
-/backends/platform/wince/*.swp
-
/dists/rpl.exe
/dists/codeblocks/*.cbp
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index 6574b46497..cce52686a4 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -40,7 +40,7 @@
#include "common/textconsole.h"
#include "common/util.h"
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(GP2X) || defined(__MAEMO__) || defined(__DS__) || defined(__MINT__) || defined(__N64__)
+#if defined(__SYMBIAN32__) || defined(GP2X) || defined(__MAEMO__) || defined(__DS__) || defined(__MINT__) || defined(__N64__)
#include "common/config-manager.h"
#endif
@@ -1239,7 +1239,7 @@ FM_OPL *makeAdLibOPL(int rate) {
// We need to emulate one YM3812 chip
int env_bits = FMOPL_ENV_BITS_HQ;
int eg_ent = FMOPL_EG_ENT_HQ;
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(GP2X) || defined(__MAEMO__) || defined(__DS__) || defined(__MINT__) || defined(__N64__)
+#if defined(__SYMBIAN32__) || defined(GP2X) || defined(__MAEMO__) || defined(__DS__) || defined(__MINT__) || defined(__N64__)
if (ConfMan.hasKey("FM_high_quality") && ConfMan.getBool("FM_high_quality")) {
env_bits = FMOPL_ENV_BITS_HQ;
eg_ent = FMOPL_EG_ENT_HQ;
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 75c655269a..eba44341e0 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -1344,7 +1344,7 @@ bool SdlEventSource::handleResizeEvent(Common::Event &event, int w, int h) {
}
SDLKey SdlEventSource::obtainKeycode(const SDL_keysym keySym) {
-#if !SDL_VERSION_ATLEAST(2, 0, 0) && defined(WIN32) && !defined(_WIN32_WCE)
+#if !SDL_VERSION_ATLEAST(2, 0, 0) && defined(WIN32)
// WORKAROUND: SDL 1.2 on Windows does not use the user configured keyboard layout,
// resulting in "keySym.sym" values to always be those expected for an US keyboard.
// For example, SDL returns SDLK_Q when pressing the 'A' key on an AZERTY keyboard.
diff --git a/backends/events/wincesdl/wincesdl-events.cpp b/backends/events/wincesdl/wincesdl-events.cpp
deleted file mode 100644
index a7ffb1eadb..0000000000
--- a/backends/events/wincesdl/wincesdl-events.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "common/scummsys.h"
-
-#ifdef _WIN32_WCE
-
-#include "common/config-manager.h"
-
-#include "backends/events/wincesdl/wincesdl-events.h"
-#include "backends/platform/wince/CEActionsPocket.h"
-#include "backends/platform/wince/CEActionsSmartphone.h"
-#include "backends/platform/wince/CEDevice.h"
-
-#include "backends/platform/sdl/sdl.h"
-
-WINCESdlEventSource::WINCESdlEventSource()
- : _tapTime(0), _closeClick(false), _rbutton(false),
- _graphicsMan(0) {
-}
-
-void WINCESdlEventSource::init(WINCESdlGraphicsManager *graphicsMan) {
- assert(graphicsMan);
- _graphicsMan = graphicsMan;
-}
-
-bool WINCESdlEventSource::processMouseEvent(Common::Event &event, int x, int y) {
- event.mouse.x = x;
- event.mouse.y = y;
-
- // Update the "keyboard mouse" coords
- _km.x = event.mouse.x * MULTIPLIER;
- _km.y = event.mouse.y * MULTIPLIER;
-
- // Adjust for the screen scaling
- if (_graphicsMan->_zoomDown)
- event.mouse.y += 240;
-
- event.mouse.x = event.mouse.x * _graphicsMan->_scaleFactorXd / _graphicsMan->_scaleFactorXm;
- event.mouse.y = event.mouse.y * _graphicsMan->_scaleFactorYd / _graphicsMan->_scaleFactorYm;
-
- return true;
-}
-
-bool WINCESdlEventSource::pollEvent(Common::Event &event) {
- SDL_Event ev;
- ev.type = SDL_NOEVENT;
- DWORD currentTime;
- bool keyEvent = false;
- bool freeLookActive = _graphicsMan->getFreeLookState();
- int deltaX, deltaY;
-
- memset(&event, 0, sizeof(Common::Event));
-
- if (handleKbdMouse(event)) {
- return true;
- }
-
- // If the screen changed, send an Common::EVENT_SCREEN_CHANGED
- int screenID = _graphicsMan->getScreenChangeID();
- if (screenID != _lastScreenID) {
- _lastScreenID = screenID;
- event.type = Common::EVENT_SCREEN_CHANGED;
- return true;
- }
-
- CEDevice::wakeUp();
-
- currentTime = GetTickCount();
-
- while (SDL_PollEvent(&ev)) {
- switch (ev.type) {
- case SDL_KEYDOWN:
- debug(1, "Key down %X %s", ev.key.keysym.sym, SDL_GetKeyName((SDLKey)ev.key.keysym.sym));
- // KMOD_RESERVED is used if the key has been injected by an external buffer
- if (ev.key.keysym.mod != KMOD_RESERVED && !GUI::Actions::Instance()->mappingActive()) {
- keyEvent = true;
- _graphicsMan->_lastKeyPressed = ev.key.keysym.sym;
- _graphicsMan->_keyRepeatTime = currentTime;
- _graphicsMan->_keyRepeat = 0;
-
- if (!GUI_Actions::Instance()->mappingActive() && GUI_Actions::Instance()->performMapped(ev.key.keysym.sym, true))
- return true;
- }
-
- if (GUI_Actions::Instance()->mappingActive())
- event.kbd.flags = 0xFF;
- else if (ev.key.keysym.sym == SDLK_PAUSE) {
- _graphicsMan->_lastKeyPressed = 0;
- event.type = Common::EVENT_PREDICTIVE_DIALOG;
- return true;
- }
- event.type = Common::EVENT_KEYDOWN;
- if (!GUI::Actions::Instance()->mappingActive())
- event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
- else
- event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, GUI::Actions::Instance()->mappingActive());
- event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, GUI::Actions::Instance()->mappingActive());
-
- if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
- event.kbd.ascii ^= 0x20;
- event.kbd.flags = Common::KBD_SHIFT;
- }
-
- return true;
-
- case SDL_KEYUP:
- debug(1, "Key up %X %s", ev.key.keysym.sym, SDL_GetKeyName((SDLKey)ev.key.keysym.sym));
- // KMOD_RESERVED is used if the key has been injected by an external buffer
- if (ev.key.keysym.mod != KMOD_RESERVED && !GUI::Actions::Instance()->mappingActive()) {
- keyEvent = true;
- _graphicsMan->_lastKeyPressed = 0;
-
- if (!GUI_Actions::Instance()->mappingActive() && GUI_Actions::Instance()->performMapped(ev.key.keysym.sym, false))
- return true;
- }
-
- if (GUI_Actions::Instance()->mappingActive())
- event.kbd.flags = 0xFF;
- else if (ev.key.keysym.sym == SDLK_PAUSE) {
- _graphicsMan->_lastKeyPressed = 0;
- return false; // chew up the show agi dialog key up event
- }
-
- event.type = Common::EVENT_KEYUP;
- if (!GUI::Actions::Instance()->mappingActive())
- event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
- else
- event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, GUI::Actions::Instance()->mappingActive());
- event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, GUI::Actions::Instance()->mappingActive());
-
- if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
- event.kbd.ascii ^= 0x20;
- event.kbd.flags = Common::KBD_SHIFT;
- }
-
- return true;
-
- case SDL_MOUSEMOTION:
- event.type = Common::EVENT_MOUSEMOVE;
- if (!processMouseEvent(event, ev.motion.x, ev.motion.y)) {
- return false;
- }
- // update KbdMouse
- _km.x = ev.motion.x * MULTIPLIER;
- _km.y = ev.motion.y * MULTIPLIER;
-
- _graphicsMan->setMousePos(event.mouse.x, event.mouse.y);
-
- return true;
-
- case SDL_MOUSEBUTTONDOWN:
- if (ev.button.button == SDL_BUTTON_LEFT)
- event.type = Common::EVENT_LBUTTONDOWN;
- else if (ev.button.button == SDL_BUTTON_RIGHT)
- event.type = Common::EVENT_RBUTTONDOWN;
- else
- break;
- if (!processMouseEvent(event, ev.button.x, ev.button.y)) {
- return false;
- }
- // update KbdMouse
- _km.x = ev.button.x * MULTIPLIER;
- _km.y = ev.button.y * MULTIPLIER;
-
- if (event.mouse.x > _tapX)
- deltaX = event.mouse.x - _tapX;
- else
- deltaX = _tapX - event.mouse.x;
- if (event.mouse.y > _tapY)
- deltaY = event.mouse.y - _tapY;
- else
- deltaY = _tapY - event.mouse.y;
- _closeClick = (deltaX <= 5 && deltaY <= 5);
-
- if (!_isSmartphone) {
- // handle double-taps
- if (_tapTime) { // second tap
- if (_closeClick && (GetTickCount() - _tapTime < 1000)) {
- if (event.mouse.y <= 20 &&
- _graphicsMan->_panelInitialized &&
- !_graphicsMan->_noDoubleTapPT) {
- // top of screen (show panel)
- _graphicsMan->swap_panel_visibility();
- } else if (!_graphicsMan->_noDoubleTapRMB) {
- // right click
- event.type = Common::EVENT_RBUTTONDOWN;
- _rbutton = true;
- }
- }
- _tapTime = 0;
- } else {
- _tapTime = GetTickCount();
- _tapX = event.mouse.x;
- _tapY = event.mouse.y;
- }
- }
-
- if (freeLookActive && !_closeClick) {
- _rbutton = false;
- _tapTime = 0;
- _tapX = event.mouse.x;
- _tapY = event.mouse.y;
- event.type = Common::EVENT_MOUSEMOVE;
- _graphicsMan->setMousePos(event.mouse.x, event.mouse.y);
- }
-
-
- if (_graphicsMan->_toolbarHandler.action(event.mouse.x, event.mouse.y, true)) {
- if (!_graphicsMan->_toolbarHandler.drawn()) {
- _graphicsMan->_toolbarHighDrawn = false;
- _graphicsMan->internUpdateScreen();
- }
- if (_graphicsMan->_newOrientation != _graphicsMan->_orientationLandscape) {
- _graphicsMan->_orientationLandscape = _graphicsMan->_newOrientation;
- _graphicsMan->_toolbarHighDrawn = false;
- ConfMan.setInt("landscape", _graphicsMan->_orientationLandscape);
- ConfMan.flushToDisk();
- _graphicsMan->hotswapGFXMode();
- }
- return false;
- }
-
- return true;
-
- case SDL_MOUSEBUTTONUP:
- if (ev.button.button == SDL_BUTTON_LEFT)
- event.type = Common::EVENT_LBUTTONUP;
- else if (ev.button.button == SDL_BUTTON_RIGHT)
- event.type = Common::EVENT_RBUTTONUP;
- else
- break;
-
- if (_rbutton) {
- event.type = Common::EVENT_RBUTTONUP;
- _rbutton = false;
- }
-
- if (!processMouseEvent(event, ev.button.x, ev.button.y)) {
- return false;
- }
- // update KbdMouse
- _km.x = ev.button.x * MULTIPLIER;
- _km.y = ev.button.y * MULTIPLIER;
-
- if (freeLookActive && !_closeClick) {
- _tapX = event.mouse.x;
- _tapY = event.mouse.y;
- event.type = Common::EVENT_MOUSEMOVE;
- _graphicsMan->setMousePos(event.mouse.x, event.mouse.y);
- }
-
- if (_graphicsMan->_toolbarHandler.action(event.mouse.x, event.mouse.y, false)) {
- if (!_graphicsMan->_toolbarHandler.drawn()) {
- _graphicsMan->_toolbarHighDrawn = false;
- _graphicsMan->internUpdateScreen();
- }
- return false;
-
- }
- return true;
-
- case SDL_VIDEOEXPOSE:
- _graphicsMan->notifyVideoExpose();
- break;
-
- case SDL_QUIT:
- event.type = Common::EVENT_QUIT;
- return true;
-
- case SDL_ACTIVEEVENT:
- if (ev.active.state & SDL_APPMOUSEFOCUS)
- debug(2, "%s mouse focus.", ev.active.gain ? "Got" : "Lost");
- if (ev.active.state & SDL_APPINPUTFOCUS)
- debug(2, "%s input focus.", ev.active.gain ? "Got" : "Lost");
- if (ev.active.state & SDL_APPACTIVE)
- debug(2, "%s total focus.", ev.active.gain ? "Got" : "Lost");
- if (ev.active.state & SDL_APPINPUTFOCUS) {
- _graphicsMan->_hasfocus = ev.active.gain;
- SDL_PauseAudio(!_graphicsMan->_hasfocus);
- if (_graphicsMan->_hasfocus)
- _graphicsMan->notifyVideoExpose();
- }
- break;
- }
- }
-
- // Simulate repeated key for backend
- if (!keyEvent && _graphicsMan->_lastKeyPressed && (int)currentTime > _graphicsMan->_keyRepeatTime + _graphicsMan->_keyRepeatTrigger) {
- _graphicsMan->_keyRepeatTime = currentTime;
- _graphicsMan->_keyRepeat++;
- GUI_Actions::Instance()->performMapped(_graphicsMan->_lastKeyPressed, true);
- }
-
- return false;
-}
-
-int WINCESdlEventSource::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;
- default:
- return key;
- }
- }
-
- if (key >= SDLK_KP0 && key <= SDLK_KP9) {
- return key - SDLK_KP0 + '0';
- } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) {
- return key;
- } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) {
- return 0;
- }
- return key;
-}
-
-#endif /* _WIN32_WCE */
diff --git a/backends/events/wincesdl/wincesdl-events.h b/backends/events/wincesdl/wincesdl-events.h
deleted file mode 100644
index 0f38f6753e..0000000000
--- a/backends/events/wincesdl/wincesdl-events.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef BACKENDS_EVENTS_SDL_WINCE_H
-#define BACKENDS_EVENTS_SDL_WINCE_H
-
-#include "common/scummsys.h"
-
-#ifdef _WIN32_WCE
-
-#include "backends/events/sdl/sdl-events.h"
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-
-extern bool _isSmartphone;
-
-class WINCESdlEventSource : public SdlEventSource {
-public:
- WINCESdlEventSource();
-
- void init(WINCESdlGraphicsManager *graphicsMan);
-
- void loadDeviceConfiguration();
-
- // Overloaded from SDL backend (toolbar handling)
- bool pollEvent(Common::Event &event);
- // Overloaded from SDL backend (mouse and new scaler handling)
- bool processMouseEvent(Common::Event &event, int x, int y);
-
-protected:
-
-private:
- int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter);
-
- WINCESdlGraphicsManager *_graphicsMan;
-
- // Keyboard tap
- int _tapX;
- int _tapY;
- long _tapTime;
-
- bool _closeClick; // flag when taps are spatially close together
- bool _rbutton; // double tap -> right button simulation
-};
-
-#endif
-
-#endif /* BACKENDS_EVENTS_SDL_WINCE_H */
diff --git a/backends/fs/stdiostream.cpp b/backends/fs/stdiostream.cpp
index a893149e9a..8206bd180f 100644
--- a/backends/fs/stdiostream.cpp
+++ b/backends/fs/stdiostream.cpp
@@ -26,9 +26,6 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/fs/stdiostream.h"
-#ifdef _WIN32_WCE
-#include "backends/platform/wince/missing/fopen.h"
-#endif
StdioStream::StdioStream(void *handle) : _handle(handle) {
assert(handle);
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index e69e72a746..face198430 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -107,19 +107,11 @@ const TCHAR* WindowsFilesystemNode::toUnicode(const char *str) {
}
WindowsFilesystemNode::WindowsFilesystemNode() {
- _isDirectory = true;
-#ifndef _WIN32_WCE
// Create a virtual root directory for standard Windows system
+ _isDirectory = true;
_isValid = false;
_path = "";
_isPseudoRoot = true;
-#else
- _displayName = "Root";
- // No need to create a pseudo root directory on Windows CE
- _isValid = true;
- _path = "\\";
- _isPseudoRoot = false;
-#endif
}
WindowsFilesystemNode::WindowsFilesystemNode(const Common::String &p, const bool currentDir) {
@@ -174,7 +166,6 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
assert(_isDirectory);
if (_isPseudoRoot) {
-#ifndef _WIN32_WCE
// Drives enumeration
TCHAR drive_buffer[100];
GetLogicalDriveStrings(sizeof(drive_buffer) / sizeof(TCHAR), drive_buffer);
@@ -193,9 +184,7 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
entry._path = toAscii(current_drive);
myList.push_back(new WindowsFilesystemNode(entry));
}
-#endif
- }
- else {
+ } else {
// Files enumeration
WIN32_FIND_DATA desc;
HANDLE handle;
diff --git a/backends/fs/windows/windows-fs.h b/backends/fs/windows/windows-fs.h
index e2404dacbc..30c2a98845 100644
--- a/backends/fs/windows/windows-fs.h
+++ b/backends/fs/windows/windows-fs.h
@@ -24,9 +24,6 @@
#define WINDOWS_FILESYSTEM_H
#include <windows.h>
-#ifdef _WIN32_WCE
-#undef GetCurrentDirectory
-#endif
#include "backends/fs/abstract-fs.h"
@@ -53,7 +50,6 @@ public:
* Creates a WindowsFilesystemNode with the root node as path.
*
* In regular windows systems, a virtual root path is used "".
- * In windows CE, the "\" root is used instead.
*/
WindowsFilesystemNode();
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index d67557be2b..24c6d37d88 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -31,7 +31,7 @@
class SdlEventSource;
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#ifndef __SYMBIAN32__
#define USE_OSD 1
#endif
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 7cddd4443f..92540d93f7 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -117,7 +117,7 @@ AspectRatio::AspectRatio(int w, int h) {
_kh = h;
}
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
+#if !defined(__SYMBIAN32__) && defined(USE_SCALERS)
static AspectRatio getDesiredAspectRatio() {
const size_t AR_COUNT = 4;
const char *desiredAspectRatioAsStrings[AR_COUNT] = { "auto", "4/3", "16/9", "16/10" };
@@ -181,7 +181,7 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
_enableFocusRectDebugCode = ConfMan.getBool("use_sdl_debug_focusrect");
#endif
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
+#if !defined(__SYMBIAN32__) && defined(USE_SCALERS)
_videoMode.mode = GFX_DOUBLESIZE;
_videoMode.scaleFactor = 2;
_videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio");
@@ -195,7 +195,7 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
#endif
_scalerType = 0;
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#ifndef __SYMBIAN32__
_videoMode.fullscreen = ConfMan.getBool("fullscreen");
#else
_videoMode.fullscreen = true;
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
deleted file mode 100644
index caaba1a7dc..0000000000
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ /dev/null
@@ -1,1655 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "common/scummsys.h"
-
-#ifdef _WIN32_WCE
-
-#include "common/system.h"
-#include "common/textconsole.h"
-#include "common/translation.h"
-#include "common/mutex.h"
-
-#include "graphics/scaler/downscaler.h"
-#include "graphics/scaler/aspect.h"
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-#include "backends/events/wincesdl/wincesdl-events.h"
-#include "backends/platform/wince/wince-sdl.h"
-
-#include "backends/platform/wince/resource.h"
-#include "backends/platform/wince/CEActionsPocket.h"
-#include "backends/platform/wince/CEActionsSmartphone.h"
-#include "backends/platform/wince/CEDevice.h"
-#include "backends/platform/wince/CEScaler.h"
-#include "backends/platform/wince/CEgui/ItemAction.h"
-
-WINCESdlGraphicsManager::WINCESdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window)
- : SurfaceSdlGraphicsManager(sdlEventSource, window),
- _panelInitialized(false), _noDoubleTapRMB(false), _noDoubleTapPT(false),
- _toolbarHighDrawn(false), _newOrientation(0), _orientationLandscape(0),
- _panelVisible(true), _saveActiveToolbar(NAME_MAIN_PANEL), _panelStateForced(false),
- _canBeAspectScaled(false), _scalersChanged(false), _saveToolbarState(false),
- _mouseBackupOld(NULL), _mouseBackupDim(0), _mouseBackupToolbar(NULL),
- _usesEmulatedMouse(false), _forceHideMouse(false), _freeLook(false),
- _hasfocus(true), _zoomUp(false), _zoomDown(false) {
- memset(&_mouseCurState, 0, sizeof(_mouseCurState));
- if (_isSmartphone) {
- _cursorX = 20;
- _cursorY = 20;
- }
-
- loadDeviceConfigurationElement("repeatTrigger", _keyRepeatTrigger, 200);
- loadDeviceConfigurationElement("repeatX", _repeatX, 4);
- loadDeviceConfigurationElement("repeatY", _repeatY, 4);
- loadDeviceConfigurationElement("stepX1", _stepX1, 2);
- loadDeviceConfigurationElement("stepX2", _stepX2, 10);
- loadDeviceConfigurationElement("stepX3", _stepX3, 40);
- loadDeviceConfigurationElement("stepY1", _stepY1, 2);
- loadDeviceConfigurationElement("stepY2", _stepY2, 10);
- loadDeviceConfigurationElement("stepY3", _stepY3, 20);
- ConfMan.flushToDisk();
-
- _isSmartphone = CEDevice::isSmartphone();
-
- // Query SDL for screen size and init screen dependent stuff
- OSystem_WINCE3::initScreenInfos();
- create_toolbar();
- _hasSmartphoneResolution = CEDevice::hasSmartphoneResolution() || CEDevice::isSmartphone();
- if (_hasSmartphoneResolution)
- _panelVisible = false; // init correctly in smartphones
-
- _screen = NULL;
-}
-
-// Graphics mode consts
-
-// Low end devices 240x320
-
-static const OSystem::GraphicsMode s_supportedGraphicsModesLow[] = {
- {"1x", _s("Normal (no scaling)"), GFX_NORMAL},
- {0, 0, 0}
-};
-
-// High end device 480x640
-
-static const OSystem::GraphicsMode s_supportedGraphicsModesHigh[] = {
- {"1x", _s("Normal (no scaling)"), GFX_NORMAL},
- {"2x", "2x", GFX_DOUBLESIZE},
-#ifndef _MSC_VER // EVC breaks template functions, and I'm tired of fixing them :)
- {"2xsai", "2xSAI", GFX_2XSAI},
- {"super2xsai", "Super2xSAI", GFX_SUPER2XSAI},
- {"supereagle", "SuperEagle", GFX_SUPEREAGLE},
-#endif
- {"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
-#ifndef _MSC_VER
- {"hq2x", "HQ2x", GFX_HQ2X},
- {"tv2x", "TV2x", GFX_TV2X},
-#endif
- {"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
- {0, 0, 0}
-};
-
-const OSystem::GraphicsMode *WINCESdlGraphicsManager::getSupportedGraphicsModes() const {
- if (CEDevice::hasWideResolution())
- return s_supportedGraphicsModesHigh;
- else
- return s_supportedGraphicsModesLow;
-}
-
-bool WINCESdlGraphicsManager::hasFeature(OSystem::Feature f) const {
- return (f == OSystem::kFeatureVirtualKeyboard);
-}
-
-void WINCESdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
- switch (f) {
- case OSystem::kFeatureFullscreenMode:
- return;
-
- case OSystem::kFeatureVirtualKeyboard:
- if (_hasSmartphoneResolution)
- return;
- _toolbarHighDrawn = false;
- if (enable) {
- _panelStateForced = true;
- if (!_toolbarHandler.visible()) swap_panel_visibility();
- //_saveToolbarState = _toolbarHandler.visible();
- _saveActiveToolbar = _toolbarHandler.activeName();
- _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
- _toolbarHandler.setVisible(true);
- } else if (_panelStateForced) {
- _panelStateForced = false;
- _toolbarHandler.setActive(_saveActiveToolbar);
- //_toolbarHandler.setVisible(_saveToolbarState);
- }
- return;
-
- case OSystem::kFeatureDisableKeyFiltering:
- if (_hasSmartphoneResolution) {
- GUI::Actions::Instance()->beginMapping(enable);
- }
- return;
-
- default:
- SurfaceSdlGraphicsManager::setFeatureState(f, enable);
- }
-}
-
-bool WINCESdlGraphicsManager::getFeatureState(OSystem::Feature f) const {
- switch (f) {
- case OSystem::kFeatureFullscreenMode:
- return false;
- case OSystem::kFeatureVirtualKeyboard:
- return (_panelStateForced);
- default:
- return SurfaceSdlGraphicsManager::getFeatureState(f);
- }
-}
-
-int WINCESdlGraphicsManager::getDefaultGraphicsMode() const {
- return GFX_NORMAL;
-}
-
-void WINCESdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
- if (_hasSmartphoneResolution && h == 240)
- h = 200; // mainly for the launcher
-
- if (_isSmartphone && !ConfMan.hasKey("landscape")) {
- ConfMan.setInt("landscape", 1);
- ConfMan.flushToDisk();
- }
-
- _canBeAspectScaled = false;
- if (w == 320 && h == 200 && !_hasSmartphoneResolution) {
- _canBeAspectScaled = true;
- h = 240; // use the extra 40 pixels height for the toolbar
- }
-
- if (h == 400) // touche engine fixup
- h += 80;
-
- if (!_hasSmartphoneResolution) {
- if (h == 240)
- _toolbarHandler.setOffset(200);
- else
- _toolbarHandler.setOffset(400);
- } else {
- if (h == 240)
- _toolbarHandler.setOffset(200);
- else // 176x220
- _toolbarHandler.setOffset(0);
- }
-
- if (w != (uint) _videoMode.screenWidth || h != (uint) _videoMode.screenHeight)
- _scalersChanged = false;
-
- _videoMode.overlayWidth = w;
- _videoMode.overlayHeight = h;
-
- SurfaceSdlGraphicsManager::initSize(w, h, format);
-
- if (_scalersChanged) {
- unloadGFXMode();
- loadGFXMode();
- _scalersChanged = false;
- }
-
- update_game_settings();
-}
-
-void WINCESdlGraphicsManager::loadDeviceConfigurationElement(Common::String element, int &value, int defaultValue) {
- value = ConfMan.getInt(element, ConfMan.kApplicationDomain);
- if (!value) {
- value = defaultValue;
- ConfMan.setInt(element, value, ConfMan.kApplicationDomain);
- }
-}
-
-void WINCESdlGraphicsManager::move_cursor_up() {
- int x, y;
- _usesEmulatedMouse = true;
- retrieve_mouse_location(x, y);
- if (_keyRepeat > _repeatY)
- y -= _stepY3;
- else if (_keyRepeat)
- y -= _stepY2;
- else
- y -= _stepY1;
-
- if (y < 0)
- y = 0;
-
- EventsBuffer::simulateMouseMove(x, y);
-}
-
-void WINCESdlGraphicsManager::move_cursor_down() {
- int x, y;
- _usesEmulatedMouse = true;
- retrieve_mouse_location(x, y);
- if (_keyRepeat > _repeatY)
- y += _stepY3;
- else if (_keyRepeat)
- y += _stepY2;
- else
- y += _stepY1;
-
- if (y > _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd)
- y = _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd;
-
- EventsBuffer::simulateMouseMove(x, y);
-}
-
-void WINCESdlGraphicsManager::move_cursor_left() {
- int x, y;
- _usesEmulatedMouse = true;
- retrieve_mouse_location(x, y);
- if (_keyRepeat > _repeatX)
- x -= _stepX3;
- else if (_keyRepeat)
- x -= _stepX2;
- else
- x -= _stepX1;
-
- if (x < 0)
- x = 0;
-
- EventsBuffer::simulateMouseMove(x, y);
-}
-
-void WINCESdlGraphicsManager::move_cursor_right() {
- int x, y;
- _usesEmulatedMouse = true;
- retrieve_mouse_location(x, y);
- if (_keyRepeat > _repeatX)
- x += _stepX3;
- else if (_keyRepeat)
- x += _stepX2;
- else
- x += _stepX1;
-
- if (x > _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd)
- x = _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd;
-
- EventsBuffer::simulateMouseMove(x, y);
-}
-
-void WINCESdlGraphicsManager::retrieve_mouse_location(int &x, int &y) {
- x = _cursorX;
- y = _cursorY;
-
- x = x * _scaleFactorXm / _scaleFactorXd;
- y = y * _scaleFactorYm / _scaleFactorYd;
-
- if (_zoomDown)
- y -= 240;
-}
-
-void WINCESdlGraphicsManager::switch_zone() {
- int x, y;
- int i;
- retrieve_mouse_location(x, y);
-
- for (i = 0; i < TOTAL_ZONES; i++)
- if (x >= _zones[i].x && y >= _zones[i].y &&
- x <= _zones[i].x + _zones[i].width && y <= _zones[i].y + _zones[i].height) {
- _mouseXZone[i] = x;
- _mouseYZone[i] = y;
- break;
- }
- _currentZone = i + 1;
- if (_currentZone >= TOTAL_ZONES)
- _currentZone = 0;
-
- EventsBuffer::simulateMouseMove(_mouseXZone[_currentZone], _mouseYZone[_currentZone]);
-}
-
-void WINCESdlGraphicsManager::add_right_click(bool pushed) {
- int x, y;
- retrieve_mouse_location(x, y);
- EventsBuffer::simulateMouseRightClick(x, y, pushed);
-}
-
-void WINCESdlGraphicsManager::add_left_click(bool pushed) {
- int x, y;
- retrieve_mouse_location(x, y);
- EventsBuffer::simulateMouseLeftClick(x, y, pushed);
-}
-
-bool WINCESdlGraphicsManager::update_scalers() {
- _videoMode.aspectRatioCorrection = false;
-
- if (CEDevice::hasPocketPCResolution()) {
- if (_videoMode.mode != GFX_NORMAL)
- return false;
-
- if ((!_orientationLandscape && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth))
- || CEDevice::hasSquareQVGAResolution()) {
- if (OSystem_WINCE3::getScreenWidth() != 320) {
- _scaleFactorXm = 3;
- _scaleFactorXd = 4;
- _scaleFactorYm = 1;
- _scaleFactorYd = 1;
- _scalerProc = DownscaleHorizByThreeQuarters;
- } else {
- _scaleFactorXm = 1;
- _scaleFactorXd = 1;
- _scaleFactorYm = 1;
- _scaleFactorYd = 1;
- _scalerProc = Normal1x;
- }
- } else if (_orientationLandscape && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth)) {
- if (!_panelVisible && !_hasSmartphoneResolution && !_overlayVisible && _canBeAspectScaled) {
- _scaleFactorXm = 1;
- _scaleFactorXd = 1;
- _scaleFactorYm = 6;
- _scaleFactorYd = 5;
- _scalerProc = Normal1xAspect;
- _videoMode.aspectRatioCorrection = true;
- } else {
- _scaleFactorXm = 1;
- _scaleFactorXd = 1;
- _scaleFactorYm = 1;
- _scaleFactorYd = 1;
- _scalerProc = Normal1x;
- }
- } else if (_videoMode.screenWidth == 640 && !(OSystem_WINCE3::isOzone() && (OSystem_WINCE3::getScreenWidth() >= 640 || OSystem_WINCE3::getScreenHeight() >= 640))) {
- _scaleFactorXm = 1;
- _scaleFactorXd = 2;
- _scaleFactorYm = 1;
- _scaleFactorYd = 2;
- _scalerProc = DownscaleAllByHalf;
- } else if (_videoMode.screenWidth == 640 && (OSystem_WINCE3::isOzone() && (OSystem_WINCE3::getScreenWidth() >= 640 || OSystem_WINCE3::getScreenHeight() >= 640))) {
- _scaleFactorXm = 1;
- _scaleFactorXd = 1;
- _scaleFactorYm = 1;
- _scaleFactorYd = 1;
- _scalerProc = Normal1x;
- }
-
- return true;
- } else if (CEDevice::hasWideResolution()) {
-#ifdef USE_ARM_SCALER_ASM
- if (_videoMode.mode == GFX_DOUBLESIZE && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth)) {
- if (!_panelVisible && !_overlayVisible && _canBeAspectScaled) {
- _scaleFactorXm = 2;
- _scaleFactorXd = 1;
- _scaleFactorYm = 12;
- _scaleFactorYd = 5;
- _scalerProc = Normal2xAspect;
- _videoMode.aspectRatioCorrection = true;
- } else if ((_panelVisible || _overlayVisible) && _canBeAspectScaled) {
- _scaleFactorXm = 2;
- _scaleFactorXd = 1;
- _scaleFactorYm = 2;
- _scaleFactorYd = 1;
- _scalerProc = Normal2x;
- }
- return true;
- }
-#endif
- } else if (CEDevice::hasSmartphoneResolution()) {
- if (_videoMode.mode != GFX_NORMAL)
- return false;
-
- if (_videoMode.screenWidth > 320)
- error("Game resolution not supported on Smartphone");
-#ifdef ARM
- _scaleFactorXm = 11;
- _scaleFactorXd = 16;
-#else
- _scaleFactorXm = 2;
- _scaleFactorXd = 3;
-#endif
- _scaleFactorYm = 7;
- _scaleFactorYd = 8;
- _scalerProc = SmartphoneLandscape;
- initZones();
- return true;
- }
-
- return false;
-}
-
-void WINCESdlGraphicsManager::update_game_settings() {
- Common::String gameid(ConfMan.get("gameid"));
-
- // Finish panel initialization
- if (!_panelInitialized && !gameid.empty()) {
- CEGUI::Panel *panel;
- _panelInitialized = true;
- // Add the main panel
- panel = new CEGUI::Panel(0, 32);
- panel->setBackground(IMAGE_PANEL);
-
- // Save
- panel->add(NAME_ITEM_OPTIONS, new CEGUI::ItemAction(ITEM_OPTIONS, POCKET_ACTION_SAVE));
- // Skip
- panel->add(NAME_ITEM_SKIP, new CEGUI::ItemAction(ITEM_SKIP, POCKET_ACTION_SKIP));
- // sound
- panel->add(NAME_ITEM_SOUND, new CEGUI::ItemSwitch(ITEM_SOUND_OFF, ITEM_SOUND_ON, &OSystem_WINCE3::_soundMaster));
-
- // bind keys
- panel->add(NAME_ITEM_BINDKEYS, new CEGUI::ItemAction(ITEM_BINDKEYS, POCKET_ACTION_BINDKEYS));
- // portrait/landscape - screen dependent
- // FIXME : will still display the portrait/landscape icon when using a scaler (but will be disabled)
- if (ConfMan.hasKey("landscape")) {
- if (ConfMan.get("landscape")[0] > 57) {
- _newOrientation = _orientationLandscape = ConfMan.getBool("landscape");
- //ConfMan.removeKey("landscape", "");
- ConfMan.setInt("landscape", _orientationLandscape);
- } else
- _newOrientation = _orientationLandscape = ConfMan.getInt("landscape");
- } else {
- _newOrientation = _orientationLandscape = 0;
- }
- panel->add(NAME_ITEM_ORIENTATION, new CEGUI::ItemSwitch(ITEM_VIEW_LANDSCAPE, ITEM_VIEW_PORTRAIT, &_newOrientation, 2));
- _toolbarHandler.add(NAME_MAIN_PANEL, *panel);
- _toolbarHandler.setActive(NAME_MAIN_PANEL);
- _toolbarHandler.setVisible(true);
-
- if (_videoMode.mode == GFX_NORMAL && ConfMan.hasKey("landscape") && ConfMan.getInt("landscape")) {
- setGraphicsMode(GFX_NORMAL);
- hotswapGFXMode();
- }
-
- if (_hasSmartphoneResolution)
- panel->setVisible(false);
-
- _saveToolbarState = true;
- }
-
- if (ConfMan.hasKey("no_doubletap_rightclick"))
- _noDoubleTapRMB = ConfMan.getBool("no_doubletap_rightclick");
-
- if (ConfMan.hasKey("no_doubletap_paneltoggle"))
- _noDoubleTapPT = ConfMan.getBool("no_doubletap_paneltoggle");
-}
-
-void WINCESdlGraphicsManager::internUpdateScreen() {
- SDL_Surface *srcSurf, *origSurf;
- static bool old_overlayVisible = false;
- int numRectsOut = 0;
- int16 routx, routy, routw, routh, stretch, shakestretch;
-
- assert(_hwScreen != NULL);
-
- // bail if the application is minimized, be nice to OS
- if (!_hasfocus) {
- Sleep(20);
- return;
- }
-
- // If the shake position changed, fill the dirty area with blackness
- if (_currentShakePos != _gameScreenShakeOffset ||
- (_cursorNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
- SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd), (Uint16)(_gameScreenShakeOffset * _scaleFactorYm / _scaleFactorYd)};
-
- if (_videoMode.aspectRatioCorrection)
- blackrect.h = real2Aspect(blackrect.h - 1) + 1;
-
- SDL_FillRect(_hwScreen, &blackrect, 0);
-
- _currentShakePos = _gameScreenShakeOffset;
-
- _forceRedraw = true;
- }
-
- // Make sure the mouse is drawn, if it should be drawn.
- drawMouse();
-
- // Check whether the palette was changed in the meantime and update the
- // screen surface accordingly.
- if (_paletteDirtyEnd != 0) {
- SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart, _paletteDirtyStart, _paletteDirtyEnd - _paletteDirtyStart);
- _paletteDirtyEnd = 0;
- _forceRedraw = true;
- }
-
- if (!_overlayVisible) {
- origSurf = _screen;
- srcSurf = _tmpscreen;
- } else {
- origSurf = _overlayscreen;
- srcSurf = _tmpscreen2;
- }
-
- if (old_overlayVisible != _overlayVisible) {
- old_overlayVisible = _overlayVisible;
- update_scalers();
- }
-
- // Force a full redraw if requested
- if (_forceRedraw) {
- _numDirtyRects = 1;
-
- _dirtyRectList[0].x = 0;
- if (!_zoomDown)
- _dirtyRectList[0].y = 0;
- else
- _dirtyRectList[0].y = _videoMode.screenHeight / 2;
- _dirtyRectList[0].w = _videoMode.screenWidth;
- if (!_zoomUp && !_zoomDown)
- _dirtyRectList[0].h = _videoMode.screenHeight;
- else
- _dirtyRectList[0].h = _videoMode.screenHeight / 2;
-
- _toolbarHandler.forceRedraw();
- }
-
- // Only draw anything if necessary
- if (_numDirtyRects > 0) {
-
- SDL_Rect *r, *rout;
- SDL_Rect dst;
- uint32 srcPitch, dstPitch;
- SDL_Rect *last_rect = _dirtyRectList + _numDirtyRects;
- bool toolbarVisible = _toolbarHandler.visible();
- int toolbarOffset = _toolbarHandler.getOffset();
-
- for (r = _dirtyRectList; r != last_rect; ++r) {
- dst = *r;
- dst.x++; // Shift rect by one since 2xSai needs to access the data around
- dst.y++; // any pixel to scale it, and we want to avoid mem access crashes.
- // NOTE: This is also known as BLACK MAGIC, copied from the sdl backend
- if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0)
- error("SDL_BlitSurface failed: %s", SDL_GetError());
- }
-
- SDL_LockSurface(srcSurf);
- SDL_LockSurface(_hwScreen);
-
- srcPitch = srcSurf->pitch;
- dstPitch = _hwScreen->pitch;
-
- for (r = _dirtyRectList, rout = _dirtyRectOut; r != last_rect; ++r) {
-
- // always clamp to enclosing, downsampled-grid-aligned rect in the downscaled image
- if (_scaleFactorXd != 1) {
- stretch = r->x % _scaleFactorXd;
- r->x -= stretch;
- r->w += stretch;
- r->w = (r->x + r->w + _scaleFactorXd - 1) / _scaleFactorXd * _scaleFactorXd - r->x;
- }
- if (_scaleFactorYd != 1) {
- stretch = r->y % _scaleFactorYd;
- r->y -= stretch;
- r->h += stretch;
- r->h = (r->y + r->h + _scaleFactorYd - 1) / _scaleFactorYd * _scaleFactorYd - r->y;
- }
-
- // transform
- shakestretch = _currentShakePos * _scaleFactorYm / _scaleFactorYd;
- routx = r->x * _scaleFactorXm / _scaleFactorXd; // locate position in scaled screen
- routy = r->y * _scaleFactorYm / _scaleFactorYd + shakestretch; // adjust for shake offset
- routw = r->w * _scaleFactorXm / _scaleFactorXd;
- routh = r->h * _scaleFactorYm / _scaleFactorYd - shakestretch;
-
- // clipping destination rectangle inside device screen (more strict, also more tricky but more stable)
- // note that all current scalers do not make dst rect exceed left/right, unless chosen badly (FIXME)
- if (_zoomDown) routy -= 240; // adjust for zoom position
- if (routy + routh < 0) continue;
- if (routy < 0) {
- routh += routy;
- r->y -= routy * _scaleFactorYd / _scaleFactorYm;
- routy = 0;
- r->h = routh * _scaleFactorYd / _scaleFactorYm;
- }
- if (_orientationLandscape) {
- if (routy > OSystem_WINCE3::getScreenWidth()) continue;
- if (routy + routh > OSystem_WINCE3::getScreenWidth()) {
- routh = OSystem_WINCE3::getScreenWidth() - routy;
- r->h = routh * _scaleFactorYd / _scaleFactorYm;
- }
- } else {
- if (routy > OSystem_WINCE3::getScreenHeight()) continue;
- if (routy + routh > OSystem_WINCE3::getScreenHeight()) {
- routh = OSystem_WINCE3::getScreenHeight() - routy;
- r->h = routh * _scaleFactorYd / _scaleFactorYm;
- }
- }
-
- // check if the toolbar is overwritten
- if (toolbarVisible && r->y + r->h >= toolbarOffset)
- _toolbarHandler.forceRedraw();
-
- // blit it (with added voodoo from the sdl backend, shifting the source rect again)
- _scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
- (byte *)_hwScreen->pixels + routx * 2 + routy * dstPitch, dstPitch,
- r->w, r->h - _currentShakePos);
-
- // add this rect to output
- rout->x = routx;
- rout->y = routy - shakestretch;
- rout->w = routw;
- rout->h = routh + shakestretch;
- numRectsOut++;
- rout++;
-
- }
- SDL_UnlockSurface(srcSurf);
- SDL_UnlockSurface(_hwScreen);
- }
- // Add the toolbar if needed
- SDL_Rect toolbar_rect[1];
- if (_panelVisible && _toolbarHandler.draw(_toolbarLow, &toolbar_rect[0])) {
- // It can be drawn, scale it
- uint32 srcPitch, dstPitch;
- SDL_Surface *toolbarSurface;
- ScalerProc *toolbarScaler;
-
- if (_videoMode.screenHeight > 240) {
- if (!_toolbarHighDrawn) {
- // Resize the toolbar
- SDL_LockSurface(_toolbarLow);
- SDL_LockSurface(_toolbarHigh);
- Normal2x((byte *)_toolbarLow->pixels, _toolbarLow->pitch, (byte *)_toolbarHigh->pixels, _toolbarHigh->pitch, toolbar_rect[0].w, toolbar_rect[0].h);
- SDL_UnlockSurface(_toolbarHigh);
- SDL_UnlockSurface(_toolbarLow);
- _toolbarHighDrawn = true;
- }
- toolbar_rect[0].w *= 2;
- toolbar_rect[0].h *= 2;
- toolbarSurface = _toolbarHigh;
- } else
- toolbarSurface = _toolbarLow;
-
- drawToolbarMouse(toolbarSurface, true); // draw toolbar mouse if applicable
-
- // Apply the appropriate scaler
- SDL_LockSurface(toolbarSurface);
- SDL_LockSurface(_hwScreen);
- srcPitch = toolbarSurface->pitch;
- dstPitch = _hwScreen->pitch;
-
- toolbarScaler = _scalerProc;
- if (_videoMode.scaleFactor == 2)
- toolbarScaler = Normal2x;
- else if (_videoMode.scaleFactor == 3)
- toolbarScaler = Normal3x;
- toolbarScaler((byte *)toolbarSurface->pixels, srcPitch,
- (byte *)_hwScreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch),
- dstPitch, toolbar_rect[0].w, toolbar_rect[0].h);
- SDL_UnlockSurface(toolbarSurface);
- SDL_UnlockSurface(_hwScreen);
-
- // And blit it
- toolbar_rect[0].y = _toolbarHandler.getOffset();
- toolbar_rect[0].x = toolbar_rect[0].x * _scaleFactorXm / _scaleFactorXd;
- toolbar_rect[0].y = toolbar_rect[0].y * _scaleFactorYm / _scaleFactorYd;
- toolbar_rect[0].w = toolbar_rect[0].w * _scaleFactorXm / _scaleFactorXd;
- toolbar_rect[0].h = toolbar_rect[0].h * _scaleFactorYm / _scaleFactorYd;
-
- SDL_UpdateRects(_hwScreen, 1, toolbar_rect);
-
- drawToolbarMouse(toolbarSurface, false); // undraw toolbar mouse
- }
-
- // Finally, blit all our changes to the screen
- if (numRectsOut > 0)
- SDL_UpdateRects(_hwScreen, numRectsOut, _dirtyRectOut);
-
- _numDirtyRects = 0;
- _forceRedraw = false;
-}
-
-bool WINCESdlGraphicsManager::setGraphicsMode(int mode) {
-
- Common::StackLock lock(_graphicsMutex);
- int oldScaleFactorXm = _scaleFactorXm;
- int oldScaleFactorXd = _scaleFactorXd;
- int oldScaleFactorYm = _scaleFactorYm;
- int oldScaleFactorYd = _scaleFactorYd;
-
- _scaleFactorXm = -1;
- _scaleFactorXd = -1;
- _scaleFactorYm = -1;
- _scaleFactorYd = -1;
-
- if (ConfMan.hasKey("landscape"))
- if (ConfMan.get("landscape")[0] > 57) {
- _newOrientation = _orientationLandscape = ConfMan.getBool("landscape");
- ConfMan.setInt("landscape", _orientationLandscape);
- } else
- _newOrientation = _orientationLandscape = ConfMan.getInt("landscape");
- else
- _newOrientation = _orientationLandscape = 0;
-
- if (OSystem_WINCE3::isOzone() && (OSystem_WINCE3::getScreenWidth() >= 640 || OSystem_WINCE3::getScreenHeight() >= 640) && mode)
- _scaleFactorXm = -1;
-
- if (CEDevice::hasPocketPCResolution() && !CEDevice::hasWideResolution() && _orientationLandscape)
- _videoMode.mode = GFX_NORMAL;
- else
- _videoMode.mode = mode;
-
- if (_scaleFactorXm < 0) {
- /* Standard scalers, from the SDL backend */
- switch (_videoMode.mode) {
- case GFX_NORMAL:
- _videoMode.scaleFactor = 1;
- _scalerProc = Normal1x;
- break;
- case GFX_DOUBLESIZE:
- _videoMode.scaleFactor = 2;
- _scalerProc = Normal2x;
- break;
- case GFX_TRIPLESIZE:
- _videoMode.scaleFactor = 3;
- _scalerProc = Normal3x;
- break;
- case GFX_2XSAI:
- _videoMode.scaleFactor = 2;
- _scalerProc = _2xSaI;
- break;
- case GFX_SUPER2XSAI:
- _videoMode.scaleFactor = 2;
- _scalerProc = Super2xSaI;
- break;
- case GFX_SUPEREAGLE:
- _videoMode.scaleFactor = 2;
- _scalerProc = SuperEagle;
- break;
- case GFX_ADVMAME2X:
- _videoMode.scaleFactor = 2;
- _scalerProc = AdvMame2x;
- break;
- case GFX_ADVMAME3X:
- _videoMode.scaleFactor = 3;
- _scalerProc = AdvMame3x;
- break;
-#ifdef USE_HQ_SCALERS
- case GFX_HQ2X:
- _videoMode.scaleFactor = 2;
- _scalerProc = HQ2x;
- break;
- case GFX_HQ3X:
- _videoMode.scaleFactor = 3;
- _scalerProc = HQ3x;
- break;
-#endif
- case GFX_TV2X:
- _videoMode.scaleFactor = 2;
- _scalerProc = TV2x;
- break;
- case GFX_DOTMATRIX:
- _videoMode.scaleFactor = 2;
- _scalerProc = DotMatrix;
- break;
-
- default:
- error("unknown gfx mode %d", mode);
- }
- }
-
- // Check if the scaler can be accepted, if not get back to normal scaler
- if (_videoMode.scaleFactor && ((_videoMode.scaleFactor * _videoMode.screenWidth > OSystem_WINCE3::getScreenWidth() && _videoMode.scaleFactor * _videoMode.screenWidth > OSystem_WINCE3::getScreenHeight())
- || (_videoMode.scaleFactor * _videoMode.screenHeight > OSystem_WINCE3::getScreenWidth() && _videoMode.scaleFactor * _videoMode.screenHeight > OSystem_WINCE3::getScreenHeight()))) {
- _videoMode.scaleFactor = 1;
- _scalerProc = Normal1x;
- }
-
- // Common scaler system was used
- if (_scaleFactorXm < 0) {
- _scaleFactorXm = _videoMode.scaleFactor;
- _scaleFactorXd = 1;
- _scaleFactorYm = _videoMode.scaleFactor;
- _scaleFactorYd = 1;
- }
-
- _forceRedraw = true;
-
- if (oldScaleFactorXm != _scaleFactorXm ||
- oldScaleFactorXd != _scaleFactorXd ||
- oldScaleFactorYm != _scaleFactorYm ||
- oldScaleFactorYd != _scaleFactorYd) {
- _scalersChanged = true;
- } else
- _scalersChanged = false;
-
-
- return true;
-
-}
-
-bool WINCESdlGraphicsManager::loadGFXMode() {
- int displayWidth;
- int displayHeight;
- unsigned int flags = SDL_FULLSCREEN | SDL_SWSURFACE;
-
- _videoMode.fullscreen = true; // forced
- _forceRedraw = true;
-
- _tmpscreen = NULL;
-
- // Recompute scalers if necessary
- update_scalers();
-
- // Create the surface that contains the 8 bit game data
- _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, 8, 0, 0, 0, 0);
- if (_screen == NULL)
- error("_screen failed (%s)", SDL_GetError());
-
- // Create the surface that contains the scaled graphics in 16 bit mode
- // Always use full screen mode to have a "clean screen"
- if (!_videoMode.aspectRatioCorrection) {
- displayWidth = _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd;
- displayHeight = _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd;
- } else {
- displayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
- displayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
- }
-
- switch (_orientationLandscape) {
- case 1:
- flags |= SDL_LANDSCVIDEO;
- break;
- case 2:
- flags |= SDL_INVLNDVIDEO;
- break;
- default:
- flags |= SDL_PORTRTVIDEO;
- }
- _hwScreen = SDL_SetVideoMode(displayWidth, displayHeight, 16, flags);
-
- if (_hwScreen == NULL) {
- warning("SDL_SetVideoMode says we can't switch to that mode (%s)", SDL_GetError());
- g_system->quit();
- }
-
- // see what orientation sdl finally accepted
- if (_hwScreen->flags & SDL_PORTRTVIDEO)
- _orientationLandscape = _newOrientation = 0;
- else if (_hwScreen->flags & SDL_LANDSCVIDEO)
- _orientationLandscape = _newOrientation = 1;
- else
- _orientationLandscape = _newOrientation = 2;
-
- // Create the surface used for the graphics in 16 bit before scaling, and also the overlay
- // Distinguish 555 and 565 mode
- if (_hwScreen->format->Gmask == 0x3E0)
- InitScalers(555);
- else
- InitScalers(565);
-
- _overlayFormat = convertSDLPixelFormat(_hwScreen->format);
-
- // Need some extra bytes around when using 2xSaI
- _tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth + 3, _videoMode.screenHeight + 3, 16, _hwScreen->format->Rmask, _hwScreen->format->Gmask, _hwScreen->format->Bmask, _hwScreen->format->Amask);
-
- if (_tmpscreen == NULL)
- error("_tmpscreen creation failed (%s)", SDL_GetError());
-
- // Overlay
- if (CEDevice::hasDesktopResolution()) {
- _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth * _scaleFactorXm / _scaleFactorXd, _videoMode.overlayHeight * _scaleFactorYm / _scaleFactorYd, 16, 0, 0, 0, 0);
- if (_overlayscreen == NULL)
- error("_overlayscreen failed (%s)", SDL_GetError());
- _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth * _scaleFactorXm / _scaleFactorXd + 3, _videoMode.overlayHeight * _scaleFactorYm / _scaleFactorYd + 3, 16, 0, 0, 0, 0);
- if (_tmpscreen2 == NULL)
- error("_tmpscreen2 failed (%s)", SDL_GetError());
- } else {
- _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth, _videoMode.overlayHeight, 16, 0, 0, 0, 0);
- if (_overlayscreen == NULL)
- error("_overlayscreen failed (%s)", SDL_GetError());
- _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.overlayWidth + 3, _videoMode.overlayHeight + 3, 16, 0, 0, 0, 0);
- if (_tmpscreen2 == NULL)
- error("_tmpscreen2 failed (%s)", SDL_GetError());
- }
-
- // Toolbar
- _toolbarHighDrawn = false;
- uint16 *toolbar_screen = (uint16 *)calloc(320 * 40, sizeof(uint16)); // *not* leaking memory here
- _toolbarLow = SDL_CreateRGBSurfaceFrom(toolbar_screen, 320, 40, 16, 320 * 2, _hwScreen->format->Rmask, _hwScreen->format->Gmask, _hwScreen->format->Bmask, _hwScreen->format->Amask);
-
- if (_toolbarLow == NULL)
- error("_toolbarLow failed (%s)", SDL_GetError());
-
- if (_videoMode.screenHeight > 240) {
- uint16 *toolbar_screen_high = (uint16 *)calloc(640 * 80, sizeof(uint16));
- _toolbarHigh = SDL_CreateRGBSurfaceFrom(toolbar_screen_high, 640, 80, 16, 640 * 2, _hwScreen->format->Rmask, _hwScreen->format->Gmask, _hwScreen->format->Bmask, _hwScreen->format->Amask);
-
- if (_toolbarHigh == NULL)
- error("_toolbarHigh failed (%s)", SDL_GetError());
- } else
- _toolbarHigh = NULL;
-
- // keyboard cursor control, some other better place for it?
- _eventSource->resetKeyboardEmulation(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd - 1, _videoMode.screenHeight * _scaleFactorXm / _scaleFactorXd - 1);
-
- return true;
-}
-
-void WINCESdlGraphicsManager::unloadGFXMode() {
- if (_screen) {
- SDL_FreeSurface(_screen);
- _screen = NULL;
- }
-
- if (_hwScreen) {
- SDL_FreeSurface(_hwScreen);
- _hwScreen = NULL;
- }
-
- if (_tmpscreen) {
- SDL_FreeSurface(_tmpscreen);
- _tmpscreen = NULL;
- }
-}
-
-bool WINCESdlGraphicsManager::hotswapGFXMode() {
- if (!_screen)
- return false;
-
- // Keep around the old _screen & _tmpscreen so we can restore the screen data
- // after the mode switch. (also for the overlay)
- SDL_Surface *old_screen = _screen;
- SDL_Surface *old_tmpscreen = _tmpscreen;
- SDL_Surface *old_overlayscreen = _overlayscreen;
- SDL_Surface *old_tmpscreen2 = _tmpscreen2;
-
- // Release the HW screen surface
- SDL_FreeSurface(_hwScreen);
-
- // Release toolbars
- free(_toolbarLow->pixels);
- SDL_FreeSurface(_toolbarLow);
- if (_toolbarHigh) {
- free(_toolbarHigh->pixels);
- SDL_FreeSurface(_toolbarHigh);
- }
-
- // Setup the new GFX mode
- if (!loadGFXMode()) {
- unloadGFXMode();
-
- _screen = old_screen;
- _overlayscreen = old_overlayscreen;
-
- return false;
- }
-
- // reset palette
- SDL_SetColors(_screen, _currentPalette, 0, 256);
-
- // Restore old screen content
- SDL_BlitSurface(old_screen, NULL, _screen, NULL);
- SDL_BlitSurface(old_tmpscreen, NULL, _tmpscreen, NULL);
- if (_overlayVisible) {
- SDL_BlitSurface(old_overlayscreen, NULL, _overlayscreen, NULL);
- SDL_BlitSurface(old_tmpscreen2, NULL, _tmpscreen2, NULL);
- }
-
- // Free the old surfaces
- SDL_FreeSurface(old_screen);
- SDL_FreeSurface(old_tmpscreen);
- SDL_FreeSurface(old_overlayscreen);
- SDL_FreeSurface(old_tmpscreen2);
-
- // Blit everything back to the screen
- _toolbarHighDrawn = false;
- internUpdateScreen();
-
- // Make sure that a Common::EVENT_SCREEN_CHANGED gets sent later -> FIXME this crashes when no game has been loaded.
-// _modeChanged = true;
-
- return true;
-}
-
-bool WINCESdlGraphicsManager::saveScreenshot(const char *filename) {
- assert(_hwScreen != NULL);
-
- Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
- SDL_SaveBMP(_hwScreen, filename);
- return true;
-}
-
-void WINCESdlGraphicsManager::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {
- assert(_transactionMode == kTransactionNone);
-
- if (_overlayscreen == NULL)
- return;
-
- const byte *src = (const byte *)buf;
-
- // Clip the coordinates
- if (x < 0) {
- w += x;
- src -= x * 2;
- x = 0;
- }
-
- if (y < 0) {
- h += y;
- src -= y * pitch;
- y = 0;
- }
-
- if (w > _videoMode.overlayWidth - x) {
- w = _videoMode.overlayWidth - x;
- }
-
- if (h > _videoMode.overlayHeight - y) {
- h = _videoMode.overlayHeight - y;
- }
-
- if (w <= 0 || h <= 0)
- return;
-
- // Mark the modified region as dirty
- addDirtyRect(x, y, w, h);
-
- undrawMouse();
-
- if (SDL_LockSurface(_overlayscreen) == -1)
- error("SDL_LockSurface failed: %s", SDL_GetError());
-
- byte *dst = (byte *)_overlayscreen->pixels + y * _overlayscreen->pitch + x * 2;
- do {
- memcpy(dst, src, w * 2);
- dst += _overlayscreen->pitch;
- src += pitch;
- } while (--h);
-
- SDL_UnlockSurface(_overlayscreen);
-}
-
-void WINCESdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {
- assert(_transactionMode == kTransactionNone);
- assert(buf);
-
- if (_screen == NULL)
- return;
-
- Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
-
- const byte *src = (const byte *)buf;
- /* Clip the coordinates */
- if (x < 0) {
- w += x;
- src -= x;
- x = 0;
- }
-
- if (y < 0) {
- h += y;
- src -= y * pitch;
- y = 0;
- }
-
- if (w > _videoMode.screenWidth - x) {
- w = _videoMode.screenWidth - x;
- }
-
- if (h > _videoMode.screenHeight - y) {
- h = _videoMode.screenHeight - y;
- }
-
- if (w <= 0 || h <= 0)
- return;
-
- addDirtyRect(x, y, w, h);
-
- undrawMouse();
-
- // Try to lock the screen surface
- if (SDL_LockSurface(_screen) == -1)
- error("SDL_LockSurface failed: %s", SDL_GetError());
-
- byte *dst = (byte *)_screen->pixels + y * _videoMode.screenWidth + x;
-
- if (_videoMode.screenWidth == pitch && pitch == w) {
- memcpy(dst, src, h * w);
- } else {
- do {
- memcpy(dst, src, w);
- src += pitch;
- dst += _videoMode.screenWidth;
- } while (--h);
- }
-
- // Unlock the screen surface
- SDL_UnlockSurface(_screen);
-}
-
-void WINCESdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
-
- undrawMouse();
- if (w == 0 || h == 0)
- return;
-
- _mouseCurState.w = w;
- _mouseCurState.h = h;
-
- _mouseHotspotX = hotspot_x;
- _mouseHotspotY = hotspot_y;
-
- _mouseKeyColor = keycolor;
-
- free(_mouseData);
-
- _mouseData = (byte *) malloc(w * h);
- memcpy(_mouseData, buf, w * h);
-
- if (w > _mouseBackupDim || h > _mouseBackupDim) {
- // mouse has been undrawn, adjust sprite backup area
- free(_mouseBackupOld);
- free(_mouseBackupToolbar);
- uint16 tmp = (w > h) ? w : h;
- _mouseBackupOld = (byte *) malloc(tmp * tmp * 2); // can hold 8bpp (playfield) or 16bpp (overlay) data
- _mouseBackupToolbar = (uint16 *) malloc(tmp * tmp * 2); // 16 bpp
- _mouseBackupDim = tmp;
- }
-}
-
-void WINCESdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
- /*
- if (!_overlayVisible) {
- point.x = point.x * _scaleFactorXd / _scaleFactorXm;
- point.y = point.y * _scaleFactorYd / _scaleFactorYm;
- point.x /= _videoMode.scaleFactor;
- point.y /= _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- point.y = aspect2Real(point.y);
- }
- */
-}
-
-void WINCESdlGraphicsManager::setMousePos(int x, int y) {
- if (x != _cursorX || y != _cursorY) {
- undrawMouse();
- _cursorX = x;
- _cursorY = y;
- updateScreen();
- }
-}
-
-Graphics::Surface *WINCESdlGraphicsManager::lockScreen() {
- // Make sure mouse pointer is not painted over the playfield at the time of locking
- undrawMouse();
- return SurfaceSdlGraphicsManager::lockScreen();
-}
-
-void WINCESdlGraphicsManager::showOverlay() {
- assert(_transactionMode == kTransactionNone);
-
- if (_overlayVisible)
- return;
-
- undrawMouse();
- _overlayVisible = true;
- update_scalers();
- clearOverlay();
-}
-
-void WINCESdlGraphicsManager::hideOverlay() {
- assert(_transactionMode == kTransactionNone);
-
- if (!_overlayVisible)
- return;
-
- undrawMouse();
- _overlayVisible = false;
- clearOverlay();
- _forceRedraw = true;
-}
-
-void WINCESdlGraphicsManager::blitCursor() {
-}
-
-void WINCESdlGraphicsManager::drawToolbarMouse(SDL_Surface *surf, bool draw) {
-
- if (!_mouseData || !_usesEmulatedMouse)
- return;
-
- int x = _cursorX - _mouseHotspotX;
- int y = _cursorY - _mouseHotspotY - _toolbarHandler.getOffset();
- int w = _mouseCurState.w;
- int h = _mouseCurState.h;
- byte color;
- const byte *src = _mouseData;
- int width;
-
- // clip
- if (x < 0) {
- w += x;
- src -= x;
- x = 0;
- }
- if (y < 0) {
- h += y;
- src -= y * _mouseCurState.w;
- y = 0;
- }
- if (w > surf->w - x)
- w = surf->w - x;
- if (h > surf->h - y)
- h = surf->h - y;
- if (w <= 0 || h <= 0)
- return;
-
- if (SDL_LockSurface(surf) == -1)
- error("SDL_LockSurface failed at internDrawToolbarMouse: %s", SDL_GetError());
-
- uint16 *bak = _mouseBackupToolbar; // toolbar surfaces are 16bpp
- uint16 *dst;
- dst = (uint16 *)surf->pixels + y * surf->w + x;
-
- if (draw) { // blit it
- while (h > 0) {
- width = w;
- while (width > 0) {
- *bak++ = *dst;
- color = *src++;
- if (color != _mouseKeyColor) // transparent color
- *dst = 0xFFFF;
- dst++;
- width--;
- }
- src += _mouseCurState.w - w;
- bak += _mouseBackupDim - w;
- dst += surf->w - w;
- h--;
- }
- } else { // restore bg
- for (y = 0; y < h; ++y, bak += _mouseBackupDim, dst += surf->w)
- memcpy(dst, bak, w << 1);
- }
-
- SDL_UnlockSurface(surf);
-}
-
-void WINCESdlGraphicsManager::warpMouse(int x, int y) {
- if (_cursorX != x || _cursorY != y) {
- SDL_WarpMouse(x * _scaleFactorXm / _scaleFactorXd, y * _scaleFactorYm / _scaleFactorYd);
-
- // SDL_WarpMouse() generates a mouse movement event, so
- // set_mouse_pos() would be called eventually. However, the
- // cannon script in CoMI calls this function twice each time
- // the cannon is reloaded. Unless we update the mouse position
- // immediately the second call is ignored, causing the cannon
- // to change its aim.
-
- setMousePos(x, y);
- }
-}
-
-void WINCESdlGraphicsManager::unlockScreen() {
- SurfaceSdlGraphicsManager::unlockScreen();
-}
-
-void WINCESdlGraphicsManager::internDrawMouse() {
- if (!_cursorNeedsRedraw || !_cursorVisible || !_mouseData)
- return;
-
- int x = _cursorX - _mouseHotspotX;
- int y = _cursorY - _mouseHotspotY;
- int w = _mouseCurState.w;
- int h = _mouseCurState.h;
- byte color;
- const byte *src = _mouseData; // Image representing the mouse
- int width;
-
- // clip the mouse rect, and adjust the src pointer accordingly
- if (x < 0) {
- w += x;
- src -= x;
- x = 0;
- }
- if (y < 0) {
- h += y;
- src -= y * _mouseCurState.w;
- y = 0;
- }
-
- if (w > _videoMode.screenWidth - x)
- w = _videoMode.screenWidth - x;
- if (h > _videoMode.screenHeight - y)
- h = _videoMode.screenHeight - y;
-
- // Quick check to see if anything has to be drawn at all
- if (w <= 0 || h <= 0)
- return;
-
- // Draw the mouse cursor; backup the covered area in "bak"
- if (SDL_LockSurface(_overlayVisible ? _overlayscreen : _screen) == -1)
- error("SDL_LockSurface failed: %s", SDL_GetError());
-
- // Mark as dirty
- addDirtyRect(x, y, w, h);
-
- if (!_overlayVisible) {
- byte *bak = _mouseBackupOld; // Surface used to backup the area obscured by the mouse
- byte *dst; // Surface we are drawing into
-
- dst = (byte *)_screen->pixels + y * _videoMode.screenWidth + x;
- while (h > 0) {
- width = w;
- while (width > 0) {
- *bak++ = *dst;
- color = *src++;
- if (color != _mouseKeyColor) // transparent, don't draw
- *dst = color;
- dst++;
- width--;
- }
- src += _mouseCurState.w - w;
- bak += _mouseBackupDim - w;
- dst += _videoMode.screenWidth - w;
- h--;
- }
-
- } else {
- uint16 *bak = (uint16 *)_mouseBackupOld; // Surface used to backup the area obscured by the mouse
- byte *dst; // Surface we are drawing into
-
- dst = (byte *)_overlayscreen->pixels + (y + 1) * _overlayscreen->pitch + (x + 1) * 2;
- while (h > 0) {
- width = w;
- while (width > 0) {
- *bak++ = *(uint16 *)dst;
- color = *src++;
- if (color != 0xFF) // 0xFF = transparent, don't draw
- *(uint16 *)dst = SDL_MapRGB(_overlayscreen->format, _currentPalette[color].r, _currentPalette[color].g, _currentPalette[color].b);
- dst += 2;
- width--;
- }
- src += _mouseCurState.w - w;
- bak += _mouseBackupDim - w;
- dst += _overlayscreen->pitch - w * 2;
- h--;
- }
- }
-
- SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen);
-
- // Finally, set the flag to indicate the mouse has been drawn
- _cursorNeedsRedraw = false;
-}
-
-void WINCESdlGraphicsManager::undrawMouse() {
- assert(_transactionMode == kTransactionNone);
-
- if (_cursorNeedsRedraw)
- return;
-
- int old_mouse_x = _cursorX - _mouseHotspotX;
- int old_mouse_y = _cursorY - _mouseHotspotY;
- int old_mouse_w = _mouseCurState.w;
- int old_mouse_h = _mouseCurState.h;
-
- // clip the mouse rect, and adjust the src pointer accordingly
- if (old_mouse_x < 0) {
- old_mouse_w += old_mouse_x;
- old_mouse_x = 0;
- }
- if (old_mouse_y < 0) {
- old_mouse_h += old_mouse_y;
- old_mouse_y = 0;
- }
-
- if (old_mouse_w > _videoMode.screenWidth - old_mouse_x)
- old_mouse_w = _videoMode.screenWidth - old_mouse_x;
- if (old_mouse_h > _videoMode.screenHeight - old_mouse_y)
- old_mouse_h = _videoMode.screenHeight - old_mouse_y;
-
- // Quick check to see if anything has to be drawn at all
- if (old_mouse_w <= 0 || old_mouse_h <= 0)
- return;
-
-
- if (SDL_LockSurface(_overlayVisible ? _overlayscreen : _screen) == -1)
- error("SDL_LockSurface failed: %s", SDL_GetError());
-
- int y;
- if (!_overlayVisible) {
- byte *dst, *bak = _mouseBackupOld;
-
- // No need to do clipping here, since drawMouse() did that already
- dst = (byte *)_screen->pixels + old_mouse_y * _videoMode.screenWidth + old_mouse_x;
- for (y = 0; y < old_mouse_h; ++y, bak += _mouseBackupDim, dst += _videoMode.screenWidth)
- memcpy(dst, bak, old_mouse_w);
- } else {
- byte *dst;
- uint16 *bak = (uint16 *)_mouseBackupOld;
-
- // No need to do clipping here, since drawMouse() did that already
- dst = (byte *)_overlayscreen->pixels + (old_mouse_y + 1) * _overlayscreen->pitch + (old_mouse_x + 1) * 2;
- for (y = 0; y < old_mouse_h; ++y, bak += _mouseBackupDim, dst += _overlayscreen->pitch)
- memcpy(dst, bak, old_mouse_w << 1);
- }
-
- addDirtyRect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
-
- SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen);
-
- _cursorNeedsRedraw = true;
-}
-
-void WINCESdlGraphicsManager::drawMouse() {
- if (!(_toolbarHandler.visible() && _cursorY >= _toolbarHandler.getOffset() && !_usesEmulatedMouse) && !_forceHideMouse)
- internDrawMouse();
-}
-
-bool WINCESdlGraphicsManager::showMouse(bool visible) {
- if (_cursorVisible == visible)
- return visible;
-
- if (visible == false)
- undrawMouse();
-
- bool last = _cursorVisible;
- _cursorVisible = visible;
- _cursorNeedsRedraw = true;
-
- return last;
-}
-
-void WINCESdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool mouseRect) {
-
- if (_forceRedraw || _paletteDirtyEnd)
- return;
-
- SurfaceSdlGraphicsManager::addDirtyRect(x, y, w, h, false);
-}
-
-void WINCESdlGraphicsManager::swap_panel_visibility() {
- //if (!_forcePanelInvisible && !_panelStateForced) {
- if (_zoomDown || _zoomUp)
- return;
-
- if (_panelVisible) {
- if (_toolbarHandler.activeName() == NAME_PANEL_KEYBOARD)
- _panelVisible = !_panelVisible;
- else
- _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
- } else {
- _toolbarHandler.setActive(NAME_MAIN_PANEL);
- _panelVisible = !_panelVisible;
- }
- _toolbarHandler.setVisible(_panelVisible);
- _toolbarHighDrawn = false;
-
- if (_videoMode.screenHeight > 240)
- addDirtyRect(0, 400, 640, 80);
- else
- addDirtyRect(0, 200, 320, 40);
-
- if (_toolbarHandler.activeName() == NAME_PANEL_KEYBOARD && _panelVisible)
- internUpdateScreen();
- else {
- update_scalers();
- hotswapGFXMode();
- }
- //}
-}
-
-void WINCESdlGraphicsManager::swap_panel() {
- _toolbarHighDrawn = false;
- //if (!_panelStateForced) {
- if (_toolbarHandler.activeName() == NAME_PANEL_KEYBOARD && _panelVisible)
- _toolbarHandler.setActive(NAME_MAIN_PANEL);
- else
- _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
-
- if (_videoMode.screenHeight > 240)
- addDirtyRect(0, 400, 640, 80);
- else
- addDirtyRect(0, 200, 320, 40);
-
- _toolbarHandler.setVisible(true);
- if (!_panelVisible) {
- _panelVisible = true;
- update_scalers();
- hotswapGFXMode();
- }
- //}
-}
-
-void WINCESdlGraphicsManager::swap_smartphone_keyboard() {
- _toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
- _panelVisible = !_panelVisible;
- _toolbarHandler.setVisible(_panelVisible);
- if (_videoMode.screenHeight > 240)
- addDirtyRect(0, 0, 640, 80);
- else
- addDirtyRect(0, 0, 320, 40);
- internUpdateScreen();
-}
-
-void WINCESdlGraphicsManager::swap_zoom_up() {
- if (_zoomUp) {
- // restore visibility
- _toolbarHandler.setVisible(_saveToolbarZoom);
- // restore scaler
- _scaleFactorYd = 2;
- _scalerProc = DownscaleAllByHalf;
- _zoomUp = false;
- _zoomDown = false;
- } else {
- // only active if running on a PocketPC
- if (_scalerProc != DownscaleAllByHalf && _scalerProc != DownscaleHorizByHalf)
- return;
- if (_scalerProc == DownscaleAllByHalf) {
- _saveToolbarZoom = _toolbarHandler.visible();
- _toolbarHandler.setVisible(false);
- // set zoom scaler
- _scaleFactorYd = 1;
- _scalerProc = DownscaleHorizByHalf;
- }
-
- _zoomDown = false;
- _zoomUp = true;
- }
- // redraw whole screen
- addDirtyRect(0, 0, 640, 480);
- internUpdateScreen();
-}
-
-void WINCESdlGraphicsManager::swap_zoom_down() {
- if (_zoomDown) {
- // restore visibility
- _toolbarHandler.setVisible(_saveToolbarZoom);
- // restore scaler
- _scaleFactorYd = 2;
- _scalerProc = DownscaleAllByHalf;
- _zoomDown = false;
- _zoomUp = false;
- } else {
- // only active if running on a PocketPC
- if (_scalerProc != DownscaleAllByHalf && _scalerProc != DownscaleHorizByHalf)
- return;
- if (_scalerProc == DownscaleAllByHalf) {
- _saveToolbarZoom = _toolbarHandler.visible();
- _toolbarHandler.setVisible(false);
- // set zoom scaler
- _scaleFactorYd = 1;
- _scalerProc = DownscaleHorizByHalf;
- }
-
- _zoomUp = false;
- _zoomDown = true;
- }
- // redraw whole screen
- addDirtyRect(0, 0, 640, 480);
- internUpdateScreen();
-}
-
-void WINCESdlGraphicsManager::swap_mouse_visibility() {
- _forceHideMouse = !_forceHideMouse;
- if (_forceHideMouse)
- undrawMouse();
-}
-
-void WINCESdlGraphicsManager::init_panel() {
- _panelVisible = true;
- if (_panelInitialized) {
- _toolbarHandler.setVisible(true);
- _toolbarHandler.setActive(NAME_MAIN_PANEL);
- }
-}
-
-void WINCESdlGraphicsManager::reset_panel() {
- _panelVisible = false;
- _toolbarHandler.setVisible(false);
-}
-
-// Smartphone actions
-void WINCESdlGraphicsManager::initZones() {
- int i;
-
- _currentZone = 0;
- for (i = 0; i < TOTAL_ZONES; i++) {
- _mouseXZone[i] = (_zones[i].x + (_zones[i].width / 2)) * _scaleFactorXm / _scaleFactorXd;
- _mouseYZone[i] = (_zones[i].y + (_zones[i].height / 2)) * _scaleFactorYm / _scaleFactorYd;
- }
-}
-
-void WINCESdlGraphicsManager::smartphone_rotate_display() {
- _orientationLandscape = _newOrientation = _orientationLandscape == 1 ? 2 : 1;
- ConfMan.setInt("landscape", _orientationLandscape);
- ConfMan.flushToDisk();
- hotswapGFXMode();
-}
-
-void WINCESdlGraphicsManager::create_toolbar() {
- CEGUI::PanelKeyboard *keyboard;
-
- // Add the keyboard
- keyboard = new CEGUI::PanelKeyboard(PANEL_KEYBOARD);
- _toolbarHandler.add(NAME_PANEL_KEYBOARD, *keyboard);
- _toolbarHandler.setVisible(false);
-}
-
-void WINCESdlGraphicsManager::swap_freeLook() {
- _freeLook = !_freeLook;
-}
-
-bool WINCESdlGraphicsManager::getFreeLookState() {
- return _freeLook;
-}
-
-WINCESdlGraphicsManager::zoneDesc WINCESdlGraphicsManager::_zones[TOTAL_ZONES] = {
- { 0, 0, 320, 145 },
- { 0, 145, 150, 55 },
- { 150, 145, 170, 55 }
-};
-
-#endif /* _WIN32_WCE */
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h
deleted file mode 100644
index 4842d49023..0000000000
--- a/backends/graphics/wincesdl/wincesdl-graphics.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef BACKENDS_GRAPHICS_WINCE_SDL_H
-#define BACKENDS_GRAPHICS_WINCE_SDL_H
-
-#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
-#include "backends/platform/wince/CEgui/CEGUI.h"
-
-// Internal GUI names
-#define NAME_MAIN_PANEL "MainPanel"
-#define NAME_PANEL_KEYBOARD "Keyboard"
-#define NAME_ITEM_OPTIONS "Options"
-#define NAME_ITEM_SKIP "Skip"
-#define NAME_ITEM_SOUND "Sound"
-#define NAME_ITEM_ORIENTATION "Orientation"
-#define NAME_ITEM_BINDKEYS "Bindkeys"
-
-#define TOTAL_ZONES 3
-
-extern bool _hasSmartphoneResolution;
-
-class WINCESdlGraphicsManager : public SurfaceSdlGraphicsManager {
-public:
- WINCESdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window);
-
- const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
- void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
-
- bool hasFeature(OSystem::Feature f) const;
- void setFeatureState(OSystem::Feature f, bool enable);
- bool getFeatureState(OSystem::Feature f) const;
-
- int getDefaultGraphicsMode() const;
- bool setGraphicsMode(int mode);
- bool loadGFXMode();
- void unloadGFXMode();
- bool hotswapGFXMode();
-
- void update_game_settings();
-
- // Overloaded from SDL backend (toolbar handling)
- void drawMouse();
- // Overloaded from SDL backend (new scaler handling)
- void addDirtyRect(int x, int y, int w, int h, bool mouseRect = false);
- // Overloaded from SDL backend (new scaler handling)
- void warpMouse(int x, int y);
-
- // Update the dirty areas of the screen
- void internUpdateScreen();
- bool saveScreenshot(const char *filename);
-
- // Overloaded from SDL_Common (FIXME)
- void internDrawMouse();
- void undrawMouse();
- bool showMouse(bool visible);
- void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend
- void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h);
- void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME)
- Graphics::Surface *lockScreen();
- void unlockScreen();
- void blitCursor();
- void showOverlay();
- void hideOverlay();
- void setMousePos(int x, int y);
-
- // GUI and action stuff
- void swap_panel_visibility();
- void swap_panel();
- void swap_smartphone_keyboard();
- void swap_zoom_up();
- void swap_zoom_down();
- void swap_mouse_visibility();
- void init_panel();
- void reset_panel();
- void swap_freeLook();
- bool getFreeLookState();
-
-//#ifdef WIN32_PLATFORM_WFSP
- void move_cursor_up();
- void move_cursor_down();
- void move_cursor_left();
- void move_cursor_right();
-
- void switch_zone();
-
- void add_right_click(bool pushed);
- void add_left_click(bool pushed);
-
- void initZones();
- void smartphone_rotate_display();
-//#endif
-
- bool hasPocketPCResolution();
- bool hasDesktopResolution();
- bool hasSquareQVGAResolution();
- bool hasWideResolution() const;
-
- bool _panelInitialized; // only initialize the toolbar once
- bool _noDoubleTapRMB; // disable double tap -> rmb click
- bool _noDoubleTapPT; // disable double tap for toolbar toggling
-
- CEGUI::ToolbarHandler _toolbarHandler;
-
- bool _toolbarHighDrawn; // cache toolbar 640x80
- int _newOrientation; // new orientation
- int _orientationLandscape; // current orientation
-
- int _scaleFactorXm; // scaler X *
- int _scaleFactorXd; // scaler X /
- int _scaleFactorYm; // scaler Y *
- int _scaleFactorYd; // scaler Y /
-
- bool _hasfocus; // scummvm has the top window
-
- MousePos _mouseCurState;
-
- bool _zoomUp; // zooming up mode
- bool _zoomDown; // zooming down mode
-
- bool _usesEmulatedMouse; // emulated mousemove ever been used in this session
-
- int _mouseXZone[TOTAL_ZONES];
- int _mouseYZone[TOTAL_ZONES];
- int _currentZone;
-
- // Smartphone specific variables
- int _lastKeyPressed; // last key pressed
- int _keyRepeat; // number of time the last key was repeated
- int _keyRepeatTime; // elapsed time since the key was pressed
- int _keyRepeatTrigger; // minimum time to consider the key was repeated
-
- struct zoneDesc {
- int x;
- int y;
- int width;
- int height;
- };
-
- static zoneDesc _zones[TOTAL_ZONES];
-
- virtual void transformMouseCoordinates(Common::Point &point);
-
-private:
- bool update_scalers();
- void drawToolbarMouse(SDL_Surface *surf, bool draw);
- void retrieve_mouse_location(int &x, int &y);
-
- void create_toolbar();
- bool _panelVisible; // panel visibility
- bool _panelStateForced; // panel visibility forced by external call
- String _saveActiveToolbar; // save active toolbar when forced
-
- bool _canBeAspectScaled; // game screen size allows for aspect scaling
-
- SDL_Rect _dirtyRectOut[NUM_DIRTY_RECT];
- bool _scalersChanged;
-
- bool isOzone();
-
- bool _saveToolbarState; // save visibility when forced
- bool _saveToolbarZoom; // save visibility when zooming
-
- SDL_Surface *_toolbarLow; // toolbar 320x40
- SDL_Surface *_toolbarHigh; // toolbar 640x80
-
- // Mouse
- int _mouseHotspotX, _mouseHotspotY;
- byte *_mouseBackupOld;
- uint16 *_mouseBackupToolbar;
- uint16 _mouseBackupDim;
-
- bool _forceHideMouse; // force invisible mouse cursor
- bool _freeLook; // freeLook mode (do not send mouse button events)
-
- // Smartphone specific variables
- void loadDeviceConfigurationElement(Common::String element, int &value, int defaultValue);
- int _repeatX; // repeat trigger for left and right cursor moves
- int _repeatY; // repeat trigger for up and down cursor moves
- int _stepX1; // offset for left and right cursor moves (slowest)
- int _stepX2; // offset for left and right cursor moves (faster)
- int _stepX3; // offset for left and right cursor moves (fastest)
- int _stepY1; // offset for up and down cursor moves (slowest)
- int _stepY2; // offset for up and down cursor moves (faster)
- int _stepY3; // offset for up and down cursor moves (fastest)
-};
-
-#endif /* BACKENDS_GRAPHICS_WINCE_SDL_H */
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index 35608fd228..f3c48b61e8 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -25,7 +25,7 @@
#include "common/scummsys.h"
-#if defined(WIN32) && !defined(_WIN32_WCE)
+#if defined(WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/backends/mixer/wincesdl/wincesdl-mixer.cpp b/backends/mixer/wincesdl/wincesdl-mixer.cpp
deleted file mode 100644
index fff2af5888..0000000000
--- a/backends/mixer/wincesdl/wincesdl-mixer.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifdef _WIN32_WCE
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "common/config-manager.h"
-#include "backends/platform/wince/wince-sdl.h"
-#include "backends/platform/wince/missing/fopen.h"
-#include "backends/mixer/wincesdl/wincesdl-mixer.h"
-#include "common/system.h"
-#include "common/textconsole.h"
-
-#ifdef USE_VORBIS
-#ifndef USE_TREMOR
-#include <vorbis/vorbisfile.h>
-#else
-#ifdef USE_TREMOLO
-#include <tremolo/ivorbisfile.h>
-#else
-#include <tremor/ivorbisfile.h>
-#endif
-#endif
-#endif
-
-#define SAMPLES_PER_SEC_OLD 11025
-#define SAMPLES_PER_SEC_NEW 22050
-
-WINCESdlMixerManager::WINCESdlMixerManager() {
-
-}
-
-WINCESdlMixerManager::~WINCESdlMixerManager() {
-
-}
-
-void WINCESdlMixerManager::init() {
- SDL_AudioSpec desired;
- int thread_priority;
-
- uint32 sampleRate = compute_sample_rate();
- if (sampleRate == 0)
- warning("OSystem_WINCE3::setupMixer called with sample rate 0 - audio will not work");
- else if (_mixer && _mixer->getOutputRate() == sampleRate) {
- debug(1, "Skipping sound mixer re-init: samplerate is good");
- return;
- }
-
- memset(&desired, 0, sizeof(desired));
- desired.freq = sampleRate;
- desired.format = AUDIO_S16SYS;
- desired.channels = 2;
- desired.samples = 128;
- desired.callback = private_sound_proc;
- desired.userdata = this;
-
- // Create the mixer instance
- if (_mixer == 0)
- _mixer = new Audio::MixerImpl(g_system, sampleRate);
-
- // Add sound thread priority
- if (!ConfMan.hasKey("sound_thread_priority"))
- thread_priority = THREAD_PRIORITY_NORMAL;
- else
- thread_priority = ConfMan.getInt("sound_thread_priority");
-
- desired.thread_priority = thread_priority;
-
- SDL_CloseAudio();
- if (SDL_OpenAudio(&desired, NULL) != 0) {
- warning("Could not open audio device: %s", SDL_GetError());
- _mixer->setReady(false);
-
- } else {
- debug(1, "Sound opened OK, mixing at %d Hz", sampleRate);
-
- // Re-create mixer to match the output rate
- int vol1 = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType);
- int vol2 = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
- int vol3 = _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType);
- int vol4 = _mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType);
- delete _mixer;
- _mixer = new Audio::MixerImpl(g_system, sampleRate);
- _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol1);
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol2);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, vol3);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, vol4);
- _mixer->setReady(true);
- SDL_PauseAudio(0);
- }
-}
-
-void WINCESdlMixerManager::private_sound_proc(void *param, byte *buf, int len) {
- WINCESdlMixerManager *this_ = (WINCESdlMixerManager *)param;
- assert(this_);
-
- if (this_->_mixer)
- this_->_mixer->mixCallback(buf, len);
- if (!OSystem_WINCE3::_soundMaster)
- memset(buf, 0, len);
-}
-
-uint32 WINCESdlMixerManager::compute_sample_rate() {
- uint32 sampleRate;
-
- // Force at least medium quality FM synthesis for FOTAQ
- Common::String gameid(ConfMan.get("gameid"));
- if (gameid == "queen") {
- if (!((ConfMan.hasKey("FM_high_quality") && ConfMan.getBool("FM_high_quality")) ||
- (ConfMan.hasKey("FM_medium_quality") && ConfMan.getBool("FM_medium_quality")))) {
- ConfMan.setBool("FM_medium_quality", true);
- ConfMan.flushToDisk();
- }
- } else {
- if (!ConfMan.hasKey("FM_high_quality") && !ConfMan.hasKey("FM_medium_quality")) {
- ConfMan.setBool("FM_high_quality", true);
- ConfMan.flushToDisk();
- }
- }
- // See if the output frequency is forced by the game
- if (gameid == "ft" || gameid == "dig" || gameid == "comi" || gameid == "queen" || gameid == "sword" || gameid == "agi")
- sampleRate = SAMPLES_PER_SEC_NEW;
- else {
- if (ConfMan.hasKey("high_sample_rate") && !ConfMan.getBool("high_sample_rate"))
- sampleRate = SAMPLES_PER_SEC_OLD;
- else
- sampleRate = SAMPLES_PER_SEC_NEW;
- }
-
-#ifdef USE_VORBIS
- // Modify the sample rate on the fly if OGG is involved
- if (sampleRate == SAMPLES_PER_SEC_OLD)
- if (checkOggHighSampleRate())
- sampleRate = SAMPLES_PER_SEC_NEW;
-#endif
-
- return sampleRate;
-}
-
-#ifdef USE_VORBIS
-bool WINCESdlMixerManager::checkOggHighSampleRate() {
- char trackFile[255];
- FILE *testFile;
- OggVorbis_File *test_ov_file = new OggVorbis_File;
-
- // FIXME: The following sprintf assumes that "path" is always
- // terminated by a path separator. This is *not* true in general.
- // This code really should check for the path separator, or even
- // better, use the FSNode API.
- sprintf(trackFile, "%sTrack1.ogg", ConfMan.get("path").c_str());
- // Check if we have an OGG audio track
- testFile = fopen(trackFile, "rb");
- if (testFile) {
- if (!ov_open(testFile, test_ov_file, NULL, 0)) {
- bool highSampleRate = (ov_info(test_ov_file, -1)->rate == 22050);
- ov_clear(test_ov_file);
- delete test_ov_file;
- return highSampleRate;
- }
- }
-
- // Do not test for OGG samples - too big and too slow anyway :)
-
- delete test_ov_file;
- return false;
-}
-#endif
-
-#endif
diff --git a/backends/mixer/wincesdl/wincesdl-mixer.h b/backends/mixer/wincesdl/wincesdl-mixer.h
deleted file mode 100644
index 56883fa080..0000000000
--- a/backends/mixer/wincesdl/wincesdl-mixer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef BACKENDS_MIXER_WINCE_SDL_H
-#define BACKENDS_MIXER_WINCE_SDL_H
-
-#include "backends/mixer/sdl/sdl-mixer.h"
-
-/**
- * SDL mixer manager for WinCE
- */
-class WINCESdlMixerManager : public SdlMixerManager {
-public:
- WINCESdlMixerManager();
- virtual ~WINCESdlMixerManager();
-
- virtual void init();
-
-private:
-
-#ifdef USE_VORBIS
- bool checkOggHighSampleRate();
-#endif
-
- static void private_sound_proc(void *param, byte *buf, int len);
- uint32 compute_sample_rate();
-
-};
-
-#endif
diff --git a/backends/module.mk b/backends/module.mk
index bd16546858..0ed597882b 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -339,16 +339,6 @@ MODULE_OBJS += \
events/webossdl/webossdl-events.o
endif
-ifeq ($(BACKEND),wince)
-MODULE_OBJS += \
- events/wincesdl/wincesdl-events.o \
- fs/windows/windows-fs.o \
- fs/windows/windows-fs-factory.o \
- graphics/wincesdl/wincesdl-graphics.o \
- mixer/wincesdl/wincesdl-mixer.o \
- plugins/win32/win32-provider.o
-endif
-
ifeq ($(BACKEND),wii)
MODULE_OBJS += \
fs/wii/wii-fs.o \
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
deleted file mode 100644
index 09286f2e9f..0000000000
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "backends/platform/wince/wince-sdl.h"
-
-#include "CEActionsPocket.h"
-#include "EventsBuffer.h"
-#include "gui/message.h"
-#include "common/config-manager.h"
-#include "gui/KeysDialog.h"
-
-#include "common/translation.h"
-
-
-#ifdef _WIN32_WCE
-#define KEY_ALL_SKIP 3457
-#endif
-
-const Common::String pocketActionNames[] = {
- _s("Pause"),
- _s("Save"),
- _s("Quit"),
- _s("Skip"),
- _s("Hide Toolbar"),
- _s("Show Keyboard"),
- _s("Sound on/off"),
- _s("Right click"),
- _s("Show/Hide Cursor"),
- _s("Free look"),
- _s("Zoom up"),
- _s("Zoom down"),
- _s("Multi Function"),
- _s("Bind Keys"),
- _s("Cursor Up"),
- _s("Cursor Down"),
- _s("Cursor Left"),
- _s("Cursor Right"),
- _s("Left Click")
-};
-
-void CEActionsPocket::init() {
- _instance = new CEActionsPocket(ConfMan.get("gameid"));
-}
-
-
-Common::String CEActionsPocket::actionName(GUI::ActionType action) {
- return _(pocketActionNames[action]);
-}
-
-int CEActionsPocket::size() {
- return POCKET_ACTION_LAST;
-}
-
-Common::String CEActionsPocket::domain() {
- return ConfMan.kApplicationDomain;
-}
-
-int CEActionsPocket::version() {
- return POCKET_ACTION_VERSION;
-}
-
-CEActionsPocket::CEActionsPocket(const Common::String &gameid) :
- GUI::Actions() {
- int i;
-
- _right_click_needed = false;
- _hide_toolbar_needed = false;
- _zoom_needed = false;
-
- for (i = 0; i < POCKET_ACTION_LAST; i++) {
- _action_mapping[i] = 0;
- _action_enabled[i] = false;
- }
-
- // apply some default settings for emulated mouse
- _action_enabled[POCKET_ACTION_LEFTCLICK] = true;
- _action_enabled[POCKET_ACTION_UP] = true;
- _action_enabled[POCKET_ACTION_DOWN] = true;
- _action_enabled[POCKET_ACTION_LEFT] = true;
- _action_enabled[POCKET_ACTION_RIGHT] = true;
- _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;
- _action_mapping[POCKET_ACTION_RIGHT] = SDLK_RIGHT;
-}
-
-void CEActionsPocket::initInstanceMain(OSystem *mainSystem) {
- // Nothing generic to do for Pocket PC
- _CESystem = static_cast<OSystem_WINCE3 *>(mainSystem);
- GUI_Actions::initInstanceMain(mainSystem);
-}
-
-void CEActionsPocket::initInstanceGame() {
- Common::String gameid(ConfMan.get("gameid"));
- bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0);
- bool is_sword1 = (gameid == "sword1");
- bool is_sword2 = (strcmp(gameid.c_str(), "sword2") == 0);
- bool is_queen = (gameid == "queen");
- bool is_sky = (gameid == "sky");
- bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0);
- bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
- bool is_saga = (gameid == "saga");
- bool is_kyra = (strncmp(gameid.c_str(), "kyra", 4) == 0);
- bool is_samnmax = (gameid == "samnmax");
- bool is_cine = (gameid == "cine");
- bool is_touche = (gameid == "touche");
- bool is_agi = (gameid == "agi");
- bool is_parallaction = (gameid == "parallaction");
- bool is_lure = (gameid == "lure");
- bool is_feeble = (gameid == "feeble");
- bool is_drascula = (strncmp(gameid.c_str(), "drascula", 8) == 0);
- bool is_tucker = (gameid == "tucker");
- bool is_groovie = (gameid == "groovie");
- bool is_tinsel = (gameid == "tinsel");
- bool is_cruise = (gameid == "cruise");
- bool is_made = (gameid == "made");
- bool is_sci = (gameid == "sci");
-
- 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_tinsel ||
- is_samnmax || is_cine || is_touche || is_parallaction || is_drascula || is_cruise)
- _right_click_needed = true;
-
- // See if a "hide toolbar" mapping could be needed
- if (is_sword1 || is_sword2 || is_comi || is_groovie)
- _hide_toolbar_needed = true;
-
- // Initialize keys for different actions
- // Pause
- _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_feeble || is_tucker || is_groovie)
- _action_enabled[POCKET_ACTION_SAVE] = false;
- else if (is_queen) {
- _action_enabled[POCKET_ACTION_SAVE] = true;
- _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].setKey(Common::ASCII_F5, SDLK_F5);
- } else if (is_cine || is_drascula || is_cruise) {
- _action_enabled[POCKET_ACTION_SAVE] = true;
- _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10
- } else if (is_agi || is_made) {
- _action_enabled[POCKET_ACTION_SAVE] = true;
- _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].setKey('s', SDLK_s);
- } else if (is_tinsel) {
- _action_enabled[POCKET_ACTION_SAVE] = true;
- _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F1, SDLK_F1);
- } else {
- _action_enabled[POCKET_ACTION_SAVE] = true;
- _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F5 key
- }
- // Quit
- _action_enabled[POCKET_ACTION_QUIT] = true;
- // Skip
- if (!is_cine && !is_parallaction && !is_groovie && !is_cruise && !is_made)
- _action_enabled[POCKET_ACTION_SKIP] = true;
- if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_tinsel ||
- is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker)
- _key_action[POCKET_ACTION_SKIP].setKey(VK_ESCAPE);
- else
- _key_action[POCKET_ACTION_SKIP].setKey(KEY_ALL_SKIP);
- // Hide
- _action_enabled[POCKET_ACTION_HIDE] = true;
- // Keyboard
- _action_enabled[POCKET_ACTION_KEYBOARD] = true;
- // Sound
- _action_enabled[POCKET_ACTION_SOUND] = true;
- // RightClick
- _action_enabled[POCKET_ACTION_RIGHTCLICK] = true;
- // Cursor
- _action_enabled[POCKET_ACTION_CURSOR] = true;
- // Freelook
- _action_enabled[POCKET_ACTION_FREELOOK] = true;
- // Zoom
- if (is_sword1 || is_sword2 || is_comi || is_touche) {
- _zoom_needed = true;
- _action_enabled[POCKET_ACTION_ZOOM_UP] = true;
- _action_enabled[POCKET_ACTION_ZOOM_DOWN] = true;
- }
- // Multi function key
- _action_enabled[POCKET_ACTION_MULTI] = true;
- if (is_agi)
- _key_action[POCKET_ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog
- else if (is_gob)
- _key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
- else if (gameid == "atlantis")
- _key_action[POCKET_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
- else if (is_simon)
- _key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
- else
- _key_action[POCKET_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
- // Key bind method
- _action_enabled[POCKET_ACTION_BINDKEYS] = true;
- // Disable double-tap right-click for convenience
- if (is_tinsel || is_cruise || is_sci)
- if (!ConfMan.hasKey("no_doubletap_rightclick")) {
- ConfMan.setBool("no_doubletap_rightclick", true);
- ConfMan.flushToDisk();
- }
-}
-
-
-CEActionsPocket::~CEActionsPocket() {
-}
-
-bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
- static bool keydialogrunning = false, quitdialog = false;
-
- _graphicsMan = dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager());
-
- if (!pushed) {
- switch (action) {
- case POCKET_ACTION_RIGHTCLICK:
- _graphicsMan->add_right_click(false);
- return true;
- case POCKET_ACTION_LEFTCLICK:
- _graphicsMan->add_left_click(false);
- return true;
- case POCKET_ACTION_PAUSE:
- case POCKET_ACTION_SAVE:
- case POCKET_ACTION_SKIP:
- case POCKET_ACTION_MULTI:
- EventsBuffer::simulateKey(&_key_action[action], false);
- return true;
- }
- return false;
- }
-
- switch (action) {
- case POCKET_ACTION_PAUSE:
- 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].setKey(SDLK_l);
- else
- _key_action[action].setKey(SDLK_s);
- }
- if (action == POCKET_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
- // In several AGI games (for example SQ2) it is needed to press F10 to exit from
- // a screen. But we still want be able to skip normally with the skip button.
- // Because of this, we inject a F10 keystroke here (this works and doesn't seem
- // to have side-effects)
- _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
- EventsBuffer::simulateKey(&_key_action[action], true);
- _key_action[action].setKey(KEY_ALL_SKIP);
- }
- EventsBuffer::simulateKey(&_key_action[action], true);
- return true;
- case POCKET_ACTION_KEYBOARD:
- _graphicsMan->swap_panel();
- return true;
- case POCKET_ACTION_HIDE:
- _graphicsMan->swap_panel_visibility();
- return true;
- case POCKET_ACTION_SOUND:
- _CESystem->swap_sound_master();
- return true;
- case POCKET_ACTION_RIGHTCLICK:
- _graphicsMan->add_right_click(true);
- return true;
- case POCKET_ACTION_CURSOR:
- _graphicsMan->swap_mouse_visibility();
- return true;
- case POCKET_ACTION_FREELOOK:
- _graphicsMan->swap_freeLook();
- return true;
- case POCKET_ACTION_ZOOM_UP:
- _graphicsMan->swap_zoom_up();
- return true;
- case POCKET_ACTION_ZOOM_DOWN:
- _graphicsMan->swap_zoom_down();
- return true;
- case POCKET_ACTION_LEFTCLICK:
- _graphicsMan->add_left_click(true);
- return true;
- case POCKET_ACTION_UP:
- _graphicsMan->move_cursor_up();
- return true;
- case POCKET_ACTION_DOWN:
- _graphicsMan->move_cursor_down();
- return true;
- case POCKET_ACTION_LEFT:
- _graphicsMan->move_cursor_left();
- return true;
- case POCKET_ACTION_RIGHT:
- _graphicsMan->move_cursor_right();
- return true;
- case POCKET_ACTION_QUIT:
- if (!quitdialog) {
- quitdialog = true;
- GUI::MessageDialog alert(_(" Are you sure you want to quit ? "), _("Yes"), _("No"));
- if (alert.runModal() == GUI::kMessageOK)
- _mainSystem->quit();
- quitdialog = false;
- }
- return true;
- case POCKET_ACTION_BINDKEYS:
- if (!keydialogrunning) {
- keydialogrunning = true;
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
- keysDialog->runModal();
- delete keysDialog;
- keydialogrunning = false;
- }
- return true;
- }
- return false;
-}
-
-bool CEActionsPocket::needsRightClickMapping() {
- if (!_right_click_needed)
- return false;
- else
- return (_action_mapping[POCKET_ACTION_RIGHTCLICK] == 0);
-}
-
-bool CEActionsPocket::needsHideToolbarMapping() {
- if (!_hide_toolbar_needed)
- return false;
- else
- return (_action_mapping[POCKET_ACTION_HIDE] == 0);
-}
-
-
-bool CEActionsPocket::needsZoomMapping() {
- if (!_zoom_needed)
- return false;
- else
- return (_action_mapping[POCKET_ACTION_ZOOM_UP] == 0 || _action_mapping[POCKET_ACTION_ZOOM_DOWN] == 0);
-}
diff --git a/backends/platform/wince/CEActionsPocket.h b/backends/platform/wince/CEActionsPocket.h
deleted file mode 100644
index f2952c059a..0000000000
--- a/backends/platform/wince/CEActionsPocket.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEACTIONSPOCKET_H
-#define CEACTIONSPOCKET_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-#include "gui/Key.h"
-#include "gui/Actions.h"
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-
-#define POCKET_ACTION_VERSION 5
-
-enum pocketActionType {
- POCKET_ACTION_PAUSE = 0,
- POCKET_ACTION_SAVE,
- POCKET_ACTION_QUIT,
- POCKET_ACTION_SKIP,
- POCKET_ACTION_HIDE,
- POCKET_ACTION_KEYBOARD,
- POCKET_ACTION_SOUND,
- POCKET_ACTION_RIGHTCLICK,
- POCKET_ACTION_CURSOR,
- POCKET_ACTION_FREELOOK,
- POCKET_ACTION_ZOOM_UP,
- POCKET_ACTION_ZOOM_DOWN,
- POCKET_ACTION_MULTI,
- POCKET_ACTION_BINDKEYS,
- POCKET_ACTION_UP,
- POCKET_ACTION_DOWN,
- POCKET_ACTION_LEFT,
- POCKET_ACTION_RIGHT,
- POCKET_ACTION_LEFTCLICK,
-
- POCKET_ACTION_LAST
-};
-
-class OSystem_WINCE3;
-
-class CEActionsPocket : public GUI::Actions {
-public:
- // Actions
- bool perform(GUI::ActionType action, bool pushed = true);
- Common::String actionName(GUI::ActionType action);
- int size();
-
- static void init();
- void initInstanceMain(OSystem *mainSystem);
- void initInstanceGame();
-
- // Action domain
- Common::String domain();
- int version();
-
- // Utility
- bool needsRightClickMapping();
- bool needsHideToolbarMapping();
- bool needsZoomMapping();
-
- ~CEActionsPocket();
-private:
- CEActionsPocket(const Common::String &gameid);
- WINCESdlGraphicsManager *_graphicsMan;
- bool _right_click_needed;
- bool _hide_toolbar_needed;
- bool _zoom_needed;
- OSystem_WINCE3 *_CESystem;
-};
-
-#endif
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
deleted file mode 100644
index 95957707e3..0000000000
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "backends/platform/wince/wince-sdl.h"
-
-#include "CEActionsSmartphone.h"
-#include "EventsBuffer.h"
-#include "gui/message.h"
-#include "common/config-manager.h"
-#include "gui/KeysDialog.h"
-
-#include "common/translation.h"
-
-#define KEY_ALL_SKIP 3457
-
-const String smartphoneActionNames[] = {
- _s("Up"),
- _s("Down"),
- _s("Left"),
- _s("Right"),
- _s("Left Click"),
- _s("Right Click"),
- _s("Save"),
- _s("Skip"),
- _s("Zone"),
- _s("Multi Function"),
- _s("Bind Keys"),
- _s("Keyboard"),
- _s("Rotate"),
- _s("Quit")
-};
-
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, SDLK_F1, SDLK_F2, SDLK_F3, SDLK_ESCAPE, SDLK_9, SDLK_8, SDLK_F4, SDLK_RETURN, SDLK_5, SDLK_0 };
-
-void CEActionsSmartphone::init() {
- _instance = new CEActionsSmartphone();
-}
-
-
-String CEActionsSmartphone::actionName(GUI::ActionType action) {
- return _(smartphoneActionNames[action]);
-}
-
-int CEActionsSmartphone::size() {
- return SMARTPHONE_ACTION_LAST;
-}
-
-String CEActionsSmartphone::domain() {
- return ConfMan.kApplicationDomain;
-}
-
-int CEActionsSmartphone::version() {
- return SMARTPHONE_ACTION_VERSION;
-}
-
-CEActionsSmartphone::CEActionsSmartphone()
- : GUI::Actions() {
- int i;
-
- for (i = 0; i < SMARTPHONE_ACTION_LAST; i++) {
- _action_mapping[i] = ACTIONS_SMARTPHONE_DEFAULT[i];
- _action_enabled[i] = false;
- }
-
-}
-
-void CEActionsSmartphone::initInstanceMain(OSystem *mainSystem) {
- _CESystem = static_cast<OSystem_WINCE3 *>(mainSystem);
-
- GUI_Actions::initInstanceMain(mainSystem);
-
- // These actions are always on
- _action_enabled[SMARTPHONE_ACTION_UP] = true;
- _action_enabled[SMARTPHONE_ACTION_DOWN] = true;
- _action_enabled[SMARTPHONE_ACTION_LEFT] = true;
- _action_enabled[SMARTPHONE_ACTION_RIGHT] = true;
- _action_enabled[SMARTPHONE_ACTION_LEFTCLICK] = true;
- _action_enabled[SMARTPHONE_ACTION_RIGHTCLICK] = true;
- _action_enabled[SMARTPHONE_ACTION_KEYBOARD] = true;
- _action_enabled[SMARTPHONE_ACTION_ROTATE] = true;
- _action_enabled[SMARTPHONE_ACTION_QUIT] = true;
- _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
-}
-
-void CEActionsSmartphone::initInstanceGame() {
- String gameid(ConfMan.get("gameid"));
- bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0);
- bool is_sword1 = (gameid == "sword1");
- bool is_sword2 = (strcmp(gameid.c_str(), "sword2") == 0);
- bool is_queen = (gameid == "queen");
- bool is_sky = (gameid == "sky");
- bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0);
- bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
- bool is_saga = (gameid == "saga");
- bool is_kyra = (strncmp(gameid.c_str(), "kyra", 4) == 0);
- bool is_samnmax = (gameid == "samnmax");
- bool is_cine = (gameid == "cine");
- bool is_touche = (gameid == "touche");
- bool is_agi = (gameid == "agi");
- bool is_parallaction = (gameid == "parallaction");
- bool is_lure = (gameid == "lure");
- bool is_feeble = (gameid == "feeble");
- bool is_drascula = (strncmp(gameid.c_str(), "drascula", 8) == 0);
- bool is_tucker = (gameid == "tucker");
- bool is_groovie = (gameid == "groovie");
- bool is_tinsel = (gameid == "tinsel");
- bool is_cruise = (gameid == "cruise");
- bool is_made = (gameid == "made");
- bool is_sci = (gameid == "sci");
-
- 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_tinsel ||
- is_samnmax || is_cine || is_touche || is_parallaction || is_drascula || is_cruise)
- _right_click_needed = true;
-
- // Initialize keys for different actions
- // Save
- if (is_simon || is_sword2 || is_gob || is_kyra || is_feeble || is_groovie)
- _action_enabled[SMARTPHONE_ACTION_SAVE] = false;
- else if (is_queen) {
- _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _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].setKey(Common::ASCII_F5, SDLK_F5);
- } else if (is_cine || is_drascula || is_cruise) {
- _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); //F10
- } else if (is_agi || is_made) {
- _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _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].setKey('s', SDLK_s);
- } else if (is_tinsel) {
- _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F1, SDLK_F1);
- } else {
- _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _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_tinsel ||
- is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker ||
- is_groovie || is_cruise || is_made)
- _key_action[SMARTPHONE_ACTION_SKIP].setKey(VK_ESCAPE);
- else
- _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].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
- else if (gameid == "atlantis")
- _key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
- else if (is_simon)
- _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
- else
- _key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
- // Bind keys
- _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
- // Disable double-tap right-click for convenience
- if (is_tinsel || is_cruise || is_sci)
- if (!ConfMan.hasKey("no_doubletap_rightclick")) {
- ConfMan.setBool("no_doubletap_rightclick", true);
- ConfMan.flushToDisk();
- }
-}
-
-
-CEActionsSmartphone::~CEActionsSmartphone() {
-}
-
-bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
- static bool keydialogrunning = false, quitdialog = false;
-
- _graphicsMan = dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager());
-
- if (!pushed) {
- switch (action) {
- case SMARTPHONE_ACTION_RIGHTCLICK:
- _graphicsMan->add_right_click(false);
- return true;
- case SMARTPHONE_ACTION_LEFTCLICK:
- _graphicsMan->add_left_click(false);
- return true;
- case SMARTPHONE_ACTION_SAVE:
- case SMARTPHONE_ACTION_SKIP:
- case SMARTPHONE_ACTION_MULTI:
- EventsBuffer::simulateKey(&_key_action[action], false);
- return true;
- }
- return false;
- }
-
- switch (action) {
- 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].setKey(SDLK_l);
- else
- _key_action[action].setKey(SDLK_s);
- }
- if (action == SMARTPHONE_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
- // In several AGI games (for example SQ2) it is needed to press F10 to exit from
- // a screen. But we still want be able to skip normally with the skip button.
- // Because of this, we inject a F10 keystroke here (this works and doesn't seem
- // to have side-effects)
- _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
- EventsBuffer::simulateKey(&_key_action[action], true);
- _key_action[action].setKey(KEY_ALL_SKIP);
- }
- EventsBuffer::simulateKey(&_key_action[action], true);
- return true;
- case SMARTPHONE_ACTION_RIGHTCLICK:
- _graphicsMan->add_right_click(true);
- return true;
- case SMARTPHONE_ACTION_LEFTCLICK:
- _graphicsMan->add_left_click(true);
- return true;
- case SMARTPHONE_ACTION_UP:
- _graphicsMan->move_cursor_up();
- return true;
- case SMARTPHONE_ACTION_DOWN:
- _graphicsMan->move_cursor_down();
- return true;
- case SMARTPHONE_ACTION_LEFT:
- _graphicsMan->move_cursor_left();
- return true;
- case SMARTPHONE_ACTION_RIGHT:
- _graphicsMan->move_cursor_right();
- return true;
- case SMARTPHONE_ACTION_ZONE:
- _graphicsMan->switch_zone();
- return true;
- case SMARTPHONE_ACTION_BINDKEYS:
- if (!keydialogrunning) {
- keydialogrunning = true;
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
- keysDialog->runModal();
- delete keysDialog;
- keydialogrunning = false;
- }
- return true;
- case SMARTPHONE_ACTION_KEYBOARD:
- _graphicsMan->swap_smartphone_keyboard();
- return true;
- case SMARTPHONE_ACTION_ROTATE:
- _graphicsMan->smartphone_rotate_display();
- return true;
- case SMARTPHONE_ACTION_QUIT:
- if (!quitdialog) {
- quitdialog = true;
- GUI::MessageDialog alert(_(" Are you sure you want to quit ? "), _("Yes"), _("No"));
- if (alert.runModal() == GUI::kMessageOK)
- _mainSystem->quit();
- quitdialog = false;
- }
- return true;
- }
-
- return false;
-}
diff --git a/backends/platform/wince/CEActionsSmartphone.h b/backends/platform/wince/CEActionsSmartphone.h
deleted file mode 100644
index 46529bbd99..0000000000
--- a/backends/platform/wince/CEActionsSmartphone.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEACTIONSSMARTPHONE_H
-#define CEACTIONSSMARTPHONE_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-#include "gui/Key.h"
-#include "gui/Actions.h"
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-
-#define SMARTPHONE_ACTION_VERSION 5
-
-enum smartphoneActionType {
- SMARTPHONE_ACTION_UP = 0,
- SMARTPHONE_ACTION_DOWN,
- SMARTPHONE_ACTION_LEFT,
- SMARTPHONE_ACTION_RIGHT,
- SMARTPHONE_ACTION_LEFTCLICK,
- SMARTPHONE_ACTION_RIGHTCLICK,
- SMARTPHONE_ACTION_SAVE,
- SMARTPHONE_ACTION_SKIP,
- SMARTPHONE_ACTION_ZONE,
- SMARTPHONE_ACTION_MULTI,
- SMARTPHONE_ACTION_BINDKEYS,
- SMARTPHONE_ACTION_KEYBOARD,
- SMARTPHONE_ACTION_ROTATE,
- SMARTPHONE_ACTION_QUIT,
-
- SMARTPHONE_ACTION_LAST
-};
-
-
-class CEActionsSmartphone : public GUI::Actions {
-public:
- // Actions
- bool perform(GUI::ActionType action, bool pushed = true);
- Common::String actionName(GUI::ActionType action);
- int size();
- static void init();
- void initInstanceMain(OSystem *mainSystem);
- void initInstanceGame();
-
- // Action domain
- Common::String domain();
- int version();
-
- ~CEActionsSmartphone();
-private:
- CEActionsSmartphone();
- WINCESdlGraphicsManager *_graphicsMan;
- bool _right_click_needed;
- OSystem_WINCE3 *_CESystem;
-};
-
-#endif
diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp
deleted file mode 100644
index ffadfeb993..0000000000
--- a/backends/platform/wince/CEDevice.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "CEDevice.h"
-
-#include "backends/platform/sdl/sdl-sys.h"
-
-#include "backends/platform/wince/wince-sdl.h"
-
-static void (WINAPI *_SHIdleTimerReset)(void) = NULL;
-static HANDLE(WINAPI *_SetPowerRequirement)(PVOID, int, ULONG, PVOID, ULONG) = NULL;
-static DWORD (WINAPI *_ReleasePowerRequirement)(HANDLE) = NULL;
-static HANDLE _hPowerManagement = NULL;
-static DWORD _lastTime = 0;
-static DWORD REG_bat = 0, REG_ac = 0, REG_disp = 0, bat_timeout = 0;
-static bool REG_tampered = false;
-#ifdef __GNUC__
-extern "C" void WINAPI SystemIdleTimerReset(void);
-#define SPI_SETBATTERYIDLETIMEOUT 251
-#define SPI_GETBATTERYIDLETIMEOUT 252
-#endif
-
-#define TIMER_TRIGGER 9000
-
-DWORD CEDevice::reg_access(const TCHAR *key, const TCHAR *val, DWORD data) {
- HKEY regkey;
- DWORD tmpval, cbdata;
-
- if (RegOpenKeyEx(HKEY_CURRENT_USER, key, 0, 0, &regkey) != ERROR_SUCCESS)
- return data;
-
- cbdata = sizeof(DWORD);
- 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) {
- RegCloseKey(regkey);
- return data;
- }
-
- RegCloseKey(regkey);
- return tmpval;
-}
-
-void CEDevice::backlight_xchg() {
- HANDLE h;
-
- REG_bat = reg_access(TEXT("ControlPanel\\BackLight"), (const TCHAR *)TEXT("BatteryTimeout"), REG_bat);
- REG_ac = reg_access(TEXT("ControlPanel\\BackLight"), TEXT("ACTimeout"), REG_ac);
- REG_disp = reg_access(TEXT("ControlPanel\\Power"), TEXT("Display"), REG_disp);
-
- h = CreateEvent(NULL, FALSE, FALSE, TEXT("BackLightChangeEvent"));
- if (h) {
- SetEvent(h);
- CloseHandle(h);
- }
-}
-
-void CEDevice::init() {
- // 2003+ power management code borrowed from MoDaCo & Betaplayer. Thanks !
- HINSTANCE dll = LoadLibrary(TEXT("aygshell.dll"));
- if (dll) {
- _SHIdleTimerReset = (void (*)())GetProcAddress(dll, MAKEINTRESOURCE(2006));
- }
- dll = LoadLibrary(TEXT("coredll.dll"));
- if (dll) {
- _SetPowerRequirement = (HANDLE (*)(PVOID, int, ULONG, PVOID, ULONG))GetProcAddress(dll, TEXT("SetPowerRequirement"));
- _ReleasePowerRequirement = (DWORD (*)(HANDLE))GetProcAddress(dll, TEXT("ReleasePowerRequirement"));
- }
- if (_SetPowerRequirement)
- _hPowerManagement = _SetPowerRequirement((PVOID) TEXT("BKL1:"), 0, 1, (PVOID) NULL, 0);
- _lastTime = GetTickCount();
-
- // older devices
- REG_bat = REG_ac = REG_disp = 2 * 60 * 60 * 1000; // 2hrs should do it
- backlight_xchg();
- REG_tampered = true;
- SystemParametersInfo(SPI_GETBATTERYIDLETIMEOUT, 0, (void *) &bat_timeout, 0);
- SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, 60 * 60 * 2, NULL, SPIF_SENDCHANGE);
-}
-
-void CEDevice::end() {
- if (_ReleasePowerRequirement && _hPowerManagement)
- _ReleasePowerRequirement(_hPowerManagement);
- if (REG_tampered)
- backlight_xchg();
- SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, bat_timeout, NULL, SPIF_SENDCHANGE);
-}
-
-void CEDevice::wakeUp() {
- DWORD currentTime = GetTickCount();
- if (currentTime > _lastTime + TIMER_TRIGGER) {
- _lastTime = currentTime;
- SystemIdleTimerReset();
- if (_SHIdleTimerReset)
- _SHIdleTimerReset();
- }
-}
-
-bool CEDevice::hasSquareQVGAResolution() {
- return (OSystem_WINCE3::getScreenWidth() == 240 && OSystem_WINCE3::getScreenHeight() == 240);
-}
-
-bool CEDevice::hasWideResolution() {
- return (OSystem_WINCE3::getScreenWidth() >= 640 || OSystem_WINCE3::getScreenHeight() >= 640);
-}
-
-bool CEDevice::hasPocketPCResolution() {
- if (OSystem_WINCE3::isOzone() && hasWideResolution())
- return true;
- return (OSystem_WINCE3::getScreenWidth() <= 320 && OSystem_WINCE3::getScreenWidth() >= 240);
-}
-
-bool CEDevice::hasDesktopResolution() {
- if (OSystem_WINCE3::isOzone() && hasWideResolution())
- return true;
- return (OSystem_WINCE3::getScreenWidth() > 320);
-}
-
-bool CEDevice::hasSmartphoneResolution() {
- return (OSystem_WINCE3::getScreenWidth() < 240);
-}
-
-bool CEDevice::isSmartphone() {
- TCHAR platformType[100];
- BOOL result = SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(platformType), platformType, 0);
- if (!result && GetLastError() == ERROR_ACCESS_DENIED)
- return true;
- return (_wcsnicmp(platformType, TEXT("SmartPhone"), 10) == 0);
-}
diff --git a/backends/platform/wince/CEDevice.h b/backends/platform/wince/CEDevice.h
deleted file mode 100644
index c43e4e6999..0000000000
--- a/backends/platform/wince/CEDevice.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEDEVICE_H
-#define CEDEVICE_H
-
-#include <windows.h>
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-
-class CEDevice {
-public:
- static void init();
- static void end();
- static void wakeUp();
- static bool hasPocketPCResolution();
- static bool hasSquareQVGAResolution();
- static bool hasDesktopResolution();
- static bool hasWideResolution();
- static bool hasSmartphoneResolution();
- static bool isSmartphone();
-
-private:
- static DWORD reg_access(const TCHAR *key, const TCHAR *val, DWORD data);
- static void backlight_xchg();
-};
-
-#endif
diff --git a/backends/platform/wince/CEException.cpp b/backends/platform/wince/CEException.cpp
deleted file mode 100644
index 46bb618e39..0000000000
--- a/backends/platform/wince/CEException.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "CEException.h"
-
-void CEException::writeString(HANDLE file, char *data) {
- DWORD dummy;
- WriteFile(file, data, strlen(data), &dummy, NULL);
- WriteFile(file, "\r\n", 2, &dummy, NULL);
-}
-
-void CEException::writeBreak(HANDLE file) {
- char tempo[100];
- int i;
-
- memset(tempo, 0, sizeof(tempo));
- for (i = 0; i < 40; i++)
- tempo[i] = '-';
- writeString(file, tempo);
-}
-
-void CEException::dumpContext(HANDLE file, HANDLE hProcess, CONTEXT *context) {
- char tempo[200];
- unsigned char memoryDump[100];
- DWORD size;
- unsigned int i;
-
-#ifdef ARM
- writeBreak(file);
- writeString(file, "Context dump");
- sprintf(tempo, "R0=%.8x R1=%.8x R2=%.8x R3=%.8x R4=%.8x", context->R0, context->R1,
- context->R2, context->R3, context->R4);
- writeString(file, tempo);
- sprintf(tempo, "R5=%.8x R6=%.8x R7=%.8x R8=%.8x R9=%.8x", context->R5, context->R6,
- context->R7, context->R8, context->R9);
- writeString(file, tempo);
- sprintf(tempo, "R10=%.8x R11=%.8x R12=%.8x", context->R10, context->R11,
- context->R12);
- writeString(file, tempo);
- sprintf(tempo, "Sp=%.8x Lr=%.8x Pc=%.8x Psr=%.8x", context->Sp, context->Lr,
- context->Pc, context->Psr);
- writeString(file, tempo);
- writeBreak(file);
-
- sprintf(tempo, "Memory dump at %.8x", context->Pc - (sizeof(memoryDump) / 2));
- writeString(file, tempo);
- if (ReadProcessMemory(hProcess, (LPCVOID)(context->Pc - (sizeof(memoryDump) / 2)), memoryDump, sizeof(memoryDump), &size)) {
- for (i = 0; i < size; i += 8) {
- int j;
- char digit[4];
- int max;
- max = size - i;
- if (max > 8)
- max = 8;
- tempo[0] = '\0';
- for (j = 0; j < max; j++) {
- sprintf(digit, "%.2x ", memoryDump[i + j]);
- strcat(tempo, digit);
- }
- writeString(file, tempo);
- }
- }
-#else
- writeBreak(file);
- writeString(file, "Context dump only available on ARM devices");
-#endif
-}
-
-void CEException::dumpException(HANDLE file, EXCEPTION_RECORD *exceptionRecord) {
- char tempo[200];
- char exceptionName[50];
- unsigned int i;
-#if (_WIN32_WCE >= 300)
- writeBreak(file);
- switch (exceptionRecord->ExceptionCode) {
- case EXCEPTION_ACCESS_VIOLATION :
- strcpy(exceptionName, "Access Violation");
- break;
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED :
- strcpy(exceptionName, "Array Bounds Exceeded");
- break;
- case EXCEPTION_DATATYPE_MISALIGNMENT :
- strcpy(exceptionName, "Datatype Misalignment");
- break;
- case EXCEPTION_IN_PAGE_ERROR :
- strcpy(exceptionName, "In Page Error");
- break;
- case EXCEPTION_INT_DIVIDE_BY_ZERO :
- strcpy(exceptionName, "Int Divide By Zero");
- break;
- case EXCEPTION_INT_OVERFLOW :
- strcpy(exceptionName, "Int Overflow");
- break;
- case EXCEPTION_STACK_OVERFLOW :
- strcpy(exceptionName, "Stack Overflow");
- break;
- default:
- sprintf(exceptionName, "%.8x", exceptionRecord->ExceptionCode);
- break;
- }
- sprintf(tempo, "Exception %s Flags %.8x Address %.8x", exceptionName, exceptionRecord->ExceptionFlags,
- exceptionRecord->ExceptionAddress);
- writeString(file, tempo);
- if (exceptionRecord->NumberParameters) {
- for (i = 0; i < exceptionRecord->NumberParameters; i++) {
- sprintf(tempo, "Parameter %d %.8x", i, exceptionRecord->ExceptionInformation[i]);
- writeString(file, tempo);
- }
- }
- if (exceptionRecord->ExceptionRecord)
- dumpException(file, exceptionRecord->ExceptionRecord);
-#else
- writeBreak(file);
- writeString(file, "Cannot get exception information on this CE version");
-#endif
-}
-
-bool CEException::writeException(TCHAR *path, EXCEPTION_POINTERS *exceptionPointers) {
- HANDLE dumpFile;
- TCHAR dumpFileName[MAX_PATH];
- SYSTEMTIME systemTime;
-
- GetSystemTime(&systemTime);
- wsprintf(dumpFileName, TEXT("%s_%.2d_%.2d_%.4d_%.2d_%.2d_%.2d.txt"),
- path, systemTime.wDay, systemTime.wMonth, systemTime.wYear,
- systemTime.wHour, systemTime.wMinute, systemTime.wSecond);
- dumpFile = CreateFile(dumpFileName, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- if (dumpFile == INVALID_HANDLE_VALUE)
- return false;
-
- dumpException(dumpFile, exceptionPointers->ExceptionRecord);
- dumpContext(dumpFile, GetCurrentProcess(), exceptionPointers->ContextRecord);
-
- CloseHandle(dumpFile);
-
- return true;
-}
diff --git a/backends/platform/wince/CEException.h b/backends/platform/wince/CEException.h
deleted file mode 100644
index 8ce6bd7dc0..0000000000
--- a/backends/platform/wince/CEException.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include <windows.h>
-
-class CEException {
-public:
- static bool writeException(TCHAR *path, EXCEPTION_POINTERS *exceptionPointers);
-private:
- static void writeString(HANDLE file, char *data);
- static void writeBreak(HANDLE file);
- static void dumpContext(HANDLE file, HANDLE hProcess, CONTEXT *context);
- static void dumpException(HANDLE file, EXCEPTION_RECORD *exceptionRecord);
-
-};
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
deleted file mode 100644
index 71650060a7..0000000000
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "backends/platform/wince/wince-sdl.h"
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-
-#include "CELauncherDialog.h"
-
-#include "engines/metaengine.h"
-
-#include "gui/gui-manager.h"
-#include "gui/widget.h"
-#include "gui/browser.h"
-#include "gui/message.h"
-#include "gui/ThemeEval.h"
-#include "gui/widgets/list.h"
-
-#include "common/config-manager.h"
-
-#include "common/translation.h"
-
-using namespace GUI;
-using namespace Common;
-
-class CEAboutDialog : public Dialog {
-public:
- CEAboutDialog()
- : Dialog(10, 60, 300, 77) {
- char tempo[100];
- const int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
- const int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
- new ButtonWidget(this, (_w - buttonWidth) / 2, 55, buttonWidth, buttonHeight, _("OK"), 0, kCloseCmd, '\r');
-
- Common::String videoDriver(_("Using SDL driver "));
- SDL_VideoDriverName(tempo, sizeof(tempo));
- videoDriver += tempo;
- new StaticTextWidget(this, 0, 10, _w, kLineHeight, videoDriver, Graphics::kTextAlignCenter);
- Common::String displayInfos(_("Display "));
- sprintf(tempo, "%dx%d (real %dx%d)", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), OSystem_WINCE3::getScreenWidth(), OSystem_WINCE3::getScreenHeight());
- displayInfos += tempo;
- new StaticTextWidget(this, 0, 30, _w, kLineHeight, displayInfos, Graphics::kTextAlignCenter);
- }
-};
-
-CELauncherDialog::CELauncherDialog() : GUI::LauncherDialog() {
- dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager())->reset_panel();
-}
-
-void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
- if ((cmd == 'STRT') || (cmd == kListItemActivatedCmd) || (cmd == kListItemDoubleClickedCmd)) {
- dynamic_cast<WINCESdlGraphicsManager *>(((OSystem_SDL *)g_system)->getGraphicsManager())->init_panel();
- }
- LauncherDialog::handleCommand(sender, cmd, data);
- if (cmd == 'ABOU') {
- CEAboutDialog about;
- about.runModal();
- }
-}
-
-void CELauncherDialog::addGame() {
- MessageDialog alert(_("Do you want to perform an automatic scan ?"), _("Yes"), _("No"));
- if (alert.runModal() == kMessageOK && _browser->runModal() > 0) {
- MassAddDialog massAddDlg(_browser->getResult());
-
- massAddDlg.runModal();
-
- // Update the ListWidget and force a redraw
-
- // If new target(s) were added, update the ListWidget and move
- // the selection to to first newly detected game.
- Common::String newTarget = massAddDlg.getFirstAddedTarget();
- if (!newTarget.empty()) {
- updateListing();
- selectTarget(newTarget);
- }
- g_gui.scheduleTopDialogRedraw();
- } else
- GUILauncherDialog::addGame();
-}
diff --git a/backends/platform/wince/CELauncherDialog.h b/backends/platform/wince/CELauncherDialog.h
deleted file mode 100644
index 9f69b8500f..0000000000
--- a/backends/platform/wince/CELauncherDialog.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CELAUNCHERDIALOG_H
-#define CELAUNCHERDIALOG_H
-
-#include "base/plugins.h"
-#include "common/fs.h"
-#include "gui/launcher.h"
-#include "gui/massadd.h"
-
-class CELauncherDialog : public GUI::LauncherDialog {
-public:
- CELauncherDialog();
- virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
-protected:
- void addGame();
-};
-
-typedef GUI::LauncherDialog GUILauncherDialog;
-
-#endif
diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp
deleted file mode 100644
index 321bdd92a9..0000000000
--- a/backends/platform/wince/CEScaler.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "graphics/scaler/intern.h"
-#include "CEScaler.h"
-
-extern int gBitFormat;
-#ifdef ARM
-extern "C" {
- void SmartphoneLandscapeARM(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int mask);
-}
-
-void SmartphoneLandscape(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- // Rounding constants and masks used for different pixel formats
- static const int redbluegreenMasks[] = { 0x03E07C1F, 0x07E0F81F };
- const int maskUsed = (gBitFormat == 565);
- SmartphoneLandscapeARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height, redbluegreenMasks[maskUsed]);
-}
-
-#else
-
-template<typename ColorMask>
-void SmartphoneLandscapeTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- int line = 0;
-
- assert((width % 16) == 0);
-
- while (height--) {
- uint16 *d = (uint16 *)dstPtr;
-
- const uint16 *s = (const uint16 *)srcPtr;
- for (int i = 0; i < width; i += 16) {
- // Downscale horizontally to 11/16.
- // See smartLandScale.s for an explanation of the scale pattern.
- *d++ = interpolate32_3_1<ColorMask>(s[0], s[1]);
- *d++ = interpolate32_1_1<ColorMask>(s[1], s[2]);
- *d++ = interpolate32_3_1<ColorMask>(s[3], s[2]);
- *d++ = interpolate32_1_1<ColorMask>(s[4], s[5]);
- *d++ = interpolate32_3_1<ColorMask>(s[6], s[7]);
- *d++ = interpolate32_1_1<ColorMask>(s[7], s[8]);
- *d++ = interpolate32_3_1<ColorMask>(s[9], s[8]);
- *d++ = interpolate32_1_1<ColorMask>(s[10], s[11]);
- *d++ = interpolate32_3_1<ColorMask>(s[12], s[13]);
- *d++ = interpolate32_1_1<ColorMask>(s[13], s[14]);
- *d++ = interpolate32_3_1<ColorMask>(s[15], s[14]);
-
- s += 16;
- }
- srcPtr += srcPitch;
- dstPtr += dstPitch;
- line++;
-
- // Skip every 8th row
- if (line == 7) {
- line = 0;
- srcPtr += srcPitch;
- height--;
- }
- }
-}
-
-void SmartphoneLandscape(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- if (gBitFormat == 565)
- SmartphoneLandscapeTemplate<Graphics::ColorMasks<565> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
- else
- SmartphoneLandscapeTemplate<Graphics::ColorMasks<555> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
-}
-
-#endif
diff --git a/backends/platform/wince/CEScaler.h b/backends/platform/wince/CEScaler.h
deleted file mode 100644
index fc6540a33c..0000000000
--- a/backends/platform/wince/CEScaler.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CESCALER_H
-#define CESCALER_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "graphics/scaler.h"
-#include "graphics/scaler/intern.h"
-
-/**
- * This filter (down)scales the source image horizontally by a factor of 11/16
- * and vertically by 7/8. For example, a 320x200 image is scaled to 220x175.
- */
-DECLARE_SCALER(SmartphoneLandscape);
-
-#endif
diff --git a/backends/platform/wince/CEgui/CEGUI.h b/backends/platform/wince/CEgui/CEGUI.h
deleted file mode 100644
index 8b6db6b099..0000000000
--- a/backends/platform/wince/CEgui/CEGUI.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ToolbarHandler.h"
-#include "Panel.h"
-#include "ItemSwitch.h"
-#include "PanelKeyboard.h"
diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp
deleted file mode 100644
index e33e7f7f9d..0000000000
--- a/backends/platform/wince/CEgui/GUIElement.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-
-#include "Toolbar.h"
-
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
-GUIElement::GUIElement(int x, int y, int width, int height) :
- _background(0), _drawn(false), _visible(true), _x(x), _y(y), _width(width), _height(height) {
-}
-
-bool GUIElement::setBackground(WORD backgroundReference) {
- _background = new SDL_ImageResource();
- if (!_background->load(backgroundReference)) {
- delete _background;
- _background = NULL;
- return false;
- }
- if (!_height && !_width) {
- _height = _background->height();
- _width = _background->width();
- } else if (_background->height() != _height || _background->width() != _width) {
- delete _background;
- _background = NULL;
- return false;
- }
- return true;
-}
-
-void GUIElement::move(int x, int y) {
- _x = x;
- _y = y;
-}
-
-bool GUIElement::draw(SDL_Surface *surface) {
- if (_background && !_drawn && _visible) {
- SDL_Rect rect;
-
- rect.x = _x;
- rect.y = _y;
- rect.w = _width;
- rect.h = _height;
-
- SDL_BlitSurface(_background->get(), NULL, surface, &rect);
-
- _drawn = true;
-
- return true;
- } else
- return false;
-}
-
-bool GUIElement::checkInside(int x, int y) {
- if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height)
- return true;
- else
- return false;
-}
-
-void GUIElement::setVisible(bool visibility) {
- if (visibility && !_visible)
- _drawn = false;
- _visible = visibility;
-}
-
-bool GUIElement::visible() {
- return _visible;
-}
-
-void GUIElement::forceRedraw() {
- _drawn = false;
-}
-
-bool GUIElement::drawn() {
- return _drawn;
-}
-
-int GUIElement::getX() {
- return _x;
-}
-
-int GUIElement::getY() {
- return _y;
-}
-
-int GUIElement::getWidth() {
- return _width;
-}
-
-int GUIElement::getHeight() {
- return _height;
-}
-
-GUIElement::~GUIElement() {
- delete _background;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h
deleted file mode 100644
index 57c6e321e7..0000000000
--- a/backends/platform/wince/CEgui/GUIElement.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_GUIELEMENT_H
-#define CEGUI_GUIELEMENT_H
-
-#include <windows.h>
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-struct SDL_Surface;
-
-namespace CEGUI {
-
-class SDL_ImageResource;
-
-class GUIElement {
-public:
- bool setBackground(WORD backgroundReference);
- void setVisible(bool visibility);
- virtual void forceRedraw();
- virtual bool draw(SDL_Surface *surface);
- virtual ~GUIElement();
- void move(int x, int y);
- int getWidth();
- int getHeight();
- int getX();
- int getY();
- virtual bool action(int x, int y, bool pushed) = 0;
- bool visible();
- bool drawn();
-protected:
- GUIElement(int x = 0, int y = 0, int width = 0, int height = 0);
- bool checkInside(int x, int y);
- bool _visible;
- SDL_ImageResource *_background;
- int _x;
- int _y;
- bool _drawn;
-private:
- int _width;
- int _height;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ItemAction.cpp b/backends/platform/wince/CEgui/ItemAction.cpp
deleted file mode 100644
index 89ca48efdc..0000000000
--- a/backends/platform/wince/CEgui/ItemAction.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ItemAction.h"
-
-namespace CEGUI {
-
-ItemAction::ItemAction(WORD reference, GUI::ActionType action) :
- PanelItem(reference) {
- _action = action;
- if (!GUI::Actions::Instance()->isEnabled(_action))
- _visible = false;
-}
-
-
-ItemAction::~ItemAction() {
-}
-
-bool ItemAction::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible && pushed) {
- GUI::Actions::Instance()->perform(_action, true);
- GUI::Actions::Instance()->perform(_action, false);
- return true;
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ItemAction.h b/backends/platform/wince/CEgui/ItemAction.h
deleted file mode 100644
index 8de0046d4c..0000000000
--- a/backends/platform/wince/CEgui/ItemAction.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_ITEMACTION_H
-#define CEGUI_ITEMACTION_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "gui/Actions.h"
-#include "CEgui/PanelItem.h"
-
-namespace CEGUI {
-
-class ItemAction : public PanelItem {
-public:
- ItemAction(WORD reference, GUI::ActionType action);
- virtual ~ItemAction();
- virtual bool action(int x, int y, bool pushed);
-private:
- GUI::ActionType _action;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ItemSwitch.cpp b/backends/platform/wince/CEgui/ItemSwitch.cpp
deleted file mode 100644
index 7bb0a23a7b..0000000000
--- a/backends/platform/wince/CEgui/ItemSwitch.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ItemSwitch.h"
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
-void ItemSwitch::init(WORD referenceTrue, WORD referenceFalse) {
- _backgroundTrue = _background;
- _backgroundFalse = new SDL_ImageResource();
- if (!_backgroundFalse->load(referenceFalse)) {
- delete _backgroundFalse;
- delete _background;
- _background = NULL;
- _backgroundFalse = NULL;
- }
-}
-
-ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) :
- PanelItem(referenceTrue) {
- init(referenceTrue, referenceFalse);
- _item = item;
- _itemmax = -1;
- if (!*_item)
- _background = _backgroundFalse;
-}
-
-ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max) :
- PanelItem(referenceTrue) {
- init(referenceTrue, referenceFalse);
- _itemmultiple = item;
- _itemmax = max;
- if (!*item)
- _background = _backgroundFalse;
-}
-
-ItemSwitch::~ItemSwitch() {
- delete _backgroundFalse;
-}
-
-bool ItemSwitch::action(int x, int y, bool pushed) {
-
- if (checkInside(x, y) && _visible && pushed) {
- if (_itemmax <= 0) {
- *_item = !*_item;
- if (*_item)
- _background = _backgroundTrue;
- else
- _background = _backgroundFalse;
-
- if (_panel)
- _panel->forceRedraw();
-
- return true;
- } else {
- *_itemmultiple = *_itemmultiple + 1;
- if (*_itemmultiple > _itemmax)
- *_itemmultiple = 0;
- if (*_itemmultiple)
- _background = _backgroundTrue;
- else
- _background = _backgroundFalse;
-
- if (_panel)
- _panel->forceRedraw();
-
- return true;
- }
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ItemSwitch.h b/backends/platform/wince/CEgui/ItemSwitch.h
deleted file mode 100644
index e54b4b1b99..0000000000
--- a/backends/platform/wince/CEgui/ItemSwitch.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_ITEMSWITCH_H
-#define CEGUI_ITEMSWITCH_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Panel.h"
-#include "EventsBuffer.h"
-
-using GUI::Key;
-
-namespace CEGUI {
-
-class SDL_ImageResource;
-
-class ItemSwitch : public PanelItem {
-public:
- ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item);
- ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max);
- virtual ~ItemSwitch();
- virtual bool action(int x, int y, bool pushed);
-private:
- void init(WORD referenceTrue, WORD referenceFalse);
- bool *_item;
- static bool _itemdummy;
- int *_itemmultiple, _itemmax;
- SDL_ImageResource *_backgroundTrue;
- SDL_ImageResource *_backgroundFalse;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/Panel.cpp b/backends/platform/wince/CEgui/Panel.cpp
deleted file mode 100644
index 273d06a054..0000000000
--- a/backends/platform/wince/CEgui/Panel.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "Panel.h"
-
-namespace CEGUI {
-
-Panel::Panel(int interleave_first, int interleave) : Toolbar() {
- _interleave = interleave;
- _currentItem = interleave_first;
-}
-
-
-bool Panel::add(const String &name, const PanelItem *item) {
- _itemsMap[name] = (PanelItem *)item;
- _itemsMap[name]->move(_currentItem, _y + 10);
- _itemsMap[name]->setPanel(this);
- _currentItem += _interleave;
-
- return true;
-}
-
-bool Panel::draw(SDL_Surface *surface) {
- ItemMap::const_iterator iterator;
- if (!_drawn && _visible) {
- GUIElement::draw(surface);
- for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) {
- ((GUIElement *)(iterator->_value))->draw(surface);
- }
- return true;
- } else
- return false;
-}
-
-void Panel::forceRedraw() {
- ItemMap::const_iterator iterator;
- GUIElement::forceRedraw();
- for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator)
- ((GUIElement *)(iterator->_value))->forceRedraw();
-}
-
-bool Panel::action(int x, int y, bool pushed) {
- ItemMap::const_iterator iterator;
- bool result = false;
- if (!_visible || !checkInside(x, y))
- return false;
-
- for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator)
- result = ((GUIElement *)(iterator->_value))->action(x, y, pushed);
- return result;
-}
-
-void Panel::clear() {
- _itemsMap.clear();
-}
-
-Panel::~Panel() {
- _itemsMap.clear();
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/Panel.h b/backends/platform/wince/CEgui/Panel.h
deleted file mode 100644
index db38751073..0000000000
--- a/backends/platform/wince/CEgui/Panel.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANEL_H
-#define CEGUI_PANEL_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/hashmap.h"
-#include "common/str.h"
-#include "common/config-manager.h"
-
-#include "PanelItem.h"
-#include "Toolbar.h"
-
-using Common::String;
-using Common::HashMap;
-
-namespace CEGUI {
-
-class Panel : public Toolbar {
-public:
- Panel(int interleave_first, int interleave);
- virtual bool draw(SDL_Surface *surface);
- virtual ~Panel();
- bool add(const String &name, const PanelItem *item);
- void clear();
- virtual void forceRedraw();
- virtual bool action(int x, int y, bool pushed);
-private:
-
- typedef HashMap<String, PanelItem *, Common::IgnoreCase_Hash , Common::IgnoreCase_EqualTo> ItemMap;
-
- ItemMap _itemsMap;
- int _interleave;
- int _currentItem;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/PanelItem.cpp b/backends/platform/wince/CEgui/PanelItem.cpp
deleted file mode 100644
index 186b5161ef..0000000000
--- a/backends/platform/wince/CEgui/PanelItem.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "PanelItem.h"
-
-namespace CEGUI {
-
-PanelItem::PanelItem(WORD reference) : GUIElement() {
- setBackground(reference);
- _panel = NULL;
-}
-
-
-PanelItem::~PanelItem() {
-}
-
-bool PanelItem::action(int x, int y, bool pushed) {
- return false;
-}
-
-void PanelItem::setPanel(Panel *panel) {
- _panel = panel;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/PanelItem.h b/backends/platform/wince/CEgui/PanelItem.h
deleted file mode 100644
index a0a72c2525..0000000000
--- a/backends/platform/wince/CEgui/PanelItem.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANELITEM_H
-#define CEGUI_PANELITEM_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Toolbar.h"
-
-namespace CEGUI {
-
-class Panel;
-
-class PanelItem : public GUIElement {
- friend class Panel;
-public:
- PanelItem(WORD reference);
- virtual ~PanelItem();
- virtual bool action(int x, int y, bool pushed);
-protected:
- void setPanel(Panel *panel);
- Panel *_panel;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp
deleted file mode 100644
index 34ba8d6473..0000000000
--- a/backends/platform/wince/CEgui/PanelKeyboard.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-#include "PanelKeyboard.h"
-
-namespace CEGUI {
-
-const char KEYBOARD_MAPPING_ALPHA[][14] = { {"abcdefghijklm"}, {"nopqrstuvwxyz"} };
-const char KEYBOARD_MAPPING_NUMERIC[][6] = { {"12345"}, {"67890"} };
-const int KEYBOARD_MAPPING_SPECIAL[][3][2] = { { {1, SDLK_ESCAPE}, {224, SDLK_UP}, {32, SDLK_SPACE} },
- { {224, SDLK_LEFT}, {224, SDLK_DOWN}, {224, SDLK_RIGHT} }
-};
-
-PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() {
- setBackground(reference);
- _state = false;
- _lastKey.setKey(0);
-}
-
-
-PanelKeyboard::~PanelKeyboard() {
-}
-
-bool PanelKeyboard::action(int x, int y, bool pushed) {
- Key key;
-
- if (checkInside(x, y)) {
- int keyAscii = 0;
- int keyCode = 0;
- if (x < 185) {
- // Alpha selection
- keyCode = keyAscii = KEYBOARD_MAPPING_ALPHA[y >= _y + 20][((x + 10) / 14) - 1];
- } else if (x >= 186 && x <= 255) {
- // Numeric selection
- keyCode = keyAscii = KEYBOARD_MAPPING_NUMERIC[y >= _y + 20][((x - 187 + 10) / 14) - 1];
- } else if (x >= 258 && x <= 300) {
- // Special keys
- keyAscii = KEYBOARD_MAPPING_SPECIAL[y >= _y + 20][((x - 259 + 10) / 14) - 1][0];
- keyCode = KEYBOARD_MAPPING_SPECIAL[y >= _y + 20][((x - 259 + 10) / 14) - 1][1];
- } else if (x >= 302 && x <= 316) {
- if (y < _y + 20) {
- // Backspace
- keyAscii = VK_BACK;
- keyCode = keyAscii;
- } else {
- // Enter
- keyAscii = 13;
- keyCode = 13;
- }
- }
-
- if (keyAscii != 0) {
- 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.setKey(keyAscii, 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 = _lastKey;
- return EventsBuffer::simulateKey(&key, false);
- } else
- return false;
- } else if (_state && !pushed) { // cursor left the keyboard area and is up
- _state = false;
- key = _lastKey;
- return EventsBuffer::simulateKey(&key, false);
- } else
- return false;
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.h b/backends/platform/wince/CEgui/PanelKeyboard.h
deleted file mode 100644
index a0daca81e3..0000000000
--- a/backends/platform/wince/CEgui/PanelKeyboard.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_PANELKEYBOARD_H
-#define CEGUI_PANELKEYBOARD_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-#include "Toolbar.h"
-#include "EventsBuffer.h"
-
-using GUI::Key;
-using CEKEYS::EventsBuffer;
-
-namespace CEGUI {
-
-class PanelKeyboard : public Toolbar {
-public:
- PanelKeyboard(WORD reference);
- virtual ~PanelKeyboard();
- virtual bool action(int x, int y, bool pushed);
-private:
- bool _state;
- Key _lastKey;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.cpp b/backends/platform/wince/CEgui/SDL_ImageResource.cpp
deleted file mode 100644
index ec430fc848..0000000000
--- a/backends/platform/wince/CEgui/SDL_ImageResource.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-#include "SDL_ImageResource.h"
-
-namespace CEGUI {
-
-SDL_ImageResource::SDL_ImageResource() :
- _surface(0) {
-}
-
-SDL_Surface *SDL_ImageResource::load(WORD resourceID) {
- HRSRC resource;
- HGLOBAL resourceGlobal;
- LPVOID resourcePointer;
- DWORD resourceSize;
- SDL_RWops *surfaceData;
- HMODULE moduleHandle;
-
- moduleHandle = GetModuleHandle(NULL);
- resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY"));
- if (!resource)
- return NULL;
- resourceSize = SizeofResource(moduleHandle, resource);
- if (!resourceSize)
- return NULL;
- resourceGlobal = LoadResource(moduleHandle, resource);
- if (!resourceGlobal)
- return NULL;
- resourcePointer = LockResource(resourceGlobal);
- if (!resourcePointer)
- return NULL;
-
- surfaceData = SDL_RWFromMem(resourcePointer, resourceSize);
- if (!surfaceData)
- return NULL;
- _surface = SDL_LoadBMP_RW(surfaceData, 1);
-
- return _surface;
-}
-
-SDL_Surface *SDL_ImageResource::get() {
- return _surface;
-}
-
-int SDL_ImageResource::height() {
- if (_surface)
- return _surface->h;
- return 0;
-}
-
-int SDL_ImageResource::width() {
- if (_surface)
- return _surface->w;
- return 0;
-}
-
-SDL_ImageResource::~SDL_ImageResource() {
- if (_surface)
- SDL_FreeSurface(_surface);
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.h b/backends/platform/wince/CEgui/SDL_ImageResource.h
deleted file mode 100644
index 4fd7932743..0000000000
--- a/backends/platform/wince/CEgui/SDL_ImageResource.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_SDL_IMAGERESOURCE_H
-#define CEGUI_SDL_IMAGERESOURCE_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-
-struct SDL_Surface;
-
-namespace CEGUI {
-
-class SDL_ImageResource {
-public:
- SDL_ImageResource();
- SDL_Surface *load(WORD resourceID);
- SDL_Surface *get();
- int height();
- int width();
- virtual ~SDL_ImageResource();
-private:
- SDL_Surface *_surface;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/Toolbar.cpp b/backends/platform/wince/CEgui/Toolbar.cpp
deleted file mode 100644
index 9e04a30210..0000000000
--- a/backends/platform/wince/CEgui/Toolbar.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "Toolbar.h"
-
-namespace CEGUI {
-
-// Not to be drawn on game screen !
-Toolbar::Toolbar() : GUIElement(0, 0, 320, 40) {
-}
-
-
-Toolbar::~Toolbar() {
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/Toolbar.h b/backends/platform/wince/CEgui/Toolbar.h
deleted file mode 100644
index d0ac2cdcb3..0000000000
--- a/backends/platform/wince/CEgui/Toolbar.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_TOOLBAR_H
-#define CEGUI_TOOLBAR_H
-
-#include "common/scummsys.h"
-
-#include "GUIElement.h"
-
-namespace CEGUI {
-
-class Toolbar : public GUIElement {
-public:
- virtual ~Toolbar();
- virtual bool action(int x, int y, bool pushed) = 0;
-protected:
- Toolbar();
-
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp
deleted file mode 100644
index 534b338cdb..0000000000
--- a/backends/platform/wince/CEgui/ToolbarHandler.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-#include "ToolbarHandler.h"
-
-namespace CEGUI {
-
-ToolbarHandler::ToolbarHandler():
- _current(""), _active(NULL) {
-}
-
-
-bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) {
- _toolbarMap[name] = (Toolbar *)&toolbar;
-
- if (!_active) {
- _active = &((Toolbar &)toolbar);
- _current = name;
- }
-
- return true;
-}
-
-String ToolbarHandler::activeName() {
- return _current;
-}
-
-bool ToolbarHandler::setActive(const String &name) {
- if (!_toolbarMap.contains(name))
- return false;
- if (_current == name)
- return true;
- _active->action(0, 0, false); // make sure any items are unpushed when changing toolbars (e.g. forced VK->main panel)
- _current = name;
- _active = _toolbarMap[name];
- _active->forceRedraw();
- return true;
-}
-
-bool ToolbarHandler::action(int x, int y, bool pushed) {
- if (_active && _active->visible()) {
- // FIXME !
- if (_offset > 240)
- return _active->action(x / 2, (y - _offset) / 2, pushed);
- else
- return _active->action(x, y - _offset, pushed);
- } else
- return false;
-}
-
-void ToolbarHandler::setVisible(bool visible) {
- if (_active)
- _active->setVisible(visible);
-}
-
-bool ToolbarHandler::visible() {
- if (_active)
- return _active->visible();
- else
- return false;
-}
-
-void ToolbarHandler::forceRedraw() {
- if (_active)
- _active->forceRedraw();
-}
-
-bool ToolbarHandler::drawn() {
- if (_active)
- return _active->drawn();
- else
- return false;
-}
-
-bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) {
- if (_active) {
- bool result = _active->draw(surface);
- if (result) {
- rect->x = _active->getX();
- rect->y = _active->getY();
- rect->w = _active->getWidth();
- rect->h = _active->getHeight();
- }
- return result;
- } else
- return false;
-}
-
-void ToolbarHandler::setOffset(int offset) {
- _offset = offset;
-}
-
-int ToolbarHandler::getOffset() {
- return _offset;
-}
-
-Toolbar *ToolbarHandler::active() {
- return _active;
-}
-
-ToolbarHandler::~ToolbarHandler() {
- _toolbarMap.clear();
-}
-
-} // End of namespace CEGUI
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.h b/backends/platform/wince/CEgui/ToolbarHandler.h
deleted file mode 100644
index 36f4022bd8..0000000000
--- a/backends/platform/wince/CEgui/ToolbarHandler.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEGUI_TOOLBARHANDLER_H
-#define CEGUI_TOOLBARHANDLER_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/str.h"
-#include "common/hashmap.h"
-#include "common/config-manager.h"
-
-#include "Toolbar.h"
-
-using Common::String;
-using Common::HashMap;
-
-namespace CEGUI {
-
-class ToolbarHandler {
-public:
- ToolbarHandler();
- bool add(const String &name, const Toolbar &toolbar);
- bool setActive(const String &name);
- bool action(int x, int y, bool pushed);
- void setVisible(bool visible);
- bool visible();
- String activeName();
- void forceRedraw();
- void setOffset(int offset);
- int getOffset();
- bool draw(SDL_Surface *surface, SDL_Rect *rect);
- bool drawn();
- Toolbar *active();
- virtual ~ToolbarHandler();
-private:
-
- HashMap<String, Toolbar *, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _toolbarMap;
- String _current;
- Toolbar *_active;
- int _offset;
-};
-
-} // End of namespace CEGUI
-
-#endif
diff --git a/backends/platform/wince/CEkeys/CEKeys.h b/backends/platform/wince/CEkeys/CEKeys.h
deleted file mode 100644
index 31f5ba839c..0000000000
--- a/backends/platform/wince/CEkeys/CEKeys.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "EventsBuffer.h"
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp
deleted file mode 100644
index b4fdc0010d..0000000000
--- a/backends/platform/wince/CEkeys/EventsBuffer.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "backends/platform/sdl/sdl-sys.h"
-
-#include "EventsBuffer.h"
-
-namespace CEKEYS {
-
-bool EventsBuffer::simulateKey(GUI::Key *key, bool pushed) {
- SDL_Event ev = {0};
-
- if (!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.unicode = (SDLMod)key->flags(); // HACK: put the flags into the unused unicode field
- ev.key.keysym.sym = (SDLKey)key->keycode();
- ev.key.keysym.mod = KMOD_RESERVED;
- return (SDL_PushEvent(&ev) == 0);
-}
-
-bool EventsBuffer::simulateMouseMove(int x, int y) {
- SDL_Event ev = {0};
-
- ev.type = SDL_MOUSEMOTION;
- ev.motion.x = x;
- ev.motion.y = y;
- return (SDL_PushEvent(&ev) == 0);
-}
-
-bool EventsBuffer::simulateMouseLeftClick(int x, int y, bool pushed) {
- SDL_Event ev = {0};
- static bool state = false;
-
- if (pushed == state) return 0;
- state = pushed;
- ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
- ev.button.button = SDL_BUTTON_LEFT;
- ev.button.x = x;
- ev.button.y = y;
- return (SDL_PushEvent(&ev) == 0);
-}
-
-bool EventsBuffer::simulateMouseRightClick(int x, int y, bool pushed) {
- SDL_Event ev = {0};
- static bool state = false;
-
- if (pushed == state) return 0;
- state = pushed;
- ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
- ev.button.button = SDL_BUTTON_RIGHT;
- ev.button.x = x;
- ev.button.y = y;
- return (SDL_PushEvent(&ev) == 0);
-}
-}
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.h b/backends/platform/wince/CEkeys/EventsBuffer.h
deleted file mode 100644
index 6c1b12cc24..0000000000
--- a/backends/platform/wince/CEkeys/EventsBuffer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CEKEYS_EVENTSBUFFER_H
-#define CEKEYS_EVENTSBUFFER_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "common/list.h"
-
-#include "gui/Key.h"
-
-namespace CEKEYS {
-
-class EventsBuffer {
-public:
- static bool simulateKey(GUI::Key *key, bool pushed);
- static bool simulateMouseMove(int x, int y);
- static bool simulateMouseLeftClick(int x, int y, bool pushed);
- static bool simulateMouseRightClick(int x, int y, bool pushed);
-
-};
-}
-
-#endif
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
deleted file mode 100644
index f0606c9ba1..0000000000
--- a/backends/platform/wince/Makefile
+++ /dev/null
@@ -1,255 +0,0 @@
-# ScummVM Makefile for Windows CE port
-# Uses the cegcc toolchain. For build info check out the wiki: https://wiki.scummvm.org
-
-########################################################################
-## Do you want a debug build or not?
-
-#WINCE_DEBUG_BUILD = 1
-#UNOPTIMIZED_BUILD = 1
-
-########################################################################
-## Do you want a build using plugins?
-
-#DYNAMIC_MODULES = 1
-# TODO: You'll need to change STATIC_PLUGIN to DYNAMIC_PLUGIN below
-
-########################################################################
-## Enable whichever engines you want here
-
-ENABLE_SCUMM = STATIC_PLUGIN
-ENABLE_SCUMM_7_8 = 1
-ENABLE_HE = 1
-ENABLE_SKY = STATIC_PLUGIN
-ENABLE_QUEEN = STATIC_PLUGIN
-ENABLE_GOB = STATIC_PLUGIN
-ENABLE_LURE = STATIC_PLUGIN
-ENABLE_CINE = STATIC_PLUGIN
-ENABLE_SAGA = STATIC_PLUGIN
-ENABLE_IHNM = 1
-#ENABLE_SAGA2 = 1
-ENABLE_KYRA = STATIC_PLUGIN
-ENABLE_AGI = STATIC_PLUGIN
-ENABLE_AGOS = STATIC_PLUGIN
-ENABLE_SWORD1 = STATIC_PLUGIN
-ENABLE_SWORD2 = STATIC_PLUGIN
-ENABLE_TOUCHE = STATIC_PLUGIN
-ENABLE_PARALLACTION = STATIC_PLUGIN
-ENABLE_DRASCULA = STATIC_PLUGIN
-ENABLE_GROOVIE = STATIC_PLUGIN
-ENABLE_TUCKER = STATIC_PLUGIN
-ENABLE_TINSEL = STATIC_PLUGIN
-ENABLE_CRUISE = STATIC_PLUGIN
-ENABLE_MADE = STATIC_PLUGIN
-#ENABLE_SCI = STATIC_PLUGIN
-#ENABLE_M4 = STATIC_PLUGIN
-
-########################################################################
-## Pick which libraries you want to use here
-
-USE_MAD = 1
-#USE_TREMOR = 1
-USE_TREMOLO = 1
-#USE_FLAC = 1
-USE_ZLIB = 1
-
-########################################################################
-## For remote deployment (copying the built files onto a device
-## automatically), we need to know various things, like which
-## tools to use. I use pput and pdel from
-## http://www.xs4all.nl/~itsme/projects/xda/tools.html
-## and I keep my installation on the storage card, but other people
-## may prefer other things.
-
-REMOTE_COPY = pput
-REMOTE_DELETE = pdel
-REMOTE_DIRECTORY = \Storage Card\Program Files\Scummvm
-
-########################################################################
-## You're probably not going to want to change these defines...
-
-USE_SCALERS = 1
-USE_HQ_SCALERS = 1
-USE_ARM_SOUND_ASM = 1
-USE_ARM_SMUSH_ASM = 1
-USE_ARM_GFX_ASM = 1
-USE_ARM_COSTUME_ASM = 1
-USE_ARM_SCALER_ASM = 1
-
-########################################################################
-## Hopefully you shouldn't need to change anything below here. ##
-########################################################################
-
-
-srcdir = ../../..
-VPATH = $(srcdir)
-
-CXX = arm-wince-mingw32ce-g++
-LD = arm-wince-mingw32ce-g++
-AR = arm-wince-mingw32ce-ar cru
-RANLIB = arm-wince-mingw32ce-ranlib
-STRIP = arm-wince-mingw32ce-strip
-WINDRES= arm-wince-mingw32ce-windres
-MKDIR = mkdir -p
-RM = rm -f
-RM_REC = rm -rf
-ECHO = echo -n
-CAT = cat
-AS = arm-wince-mingw32ce-as
-
-########################################################################
-## Set up defines, includes, cflags etc
-
-DEFINES := -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DSCUMM_NEED_ALIGNMENT
-DEFINES += -DFPM_DEFAULT
-
-DEFINES += -DNONSTANDARD_PORT
-DEFINES += -DWIN32
-DEFINES += -Dcdecl= -D__cdecl__= -Wno-multichar
-
-INCLUDES := -I$(srcdir) -I. -I$(srcdir)/engines -Imissing/gcc -Ilibs/include -Ilibs/include/sdl -ICEgui -ICEkeys
-
-CFLAGS :=
-ifndef UNOPTIMIZED_BUILD
-CFLAGS += -O3 -fno-inline-functions -march=armv4 -mtune=xscale
-endif
-
-LDFLAGS := -Wl,-Map,scummvm.exe.map -Wl,--stack,65536
-LIBS := -Llibs/lib -lSDL
-
-ifdef WINCE_DEBUG_BUILD
-DEFINES += -DDEBUG -DUSE_WINDBG
-CFLAGS += -g
-LDFLAGS += -debug
-endif
-
-ifdef USE_ZLIB
-DEFINES += -DUSE_ZLIB
-LIBS += -lzlib
-endif
-
-ifdef USE_MAD
-DEFINES += -DUSE_MAD
-LIBS += -lmad
-endif
-
-ifdef USE_TREMOR
-DEFINES += -DUSE_TREMOR -DUSE_VORBIS
-LIBS += -ltremorce
-endif
-
-ifdef USE_TREMOLO
-DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_TREMOLO
-INCLUDES += -Ilibs/include/tremolo
-LIBS += -llibTremolo
-endif
-
-ifdef USE_FLAC
-DEFINES += -DUSE_FLAC
-LIBS += -lFLAC
-endif
-
-ifdef USE_SCALERS
-DEFINES += -DUSE_SCALERS
-endif
-
-ifdef USE_HQ_SCALERS
-DEFINES += -DUSE_HQ_SCALERS
-endif
-
-ifdef USE_ARM_SMUSH_ASM
-DEFINES += -DUSE_ARM_SMUSH_ASM
-endif
-
-ifdef USE_ARM_GFX_ASM
-DEFINES += -DUSE_ARM_GFX_ASM
-endif
-
-ifdef USE_ARM_COSTUME_ASM
-DEFINES += -DUSE_ARM_COSTUME_ASM
-endif
-
-ifdef USE_ARM_SCALER_ASM
-DEFINES += -DUSE_ARM_SCALER_ASM
-endif
-
-########################################################################
-# Targets follow here
-
-EXECUTABLE = scummvm.exe
-CXXFLAGS := $(CFLAGS)
-OBJS :=
-MODULE_DIRS += ./
-DEPDIR = .deps
-
-OBJS += CEActionsPocket.o CEDevice.o CEScaler.o \
- CEActionsSmartphone.o CELauncherDialog.o wince-sdl.o
-OBJS += CEgui/GUIElement.o CEgui/Panel.o CEgui/SDL_ImageResource.o \
- CEgui/ItemAction.o CEgui/PanelItem.o CEgui/Toolbar.o \
- CEgui/ItemSwitch.o CEgui/PanelKeyboard.o CEgui/ToolbarHandler.o
-OBJS += CEkeys/EventsBuffer.o
-OBJS += $(srcdir)/gui/Actions.o $(srcdir)/gui/Key.o $(srcdir)/gui/KeysDialog.o
-OBJS += ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o ../sdl/hardwarekeys.o
-OBJS += missing/missing.o
-OBJS += smartLandScale.o
-ifndef DYNAMIC_MODULES
-OBJS += PocketSCUMM.o
-endif
-
-ifdef DYNAMIC_MODULES
-EXECUTABLE = scummvm.dll
-PLUGIN_PREFIX :=
-PLUGIN_SUFFIX := .dll
-PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
-CXXFLAGS += -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS := -shared -L. -lscummvm -Llibs/lib
-PRE_OBJS_FLAGS := -Wl,--whole-archive
-POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -shared
-endif
-
-include $(srcdir)/Makefile.common
-
-########################################################################
-## Our top level target, and what we deploy depends on whether we are
-## building the plugin version or not...
-ifdef DYNAMIC_MODULES
-
-all: dist-plugins
-
-deploy: deploy-plugins deploy-exe
-
-else
-
-all: dist
-
-deploy: deploy-exe
-
-endif
-
-dist: PocketSCUMM.o $(EXECUTABLE)
-
-dist-plugins: $(EXECUTABLE) plugins PocketSCUMM.o plugins-stub
-
-plugins-stub: stub.o
- $(CXX) stub.o PocketSCUMM.o -L. -lscummvm -o scummvm.exe
-
-PocketSCUMM.o: PocketSCUMM.rc
- $(WINDRES) $*.rc $@
-
-all-clean: clean
- $(RM) PocketSCUMM.o stub.o
-
-deploy-plugins: dist-plugins
- @echo Deploying DLLs
- -$(REMOTE_MKDIR) "$(REMOTE_DIRECTORY)"
- -$(REMOTE_DELETE) "$(REMOTE_DIRECTORY)\*.dll"
- $(REMOTE_COPY) plugins/*.dll "$(REMOTE_DIRECTORY)"
- $(REMOTE_COPY) scummvm.dll "$(REMOTE_DIRECTORY)"
-
-deploy-exe: dist
- @echo Deploying modern theme - errors are normal here!
- -$(REMOTE_MKDIR) "$(REMOTE_DIRECTORY)"
- @-$(REMOTE_COPY) ../../../gui/themes/modern.ini "$(REMOTE_DIRECTORY)"
- @-$(REMOTE_COPY) ../../../gui/themes/modern.zip "$(REMOTE_DIRECTORY)"
- @echo Deploying EXE
- -$(REMOTE_DELETE) "$(REMOTE_DIRECTORY)\scummvm.exe"
- $(REMOTE_COPY) scummvm.exe "$(REMOTE_DIRECTORY)"
diff --git a/backends/platform/wince/PocketSCUMM.rc b/backends/platform/wince/PocketSCUMM.rc
deleted file mode 100644
index 1e22a68c3d..0000000000
--- a/backends/platform/wince/PocketSCUMM.rc
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-IDI_POCKETSCUMM ICON DISCARDABLE "images/scumm_icon.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// BINARY
-//
-
-PANEL_GENERIC BINARY DISCARDABLE "images/panelbig.bmp"
-PANEL_KEYBOARD BINARY DISCARDABLE "images/keyboard.bmp"
-ITEM_SKIP BINARY DISCARDABLE "images/Action.bmp"
-ITEM_OPTIONS BINARY DISCARDABLE "images/DiskwFolder.bmp"
-ITEM_SOUND_ON BINARY DISCARDABLE "images/SoundOn.bmp"
-ITEM_SOUND_OFF BINARY DISCARDABLE "images/SoundOff.bmp"
-ITEM_VIEW_PORTRAIT BINARY DISCARDABLE "images/MonkeyPortrait.bmp"
-ITEM_VIEW_LANDSCAPE BINARY DISCARDABLE "images/MonkeyLandscape.bmp"
-ITEM_BINDKEYS BINARY DISCARDABLE "images/bindkeys.bmp"
-HI_RES_AWARE CEUX {1}
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
deleted file mode 100644
index 0626f7b022..0000000000
--- a/backends/platform/wince/README-WinCE.txt
+++ /dev/null
@@ -1,823 +0,0 @@
-ScummVM Windows CE FAQ
-Last updated: 2011-12-05
-Release version: x.x.x
-------------------------------------------------------------------------
-
-New in this version
--------------------
-x.x.x:
-- Removed FLAC support for audio datafiles (now for real, this was originally
- announced for 1.0.0, but the library was still included until now). This is
- done because of size constrains of the executable and also FLAC on a mobile
- device isn't really recommended - so please use MP3 or Ogg for your audio
- datafiles.
-
-1.4.0:
-- Changed the memory management so that it is finally possible to break the
- 32MB per process barrier on Windows CE. It should be possible now (finally)
- to play nearly every game with the "big" binary (scummvm.exe, which includes
- all game engines).
-- Changed default values for "high_sample_rate" & "FM_high_quality" to "true"
- as most devices today are fast enough to handle this. It's still possible to
- set this to "false" if you have a slower device.
-- Fix for TeenAgent & Hugo engines (both weren't running at all, crashed right
- at the beginning)
-- Discworld 2 is now playable (works now because of the new memory management)
-- Replaced the game mass-adding functionality with the functionality used on
- all other platforms. It now shows progress while searching for games.
-- Mapped "Skip" button to F10 for AGI games
-- Mapped "Multi Function" to F10 in Simon 1 & 2 (enables hotspot highlighting)
-
-1.3.1:
-- Fix for Normal2xAspect scaler which was causing screen update issues in some
- games.
-- Fix for Normal1xAspect scaler which caused problems in the bottom part of the
- screen when toolbar was hidden.
-- Fix for freelook mode.
-- Fix for timer manager, caused timing issues in some games.
-- Activated runtime language detection for ScummVM gui.
-- Toolbar is now hidden when returning to the game list.
-- Double-tap right-click emulation is now turned off for SCI games by default.
-- Added a new option "no_doubletap_paneltoggle" for scummvm.ini to disable
- toolbar toggling when double-tapping on the top part of the screen.
-- SDL library related fixes:
- * Fix for screen/mouse-cursor rotation issues (fixes erratic touchscreen
- behaviour)
- * Fix for hardware keyboard on some devices (HTC Touch Pro, etc.)
-
-1.3.0:
-This is the first official Windows CE release since 1.1.1.
-
-The following new engines are now included (changes since last WinCE release):
- - Draci Engine (Dragon History)
- - Hugo Engine (Hugo Trilogy)
- - Mohawk Engine (Myst, Riven, Living Book games & Where in Time is Carmen
- Sandiego?)
- - SCI Engine (Sierra SCI games, see main README for a list of supported games)
- - Toon Engine (Toonstruck)
-
-Also, there are now 4 binaries in this distribution, a single executable
-which contains all engines (for devices with enough memory) and 3 smaller
-binaries which contain only some of the engines. The following lists all
-executables and the engines they contain:
-
-scummvm.exe:
- - all supported engines
-scummvm1.exe:
- - scumm, agi, cruise, draci, lure, queen, sky, sword1, tinsel, touche
-scummvm2.exe:
- - agos, cine, drascula, gob, groovie, kyra, made, parallaction, saga,
- teenagent, tucker
-scummvm3.exe:
- - hugo, mohawk, sci, sword2, toon, tsage
-
-There are no other port specific changes.
-
-1.2.1:
-(Note: No official 1.2.1 release)
-
-1.2.0:
-(Note: No official 1.2.0 release)
-
-1.1.1:
-Fix to the Normal2xAspect scaler that was causing crashes.
-
-1.1.0:
-The TeenAgent engine is now included, but there are no other port specific
-changes since 1.0.0.
-
-This are 3 binaries in this distribution. Combining all the engines into a
-single executable produces something that is too large to run on most
-devices. We have therefore split the engines roughly into two and built 2
-separate exes as follows:
-
-scummvm1.exe:
- - scumm, sword1, sword2, queen, sky, lure, agi, touche, tinsel, cruise
-scummvm2.exe:
- - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker, made,
- teenagent
-
-For those lucky enough to have devices with enough memory we also have a
-combined executable scummvm.exe which contains all of those engines.
-
-1.0.0:
-(Note: No changes since 1.0.0rc1)
-This version features optimized ARM assembly versions for the Smartphone,
-Normal2x and Normal2xAspect scalers, courtesy of Robin Watts. There should
-be a speed improvement when using these scalers.
-
-Also new is the aspect 2x upscaling mode, which is auto detected and used
-when the scaler is set to (normal) 2x mode and the panel is hidden. Hence,
-a 320x200 game running on a VGA or higher resolution device will be
-aspect scaled to fill the 640x480 screen.
-
-Be aware that Discworld 2 tries to allocate a big chunk of memory (10 MB)
-and this will fail on many devices (file under the not enough memory
-category).
-
-From this version on, we're dropping support for FLAC and MPEG-2. The first
-is a pain to maintain, while the second has been gradually phased out in
-scummvm. Be sure to update your add-on packs and/or recompress your sound.
-
-
-------------------------------------------------------------------------
-
-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 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone 2002,
-Smartphone 2003 or Windows Mobile 5 and 6 based device. It is known to work
-on Pocket PC 2000 devices, but it has not been officially tested.
-
-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 us to include them on ScummVM website.
-
-Games supported
----------------
-
-The Windows CE port of ScummVM supports all available game engines.
-
-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.
-
-* Low resolution Smartphones (176x220)
-
-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.
-
-* QVGA square devices (240x240)
-
-Only 320x200 or 320x240 games are supported due to lack of downsampling scaler.
-
-* QVGA Pocket PCs or Smartphones (240x320 or 320x240)
-
-All games are playable in these devices. Landscape devices may not be able to
-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. Moreover, VGA games will be displayed in true VGA mode.
-
-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.
-
-* "Palleted" 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 ...
-
-How do I install ScummVM for Windows CE ?
------------------------------------------
-
-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 :-)
-
-Some devices (like Pocket PC 2000) require GAPI to be present.
-
-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 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
-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: https://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 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 "Start" 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 (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 (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 monkey icon switches between portrait, landscape and inverse landscape
- 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
- All AGI games -> F10 to quit full-screen dialogs
- * 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. Click a second time near the pointer's location
- equals to a left click.
- * 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 : 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
- Simon 1 & 2 -> highlight all hotspots in screen
- * 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.
-
-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
-- YOU MUST USE THE FREE LOOK ACTION TO PLAY LURE OF THE TEMPTRESS
-
-How do I hide the toolbar ?
----------------------------
-
-Note: THIS IS A VERY USEFUL AND SOMETIMES NECESSARY SHORTCUT
-
-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.
-
-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 : 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.
-
-The default key map for these actions is:
-
- * 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
-
-You can change the key mapping at any time by bringing up the key mapping menu
-(Bind keys action).
-
-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 sections (f.e. [monkey2]) - performance options
-
- * high_sample_rate bool Desktop quality (22 kHz) sound output if
- set. This is the default.
- If you have a slow device, you can set this
- to false to prevent lags/delays in the game.
- * FM_high_quality bool Desktop quality FM synthesis if set. Lower
- quality otherwise. The default is high
- quality. You can change this if you have a
- slow 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 sync.
-
-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 to display the launcher in landscape
- for example, at startup.
- * no_doubletap_rightclick int 1: Turn off the default behavior of
- simulating a right-click when the screen is
- double-tapped.
-
-
-[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.
- * 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.
- * 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 behavior.
- * 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 specific questions
-------------------------------------------------------------------------
-
----------------
--- All Games --
----------------
-
-I need to press a special key
------------------------------
-
-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.
-
-The panel is obscuring the playfield area
------------------------------------------
-
-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.
-
-How do I name my save games ?
------------------------------
-
-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 --
---------------------------
-
-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
---------------------------------------------------------------
-
-Use 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 I & II --
--------------------------
-
-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. Consider changing to the DXA cutscene pack
-which is many times faster.
-
----------------
--- Gobliiins --
----------------
-
-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 --
-----------------------
-
-Do you expect me to play these games on keyboard-less devices ?
----------------------------------------------------------------
-
-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.
-
----------------------------
--- Lure of the Temptress --
----------------------------
-
-The control scheme is awkward (Pocket PCs)
-------------------------------------------
-
-Map and use the 'Free Look' action. Since normal pointer operation is to
-enter a left click at each tap position, the free look mode enables
-'hovering' the mouse on an object, then right clicking either by using the
-double tap method or by pressing the 'Right Click' action. Also, a left click
-can be entered while in free look mode, by clicking a second time near the
-current pointer's location. Note that two taps equal a left click.
-
----------------
--- Discworld --
----------------
-
-By default, the double tap to right click action is disabled in this game
-as this interferes with the game's controls. This setting can be overridden
-(see 'no_doubletap_rightclick' parameter above).
-
------------------
--- Discworld 2 --
------------------
-
-Crashes at startup of this game are usually due to the high memory
-requirements of this game.
-
--------------------------
--- Cruise for a Corpse --
--------------------------
-
-As with Discworld, the double-tap-to-right-click action interferes and will
-be disabled by default.
-
-
-------------------------------------------------------------------------
-Support
-------------------------------------------------------------------------
-
-Help, I've read everything and ...
------------------------------------
-
-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 https://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 the bugs for
-many 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.
-
-I want to compile my own ScummVM for Windows CE
------------------------------------------------
-
-Take a look at:
-https://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE
-
-
-------------------------------------------------------------------------
-Good Luck and Happy Adventuring!
-The ScummVM team.
-https://www.scummvm.org/
-------------------------------------------------------------------------
-
-
-------------------------------------------------------------------------
-Old news follow ...
-------------------------------------------------------------------------
-
-0.13.0:
-Important: Two builds for ScummVM CE
-
-For this release, two binaries (executables) are provided. The first,
-with file name scummvm1.exe, includes support for the following engines:
- - scumm, sword1, sword2, queen, sky, lure, agi, touche
-while the second, with file name scummvm2.exe:
- - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker
-The user must make sure to execute the correct file for a game. All
-previously detected games will be shown in the launcher. Trying to launch
-a gob engine game with scummvm1.exe will not work.
-Detection also works as implied: scummvm1.exe will detect only the games
-for which it has support; the same holds for scummvm2.exe.
-This change has been done so users with less free memory can play more
-memory hungry games.
-
-Also noted are problems with flac support. Your mileage may vary. Please
-consider using ogg or mp3 for those games (smaller sizes are better for
-handheld devices too!)
-
-
-0.12.0:
-- Improved SMUSH support (deprecated 'Smush_force_redraw' option)
-No skipped frames in Full Throttle action sequences. The 'Smush_force_redraw'
-option is not needed/honored anymore.
-
-- Fixed MultiFuntion key in Full Throttle
-
-- Improved sound output
-Fixed a long standing bug which led to distorted sound output in all games.
-
-- Switched to faster ogg vorbis library
-Robin Watts' libTremolo is used for ogg vorbis (tremor) replay. Info patch
-by Lostech.
-
-- New right click through double tap inhibiting option
-Check out the 'no_doubletap_rightclick' option if double-tapping as a right
-click input method annoys you. Patch by spookypeanut.
-
-
-0.11.0:
-- Redesigned 'Free Look' action (Pocket PCs)
-In order to accommodate for the requirements of the lure engine, the
-usage characteristics of the 'Free Look' action have been improved. The
-new behavior is available for use in all engines, but is is *strongly*
-recommended for at least when playing 'Lure of the Temptress'. By using
-the new scheme, when in 'Free Look' mode, it is now possible to enter
-left clicks by clicking a second time near the current location of the
-mouse pointer. Left and Right clicks at the current point location
-are also available by using the respective actions' bound key.
-
-- Reduced optimization build
-The ScummVM executable has grown quite large, prohibiting some devices
-from running memory demanding games (or any games at all). Code
-optimization level has been reduced to offset the growth of the executable.
-Games run slightly slower. This will be addressed before next release.
-
-- Several bugfixes
-
-
-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 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
-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 and
-Pocket PCs below for the new default key bindings.
diff --git a/backends/platform/wince/images/Action.bmp b/backends/platform/wince/images/Action.bmp
deleted file mode 100644
index 4985512cf4..0000000000
--- a/backends/platform/wince/images/Action.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/DiskwFolder.bmp b/backends/platform/wince/images/DiskwFolder.bmp
deleted file mode 100644
index 82b4019930..0000000000
--- a/backends/platform/wince/images/DiskwFolder.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/MonkeyLandscape.bmp b/backends/platform/wince/images/MonkeyLandscape.bmp
deleted file mode 100644
index 70f6ed69e7..0000000000
--- a/backends/platform/wince/images/MonkeyLandscape.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/MonkeyPortrait.bmp b/backends/platform/wince/images/MonkeyPortrait.bmp
deleted file mode 100644
index 00619c2985..0000000000
--- a/backends/platform/wince/images/MonkeyPortrait.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/SoundOff.bmp b/backends/platform/wince/images/SoundOff.bmp
deleted file mode 100644
index 2f7b26deaf..0000000000
--- a/backends/platform/wince/images/SoundOff.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/SoundOn.bmp b/backends/platform/wince/images/SoundOn.bmp
deleted file mode 100644
index 2988b87224..0000000000
--- a/backends/platform/wince/images/SoundOn.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/bindkeys.bmp b/backends/platform/wince/images/bindkeys.bmp
deleted file mode 100644
index 8a6cfc9347..0000000000
--- a/backends/platform/wince/images/bindkeys.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/keyboard.bmp b/backends/platform/wince/images/keyboard.bmp
deleted file mode 100644
index 14217e1eac..0000000000
--- a/backends/platform/wince/images/keyboard.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/panelbig.bmp b/backends/platform/wince/images/panelbig.bmp
deleted file mode 100644
index 8cf12178a7..0000000000
--- a/backends/platform/wince/images/panelbig.bmp
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/images/scumm_icon.ico b/backends/platform/wince/images/scumm_icon.ico
deleted file mode 100644
index 24daa4da7d..0000000000
--- a/backends/platform/wince/images/scumm_icon.ico
+++ /dev/null
Binary files differ
diff --git a/backends/platform/wince/missing/errno.h b/backends/platform/wince/missing/errno.h
deleted file mode 100644
index 1d13c5d7d8..0000000000
--- a/backends/platform/wince/missing/errno.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Header is not present in Windows CE SDK */
-
-extern int errno;
-#define EINTR 4
diff --git a/backends/platform/wince/missing/fopen.h b/backends/platform/wince/missing/fopen.h
deleted file mode 100644
index b4f7d03129..0000000000
--- a/backends/platform/wince/missing/fopen.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Header is not present in Windows CE SDK */
-
-extern "C" {
-/* This stuff will live here until port configuration file is in place */
-#ifndef _FILE_DEFINED
-typedef void FILE;
-#define _FILE_DEFINED
-#endif
-FILE *wce_fopen(const char *fname, const char *fmode);
-#define fopen wce_fopen
-}
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
deleted file mode 100644
index ab193a198b..0000000000
--- a/backends/platform/wince/missing/missing.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-/* Original code:
- * Implementation for standard and semi-standard C library calls missing in WinCE
- * environment.
- * by Vasyl Tsvirkunov
- */
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include <windows.h>
-#include <tchar.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "common/debug.h"
-
-#ifdef __GNUC__
-#define EXT_C extern "C"
-#else
-#define EXT_C
-#endif
-
-// common missing functions required by both gcc and evc
-
-#ifndef USE_ZLIB
-int errno = 0;
-#endif
-
-void *bsearch(const void *key, const void *base, size_t nmemb,
- size_t size, int (*compar)(const void *, const void *)) {
- // Perform binary search
- size_t lo = 0;
- size_t hi = nmemb;
- while (lo < hi) {
- size_t mid = (lo + hi) / 2;
- const void *p = ((const char *)base) + mid * size;
- int tmp = (*compar)(key, p);
- if (tmp < 0)
- hi = mid;
- else if (tmp > 0)
- lo = mid + 1;
- else
- return const_cast<void *>(p);
- }
-
- return NULL;
-}
-
-static char cwd[MAX_PATH + 1] = "";
-
-EXT_C char *wce_getcwd(char *buffer, int maxlen) {
- TCHAR fileUnc[MAX_PATH + 1];
- char *plast;
-
- if (cwd[0] == 0) {
- GetModuleFileName(NULL, fileUnc, MAX_PATH);
- WideCharToMultiByte(CP_ACP, 0, fileUnc, -1, cwd, MAX_PATH, NULL, NULL);
- plast = strrchr(cwd, '\\');
- if (plast)
- *plast = 0;
- /* Special trick to keep start menu clean... */
- if (_stricmp(cwd, "\\windows\\start menu") == 0)
- strcpy(cwd, "\\Apps");
- }
- if (buffer)
- strncpy(buffer, cwd, maxlen);
- return cwd;
-}
-
-#ifdef __GNUC__
-#undef GetCurrentDirectory
-#endif
-EXT_C void GetCurrentDirectory(int len, char *buf) {
- wce_getcwd(buf, len);
-}
-
-/*
-Windows CE fopen has non-standard behavior -- not
-fully qualified paths refer to root folder rather
-than current folder (concept not implemented in CE).
-*/
-#undef fopen
-EXT_C FILE *wce_fopen(const char *fname, const char *fmode) {
- char fullname[MAX_PATH + 1];
-
- if (!fname || fname[0] == '\0')
- return NULL;
- if (fname[0] != '\\' && fname[0] != '/') {
- wce_getcwd(fullname, MAX_PATH);
- strcat(fullname, "\\");
- strcat(fullname, fname);
- return fopen(fullname, fmode);
- } else
- return fopen(fname, fmode);
-}
-
-/* Remove file by name */
-int remove(const char *path) {
- TCHAR pathUnc[MAX_PATH + 1];
- MultiByteToWideChar(CP_ACP, 0, path, -1, pathUnc, MAX_PATH);
- return !DeleteFile(pathUnc);
-}
-
-
-/* check out file access permissions */
-int _access(const char *path, int mode) {
- TCHAR fname[MAX_PATH];
- char fullname[MAX_PATH + 1];
-
- if (path[0] != '\\' && path[0] != '/') {
- wce_getcwd(fullname, MAX_PATH);
- strcat(fullname, "\\");
- strcat(fullname, path);
- MultiByteToWideChar(CP_ACP, 0, fullname, -1, fname, sizeof(fname) / sizeof(TCHAR));
- } else
- MultiByteToWideChar(CP_ACP, 0, path, -1, fname, sizeof(fname) / sizeof(TCHAR));
-
- WIN32_FIND_DATA ffd;
- HANDLE h = FindFirstFile(fname, &ffd);
- FindClose(h);
-
- if (h == INVALID_HANDLE_VALUE) {
- // WORKAROUND: WinCE 3.0 doesn't find paths ending in '\'
- if (path[strlen(path) - 1] == '\\') {
- char p2[MAX_PATH];
- strncpy(p2, path, strlen(path) - 1);
- p2[strlen(path) - 1] = '\0';
- return _access(p2, mode);
- } else
- return -1; //Can't find file
- }
-
- if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- // WORKAROUND: WinCE (or the emulator) sometimes returns bogus directory
- // hits for files that don't exist. TRIPLE checking for the same fname
- // seems to weed out those false positives.
- // Exhibited in kyra engine.
- h = FindFirstFile(fname, &ffd);
- FindClose(h);
- if (h == INVALID_HANDLE_VALUE)
- return -1; //Can't find file
- h = FindFirstFile(fname, &ffd);
- FindClose(h);
- if (h == INVALID_HANDLE_VALUE)
- return -1; //Can't find file
-
- return 0; //Always return success if target is directory and exists
- }
- switch (mode) {
- case 00: //Check existence
- return 0;
- case 06: //Check Read & Write permission
- case 02: //Check Write permission
- return ffd.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? -1 : 0;
- case 04: //Check Read permission
- return 0; //Assume always have read permission
- }
- //Bad mode value supplied, return failure
- return -1;
-}
-
-// gcc build only functions follow
-#if defined(__GNUC__)
-
-#ifndef __MINGW32CE__
-int islower(int c) {
- return (c >= 'a' && c <= 'z');
-}
-
-int isspace(int c) {
- return (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v');
-}
-
-int isalpha(int c) {
- return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
-}
-
-int isalnum(int c) {
- return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'));
-}
-
-int isprint(int c) {
- //static const char punct[] = "!\"#%&'();<=>?[\\]*+,-./:^_{|}~";
- //return (isalnum(c) || strchr(punct, c));
- return (32 <= c && c <= 126); // based on BSD manpage
-}
-#endif
-
-#endif
diff --git a/backends/platform/wince/missing/time.h b/backends/platform/wince/missing/time.h
deleted file mode 100644
index 156d2f6a36..0000000000
--- a/backends/platform/wince/missing/time.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Header is not present in Windows CE SDK */
-
-#ifndef A800_TIME_H
-#define A800_TIME_H
-
-#include <stdlib.h>
-
-#ifdef __MINGW32CE__
-#include_next <time.h>
-#else
-struct tm {
- short tm_year;
- short tm_mon;
- short tm_mday;
- short tm_wday;
- short tm_hour;
- short tm_min;
- short tm_sec;
-};
-
-#ifdef __GNUC__
-#define EXT_C extern "C"
-#else
-#define EXT_C
-#endif
-
-EXT_C time_t time(time_t *dummy);
-EXT_C struct tm *localtime(time_t *dummy);
-
-unsigned int clock();
-
-#endif
-#endif
diff --git a/backends/platform/wince/module.mk b/backends/platform/wince/module.mk
deleted file mode 100644
index ddad024084..0000000000
--- a/backends/platform/wince/module.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-MODULE := backends/platform/wince
-
-MODULE_OBJS := \
- CEActionsPocket.o \
- CEDevice.o \
- CEScaler.o \
- CEActionsSmartphone.o \
- CELauncherDialog.o \
- wince-sdl.o \
- CEgui/GUIElement.o \
- CEgui/Panel.o \
- CEgui/SDL_ImageResource.o \
- CEgui/ItemAction.o \
- CEgui/PanelItem.o \
- CEgui/Toolbar.o \
- CEgui/ItemSwitch.o \
- CEgui/PanelKeyboard.o \
- CEgui/ToolbarHandler.o \
- CEkeys/EventsBuffer.o \
- ../../../gui/Actions.o \
- ../../../gui/Key.o \
- ../../../gui/KeysDialog.o \
- missing/missing.o \
- smartLandScale.o
-
-ifndef DYNAMIC_MODULES
-MODULE_OBJS += PocketSCUMM.o
-endif
-
-# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
-MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
-OBJS := $(MODULE_OBJS) $(OBJS)
-MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
-
-# HACK: The wince backend is based on the SDL one, so we load that, too.
-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h
deleted file mode 100644
index 5c24b4b510..0000000000
--- a/backends/platform/wince/portdefs.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WINCE_PORTDEFS_H
-#define WINCE_PORTDEFS_H
-
-#ifndef _WIN32_WCE
-#error For use on WinCE only
-#endif
-
-// Missing string/stdlib/assert declarations for WinCE 2.xx
-#if _WIN32_WCE < 300
-
- #define GUI_ENABLE_KEYSDIALOG
-
- void *calloc(size_t n, size_t s);
- int isalnum(int c);
- int isdigit(int c);
- int isprint(int c);
- int isspace(int c);
- char *strrchr(const char *s, int c);
- void assert(void *expression);
- void assert(int expression);
- long int strtol(const char *nptr, char **endptr, int base);
- char *strpbrk(const char *s, const char *accept);
-
-#endif
-
-
-#ifndef __GNUC__
- void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *));
- typedef int ptrdiff_t;
- void GetCurrentDirectory(int len, char *buf);
- #define INVALID_FILE_ATTRIBUTES 0xffffffff
-#else
- #include <math.h>
- #undef GetCurrentDirectory
- extern "C" void GetCurrentDirectory(int len, char *buf);
- #define snprintf _snprintf
- #define fopen wce_fopen
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <io.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <ctype.h>
-//#include <direct.h>
-#include <new>
-
-#ifdef __MINGW32CE__
- void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *));
-#endif
-int remove(const char *path);
-int _access(const char *path, int mode);
-extern "C" {
- char *wce_getcwd(char *buf, int size);
-}
-
-void drawError(char *);
-
-#define vsnprintf _vsnprintf
-
-
-#endif
diff --git a/backends/platform/wince/resource.h b/backends/platform/wince/resource.h
deleted file mode 100644
index 73e57ae46d..0000000000
--- a/backends/platform/wince/resource.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#define IDI_POCKETSCUMM 101
-#define IMAGE_PANEL 109
-#define PANEL_GENERIC 109
-#define PANEL_KEYBOARD 110
-#define ITEM_SKIP 114
-#define ITEM_OPTIONS 115
-#define ITEM_SOUND_ON 118
-#define ITEM_SOUND_OFF 119
-#define ITEM_VIEW_PORTRAIT 120
-#define ITEM_VIEW_LANDSCAPE 122
-#define ITEM_BINDKEYS 125
diff --git a/backends/platform/wince/smartLandScale.s b/backends/platform/wince/smartLandScale.s
deleted file mode 100644
index f8771bc524..0000000000
--- a/backends/platform/wince/smartLandScale.s
+++ /dev/null
@@ -1,187 +0,0 @@
-@ ScummVM - Graphic Adventure Engine
-@
-@ ScummVM is the legal property of its developers, whose names
-@ are too numerous to list here. Please refer to the COPYRIGHT
-@ file distributed with this source distribution.
-@
-@ This program is free software; you can redistribute it and/or
-@ modify it under the terms of the GNU General Public License
-@ as published by the Free Software Foundation; either version 2
-@ of the License, or (at your option) any later version.
-@
-@ This program is distributed in the hope that it will be useful,
-@ but WITHOUT ANY WARRANTY; without even the implied warranty of
-@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-@ GNU General Public License for more details.
-@
-@ You should have received a copy of the GNU General Public License
-@ along with this program; if not, write to the Free Software
-@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-@
-@ @author Robin Watts (robin@wss.co.uk)
-
- @ For 16 source pixels 0123456789ABCDEF, we want to produce 11 output
- @ pixels.
-
- @0000000000011111111111222222222223333333333344444444444555555555
- @<------||------><------||------><------||------><------||------>
-
- @5566666666666777777777778888888888899999999999AAAAAAAAAAABBBBBBB
- @<------||------><------||------><------||------><------||------>
-
- @BBBBCCCCCCCCCCCDDDDDDDDDDDEEEEEEEEEEEFFFFFFFFFFF
- @<------||------><------||------><------||------>
-
- @ So, use the following weights (approximately right)
-
- @ d0 = (3*s0 + 1*s1)>>2 Every source pixel constitutes
- @ d1 = (2*s1 + 2*s2)>>2 3/4 of a destination pixel,
- @ d2 = (1*s2 + 3*s3)>>2 except for s4,s5,sA and sB which
- @ d3 = (2*s4 + 2*s5)>>2 constitute 1/2 each.
- @ d4 = (3*s6 + 1*s7)>>2
- @ d5 = (2*s7 + 2*s8)>>2
- @ d6 = (1*s8 + 3*s9)>>2
- @ d7 = (2*sA + 2*sB)>>2
- @ d8 = (3*sC + 1*sD)>>2
- @ d9 = (2*sD + 2*sE)>>2
- @ dA = (1*sE + 3*sF)>>2
-
- .text
-
- .global SmartphoneLandscapeARM
-
- @ scales a width x height block of 16bpp pixels from srcPtr to dstPtr,
- @ scaling each scanline down by 11/16ths. Every 8th scanline is dropped
- @ srcPitch and dstPitch identify how to reach subsequent lines.
- @ mask allows for one routine to do both 565 and 565 formats.
-
-SmartphoneLandscapeARM:
- @ r0 = srcPtr
- @ r1 = srcSpan
- @ r2 = dstPtr
- @ r3 = dstSpan
- @ <> = width
- @ <> = height
- @ <> = mask
- MOV r12,r13
- STMFD r13!,{r4-r11,r14}
- LDMFD r12,{r4,r5,r11} @ r4 = width
- @ r5 = height
- @ r11= mask
- MOV r7, #7 @ r7 = line
- SUB r8, r1, r4, LSL #1 @ r8 = srcSpan - width*2
-y_loop:
- MOV r6, r4 @ r6 = i
- MOV r9, r2 @ r9 = dstPtr
-x_loop:
- LDRH r14,[r0],#2 @ r14 = s0
- LDRH r12,[r0],#2 @ r12 = s1
- LDRH r10,[r0],#2 @ r10 = s2
- ORR r14,r14,r14,LSL #16 @ r14 = s0s0
- ORR r12,r12,r12,LSL #16 @ r12 = s1s1
- AND r14,r14,r11 @ r14 = s0 as g_b_r
- AND r12,r12,r11 @ r12 = s1 as g_b_r
- ADD r14,r14,r14,LSL #1 @ r14 = s0*3 as g_b_r
- ORR r10,r10,r10,LSL #16 @ r10 = s2s2
- ADD r14,r14,r12 @ r14 = (s0*3 + s1) as g_b_r
- AND r10,r10,r11 @ r10 = s2 as g_b_r
- AND r14,r11,r14,LSR #2 @ r14 = d0 as g_b_r
- ORR r14,r14,r14,LSR #16 @ r14 = d0
- STRH r14,[r9],#2 @ store d0
- ADD r12,r12,r10 @ r12 = (s1 + s2) as g_b_r
- LDRH r14,[r0],#2 @ r14 = s3
- AND r12,r11,r12,LSR #1 @ r12 = d1 as g_b_r
- ORR r12,r12,r12,LSR #16 @ r12 = d1
- STRH r12,[r9],#2 @ store d1
- ORR r14,r14,r14,LSL #16 @ r14 = s3s3
- AND r14,r14,r11 @ r14 = s3 as g_b_r
- ADD r10,r10,r14 @ r10 = (s2 + s3) as g_b_r
- ADD r10,r10,r14,LSL #1 @ r10 = (s2 + s3*3) as g_b_r
- LDRH r14,[r0],#2 @ r14 = s4
- LDRH r12,[r0],#2 @ r12 = s5
- AND r10,r11,r10,LSR #2 @ r10 = d2 as g_b_r
- ORR r10,r10,r10,LSR #16 @ r10 = d2
- STRH r10,[r9],#2 @ store d2
- ORR r14,r14,r14,LSL #16 @ r14 = s4s4
- ORR r12,r12,r12,LSL #16 @ r12 = s5s5
- AND r14,r14,r11 @ r14 = s4 as g_b_r
- AND r12,r12,r11 @ r12 = s5 as g_b_r
- ADD r14,r14,r12 @ r14 = (s4 + s5) as g_b_r
- LDRH r12,[r0],#2 @ r12 = s6
- LDRH r10,[r0],#2 @ r10 = s7
- AND r14,r11,r14,LSR #1 @ r14 = d3 as g_b_r
- ORR r14,r14,r14,LSR #16 @ r14 = d3
- STRH r14,[r9],#2 @ store d3
- ORR r12,r12,r12,LSL #16 @ r12 = s6s6
- ORR r10,r10,r10,LSL #16 @ r10 = s7s7
- LDRH r14,[r0],#2 @ r14 = s8
- AND r12,r12,r11 @ r12 = s6 as g_b_r
- AND r10,r10,r11 @ r10 = s7 as g_b_r
- ORR r14,r14,r14,LSL #16 @ r14 = s8s8
- ADD r12,r12,r12,LSL #1 @ r12 = 3*s6 as g_b_r
- AND r14,r14,r11 @ r14 = s8 as g_b_r
- ADD r12,r12,r10 @ r12 = (3*s6+s7) as g_b_r
- AND r12,r11,r12,LSR #2 @ r12 = d4 as g_b_r
- ORR r12,r12,r12,LSR #16 @ r12 = d4
- STRH r12,[r9],#2 @ store d4
- ADD r10,r10,r14 @ r10 = (s7+s8) as g_b_r
- AND r10,r11,r10,LSR #1 @ r10 = d5 as g_b_r
- LDRH r12,[r0],#2 @ r12 = s9
- ORR r10,r10,r10,LSR #16 @ r10 = d5
- STRH r10,[r9],#2 @ store d5
- ORR r12,r12,r12,LSL #16 @ r12 = s9s9
- AND r12,r12,r11 @ r12 = s9 as g_b_r
- ADD r12,r12,r12,LSL #1 @ r12 = s9*3 as g_b_r
- ADD r12,r12,r14 @ r12 = (s8+s9*3) as g_b_r
- AND r12,r11,r12,LSR #2 @ r12 = d6 as g_b_r
- LDRH r14,[r0],#2 @ r14 = sA
- LDRH r10,[r0],#2 @ r10 = sB
- ORR r12,r12,r12,LSR #16 @ r12 = d6
- STRH r12,[r9],#2 @ store d6
- ORR r14,r14,r14,LSL #16 @ r14 = sAsA
- ORR r10,r10,r10,LSL #16 @ r10 = sBsB
- LDRH r12,[r0],#2 @ r12 = sC
- AND r14,r14,r11 @ r14 = sA as g_b_r
- AND r10,r10,r11 @ r10 = sB as g_b_r
- ORR r12,r12,r12,LSL #16 @ r12 = sCsC
- ADD r14,r14,r10 @ r14 = (sA + sB) as g_b_r
- LDRH r10,[r0],#2 @ r10 = sD
- AND r14,r11,r14,LSR #1 @ r14 = d7 as g_b_r
- AND r12,r12,r11 @ r12 = sC as g_b_r
- ORR r14,r14,r14,LSR #16 @ r14 = d7
- ORR r10,r10,r10,LSL #16 @ r10 = sDsD
- STRH r14,[r9],#2 @ store d7
- AND r10,r10,r11 @ r10 = sD as g_b_r
- ADD r12,r12,r12,LSL #1 @ r12 = 3*sC as g_b_r
- LDRH r14,[r0],#2 @ r14 = sE
- ADD r12,r12,r10 @ r12 = (3*sC+sD) as g_b_r
- AND r12,r11,r12,LSR #2 @ r12 = d8 as g_b_r
- ORR r14,r14,r14,LSL #16 @ r14 = sEsE
- ORR r12,r12,r12,LSR #16 @ r12 = d8
- AND r14,r14,r11 @ r14 = sE as g_b_r
- STRH r12,[r9],#2 @ store d8
- ADD r10,r10,r14 @ r10 = (sD+sE) as g_b_r
- LDRH r12,[r0],#2 @ r12 = sF
- AND r10,r11,r10,LSR #1 @ r10 = d9 as g_b_r
- ORR r10,r10,r10,LSR #16 @ r10 = d9
- STRH r10,[r9],#2 @ store d9
- ORR r12,r12,r12,LSL #16 @ r12 = sFsF
- AND r12,r12,r11 @ r12 = sF as g_b_r
- ADD r12,r12,r12,LSL #1 @ r12 = 3*sF as g_b_r
- ADD r12,r12,r14 @ r12 = (sE+3*sF) as g_b_r
- AND r12,r11,r12,LSR #2 @ r12 = dA as g_b_r
- ORR r12,r12,r12,LSR #16 @ r12 = dA
- SUBS r6,r6,#16 @ width -= 16
- STRH r12,[r9],#2 @ store dA
- BGT x_loop
-
- ADD r0, r0, r8 @ srcPtr += srcSpan
- ADD r2, r2, r3 @ dstPtr += dstSpan
- SUBS r7, r7, #1
- ADDEQ r0, r0, r1
- MOVEQ r7, #7
- SUBEQ r5, r5, #1
- SUBS r5, r5, #1
- BGT y_loop
-
- LDMFD r13!,{r4-r11,PC}
diff --git a/backends/platform/wince/stub.cpp b/backends/platform/wince/stub.cpp
deleted file mode 100644
index aba3fb973e..0000000000
--- a/backends/platform/wince/stub.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include <windows.h>
-
-extern int dynamic_modules_main(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR szCmdLine, int sw);
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR szCmdLine, int sw) {
-
- /* Hello!
- * This thing looks trivial, right? Guess again :-)
- * Observe:
- * 1) Because of the way plugins are done within the scummvm core
- * (read: slightly dirty) it is required that the plugins
- * (built as dlls in win32 systems) have to "backlink" into the
- * main executable. More specifically, the dlls have to call
- * functions from the (separately built) main module.
- * This means trouble for wince, as the dynamic linker does not
- * resolve imported symbols to a dll from an executable.
- * 2) But wait! DLLs can have any way of importing/exporting symbols
- * between them. Hmmm...
- *
- * Right! The solution is thus: We build everything as a dll. This means
- * the individual engines (plugins) and also the scummvm core application.
- * It is in fact "The sub-DLL solution" described over at edll
- * (ref. http://edll.sourceforge.net/).
- *
- * The last thing to watch out for is that in a plugin build, we already
- * supply a WinMain function (this one, right here) which supersedes
- * SDL's one. So we need to do the startup things SDL does in scummvm
- * before running SDL_main.
- *
- * All this leaves us, for this source file, to do this crummy little... */
-
- dynamic_modules_main(hInst, hPrev, szCmdLine, sw);
-}
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
deleted file mode 100644
index cb26071c97..0000000000
--- a/backends/platform/wince/wince-sdl.cpp
+++ /dev/null
@@ -1,716 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include <windows.h>
-
-#include "backends/platform/wince/missing/fopen.h"
-#include "backends/platform/wince/wince-sdl.h"
-
-#include "common/config-manager.h"
-#include "common/debug.h"
-#include "common/events.h"
-#include "common/util.h"
-#include "common/textconsole.h"
-#include "common/timer.h"
-#include "common/translation.h"
-
-#include "engines/engine.h"
-
-#include "base/main.h"
-#include "base/plugins.h"
-
-#include "audio/mixer_intern.h"
-#include "audio/fmopl.h"
-
-#include "backends/mutex/sdl/sdl-mutex.h"
-#include "backends/timer/sdl/sdl-timer.h"
-
-#include "gui/Actions.h"
-#include "gui/KeysDialog.h"
-#include "gui/message.h"
-
-#include "backends/platform/wince/CEActionsPocket.h"
-#include "backends/platform/wince/CEActionsSmartphone.h"
-#include "backends/platform/wince/CEgui/ItemAction.h"
-
-#include "graphics/scaler/downscaler.h"
-#include "graphics/scaler/aspect.h"
-
-#include "backends/platform/wince/CEException.h"
-#include "backends/platform/wince/CEScaler.h"
-
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-#include "backends/events/wincesdl/wincesdl-events.h"
-#include "backends/mixer/wincesdl/wincesdl-mixer.h"
-
-#ifdef DYNAMIC_MODULES
-#include <malloc.h>
-#include "backends/plugins/win32/win32-provider.h"
-#endif
-
-#ifdef __GNUC__
-extern "C" _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *);
-#endif
-
-#ifdef WRAP_MALLOC
-
-extern "C" void *__real_malloc(size_t size);
-extern "C" void __real_free(void *ptr);
-
-extern "C" void *__wrap_malloc(size_t size) {
-/*
- void *ptr = __real_malloc(size);
- printf("malloc(%d) = %p\n", size, ptr);
- return ptr;
-*/
- if (size < 64 * 1024) {
- void *ptr = __real_malloc(size+4);
-// printf("malloc(%d) = %p\n", size, ptr);
- if (ptr != NULL) {
- *((HANDLE *)ptr) = 0;
- return 4+(char *)ptr;
- }
- return NULL;
- }
- HANDLE H = CreateFileMapping((HANDLE)INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size+4, 0);
- void *ptr = MapViewOfFile(H, FILE_MAP_ALL_ACCESS, 0, 0, 0);
- *((HANDLE *)ptr) = H;
- return 4+(char *)ptr;
-}
-
-extern "C" void __wrap_free(void *ptr) {
-/*
- __real_free(ptr);
- printf("free(%p)\n", ptr);
-*/
- if (ptr != NULL) {
- HANDLE H = *(HANDLE *)((char *)ptr-4);
- if (H == 0) {
- __real_free((char *)ptr-4);
- return;
- }
- UnmapViewOfFile((char *)ptr-4);
- CloseHandle(H);
- }
-}
-
-#endif
-
-using namespace CEGUI;
-
-// ********************************************************************************************
-
-// stdin/err redirection
-#define STDOUT_FNAME "\\scummvm_stdout.txt"
-#define STDERR_FNAME "\\scummvm_stderr.txt"
-static FILE *stdout_file = NULL, *stderr_file = NULL;
-static char stdout_fname[MAX_PATH], stderr_fname[MAX_PATH];
-
-// Static member inits
-typedef void (*SoundProc)(void *param, byte *buf, int len);
-bool OSystem_WINCE3::_soundMaster = true;
-
-bool _isSmartphone = false;
-bool _hasSmartphoneResolution = false;
-
-#define DEFAULT_CONFIG_FILE "scummvm.ini"
-
-// ********************************************************************************************
-
-bool isSmartphone() {
- //return _isSmartphone;
- return _hasSmartphoneResolution;
-}
-
-const TCHAR *ASCIItoUnicode(const char *str) {
- static TCHAR ustr[MAX_PATH]; // size good enough
-
- MultiByteToWideChar(CP_ACP, 0, str, strlen(str) + 1, ustr, sizeof(ustr) / sizeof(TCHAR));
- return ustr;
-}
-
-// MAIN
-#ifndef __GNUC__
-int handleException(EXCEPTION_POINTERS *exceptionPointers) {
- CEException::writeException(TEXT("\\scummvmCrash"), exceptionPointers);
- drawError("Unrecoverable exception occurred - see crash dump in latest \\scummvmCrash file");
- fclose(stdout_file);
- fclose(stderr_file);
- CEDevice::end();
- SDL_Quit();
- exit(0);
- return EXCEPTION_EXECUTE_HANDLER;
-}
-#endif
-
-int SDL_main(int argc, char **argv) {
- FILE *newfp = NULL;
-#ifdef __GNUC__
- // Due to incomplete crt0.o implementation, we go through the constructor function
- // list provided by the linker and init all of them
- // thanks to joostp and DJWillis
- extern void (*__CTOR_LIST__)();
- void (**constructor)() = &__CTOR_LIST__;
- constructor++; // First item in list of constructors has special meaning (platform dependent), ignore it.
- while (*constructor) {
- (*constructor)();
- constructor++;
- }
-#endif
-
- CEDevice::init();
-
- /* Redirect standard input and standard output */
- strcpy(stdout_fname, wce_getcwd(NULL, MAX_PATH));
- strcpy(stderr_fname, wce_getcwd(NULL, MAX_PATH));
- strcat(stdout_fname, STDOUT_FNAME);
- strcat(stderr_fname, STDERR_FNAME);
-#ifndef __GNUC__
- stdout_file = fopen(stdout_fname, "w");
- stderr_file = fopen(stderr_fname, "w");
-#else
- stdout_file = newfp = _wfreopen(ASCIItoUnicode(stdout_fname), TEXT("w"), stdout);
- if (newfp == NULL) {
-#if !defined(stdout)
- stdout = fopen(stdout_fname, "w");
- stdout_file = stdout;
-#else
- newfp = fopen(stdout_fname, "w");
- if (newfp) {
- //*stdout = *newfp;
- stdout_file = stdout;
- }
-#endif
- }
- stderr_file = newfp = _wfreopen(ASCIItoUnicode(stderr_fname), TEXT("w"), stderr);
- if (newfp == NULL) {
-#if !defined(stderr)
- stderr = fopen(stderr_fname, "w");
- stderr_file = stderr;
-#else
- newfp = fopen(stderr_fname, "w");
- if (newfp) {
- //*stderr = *newfp;
- stderr_file = stderr;
- }
-#endif
- }
-#endif
-
-#ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new Win32PluginProvider());
-#endif
-
-
- int res = 0;
-#if !defined(DEBUG) && !defined(__GNUC__)
- __try {
-#endif
- g_system = new OSystem_WINCE3();
- assert(g_system);
-
- // Pre initialize the backend
- ((OSystem_WINCE3 *)g_system)->init();
-
- // Invoke the actual ScummVM main entry point:
- res = scummvm_main(argc, argv);
-
- // Free OSystem
- g_system->destroy();
-#if !defined(DEBUG) && !defined(__GNUC__)
- }
- __except(handleException(GetExceptionInformation())) {
- }
-#endif
-
- return res;
-}
-
-#ifdef DYNAMIC_MODULES
-
-/* This is the OS startup code in the case of a plugin-enabled build.
- * It contains copied and slightly modified parts of SDL's win32/ce startup functions.
- * We copy these here because the calling stub already has a WinMain procedure
- * which overrides SDL's one and hence we essentially re-implement the startup procedure.
- * Note also that this has to be here and not in the stub because SDL is statically
- * linked in the scummvm.dll archive.
- * Take a look at the comments in stub.cpp as well.
- */
-
-int console_main(int argc, char *argv[]) {
- int n;
- char *bufp, *appname;
-
- appname = argv[0];
- if ((bufp = strrchr(argv[0], '\\')) != NULL)
- appname = bufp + 1;
- else if ((bufp = strrchr(argv[0], '/')) != NULL)
- appname = bufp + 1;
-
- if ((bufp = strrchr(appname, '.')) == NULL)
- n = strlen(appname);
- else
- n = (bufp - appname);
-
- bufp = (char *) alloca(n + 1);
- strncpy(bufp, appname, n);
- bufp[n] = '\0';
- appname = bufp;
-
- if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) {
- error("WinMain() error: %s", SDL_GetError());
- return(FALSE);
- }
-
- SDL_SetModuleHandle(GetModuleHandle(NULL));
-
- // Run the application main() code
- SDL_main(argc, argv);
-
- return(0);
-}
-
-static int ParseCommandLine(char *cmdline, char **argv) {
- char *bufp;
- int argc;
-
- argc = 0;
- for (bufp = cmdline; *bufp;) {
- // Skip leading whitespace
- while (isspace(*bufp))
- ++bufp;
-
- // Skip over argument
- if (*bufp == '"') {
- ++bufp;
- if (*bufp) {
- if (argv)
- argv[argc] = bufp;
- ++argc;
- }
- // Skip over word
- while (*bufp && (*bufp != '"'))
- ++bufp;
- } else {
- if (*bufp) {
- if (argv)
- argv[argc] = bufp;
- ++argc;
- }
- // Skip over word
- while (*bufp && ! isspace(*bufp))
- ++bufp;
- }
- if (*bufp) {
- if (argv)
- *bufp = '\0';
- ++bufp;
- }
- }
- if (argv)
- argv[argc] = NULL;
-
- return(argc);
-}
-
-int dynamic_modules_main(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR szCmdLine, int sw) {
- HINSTANCE handle;
- char **argv;
- int argc;
- char *cmdline;
- wchar_t *bufp;
- int nLen;
-
- if (wcsncmp(szCmdLine, TEXT("\\"), 1)) {
- nLen = wcslen(szCmdLine) + 128 + 1;
- bufp = (wchar_t *) alloca(nLen * 2);
- wcscpy(bufp, TEXT("\""));
- GetModuleFileName(NULL, bufp + 1, 128 - 3);
- wcscpy(bufp + wcslen(bufp), TEXT("\" "));
- wcsncpy(bufp + wcslen(bufp), szCmdLine, nLen - wcslen(bufp));
- } else
- bufp = szCmdLine;
-
- nLen = wcslen(bufp) + 1;
- cmdline = (char *) alloca(nLen);
- WideCharToMultiByte(CP_ACP, 0, bufp, -1, cmdline, nLen, NULL, NULL);
-
- // Parse command line into argv and argc
- argc = ParseCommandLine(cmdline, NULL);
- argv = (char **) alloca((argc + 1) * (sizeof * argv));
- ParseCommandLine(cmdline, argv);
-
- // fix gdb-emulator combo
- while (argc > 1 && !strstr(argv[0], ".exe")) {
- OutputDebugString(TEXT("SDL: gdb argv[0] fixup\n"));
- *(argv[1] - 1) = ' ';
- int i;
- for (i = 1; i < argc; i++)
- argv[i] = argv[i + 1];
- argc--;
- }
-
- // Run the main program (after a little SDL initialization)
- return(console_main(argc, argv));
-
-}
-#endif
-
-// ********************************************************************************************
-
-// ********************************************************************************************
-
-void pumpMessages() {
- MSG msg;
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-}
-
-void drawError(char *error) {
- TCHAR errorUnicode[200];
- MultiByteToWideChar(CP_ACP, 0, error, strlen(error) + 1, errorUnicode, sizeof(errorUnicode));
- pumpMessages();
- MessageBox(GetActiveWindow(), errorUnicode, TEXT("ScummVM error"), MB_OK | MB_ICONERROR);
- pumpMessages();
-}
-
-// ********************************************************************************************
-static Uint32 timer_handler_wrapper(Uint32 interval) {
- DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager();
- tm->handler();
- return interval;
-}
-
-void OSystem_WINCE3::initBackend() {
-
- assert(!_inited);
-
- // Create the backend custom managers
- if (_eventSource == 0)
- _eventSource = new WINCESdlEventSource();
-
- if (_mixerManager == 0) {
- _mixerManager = new WINCESdlMixerManager();
-
- // Setup and start mixer
- _mixerManager->init();
- }
-
- if (_graphicsManager == 0)
- _graphicsManager = new WINCESdlGraphicsManager(_eventSource, _window);
-
- ((WINCESdlEventSource *)_eventSource)->init(dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager));
-
- // Call parent implementation of this method
- OSystem_SDL::initBackend();
-
- // Initialize global key mapping
- GUI::Actions::init();
- GUI_Actions::Instance()->initInstanceMain(this);
- if (!GUI_Actions::Instance()->loadMapping()) { // error during loading means not present/wrong version
- warning("Setting default action mappings");
- GUI_Actions::Instance()->saveMapping(); // write defaults
- }
-
- _inited = true;
-}
-
-int OSystem_WINCE3::getScreenWidth() {
- return _platformScreenWidth;
-}
-
-void OSystem_WINCE3::initScreenInfos() {
- // sdl port ensures that we use correctly full screen
- _isOzone = 0;
- SDL_Rect **r;
- r = SDL_ListModes(NULL, 0);
- _platformScreenWidth = r[0]->w;
- _platformScreenHeight = r[0]->h;
-}
-
-int OSystem_WINCE3::getScreenHeight() {
- return _platformScreenHeight;
-}
-
-bool OSystem_WINCE3::isOzone() {
- return _isOzone;
-}
-
-Common::String OSystem_WINCE3::getDefaultConfigFileName() {
- char configFile[MAXPATHLEN];
- strcpy(configFile, wce_getcwd(NULL, MAX_PATH));
- strcat(configFile, "\\");
- strcat(configFile, DEFAULT_CONFIG_FILE);
- return configFile;
-}
-
-// ********************************************************************************************
-
-
-OSystem_WINCE3::OSystem_WINCE3() : OSystem_SDL(),
- _forcePanelInvisible(false) {
- // Initialze File System Factory
- _fsFactory = new WindowsFilesystemFactory();
- _mixer = 0;
-}
-
-OSystem_WINCE3::~OSystem_WINCE3() {
- delete _mixer;
-}
-
-void OSystem_WINCE3::swap_sound_master() {
- _soundMaster = !_soundMaster;
-
- //WINCESdlGraphicsManager _graphicsManager
-
- WINCESdlGraphicsManager *graphicsManager = dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager);
- if (graphicsManager->_toolbarHandler.activeName() == NAME_MAIN_PANEL)
- graphicsManager->_toolbarHandler.forceRedraw(); // redraw sound icon
-}
-
-
-void OSystem_WINCE3::engineInit() {
- check_mappings(); // called here to initialize virtual keys handling
-
- dynamic_cast<WINCESdlGraphicsManager *>(_graphicsManager)->update_game_settings();
- // finalize mixer init
- _mixerManager->init();
-}
-
-void OSystem_WINCE3::check_mappings() {
- CEActionsPocket *instance;
-
- Common::String gameid(ConfMan.get("gameid"));
-
- if (gameid.empty() || GUI_Actions::Instance()->initialized())
- return;
-
- GUI_Actions::Instance()->initInstanceGame();
- instance = (CEActionsPocket *)GUI_Actions::Instance();
-
- // Some games need to map the right click button, signal it here if it wasn't done
- if (instance->needsRightClickMapping()) {
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog(_("Map right click action"));
- while (!instance->getMapping(POCKET_ACTION_RIGHTCLICK)) {
- keysDialog->runModal();
- if (!instance->getMapping(POCKET_ACTION_RIGHTCLICK)) {
- GUI::MessageDialog alert(_("You must map a key to the 'Right Click' action to play this game"));
- alert.runModal();
- }
- }
- delete keysDialog;
- }
-
- // Map the "hide toolbar" action if needed
- if (instance->needsHideToolbarMapping()) {
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog(_("Map hide toolbar action"));
- while (!instance->getMapping(POCKET_ACTION_HIDE)) {
- keysDialog->runModal();
- if (!instance->getMapping(POCKET_ACTION_HIDE)) {
- GUI::MessageDialog alert(_("You must map a key to the 'Hide toolbar' action to play this game"));
- alert.runModal();
- }
- }
- delete keysDialog;
- }
-
- // Map the "zoom" actions if needed
- if (instance->needsZoomMapping()) {
- GUI::KeysDialog *keysDialog = new GUI::KeysDialog(_("Map Zoom Up action (optional)"));
- keysDialog->runModal();
- delete keysDialog;
- keysDialog = new GUI::KeysDialog(_("Map Zoom Down action (optional)"));
- keysDialog->runModal();
- delete keysDialog;
- }
-
- // Extra warning for Zak Mc Kracken
- if (strncmp(gameid.c_str(), "zak", 3) == 0 &&
- !GUI_Actions::Instance()->getMapping(POCKET_ACTION_HIDE)) {
- GUI::MessageDialog alert(_("Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"));
- alert.runModal();
- }
-
-}
-
-void OSystem_WINCE3::setGraphicsModeIntern() {
- // Scalers have been pre-selected for the desired mode.
- // No further tuning required.
-}
-
-void OSystem_WINCE3::initSDL() {
- // Check if SDL has not been initialized
- if (!_initedSDL) {
- uint32 sdlFlags = SDL_INIT_EVENTTHREAD | SDL_INIT_VIDEO;
- if (ConfMan.hasKey("disable_sdl_parachute"))
- sdlFlags |= SDL_INIT_NOPARACHUTE;
-
- if (ConfMan.hasKey("use_GDI") && ConfMan.getBool("use_GDI")) {
- SDL_VideoInit("windib", 0);
- sdlFlags ^= SDL_INIT_VIDEO;
- }
-
- // Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
- if (SDL_Init(sdlFlags) == -1)
- error("Could not initialize SDL: %s", SDL_GetError());
-
- _initedSDL = true;
- }
-}
-
-void OSystem_WINCE3::init() {
- // Create SdlMutexManager instance as the TimerManager relies on the
- // MutexManager being already initialized
- if (_mutexManager == 0)
- _mutexManager = new SdlMutexManager();
-
- // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer).
- // We work around this by using the SetTimer function, since we only use
- // one timer in scummvm (for the time being)
- if (_timerManager == 0) {
- _timerManager = new DefaultTimerManager();
- SDL_SetTimer(10, &timer_handler_wrapper);
- }
-
- // Call parent implementation of this method
- OSystem_SDL::init();
-}
-
-void OSystem_WINCE3::quit() {
- fclose(stdout_file);
- fclose(stderr_file);
- if (gDebugLevel <= 0) {
- DeleteFile(ASCIItoUnicode(stdout_fname));
- DeleteFile(ASCIItoUnicode(stderr_fname));
- }
- CEDevice::end();
- OSystem_SDL::quit();
-}
-
-void OSystem_WINCE3::getTimeAndDate(TimeDate &t) const {
- SYSTEMTIME systime;
-
- GetLocalTime(&systime);
- t.tm_year = systime.wYear - 1900;
- t.tm_mon = systime.wMonth - 1;
- t.tm_mday = systime.wDay;
- t.tm_hour = systime.wHour;
- t.tm_min = systime.wMinute;
- t.tm_sec = systime.wSecond;
- t.tm_wday = systime.wDayOfWeek;
-}
-
-void OSystem_WINCE3::logMessage(LogMessageType::Type type, const char *message) {
- OSystem_SDL::logMessage(type, message);
-
-#if defined( USE_WINDBG )
- TCHAR buf_unicode[1024];
- MultiByteToWideChar(CP_ACP, 0, message, strlen(message) + 1, buf_unicode, sizeof(buf_unicode));
- OutputDebugString(buf_unicode);
-
- if (type == LogMessageType::kError) {
-#ifndef DEBUG
- drawError(message);
-#else
- int cmon_break_into_the_debugger_if_you_please = *(int *)(message + 1); // bus error
- printf("%d", cmon_break_into_the_debugger_if_you_please); // don't optimize the int out
-#endif
- }
-#endif
-}
-
-Common::String OSystem_WINCE3::getSystemLanguage() const {
-#ifdef USE_DETECTLANG
- // We can not use "setlocale" (at least not for MSVC builds), since it
- // will return locales like: "English_USA.1252", thus we need a special
- // way to determine the locale string for Win32.
- char langName[9];
- char ctryName[9];
- TCHAR langNameW[32];
- TCHAR ctryNameW[32];
- int i = 0;
- bool localeFound = false;
- Common::String localeName;
-
- // Really not nice, but the only way to map Windows CE language/country codes to posix NLS names,
- // because Windows CE doesn't support LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME,
- // according to this: http://msdn.microsoft.com/en-us/library/aa912934.aspx
- //
- // See http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx for a translation table
- // This table has to be updated manually when new translations are added
- const char *posixMappingTable[][3] = {
- {"CAT", "ESP", "ca_ES"},
- {"CSY", "CZE", "cs_CZ"},
- {"DAN", "DNK", "da_DK"},
- {"DEU", "DEU", "de_DE"},
- {"ESN", "ESP", "es_ES"},
- {"ESP", "ESP", "es_ES"},
- {"FRA", "FRA", "fr_FR"},
- {"HUN", "HUN", "hu_HU"},
- {"ITA", "ITA", "it_IT"},
- {"NOR", "NOR", "nb_NO"},
- {"NON", "NOR", "nn_NO"},
- {"PLK", "POL", "pl_PL"},
- {"PTB", "BRA", "pt_BR"},
- {"RUS", "RUS", "ru_RU"},
- {"SVE", "SWE", "sv_SE"},
- {"UKR", "UKR", "uk_UA"},
- {NULL, NULL, NULL}
- };
-
- if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, langNameW, sizeof(langNameW)) != 0 &&
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, ctryNameW, sizeof(ctryNameW)) != 0) {
- WideCharToMultiByte(CP_ACP, 0, langNameW, -1, langName, (wcslen(langNameW) + 1), NULL, NULL);
- WideCharToMultiByte(CP_ACP, 0, ctryNameW, -1, ctryName, (wcslen(ctryNameW) + 1), NULL, NULL);
-
- debug(1, "Trying to find posix locale name for %s_%s", langName, ctryName);
- while (posixMappingTable[i][0] && !localeFound) {
- if ( (!strcmp(posixMappingTable[i][0], langName) || !strcmp(posixMappingTable[i][0], "*")) &&
- (!strcmp(posixMappingTable[i][1], ctryName) || !strcmp(posixMappingTable[i][0], "*")) ) {
- localeFound = true;
- localeName = posixMappingTable[i][2];
- }
- i++;
- }
- if (!localeFound) warning("No posix locale name found for %s_%s", langName, ctryName);
- }
-
- if (localeFound) {
- debug(1, "Found posix locale name: %s", localeName.c_str());
- return localeName;
- } else {
- return ModularBackend::getSystemLanguage();
- }
-#else // USE_DETECTLANG
- return ModularBackend::getSystemLanguage();
-#endif // USE_DETECTLANG
-}
-
-int OSystem_WINCE3::_platformScreenWidth;
-int OSystem_WINCE3::_platformScreenHeight;
-bool OSystem_WINCE3::_isOzone;
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
deleted file mode 100644
index 1fbdbde9cb..0000000000
--- a/backends/platform/wince/wince-sdl.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WINCE_SDL_H
-#define WINCE_SDL_H
-
-#include "common/scummsys.h"
-#include "common/system.h"
-#include "graphics/scaler.h"
-#include "backends/platform/sdl/sdl.h"
-
-#include "backends/platform/wince/CEgui/CEGUI.h"
-#include "backends/platform/wince/CEkeys/CEKeys.h"
-#include "backends/platform/wince/CEDevice.h"
-
-#include "backends/graphics/wincesdl/wincesdl-graphics.h"
-#include "backends/events/wincesdl/wincesdl-events.h"
-#include "backends/timer/default/default-timer.h"
-#include "backends/fs/windows/windows-fs-factory.h"
-
-// defines used for implementing the raw frame buffer access method (2003+)
-#define GETRAWFRAMEBUFFER 0x00020001
-#define FORMAT_565 1
-#define FORMAT_555 2
-#define FORMAT_OTHER 3
-
-class OSystem_WINCE3 : public OSystem_SDL {
-public:
- OSystem_WINCE3();
- virtual ~OSystem_WINCE3();
-
- void setGraphicsModeIntern();
- void initBackend();
-
- // Overloaded from SDL backend
- void init();
- void quit();
- virtual void logMessage(LogMessageType::Type type, const char *message);
- virtual Common::String getSystemLanguage() const;
-
- // Overloaded from OSystem
- void engineInit();
- void getTimeAndDate(TimeDate &t) const;
-
- virtual Common::String getDefaultConfigFileName();
-
- void swap_sound_master();
-
- static int getScreenWidth();
- static int getScreenHeight();
- static void initScreenInfos();
- static bool isOzone();
-
- static bool _soundMaster; // turn off sound after all calculations
- // static since needed by the SDL callback
-
-protected:
- void initSDL();
- Audio::MixerImpl *_mixer;
-
-private:
- void check_mappings();
-
- bool _forcePanelInvisible; // force panel visibility for some cases
-
- static int _platformScreenWidth;
- static int _platformScreenHeight;
- static bool _isOzone; // true if running on Windows 2003 SE
-
-};
-
-#endif
diff --git a/backends/platform/wince/wince.mk b/backends/platform/wince/wince.mk
deleted file mode 100644
index 5ccc0a4a44..0000000000
--- a/backends/platform/wince/wince.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-ifdef WRAP_MALLOC
- LDFLAGS += -Wl,--wrap,malloc -Wl,--wrap,free
-endif
-
-ifdef DYNAMIC_MODULES
-plugins: $(EXECUTABLE) backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o
- $(CXX) -nostdlib backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o -L. -lscummvm -o scummvm.exe
-
-backends/platform/wince/stub.o: $(srcdir)/backends/platform/wince/stub.cpp
- $(CXX) -c $(srcdir)/backends/platform/wince/stub.cpp -o backends/platform/wince/stub.o
-endif
diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp
index 5749a2afa2..b112981e89 100644
--- a/backends/plugins/sdl/sdl-provider.cpp
+++ b/backends/plugins/sdl/sdl-provider.cpp
@@ -22,7 +22,7 @@
#include "common/scummsys.h"
-#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) && !defined(_WIN32_WCE)
+#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND)
#include "backends/plugins/sdl/sdl-provider.h"
#include "backends/plugins/dynamic-plugin.h"
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index c97feb4806..85efab4b92 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -95,11 +95,7 @@ Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const {
bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();
-#ifndef _WIN32_WCE
if (!filename.hasSuffix(".dll"))
-#else
- if (!filename.hasSuffix(".plugin"))
-#endif
return false;
return true;
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 17e888175c..adb24e7a39 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -44,9 +44,7 @@
#include "common/config-manager.h"
#include "common/zlib.h"
-#ifndef _WIN32_WCE
#include <errno.h> // for removeSavefile()
-#endif
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
const char *DefaultSaveFileManager::TIMESTAMPS_FILENAME = "timestamps";
@@ -211,13 +209,12 @@ bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) {
// compile because of this, please let us know (scummvm-devel).
// There is a nicely portable workaround, too: Make this method overloadable.
if (remove(fileNode.getPath().c_str()) != 0) {
-#ifndef _WIN32_WCE
if (errno == EACCES)
setError(Common::kWritePermissionDenied, "Search or write permission denied: "+fileNode.getName());
if (errno == ENOENT)
setError(Common::kPathDoesNotExist, "removeSavefile: '"+fileNode.getName()+"' does not exist or path is invalid");
-#endif
+
return false;
} else {
return true;
@@ -240,11 +237,6 @@ Common::String DefaultSaveFileManager::getSavePath() const {
dir = ConfMan.get("savepath");
}
-#ifdef _WIN32_WCE
- if (dir.empty())
- dir = ConfMan.get("path");
-#endif
-
return dir;
}
diff --git a/backends/saves/windows/windows-saves.cpp b/backends/saves/windows/windows-saves.cpp
index 50564e974d..b206fa5e99 100644
--- a/backends/saves/windows/windows-saves.cpp
+++ b/backends/saves/windows/windows-saves.cpp
@@ -20,7 +20,7 @@
*
*/
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
+#if defined(WIN32) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index a0058e166a..c8ceea77af 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -82,7 +82,7 @@ static const char HELP_STRING[] =
" --auto-detect Display a list of games from current or specified directory\n"
" and start the first one. Use --path=PATH to specify a directory.\n"
" --recursive In combination with --add or --detect recurse down all subdirectories\n"
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if defined(WIN32) && !defined(__SYMBIAN32__)
" --console Enable the console window (default:enabled)\n"
#endif
"\n"
@@ -738,7 +738,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
#endif
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if defined(WIN32) && !defined(__SYMBIAN32__)
// Optional console window on Windows (default: enabled)
DO_LONG_OPTION_BOOL("console")
END_OPTION
diff --git a/base/main.cpp b/base/main.cpp
index 5df9fec22e..8121d77c88 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -78,9 +78,7 @@
#endif
#endif
-#if defined(_WIN32_WCE)
-#include "backends/platform/wince/CELauncherDialog.h"
-#elif defined(__DC__)
+#if defined(__DC__)
#include "backends/platform/dc/DCLauncherDialog.h"
#else
#include "gui/launcher.h"
@@ -97,9 +95,7 @@ static bool launcherDialog() {
// blindly be passed to the first game launched from the launcher.
ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
-#if defined(_WIN32_WCE)
- CELauncherDialog dlg;
-#elif defined(__DC__)
+#if defined(__DC__)
DCLauncherDialog dlg;
#else
GUI::LauncherDialog dlg;
diff --git a/base/plugins.cpp b/base/plugins.cpp
index 6a24409929..d5733599be 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -93,7 +93,7 @@ public:
// static/dynamic plugin, like it's done for the engines
LINK_PLUGIN(AUTO)
LINK_PLUGIN(NULL)
- #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ #if defined(WIN32) && !defined(__SYMBIAN32__)
LINK_PLUGIN(WINDOWS)
#endif
#if defined(USE_ALSA)
diff --git a/common/inttypes.h b/common/inttypes.h
index 88efa6f99e..7a39a3d8b1 100644
--- a/common/inttypes.h
+++ b/common/inttypes.h
@@ -27,11 +27,6 @@
typedef uint8 uint8_t;
typedef uint16 uint16_t;
typedef uint32 uint32_t;
-#elif defined(_WIN32_WCE)
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
#elif defined(_MSC_VER) || defined (__SYMBIAN32__)
typedef signed char int8_t;
typedef signed short int16_t;
diff --git a/common/scummsys.h b/common/scummsys.h
index a9512f4b3e..979852047e 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -279,7 +279,7 @@
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
- #elif defined(_WIN32_WCE) || defined(_MSC_VER) || defined(__MINGW32__)
+ #elif defined(_MSC_VER) || defined(__MINGW32__)
#define SCUMM_LITTLE_ENDIAN
@@ -364,7 +364,7 @@
#endif
#ifndef PLUGIN_EXPORT
- #if defined(_MSC_VER) || defined(_WIN32_WCE) || defined(__MINGW32__)
+ #if defined(_MSC_VER) || defined(__MINGW32__)
#define PLUGIN_EXPORT __declspec(dllexport)
#else
#define PLUGIN_EXPORT
diff --git a/configure b/configure
index baa4715b39..972f6304fb 100755
--- a/configure
+++ b/configure
@@ -534,7 +534,7 @@ get_system_exe_extension() {
gph-linux)
_exeext=".gph"
;;
- mingw* | *os2-emx | wince)
+ mingw* | *os2-emx)
_exeext=".exe"
;;
*)
@@ -941,7 +941,7 @@ Configuration:
-h, --help display this help and exit
--backend=BACKEND backend to build (3ds, android, dc, dingux, ds, gcw0,
gph, iphone, ios7, linuxmoto, maemo, n64, null, openpandora,
- ps2, psp, psp2, samsungtv, sdl, switch, tizen, webos, wii, wince) [sdl]
+ ps2, psp, psp2, samsungtv, sdl, switch, tizen, webos, wii) [sdl]
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -1002,7 +1002,6 @@ Special configuration feature:
tizen for Samsung Tizen
webos for HP Palm WebOS
wii for Nintendo Wii
- wince for Windows CE
Game engines:
--enable-all-engines enable all engines, including those which are
@@ -1789,11 +1788,6 @@ wii)
_host_cpu=powerpc
_host_alias=powerpc-eabi
;;
-wince)
- _host_os=wince
- _host_cpu=arm
- _host_alias=arm-mingw32ce
- ;;
*)
if test -n "$_host"; then
guessed_host=`$_srcdir/config.sub $_host`
@@ -2185,7 +2179,7 @@ if test "$have_gcc" = yes ; then
case $_host_os in
# newlib-based system include files suppress non-C89 function
# declarations under __STRICT_ANSI__
- 3ds | amigaos* | android | androidsdl | dreamcast | ds | gamecube | mingw* | mint* | n64 | psp | ps2 | ps3 | psp2 | switch | tizen | wii | wince )
+ 3ds | amigaos* | android | androidsdl | dreamcast | ds | gamecube | mingw* | mint* | n64 | psp | ps2 | ps3 | psp2 | switch | tizen | wii )
;;
*)
append_var CXXFLAGS "-ansi"
@@ -2499,7 +2493,7 @@ case $_host_cpu in
openpandora)
define_in_config_if_yes yes 'USE_ARM_NEON_ASPECT_CORRECTOR'
;;
- android | android-arm | androidsdl-armeabi | arm-*riscos | caanoo | ds | gp2x | gp2xwiz | maemo | tizen | wince)
+ android | android-arm | androidsdl-armeabi | arm-*riscos | caanoo | ds | gp2x | gp2xwiz | maemo | tizen)
define_in_config_if_yes yes 'USE_ARM_SCALER_ASM'
# FIXME: The following feature exhibits a bug. It produces distorted
# sound since 9003ce517ff9906b0288f9f7c02197fd091d4554. The ARM
@@ -3039,23 +3033,6 @@ case $_host_os in
append_var LDFLAGS "-Wl,--no-gc-sections"
fi
;;
- wince)
- _optimization_level=-O3
- append_var CXXFLAGS "-fno-inline-functions"
- append_var CXXFLAGS "-march=armv4"
- append_var CXXFLAGS "-mtune=xscale"
- append_var DEFINES "-D_WIN32_WCE=300"
- append_var DEFINES "-D__ARM__"
- append_var DEFINES "-D_ARM_"
- append_var DEFINES "-DUNICODE"
- append_var DEFINES "-DFPM_DEFAULT"
- append_var DEFINES "-DNONSTANDARD_PORT"
- append_var DEFINES "-DWRAP_MALLOC"
- append_var DEFINES "-DWIN32"
- append_var DEFINES "-Dcdecl="
- append_var DEFINES "-D__cdecl__="
- add_line_to_config_mk "WRAP_MALLOC = 1"
- ;;
esac
if test -n "$_host"; then
@@ -3538,16 +3515,6 @@ if test -n "$_host"; then
add_line_to_config_h "#define USE_WII_SMB"
add_line_to_config_h "#define USE_WII_KBD"
;;
- wince)
- append_var LDFLAGS "-Wl,--stack,65536"
- if test "$_tremor" = auto; then
- _tremolo=yes
- fi
- _backend="wince"
- _detectlang=yes
- _mt32emu=no
- _port_mk="backends/platform/wince/wince.mk"
- ;;
*)
echo "WARNING: Unknown target, continuing with auto-detected values"
;;
@@ -3739,15 +3706,6 @@ case $_backend in
;;
esac
;;
- wince)
- append_var INCLUDES '-I$(srcdir)/backends/platform/wince'
- append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEgui'
- append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEkeys'
- append_var INCLUDES '-I$(srcdir)/backends/platform/wince/missing'
- append_var LIBS "-static -lSDL"
- _sdl=yes
- _sdlversion=1.2.0
- ;;
*)
echo "support for $_backend backend not implemented in configure script yet"
exit 1
@@ -3917,7 +3875,7 @@ esac
#
echo_n "Checking if host is POSIX compliant... "
case $_host_os in
- amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp2 | psp | riscos | wii | wince)
+ amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp2 | psp | riscos | wii)
_posix=no
;;
3ds | android | androidsdl | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | switch | uclinux* | webos)
@@ -4121,18 +4079,6 @@ PRE_OBJS_FLAGS := -Wl,--whole-archive
POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a
'
;;
- wince)
- append_var DEFINES "-DUNCACHED_PLUGINS"
- HOSTEXEEXT=".dll"
- _plugin_prefix=""
- _plugin_suffix=".plugin"
-_mak_plugins='
-PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
-PLUGIN_LDFLAGS := -shared -lscummvm -L.
-PRE_OBJS_FLAGS := -Wl,--whole-archive
-POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -shared
-'
- ;;
ps2)
_elf_loader=yes
append_var DEFINES "-DUNCACHED_PLUGINS"
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 02fe2114a9..bf9e9fb329 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -578,15 +578,7 @@ bool DrasculaEngine::runCurrentChapter() {
_canSaveLoad = true;
delay(25);
-#ifndef _WIN32_WCE
- // FIXME
- // This and the following #ifndefs disable the excess updateEvents() calls *within* the game loop.
- // Events such as keypresses or mouse clicks are dropped on the ground with no processing
- // by these calls. They are properly handled by the implicit call through getScan() below.
- // It is not a good practice to not process events and indeed this created problems with synthesized
- // events in the wince port.
updateEvents();
-#endif
_canSaveLoad = false;
if (_loadedDifferentChapter)
return true;
@@ -594,12 +586,7 @@ bool DrasculaEngine::runCurrentChapter() {
if (!_menuScreen && takeObject == 1)
checkObjects();
-#ifdef _WIN32_WCE
- if (_rightMouseButton) {
- if (_menuScreen) {
-#else
if (_rightMouseButton == 1 && _menuScreen) {
-#endif
_rightMouseButton = 0;
if (currentChapter == 2) {
loadPic(menuBackground, cursorSurface);
@@ -610,16 +597,11 @@ bool DrasculaEngine::runCurrentChapter() {
}
setPalette((byte *)&gamePalette);
_menuScreen = false;
-#ifndef _WIN32_WCE
// FIXME: This call here is in hope that it will catch the rightmouseup event so the
// next if block won't be executed. This too is not a good coding practice. I've recoded it
// with a mutual exclusive if block for the menu. I would commit this properly but I cannot test
// for other (see Desktop) ports right now.
updateEvents();
-#endif
-#ifdef _WIN32_WCE
- } else {
-#else
}
// Do not show the inventory screen in chapter 5, if the right mouse button is clicked
@@ -627,7 +609,6 @@ bool DrasculaEngine::runCurrentChapter() {
// Fixes bug #2059621 - "DRASCULA: Plug bug"
if (_rightMouseButton == 1 && !_menuScreen &&
!(currentChapter == 5 && pickedObject == 16)) {
-#endif
_rightMouseButton = 0;
_characterMoved = false;
if (trackProtagonist == 2)
@@ -646,14 +627,9 @@ bool DrasculaEngine::runCurrentChapter() {
loadPic("icons.alg", cursorSurface);
}
_menuScreen = true;
-#ifndef _WIN32_WCE
updateEvents();
-#endif
selectVerb(kVerbNone);
}
-#ifdef _WIN32_WCE
- }
-#endif
if (_leftMouseButton == 1 && _menuBar) {
selectVerbFromBar();
@@ -842,11 +818,7 @@ void DrasculaEngine::updateEvents() {
updateMusic();
-#ifdef _WIN32_WCE
- if (eventMan->pollEvent(event)) {
-#else
while (eventMan->pollEvent(event)) {
-#endif
switch (event.type) {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) {
diff --git a/engines/engine.cpp b/engines/engine.cpp
index bee51778c9..c16c1f909d 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -22,7 +22,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if defined(WIN32) && !defined(__SYMBIAN32__)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <direct.h>
@@ -65,10 +65,6 @@
#include "common/text-to-speech.h"
#endif
-#ifdef _WIN32_WCE
-extern bool isSmartphone();
-#endif
-
// FIXME: HACK for error()
Engine *g_engine = 0;
@@ -87,10 +83,6 @@ static void defaultErrorHandler(const char *msg) {
// now invoke the debugger, if available / supported.
if (g_engine) {
GUI::Debugger *debugger = g_engine->getDebugger();
-#ifdef _WIN32_WCE
- if (isSmartphone())
- debugger = 0;
-#endif
#if defined(USE_TASKBAR)
g_system->getTaskbarManager()->notifyError();
@@ -412,7 +404,7 @@ void GUIErrorMessageFormat(const char *fmt, ...) {
}
void Engine::checkCD() {
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if defined(WIN32) && !defined(__SYMBIAN32__)
// It is a known bug under Windows that games that play CD audio cause
// ScummVM to crash if the data files are read from the same CD. Check
// if this appears to be the case and issue a warning.
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index d074649544..4983088f89 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -31,7 +31,7 @@
#include "lure/events.h"
#include "lure/lure.h"
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS) || defined(__ANDROID__) || defined(__WII__)
+#if defined(__SYMBIAN32__) || defined(WEBOS) || defined(__ANDROID__) || defined(__WII__)
#define LURE_CLICKABLE_MENUS
#endif
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 9c5271e51c..ecc1a16d29 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -41,9 +41,6 @@
#include "scumm/sound.h"
-#ifdef _WIN32_WCE
-#define KEY_ALL_SKIP 3457
-#endif
namespace Scumm {
@@ -350,17 +347,6 @@ void ScummEngine::processInput() {
_leftBtnPressed &= ~msClicked;
_rightBtnPressed &= ~msClicked;
-#ifdef _WIN32_WCE
- if (lastKeyHit.ascii == KEY_ALL_SKIP) {
- // Skip talk
- if (VAR_TALKSTOP_KEY != 0xFF && _talkDelay > 0) {
- lastKeyHit = Common::KeyState(Common::KEYCODE_PERIOD);
- } else {
- lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
- }
- }
-#endif
-
if (!lastKeyHit.ascii)
return;
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 83088db889..a7c39f7f6a 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -1553,9 +1553,6 @@ void Control::delay(unsigned int amount) {
}
uint this_delay = 20; // 1?
-#ifdef _WIN32_WCE
- this_delay = 10;
-#endif
if (this_delay > amount)
this_delay = amount;
diff --git a/gui/Actions.cpp b/gui/Actions.cpp
index b25f75e4af..0c4aa6ba75 100644
--- a/gui/Actions.cpp
+++ b/gui/Actions.cpp
@@ -24,11 +24,7 @@
#include "gui/message.h"
#include "common/config-manager.h"
-#ifdef _WIN32_WCE
- #include "backends/platform/wince/CEActionsPocket.h"
- #include "backends/platform/wince/CEActionsSmartphone.h"
- #include "backends/platform/wince/CEDevice.h"
-#elif defined(__SYMBIAN32__)
+#ifdef __SYMBIAN32__
#include "backends/platform/symbian/src/SymbianActions.h"
#endif
@@ -48,13 +44,7 @@ Actions::~Actions() {
// call the correct object creator function according to the Factory Pattern
void Actions::init() {
-#ifdef _WIN32_WCE
- // For WinCE: now use software + Factory pattern to create correct objects
- if (!CEDevice::isSmartphone())
- CEActionsPocket::init();
- else
- CEActionsSmartphone::init();
-#elif defined(__SYMBIAN32__)
+#if defined(__SYMBIAN32__)
SymbianActions::init();
#endif
}
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index 68e9bd836d..22d8cb42a8 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -25,10 +25,6 @@
#include "common/translation.h"
#include <SDL_keyboard.h>
-#ifdef _WIN32_WCE
-#include "CEDevice.h"
-#endif
-
namespace GUI {
enum {
@@ -128,11 +124,7 @@ void KeysDialog::handleKeyDown(Common::KeyState state){
}
void KeysDialog::handleKeyUp(Common::KeyState state) {
-#ifdef __SYMBIAN32__
if (Actions::Instance()->mappingActive()) {
-#else
- if (state.flags == 0xff && Actions::Instance()->mappingActive()) { // GAPI key was selected
-#endif
Common::String selection;
Actions::Instance()->setMapping((ActionType)_actionSelected, state.ascii);