aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-12-02 17:49:55 +0100
committerBertrand Augereau2011-12-02 17:49:55 +0100
commitfb9b5d11efa3eac1aa43a8247fe5c4da4400dfb1 (patch)
treefc2a5c05c3723156c326f21d12ecf2d44c636eb0
parentdadabd252af24495cdd7a877592c5aabbec30e11 (diff)
downloadscummvm-rg350-fb9b5d11efa3eac1aa43a8247fe5c4da4400dfb1.tar.gz
scummvm-rg350-fb9b5d11efa3eac1aa43a8247fe5c4da4400dfb1.tar.bz2
scummvm-rg350-fb9b5d11efa3eac1aa43a8247fe5c4da4400dfb1.zip
DREAMWEB: Clearer API for enterCode
-rw-r--r--engines/dreamweb/keypad.cpp10
-rw-r--r--engines/dreamweb/stubs.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index b05afa1e68..b70dee4758 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -72,10 +72,10 @@ void DreamGenContext::showKeypad() {
}
void DreamGenContext::enterCode() {
- enterCode(ax, cx);
+ enterCode(al, ah, cl, ch);
}
-void DreamGenContext::enterCode(uint16 keypadAx, uint16 keypadCx) {
+void DreamGenContext::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) {
RectWithCallback keypadList[] = {
{ kKeypadx+9,kKeypadx+30,kKeypady+9,kKeypady+22,&DreamGenContext::buttonOne },
{ kKeypadx+31,kKeypadx+52,kKeypady+9,kKeypady+22,&DreamGenContext::buttonTwo },
@@ -93,8 +93,10 @@ void DreamGenContext::enterCode(uint16 keypadAx, uint16 keypadCx) {
{ 0xFFFF,0,0,0,0 }
};
- data.word(kKeypadax) = keypadAx;
- data.word(kKeypadcx) = keypadCx;
+ data.byte(kKeypadax+0) = digit0;
+ data.byte(kKeypadax+1) = digit1;
+ data.byte(kKeypadcx+0) = digit2;
+ data.byte(kKeypadcx+1) = digit3;
getRidOfReels();
loadKeypad();
createPanel();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index a77d2c79ee..dda57a47c4 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -396,6 +396,6 @@
void buttonNought();
void buttonEnter();
void buttonPress(uint8 buttonId);
- void enterCode(uint16 keypadAx, uint16 keypadCx);
+ void enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3);
void enterCode();