aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2009-08-18 12:25:04 +0000
committerPaul Gilbert2009-08-18 12:25:04 +0000
commit2b945eabf1acc24d289cc8489216fc007899275c (patch)
tree64eaf03989c5dd282b58aed221420392d04c7560 /engines/lure
parentca9bbce9b3e8771f346eca037bd0c39a7e0360de (diff)
downloadscummvm-rg350-2b945eabf1acc24d289cc8489216fc007899275c.tar.gz
scummvm-rg350-2b945eabf1acc24d289cc8489216fc007899275c.tar.bz2
scummvm-rg350-2b945eabf1acc24d289cc8489216fc007899275c.zip
Bugfix for Castle Skorl problem reported on the list
svn-id: r43507
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/res.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 7eb76cad32..e921b93384 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -550,6 +550,7 @@ void Resources::setTalkingCharacter(uint16 id) {
uint16 englishLoadOffsets[] = {0x3afe, 0x41BD, 0x7167, 0x7172, 0x8617, 0x88ac, 0};
Hotspot *Resources::activateHotspot(uint16 hotspotId) {
+ Resources &resources = Resources::getReference();
HotspotData *res = getHotspot(hotspotId);
if (!res) return NULL;
res->roomNumber &= 0x7fff; // clear any suppression bit in room #
@@ -561,7 +562,6 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
// If it's NPC with a schedule, then activate the schedule
if ((res->npcScheduleId != 0) && (res->npcSchedule.isEmpty())) {
- Resources &resources = Resources::getReference();
CharacterScheduleEntry *entry = resources.charSchedules().getEntry(res->npcScheduleId);
res->npcSchedule.addFront(DISPATCH_ACTION, entry, res->roomNumber);
}
@@ -621,9 +621,12 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
// Special post-load handling
if (res->loadOffset == 3) hotspot->setPersistant(true);
if (res->loadOffset == 5) hotspot->handleTalkDialog();
- if (hotspotId == CASTLE_SKORL_ID)
+ if (hotspotId == CASTLE_SKORL_ID) {
// The Castle skorl has a default room #99, so it needs to be adjusted dynamically
- res->npcSchedule.top().setRoomNumber(res->roomNumber);
+ res->npcSchedule.clear();
+ CharacterScheduleEntry *entry = resources.charSchedules().getEntry(res->npcScheduleId);
+ res->npcSchedule.addFront(DISPATCH_ACTION, entry, res->roomNumber);
+ }
// TODO: Figure out why there's a room set in the animation decode for a range of characters,
// particularly since it doesn't seem to match what happens in-game