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.

svn-id: r53978
This commit is contained in:
Max Horn 2010-10-31 17:10:45 +00:00
parent ae829727da
commit 086fe78af1
20 changed files with 76 additions and 35 deletions

View File

@ -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 @@ void CEActionsPocket::init() {
}
String CEActionsPocket::actionName(GUI::ActionType action) {
Common::String CEActionsPocket::actionName(GUI::ActionType action) {
return _(pocketActionNames[action]);
}
@ -72,7 +76,7 @@ int CEActionsPocket::size() {
return POCKET_ACTION_LAST;
}
String CEActionsPocket::domain() {
Common::String CEActionsPocket::domain() {
return ConfMan.kApplicationDomain;
}
@ -114,7 +118,7 @@ void CEActionsPocket::initInstanceMain(OSystem *mainSystem) {
}
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);

View File

@ -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 @@ enum pocketActionType {
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 @@ class CEActionsPocket : public GUI::Actions {
void initInstanceGame();
// Action domain
String domain();
Common::String domain();
int version();
// Utility

View File

@ -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"

View File

@ -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 @@ class CEActionsSmartphone : 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();
void initInstanceMain(OSystem *mainSystem);
void initInstanceGame();
// Action domain
String domain();
Common::String domain();
int version();
~CEActionsSmartphone();

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -29,12 +29,12 @@
#include "common/scummsys.h"
#include "common/system.h"
#include "SDL.h"
#include "SDL_ImageResource.h"
struct SDL_Surface;
namespace CEGUI {
class SDL_ImageResource;
class GUIElement {
public:
bool setBackground(WORD backgroundReference);

View File

@ -24,6 +24,7 @@
*/
#include "ItemSwitch.h"
#include "SDL_ImageResource.h"
namespace CEGUI {

View File

@ -35,6 +35,7 @@
using GUI::Key;
namespace CEGUI {
class SDL_ImageResource;
class ItemSwitch : public PanelItem {
public:

View File

@ -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 {

View File

@ -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 {

View File

@ -29,7 +29,7 @@
#include "common/scummsys.h"
#include "common/system.h"
#include "SDL.h"
struct SDL_Surface;
namespace CEGUI {
class SDL_ImageResource {

View File

@ -27,10 +27,6 @@
#define CEGUI_TOOLBAR_H
#include "common/scummsys.h"
#include "common/system.h"
//#include "common/map.h"
#include "common/str.h"
#include "GUIElement.h"

View File

@ -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 {

View File

@ -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 {

View File

@ -30,8 +30,6 @@
#include "common/system.h"
#include "common/list.h"
#include <SDL.h>
#include "gui/Key.h"
namespace CEKEYS {

View File

@ -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>

View File

@ -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 @@ bool OSystem_WINCE3::getFeatureState(Feature f) {
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 @@ void OSystem_WINCE3::undrawMouse() {
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 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) {
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 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) {
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;

View File

@ -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