aboutsummaryrefslogtreecommitdiff
path: root/backends/wince
diff options
context:
space:
mode:
Diffstat (limited to 'backends/wince')
-rw-r--r--backends/wince/CEActionsPocket.cpp12
-rw-r--r--backends/wince/CEActionsPocket.h4
-rw-r--r--backends/wince/CEActionsSmartphone.cpp12
-rw-r--r--backends/wince/CEActionsSmartphone.h4
-rw-r--r--backends/wince/CEDevice.cpp10
-rw-r--r--backends/wince/CEDevice.h2
-rw-r--r--backends/wince/CEException.cpp4
-rw-r--r--backends/wince/CEKeysDialog.cpp4
-rw-r--r--backends/wince/CELauncherDialog.cpp10
-rw-r--r--backends/wince/CEScaler.cpp24
-rw-r--r--backends/wince/CEgui/GUIElement.cpp6
-rw-r--r--backends/wince/CEgui/GUIElement.h12
-rw-r--r--backends/wince/CEgui/ItemAction.cpp6
-rw-r--r--backends/wince/CEgui/ItemAction.h2
-rw-r--r--backends/wince/CEgui/ItemSwitch.cpp10
-rw-r--r--backends/wince/CEgui/ItemSwitch.h4
-rw-r--r--backends/wince/CEgui/Panel.cpp2
-rw-r--r--backends/wince/CEgui/Panel.h6
-rw-r--r--backends/wince/CEgui/PanelItem.cpp2
-rw-r--r--backends/wince/CEgui/PanelKeyboard.cpp6
-rw-r--r--backends/wince/CEgui/PanelKeyboard.h2
-rw-r--r--backends/wince/CEgui/SDL_ImageResource.cpp6
-rw-r--r--backends/wince/CEgui/Toolbar.cpp4
-rw-r--r--backends/wince/CEgui/Toolbar.h4
-rw-r--r--backends/wince/CEgui/ToolbarHandler.cpp4
-rw-r--r--backends/wince/CEgui/ToolbarHandler.h2
-rw-r--r--backends/wince/CEkeys/EventsBuffer.cpp2
-rw-r--r--backends/wince/CEkeys/EventsBuffer.h2
-rw-r--r--backends/wince/missing/assert.h2
-rw-r--r--backends/wince/missing/missing.cpp60
-rw-r--r--backends/wince/newres.h4
-rw-r--r--backends/wince/resource.h2
-rw-r--r--backends/wince/wince-sdl.cpp148
-rw-r--r--backends/wince/wince-sdl.h16
34 files changed, 200 insertions, 200 deletions
diff --git a/backends/wince/CEActionsPocket.cpp b/backends/wince/CEActionsPocket.cpp
index 35776fcadc..dc36398afc 100644
--- a/backends/wince/CEActionsPocket.cpp
+++ b/backends/wince/CEActionsPocket.cpp
@@ -34,9 +34,9 @@
#define KEY_ALL_SKIP 3457
#endif
-const String pocketActionNames[] = {
- "Pause",
- "Save",
+const String pocketActionNames[] = {
+ "Pause",
+ "Save",
"Quit",
"Skip",
"Hide",
@@ -118,7 +118,7 @@ void CEActionsPocket::initInstanceGame() {
_key_action[POCKET_ACTION_PAUSE].setAscii(VK_SPACE);
_action_enabled[POCKET_ACTION_PAUSE] = true;
// Save
- if (is_simon || is_sword2 || is_gob)
+ if (is_simon || is_sword2 || is_gob)
_action_enabled[POCKET_ACTION_SAVE] = false;
else
if (is_queen) {
@@ -128,7 +128,7 @@ void CEActionsPocket::initInstanceGame() {
else
if (is_sky) {
_action_enabled[POCKET_ACTION_SAVE] = true;
- _key_action[POCKET_ACTION_SAVE].setAscii(63);
+ _key_action[POCKET_ACTION_SAVE].setAscii(63);
}
else {
_action_enabled[POCKET_ACTION_SAVE] = true;
@@ -144,7 +144,7 @@ void CEActionsPocket::initInstanceGame() {
_key_action[POCKET_ACTION_SKIP].setAscii(KEY_ALL_SKIP);
// Hide
_action_enabled[POCKET_ACTION_HIDE] = true;
- // Keyboard
+ // Keyboard
_action_enabled[POCKET_ACTION_KEYBOARD] = true;
// Sound
_action_enabled[POCKET_ACTION_SOUND] = true;
diff --git a/backends/wince/CEActionsPocket.h b/backends/wince/CEActionsPocket.h
index ce5ac1499a..f853463dc2 100644
--- a/backends/wince/CEActionsPocket.h
+++ b/backends/wince/CEActionsPocket.h
@@ -33,7 +33,7 @@
#include "gui/Actions.h"
-#define POCKET_ACTION_VERSION 4
+#define POCKET_ACTION_VERSION 4
enum pocketActionType {
POCKET_ACTION_PAUSE = 0,
@@ -80,6 +80,6 @@ class CEActionsPocket : public GUI::Actions {
bool _hide_toolbar_needed;
bool _zoom_needed;
OSystem_WINCE3 *_CESystem;
- };
+ };
#endif
diff --git a/backends/wince/CEActionsSmartphone.cpp b/backends/wince/CEActionsSmartphone.cpp
index 04048bc396..6aa812983c 100644
--- a/backends/wince/CEActionsSmartphone.cpp
+++ b/backends/wince/CEActionsSmartphone.cpp
@@ -37,9 +37,9 @@
#define KEY_ALL_SKIP 3457
#endif
-const String smartphoneActionNames[] = {
- "Up",
- "Down",
+const String smartphoneActionNames[] = {
+ "Up",
+ "Down",
"Left",
"Right",
"Left Click",
@@ -111,7 +111,7 @@ void CEActionsSmartphone::initInstanceGame() {
bool is_sky = (_detector->_targetName == "sky");
bool is_queen = (_detector->_targetName == "queen");
bool is_gob = (strncmp(_detector->_targetName.c_str(), "gob", 3) == 0);
-
+
GUI_Actions::initInstanceGame();
// See if a right click mapping could be needed
@@ -120,7 +120,7 @@ void CEActionsSmartphone::initInstanceGame() {
// Initialize keys for different actions
// Save
- if (is_simon || is_gob)
+ if (is_simon || is_gob)
_action_enabled[SMARTPHONE_ACTION_SAVE] = false;
else
if (is_queen) {
@@ -130,7 +130,7 @@ void CEActionsSmartphone::initInstanceGame() {
else
if (is_sky) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(63);
+ _key_action[SMARTPHONE_ACTION_SAVE].setAscii(63);
}
else {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
diff --git a/backends/wince/CEActionsSmartphone.h b/backends/wince/CEActionsSmartphone.h
index b532e2004c..f956ad3e38 100644
--- a/backends/wince/CEActionsSmartphone.h
+++ b/backends/wince/CEActionsSmartphone.h
@@ -35,7 +35,7 @@
#include "gui/Actions.h"
-#define SMARTPHONE_ACTION_VERSION 4
+#define SMARTPHONE_ACTION_VERSION 4
enum smartphoneActionType {
SMARTPHONE_ACTION_UP = 0,
@@ -72,7 +72,7 @@ class CEActionsSmartphone : public GUI::Actions {
CEActionsSmartphone(GameDetector &detector);
bool _right_click_needed;
OSystem_WINCE3 *_CESystem;
- };
+ };
#endif
diff --git a/backends/wince/CEDevice.cpp b/backends/wince/CEDevice.cpp
index 3461569e4c..c91ffe4507 100644
--- a/backends/wince/CEDevice.cpp
+++ b/backends/wince/CEDevice.cpp
@@ -148,13 +148,13 @@ Common::String CEDevice::getKeyName(unsigned int keyCode) {
return "Button Inbox";
if (keyCode == KEY_TASK)
return "Button Tasks";
- if (keyCode == SDLK_F1)
+ if (keyCode == SDLK_F1)
return "F1 (hard 1)";
- if (keyCode == SDLK_F2)
+ if (keyCode == SDLK_F2)
return "F2 (hard 2)";
- if (keyCode == SDLK_F3)
+ if (keyCode == SDLK_F3)
return "F3 (hard 3)";
- if (keyCode == SDLK_F4)
+ if (keyCode == SDLK_F4)
return "F4 (hard 4)";
//#ifdef WIN32_PLATFORM_WFSP
@@ -169,6 +169,6 @@ Common::String CEDevice::getKeyName(unsigned int keyCode) {
//#endif
sprintf(key_name, "Key %.4x", keyCode);
- return key_name;
+ return key_name;
}
diff --git a/backends/wince/CEDevice.h b/backends/wince/CEDevice.h
index 9fcdb5b7b2..d8bf306bc4 100644
--- a/backends/wince/CEDevice.h
+++ b/backends/wince/CEDevice.h
@@ -38,7 +38,7 @@ class CEDevice {
static bool hasDesktopResolution();
static bool hasWideResolution();
static bool hasSmartphoneResolution();
- static Common::String getKeyName(unsigned int keyCode);
+ static Common::String getKeyName(unsigned int keyCode);
};
#endif
diff --git a/backends/wince/CEException.cpp b/backends/wince/CEException.cpp
index 1ef83342f8..59892b1173 100644
--- a/backends/wince/CEException.cpp
+++ b/backends/wince/CEException.cpp
@@ -139,8 +139,8 @@ bool CEException::writeException(TCHAR *path, EXCEPTION_POINTERS *exceptionPoint
SYSTEMTIME systemTime;
GetSystemTime(&systemTime);
- wsprintf(dumpFileName, TEXT("%s_%.2d_%.2d_%.4d_%.2d_%.2d_%.2d.txt"),
- path, systemTime.wDay, systemTime.wMonth, systemTime.wYear,
+ 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)
diff --git a/backends/wince/CEKeysDialog.cpp b/backends/wince/CEKeysDialog.cpp
index 2a79d5afce..1e1d9734b5 100644
--- a/backends/wince/CEKeysDialog.cpp
+++ b/backends/wince/CEKeysDialog.cpp
@@ -56,7 +56,7 @@ CEKeysDialog::CEKeysDialog(const Common::String &title)
// Get actions names
Common::StringList l;
- for (int i = 0; i < CEActions::Instance()->size(); i++)
+ for (int i = 0; i < CEActions::Instance()->size(); i++)
l.push_back(CEActions::Instance()->actionName((ActionType)i));
_actionsList->setList(l);
@@ -111,7 +111,7 @@ void CEKeysDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
char selection[100];
CEActions::Instance()->setMapping((ActionType)_actionSelected, ascii);
-
+
sprintf(selection, "Associated key : %s", CEDevice::getKeyName(CEActions::Instance()->getMapping((ActionType)_actionSelected)).c_str());
_actionTitle->setLabel("Choose an action to map");
_keyMapping->setLabel(selection);
diff --git a/backends/wince/CELauncherDialog.cpp b/backends/wince/CELauncherDialog.cpp
index 9de00a1231..83dc6ea462 100644
--- a/backends/wince/CELauncherDialog.cpp
+++ b/backends/wince/CELauncherDialog.cpp
@@ -42,7 +42,7 @@ public:
CEAboutDialog::CEAboutDialog()
: Dialog(10, 60, 300, 77) {
char tempo[100];
-
+
addButton(this,(_w - kButtonWidth) / 2, 45, "OK", kCloseCmd, '\r'); // Close dialog - FIXME
Common::String videoDriver("Using SDL driver ");
@@ -60,7 +60,7 @@ class CEConflictDialog : public Dialog {
public:
CEConflictDialog::CEConflictDialog(const Common::String &name)
: Dialog(10, 60, 300, 77) {
-
+
addButton(this,(_w - kButtonWidth) / 2, 45, "OK", kCloseCmd, '\r'); // Close dialog - FIXME
Common::String conflict("Too many matches for directory ");
@@ -97,12 +97,12 @@ void CELauncherDialog::addCandidate(String &path, DetectedGameList &candidates)
for (i=path.size() - 2; i && path[i] != '\\'; i--);
strcpy(candidateName, &path[i + 1]);
candidateName[strlen(candidateName) - 1] = '\0';
- for (i=0; i<candidates.size(); i++) {
+ for (i=0; i<candidates.size(); i++) {
if (scumm_stricmp(candidateName, candidates[i].name) == 0) {
idx = i;
break;
}
- }
+ }
if (idx == -1) {
CEConflictDialog conflict(candidateName);
conflict.runModal();
@@ -168,4 +168,4 @@ void CELauncherDialog::addGame() {
}
else
GUILauncherDialog::addGame();
-}
+}
diff --git a/backends/wince/CEScaler.cpp b/backends/wince/CEScaler.cpp
index 394dbeb066..5b1d89d0c1 100644
--- a/backends/wince/CEScaler.cpp
+++ b/backends/wince/CEScaler.cpp
@@ -35,7 +35,7 @@ void initCEScaler(void) {
}
static inline uint16 CEinterpolate16_4(uint16 p1, uint16 p2, uint16 p3, uint16 p4)
-{
+{
return ((((p1 & redblueMasks[maskUsed]) + (p2 & redblueMasks[maskUsed]) + (p3 & redblueMasks[maskUsed]) + (p4 & redblueMasks[maskUsed])) / 4) & redblueMasks[maskUsed]) |
((((p1 & greenMasks[maskUsed]) + (p2 & greenMasks[maskUsed]) + (p3 & greenMasks[maskUsed]) + (p4 & greenMasks[maskUsed])) / 4) & greenMasks[maskUsed]);
}
@@ -54,16 +54,16 @@ void PocketPCPortrait(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint3
work = dstPtr;
for (int i=0; i<width; i+=4) {
- // Work with 4 pixels
+ // Work with 4 pixels
uint16 color1 = *(((const uint16 *)srcPtr) + i);
uint16 color2 = *(((const uint16 *)srcPtr) + (i + 1));
uint16 color3 = *(((const uint16 *)srcPtr) + (i + 2));
uint16 color4 = *(((const uint16 *)srcPtr) + (i + 3));
-
+
*(((uint16 *)work) + 0) = CEinterpolate16_2(color1, 3, color2, 1);
*(((uint16 *)work) + 1) = CEinterpolate16_2(color2, 1, color3, 1);
*(((uint16 *)work) + 2) = CEinterpolate16_2(color3, 1, color4, 3);
-
+
work += 3 * sizeof(uint16);
}
srcPtr += srcPitch;
@@ -81,16 +81,16 @@ void PocketPCHalf(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 ds
work = dstPtr;
for (int i=0; i<width; i+=2) {
- // Another lame filter attempt :)
+ // Another lame filter attempt :)
uint16 color1 = *(((const uint16 *)srcPtr) + i);
uint16 color2 = *(((const uint16 *)srcPtr) + (i + 1));
uint16 color3 = *(((const uint16 *)srcPtr) + (i + srcPitch16));
uint16 color4 = *(((const uint16 *)srcPtr) + (i + srcPitch16 + 1));
*(((uint16 *)work) + 0) = CEinterpolate16_4(color1, color2, color3, color4);
-
+
work += sizeof(uint16);
}
- srcPtr += 2 * srcPitch;
+ srcPtr += 2 * srcPitch;
dstPtr += dstPitch;
}
}
@@ -112,10 +112,10 @@ void PocketPCHalfZoom(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint3
uint16 color1 = *(((const uint16 *)srcPtr) + i);
uint16 color2 = *(((const uint16 *)srcPtr) + (i + 1));
*(((uint16 *)work) + 0) = CEinterpolate16_2(color1, 1, color2, 1);
-
+
work += sizeof(uint16);
}
- srcPtr += srcPitch;
+ srcPtr += srcPitch;
dstPtr += dstPitch;
}
}
@@ -135,10 +135,10 @@ void SmartphoneLandscape(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, ui
uint16 color1 = *(((const uint16 *)srcPtr) + i);
uint16 color2 = *(((const uint16 *)srcPtr) + (i + 1));
uint16 color3 = *(((const uint16 *)srcPtr) + (i + 2));
-
+
*(((uint16 *)work) + 0) = CEinterpolate16_2(color1, 3, color2, 1);
*(((uint16 *)work) + 1) = CEinterpolate16_2(color2, 1, color3, 1);
-
+
work += 2 * sizeof(uint16);
}
srcPtr += srcPitch;
@@ -150,6 +150,6 @@ void SmartphoneLandscape(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, ui
height--;
}
}
-}
+}
//#endif
diff --git a/backends/wince/CEgui/GUIElement.cpp b/backends/wince/CEgui/GUIElement.cpp
index b5732f4653..ae5292660d 100644
--- a/backends/wince/CEgui/GUIElement.cpp
+++ b/backends/wince/CEgui/GUIElement.cpp
@@ -42,7 +42,7 @@ namespace CEGUI {
_height = _background->height();
_width = _background->width();
}
- else
+ else
if (_background->height() != _height || _background->width() != _width) {
delete _background;
_background = NULL;
@@ -50,7 +50,7 @@ namespace CEGUI {
}
return true;
}
-
+
void GUIElement::move(int x, int y) {
_x = x;
_y = y;
@@ -79,7 +79,7 @@ namespace CEGUI {
if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height)
return true;
else
- return false;
+ return false;
}
void GUIElement::setVisible(bool visibility) {
diff --git a/backends/wince/CEgui/GUIElement.h b/backends/wince/CEgui/GUIElement.h
index 86ba3c4fcd..cbd955cef2 100644
--- a/backends/wince/CEgui/GUIElement.h
+++ b/backends/wince/CEgui/GUIElement.h
@@ -33,29 +33,29 @@
namespace CEGUI {
class GUIElement {
- public:
- bool setBackground(WORD backgroundReference);
+ public:
+ bool setBackground(WORD backgroundReference);
void setVisible(bool visibility);
virtual void forceRedraw();
- virtual bool draw(SDL_Surface *surface);
+ virtual bool draw(SDL_Surface *surface);
virtual ~GUIElement();
void move(int x, int y);
int width();
int height();
int x();
int y();
- virtual bool action(int x, int y, bool pushed) = 0;
+ 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;
+ SDL_ImageResource *_background;
int _x;
int _y;
bool _drawn;
- private:
+ private:
int _width;
int _height;
};
diff --git a/backends/wince/CEgui/ItemAction.cpp b/backends/wince/CEgui/ItemAction.cpp
index bc9dfeaec0..6aaa739198 100644
--- a/backends/wince/CEgui/ItemAction.cpp
+++ b/backends/wince/CEgui/ItemAction.cpp
@@ -30,9 +30,9 @@ namespace CEGUI {
if (!GUI::Actions::Instance()->isEnabled(_action))
_visible = false;
}
-
-
- ItemAction::~ItemAction() {
+
+
+ ItemAction::~ItemAction() {
}
bool ItemAction::action(int x, int y, bool pushed) {
diff --git a/backends/wince/CEgui/ItemAction.h b/backends/wince/CEgui/ItemAction.h
index df38842bcb..b9d773452a 100644
--- a/backends/wince/CEgui/ItemAction.h
+++ b/backends/wince/CEgui/ItemAction.h
@@ -34,7 +34,7 @@ namespace CEGUI {
public:
ItemAction(WORD reference, GUI::ActionType action);
virtual ~ItemAction();
- virtual bool action(int x, int y, bool pushed);
+ virtual bool action(int x, int y, bool pushed);
private:
GUI::ActionType _action;
};
diff --git a/backends/wince/CEgui/ItemSwitch.cpp b/backends/wince/CEgui/ItemSwitch.cpp
index 6ee05f941f..a4a4503ec7 100644
--- a/backends/wince/CEgui/ItemSwitch.cpp
+++ b/backends/wince/CEgui/ItemSwitch.cpp
@@ -37,10 +37,10 @@ namespace CEGUI {
}
if (!*_item)
_background = _backgroundFalse;
- }
-
-
- ItemSwitch::~ItemSwitch() {
+ }
+
+
+ ItemSwitch::~ItemSwitch() {
if (_backgroundFalse)
delete _backgroundFalse;
}
@@ -53,7 +53,7 @@ namespace CEGUI {
_background = _backgroundTrue;
else
_background = _backgroundFalse;
-
+
if (_panel)
_panel->forceRedraw();
diff --git a/backends/wince/CEgui/ItemSwitch.h b/backends/wince/CEgui/ItemSwitch.h
index e8377031d9..4754ff9bd6 100644
--- a/backends/wince/CEgui/ItemSwitch.h
+++ b/backends/wince/CEgui/ItemSwitch.h
@@ -37,11 +37,11 @@ namespace CEGUI {
public:
ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item);
virtual ~ItemSwitch();
- virtual bool action(int x, int y, bool pushed);
+ virtual bool action(int x, int y, bool pushed);
private:
bool *_item;
SDL_ImageResource *_backgroundTrue;
- SDL_ImageResource *_backgroundFalse;
+ SDL_ImageResource *_backgroundFalse;
};
}
diff --git a/backends/wince/CEgui/Panel.cpp b/backends/wince/CEgui/Panel.cpp
index a76c202690..8764fb685f 100644
--- a/backends/wince/CEgui/Panel.cpp
+++ b/backends/wince/CEgui/Panel.cpp
@@ -67,7 +67,7 @@ namespace CEGUI {
if (!_visible || !checkInside(x, y))
return false;
- for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator)
+ for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator)
result = ((GUIElement*)(iterator->_value))->action(x, y, pushed);
return result;
}
diff --git a/backends/wince/CEgui/Panel.h b/backends/wince/CEgui/Panel.h
index 4abe5a0685..cf8195d95c 100644
--- a/backends/wince/CEgui/Panel.h
+++ b/backends/wince/CEgui/Panel.h
@@ -39,15 +39,15 @@ namespace CEGUI {
class Panel : public Toolbar {
public:
Panel(int interleave_first, int interleave);
- virtual bool draw(SDL_Surface *surface);
+ 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);
+ virtual bool action(int x, int y, bool pushed);
private:
struct IgnoreCaseComparator {
- int operator()(const String& x, const String& y) const {
+ int operator()(const String& x, const String& y) const {
return scumm_stricmp(x.c_str(), y.c_str()); }
};
diff --git a/backends/wince/CEgui/PanelItem.cpp b/backends/wince/CEgui/PanelItem.cpp
index 6d0cd1c5aa..59f16320dd 100644
--- a/backends/wince/CEgui/PanelItem.cpp
+++ b/backends/wince/CEgui/PanelItem.cpp
@@ -29,7 +29,7 @@ namespace CEGUI {
_panel = NULL;
}
-
+
PanelItem::~PanelItem() {
}
diff --git a/backends/wince/CEgui/PanelKeyboard.cpp b/backends/wince/CEgui/PanelKeyboard.cpp
index a7c43f3c68..782c6b45f5 100644
--- a/backends/wince/CEgui/PanelKeyboard.cpp
+++ b/backends/wince/CEgui/PanelKeyboard.cpp
@@ -31,9 +31,9 @@ namespace CEGUI {
PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() {
setBackground(reference);
- }
+ }
+
-
PanelKeyboard::~PanelKeyboard() {
}
@@ -44,7 +44,7 @@ namespace CEGUI {
char keyCode = 0;
if (x < 185) {
// Alpha selection
- if (y <= _y + 20)
+ if (y <= _y + 20)
keyAscii = KEYBOARD_MAPPING_ALPHA_HIGH[((x + 10) / 14) - 1];
else
keyAscii = KEYBOARD_MAPPING_ALPHA_LOW[((x + 10) / 14) - 1];
diff --git a/backends/wince/CEgui/PanelKeyboard.h b/backends/wince/CEgui/PanelKeyboard.h
index f4c48bf659..e803a6f058 100644
--- a/backends/wince/CEgui/PanelKeyboard.h
+++ b/backends/wince/CEgui/PanelKeyboard.h
@@ -37,7 +37,7 @@ namespace CEGUI {
class PanelKeyboard : public Toolbar {
public:
PanelKeyboard(WORD reference);
- virtual ~PanelKeyboard();
+ virtual ~PanelKeyboard();
virtual bool action(int x, int y, bool pushed);
private:
Key _key;
diff --git a/backends/wince/CEgui/SDL_ImageResource.cpp b/backends/wince/CEgui/SDL_ImageResource.cpp
index 598caa56a1..bffafc2241 100644
--- a/backends/wince/CEgui/SDL_ImageResource.cpp
+++ b/backends/wince/CEgui/SDL_ImageResource.cpp
@@ -24,7 +24,7 @@
namespace CEGUI {
- SDL_ImageResource::SDL_ImageResource() :
+ SDL_ImageResource::SDL_ImageResource() :
_surface(0)
{
}
@@ -36,7 +36,7 @@ namespace CEGUI {
DWORD resourceSize;
SDL_RWops *surfaceData;
HMODULE moduleHandle;
-
+
moduleHandle = GetModuleHandle(NULL);
resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY"));
if (!resource)
@@ -78,5 +78,5 @@ namespace CEGUI {
SDL_ImageResource::~SDL_ImageResource() {
if (_surface)
SDL_FreeSurface(_surface);
- }
+ }
}
diff --git a/backends/wince/CEgui/Toolbar.cpp b/backends/wince/CEgui/Toolbar.cpp
index e2829b1aa6..e64314ed13 100644
--- a/backends/wince/CEgui/Toolbar.cpp
+++ b/backends/wince/CEgui/Toolbar.cpp
@@ -24,12 +24,12 @@
namespace CEGUI {
- // Not to be drawn on game screen !
+ // Not to be drawn on game screen !
Toolbar::Toolbar() : GUIElement(0, 0, 320, 40)
{
}
-
+
Toolbar::~Toolbar() {
}
}
diff --git a/backends/wince/CEgui/Toolbar.h b/backends/wince/CEgui/Toolbar.h
index 965d72a3c0..98d3b7623a 100644
--- a/backends/wince/CEgui/Toolbar.h
+++ b/backends/wince/CEgui/Toolbar.h
@@ -36,12 +36,12 @@
namespace CEGUI {
class Toolbar : public GUIElement {
- public:
+ public:
virtual ~Toolbar();
virtual bool action(int x, int y, bool pushed) = 0;
protected:
Toolbar();
-
+
};
}
diff --git a/backends/wince/CEgui/ToolbarHandler.cpp b/backends/wince/CEgui/ToolbarHandler.cpp
index b747247f36..4a3622260e 100644
--- a/backends/wince/CEgui/ToolbarHandler.cpp
+++ b/backends/wince/CEgui/ToolbarHandler.cpp
@@ -33,7 +33,7 @@ namespace CEGUI {
_toolbarMap.addKey(name);
_toolbarMap[name] = (Toolbar*)&toolbar;
-
+
if (!_active) {
_active = &((Toolbar&)toolbar);
_current = name;
@@ -63,7 +63,7 @@ namespace CEGUI {
if (_offset > 240)
return _active->action(x / 2, (y - _offset) / 2, pushed);
else
- return _active->action(x, y - _offset, pushed);
+ return _active->action(x, y - _offset, pushed);
}
else
return false;
diff --git a/backends/wince/CEgui/ToolbarHandler.h b/backends/wince/CEgui/ToolbarHandler.h
index 5b255fccf6..f4ae710b00 100644
--- a/backends/wince/CEgui/ToolbarHandler.h
+++ b/backends/wince/CEgui/ToolbarHandler.h
@@ -54,7 +54,7 @@ namespace CEGUI {
private:
struct IgnoreCaseComparator {
- int operator()(const String& x, const String& y) const {
+ int operator()(const String& x, const String& y) const {
return scumm_stricmp(x.c_str(), y.c_str()); }
};
diff --git a/backends/wince/CEkeys/EventsBuffer.cpp b/backends/wince/CEkeys/EventsBuffer.cpp
index c427b02d38..3f6f60d7f4 100644
--- a/backends/wince/CEkeys/EventsBuffer.cpp
+++ b/backends/wince/CEkeys/EventsBuffer.cpp
@@ -22,7 +22,7 @@
#include "common/stdafx.h"
#include "EventsBuffer.h"
-namespace CEKEYS {
+namespace CEKEYS {
bool EventsBuffer::simulateKey(GUI::Key *key, bool pushed) {
SDL_Event ev = {0};
diff --git a/backends/wince/CEkeys/EventsBuffer.h b/backends/wince/CEkeys/EventsBuffer.h
index f676084152..baed6ca8a4 100644
--- a/backends/wince/CEkeys/EventsBuffer.h
+++ b/backends/wince/CEkeys/EventsBuffer.h
@@ -40,7 +40,7 @@ namespace CEKEYS {
static bool simulateMouseLeftClick(int x, int y, bool pushed);
static bool simulateMouseRightClick(int x, int y, bool pushed);
- };
+ };
}
#endif
diff --git a/backends/wince/missing/assert.h b/backends/wince/missing/assert.h
index 192c1e966b..509837c972 100644
--- a/backends/wince/missing/assert.h
+++ b/backends/wince/missing/assert.h
@@ -3,6 +3,6 @@
#include "common/util.h"
#define assert(e) ((e) ? 0 : (::error("Assertion failed " #e " (%s, %d)", __FILE__, __LINE__)))
-
+
#define abort() ::error("Abort (%s, %d)", __FILE__, __LINE__)
diff --git a/backends/wince/missing/missing.cpp b/backends/wince/missing/missing.cpp
index 198e0b8a93..49f3d7339b 100644
--- a/backends/wince/missing/missing.cpp
+++ b/backends/wince/missing/missing.cpp
@@ -35,25 +35,25 @@ DIR* opendir(const char* fname)
char fnameMask[MAX_PATH+1];
TCHAR fnameUnc[MAX_PATH+1];
char nameFound[MAX_PATH+1];
-
+
if(fname == NULL)
return NULL;
-
+
strcpy(fnameMask, fname);
if(!strlen(fnameMask) || fnameMask[strlen(fnameMask)-1] != '\\')
strncat(fnameMask, "\\", MAX_PATH-strlen(fnameMask)-1);
strncat(fnameMask, "*.*", MAX_PATH-strlen(fnameMask)-4);
-
+
pdir = (DIR*)malloc(sizeof(DIR)+strlen(fname));
pdir->dd_dir.d_ino = 0;
pdir->dd_dir.d_reclen = 0;
pdir->dd_dir.d_name = 0;
pdir->dd_dir.d_namlen = 0;
-
+
pdir->dd_handle = 0;
pdir->dd_stat = 0;
strcpy(pdir->dd_name, fname); /* it has exactly enough space for fname and nul char */
-
+
MultiByteToWideChar(CP_ACP, 0, fnameMask, -1, fnameUnc, MAX_PATH);
if((pdir->dd_handle = (long)FindFirstFile(fnameUnc, &wfd)) == (long)INVALID_HANDLE_VALUE)
{
@@ -63,7 +63,7 @@ DIR* opendir(const char* fname)
else
{
WideCharToMultiByte(CP_ACP, 0, wfd.cFileName, -1, nameFound, MAX_PATH, NULL, NULL);
-
+
pdir->dd_dir.d_name = strdup(nameFound);
pdir->dd_dir.d_namlen = strlen(nameFound);
}
@@ -74,7 +74,7 @@ struct dirent* readdir(DIR* dir)
{
char nameFound[MAX_PATH+1];
static struct dirent dummy;
-
+
if(dir->dd_stat == 0)
{
dummy.d_name = ".";
@@ -102,15 +102,15 @@ struct dirent* readdir(DIR* dir)
return NULL;
}
WideCharToMultiByte(CP_ACP, 0, wfd.cFileName, -1, nameFound, MAX_PATH, NULL, NULL);
-
+
if(dir->dd_dir.d_name)
free(dir->dd_dir.d_name);
-
+
dir->dd_dir.d_name = strdup(nameFound);
dir->dd_dir.d_namlen = strlen(nameFound);
-
+
dir->dd_stat ++;
-
+
return &dir->dd_dir;
}
}
@@ -119,10 +119,10 @@ int closedir(DIR* dir)
{
if(dir == NULL)
return 0;
-
+
if(dir->dd_handle)
FindClose((HANDLE)dir->dd_handle);
-
+
if(dir->dd_dir.d_name)
free(dir->dd_dir.d_name);
free(dir);
@@ -135,10 +135,10 @@ int stat(const char *fname, struct stat *ss)
TCHAR fnameUnc[MAX_PATH+1];
HANDLE handle;
int len;
-
+
if(fname == NULL || ss == NULL)
return -1;
-
+
/* Special case (dummy on WinCE) */
len = strlen(fname);
if(len >= 2 && fname[len-1] == '.' && fname[len-2] == '.' &&
@@ -150,7 +150,7 @@ int stat(const char *fname, struct stat *ss)
ss->st_mode |= S_IFDIR;
return 0;
}
-
+
MultiByteToWideChar(CP_ACP, 0, fname, -1, fnameUnc, MAX_PATH);
handle = FindFirstFile(fnameUnc, &wfd);
if(handle == INVALID_HANDLE_VALUE)
@@ -162,7 +162,7 @@ int stat(const char *fname, struct stat *ss)
ss->st_size = wfd.nFileSizeLow;
if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
ss->st_mode |= S_IFDIR;
-
+
FindClose(handle);
}
return 0;
@@ -217,7 +217,7 @@ char *tmpnam(char *string)
static char buffer[MAX_PATH+1];
GetTempFileName(TEXT("."), TEXT("A8_"), 0, pTemp);
WideCharToMultiByte(CP_ACP, 0, pTemp, -1, buffer, MAX_PATH, NULL, NULL);
-
+
if(string)
{
strcpy(string, buffer);
@@ -270,7 +270,7 @@ char *getcwd(char *buffer, int maxlen)
{
TCHAR fileUnc[MAX_PATH+1];
char* plast;
-
+
if(cwd[0] == 0)
{
GetModuleFileName(NULL, fileUnc, MAX_PATH);
@@ -293,9 +293,9 @@ time_t time(time_t* res)
time_t t;
SYSTEMTIME st;
GetLocalTime(&st);
-
+
t = (time_t)(((((((st.wYear-1970)*12+st.wMonth)*31+st.wDay)*7+st.wDayOfWeek)*24+st.wHour)*60+st.wMinute)*60+st.wSecond);
-
+
if(res)
*res = t;
return t;
@@ -305,7 +305,7 @@ struct tm* localtime(time_t* timer)
{
static struct tm tmLocalTime;
unsigned long rem = *timer;
-
+
tmLocalTime.tm_sec = (short)(rem % 60);
rem /= 60;
tmLocalTime.tm_min = (short)(rem % 60);
@@ -319,7 +319,7 @@ struct tm* localtime(time_t* timer)
tmLocalTime.tm_mon = (short)(rem % 12);
rem /= 12;
tmLocalTime.tm_year = (short)(rem+1970);
-
+
return &tmLocalTime;
}
@@ -350,7 +350,7 @@ than current folder (concept not implemented in CE).
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] != '/')
@@ -394,11 +394,11 @@ char* getenv(char* name)
return "";
}
-void *bsearch(const void *key, const void *base, size_t nmemb,
+void *bsearch(const void *key, const void *base, size_t nmemb,
size_t size, int (*compar)(const void *, const void *)) {
size_t i;
- for (i=0; i<nmemb; i++)
+ for (i=0; i<nmemb; i++)
if (compar(key, (void*)((size_t)base + size * i)) == 0)
return (void*)((size_t)base + size * i);
return NULL;
@@ -408,7 +408,7 @@ void *bsearch(const void *key, const void *base, size_t nmemb,
void *calloc(size_t n, size_t s) {
void *result = malloc(n * s);
- if (result)
+ if (result)
memset(result, 0, n * s);
return result;
@@ -417,7 +417,7 @@ void *calloc(size_t n, size_t s) {
char *strpbrk(const char *s, const char *accept) {
int i;
- if (!s || !accept)
+ if (!s || !accept)
return NULL;
for (i=0; i<strlen(s); i++) {
@@ -632,8 +632,8 @@ long int strtol(const char *nptr, char **endptr, int base) {
sscanf(nptr, "%ld", &result);
return result;
}
-
+
#endif
-
+
diff --git a/backends/wince/newres.h b/backends/wince/newres.h
index a27a106c5e..092f99d77d 100644
--- a/backends/wince/newres.h
+++ b/backends/wince/newres.h
@@ -4,7 +4,7 @@
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
-// This is "Sample Code" and is distributable subject to the terms of the
+// This is "Sample Code" and is distributable subject to the terms of the
// end user license agreement.
///////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@
#define _INC_WINDOWS
#include "winuser.h" // extract from windows header
#if _WIN32_WCE >= 300
- #include "winver.h"
+ #include "winver.h"
#endif
#endif
#endif
diff --git a/backends/wince/resource.h b/backends/wince/resource.h
index 65071ef505..b1bdcce2b9 100644
--- a/backends/wince/resource.h
+++ b/backends/wince/resource.h
@@ -27,7 +27,7 @@
#define IDM_SMARTFON_HELP 40021
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 123
diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp
index 39aeae10cd..b2af2d1d7e 100644
--- a/backends/wince/wince-sdl.cpp
+++ b/backends/wince/wince-sdl.cpp
@@ -51,7 +51,7 @@
#include <vorbis/vorbisfile.h>
#endif
-using namespace CEGUI;
+using namespace CEGUI;
// ********************************************************************************************
@@ -151,7 +151,7 @@ int SDL_main(int argc, char **argv) {
}
return 0;
-}
+}
// ********************************************************************************************
@@ -208,7 +208,7 @@ OSystem *OSystem_WINCE3_create() {
return new OSystem_WINCE3();
}
-OSystem_WINCE3::OSystem_WINCE3() : OSystem_SDL(),
+OSystem_WINCE3::OSystem_WINCE3() : OSystem_SDL(),
_orientationLandscape(false), _newOrientation(false), _panelInitialized(false),
_panelVisible(false), _panelStateForced(false), _forceHideMouse(false),
_freeLook(false), _forcePanelInvisible(false), _toolbarHighDrawn(false), _zoomUp(false), _zoomDown(false),
@@ -222,7 +222,7 @@ OSystem_WINCE3::OSystem_WINCE3() : OSystem_SDL(),
}
create_toolbar();
// Initialize global key mapping for Smartphones
- GUI_Actions::Instance()->initInstanceMain(this);
+ GUI_Actions::Instance()->initInstanceMain(this);
GUI_Actions::Instance()->loadMapping();
if (_isSmartphone) {
@@ -240,7 +240,7 @@ void OSystem_WINCE3::swap_panel_visibility() {
addDirtyRect(0, 400, 640, 80);
else
addDirtyRect(0, 200, 320, 40);
-
+
internUpdateScreen();
}
}
@@ -277,7 +277,7 @@ void OSystem_WINCE3::swap_freeLook() {
_freeLook = !_freeLook;
}
-void OSystem_WINCE3::swap_zoom_up() {
+void OSystem_WINCE3::swap_zoom_up() {
if (_zoomUp) {
// restore visibility
_toolbarHandler.setVisible(_saveToolbarZoom);
@@ -308,7 +308,7 @@ void OSystem_WINCE3::swap_zoom_up() {
internUpdateScreen();
}
-void OSystem_WINCE3::swap_zoom_down() {
+void OSystem_WINCE3::swap_zoom_down() {
if (_zoomDown) {
// restore visibility
_toolbarHandler.setVisible(_saveToolbarZoom);
@@ -410,7 +410,7 @@ void OSystem_WINCE3::move_cursor_down() {
if (y > 200)
y = 200;
- EventsBuffer::simulateMouseMove(x, y);
+ EventsBuffer::simulateMouseMove(x, y);
}
void OSystem_WINCE3::move_cursor_left() {
@@ -420,7 +420,7 @@ void OSystem_WINCE3::move_cursor_left() {
x -= _stepX3;
else
if (_keyRepeat)
- x -= _stepX2;
+ x -= _stepX2;
else
x -= _stepX1;
@@ -611,7 +611,7 @@ bool OSystem_WINCE3::setSoundCallback(SoundProc proc, void *param) {
_originalSoundProc = proc;
desired.freq = _sampleRate;
- desired.format = AUDIO_S16SYS;
+ desired.format = AUDIO_S16SYS;
desired.channels = 2;
//desired.samples = 2048;
desired.samples = 128;
@@ -649,13 +649,13 @@ void OSystem_WINCE3::check_mappings() {
// 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");
+ 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;
}
@@ -684,7 +684,7 @@ void OSystem_WINCE3::check_mappings() {
}
// Extra warning for Zak Mc Kracken
- if (strncmp(_gameDetector._targetName.c_str(), "zak", 3) == 0 &&
+ if (strncmp(_gameDetector._targetName.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();
@@ -696,7 +696,7 @@ void OSystem_WINCE3::update_game_settings() {
// Finish panel initialization
if (!_panelInitialized && _gameDetector._targetName.size()) {
Panel *panel;
- _panelInitialized = true;
+ _panelInitialized = true;
// Add the main panel
panel = new Panel(10, 40);
panel->setBackground(IMAGE_PANEL);
@@ -705,7 +705,7 @@ void OSystem_WINCE3::update_game_settings() {
// Skip
panel->add(NAME_ITEM_SKIP, new ItemAction(ITEM_SKIP, POCKET_ACTION_SKIP));
// sound
- panel->add(NAME_ITEM_SOUND, new ItemSwitch(ITEM_SOUND_OFF, ITEM_SOUND_ON, &_soundMaster));
+ panel->add(NAME_ITEM_SOUND, new ItemSwitch(ITEM_SOUND_OFF, ITEM_SOUND_ON, &_soundMaster));
// portrait/landscape - screen dependant
// FIXME : will still display the portrait/landscape icon when using a scaler (but will be disabled)
if (_screenWidth <= 320 && (isOzone() || !CEDevice::hasDesktopResolution())) {
@@ -735,7 +735,7 @@ void OSystem_WINCE3::update_game_settings() {
ConfMan.flushToDisk();
}
}
-
+
get_sample_rate();
}
@@ -766,7 +766,7 @@ void OSystem_WINCE3::initSize(uint w, uint h, int overlayScale) {
if (h == 240)
_toolbarHandler.setOffset(200);
else
- _toolbarHandler.setOffset(400);
+ _toolbarHandler.setOffset(400);
}
if (w != _screenWidth || h != _screenHeight)
@@ -774,18 +774,18 @@ void OSystem_WINCE3::initSize(uint w, uint h, int overlayScale) {
//OSystem_SDL::initSize(w, h, overlayScale);
OSystem_SDL::initSize(w, h, 1);
-
+
if (_scalersChanged) {
unloadGFXMode();
loadGFXMode();
_scalersChanged = false;
}
- update_game_settings();
+ update_game_settings();
}
int OSystem_WINCE3::getDefaultGraphicsMode() const {
- return GFX_NORMAL;
+ return GFX_NORMAL;
}
bool OSystem_WINCE3::update_scalers() {
@@ -797,7 +797,7 @@ bool OSystem_WINCE3::update_scalers() {
if (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
_scaleFactorXm = 3;
_scaleFactorXd = 4;
- _scaleFactorYm = 1;
+ _scaleFactorYm = 1;
_scaleFactorYd = 1;
_scalerProc = PocketPCPortrait;
_modeFlags = 0;
@@ -824,7 +824,7 @@ bool OSystem_WINCE3::update_scalers() {
//#ifdef WIN32_PLATFORM_WFSP
if (_isSmartphone) {
- if (_screenWidth > 320)
+ if (_screenWidth > 320)
error("Game resolution not supported on Smartphone");
_scaleFactorXm = 2;
_scaleFactorXd = 3;
@@ -862,30 +862,30 @@ bool OSystem_WINCE3::setGraphicsMode(int mode) {
_scaleFactorXm = -1;
_scaleFactorXd = -1;
- _scaleFactorYm = -1;
- _scaleFactorYd = -1;
+ _scaleFactorYm = -1;
+ _scaleFactorYd = -1;
_newOrientation = _orientationLandscape = (ConfMan.hasKey("landscape") ? ConfMan.getBool("landscape") : false);
-
+
update_scalers();
// FIXME
if (isOzone() && (getScreenWidth() >= 640 || getScreenHeight() >= 640) && mode)
_scaleFactorXm = -1;
-
+
if (CEDevice::hasPocketPCResolution() && !CEDevice::hasWideResolution() && _orientationLandscape)
- _mode = GFX_NORMAL;
+ _mode = GFX_NORMAL;
else
_mode = mode;
- if (_scaleFactorXm < 0) {
+ if (_scaleFactorXm < 0) {
/* Standard scalers, from the SDL backend */
- switch(_mode) {
- case GFX_NORMAL:
- _scaleFactor = 1;
+ switch(_mode) {
+ case GFX_NORMAL:
+ _scaleFactor = 1;
_scalerProc = Normal1x;
break;
- case GFX_DOUBLESIZE:
+ case GFX_DOUBLESIZE:
_scaleFactor = 2;
_scalerProc = Normal2x;
break;
@@ -932,7 +932,7 @@ bool OSystem_WINCE3::setGraphicsMode(int mode) {
default:
error("unknown gfx mode %d", _mode);
- }
+ }
}
// Check if the scaler can be accepted, if not get back to normal scaler
@@ -972,20 +972,20 @@ void OSystem_WINCE3::loadGFXMode() {
int displayWidth;
int displayHeight;
- _fullscreen = true; // forced
+ _fullscreen = true; // forced
_forceFull = true;
_modeFlags |= DF_UPDATE_EXPAND_1_PIXEL;
-
+
_tmpscreen = NULL;
// Recompute scalers if necessary
update_scalers();
- //
+ //
// Create the surface that contains the 8 bit game data
_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth, _screenHeight, 8, 0, 0, 0, 0);
if (_screen == NULL)
- error("_screen failed");
+ error("_screen failed");
//
// Create the surface that contains the scaled graphics in 16 bit mode
@@ -993,16 +993,16 @@ void OSystem_WINCE3::loadGFXMode() {
// Always use full screen mode to have a "clean screen"
displayWidth = _screenWidth * _scaleFactorXm / _scaleFactorXd;
- displayHeight = _screenHeight * _scaleFactorYm / _scaleFactorYd;
+ displayHeight = _screenHeight * _scaleFactorYm / _scaleFactorYd;
// FIXME
if (!(displayWidth > GetSystemMetrics(SM_CXSCREEN))) { // no rotation
displayWidth = GetSystemMetrics(SM_CXSCREEN);
- displayHeight = GetSystemMetrics(SM_CYSCREEN);
+ displayHeight = GetSystemMetrics(SM_CYSCREEN);
}
-
+
_hwscreen = SDL_SetVideoMode(displayWidth, displayHeight, 16, SDL_FULLSCREEN | SDL_SWSURFACE);
- if (_hwscreen == NULL) {
+ if (_hwscreen == NULL) {
// DON'T use error(), as this tries to bring up the debug
// console, which WON'T WORK now that _hwscreen is hosed.
@@ -1020,8 +1020,8 @@ void OSystem_WINCE3::loadGFXMode() {
// of a failure, rollback is trivial. Only if everything worked fine
// do we "commit" the changed values to the member vars.
warning("SDL_SetVideoMode says we can't switch to that mode");
- quit();
- }
+ quit();
+ }
//
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
@@ -1033,11 +1033,11 @@ void OSystem_WINCE3::loadGFXMode() {
else
InitScalers(565);
initCEScaler();
-
+
// Need some extra bytes around when using 2xSaI
_tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE,
- _screenWidth + 3,
- _screenHeight + 3,
+ _screenWidth + 3,
+ _screenHeight + 3,
16,
_hwscreen->format->Rmask,
_hwscreen->format->Gmask,
@@ -1091,17 +1091,17 @@ void OSystem_WINCE3::loadGFXMode() {
_km.x_max = _screenWidth * _scaleFactorXm / _scaleFactorXd - 1;
_km.y_max = _screenHeight * _scaleFactorXm / _scaleFactorXd - 1;
_km.delay_time = 25;
- _km.last_time = 0;
+ _km.last_time = 0;
}
void OSystem_WINCE3::unloadGFXMode() {
if (_screen) {
SDL_FreeSurface(_screen);
- _screen = NULL;
+ _screen = NULL;
}
if (_hwscreen) {
- SDL_FreeSurface(_hwscreen);
+ SDL_FreeSurface(_hwscreen);
_hwscreen = NULL;
}
@@ -1121,7 +1121,7 @@ void OSystem_WINCE3::hotswapGFXMode() {
SDL_Surface *old_tmpscreen = _tmpscreen;
// Release the HW screen surface
- SDL_FreeSurface(_hwscreen);
+ SDL_FreeSurface(_hwscreen);
// Release toolbars
free(_toolbarLow->pixels);
@@ -1140,14 +1140,14 @@ void OSystem_WINCE3::hotswapGFXMode() {
// Restore old screen content
SDL_BlitSurface(old_screen, NULL, _screen, NULL);
SDL_BlitSurface(old_tmpscreen, NULL, _tmpscreen, NULL);
-
+
// Free the old surfaces
SDL_FreeSurface(old_screen);
SDL_FreeSurface(old_tmpscreen);
// Blit everything to the screen
internUpdateScreen();
-
+
// Make sure that an EVENT_SCREEN_CHANGED gets sent later
_modeChanged = true;
}
@@ -1185,14 +1185,14 @@ void OSystem_WINCE3::internUpdateScreen() {
// 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.
+ // screen surface accordingly.
if (_paletteDirtyEnd != 0) {
- SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart,
+ SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart,
_paletteDirtyStart,
_paletteDirtyEnd - _paletteDirtyStart);
-
+
_paletteDirtyEnd = 0;
_forceFull = true;
@@ -1228,7 +1228,7 @@ void OSystem_WINCE3::internUpdateScreen() {
// Only draw anything if necessary
if (_numDirtyRects > 0) {
- SDL_Rect *r;
+ SDL_Rect *r;
SDL_Rect dst;
uint32 srcPitch, dstPitch;
SDL_Rect *last_rect = _dirtyRectList + _numDirtyRects;
@@ -1273,11 +1273,11 @@ void OSystem_WINCE3::internUpdateScreen() {
register int dst_h = 0;
register int orig_dst_y = 0;
- // Check if the toolbar is overwritten
+ // Check if the toolbar is overwritten
if (!_forceFull && toolbarVisible && r->y + r->h >= toolbarOffset) {
_toolbarHandler.forceRedraw();
}
-
+
if (dst_y < _screenHeight) {
dst_h = r->h;
if (dst_h > _screenHeight - dst_y)
@@ -1290,7 +1290,7 @@ void OSystem_WINCE3::internUpdateScreen() {
orig_dst_y = dst_y;
dst_y = real2Aspect(dst_y);
}
-
+
if (!_zoomDown)
_scalerProc((byte *)srcSurf->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
(byte *)_hwscreen->pixels + (r->x * 2 * _scaleFactorXm / _scaleFactorXd) + dst_y * dstPitch, dstPitch, r->w, dst_h);
@@ -1326,7 +1326,7 @@ void OSystem_WINCE3::internUpdateScreen() {
// Add the toolbar if needed
SDL_Rect toolbar_rect[1];
if (_toolbarHandler.draw(_toolbarLow, &toolbar_rect[0])) {
- // It can be drawn, scale it
+ // It can be drawn, scale it
uint32 srcPitch, dstPitch;
SDL_Surface *toolbarSurface;
@@ -1338,7 +1338,7 @@ void OSystem_WINCE3::internUpdateScreen() {
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;
+ _toolbarHighDrawn = true;
}
else
_toolbarHighDrawn = false;
@@ -1353,7 +1353,7 @@ void OSystem_WINCE3::internUpdateScreen() {
SDL_LockSurface(toolbarSurface);
SDL_LockSurface(_hwscreen);
srcPitch = toolbarSurface->pitch;
- dstPitch = _hwscreen->pitch;
+ dstPitch = _hwscreen->pitch;
_scalerProc((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);
@@ -1375,7 +1375,7 @@ void OSystem_WINCE3::internUpdateScreen() {
_numDirtyRects = 0;
_forceFull = false;
}
-
+
bool OSystem_WINCE3::saveScreenshot(const char *filename) {
assert(_hwscreen != NULL);
@@ -1418,13 +1418,13 @@ void OSystem_WINCE3::drawMouse() {
void OSystem_WINCE3::fillMouseEvent(Event &event, int x, int y) {
event.mouse.x = x;
event.mouse.y = y;
-
+
// Update the "keyboard mouse" coords
_km.x = event.mouse.x;
_km.y = event.mouse.y;
// Adjust for the screen scaling
- if (_zoomDown)
+ if (_zoomDown)
event.mouse.y += 240;
event.mouse.x = event.mouse.x * _scaleFactorXd / _scaleFactorXm;
@@ -1515,7 +1515,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
memset(&event, 0, sizeof(Event));
handleKbdMouse();
-
+
// If the screen mode changed, send an EVENT_SCREEN_CHANGED
if (_modeChanged) {
_modeChanged = false;
@@ -1534,7 +1534,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
// KMOD_RESERVED is used if the key has been injected by an external buffer
if (ev.key.keysym.mod != KMOD_RESERVED) {
if (_isSmartphone) {
- keyEvent = true;
+ keyEvent = true;
_lastKeyPressed = ev.key.keysym.sym;
_keyRepeatTime = currentTime;
_keyRepeat = 0;
@@ -1550,12 +1550,12 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
if (GUI_Actions::Instance()->mappingActive())
event.kbd.flags = 0xFF;
-
+
return true;
-
- case SDL_KEYUP:
+
+ case SDL_KEYUP:
// KMOD_RESERVED is used if the key has been injected by an external buffer
- if (ev.key.keysym.mod != KMOD_RESERVED) {
+ if (ev.key.keysym.mod != KMOD_RESERVED) {
if (_isSmartphone) {
keyEvent = true;
_lastKeyPressed = 0;
@@ -1564,11 +1564,11 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
if (!GUI_Actions::Instance()->mappingActive() && GUI_Actions::Instance()->performMapped(ev.key.keysym.sym, false))
return true;
}
-
+
event.type = EVENT_KEYUP;
event.kbd.keycode = ev.key.keysym.sym;
event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
-
+
if (GUI_Actions::Instance()->mappingActive())
event.kbd.flags = 0xFF;
diff --git a/backends/wince/wince-sdl.h b/backends/wince/wince-sdl.h
index 27f16df378..9d4c1c401c 100644
--- a/backends/wince/wince-sdl.h
+++ b/backends/wince/wince-sdl.h
@@ -99,10 +99,10 @@ protected:
void hotswapGFXMode();
bool saveScreenshot(const char *filename);
-
- const GraphicsMode *getSupportedGraphicsModes() const;
+
+ const GraphicsMode *getSupportedGraphicsModes() const;
bool setGraphicsMode(int mode);
- //int getGraphicsMode() const;
+ //int getGraphicsMode() const;
int getDefaultGraphicsMode() const;
void setWindowCaption(const char *caption);
@@ -127,7 +127,7 @@ private:
void update_game_settings();
void check_mappings();
void update_keyboard();
- void get_sample_rate();
+ void get_sample_rate();
void retrieve_mouse_location(int &x, int &y);
@@ -146,7 +146,7 @@ private:
bool _forcePanelInvisible; // force panel visibility for some cases
bool _panelVisible; // panel visibility
bool _panelStateForced; // panel visibility forced by external call
-
+
bool _panelInitialized; // only initialize the toolbar once
bool _monkeyKeyboard; // forced keyboard for Monkey Island copy protection
@@ -158,7 +158,7 @@ private:
bool _saveToolbarState; // save visibility when forced
String _saveActiveToolbar; // save active toolbar when forced
- bool _saveToolbarZoom; // save visibility when zooming
+ bool _saveToolbarZoom; // save visibility when zooming
bool _zoomUp; // zooming up mode
bool _zoomDown; // zooming down mode
@@ -166,11 +166,11 @@ private:
int _scaleFactorXd; // scaler X /
int _scaleFactorYm; // scaler Y *
int _scaleFactorYd; // scaler Y /
- bool _scalersChanged;
+ bool _scalersChanged;
static int _platformScreenWidth;
static int _platformScreenHeight;
- static bool _isOzone; // true if running on Windows 2003 SE
+ static bool _isOzone; // true if running on Windows 2003 SE
// Smartphone specific variables