diff options
author | Filippos Karapetis | 2009-08-04 21:56:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-08-04 21:56:59 +0000 |
commit | 4af0cfbdbdc9feafca2728cee8deca7ae9b472b1 (patch) | |
tree | 52f6e7649f640d3715d1d5425f8e31b16f2293dd | |
parent | d14f0ccfb51d44e36a8508be7e7795306b785ed8 (diff) | |
download | scummvm-rg350-4af0cfbdbdc9feafca2728cee8deca7ae9b472b1.tar.gz scummvm-rg350-4af0cfbdbdc9feafca2728cee8deca7ae9b472b1.tar.bz2 scummvm-rg350-4af0cfbdbdc9feafca2728cee8deca7ae9b472b1.zip |
Cleanup
svn-id: r43056
-rw-r--r-- | engines/drascula/drascula.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 38 |
3 files changed, 22 insertions, 21 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 46524b03db..2e3db3478e 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -712,7 +712,8 @@ bool DrasculaEngine::verify2() { Common::KeyCode DrasculaEngine::getScan() { updateEvents(); - if (_keyBufferHead == _keyBufferTail) return Common::KEYCODE_INVALID; + if (_keyBufferHead == _keyBufferTail) + return Common::KEYCODE_INVALID; Common::KeyCode key = _keyBuffer[_keyBufferTail].keycode; _keyBufferTail = (_keyBufferTail + 1) % KEYBUFSIZE; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index e6c5f69235..74b9e131e3 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -48,7 +48,7 @@ void DrasculaEngine::allocMemory() { assert(tableSurface); extraSurface = (byte *)malloc(64000); assert(extraSurface); - crosshairCursor = (byte *)malloc(40 * 25); + crosshairCursor = (byte *)malloc(OBJWIDTH * OBJHEIGHT); assert(crosshairCursor); mouseCursor = (byte *)malloc(OBJWIDTH * OBJHEIGHT); assert(mouseCursor); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 560f516a84..c9912f25d2 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1870,64 +1870,64 @@ void DrasculaEngine::clearRoom() { _system->updateScreen(); } -bool DrasculaEngine::exitRoom(int l) { - debug(2, "Exiting room from door %d", l); +bool DrasculaEngine::exitRoom(int doorNumber) { + debug(2, "Exiting room from door %d", doorNumber); int roomNum = 0; // Player can't exit the inn in chapter 1 - if (currentChapter == 1 && objectNum[l] == 104) { + if (currentChapter == 1 && objectNum[doorNumber] == 104) { return false; } - if (currentChapter == 1 && objectNum[l] == 105 && flags[0] == 0) { + if (currentChapter == 1 && objectNum[doorNumber] == 105 && flags[0] == 0) { talk(442); return false; } - updateDoor(l); - if (isDoor[l] != 0 && - ((currentChapter != 3 && currentChapter != 5) || visible[l] == 1)) { + updateDoor(doorNumber); + if (isDoor[doorNumber] != 0 && + ((currentChapter != 3 && currentChapter != 5) || visible[doorNumber] == 1)) { hideCursor(); - gotoObject(roomObjX[l], roomObjY[l]); + gotoObject(roomObjX[doorNumber], roomObjY[doorNumber]); if (currentChapter != 2) { - trackProtagonist = trackObj[l]; + trackProtagonist = trackObj[doorNumber]; updateRoom(); updateScreen(); } characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = roomExits[l]; + trackProtagonist = trackCharacter_alkeva[doorNumber]; + objExit = roomExits[doorNumber]; doBreak = 1; previousMusic = roomMusic; // Object specific actions - if (currentChapter == 1 && objectNum[l] == 105) { + if (currentChapter == 1 && objectNum[doorNumber] == 105) { animation_2_1(); return true; } else if (currentChapter == 2) { - if (objectNum[l] == 136) + if (objectNum[doorNumber] == 136) animation_2_2(); - if (objectNum[l] == 124) { + if (objectNum[doorNumber] == 124) { gotoObject(163, 106); gotoObject(287, 101); trackProtagonist = 0; } - if (objectNum[l] == 173) { + if (objectNum[doorNumber] == 173) { animation_35_2(); return true; } - if (objectNum[l] == 146 && flags[39] == 1) { + if (objectNum[doorNumber] == 146 && flags[39] == 1) { flags[5] = 1; flags[11] = 1; } - if (objectNum[l] == 176 && flags[29] == 1) { + if (objectNum[doorNumber] == 176 && flags[29] == 1) { flags[29] = 0; removeObject(kItemEarWithEarPlug); addObject(kItemEarplugs); } - } else if (currentChapter == 4 && objectNum[l] == 108) { + } else if (currentChapter == 4 && objectNum[doorNumber] == 108) { gotoObject(171, 78); } @@ -1935,7 +1935,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_ve = 1; clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); + sscanf(_targetSurface[doorNumber], "%d", &roomNum); curX = -1; enterRoom(roomNum); |