aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/hotspots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lure/hotspots.cpp')
-rw-r--r--engines/lure/hotspots.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index d514807792..1211634b94 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -757,6 +757,7 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
debugC(ERROR_DETAILED, kLureDebugStrings, "Hotspot::showMessage messageId=%xh srcChar=%xh, destChar=%xh",
messageId, _hotspotId, destCharacterId);
Resources &res = Resources::getReference();
+ char nameBuffer[MAX_HOTSPOT_NAME_SIZE];
MemoryBlock *data = res.messagesData();
Hotspot *hotspot;
uint16 *v = (uint16 *) data->data();
@@ -794,9 +795,13 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
} else if (idVal >= 0x8000) {
// Handle string display
idVal &= 0x7fff;
- hotspot = res.getActiveHotspot(res.fieldList().getField(ACTIVE_HOTSPOT_ID));
- const char *itemName = (hotspot == NULL) ? NULL : hotspot->getName();
-
+ HotspotData *hotspotData = res.getHotspot(res.fieldList().getField(ACTIVE_HOTSPOT_ID));
+ const char *itemName = NULL;
+ if (hotspotData != NULL) {
+ StringData::getReference().getString(hotspotData->nameId, nameBuffer);
+ itemName = nameBuffer;
+ }
+
Dialog::show(idVal, itemName, this->getName());
} else if (idVal != 0) {