aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/res.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2007-09-23 22:17:57 +0000
committerPaul Gilbert2007-09-23 22:17:57 +0000
commitb4cff6b9bdda3c1d30af9f919a3698b57172522c (patch)
tree9b9d8046b5d50a4c34f13fed19e53c968d9ec2f5 /engines/lure/res.cpp
parent8685b1b45648ffb89468537e8154afbc074a2e4d (diff)
downloadscummvm-rg350-b4cff6b9bdda3c1d30af9f919a3698b57172522c.tar.gz
scummvm-rg350-b4cff6b9bdda3c1d30af9f919a3698b57172522c.tar.bz2
scummvm-rg350-b4cff6b9bdda3c1d30af9f919a3698b57172522c.zip
Converted fields in data that were originally offsets (such as tick proc offsets) to use indexes, allowing for more generic handling of different language versions
svn-id: r29073
Diffstat (limited to 'engines/lure/res.cpp')
-rw-r--r--engines/lure/res.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 983afb7357..65dafc95d6 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -480,10 +480,11 @@ void Resources::setTalkingCharacter(uint16 id) {
assert(character);
// Add the special "voice" animation above the character
- Hotspot *hotspot = new Hotspot(character, VOICE_ANIM_ID);
+ Hotspot *hotspot = new Hotspot(character, VOICE_ANIM_INDEX);
addHotspot(hotspot);
}
}
+uint16 englishLoadOffsets[] = {0x3afe, 0x41BD, 0x7167, 0x7172, 0x8617, 0x88ac, 0};
Hotspot *Resources::activateHotspot(uint16 hotspotId) {
HotspotData *res = getHotspot(hotspotId);
@@ -508,24 +509,23 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
uint16 talkIndex;
switch (res->loadOffset) {
- case 0x3afe:
- // Copy protection check - since the game is freeware now,
- // don't bother with it
+ case 1:
+ // Copy protection check - since the game is freeware now, ignore it
loadFlag = false;
break;
- case 0x41BD:
+ case 2:
// Empty handler used to prevent loading hotspots that
// are yet to be active (such as the straw fire)
loadFlag = false;
break;
- case 0x7172:
- case 0x7167:
+ case 3:
+ case 4:
// Standard animation load
break;
- case 0x8617:
+ case 5:
// Custom loader used by the notice hotspot 42ah in room #20
talkIndex = _fieldList.getField(TALK_INDEX);
if ((talkIndex < 8) || (talkIndex >= 14))
@@ -536,14 +536,14 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
res->startY = 85;
break;
- case 0x88ac:
+ case 6:
// Torch in room #1
loadFlag = _fieldList.getField(TORCH_HIDE) == 0;
break;
default:
// All others simply activate the hotspot
- warning("Hotspot %d uses unknown load offset proc %d",
+ warning("Hotspot %d uses unknown load offset index %d",
res->hotspotId, res->loadOffset);
}
@@ -552,8 +552,8 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
assert(hotspot);
// Special post-load handling
- if (res->loadOffset == 0x7167) hotspot->setPersistant(true);
- if (res->loadOffset == 0x8617) hotspot->handleTalkDialog();
+ if (res->loadOffset == 3) hotspot->setPersistant(true);
+ if (res->loadOffset == 5) 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