aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/conversations.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-01-17 17:57:10 -0500
committerPaul Gilbert2016-01-17 17:57:10 -0500
commit5afdf3277ebe6ea334b928d20e54d9acac69c377 (patch)
tree7b721988caceb9ce633eb1503ad6e68c91940205 /engines/mads/conversations.cpp
parentbd3f64a8cf95278aa9ec70ce29d0c50f48a2e4a9 (diff)
downloadscummvm-rg350-5afdf3277ebe6ea334b928d20e54d9acac69c377.tar.gz
scummvm-rg350-5afdf3277ebe6ea334b928d20e54d9acac69c377.tar.bz2
scummvm-rg350-5afdf3277ebe6ea334b928d20e54d9acac69c377.zip
MADS: Beginnings of loading Phantom-style dialogs
Diffstat (limited to 'engines/mads/conversations.cpp')
-rw-r--r--engines/mads/conversations.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index 169e844220..84e0f8395b 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -47,6 +47,7 @@ GameConversations::GameConversations(MADSEngine *vm) : _vm(vm) {
_currentNode = 0;
_dialogNodeOffset = _dialogNodeSize = 0;
_dialog = nullptr;
+ _dialogAltFlag = false;
// Mark all conversation slots as empty
for (int idx = 0; idx < MAX_CONVERSATIONS; ++idx)
@@ -417,23 +418,27 @@ ConversationMode GameConversations::generateMenu() {
}
void GameConversations::generateText(int textLineIndex, Common::Array<int> &messages) {
+ _dialogAltFlag = true;
+
error("TODO: GameConversations::generateText");
}
void GameConversations::generateMessage(Common::Array<int> &messageList, Common::Array<int> &voiceList) {
+ _dialogAltFlag = false;
if (messageList.size() == 0)
return;
if (_dialog)
delete _dialog;
+ // Get the speaker portrait
+ SpriteAsset &sprites = *_vm->_game->_scene._sprites[_speakerSeries[_personSpeaking]];
+ MSprite *portrait = sprites.getFrame(_speakerFrame[_personSpeaking]);
+
// Create the new text dialog
_dialog = new TextDialog(_vm, FONT_INTERFACE,
- Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]), _popupMaxLen[_personSpeaking]);
-
- // Add the sprite for the speaker
- SpriteAsset &sprites = *_vm->_game->_scene._sprites[_speakerSeries[_personSpeaking]];
- _dialog->addIcon(sprites.getFrame(_speakerFrame[_personSpeaking]));
+ Common::Point(_popupX[_personSpeaking], _popupY[_personSpeaking]),
+ portrait, _popupMaxLen[_personSpeaking]);
// Add in the lines
for (uint msgNum = 0; msgNum < messageList.size(); ++msgNum) {