[Scummvm-cvs-logs] scummvm master -> 7b7bccfd4e8db43d180630996d60e314792cc6ff
tramboi
bertrand_augereau at yahoo.fr
Thu Dec 1 11:26:33 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:
0b120fb233 DREAMWEB: 'checkspeed' ported to C++
7b7bccfd4e DREAMWEB: 'madman' uses the ported 'checkspeed'
Commit: 0b120fb2333fef1f604026ab7eacc4d24c266e86
https://github.com/scummvm/scummvm/commit/0b120fb2333fef1f604026ab7eacc4d24c266e86
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-01T02:24:28-08:00
Commit Message:
DREAMWEB: 'checkspeed' 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 27fb419..45cdb23 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -334,6 +334,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'setupemm',
'trysoundalloc',
'worktoscreenm',
+ 'checkspeed',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index c58bf5f..fa2fb78 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -1859,24 +1859,6 @@ gottrainframe:
showgamereel();
}
-void DreamGenContext::checkspeed() {
- STACK_CHECK;
- _cmp(data.byte(kLastweapon), -1);
- if (!flags.z())
- goto forcenext;
- _inc(es.byte(bx+6));
- al = es.byte(bx+6);
- _cmp(al, es.byte(bx+5));
- if (!flags.z())
- return /* (notspeed) */;
- al = 0;
- es.byte(bx+6) = al;
- _cmp(al, al);
- return;
-forcenext:
- _cmp(al, al);
-}
-
void DreamGenContext::checkforexit() {
STACK_CHECK;
cl = data.byte(kRyanx);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index a3b5103..5497f70 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -428,7 +428,6 @@ public:
static const uint16 addr_adjustdown = 0xc14c;
static const uint16 addr_checkforexit = 0xc148;
static const uint16 addr_mainman = 0xc138;
- static const uint16 addr_checkspeed = 0xc110;
static const uint16 addr_train = 0xc104;
static const uint16 addr_sparky = 0xc100;
static const uint16 addr_copper = 0xc0fc;
@@ -1231,7 +1230,6 @@ public:
void setuppit();
void showpcx();
void showdecisions();
- void checkspeed();
void showkeypad();
void removeobfrominv();
void usecoveredbox();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 01defc5..9d91870 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -1063,5 +1063,20 @@ void DreamGenContext::reconstruct() {
data.byte(kHavedoneobs) = 0;
}
+void DreamGenContext::checkspeed() {
+ ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine));
+ flags._z = checkspeed(routine);
+}
+
+bool DreamGenContext::checkspeed(ReelRoutine *routine) {
+ if (data.byte(kLastweapon) != (uint8)-1)
+ return true;
+ ++routine->b6;
+ if (routine->b6 != routine->b5)
+ return false;
+ routine->b6 = 0;
+ return true;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 1ec3e14..4dbe341 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -375,4 +375,6 @@
void drawfloor();
void allocatebuffers();
void worktoscreenm();
+ bool checkspeed(ReelRoutine *routine);
+ void checkspeed();
Commit: 7b7bccfd4e8db43d180630996d60e314792cc6ff
https://github.com/scummvm/scummvm/commit/7b7bccfd4e8db43d180630996d60e314792cc6ff
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-01T02:24:33-08:00
Commit Message:
DREAMWEB: 'madman' uses the ported 'checkspeed'
Changed paths:
engines/dreamweb/sprite.cpp
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 9d91870..4e0f927 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -681,8 +681,7 @@ void DreamGenContext::madmantext() {
void DreamGenContext::madman() {
ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, 0);
data.word(kWatchingtime) = 2;
- checkspeed();
- if (flags.z()) {
+ if (checkspeed(routine)) {
ax = routine->reelPointer();
if (ax >= 364) {
data.byte(kMandead) = 2;
More information about the Scummvm-git-logs
mailing list