aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/utils/utils.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-29 14:56:39 +0200
committerEinar Johan Trøan Sømåen2012-07-29 14:56:39 +0200
commitda0ba41903bf50c3a6cb2923ca943386cd984f8c (patch)
tree53a9a692329b0c1fae9a664c1e6e2b435c8d9a5c /engines/wintermute/utils/utils.cpp
parent3a218180017e97e4b9dceca3bf25a232f271c6b9 (diff)
downloadscummvm-rg350-da0ba41903bf50c3a6cb2923ca943386cd984f8c.tar.gz
scummvm-rg350-da0ba41903bf50c3a6cb2923ca943386cd984f8c.tar.bz2
scummvm-rg350-da0ba41903bf50c3a6cb2923ca943386cd984f8c.zip
WINTERMUTE: Remove more unused utils.
Diffstat (limited to 'engines/wintermute/utils/utils.cpp')
-rw-r--r--engines/wintermute/utils/utils.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 05aa34f95f..6571147a80 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -92,18 +92,6 @@ char *BaseUtils::setString(char **string, const char *value) {
}
//////////////////////////////////////////////////////////////////////////
-int BaseUtils::strNumEntries(const char *str, const char delim) {
- int numEntries = 1;
- for (uint32 i = 0; i < strlen(str); i++) {
- if (str[i] == delim) {
- numEntries++;
- }
- }
- return numEntries;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
char *BaseUtils::strEntry(int entry, const char *str, const char delim) {
int numEntries = 0;
@@ -158,66 +146,6 @@ float BaseUtils::randomAngle(float from, float to) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseUtils::matchesPattern(const char *pattern, const char *string) {
- char stringc, patternc;
-
- for (;; ++string) {
- stringc = toupper(*string);
- patternc = toupper(*pattern++);
-
- switch (patternc) {
- case 0:
- return (stringc == 0);
-
- case '?':
- if (stringc == 0) {
- return false;
- }
- break;
-
- case '*':
- if (!*pattern) {
- return true;
- }
-
- if (*pattern == '.') {
- char *dot;
- if (pattern[1] == '*' && pattern[2] == 0) {
- return true;
- }
- dot = (char *)strchr(string, '.');
- if (pattern[1] == 0) {
- return (dot == NULL || dot[1] == 0);
- }
- if (dot != NULL) {
- string = dot;
- if (strpbrk(pattern, "*?[") == NULL && strchr(string + 1, '.') == NULL) {
- return(scumm_stricmp(pattern + 1, string + 1) == 0);
- }
- }
- }
-
- while (*string)
- if (BaseUtils::matchesPattern(pattern, string++)) {
- return true;
- }
- return false;
-
- default:
- if (patternc != stringc) {
- if (patternc == '.' && stringc == 0) {
- return(BaseUtils::matchesPattern(pattern, string));
- } else {
- return false;
- }
- }
- break;
- }
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
void BaseUtils::RGBtoHSL(uint32 rgbColor, byte *outH, byte *outS, byte *outL) {
float varR = (RGBCOLGetR(rgbColor) / 255.0f);
float varG = (RGBCOLGetG(rgbColor) / 255.0f);