aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorJohannes Schickel2009-04-01 14:02:55 +0000
committerJohannes Schickel2009-04-01 14:02:55 +0000
commit44025f03d56bab2160448166235a20a9e95602d9 (patch)
tree462e9aa7a64e77b42ad717eeccc77a1626163c7b /engines/cruise
parentbf94fc6e4eae19d205d66a57235037ea67ef1133 (diff)
downloadscummvm-rg350-44025f03d56bab2160448166235a20a9e95602d9.tar.gz
scummvm-rg350-44025f03d56bab2160448166235a20a9e95602d9.tar.bz2
scummvm-rg350-44025f03d56bab2160448166235a20a9e95602d9.zip
Fix compilation via manually implementing strToUpper, instead of relying on strupr.
svn-id: r39791
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/function.cpp4
-rw-r--r--engines/cruise/volume.cpp11
-rw-r--r--engines/cruise/volume.h4
3 files changed, 15 insertions, 4 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 148f8df111..a17786d417 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -39,7 +39,7 @@ int16 Op_LoadOverlay(void) {
char overlayName[38] = "";
int overlayLoadResult;
- pOverlayName = (char *) popPtr();
+ pOverlayName = (char *)popPtr();
if (strlen(pOverlayName) == 0)
return 0;
@@ -1232,7 +1232,7 @@ int16 Op_LoadSong(void) {
char buffer[33];
strcpy(buffer, ptr);
- strupr(buffer);
+ strToUpper(buffer);
_vm->music().loadSong(buffer);
changeCursor(CURSOR_NORMAL);
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index 0f89e68dd9..cceb7df4d3 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -468,6 +468,17 @@ int16 readVolCnf(void) {
///////////////////////////::
+// This code used to rely on "strupr", which is non existant on my system,
+// thus I just implemented this function instead. - LordHoto
+//
+// TODO: This might be code duplication, please check this out.
+void strToUpper(char *string) {
+ while (*string) {
+ *string = toupper(*string);
+ ++string;
+ }
+}
+
void drawMsgString(const char *string) {
//printf("%s\n",string);
}
diff --git a/engines/cruise/volume.h b/engines/cruise/volume.h
index da1d3990dd..ef5113b1c3 100644
--- a/engines/cruise/volume.h
+++ b/engines/cruise/volume.h
@@ -36,8 +36,8 @@ int16 findFileInList(const char *fileName);
////////////////
-#define strToUpper(FILENAME) strupr(FILENAME)
-void drawMsgString(const char * string);
+void strToUpper(char *string);
+void drawMsgString(const char *string);
void askDisk(int16 discNumber);
void setObjectPosition(int16 param1, int16 param2, int16 param3, int16 param4);