diff options
author | Paul Gilbert | 2017-11-23 18:56:18 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-11-23 18:56:18 -0500 |
commit | 63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5 (patch) | |
tree | 87a2e20a1df04ae49e958e82d6db18cd59273398 | |
parent | 121718c50d6ae40da291170ea2a25d63bdf7a2af (diff) | |
download | scummvm-rg350-63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5.tar.gz scummvm-rg350-63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5.tar.bz2 scummvm-rg350-63b0b417bb2f3ace13089ded2ca4ae83bbce2ce5.zip |
XEEN: Fix switching characters within town actions
-rw-r--r-- | engines/xeen/town.cpp | 11 | ||||
-rw-r--r-- | engines/xeen/town.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/xeen/town.cpp b/engines/xeen/town.cpp index 842317a583..0f6726c9eb 100644 --- a/engines/xeen/town.cpp +++ b/engines/xeen/town.cpp @@ -72,7 +72,7 @@ int Town::townAction(TownAction actionId) { Sound &sound = *_vm->_sound; bool isDarkCc = _vm->_files->_isDarkCc; - if (actionId == 12) { + if (actionId == ACTION12) { pyramidEvent(); return 0; } @@ -220,7 +220,7 @@ int Town::townAction(TownAction actionId) { intf._levitateUIFrame = 0; _townSprites[_drawFrameIndex / 8].draw(screen, _drawFrameIndex % 8, _townPos); - if (actionId == 0 && isDarkCc) { + if (actionId == BANK && isDarkCc) { _townSprites[4].draw(screen, _vm->getRandomNumber(13, 18), Common::Point(8, 30)); } @@ -236,7 +236,7 @@ int Town::townAction(TownAction actionId) { intf.highlightChar(0); drawTownAnim(1); - if (actionId == 0) + if (actionId == BANK) intf._overallFrame = 2; sound.playSound(vocName, 1); @@ -244,12 +244,13 @@ int Town::townAction(TownAction actionId) { do { townWait(); charP = doTownOptions(charP); + title = createTownText(*charP); screen._windows[10].writeString(title); drawButtons(&screen); } while (!_vm->shouldQuit() && _buttonValue != Common::KEYCODE_ESCAPE); switch (actionId) { - case 1: + case BLACKSMITH: // Leave blacksmith if (isDarkCc) { sound.stopSound(); @@ -257,7 +258,7 @@ int Town::townAction(TownAction actionId) { } break; - case 3: { + case TAVERN: { // Leave Tavern sound.stopSound(); sound.playSound(isDarkCc ? "gdluck1.voc" : "goodbye.voc", 1); diff --git a/engines/xeen/town.h b/engines/xeen/town.h index 88bd368aeb..618c4c510a 100644 --- a/engines/xeen/town.h +++ b/engines/xeen/town.h @@ -34,7 +34,7 @@ namespace Xeen { enum TownAction { BANK = 0, BLACKSMITH = 1, GUILD = 2, TAVERN = 3, TEMPLE = 4, TRAINING = 5, ARENA = 6, NO_ACTION = 7, REAPER = 8, GOLEM = 9, - DWARF1 = 10, SPHINX = 11, DWARF2 = 13 + DWARF1 = 10, SPHINX = 11, ACTION12 = 12, DWARF2 = 13 }; class XeenEngine; |