[Scummvm-cvs-logs] SF.net SVN: scummvm:[53978] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Oct 31 18:10:47 CET 2010


Revision: 53978
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53978&view=rev
Author:   fingolfin
Date:     2010-10-31 17:10:45 +0000 (Sun, 31 Oct 2010)

Log Message:
-----------
WINCE: Enable use of forbidden symbols, cleanup

I tried to untangle the header interdependencies a bit, but this
is still quite a mess.
This commit also fixes some warnings.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp
    scummvm/trunk/backends/platform/wince/CEActionsPocket.h
    scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h
    scummvm/trunk/backends/platform/wince/CEDevice.cpp
    scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp
    scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp
    scummvm/trunk/backends/platform/wince/CEgui/GUIElement.h
    scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.cpp
    scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.h
    scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp
    scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp
    scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.h
    scummvm/trunk/backends/platform/wince/CEgui/Toolbar.h
    scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp
    scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp
    scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.h
    scummvm/trunk/backends/platform/wince/missing/missing.cpp
    scummvm/trunk/backends/platform/wince/wince-sdl.cpp
    scummvm/trunk/gui/Actions.cpp

Modified: scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,21 +23,25 @@
  *
  */
 
+// 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 "scumm/scumm.h"
 #include "common/config-manager.h"
 #include "gui/KeysDialog.h"
 
 #include "common/translation.h"
 
+
 #ifdef _WIN32_WCE
 #define		KEY_ALL_SKIP	3457
 #endif
 
-const String pocketActionNames[] = {
+const Common::String pocketActionNames[] = {
 	_s("Pause"),
 	_s("Save"),
 	_s("Quit"),
@@ -64,7 +68,7 @@
 }
 
 
-String CEActionsPocket::actionName(GUI::ActionType action) {
+Common::String CEActionsPocket::actionName(GUI::ActionType action) {
 	return _(pocketActionNames[action]);
 }
 
@@ -72,7 +76,7 @@
 	return POCKET_ACTION_LAST;
 }
 
-String CEActionsPocket::domain() {
+Common::String CEActionsPocket::domain() {
 	return ConfMan.kApplicationDomain;
 }
 
@@ -114,7 +118,7 @@
 }
 
 void CEActionsPocket::initInstanceGame() {
-	String gameid(ConfMan.get("gameid"));
+	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);

Modified: scummvm/trunk/backends/platform/wince/CEActionsPocket.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsPocket.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEActionsPocket.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -28,7 +28,7 @@
 
 #include "common/scummsys.h"
 #include "common/system.h"
-#include "wince-sdl.h"
+#include "common/str.h"
 #include "gui/Key.h"
 #include "gui/Actions.h"
 
@@ -58,11 +58,13 @@
 	POCKET_ACTION_LAST
 };
 
+class OSystem_WINCE3;
+
 class CEActionsPocket : public GUI::Actions {
 	public:
 		// Actions
 		bool perform(GUI::ActionType action, bool pushed = true);
-		String actionName(GUI::ActionType action);
+		Common::String actionName(GUI::ActionType action);
 		int size();
 
 		static void init();
@@ -70,7 +72,7 @@
 		void initInstanceGame();
 
 		// Action domain
-		String domain();
+		Common::String domain();
 		int version();
 
 		// Utility

Modified: scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,10 +23,14 @@
  *
  */
 
+// 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 "scumm/scumm.h"
 #include "common/config-manager.h"
 #include "gui/KeysDialog.h"
 

Modified: scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -28,7 +28,7 @@
 
 #include "common/scummsys.h"
 #include "common/system.h"
-#include "wince-sdl.h"
+#include "common/str.h"
 #include "gui/Key.h"
 #include "gui/Actions.h"
 
@@ -58,14 +58,14 @@
 	public:
 		// Actions
 		bool perform(GUI::ActionType action, bool pushed = true);
-		String actionName(GUI::ActionType action);
+		Common::String actionName(GUI::ActionType action);
 		int size();
 		static void init();
 		void initInstanceMain(OSystem *mainSystem);
 		void initInstanceGame();
 
 		// Action domain
-		String domain();
+		Common::String domain();
 		int version();
 
 		~CEActionsSmartphone();

Modified: scummvm/trunk/backends/platform/wince/CEDevice.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEDevice.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEDevice.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,11 +23,14 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
 #include "CEDevice.h"
 
 #include <SDL.h>
 
-#include "wince-sdl.h"
+#include "backends/platform/wince/wince-sdl.h"
 
 static void (WINAPI* _SHIdleTimerReset)(void) = NULL;
 static HANDLE (WINAPI* _SetPowerRequirement)(PVOID,int,ULONG,PVOID,ULONG) = NULL;

Modified: scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CELauncherDialog.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,8 +23,10 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-#include "wince-sdl.h"
+#include "backends/platform/wince/wince-sdl.h"
 
 #include "CELauncherDialog.h"
 

Modified: scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,11 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include <SDL.h>
+
 #include "Toolbar.h"
 
 #include "SDL_ImageResource.h"

Modified: scummvm/trunk/backends/platform/wince/CEgui/GUIElement.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/GUIElement.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/GUIElement.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -29,12 +29,12 @@
 #include "common/scummsys.h"
 #include "common/system.h"
 
-#include "SDL.h"
+struct SDL_Surface;
 
-#include "SDL_ImageResource.h"
-
 namespace CEGUI {
 
+	class SDL_ImageResource;
+
 	class GUIElement {
 	public:
 		bool setBackground(WORD backgroundReference);

Modified: scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -24,6 +24,7 @@
  */
 
 #include "ItemSwitch.h"
+#include "SDL_ImageResource.h"
 
 namespace CEGUI {
 

Modified: scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/ItemSwitch.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -35,6 +35,7 @@
 using GUI::Key;
 
 namespace CEGUI {
+	class SDL_ImageResource;
 
 	class ItemSwitch : public PanelItem {
 	public:

Modified: scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,11 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include <SDL.h>
+
 #include "PanelKeyboard.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,10 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include "SDL.h"
 #include "SDL_ImageResource.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -29,7 +29,7 @@
 #include "common/scummsys.h"
 #include "common/system.h"
 
-#include "SDL.h"
+struct SDL_Surface;
 
 namespace CEGUI {
 	class SDL_ImageResource {

Modified: scummvm/trunk/backends/platform/wince/CEgui/Toolbar.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/Toolbar.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/Toolbar.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -27,11 +27,7 @@
 #define CEGUI_TOOLBAR_H
 
 #include "common/scummsys.h"
-#include "common/system.h"
 
-//#include "common/map.h"
-#include "common/str.h"
-
 #include "GUIElement.h"
 
 

Modified: scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,11 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include <SDL.h>
+
 #include "ToolbarHandler.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,11 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include <SDL.h>
+
 #include "EventsBuffer.h"
 
 namespace CEKEYS {

Modified: scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.h	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.h	2010-10-31 17:10:45 UTC (rev 53978)
@@ -30,8 +30,6 @@
 #include "common/system.h"
 #include "common/list.h"
 
-#include <SDL.h>
-
 #include "gui/Key.h"
 
 namespace CEKEYS {

Modified: scummvm/trunk/backends/platform/wince/missing/missing.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/missing/missing.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/missing/missing.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -29,6 +29,8 @@
  * by Vasyl Tsvirkunov
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
 
 #include <windows.h>
 #include <tchar.h>

Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -23,6 +23,9 @@
  *
  */
 
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
 #include "backends/platform/wince/wince-sdl.h"
 
 #include "common/config-manager.h"
@@ -970,8 +973,9 @@
 		return false;
 	case kFeatureVirtualKeyboard:
 		return (_panelStateForced);
+	default:
+		return OSystem_SDL::getFeatureState(f);
 	}
-	return OSystem_SDL::getFeatureState(f);
 }
 
 void OSystem_WINCE3::check_mappings() {
@@ -2053,7 +2057,7 @@
 	if (SDL_LockSurface(_overlayVisible ? _overlayscreen : _screen) == -1)
 		error("SDL_LockSurface failed: %s", SDL_GetError());
 
-	int x, y;
+	int y;
 	if (!_overlayVisible) {
 		byte *dst, *bak = _mouseBackupOld;
 
@@ -2242,14 +2246,15 @@
 
 	if (unfilter) {
 		switch (key) {
-			case SDLK_ESCAPE:
-				return SDLK_BACKSPACE;
-			case SDLK_F8:
-				return SDLK_ASTERISK;
-			case SDLK_F9:
-				return SDLK_HASH;
+		case SDLK_ESCAPE:
+			return SDLK_BACKSPACE;
+		case SDLK_F8:
+			return SDLK_ASTERISK;
+		case SDLK_F9:
+			return SDLK_HASH;
+		default:
+			return key;
 		}
-		return key;
 	}
 
 	if (key >= SDLK_KP0 && key <= SDLK_KP9) {
@@ -2265,7 +2270,6 @@
 bool OSystem_WINCE3::pollEvent(Common::Event &event) {
 	SDL_Event ev;
 	ev.type = SDL_NOEVENT;
-	byte b = 0;
 	DWORD currentTime;
 	bool keyEvent = false;
 	int deltaX, deltaY;

Modified: scummvm/trunk/gui/Actions.cpp
===================================================================
--- scummvm/trunk/gui/Actions.cpp	2010-10-31 17:01:47 UTC (rev 53977)
+++ scummvm/trunk/gui/Actions.cpp	2010-10-31 17:10:45 UTC (rev 53978)
@@ -25,12 +25,12 @@
 
 #include "gui/Actions.h"
 #include "gui/message.h"
-#include "scumm/scumm.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__)
 	#include "backends/platform/symbian/src/SymbianActions.h"
 #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list