aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-05-11 00:40:13 +0200
committerEinar Johan Trøan Sømåen2012-06-02 12:42:10 +0200
commitd2d43da4f07e54c446532b85ba01d4d0f96d707a (patch)
tree38d861418b0337ff8af8864a79e429909b8f155c /engines
parent4cf1d67140fbcf290a8ad1100ede7717a43e0863 (diff)
downloadscummvm-rg350-d2d43da4f07e54c446532b85ba01d4d0f96d707a.tar.gz
scummvm-rg350-d2d43da4f07e54c446532b85ba01d4d0f96d707a.tar.bz2
scummvm-rg350-d2d43da4f07e54c446532b85ba01d4d0f96d707a.zip
WINTERMUTE: Cleanup the includes in Platform SDL
This should remove the last SDL-include in-engine
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/PlatformSDL.cpp21
-rw-r--r--engines/wintermute/PlatformSDL.h5
2 files changed, 6 insertions, 20 deletions
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp
index 3ed76aefa9..740a0bfa87 100644
--- a/engines/wintermute/PlatformSDL.cpp
+++ b/engines/wintermute/PlatformSDL.cpp
@@ -35,16 +35,6 @@ THE SOFTWARE.
#include "common/textconsole.h"
#include "common/system.h"
-#include "SDL.h" // TODO remove
-
-#ifdef __WIN32__
-# include <dbghelp.h>
-# include <direct.h>
-#else
-# include <unistd.h>
-#endif
-
-
namespace WinterMute {
CBGame *CBPlatform::Game = NULL;
@@ -313,7 +303,7 @@ void CBPlatform::HandleEvent(Common::Event *event) {
}
//////////////////////////////////////////////////////////////////////////
-int CBPlatform::SDLEventWatcher(void *userdata, SDL_Event *event) {
+int CBPlatform::SDLEventWatcher(void *userdata, Common::Event *event) {
//TODO
/* if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_MINIMIZED) {
if (Game) Game->AutoSaveOnExit();
@@ -346,17 +336,16 @@ void CBPlatform::OutputDebugString(LPCSTR lpOutputString) {
//////////////////////////////////////////////////////////////////////////
uint32 CBPlatform::GetTime() {
- return SDL_GetTicks();
+ return g_system->getMillis();
}
//////////////////////////////////////////////////////////////////////////
BOOL CBPlatform::GetCursorPos(LPPOINT lpPoint) {
CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer);
- int x, y;
- SDL_GetMouseState(&x, &y);
- lpPoint->x = x;
- lpPoint->y = y;
+ Common::Point p = g_system->getEventManager()->getMousePos();
+ lpPoint->x = p.x;
+ lpPoint->y = p.y;
renderer->PointFromScreen(lpPoint);
diff --git a/engines/wintermute/PlatformSDL.h b/engines/wintermute/PlatformSDL.h
index 788a534983..cfb5b6e930 100644
--- a/engines/wintermute/PlatformSDL.h
+++ b/engines/wintermute/PlatformSDL.h
@@ -34,13 +34,10 @@
#include "wintypes.h"
#include "common/events.h"
-union SDL_Event;
-
namespace WinterMute {
class CBGame;
-
//////////////////////////////////////////////////////////////////////////
class CBPlatform {
public:
@@ -82,7 +79,7 @@ public:
static char *strlwr(char *string);
// sdl event callback
- static int SDLEventWatcher(void *userdata, SDL_Event *event);
+ static int SDLEventWatcher(void *userdata, Common::Event *event);
private:
static CBGame *Game;