aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2006-08-07 13:21:15 +0000
committerPaul Gilbert2006-08-07 13:21:15 +0000
commit1a77d61acee07a637f41e728214d64187dbe74eb (patch)
tree7e4497523642a64b8addee7e72acabf31066cdf3
parentc0e600e0fad450dd0b615a33f24b48f10cf32ea3 (diff)
downloadscummvm-rg350-1a77d61acee07a637f41e728214d64187dbe74eb.tar.gz
scummvm-rg350-1a77d61acee07a637f41e728214d64187dbe74eb.tar.bz2
scummvm-rg350-1a77d61acee07a637f41e728214d64187dbe74eb.zip
Enhanced Room::setTalkDialog to be passed the destination character and active item hotspot Id
svn-id: r23692
-rw-r--r--engines/lure/room.cpp15
-rw-r--r--engines/lure/room.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 224cbd8f79..fe53739dd7 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -554,30 +554,33 @@ void Room::checkCursor() {
}
if (oldHotspotId != _hotspotId)
- StringData::getReference().getString(_hotspotNameId, _hotspotName, NULL, NULL);
+ StringData::getReference().getString(_hotspotNameId, _hotspotName);
}
if (mouse.getCursorNum() != newCursor)
mouse.setCursorNum(newCursor);
}
-void Room::setTalkDialog(uint16 characterId, uint16 stringId) {
+void Room::setTalkDialog(uint16 srcCharacterId, uint16 destCharacterId, uint16 usedId, uint16 stringId) {
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "Room::setTalkDialog - char=%xh string=%d",
+ srcCharacterId, stringId);
+
if (_talkDialog) {
delete _talkDialog;
_talkDialog = NULL;
}
Resources &res = Resources::getReference();
- res.setTalkingCharacter(characterId);
+ res.setTalkingCharacter(srcCharacterId);
- if (characterId == 0)
+ if (srcCharacterId == 0)
return;
- HotspotData *character = res.getHotspot(characterId);
+ HotspotData *character = res.getHotspot(srcCharacterId);
if (character->roomNumber != _roomNumber)
return;
- _talkDialog = new TalkDialog(characterId, stringId);
+ _talkDialog = new TalkDialog(srcCharacterId, destCharacterId, usedId, stringId);
_talkDialogX = character->startX + (character->width / 2) - (TALK_DIALOG_WIDTH / 2);
if (_talkDialogX < 0) _talkDialogX = 0;
diff --git a/engines/lure/room.h b/engines/lure/room.h
index cf6c89c72d..ba32496997 100644
--- a/engines/lure/room.h
+++ b/engines/lure/room.h
@@ -104,7 +104,7 @@ public:
bool showInfo() { return _showInfo; }
CursorState cursorState() { return _cursorState; }
void setShowInfo(bool value) { _showInfo = value; }
- void setTalkDialog(uint16 characterId, uint16 descId);
+ void setTalkDialog(uint16 srcCharacterId, uint16 destCharacterId, uint16 usedId, uint16 stringId);
void setCursorState(CursorState state) { _cursorState = state; }
bool checkInTalkDialog();
char *statusLine() { return _statusLine; }