mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
MADS: Hook up calls to conversation update where necessary
This commit is contained in:
parent
b3e81dba14
commit
2b1f7d6ebc
@ -277,7 +277,7 @@ void GameConversations::reset(int id) {
|
|||||||
warning("TODO: GameConversations::reset");
|
warning("TODO: GameConversations::reset");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameConversations::update(bool isRelease) {
|
void GameConversations::update(bool flag) {
|
||||||
warning("TODO: GameConversations::update");
|
warning("TODO: GameConversations::update");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Handles updating the conversation display
|
* Handles updating the conversation display
|
||||||
*/
|
*/
|
||||||
void update(bool isRelease);
|
void update(bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if any conversation is currently atcive
|
* Returns true if any conversation is currently atcive
|
||||||
@ -328,6 +328,11 @@ public:
|
|||||||
* Returns _restoreRunning value
|
* Returns _restoreRunning value
|
||||||
*/
|
*/
|
||||||
int restoreRunning() const { return _restoreRunning; }
|
int restoreRunning() const { return _restoreRunning; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current conversation mode
|
||||||
|
*/
|
||||||
|
ConversationMode currentMode() const { return _currentMode; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace MADS
|
} // End of namespace MADS
|
||||||
|
@ -419,14 +419,24 @@ void Scene::doFrame() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_currentSceneId != _nextSceneId) {
|
if (_currentSceneId != _nextSceneId) {
|
||||||
|
_vm->_gameConv->stop();
|
||||||
_freeAnimationFlag = true;
|
_freeAnimationFlag = true;
|
||||||
|
// TODO: Handle Phantom/Dragonsphere animation list free
|
||||||
} else {
|
} else {
|
||||||
doSceneStep();
|
doSceneStep();
|
||||||
checkKeyboard();
|
checkKeyboard();
|
||||||
|
|
||||||
if (_currentSceneId != _nextSceneId) {
|
if (_currentSceneId != _nextSceneId) {
|
||||||
|
_vm->_gameConv->stop();
|
||||||
_freeAnimationFlag = true;
|
_freeAnimationFlag = true;
|
||||||
|
// TODO: Handle Phantom/Dragonsphere animation list free
|
||||||
} else {
|
} else {
|
||||||
|
// Handle conversation updates if one is active
|
||||||
|
if (!_vm->_game->_trigger && _vm->_gameConv->active() &&
|
||||||
|
!_vm->_game->_camX._activeFl && !_vm->_game->_camY._activeFl)
|
||||||
|
_vm->_gameConv->update(false);
|
||||||
|
|
||||||
|
// Update the player
|
||||||
player.nextFrame();
|
player.nextFrame();
|
||||||
|
|
||||||
// Cursor update code
|
// Cursor update code
|
||||||
@ -548,13 +558,20 @@ void Scene::doPreactions() {
|
|||||||
void Scene::doAction() {
|
void Scene::doAction() {
|
||||||
bool flag = false;
|
bool flag = false;
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
_vm->_game->_player._stepEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
_vm->_game->_triggerSetupMode = SEQUENCE_TRIGGER_PARSER;
|
_vm->_game->_triggerSetupMode = SEQUENCE_TRIGGER_PARSER;
|
||||||
if ((_action._inProgress || _vm->_game->_trigger) && !_action._savedFields._commandError) {
|
if ((_action._inProgress || _vm->_game->_trigger) && !_action._savedFields._commandError) {
|
||||||
_sceneLogic->actions();
|
_sceneLogic->actions();
|
||||||
flag = !_action._inProgress;
|
flag = !_action._inProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_vm->_game->_screenObjects._inputMode == kInputConversation) {
|
if (_vm->_gameConv->active() || _vm->_game->_screenObjects._inputMode == kInputConversation) {
|
||||||
_action._inProgress = false;
|
_action._inProgress = false;
|
||||||
} else {
|
} else {
|
||||||
if ((_action._inProgress || _vm->_game->_trigger) ||
|
if ((_action._inProgress || _vm->_game->_trigger) ||
|
||||||
@ -587,6 +604,10 @@ void Scene::doAction() {
|
|||||||
_action._inProgress = false;
|
_action._inProgress = false;
|
||||||
if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PARSER)
|
if (_vm->_game->_triggerMode == SEQUENCE_TRIGGER_PARSER)
|
||||||
_vm->_game->_trigger = 0;
|
_vm->_game->_trigger = 0;
|
||||||
|
|
||||||
|
if (_vm->_gameConv->active() && (_vm->_gameConv->currentMode() == CONVMODE_1 ||
|
||||||
|
_vm->_gameConv->currentMode() == CONVMODE_2))
|
||||||
|
_vm->_gameConv->update(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::doSceneStep() {
|
void Scene::doSceneStep() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user