diff options
author | Nicola Mettifogo | 2008-08-14 13:45:32 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-08-14 13:45:32 +0000 |
commit | d3440f2cc5f7cb6e617d8e04047808ba38c8b7d6 (patch) | |
tree | 294a18054f96e0ff2a0d419a4e0d8d1e121a8670 /engines/parallaction | |
parent | 15f4bc43cf03b7e1f69b883ea5c5f2d17d2798ef (diff) | |
download | scummvm-rg350-d3440f2cc5f7cb6e617d8e04047808ba38c8b7d6.tar.gz scummvm-rg350-d3440f2cc5f7cb6e617d8e04047808ba38c8b7d6.tar.bz2 scummvm-rg350-d3440f2cc5f7cb6e617d8e04047808ba38c8b7d6.zip |
Some variable renamed to make more sense.
svn-id: r33864
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/callables_ns.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/debug.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/exec_ns.cpp | 10 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/parallaction.h | 4 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 10 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 4 |
10 files changed, 27 insertions, 27 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index 761e11dc7d..7e9395ef1f 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -261,7 +261,7 @@ void Parallaction_ns::_c_contaFoglie(void *parm) { if (num_foglie != 6) return; - _commandFlags |= 0x1000; + _globalFlags |= 0x1000; return; } diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp index f57976594e..625c28dd5f 100644 --- a/engines/parallaction/debug.cpp +++ b/engines/parallaction/debug.cpp @@ -101,14 +101,14 @@ bool Debugger::Cmd_Locations(int argc, const char **argv) { bool Debugger::Cmd_GlobalFlags(int argc, const char **argv) { - uint32 flags = _commandFlags; + uint32 flags = _globalFlags; DebugPrintf("+------------------------------+---------+\n" "| flag name | value |\n" "+------------------------------+---------+\n"); - for (uint i = 0; i < _vm->_globalTable->count(); i++) { + for (uint i = 0; i < _vm->_globalFlagsNames->count(); i++) { const char *value = ((flags & (1 << i)) == 0) ? "OFF" : "ON"; - DebugPrintf("|%-30s| %-6s|\n", _vm->_globalTable->item(i), value); + DebugPrintf("|%-30s| %-6s|\n", _vm->_globalFlagsNames->item(i), value); } DebugPrintf("+------------------------------+---------+\n"); diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 21584a0525..205d702aa0 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -168,7 +168,7 @@ bool DialogueManager::displayAnswer(uint16 i) { uint32 flags = _vm->getLocationFlags(); if (a->_yesFlags & kFlagsGlobal) - flags = _commandFlags | kFlagsGlobal; + flags = _globalFlags | kFlagsGlobal; // display suitable answers if (((a->_yesFlags & flags) == a->_yesFlags) && ((a->_noFlags & ~flags) == a->_noFlags)) { diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 12ee68a3ed..bd05c169e7 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -203,7 +203,7 @@ DECLARE_COMMAND_OPCODE(invalid) { DECLARE_COMMAND_OPCODE(set) { if (_ctxt.cmd->u._flags & kFlagsGlobal) { _ctxt.cmd->u._flags &= ~kFlagsGlobal; - _commandFlags |= _ctxt.cmd->u._flags; + _globalFlags |= _ctxt.cmd->u._flags; } else { _vm->setLocationFlags(_ctxt.cmd->u._flags); } @@ -213,7 +213,7 @@ DECLARE_COMMAND_OPCODE(set) { DECLARE_COMMAND_OPCODE(clear) { if (_ctxt.cmd->u._flags & kFlagsGlobal) { _ctxt.cmd->u._flags &= ~kFlagsGlobal; - _commandFlags &= ~_ctxt.cmd->u._flags; + _globalFlags &= ~_ctxt.cmd->u._flags; } else { _vm->clearLocationFlags(_ctxt.cmd->u._flags); } @@ -290,7 +290,7 @@ DECLARE_COMMAND_OPCODE(call) { DECLARE_COMMAND_OPCODE(toggle) { if (_ctxt.cmd->u._flags & kFlagsGlobal) { _ctxt.cmd->u._flags &= ~kFlagsGlobal; - _commandFlags ^= _ctxt.cmd->u._flags; + _globalFlags ^= _ctxt.cmd->u._flags; } else { _vm->toggleLocationFlags(_ctxt.cmd->u._flags); } @@ -336,7 +336,7 @@ void Parallaction_ns::drawAnimations() { if ((anim->_flags & kFlagsActive) && ((anim->_flags & kFlagsRemove) == 0)) { if (anim->_flags & kFlagsNoMasked) - layer = 3; + layer = LAYER_FOREGROUND; else layer = _gfx->_backgroundInfo->getLayer(anim->_top + anim->height()); @@ -439,7 +439,7 @@ void CommandExec::runList(CommandList::iterator first, CommandList::iterator las CommandPtr cmd = *first; if (cmd->_flagsOn & kFlagsGlobal) { - useFlags = _commandFlags | kFlagsGlobal; + useFlags = _globalFlags | kFlagsGlobal; useLocalFlags = false; } else { useFlags = _vm->getLocationFlags(); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index bb306c3299..dca3d04157 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -53,7 +53,7 @@ uint32 _engineFlags = 0; uint16 _score = 1; char _password[8]; -uint32 _commandFlags = 0; +uint32 _globalFlags = 0; // private stuff @@ -85,7 +85,7 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam Parallaction::~Parallaction() { delete _debugger; - delete _globalTable; + delete _globalFlagsNames; delete _callableNames; delete _cmdExec; delete _programExec; @@ -114,7 +114,7 @@ int Parallaction::init() { _engineFlags = 0; _objectsNames = NULL; - _globalTable = NULL; + _globalFlagsNames = NULL; _location._hasSound = false; _baseTime = 0; _numLocations = 0; diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 98d91ed16a..06adf8fa16 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -136,7 +136,7 @@ extern uint16 _score; extern uint16 _language; extern uint32 _engineFlags; extern char _saveData1[]; -extern uint32 _commandFlags; +extern uint32 _globalFlags; extern const char *_dinoName; extern const char *_donnaName; extern const char *_doughName; @@ -272,7 +272,7 @@ public: void setBackground(const char *background, const char *mask, const char *path); void freeBackground(); - Table *_globalTable; + Table *_globalFlagsNames; Table *_objectsNames; Table *_callableNames; Table *_localFlagNames; diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 761c8d1b74..bb8ddc5654 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -193,7 +193,7 @@ void Parallaction_br::initPart() { memset(_counters, 0, ARRAYSIZE(_counters)); - _globalTable = _disk->loadTable("global"); + _globalFlagsNames = _disk->loadTable("global"); _objectsNames = _disk->loadTable("objects"); _countersNames = _disk->loadTable("counters"); @@ -208,11 +208,11 @@ void Parallaction_br::initPart() { void Parallaction_br::freePart() { - delete _globalTable; + delete _globalFlagsNames; delete _objectsNames; delete _countersNames; - _globalTable = 0; + _globalFlagsNames = 0; _objectsNames = 0; _countersNames = 0; } diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index e81492e655..bfbe7c3eb3 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -218,7 +218,7 @@ void Parallaction_ns::callFunction(uint index, void* parm) { int Parallaction_ns::go() { renameOldSavefiles(); - _globalTable = _disk->loadTable("global"); + _globalFlagsNames = _disk->loadTable("global"); startGui(); @@ -438,7 +438,7 @@ void Parallaction_ns::cleanupGame() { // this code saves main character animation from being removed from the following code _location._animations.remove(_char._ani); _numLocations = 0; - _commandFlags = 0; + _globalFlags = 0; memset(_localFlags, 0, sizeof(_localFlags)); memset(_locationNames, 0, sizeof(_locationNames)); diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index ad0f714fdc..dd4a79a8d2 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -608,7 +608,7 @@ DECLARE_COMMAND_PARSER(flags) { createCommand(_parser->_lookup); - if (_vm->_globalTable->lookup(_tokens[1]) == Table::notFound) { + if (_vm->_globalFlagsNames->lookup(_tokens[1]) == Table::notFound) { do { char _al = _vm->_localFlagNames->lookup(_tokens[ctxt.nextToken]); ctxt.nextToken++; @@ -618,7 +618,7 @@ DECLARE_COMMAND_PARSER(flags) { } else { ctxt.cmd->u._flags |= kFlagsGlobal; do { - char _al = _vm->_globalTable->lookup(_tokens[1]); + char _al = _vm->_globalFlagsNames->lookup(_tokens[1]); ctxt.nextToken++; ctxt.cmd->u._flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[ctxt.nextToken++], "|")); @@ -759,11 +759,11 @@ void LocationParser_ns::parseCommandFlags() { cmd->_flagsOn |= kFlagsEnter; } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { - byte _al = _vm->_globalTable->lookup(&_tokens[_si][2]); + byte _al = _vm->_globalFlagsNames->lookup(&_tokens[_si][2]); assert(_al != Table::notFound); cmd->_flagsOff |= 1 << (_al - 1); } else { - byte _al = _vm->_globalTable->lookup(_tokens[_si]); + byte _al = _vm->_globalFlagsNames->lookup(_tokens[_si]); assert(_al != Table::notFound); cmd->_flagsOn |= 1 << (_al - 1); } @@ -880,7 +880,7 @@ Answer *LocationParser_ns::parseAnswer() { if (!scumm_stricmp(_tokens[1], "global")) { token = 2; - flagNames = _vm->_globalTable; + flagNames = _vm->_globalFlagsNames; answer->_yesFlags |= kFlagsGlobal; } else { token = 1; diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 002295315d..c07d976a3c 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -125,7 +125,7 @@ void Parallaction_ns::doLoadGame(uint16 slot) { _score = atoi(s); f->readLine(s, 15); - _commandFlags = atoi(s); + _globalFlags = atoi(s); f->readLine(s, 15); @@ -213,7 +213,7 @@ void Parallaction_ns::doSaveGame(uint16 slot, const char* name) { f->writeString(s); sprintf(s, "%d\n", _score); f->writeString(s); - sprintf(s, "%u\n", _commandFlags); + sprintf(s, "%u\n", _globalFlags); f->writeString(s); sprintf(s, "%d\n", _numLocations); |