aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/utils/utils.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-23 02:23:14 +0200
committerEinar Johan Trøan Sømåen2012-07-23 02:23:14 +0200
commit7a818009b4c20df1811c0b158b0f8acfe0e3d208 (patch)
treedb81e469aa40125768cfb9c55b3a991f0051d503 /engines/wintermute/utils/utils.cpp
parent927eb9a9e8f8dab6995c83367739bbf280886c2d (diff)
downloadscummvm-rg350-7a818009b4c20df1811c0b158b0f8acfe0e3d208.tar.gz
scummvm-rg350-7a818009b4c20df1811c0b158b0f8acfe0e3d208.tar.bz2
scummvm-rg350-7a818009b4c20df1811c0b158b0f8acfe0e3d208.zip
WINTERMUTE: Clean out unused utils.
Diffstat (limited to 'engines/wintermute/utils/utils.cpp')
-rw-r--r--engines/wintermute/utils/utils.cpp64
1 files changed, 2 insertions, 62 deletions
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 038095c8ae..ee723cf80a 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -26,14 +26,7 @@
* Copyright (c) 2011 Jan Nedoma
*/
-#include "engines/wintermute/dcgf.h"
#include "engines/wintermute/utils/utils.h"
-#include "engines/wintermute/platform_osystem.h"
-#include "engines/wintermute/wintypes.h"
-#include "engines/wintermute/utils/path_util.h"
-#include "engines/wintermute/base/base_game.h"
-#include "common/str.h"
-#include "common/textconsole.h"
#include "engines/wintermute/wintermute.h"
namespace WinterMute {
@@ -43,36 +36,6 @@ static inline unsigned Sqr(int x) {
return (x * x);
}
-
-//////////////////////////////////////////////////////////////////////////////////
-void BaseUtils::clip(int *destX, int *destY, Rect32 *srcRect, Rect32 *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;
-
- if (srcRect->right < 0) srcRect->right = 0;
-
- // Partly off the left side of the screen
- if (*destX < destRect->left) {
- srcRect->left += destRect->left - *destX;
- *destX = destRect->left;
- }
-
- // Partly off the top of the screen
- if (*destY < destRect->top) {
- srcRect->top += destRect->top - *destY;
- *destY = destRect->top;
- }
-
- // If it's partly off the bottom side of the screen
- if (*destY + (srcRect->bottom - srcRect->top) > destRect->bottom)
- srcRect->bottom -= ((srcRect->bottom - srcRect->top) + *destY) - destRect->bottom;
-
- if (srcRect->bottom < 0) srcRect->bottom = 0;
-
- return;
-}
-
//////////////////////////////////////////////////////////////////////////////////
// Swap - swaps two integers
//////////////////////////////////////////////////////////////////////////////////
@@ -82,11 +45,6 @@ void BaseUtils::swap(int *a, int *b) {
*b = Temp;
}
-//////////////////////////////////////////////////////////////////////////
-bool BaseUtils::strBeginsI(const char *string, const char *fragment) {
- return (scumm_strnicmp(string, fragment, strlen(fragment)) == 0);
-}
-
//////////////////////////////////////////////////////////////////////////
float BaseUtils::normalizeAngle(float angle) {
@@ -99,11 +57,11 @@ float BaseUtils::normalizeAngle(float angle) {
////////////////////////////////////////////////////////////////////////////////
void BaseUtils::createPath(const char *path, bool pathOnly) {
- AnsiString pathStr;
+/* AnsiString pathStr;
if (!pathOnly) pathStr = PathUtil::getDirectoryName(path);
else pathStr = path;
-
+*/
// try {
warning("BaseUtils::CreatePath - not implemented: %s", path);
// boost::filesystem::create_directories(path);
@@ -235,24 +193,6 @@ bool BaseUtils::matchesPattern(const char *pattern, const char *string) {
}
}
-//////////////////////////////////////////////////////////////////////////
-char *BaseUtils::getPath(const char *filename) {
- AnsiString path = PathUtil::getDirectoryName(filename);
- //path = boost::filesystem::syste_complete(path).string();
- warning("BaseUtils::GetPath: (%s), not implemented", filename);
- char *ret = new char[path.size() + 1];
- strcpy(ret, path.c_str());
-
- return ret;
-}
-
-//////////////////////////////////////////////////////////////////////////
-char *BaseUtils::getFilename(const char *filename) {
- AnsiString path = PathUtil::getFileName(filename);
- char *ret = new char[path.size() + 1];
- strcpy(ret, path.c_str());
- return ret;
-}
//////////////////////////////////////////////////////////////////////////
void BaseUtils::RGBtoHSL(uint32 RGBColor, byte *outH, byte *outS, byte *outL) {