aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathrxx2018-12-30 15:46:02 +0100
committerathrxx2019-03-06 20:48:16 +0100
commit7cb7e4133936fe2348f7a0dda89961d807a4ef90 (patch)
tree8ecb3306405a9a2a312a11b00af77bc72818cf7e
parent1dfdcc7252ac83643cae7a7447c025da2af63843 (diff)
downloadscummvm-rg350-7cb7e4133936fe2348f7a0dda89961d807a4ef90.tar.gz
scummvm-rg350-7cb7e4133936fe2348f7a0dda89961d807a4ef90.tar.bz2
scummvm-rg350-7cb7e4133936fe2348f7a0dda89961d807a4ef90.zip
KYRA: (EOB) - slight improvement to character generation
- allow returning to the main menu from the character generation via Esc only when no party characters exist
-rw-r--r--engines/kyra/engine/chargen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/kyra/engine/chargen.cpp b/engines/kyra/engine/chargen.cpp
index c080acc130..7bea21e749 100644
--- a/engines/kyra/engine/chargen.cpp
+++ b/engines/kyra/engine/chargen.cpp
@@ -207,9 +207,11 @@ bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) {
} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_UP] || inputFlag == _vm->_keyMap[Common::KEYCODE_DOWN]) {
_activeBox ^= 2;
} else if (inputFlag == _vm->_keyMap[Common::KEYCODE_ESCAPE]) {
- // Unlike the original we allow returning to the main menu
- _vm->snd_stopSound();
- return false;
+ // Unlike the original we allow returning to the main menu if no character has been created yet or all characters have been deleted
+ if (!_characters[0].name[0] && !_characters[1].name[0] && !_characters[2].name[0] && !_characters[3].name[0]) {
+ _vm->snd_stopSound();
+ return false;
+ }
}
_vm->_gui->updateBoxFrameHighLight(-1);
}