From 931fdc18788c00038356ba2d721f9f3c0f18c815 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Thu, 1 Dec 2011 11:38:31 +0100 Subject: DREAMWEB: 'sparkydrip' ported to C++ --- devtools/tasmrecover/tasm-recover | 1 + engines/dreamweb/dreamgen.cpp | 10 ---------- engines/dreamweb/dreamgen.h | 2 -- engines/dreamweb/sprite.cpp | 9 +++++++-- engines/dreamweb/stubs.h | 1 + 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 45cdb23c62..1705a4eed0 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -335,6 +335,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'trysoundalloc', 'worktoscreenm', 'checkspeed', + 'sparkydrip', ], skip_output = [ # These functions are processed but not output 'dreamweb', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index fa2fb78e3a..b98726ee85 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -942,16 +942,6 @@ gamerfin: addtopeoplelist(); } -void DreamGenContext::sparkydrip() { - STACK_CHECK; - checkspeed(); - if (!flags.z()) - return /* (cantdrip) */; - al = 14; - ah = 0; - playchannel0(); -} - void DreamGenContext::carparkdrip() { STACK_CHECK; checkspeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 5497f709fd..51acfd7e7a 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -457,7 +457,6 @@ public: static const uint16 addr_candles1 = 0xc08c; static const uint16 addr_keeper = 0xc088; static const uint16 addr_carparkdrip = 0xc084; - static const uint16 addr_sparkydrip = 0xc080; static const uint16 addr_gamer = 0xc07c; static const uint16 addr_bossman = 0xc078; static const uint16 addr_heavy = 0xc074; @@ -1323,7 +1322,6 @@ public: void enablesoundint(); void madmanstelly(); void purgealocation(); - void sparkydrip(); void getridofpit(); void nothelderror(); void getsetad(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 4e0f927bb1..b5807aa512 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -568,7 +568,7 @@ void DreamGenContext::showrain() { } static void (DreamGenContext::*reelCallbacks[57])() = { - &DreamGenContext::gamer, &DreamGenContext::sparkydrip, + &DreamGenContext::gamer, NULL, &DreamGenContext::eden, &DreamGenContext::edeninbath, &DreamGenContext::sparky, &DreamGenContext::smokebloke, &DreamGenContext::manasleep, &DreamGenContext::drunk, @@ -600,7 +600,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { }; static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { - NULL, NULL, + NULL, &DreamGenContext::sparkydrip, NULL, NULL, NULL, NULL, NULL, NULL, @@ -1077,5 +1077,10 @@ bool DreamGenContext::checkspeed(ReelRoutine *routine) { return true; } +void DreamGenContext::sparkydrip(ReelRoutine &routine) { + if (checkspeed(&routine)) + playchannel0(14, 0); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 4dbe34195d..9f7bce4af9 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -377,4 +377,5 @@ void worktoscreenm(); bool checkspeed(ReelRoutine *routine); void checkspeed(); + void sparkydrip(ReelRoutine &routine); -- cgit v1.2.3