aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/res.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2007-02-22 06:29:09 +0000
committerPaul Gilbert2007-02-22 06:29:09 +0000
commit7ac767a2bae0bcc97bd46a7a29ced6b21dbc12a3 (patch)
tree52916c859b0af3f822befcae83da5a26f1d6b7c1 /engines/lure/res.cpp
parent69255e9c14fceb7a6584a8bf52bfa9ab009dea16 (diff)
downloadscummvm-rg350-7ac767a2bae0bcc97bd46a7a29ced6b21dbc12a3.tar.gz
scummvm-rg350-7ac767a2bae0bcc97bd46a7a29ced6b21dbc12a3.tar.bz2
scummvm-rg350-7ac767a2bae0bcc97bd46a7a29ced6b21dbc12a3.zip
Added proper support for the random actions your sidekick can do in each room
svn-id: r25780
Diffstat (limited to 'engines/lure/res.cpp')
-rw-r--r--engines/lure/res.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 2eb6aaee8f..6277dab4c9 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -55,6 +55,7 @@ void Resources::freeData() {
_exitJoins.clear();
_delayList.clear();
_charSchedules.clear();
+ _randomActions.clear();
_indexedRoomExitHospots.clear();
_pausedList.clear();
_stringList.clear();
@@ -283,6 +284,15 @@ void Resources::reloadData() {
for (ctr = 0; ctr < numCharOffsets; ++ctr, ++offset)
_charOffsets[ctr] = READ_LE_UINT16(offset);
+ // Next load up the list of random actions your follower can do in each room
+
+ ++offset;
+ while (READ_LE_UINT16(offset) != 0xffff)
+ {
+ RandomActionSet *actionSet = new RandomActionSet(offset);
+ _randomActions.push_back(actionSet);
+ }
+
// Loop through loading the schedules
ctr = 0;
while ((startOffset = READ_LE_UINT16(++offset)) != 0xffff) {
@@ -515,8 +525,25 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
if (loadFlag) {
Hotspot *hotspot = addHotspot(hotspotId);
assert(hotspot);
+
+ // Special post-load handling
if (res->loadOffset == 0x7167) hotspot->setPersistant(true);
if (res->loadOffset == 0x8617) hotspot->handleTalkDialog();
+
+ // 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
+ /*
+ if ((hotspot->hotspotId() >= RATPOUCH_ID) &&
+ (hotspot->hotspotId() < FIRST_NONCHARACTER_ID) &&
+ (hotspot->roomNumber() < 42))
+ {
+ // Start wandering characters off in room 24
+ hotspot->setRoomNumber(24);
+ hotspot->setPosition(64, 116);
+ _fieldList.wanderingCharsLoaded() = true;
+ }
+ */
+
return hotspot;
}
}