[Scummvm-cvs-logs] CVS: scummvm/backends/wince CEActionsPocket.cpp,1.13,1.14 CEActionsPocket.h,1.5,1.6 CEActionsSmartphone.cpp,1.10,1.11 CEActionsSmartphone.h,1.5,1.6 CEDevice.cpp,1.9,1.10 CEDevice.h,1.4,1.5 CEException.cpp,1.3,1.4 CEKeysDialog.cpp,1.5,1.6 CELauncherDialog.cpp,1.12,1.13 CEScaler.cpp,1.10,1.11 newres.h,1.3,1.4 resource.h,1.7,1.8 wince-sdl.cpp,1.30,1.31 wince-sdl.h,1.18,1.19
Eugene Sandulenko
sev at users.sourceforge.net
Sat Jul 30 14:15:11 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.h,1.86,1.87 animation.h,1.28,1.29 console.h,1.15,1.16 events.h,1.19,1.20 font.h,1.15,1.16 gfx.h,1.35,1.36 interface.h,1.66,1.67 isomap.h,1.24,1.25 list.h,1.10,1.11 objectmap.h,1.23,1.24 puzzle.h,1.5,1.6 rscfile.h,1.14,1.15 saga.h,1.112,1.113 scene.h,1.66,1.67 script.h,1.99,1.100 sndres.h,1.22,1.23 sound.h,1.23,1.24 sprite.h,1.22,1.23 sthread.cpp,1.92,1.93
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common array.h,1.5,1.6 config-file.cpp,1.26,1.27 config-file.h,1.13,1.14 config-manager.cpp,1.37,1.38 config-manager.h,1.24,1.25 debugger.h,1.8,1.9 endian.h,1.1,1.2 file.h,1.37,1.38 list.h,1.27,1.28 map.h,1.25,1.26 md5.cpp,1.9,1.10 mutex.cpp,1.3,1.4 rect.h,1.26,1.27 savefile.cpp,1.27,1.28 savefile.h,1.21,1.22 scaler.cpp,1.70,1.71 scummsys.h,1.64,1.65 singleton.h,1.15,1.16 stack.h,1.5,1.6 str.cpp,1.36,1.37 str.h,1.27,1.28 stream.cpp,1.9,1.10 stream.h,1.21,1.22 system.h,1.103,1.104 timer.cpp,1.35,1.36 util.cpp,1.57,1.58 util.h,1.53,1.54
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9428/backends/wince
Modified Files:
CEActionsPocket.cpp CEActionsPocket.h CEActionsSmartphone.cpp
CEActionsSmartphone.h CEDevice.cpp CEDevice.h CEException.cpp
CEKeysDialog.cpp CELauncherDialog.cpp CEScaler.cpp newres.h
resource.h wince-sdl.cpp wince-sdl.h
Log Message:
Remove trailing whitespaces.
Index: CEActionsPocket.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsPocket.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CEActionsPocket.cpp 5 Jul 2005 20:51:53 -0000 1.13
+++ CEActionsPocket.cpp 30 Jul 2005 21:10:55 -0000 1.14
@@ -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 @@
_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 @@
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 @@
_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;
Index: CEActionsPocket.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsPocket.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CEActionsPocket.h 5 Jul 2005 20:22:36 -0000 1.5
+++ CEActionsPocket.h 30 Jul 2005 21:10:55 -0000 1.6
@@ -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 @@
bool _hide_toolbar_needed;
bool _zoom_needed;
OSystem_WINCE3 *_CESystem;
- };
+ };
#endif
Index: CEActionsSmartphone.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsSmartphone.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- CEActionsSmartphone.cpp 5 Jul 2005 20:51:54 -0000 1.10
+++ CEActionsSmartphone.cpp 30 Jul 2005 21:10:55 -0000 1.11
@@ -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 @@
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 @@
// 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 @@
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;
Index: CEActionsSmartphone.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsSmartphone.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CEActionsSmartphone.h 5 Jul 2005 20:22:36 -0000 1.5
+++ CEActionsSmartphone.h 30 Jul 2005 21:10:55 -0000 1.6
@@ -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 @@
CEActionsSmartphone(GameDetector &detector);
bool _right_click_needed;
OSystem_WINCE3 *_CESystem;
- };
+ };
#endif
Index: CEDevice.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEDevice.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CEDevice.cpp 24 Jun 2005 15:22:33 -0000 1.9
+++ CEDevice.cpp 30 Jul 2005 21:10:55 -0000 1.10
@@ -148,13 +148,13 @@
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 @@
//#endif
sprintf(key_name, "Key %.4x", keyCode);
- return key_name;
+ return key_name;
}
Index: CEDevice.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEDevice.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CEDevice.h 1 Jan 2005 16:08:48 -0000 1.4
+++ CEDevice.h 30 Jul 2005 21:10:55 -0000 1.5
@@ -38,7 +38,7 @@
static bool hasDesktopResolution();
static bool hasWideResolution();
static bool hasSmartphoneResolution();
- static Common::String getKeyName(unsigned int keyCode);
+ static Common::String getKeyName(unsigned int keyCode);
};
#endif
Index: CEException.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEException.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CEException.cpp 28 Jan 2005 23:45:51 -0000 1.3
+++ CEException.cpp 30 Jul 2005 21:10:55 -0000 1.4
@@ -139,8 +139,8 @@
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)
Index: CEKeysDialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEKeysDialog.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CEKeysDialog.cpp 24 Jun 2005 15:22:33 -0000 1.5
+++ CEKeysDialog.cpp 30 Jul 2005 21:10:55 -0000 1.6
@@ -56,7 +56,7 @@
// 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 @@
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);
Index: CELauncherDialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CELauncherDialog.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- CELauncherDialog.cpp 5 Jul 2005 20:22:36 -0000 1.12
+++ CELauncherDialog.cpp 30 Jul 2005 21:10:55 -0000 1.13
@@ -42,7 +42,7 @@
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 @@
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 @@
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 @@
}
else
GUILauncherDialog::addGame();
-}
+}
Index: CEScaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEScaler.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- CEScaler.cpp 5 Jul 2005 20:22:36 -0000 1.10
+++ CEScaler.cpp 30 Jul 2005 21:10:55 -0000 1.11
@@ -35,7 +35,7 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
height--;
}
}
-}
+}
//#endif
Index: newres.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/newres.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- newres.h 4 Apr 2003 13:14:15 -0000 1.3
+++ newres.h 30 Jul 2005 21:10:55 -0000 1.4
@@ -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
Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/resource.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- resource.h 26 Jan 2004 08:15:50 -0000 1.7
+++ resource.h 30 Jul 2005 21:10:56 -0000 1.8
@@ -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
Index: wince-sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince-sdl.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- wince-sdl.cpp 5 Jul 2005 20:22:36 -0000 1.30
+++ wince-sdl.cpp 30 Jul 2005 21:10:56 -0000 1.31
@@ -51,7 +51,7 @@
#include <vorbis/vorbisfile.h>
#endif
-using namespace CEGUI;
+using namespace CEGUI;
// ********************************************************************************************
@@ -151,7 +151,7 @@
}
return 0;
-}
+}
// ********************************************************************************************
@@ -208,7 +208,7 @@
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 @@
}
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 @@
addDirtyRect(0, 400, 640, 80);
else
addDirtyRect(0, 200, 320, 40);
-
+
internUpdateScreen();
}
}
@@ -277,7 +277,7 @@
_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 @@
internUpdateScreen();
}
-void OSystem_WINCE3::swap_zoom_down() {
+void OSystem_WINCE3::swap_zoom_down() {
if (_zoomDown) {
// restore visibility
_toolbarHandler.setVisible(_saveToolbarZoom);
@@ -410,7 +410,7 @@
if (y > 200)
y = 200;
- EventsBuffer::simulateMouseMove(x, y);
+ EventsBuffer::simulateMouseMove(x, y);
}
void OSystem_WINCE3::move_cursor_left() {
@@ -420,7 +420,7 @@
x -= _stepX3;
else
if (_keyRepeat)
- x -= _stepX2;
+ x -= _stepX2;
else
x -= _stepX1;
@@ -611,7 +611,7 @@
_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 @@
// 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 @@
}
// 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 @@
// 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 @@
// 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 @@
ConfMan.flushToDisk();
}
}
-
+
get_sample_rate();
}
@@ -766,7 +766,7 @@
if (h == 240)
_toolbarHandler.setOffset(200);
else
- _toolbarHandler.setOffset(400);
+ _toolbarHandler.setOffset(400);
}
if (w != _screenWidth || h != _screenHeight)
@@ -774,18 +774,18 @@
//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 @@
if (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth)) {
_scaleFactorXm = 3;
_scaleFactorXd = 4;
- _scaleFactorYm = 1;
+ _scaleFactorYm = 1;
_scaleFactorYd = 1;
_scalerProc = PocketPCPortrait;
_modeFlags = 0;
@@ -824,7 +824,7 @@
//#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 @@
_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 @@
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 @@
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 @@
// 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 @@
// 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 @@
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 @@
_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 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
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 @@
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 @@
// 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 @@
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 @@
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 @@
_numDirtyRects = 0;
_forceFull = false;
}
-
+
bool OSystem_WINCE3::saveScreenshot(const char *filename) {
assert(_hwscreen != NULL);
@@ -1418,13 +1418,13 @@
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 @@
memset(&event, 0, sizeof(Event));
handleKbdMouse();
-
+
// If the screen mode changed, send an EVENT_SCREEN_CHANGED
if (_modeChanged) {
_modeChanged = false;
@@ -1534,7 +1534,7 @@
// 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 @@
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 @@
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;
Index: wince-sdl.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince-sdl.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- wince-sdl.h 16 Mar 2005 22:27:11 -0000 1.18
+++ wince-sdl.h 30 Jul 2005 21:10:56 -0000 1.19
@@ -99,10 +99,10 @@
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 @@
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 @@
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 @@
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 @@
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
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.h,1.86,1.87 animation.h,1.28,1.29 console.h,1.15,1.16 events.h,1.19,1.20 font.h,1.15,1.16 gfx.h,1.35,1.36 interface.h,1.66,1.67 isomap.h,1.24,1.25 list.h,1.10,1.11 objectmap.h,1.23,1.24 puzzle.h,1.5,1.6 rscfile.h,1.14,1.15 saga.h,1.112,1.113 scene.h,1.66,1.67 script.h,1.99,1.100 sndres.h,1.22,1.23 sound.h,1.23,1.24 sprite.h,1.22,1.23 sthread.cpp,1.92,1.93
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common array.h,1.5,1.6 config-file.cpp,1.26,1.27 config-file.h,1.13,1.14 config-manager.cpp,1.37,1.38 config-manager.h,1.24,1.25 debugger.h,1.8,1.9 endian.h,1.1,1.2 file.h,1.37,1.38 list.h,1.27,1.28 map.h,1.25,1.26 md5.cpp,1.9,1.10 mutex.cpp,1.3,1.4 rect.h,1.26,1.27 savefile.cpp,1.27,1.28 savefile.h,1.21,1.22 scaler.cpp,1.70,1.71 scummsys.h,1.64,1.65 singleton.h,1.15,1.16 stack.h,1.5,1.6 str.cpp,1.36,1.37 str.h,1.27,1.28 stream.cpp,1.9,1.10 stream.h,1.21,1.22 system.h,1.103,1.104 timer.cpp,1.35,1.36 util.cpp,1.57,1.58 util.h,1.53,1.54
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list