From 7c984d24a8cd2ebe5a7860e21cda392edada34b3 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 9 Jul 2012 04:09:15 +0200 Subject: WINTERMUTE: Change RECT -> Common::Rect and POINT-> Common::Point, completing the removal of Windows-specifics in wintypes.h --- engines/wintermute/utils/PathUtil.cpp | 10 +++++----- engines/wintermute/utils/utils.cpp | 2 +- engines/wintermute/utils/utils.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/wintermute/utils') 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); -- cgit v1.2.3