mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
MADS: Fix infinite conversation loop at the beginning of Phantom
Also, update the conversation modes enum
This commit is contained in:
parent
8fee9abb64
commit
ffb6d79dcd
@ -105,7 +105,7 @@ void GameConversations::run(int id) {
|
||||
_heroTrigger = 0;
|
||||
_interlocutorTrigger = 0;
|
||||
_popupVisible = false;
|
||||
_currentMode = CONVMODE_0;
|
||||
_currentMode = CONVMODE_NEXT;
|
||||
_verbId = -1;
|
||||
_speakerVal = 1;
|
||||
_personSpeaking = 1;
|
||||
@ -297,7 +297,7 @@ void GameConversations::update(bool flag) {
|
||||
ConversationVar &var0 = _runningConv->_cnd._vars[0];
|
||||
|
||||
switch (_currentMode) {
|
||||
case CONVMODE_0:
|
||||
case CONVMODE_NEXT:
|
||||
assert(var0.isNumeric());
|
||||
if (var0._val < 0) {
|
||||
if (_vm->_game->_scene._frameStartTime >= _startFrameNumber) {
|
||||
@ -320,19 +320,19 @@ void GameConversations::update(bool flag) {
|
||||
_vm->_game->_scene._action._activeAction._verbId = _verbId;
|
||||
_vm->_game->_scene._action._inProgress = true;
|
||||
_vm->_game->_scene._action._savedFields._commandError = false;
|
||||
_currentMode = CONVMODE_1;
|
||||
_currentMode = CONVMODE_WAIT_AUTO;
|
||||
} else {
|
||||
_currentMode = generateMenu();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CONVMODE_1:
|
||||
case CONVMODE_WAIT_AUTO:
|
||||
if (flag)
|
||||
_currentMode = CONVMODE_3;
|
||||
_currentMode = CONVMODE_EXECUTE;
|
||||
break;
|
||||
|
||||
case CONVMODE_2:
|
||||
case CONVMODE_WAIT_ENTRY:
|
||||
if (flag) {
|
||||
_vm->_game->_player._stepEnabled = false;
|
||||
_verbId = _vm->_game->_scene._action._activeAction._verbId;
|
||||
@ -353,7 +353,7 @@ void GameConversations::update(bool flag) {
|
||||
}
|
||||
|
||||
generateText(dialog._textLineIndex, _runningConv->_cnd._messageList3);
|
||||
_currentMode = CONVMODE_0;
|
||||
_currentMode = CONVMODE_NEXT;
|
||||
|
||||
if (_heroTrigger) {
|
||||
_vm->_game->_scene._action._activeAction._verbId = _verbId;
|
||||
@ -364,7 +364,7 @@ void GameConversations::update(bool flag) {
|
||||
}
|
||||
break;
|
||||
|
||||
case CONVMODE_3:
|
||||
case CONVMODE_EXECUTE:
|
||||
if (_vm->_game->_scene._frameStartTime >= _startFrameNumber) {
|
||||
removeActiveWindow();
|
||||
_personSpeaking = 0;
|
||||
@ -378,17 +378,19 @@ void GameConversations::update(bool flag) {
|
||||
_heroTrigger = 0;
|
||||
}
|
||||
|
||||
_currentMode = CONVMODE_4;
|
||||
_currentMode = CONVMODE_REPLY;
|
||||
}
|
||||
break;
|
||||
|
||||
case CONVMODE_4:
|
||||
case CONVMODE_REPLY:
|
||||
if (_vm->_game->_scene._frameStartTime >= _startFrameNumber) {
|
||||
removeActiveWindow();
|
||||
_personSpeaking = _speakerVal;
|
||||
|
||||
generateMessage(_runningConv->_cnd._messageList2, _runningConv->_cnd._messageList4);
|
||||
|
||||
_currentMode = CONVMODE_NEXT;
|
||||
|
||||
if (_interlocutorTrigger && _popupVisible) {
|
||||
_vm->_game->_scene._action._activeAction._verbId = _verbId;
|
||||
_vm->_game->_trigger = _interlocutorTrigger;
|
||||
|
@ -35,11 +35,11 @@ namespace MADS {
|
||||
|
||||
enum ConversationMode {
|
||||
CONVMODE_NONE = -1,
|
||||
CONVMODE_0 = 0,
|
||||
CONVMODE_1 = 1,
|
||||
CONVMODE_2 = 2,
|
||||
CONVMODE_3 = 3,
|
||||
CONVMODE_4 = 4,
|
||||
CONVMODE_NEXT = 0,
|
||||
CONVMODE_WAIT_AUTO = 1,
|
||||
CONVMODE_WAIT_ENTRY = 2,
|
||||
CONVMODE_EXECUTE = 3,
|
||||
CONVMODE_REPLY = 4,
|
||||
CONVMODE_5 = 5,
|
||||
CONVMODE_6 = 6,
|
||||
CONVMODE_7 = 7,
|
||||
|
@ -561,7 +561,7 @@ void Scene::doAction() {
|
||||
// Don't allow the player to move if a conversation is active
|
||||
if (_vm->_gameConv->active()) {
|
||||
_vm->_game->_scene._action._savedFields._lookFlag = false;
|
||||
if (_vm->_gameConv->currentMode() == CONVMODE_2 || _vm->_gameConv->currentMode() == CONVMODE_3)
|
||||
if (_vm->_gameConv->currentMode() == CONVMODE_WAIT_ENTRY || _vm->_gameConv->currentMode() == CONVMODE_EXECUTE)
|
||||
_vm->_game->_player._stepEnabled = false;
|
||||
}
|
||||
|
||||
@ -605,8 +605,8 @@ void Scene::doAction() {
|
||||
if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PARSER)
|
||||
_vm->_game->_trigger = 0;
|
||||
|
||||
if (_vm->_gameConv->active() && (_vm->_gameConv->currentMode() == CONVMODE_1 ||
|
||||
_vm->_gameConv->currentMode() == CONVMODE_2))
|
||||
if (_vm->_gameConv->active() && (_vm->_gameConv->currentMode() == CONVMODE_WAIT_AUTO ||
|
||||
_vm->_gameConv->currentMode() == CONVMODE_WAIT_ENTRY))
|
||||
_vm->_gameConv->update(true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user