[Scummvm-cvs-logs] scummvm master -> 8f7473f5336d46267e870dc4c55d163d0a13c201
tramboi
bertrand_augereau at yahoo.fr
Fri Dec 2 18:12:49 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8f7473f533 DREAMWEB: 'isItRight' ported to C++
Commit: 8f7473f5336d46267e870dc4c55d163d0a13c201
https://github.com/scummvm/scummvm/commit/8f7473f5336d46267e870dc4c55d163d0a13c201
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-02T09:11:54-08:00
Commit Message:
DREAMWEB: 'isItRight' ported to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/keypad.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 95461fb..2f53f11 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -356,6 +356,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'buttonenter',
'buttonpress',
'credits',
+ 'isitright',
'entercode',
], skip_output = [
# These functions are processed but not output
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e3ea81e..56d0b3d 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -7358,23 +7358,6 @@ void DreamGenContext::openSarters() {
data.byte(kGetback) = 1;
}
-void DreamGenContext::isItRight() {
- STACK_CHECK;
- bx = data;
- es = bx;
- bx = 8573;
- _cmp(es.byte(bx+0), al);
- if (!flags.z())
- return /* (notright) */;
- _cmp(es.byte(bx+1), ah);
- if (!flags.z())
- return /* (notright) */;
- _cmp(es.byte(bx+2), cl);
- if (!flags.z())
- return /* (notright) */;
- _cmp(es.byte(bx+3), ch);
-}
-
void DreamGenContext::drawItAll() {
STACK_CHECK;
createPanel();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 3f9b8d8..e729f1e 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -919,7 +919,6 @@ public:
void setSoundOff();
void setPickup();
void dropObject();
- void isItRight();
void openOb();
void drawItAll();
void useStereo();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index b70dee4..e133f1f 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -75,6 +75,12 @@ void DreamGenContext::enterCode() {
enterCode(al, ah, cl, ch);
}
+bool DreamGenContext::isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) {
+
+ return digit0 == data.byte(kPresslist+0) && digit1 == data.byte(kPresslist+1)
+ && digit2 == data.byte(kPresslist+2) && digit3 == data.byte(kPresslist+3);
+}
+
void DreamGenContext::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) {
RectWithCallback keypadList[] = {
{ kKeypadx+9,kKeypadx+30,kKeypady+9,kKeypady+22,&DreamGenContext::buttonOne },
@@ -93,10 +99,6 @@ void DreamGenContext::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8
{ 0xFFFF,0,0,0,0 }
};
- data.byte(kKeypadax+0) = digit0;
- data.byte(kKeypadax+1) = digit1;
- data.byte(kKeypadcx+0) = digit2;
- data.byte(kKeypadcx+1) = digit3;
getRidOfReels();
loadKeypad();
createPanel();
@@ -135,10 +137,7 @@ void DreamGenContext::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8
if (data.byte(kPresscount) == 40) {
addToPressList();
if (data.byte(kPressed) == 11) {
- ax = data.word(kKeypadax);
- cx = data.word(kKeypadcx);
- isItRight();
- if (flags.z())
+ if (isItRight(digit0, digit1, digit2, digit3))
data.byte(kLockstatus) = 0;
playChannel1(11);
data.byte(kLightcount) = 120;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index dda57a4..346d2d1 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -396,6 +396,7 @@
void buttonNought();
void buttonEnter();
void buttonPress(uint8 buttonId);
+ bool isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
void enterCode();
More information about the Scummvm-git-logs
mailing list