aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/utils
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-09 04:09:15 +0200
committerEinar Johan Trøan Sømåen2012-07-09 04:09:15 +0200
commit7c984d24a8cd2ebe5a7860e21cda392edada34b3 (patch)
tree36d6cd53884107f29a451ffe1b06370e3fdc7f67 /engines/wintermute/utils
parent1eea9ad1a3ae577195363abe475cfbbee33d153b (diff)
downloadscummvm-rg350-7c984d24a8cd2ebe5a7860e21cda392edada34b3.tar.gz
scummvm-rg350-7c984d24a8cd2ebe5a7860e21cda392edada34b3.tar.bz2
scummvm-rg350-7c984d24a8cd2ebe5a7860e21cda392edada34b3.zip
WINTERMUTE: Change RECT -> Common::Rect and POINT-> Common::Point, completing the removal of Windows-specifics in wintypes.h
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r--engines/wintermute/utils/PathUtil.cpp10
-rw-r--r--engines/wintermute/utils/utils.cpp2
-rw-r--r--engines/wintermute/utils/utils.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/wintermute/utils/PathUtil.cpp b/engines/wintermute/utils/PathUtil.cpp
index cfc3db916e..5c12a71c33 100644
--- a/engines/wintermute/utils/PathUtil.cpp
+++ b/engines/wintermute/utils/PathUtil.cpp
@@ -116,8 +116,8 @@ AnsiString PathUtil::getSafeLogFileName() {
AnsiString logFileName = getUserDirectory();
#ifdef __WIN32__
- char moduleName[MAX_PATH];
- ::GetModuleFileName(NULL, moduleName, MAX_PATH);
+ char moduleName[MAX_PATH_LENGTH];
+ ::GetModuleFileName(NULL, moduleName, MAX_PATH_LENGTH);
AnsiString fileName = GetFileNameWithoutExtension(moduleName) + ".log";
fileName = Combine("/Wintermute Engine/Logs/", fileName);
@@ -162,7 +162,7 @@ AnsiString PathUtil::getUserDirectory() {
AnsiString userDir = "./";
#if 0
#ifdef __WIN32__
- char buffer[MAX_PATH];
+ char buffer[MAX_PATH_LENGTH];
buffer[0] = '\0';
LPITEMIDLIST pidl = NULL;
LPMALLOC pMalloc;
@@ -178,14 +178,14 @@ AnsiString PathUtil::getUserDirectory() {
FSRef fileRef;
OSStatus error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef);
if (error == noErr) {
- char buffer[MAX_PATH];
+ char buffer[MAX_PATH_LENGTH];
error = FSRefMakePath(&fileRef, (UInt8 *)buffer, sizeof(buffer));
if (error == noErr)
userDir = buffer;
}
#elif __IPHONEOS__
- char path[MAX_PATH];
+ char path[MAX_PATH_LENGTH];
IOS_GetDataDir(path);
userDir = AnsiString(path);
#endif
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index ca68b3c691..d672656973 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -45,7 +45,7 @@ static inline unsigned Sqr(int x) {
//////////////////////////////////////////////////////////////////////////////////
-void CBUtils::clip(int *destX, int *destY, RECT *srcRect, RECT *destRect) {
+void CBUtils::clip(int *destX, int *destY, Common::Rect *srcRect, Common::Rect *destRect) {
// If it's partly off the right side of the screen
if (*destX + (srcRect->right - srcRect->left) > destRect->right)
srcRect->right -= *destX + (srcRect->right - srcRect->left) - destRect->right;
diff --git a/engines/wintermute/utils/utils.h b/engines/wintermute/utils/utils.h
index 52678a3e9f..50665dad1f 100644
--- a/engines/wintermute/utils/utils.h
+++ b/engines/wintermute/utils/utils.h
@@ -37,7 +37,7 @@ class CBGame;
class CBUtils {
public:
- static void clip(int *DestX, int *DestY, RECT *SrcRect, RECT *DestRect);
+ static void clip(int *DestX, int *DestY, Common::Rect *SrcRect, Common::Rect *DestRect);
static void swap(int *a, int *b);
static bool strBeginsI(const char *String, const char *Fragment);
static float normalizeAngle(float Angle);