Skip to content

Commit

Permalink
NEVERHOOD: Rename stuff in Module3000
Browse files Browse the repository at this point in the history
- Also change Scene1609::testVars
- Update globalvars.txt
  • Loading branch information
johndoe123 authored and wjp committed May 8, 2013
1 parent 016638b commit 59901c5
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 166 deletions.
4 changes: 2 additions & 2 deletions engines/neverhood/gamemodule.cpp
Expand Up @@ -310,8 +310,8 @@ void GameModule::startup() {

#if 1
_vm->gameState().which = 0;
_vm->gameState().sceneNum = 0;
createModule(2700, -1);
_vm->gameState().sceneNum = 8;
createModule(3000, -1);
#endif
#if 0
_vm->gameState().sceneNum = 0;
Expand Down
26 changes: 8 additions & 18 deletions engines/neverhood/module1600.cpp
Expand Up @@ -1465,29 +1465,19 @@ uint32 Scene1609::handleMessage(int messageNum, const MessageParam &param, Entit
}

bool Scene1609::testVars() {
int index1 = 0;
int cmpSymbolIndex = 0;

// Find the position of the first symbol
do {
int cmpIndex = _asSymbols[0]->getIndex();
if (!_asSymbols[0]->getFlag1())
cmpIndex -= 12;
if ((int)getSubVar(0x04909A50, index1) == cmpIndex)
break;
index1++;
} while(1);
while ((int)getSubVar(0x04909A50, cmpSymbolIndex) != _asSymbols[0]->getSymbolIndex())
cmpSymbolIndex++;

// Check if the entered symbols match
for (int index2 = 0; index2 < 12; index2++) {
int cmpIndex = _asSymbols[index2]->getIndex();
if (!_asSymbols[index2]->getFlag1())
cmpIndex -= 12;
if ((int)getSubVar(0x04909A50, index1) != cmpIndex)
for (int enteredSymbolIndex = 0; enteredSymbolIndex < 12; enteredSymbolIndex++) {
if ((int)getSubVar(0x04909A50, cmpSymbolIndex) != _asSymbols[enteredSymbolIndex]->getSymbolIndex())
return false;
index1++;
if (index1 >= 12)
index1 = 0;
index2++;
cmpSymbolIndex++;
if (cmpSymbolIndex >= 12)
cmpSymbolIndex = 0;
}

return true;
Expand Down

0 comments on commit 59901c5

Please sign in to comment.