[Scummvm-cvs-logs] scummvm master -> 112921a19fb8efe0725094301e69a5f80a66e9b4
tramboi
bertrand_augereau at yahoo.fr
Sun Dec 4 12:49:19 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:
2801eaf6fe DREAMWEB: 'manAsleep' ported to C++
112921a19f DREAMWEB: 'checkSpeed' takes a reference
Commit: 2801eaf6fe57ceefac3989a6769e6b447a24b17b
https://github.com/scummvm/scummvm/commit/2801eaf6fe57ceefac3989a6769e6b447a24b17b
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T05:45:07-08:00
Commit Message:
DREAMWEB: 'manAsleep' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/people.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index cc8e944..e84c199 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -310,6 +310,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'makesprite',
'makeworn',
'malefan',
+ 'manasleep',
'maptopanel',
'modifychar',
'monmessage',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index bd861ca..7a7b34a 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -118,15 +118,6 @@ void DreamGenContext::attendant() {
data.byte(kTalkedtoattendant) = 1;
}
-void DreamGenContext::manAsleep() {
- STACK_CHECK;
- al = es.byte(bx+7);
- _and(al, 127);
- es.byte(bx+7) = al;
- showGameReel();
- addToPeopleList();
-}
-
void DreamGenContext::edenInBath() {
STACK_CHECK;
_cmp(data.byte(kGeneraldead), 0);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f7aa6c6..e570bae 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -662,7 +662,6 @@ public:
void openPoolBoss();
void usePlate();
void lookInInterface();
- void manAsleep();
void hotelBell();
void loadSpeech();
void adjustLeft();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index a05d892..956125b 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -28,7 +28,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
NULL, &DreamGenContext::edenInBath,
NULL, NULL,
- &DreamGenContext::manAsleep, &DreamGenContext::drunk,
+ NULL, &DreamGenContext::drunk,
&DreamGenContext::receptionist, NULL,
NULL, &DreamGenContext::louis,
&DreamGenContext::louisChair, &DreamGenContext::soldier1,
@@ -60,7 +60,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::gamer, &DreamGenContext::sparkyDrip,
&DreamGenContext::eden, /*&DreamGenContext::edenInBath*/NULL,
&DreamGenContext::sparky, &DreamGenContext::smokeBloke,
- /*&DreamGenContext::manAsleep*/NULL, /*&DreamGenContext::drunk*/NULL,
+ &DreamGenContext::manAsleep, /*&DreamGenContext::drunk*/NULL,
/*&DreamGenContext::receptionist*/NULL, &DreamGenContext::maleFan,
&DreamGenContext::femaleFan, /*&DreamGenContext::louis*/NULL,
/*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL,
@@ -348,5 +348,11 @@ void DreamGenContext::smokeBloke(ReelRoutine &routine) {
addToPeopleList(&routine);
}
+void DreamGenContext::manAsleep(ReelRoutine &routine) {
+ routine.b7 &= 127;
+ showGameReel(&routine);
+ addToPeopleList(&routine);
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 7339f93..e7e35e6 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -398,6 +398,7 @@
void rockstar(ReelRoutine &routine);
void madmansTelly(ReelRoutine &routine);
void smokeBloke(ReelRoutine &routine);
+ void manAsleep(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void showKeypad();
void showOuterPad();
Commit: 112921a19fb8efe0725094301e69a5f80a66e9b4
https://github.com/scummvm/scummvm/commit/112921a19fb8efe0725094301e69a5f80a66e9b4
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T05:48:29-08:00
Commit Message:
DREAMWEB: 'checkSpeed' takes a reference
Changed paths:
engines/dreamweb/people.cpp
engines/dreamweb/stubs.h
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 956125b..5aef251 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -137,7 +137,7 @@ void DreamGenContext::madmanText() {
void DreamGenContext::madman(ReelRoutine &routine) {
data.word(kWatchingtime) = 2;
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint16 newReelPointer = routine.reelPointer();
if (newReelPointer >= 364) {
data.byte(kMandead) = 2;
@@ -207,21 +207,21 @@ void DreamGenContext::addToPeopleList(ReelRoutine *routine) {
void DreamGenContext::checkSpeed() {
ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine));
- flags._z = checkSpeed(routine);
+ flags._z = checkSpeed(*routine);
}
-bool DreamGenContext::checkSpeed(ReelRoutine *routine) {
+bool DreamGenContext::checkSpeed(ReelRoutine &routine) {
if (data.byte(kLastweapon) != (uint8)-1)
return true;
- ++routine->counter;
- if (routine->counter != routine->period)
+ ++routine.counter;
+ if (routine.counter != routine.period)
return false;
- routine->counter = 0;
+ routine.counter = 0;
return true;
}
void DreamGenContext::sparkyDrip(ReelRoutine &routine) {
- if (checkSpeed(&routine))
+ if (checkSpeed(routine))
playChannel0(14, 0);
}
@@ -231,7 +231,7 @@ void DreamGenContext::otherSmoker(ReelRoutine &routine) {
}
void DreamGenContext::gamer(ReelRoutine &routine) {
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint8 v;
do {
v = 20 + engine->randomNumber() % 5;
@@ -263,7 +263,7 @@ void DreamGenContext::maleFan(ReelRoutine &routine) {
void DreamGenContext::sparky(ReelRoutine &routine) {
if (data.word(kCard1money))
routine.b7 = 3;
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
if (routine.reelPointer() != 34) {
if (engine->randomNumber() < 30)
routine.incReelPointer();
@@ -288,7 +288,7 @@ void DreamGenContext::rockstar(ReelRoutine &routine) {
showGameReel(&routine);
return;
}
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint16 nextReelPointer = routine.reelPointer() + 1;
if (nextReelPointer == 118) {
data.byte(kMandead) = 2;
@@ -333,7 +333,7 @@ void DreamGenContext::smokeBloke(ReelRoutine &routine) {
if (routine.b7 & 128)
setLocation(5);
}
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
if (routine.reelPointer() == 100) {
if (engine->randomNumber() < 30)
routine.incReelPointer();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e7e35e6..94339b9 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -386,7 +386,7 @@
void drawFloor();
void allocateBuffers();
void workToScreenM();
- bool checkSpeed(ReelRoutine *routine);
+ bool checkSpeed(ReelRoutine &routine);
void checkSpeed();
void sparkyDrip(ReelRoutine &routine);
void otherSmoker(ReelRoutine &routine);
More information about the Scummvm-git-logs
mailing list