aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/PlatformSDL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/PlatformSDL.cpp')
-rw-r--r--engines/wintermute/PlatformSDL.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp
index cbfa93c488..9803ffb928 100644
--- a/engines/wintermute/PlatformSDL.cpp
+++ b/engines/wintermute/PlatformSDL.cpp
@@ -166,7 +166,7 @@ int CBPlatform::SDLEventWatcher(void *userdata, Common::Event *event) {
//////////////////////////////////////////////////////////////////////////
// Win32 API bindings
//////////////////////////////////////////////////////////////////////////
-void CBPlatform::outputDebugString(LPCSTR lpOutputString) {
+void CBPlatform::outputDebugString(const char *lpOutputString) {
/*
#ifdef __WIN32__
::OutputDebugString(lpOutputString);
@@ -181,7 +181,7 @@ uint32 CBPlatform::getTime() {
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::getCursorPos(LPPOINT lpPoint) {
+bool CBPlatform::getCursorPos(Common::Point *lpPoint) {
CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer);
Common::Point p = g_system->getEventManager()->getMousePos();
@@ -197,7 +197,7 @@ bool CBPlatform::getCursorPos(LPPOINT lpPoint) {
bool CBPlatform::setCursorPos(int X, int Y) {
CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer);
- POINT p;
+ Common::Point p;
p.x = X;
p.y = Y;
renderer->pointToScreen(&p);
@@ -245,23 +245,23 @@ bool CBPlatform::setForegroundWindow() {
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::setRectEmpty(LPRECT lprc) {
+bool CBPlatform::setRectEmpty(Common::Rect *lprc) {
lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
return true;
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::isRectEmpty(const LPRECT lprc) {
+bool CBPlatform::isRectEmpty(const Common::Rect *lprc) {
return (lprc->left >= lprc->right) || (lprc->top >= lprc->bottom);
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::ptInRect(LPRECT lprc, POINT p) {
+bool CBPlatform::ptInRect(Common::Rect *lprc, Common::Point p) {
return (p.x >= lprc->left) && (p.x < lprc->right) && (p.y >= lprc->top) && (p.y < lprc->bottom);
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::setRect(LPRECT lprc, int left, int top, int right, int bottom) {
+bool CBPlatform::setRect(Common::Rect *lprc, int left, int top, int right, int bottom) {
lprc->left = left;
lprc->top = top;
lprc->right = right;
@@ -271,7 +271,7 @@ bool CBPlatform::setRect(LPRECT lprc, int left, int top, int right, int bottom)
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::intersectRect(LPRECT lprcDst, const LPRECT lprcSrc1, const LPRECT lprcSrc2) {
+bool CBPlatform::intersectRect(Common::Rect *lprcDst, const Common::Rect *lprcSrc1, const Common::Rect *lprcSrc2) {
if (isRectEmpty(lprcSrc1) || isRectEmpty(lprcSrc2) ||
lprcSrc1->left >= lprcSrc2->right || lprcSrc2->left >= lprcSrc1->right ||
lprcSrc1->top >= lprcSrc2->bottom || lprcSrc2->top >= lprcSrc1->bottom) {
@@ -287,7 +287,7 @@ bool CBPlatform::intersectRect(LPRECT lprcDst, const LPRECT lprcSrc1, const LPRE
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::unionRect(LPRECT lprcDst, RECT *lprcSrc1, RECT *lprcSrc2) {
+bool CBPlatform::unionRect(Common::Rect *lprcDst, Common::Rect *lprcSrc1, Common::Rect *lprcSrc2) {
if (isRectEmpty(lprcSrc1)) {
if (isRectEmpty(lprcSrc2)) {
setRectEmpty(lprcDst);
@@ -310,7 +310,7 @@ bool CBPlatform::unionRect(LPRECT lprcDst, RECT *lprcSrc1, RECT *lprcSrc2) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::copyRect(LPRECT lprcDst, RECT *lprcSrc) {
+bool CBPlatform::copyRect(Common::Rect *lprcDst, Common::Rect *lprcSrc) {
if (lprcDst == NULL || lprcSrc == NULL) return false;
*lprcDst = *lprcSrc;
@@ -318,7 +318,7 @@ bool CBPlatform::copyRect(LPRECT lprcDst, RECT *lprcSrc) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::offsetRect(LPRECT lprc, int dx, int dy) {
+bool CBPlatform::offsetRect(Common::Rect *lprc, int dx, int dy) {
if (lprc == NULL) return false;
lprc->left += dx;
@@ -330,7 +330,7 @@ bool CBPlatform::offsetRect(LPRECT lprc, int dx, int dy) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBPlatform::equalRect(LPRECT rect1, LPRECT rect2) {
+bool CBPlatform::equalRect(Common::Rect *rect1, Common::Rect *rect2) {
return rect1->left == rect2->left && rect1->right == rect2->right && rect1->top == rect2->top && rect1->bottom == rect2->bottom;
}
@@ -339,9 +339,9 @@ bool CBPlatform::equalRect(LPRECT rect1, LPRECT rect2) {
AnsiString CBPlatform::getSystemFontPath() {
#ifdef __WIN32__
// we're looking for something like "c:\windows\fonts\";
- char winDir[MAX_PATH + 1];
- winDir[MAX_PATH] = '\0';
- ::GetWindowsDirectory(winDir, MAX_PATH);
+ char winDir[MAX_PATH_LENGTH + 1];
+ winDir[MAX_PATH_LENGTH] = '\0';
+ ::GetWindowsDirectory(winDir, MAX_PATH_LENGTH);
return PathUtil::Combine(AnsiString(winDir), "fonts");
#else
// !PORTME