[Scummvm-cvs-logs] scummvm master -> dc38524c9177429140bdebb5b0dbcd568faea2df
tramboi
bertrand_augereau at yahoo.fr
Thu Dec 1 12:28:14 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
931fdc1878 DREAMWEB: 'sparkydrip' ported to C++
dc38524c91 DREAMWEB: Naming of ReelRoutine members
Commit: 931fdc18788c00038356ba2d721f9f3c0f18c815
https://github.com/scummvm/scummvm/commit/931fdc18788c00038356ba2d721f9f3c0f18c815
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-01T03:18:02-08:00
Commit Message:
DREAMWEB: 'sparkydrip' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/sprite.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 45cdb23..1705a4e 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 fa2fb78..b98726e 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 5497f70..51acfd7 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 4e0f927..b5807aa 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 4dbe341..9f7bce4 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);
Commit: dc38524c9177429140bdebb5b0dbcd568faea2df
https://github.com/scummvm/scummvm/commit/dc38524c9177429140bdebb5b0dbcd568faea2df
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-01T03:18:04-08:00
Commit Message:
DREAMWEB: Naming of ReelRoutine members
Changed paths:
engines/dreamweb/sprite.cpp
engines/dreamweb/structs.h
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index b5807aa..9043409 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -1070,10 +1070,10 @@ void DreamGenContext::checkspeed() {
bool DreamGenContext::checkspeed(ReelRoutine *routine) {
if (data.byte(kLastweapon) != (uint8)-1)
return true;
- ++routine->b6;
- if (routine->b6 != routine->b5)
+ ++routine->counter;
+ if (routine->counter != routine->period)
return false;
- routine->b6 = 0;
+ routine->counter = 0;
return true;
}
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index c9ec703..db863ac 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -167,8 +167,8 @@ struct ReelRoutine {
uint8 b4;
uint16 reelPointer() const { return READ_LE_UINT16(&b3); }
void setReelPointer(uint16 v) { WRITE_LE_UINT16(&b3, v); }
- uint8 b5;
- uint8 b6;
+ uint8 period;
+ uint8 counter;
uint8 b7;
};
More information about the Scummvm-git-logs
mailing list