[Scummvm-cvs-logs] scummvm master -> 3f02cfe77126335d45ea8b97d90d5bd93bfb61ac
tramboi
bertrand_augereau at yahoo.fr
Fri Dec 2 13:10:11 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:
95a8cdd36c DREAMWEB: 'singleKey' ported to C++
3f02cfe771 DREAMWEB: 'showKeypad' ported to C++
Commit: 95a8cdd36cb43c576232b50a0dd8dbbb676e39f0
https://github.com/scummvm/scummvm/commit/95a8cdd36cb43c576232b50a0dd8dbbb676e39f0
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-02T04:09:01-08:00
Commit Message:
DREAMWEB: 'singleKey' 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 ebf036f..68e883f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -341,6 +341,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'gamer',
'eden',
'sparky',
+ 'singlekey',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 1c2c4ce..11163ee 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9465,23 +9465,6 @@ gotlight:
showFrame();
}
-void DreamGenContext::singleKey() {
- STACK_CHECK;
- _cmp(data.byte(kGraphicpress), al);
- if (!flags.z())
- goto gotkey;
- _add(al, 11);
- _cmp(data.byte(kPresscount), 8);
- if (!flags.c())
- goto gotkey;
- _sub(al, 11);
-gotkey:
- ds = data.word(kTempgraphics);
- _sub(al, 20);
- ah = 0;
- showFrame();
-}
-
void DreamGenContext::dumpKeypad() {
STACK_CHECK;
di = (36+112)-3;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f84b037..f6c482b 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -915,7 +915,6 @@ public:
void quitSymbol();
void setTopRight();
void findSetObject();
- void singleKey();
void hangOne();
void carParkDrip();
void useDiary();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 0867ffd..dc19d97 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -32,5 +32,19 @@ void DreamGenContext::putUnderMenu() {
multiPut(segRef(data.word(kBuffers)).ptr(kUndertimedtext, 0), kMenux, kMenuy, 48, 48);
}
+void DreamGenContext::singleKey(uint8 key, uint16 x, uint16 y) {
+ if (key == data.byte(kGraphicpress)) {
+ key += 11;
+ if (data.byte(kPresscount) < 8)
+ key -= 11;
+ }
+ key -= 20;
+ showFrame(tempGraphics(), x, y, key, 0);
+}
+
+void DreamGenContext::singleKey() {
+ singleKey(al, di, bx);
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 60231c4..25b2b53 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -382,4 +382,6 @@
void gamer(ReelRoutine &routine);
void eden(ReelRoutine &routine);
void sparky(ReelRoutine &routine);
+ void singleKey(uint8 key, uint16 x, uint16 y);
+ void singleKey();
Commit: 3f02cfe77126335d45ea8b97d90d5bd93bfb61ac
https://github.com/scummvm/scummvm/commit/3f02cfe77126335d45ea8b97d90d5bd93bfb61ac
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-02T04:09:03-08:00
Commit Message:
DREAMWEB: 'showKeypad' 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 68e883f..2280463 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -342,6 +342,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'eden',
'sparky',
'singlekey',
+ 'showkeypad',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 11163ee..a9fd0a6 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9393,78 +9393,6 @@ void DreamGenContext::showOuterPad() {
showFrame();
}
-void DreamGenContext::showKeypad() {
- STACK_CHECK;
- al = 22;
- di = (36+112)+9;
- bx = (72)+5;
- singleKey();
- al = 23;
- di = (36+112)+31;
- bx = (72)+5;
- singleKey();
- al = 24;
- di = (36+112)+53;
- bx = (72)+5;
- singleKey();
- al = 25;
- di = (36+112)+9;
- bx = (72)+23;
- singleKey();
- al = 26;
- di = (36+112)+31;
- bx = (72)+23;
- singleKey();
- al = 27;
- di = (36+112)+53;
- bx = (72)+23;
- singleKey();
- al = 28;
- di = (36+112)+9;
- bx = (72)+41;
- singleKey();
- al = 29;
- di = (36+112)+31;
- bx = (72)+41;
- singleKey();
- al = 30;
- di = (36+112)+53;
- bx = (72)+41;
- singleKey();
- al = 31;
- di = (36+112)+9;
- bx = (72)+59;
- singleKey();
- al = 32;
- di = (36+112)+31;
- bx = (72)+59;
- singleKey();
- _cmp(data.byte(kLightcount), 0);
- if (flags.z())
- return /* (notenter) */;
- _dec(data.byte(kLightcount));
- al = 36;
- bx = (72)-1+63;
- _cmp(data.byte(kLockstatus), 0);
- if (!flags.z())
- goto changelight;
- al = 41;
- bx = (72)+4+63;
-changelight:
- _cmp(data.byte(kLightcount), 60);
- if (flags.c())
- goto gotlight;
- _cmp(data.byte(kLightcount), 100);
- if (!flags.c())
- goto gotlight;
- _dec(al);
-gotlight:
- ds = data.word(kTempgraphics);
- ah = 0;
- di = (36+112)+60;
- showFrame();
-}
-
void DreamGenContext::dumpKeypad() {
STACK_CHECK;
di = (36+112)-3;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f6c482b..dbc21d1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -774,7 +774,6 @@ public:
void setupPit();
void showPCX();
void showDecisions();
- void showKeypad();
void removeObFromInv();
void useCoveredBox();
void openYourNeighbour();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index dc19d97..c17fd10 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -42,8 +42,33 @@ void DreamGenContext::singleKey(uint8 key, uint16 x, uint16 y) {
showFrame(tempGraphics(), x, y, key, 0);
}
-void DreamGenContext::singleKey() {
- singleKey(al, di, bx);
+void DreamGenContext::showKeypad() {
+ singleKey(22, kKeypadx+9, kKeypady+5);
+ singleKey(23, kKeypadx+31, kKeypady+5);
+ singleKey(24, kKeypadx+53, kKeypady+5);
+ singleKey(25, kKeypadx+9, kKeypady+23);
+ singleKey(26, kKeypadx+31, kKeypady+23);
+ singleKey(27, kKeypadx+53, kKeypady+23);
+ singleKey(28, kKeypadx+9, kKeypady+41);
+ singleKey(29, kKeypadx+31, kKeypady+41);
+ singleKey(30, kKeypadx+53, kKeypady+41);
+ singleKey(31, kKeypadx+9, kKeypady+59);
+ singleKey(32, kKeypadx+31, kKeypady+59);
+ if (data.byte(kLightcount)) {
+ --data.byte(kLightcount);
+ uint8 frameIndex;
+ uint16 y;
+ if (data.byte(kLockstatus)) {
+ frameIndex = 36;
+ y = kKeypady-1+63;
+ } else {
+ frameIndex = 41;
+ y = kKeypady+4+63;
+ }
+ if ((data.byte(kLightcount) >= 60) && (data.byte(kLightcount) < 100))
+ --frameIndex;
+ showFrame(tempGraphics(), kKeypadx+60, y, frameIndex, 0);
+ }
}
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 25b2b53..1fca50d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -383,5 +383,5 @@
void eden(ReelRoutine &routine);
void sparky(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
- void singleKey();
+ void showKeypad();
More information about the Scummvm-git-logs
mailing list