diff options
author | Paul Gilbert | 2007-04-22 22:42:01 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-04-22 22:42:01 +0000 |
commit | 307506df9ce7537b1ecbb967fc165ac7548dfc25 (patch) | |
tree | 08a3fa8c530cd89e018ea684b5a9871664c4c459 /engines/lure/scripts.cpp | |
parent | fa99ffd26728197d2cae7adbc8722dca54c2416a (diff) | |
download | scummvm-rg350-307506df9ce7537b1ecbb967fc165ac7548dfc25.tar.gz scummvm-rg350-307506df9ce7537b1ecbb967fc165ac7548dfc25.tar.bz2 scummvm-rg350-307506df9ce7537b1ecbb967fc165ac7548dfc25.zip |
General bugfixes, added animation handlers for creating potion and freeing Goewin, and in-progress work on completing original game's action precheck code
svn-id: r26572
Diffstat (limited to 'engines/lure/scripts.cpp')
-rw-r--r-- | engines/lure/scripts.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 6256bd018d..c12291dca5 100644 --- a/engines/lure/scripts.cpp +++ b/engines/lure/scripts.cpp @@ -57,8 +57,9 @@ void Script::activateHotspot(uint16 hotspotId, uint16 v2, uint16 v3) { void Script::setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3) { Resources &r = Resources::getReference(); uint16 offset = r.getHotspotScript(scriptIndex); - HotspotData *rsc = r.getHotspot(hotspotId); - rsc->sequenceOffset = offset; + Hotspot *hotspot = r.getActiveHotspot(hotspotId); + assert(hotspot); + hotspot->setScript(offset); } void Script::method2(uint16 v1, uint16 v2, uint16 v3) { @@ -330,6 +331,21 @@ void Script::enableHotspot(uint16 hotspotId, uint16 v2, uint16 v3) { hotspot->flags = (hotspot->flags & 0xdf) | 0x80; } +// Display a message + +void Script::displayMessage2(uint16 messageId, uint16 hotspotId, uint16 v3) { + Hotspot *hotspot = Resources::getReference().getActiveHotspot(hotspotId); + assert(hotspot); + hotspot->showMessage(messageId); +} + +void Script::startOilBurner(uint16 v1, uint16 v2, uint16 v3) { + Hotspot *hotspot = Resources::getReference().getActiveHotspot(OIL_BURNER_ID); + assert(hotspot); + hotspot->setPosition(152, hotspot->y()); + hotspot->setTickProc(STANDARD_ANIM_TICK_PROC); +} + // Transforms the player void Script::transformPlayer(uint16 v1, uint16 v2, uint16 v3) { @@ -556,7 +572,9 @@ SequenceMethodRecord scriptMethods[] = { {33, Script::cutSack}, {34, Script::increaseNumGroats}, {35, Script::enableHotspot}, - {37, Script::transformPlayer}, + {36, Script::displayMessage2}, + {37, Script::startOilBurner}, + {38, Script::transformPlayer}, {39, Script::jailClose}, {40, Script::checkDroppedDesc}, {42, Script::doorClose}, |