aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2007-04-02 06:03:47 +0000
committerPaul Gilbert2007-04-02 06:03:47 +0000
commit89a29e32bfc1815a5a205126fb947a8c318f78bb (patch)
tree739ce045a1b476069b128d949479a64d3c141f94
parentdab34226dcf709cc30e348a41ca41536d70d6bf8 (diff)
downloadscummvm-rg350-89a29e32bfc1815a5a205126fb947a8c318f78bb.tar.gz
scummvm-rg350-89a29e32bfc1815a5a205126fb947a8c318f78bb.tar.bz2
scummvm-rg350-89a29e32bfc1815a5a205126fb947a8c318f78bb.zip
Added in more character tick handlers
svn-id: r26368
-rw-r--r--engines/lure/hotspots.cpp34
-rw-r--r--engines/lure/hotspots.h3
-rw-r--r--engines/lure/luredefs.h1
3 files changed, 37 insertions, 1 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 61d37d3084..d53bca7d75 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -1984,7 +1984,7 @@ void Hotspot::loadFromStream(Common::ReadStream *stream) {
HandlerMethodPtr HotspotTickHandlers::getHandler(uint16 procOffset) {
switch (procOffset) {
- case 0x4F82:
+ case STANDARD_CHARACTER_TICK_PROC:
return standardCharacterAnimHandler;
case VOICE_TICK_PROC_ID:
return voiceBubbleAnimHandler;
@@ -2008,6 +2008,8 @@ HandlerMethodPtr HotspotTickHandlers::getHandler(uint16 procOffset) {
return playerSewerExitAnimHandler;
case 0x8009:
return fireAnimHandler;
+ case 0x8180:
+ return goewinCaptiveAnimHandler;
case 0x81B3:
return prisonerAnimHandler;
case 0x81F3:
@@ -2016,6 +2018,10 @@ HandlerMethodPtr HotspotTickHandlers::getHandler(uint16 procOffset) {
return morkusAnimHandler;
case 0x8241:
return headAnimHandler;
+ case 0x82A0:
+ return sellerAnimHandler;
+ case 0x85ce:
+ return skorlGaurdAnimHandler;
case 0x882A:
return rackSerfAnimHandler;
case TALK_TICK_PROC_ID:
@@ -2810,6 +2816,15 @@ void HotspotTickHandlers::fireAnimHandler(Hotspot &h) {
h.setOccupied(true);
}
+void HotspotTickHandlers::goewinCaptiveAnimHandler(Hotspot &h) {
+ if (h.actionCtr() > 0) {
+ if (h.executeScript()) {
+ h.setTickProc(STANDARD_CHARACTER_TICK_PROC);
+ h.setActionCtr(0);
+ }
+ }
+}
+
void HotspotTickHandlers::prisonerAnimHandler(Hotspot &h) {
ValueTableData &fields = Resources::getReference().fieldList();
Common::RandomSource rnd;
@@ -3091,6 +3106,23 @@ void HotspotTickHandlers::headAnimHandler(Hotspot &h) {
h.setFrameNumber(frameNumber);
}
+void HotspotTickHandlers::sellerAnimHandler(Hotspot &h) {
+ h.handleTalkDialog();
+ if (h.frameCtr() > 0) {
+ h.decrFrameCtr();
+ return;
+ }
+
+ // TODO: Decode remainder of sellers tick proc
+}
+
+void HotspotTickHandlers::skorlGaurdAnimHandler(Hotspot &h) {
+ h.handleTalkDialog();
+
+ // Set the frame number
+ h.setFrameNumber(h.actionCtr());
+}
+
void HotspotTickHandlers::rackSerfAnimHandler(Hotspot &h) {
Resources &res = Resources::getReference();
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index 05873cf8c3..60cff496d1 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -68,11 +68,14 @@ private:
static void droppingTorchAnimHandler(Hotspot &h);
static void playerSewerExitAnimHandler(Hotspot &h);
static void fireAnimHandler(Hotspot &h);
+ static void goewinCaptiveAnimHandler(Hotspot &h);
static void prisonerAnimHandler(Hotspot &h);
static void catrionaAnimHandler(Hotspot &h);
static void morkusAnimHandler(Hotspot &h);
static void talkAnimHandler(Hotspot &h);
static void headAnimHandler(Hotspot &h);
+ static void sellerAnimHandler(Hotspot &h);
+ static void skorlGaurdAnimHandler(Hotspot &h);
static void rackSerfAnimHandler(Hotspot &h);
public:
diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h
index 2988189e5d..979fb353f0 100644
--- a/engines/lure/luredefs.h
+++ b/engines/lure/luredefs.h
@@ -239,6 +239,7 @@ enum Action {
#define GAME_FRAME_DELAY 80
// Tick proc constants
+#define STANDARD_CHARACTER_TICK_PROC 0x4f82
#define TALK_TICK_PROC_ID 0x8ABD
#define PLAYER_TICK_PROC_ID 0x5E44
#define VOICE_TICK_PROC_ID 0x625E