aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorCeRiAl2011-06-11 01:07:46 +0200
committerCeRiAl2011-06-11 23:29:52 +0200
commit781132aabcfd38cb14d517d1d4b2598d4bd5f791 (patch)
tree7a646679e489693670510a28a45ccd80b1d21592 /backends/platform
parent1c1786b16f34e4e998a5e1677427bdc75d318a93 (diff)
downloadscummvm-rg350-781132aabcfd38cb14d517d1d4b2598d4bd5f791.tar.gz
scummvm-rg350-781132aabcfd38cb14d517d1d4b2598d4bd5f791.tar.bz2
scummvm-rg350-781132aabcfd38cb14d517d1d4b2598d4bd5f791.zip
WINCE: Some cleanup (public vs. private scopes), fix freelook
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp45
-rw-r--r--backends/platform/wince/CEActionsPocket.h2
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp35
-rw-r--r--backends/platform/wince/CEActionsSmartphone.h2
-rw-r--r--backends/platform/wince/wince-sdl.cpp2
5 files changed, 34 insertions, 52 deletions
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index f2c461fcf9..a4786d330d 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -233,15 +233,15 @@ CEActionsPocket::~CEActionsPocket() {
bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
static bool keydialogrunning = false, quitdialog = false;
+ _graphicsMan = ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager());
+
if (!pushed) {
switch (action) {
case POCKET_ACTION_RIGHTCLICK:
- //_CESystem->add_right_click(false);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_right_click(false);
+ _graphicsMan->add_right_click(false);
return true;
case POCKET_ACTION_LEFTCLICK:
- //_CESystem->add_left_click(false);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_left_click(false);
+ _graphicsMan->add_left_click(false);
return true;
case POCKET_ACTION_PAUSE:
case POCKET_ACTION_SAVE:
@@ -249,7 +249,6 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
case POCKET_ACTION_MULTI:
EventsBuffer::simulateKey(&_key_action[action], false);
return true;
-
}
return false;
}
@@ -271,55 +270,43 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case POCKET_ACTION_KEYBOARD:
- //_CESystem->swap_panel();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_panel();
+ _graphicsMan->swap_panel();
return true;
case POCKET_ACTION_HIDE:
- //_CESystem->swap_panel_visibility();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_panel_visibility();
+ _graphicsMan->swap_panel_visibility();
return true;
case POCKET_ACTION_SOUND:
_CESystem->swap_sound_master();
return true;
case POCKET_ACTION_RIGHTCLICK:
- //_CESystem->add_right_click(true);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_right_click(true);
+ _graphicsMan->add_right_click(true);
return true;
case POCKET_ACTION_CURSOR:
- //_CESystem->swap_mouse_visibility();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_mouse_visibility();
+ _graphicsMan->swap_mouse_visibility();
return true;
case POCKET_ACTION_FREELOOK:
- //_CESystem->swap_freeLook();
- ((WINCESdlEventSource *)((OSystem_SDL *)g_system)->getEventManager())->swap_freeLook();
+ _graphicsMan->swap_freeLook();
return true;
case POCKET_ACTION_ZOOM_UP:
- //_CESystem->swap_zoom_up();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_zoom_up();
+ _graphicsMan->swap_zoom_up();
return true;
case POCKET_ACTION_ZOOM_DOWN:
- //_CESystem->swap_zoom_down();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_zoom_down();
+ _graphicsMan->swap_zoom_down();
return true;
case POCKET_ACTION_LEFTCLICK:
- //_CESystem->add_left_click(true);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_left_click(true);
+ _graphicsMan->add_left_click(true);
return true;
case POCKET_ACTION_UP:
- //_CESystem->move_cursor_up();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_up();
+ _graphicsMan->move_cursor_up();
return true;
case POCKET_ACTION_DOWN:
- //_CESystem->move_cursor_down();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_down();
+ _graphicsMan->move_cursor_down();
return true;
case POCKET_ACTION_LEFT:
- //_CESystem->move_cursor_left();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_left();
+ _graphicsMan->move_cursor_left();
return true;
case POCKET_ACTION_RIGHT:
- //_CESystem->move_cursor_right();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_right();
+ _graphicsMan->move_cursor_right();
return true;
case POCKET_ACTION_QUIT:
if (!quitdialog) {
diff --git a/backends/platform/wince/CEActionsPocket.h b/backends/platform/wince/CEActionsPocket.h
index fd97c0b1df..e1f52b6b88 100644
--- a/backends/platform/wince/CEActionsPocket.h
+++ b/backends/platform/wince/CEActionsPocket.h
@@ -28,6 +28,7 @@
#include "common/str.h"
#include "gui/Key.h"
#include "gui/Actions.h"
+#include "backends/graphics/wincesdl/wincesdl-graphics.h"
#define POCKET_ACTION_VERSION 5
@@ -80,6 +81,7 @@ public:
~CEActionsPocket();
private:
CEActionsPocket(const Common::String &gameid);
+ WINCESdlGraphicsManager *_graphicsMan;
bool _right_click_needed;
bool _hide_toolbar_needed;
bool _zoom_needed;
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index fdd52cfc26..b12dadabb6 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -199,15 +199,15 @@ CEActionsSmartphone::~CEActionsSmartphone() {
bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
static bool keydialogrunning = false, quitdialog = false;
+ _graphicsMan = ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager());
+
if (!pushed) {
switch (action) {
case SMARTPHONE_ACTION_RIGHTCLICK:
- //_CESystem->add_right_click(false);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_right_click(false);
+ _graphicsMan->add_right_click(false);
return true;
case SMARTPHONE_ACTION_LEFTCLICK:
- //_CESystem->add_left_click(false);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_left_click(false);
+ _graphicsMan->add_left_click(false);
return true;
case SMARTPHONE_ACTION_SAVE:
case SMARTPHONE_ACTION_SKIP:
@@ -234,32 +234,25 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case SMARTPHONE_ACTION_RIGHTCLICK:
- //_CESystem->add_right_click(true);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_right_click(true);
+ _graphicsMan->add_right_click(true);
return true;
case SMARTPHONE_ACTION_LEFTCLICK:
- //_CESystem->add_left_click(true);
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->add_left_click(true);
+ _graphicsMan->add_left_click(true);
return true;
case SMARTPHONE_ACTION_UP:
- //_CESystem->move_cursor_up();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_up();
+ _graphicsMan->move_cursor_up();
return true;
case SMARTPHONE_ACTION_DOWN:
- //_CESystem->move_cursor_down();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_down();
+ _graphicsMan->move_cursor_down();
return true;
case SMARTPHONE_ACTION_LEFT:
- //_CESystem->move_cursor_left();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_left();
+ _graphicsMan->move_cursor_left();
return true;
case SMARTPHONE_ACTION_RIGHT:
- //_CESystem->move_cursor_right();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->move_cursor_right();
+ _graphicsMan->move_cursor_right();
return true;
case SMARTPHONE_ACTION_ZONE:
- //_CESystem->switch_zone();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->switch_zone();
+ _graphicsMan->switch_zone();
return true;
case SMARTPHONE_ACTION_BINDKEYS:
if (!keydialogrunning) {
@@ -271,12 +264,10 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
}
return true;
case SMARTPHONE_ACTION_KEYBOARD:
- //_CESystem->swap_smartphone_keyboard();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->swap_smartphone_keyboard();
+ _graphicsMan->swap_smartphone_keyboard();
return true;
case SMARTPHONE_ACTION_ROTATE:
- //_CESystem->smartphone_rotate_display();
- ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->smartphone_rotate_display();
+ _graphicsMan->smartphone_rotate_display();
return true;
case SMARTPHONE_ACTION_QUIT:
if (!quitdialog) {
diff --git a/backends/platform/wince/CEActionsSmartphone.h b/backends/platform/wince/CEActionsSmartphone.h
index 5535ce1350..3da46d3923 100644
--- a/backends/platform/wince/CEActionsSmartphone.h
+++ b/backends/platform/wince/CEActionsSmartphone.h
@@ -28,6 +28,7 @@
#include "common/str.h"
#include "gui/Key.h"
#include "gui/Actions.h"
+#include "backends/graphics/wincesdl/wincesdl-graphics.h"
#define SMARTPHONE_ACTION_VERSION 5
@@ -68,6 +69,7 @@ public:
~CEActionsSmartphone();
private:
CEActionsSmartphone();
+ WINCESdlGraphicsManager *_graphicsMan;
bool _right_click_needed;
OSystem_WINCE3 *_CESystem;
};
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index d5f5c203d2..3ab9dc8aa4 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -466,7 +466,7 @@ void OSystem_WINCE3::swap_sound_master() {
void OSystem_WINCE3::engineInit() {
check_mappings(); // called here to initialize virtual keys handling
- //update_game_settings();
+ ((WINCESdlGraphicsManager *)_graphicsManager)->update_game_settings();
// finalize mixer init
_mixerManager->init();
}