diff options
author | Torbjörn Andersson | 2007-02-01 20:16:32 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-02-01 20:16:32 +0000 |
commit | 0a18259d78f59a79270467a6fa70172e5d96b625 (patch) | |
tree | c2c582918f20c248fc1bc7a17c8fd59de7351d1f /engines/parallaction | |
parent | 586a01d03807cd870b4f6cf6467d88bd8f1ea3d9 (diff) | |
download | scummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.tar.gz scummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.tar.bz2 scummvm-rg350-0a18259d78f59a79270467a6fa70172e5d96b625.zip |
Used Fingolfin's workaround for a bogus (?) warning produced by some versions
of GCC. (Not the one he's using, though, which is why I'm doing this instead.)
svn-id: r25327
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/animation.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/commands.cpp | 16 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/location.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/zone.cpp | 10 |
5 files changed, 18 insertions, 18 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp index 28ad30ae81..fa68f47562 100644 --- a/engines/parallaction/animation.cpp +++ b/engines/parallaction/animation.cpp @@ -98,7 +98,7 @@ Animation *Parallaction::parseAnimation(ArchivedFile *file, Node *list, char *na } if (!scumm_stricmp(_tokens[0], "type")) { if (_tokens[2][0] != '\0') { - vD0->_zone._type = ((4 + searchTable(_tokens[2], (const char **)_objectsNames)) << 16) & 0xFFFF0000; + vD0->_zone._type = ((4 + searchTable(_tokens[2], const_cast<const char **>(_objectsNames))) << 16) & 0xFFFF0000; } int16 _si = searchTable(_tokens[1], _zoneTypeNames); if (_si != -1) { diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp index d478f81b13..2f9005136e 100644 --- a/engines/parallaction/commands.cpp +++ b/engines/parallaction/commands.cpp @@ -68,9 +68,9 @@ Command *parseCommands(ArchivedFile *file) { case CMD_SET: // set case CMD_CLEAR: // clear case CMD_TOGGLE: // toggle - if (_vm->searchTable(_tokens[1], (const char **)_globalTable) == -1) { + if (_vm->searchTable(_tokens[1], const_cast<const char **>(_globalTable)) == -1) { do { - char _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames); + char _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames)); _si++; cmd->u._flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_si++], "|")); @@ -78,7 +78,7 @@ Command *parseCommands(ArchivedFile *file) { } else { cmd->u._flags |= kFlagsGlobal; do { - char _al = _vm->searchTable(_tokens[1], (const char **)_globalTable); + char _al = _vm->searchTable(_tokens[1], const_cast<const char **>(_globalTable)); _si++; cmd->u._flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_si++], "|")); @@ -119,7 +119,7 @@ Command *parseCommands(ArchivedFile *file) { break; case CMD_DROP: // drop - cmd->u._object = _vm->searchTable(_tokens[_si], (const char **)_objectsNames); + cmd->u._object = _vm->searchTable(_tokens[_si], const_cast<const char **>(_objectsNames)); _si++; break; @@ -146,10 +146,10 @@ Command *parseCommands(ArchivedFile *file) { cmd->_flagsOn |= kFlagsEnter; } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { - byte _al = _vm->searchTable(&_tokens[_si][2], (const char **)_localFlagNames); + byte _al = _vm->searchTable(&_tokens[_si][2], const_cast<const char **>(_localFlagNames)); cmd->_flagsOff |= 1 << (_al - 1); } else { - byte _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames); + byte _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames)); cmd->_flagsOn |= 1 << (_al - 1); } @@ -171,10 +171,10 @@ Command *parseCommands(ArchivedFile *file) { cmd->_flagsOn |= kFlagsEnter; } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { - byte _al = _vm->searchTable(&_tokens[_si][2], (const char **)_globalTable); + byte _al = _vm->searchTable(&_tokens[_si][2], const_cast<const char **>(_globalTable)); cmd->_flagsOff |= 1 << (_al - 1); } else { - byte _al = _vm->searchTable(_tokens[_si], (const char **)_localFlagNames); + byte _al = _vm->searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames)); cmd->_flagsOn |= 1 << (_al - 1); } diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index a6c1f328c4..2ba01c700f 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -93,14 +93,14 @@ Dialogue *parseDialogue(ArchivedFile *file) { parseFillBuffers(); while (scumm_stricmp(_tokens[0], "endquestion")) { // parse answers - const char** v60 = (const char **)_localFlagNames; + const char** v60 = const_cast<const char **>(_localFlagNames); uint16 v56 = 1; if (_tokens[1][0]) { if (!scumm_stricmp(_tokens[1], "global")) { v56 = 2; - v60 = (const char **)_globalTable; + v60 = const_cast<const char **>(_globalTable); vB4->_yesFlags[_di] |= kFlagsGlobal; } @@ -149,7 +149,7 @@ Dialogue *parseDialogue(ArchivedFile *file) { for (uint16 v5A = 0; v5A < 5; v5A++) { if (_questions[_si]->_answers[v5A] == 0) continue; - int16 v58 = _vm->searchTable(_questions[_si]->_following._names[v5A], (const char **)_questions_names); + int16 v58 = _vm->searchTable(_questions[_si]->_following._names[v5A], const_cast<const char **>(_questions_names)); memFree(_questions[_si]->_following._names[v5A]); if (v58 == -1) { diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index d41cc65617..a1fd1f42d6 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -150,7 +150,7 @@ void Parallaction::parseLocation(const char *filename) { _si = 1; do { - byte _al = searchTable(_tokens[_si], (const char **)_localFlagNames); + byte _al = searchTable(_tokens[_si], const_cast<const char **>(_localFlagNames)); _localFlags[_currentLocationIndex] |= 1 << (_al - 1); _si++; diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index ceb4c499ee..f8cb9da8a1 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -86,7 +86,7 @@ void Parallaction::parseZone(ArchivedFile *file, Node *list, char *name) { } if (!scumm_stricmp(_tokens[0], "type")) { if (_tokens[2][0] != '\0') { - z->_type = (4 + searchTable(_tokens[2], (const char **)_objectsNames)) << 16; + z->_type = (4 + searchTable(_tokens[2], const_cast<const char **>(_objectsNames))) << 16; } int16 _si = searchTable(_tokens[1], _zoneTypeNames); if (_si != -1) { @@ -307,19 +307,19 @@ void Parallaction::parseZoneTypeBlock(ArchivedFile *file, Zone *z) { } if (!scumm_stricmp(_tokens[0], "icon")) { - u->get->_icon = 4 + searchTable(_tokens[1], (const char **)_objectsNames); + u->get->_icon = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames)); } break; case kZoneMerge: // merge Zone init if (!scumm_stricmp(_tokens[0], "obj1")) { - u->merge->_obj1 = 4 + searchTable(_tokens[1], (const char **)_objectsNames); + u->merge->_obj1 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames)); } if (!scumm_stricmp(_tokens[0], "obj2")) { - u->merge->_obj2 = 4 + searchTable(_tokens[1], (const char **)_objectsNames); + u->merge->_obj2 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames)); } if (!scumm_stricmp(_tokens[0], "newobj")) { - u->merge->_obj3 = 4 + searchTable(_tokens[1], (const char **)_objectsNames); + u->merge->_obj3 = 4 + searchTable(_tokens[1], const_cast<const char **>(_objectsNames)); } break; |