diff options
Diffstat (limited to 'backends/graphics/wincesdl/wincesdl-graphics.cpp')
-rw-r--r-- | backends/graphics/wincesdl/wincesdl-graphics.cpp | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index 80b04ca56d..2ca78cedde 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -43,14 +43,14 @@ #include "backends/platform/wince/CEgui/ItemAction.h" WINCESdlGraphicsManager::WINCESdlGraphicsManager(SdlEventSource *sdlEventSource) - : SdlGraphicsManager(sdlEventSource), - _panelInitialized(false), _noDoubleTapRMB(false), + : SurfaceSdlGraphicsManager(sdlEventSource), + _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), _hasfocus(true), - _zoomUp(false), _zoomDown(false) { + _usesEmulatedMouse(false), _forceHideMouse(false), _freeLook(false), + _hasfocus(true), _zoomUp(false), _zoomDown(false) { memset(&_mouseCurState, 0, sizeof(_mouseCurState)); if (_isSmartphone) { _mouseCurState.x = 20; @@ -149,7 +149,7 @@ void WINCESdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { return; default: - SdlGraphicsManager::setFeatureState(f, enable); + SurfaceSdlGraphicsManager::setFeatureState(f, enable); } } @@ -160,7 +160,7 @@ bool WINCESdlGraphicsManager::getFeatureState(OSystem::Feature f) { case OSystem::kFeatureVirtualKeyboard: return (_panelStateForced); default: - return SdlGraphicsManager::getFeatureState(f); + return SurfaceSdlGraphicsManager::getFeatureState(f); } } @@ -204,7 +204,7 @@ void WINCESdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelForm _videoMode.overlayWidth = w; _videoMode.overlayHeight = h; - SdlGraphicsManager::initSize(w, h, format); + SurfaceSdlGraphicsManager::initSize(w, h, format); if (_scalersChanged) { unloadGFXMode(); @@ -444,7 +444,6 @@ void WINCESdlGraphicsManager::update_game_settings() { // Skip panel->add(NAME_ITEM_SKIP, new CEGUI::ItemAction(ITEM_SKIP, POCKET_ACTION_SKIP)); // sound -//__XXX__ panel->add(NAME_ITEM_SOUND, new CEGUI::ItemSwitch(ITEM_SOUND_OFF, ITEM_SOUND_ON, &_soundMaster)); panel->add(NAME_ITEM_SOUND, new CEGUI::ItemSwitch(ITEM_SOUND_OFF, ITEM_SOUND_ON, &OSystem_WINCE3::_soundMaster)); // bind keys @@ -479,6 +478,9 @@ void WINCESdlGraphicsManager::update_game_settings() { 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() { @@ -1186,7 +1188,7 @@ void WINCESdlGraphicsManager::setMousePos(int x, int y) { Graphics::Surface *WINCESdlGraphicsManager::lockScreen() { // Make sure mouse pointer is not painted over the playfield at the time of locking undrawMouse(); - return SdlGraphicsManager::lockScreen(); + return SurfaceSdlGraphicsManager::lockScreen(); } void WINCESdlGraphicsManager::showOverlay() { @@ -1294,7 +1296,7 @@ void WINCESdlGraphicsManager::warpMouse(int x, int y) { } void WINCESdlGraphicsManager::unlockScreen() { - SdlGraphicsManager::unlockScreen(); + SurfaceSdlGraphicsManager::unlockScreen(); } void WINCESdlGraphicsManager::internDrawMouse() { @@ -1469,7 +1471,7 @@ void WINCESdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool mous if (_forceFull || _paletteDirtyEnd) return; - SdlGraphicsManager::addDirtyRect(x, y, w, h, false); + SurfaceSdlGraphicsManager::addDirtyRect(x, y, w, h, false); } void WINCESdlGraphicsManager::swap_panel_visibility() { @@ -1600,6 +1602,19 @@ void WINCESdlGraphicsManager::swap_mouse_visibility() { 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; @@ -1627,6 +1642,14 @@ void WINCESdlGraphicsManager::create_toolbar() { _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 }, |