aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2007-04-15 12:12:21 +0000
committerPaul Gilbert2007-04-15 12:12:21 +0000
commit258ab37a9a0b2ca426d2908408dfe09e451eea02 (patch)
treeaab3ab59f4ef9277be1b05414e6f99a10be6d537 /engines/lure/surface.cpp
parent48c21a1e314c9c3b605e498a1de612d515975b96 (diff)
downloadscummvm-rg350-258ab37a9a0b2ca426d2908408dfe09e451eea02.tar.gz
scummvm-rg350-258ab37a9a0b2ca426d2908408dfe09e451eea02.tar.bz2
scummvm-rg350-258ab37a9a0b2ca426d2908408dfe09e451eea02.zip
Altered message display to correctly handle optional display of hotspot/character article prefixes
svn-id: r26491
Diffstat (limited to 'engines/lure/surface.cpp')
-rw-r--r--engines/lure/surface.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index ef38854bee..fdb0e97128 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -504,6 +504,7 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active
char srcCharName[MAX_DESC_SIZE];
char destCharName[MAX_DESC_SIZE];
char itemName[MAX_DESC_SIZE];
+ int characterArticle, hotspotArticle = 3;
HotspotData *talkingChar = res.getHotspot(characterId);
HotspotData *destCharacter = (destCharacterId == 0) ? NULL :
@@ -512,16 +513,19 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active
res.getHotspot(activeItemId);
assert(talkingChar);
- strings.getString(talkingChar->nameId, srcCharName);
+ strings.getString(talkingChar->nameId & 0x1fff, srcCharName);
+ characterArticle = talkingChar->nameId >> 14;
strcpy(destCharName, "");
if (destCharacter != NULL)
strings.getString(destCharacter->nameId, destCharName);
strcpy(itemName, "");
- if (itemHotspot != NULL)
- strings.getStringWithArticle(itemHotspot->nameId, itemName);
+ if (itemHotspot != NULL) {
+ strings.getString(itemHotspot->nameId & 0x1fff, itemName);
+ hotspotArticle = itemHotspot->nameId >> 14;
+ }
- strings.getString(descId, _desc, itemName, destCharName);
+ strings.getString(descId, _desc, itemName, destCharName, hotspotArticle, characterArticle);
// Apply word wrapping to figure out the needed size of the dialog
Surface::wordWrap(_desc, TALK_DIALOG_WIDTH - (TALK_DIALOG_EDGE_SIZE + 3) * 2,