DREAMWEB: 'singleKey' ported to C++

This commit is contained in:
Bertrand Augereau 2011-12-02 12:07:53 +01:00
parent 3bfb412694
commit 95a8cdd36c
5 changed files with 17 additions and 18 deletions

View File

@ -341,6 +341,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'gamer',
'eden',
'sparky',
'singlekey',
], skip_output = [
# These functions are processed but not output
'dreamweb',

View File

@ -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;

View File

@ -915,7 +915,6 @@ public:
void quitSymbol();
void setTopRight();
void findSetObject();
void singleKey();
void hangOne();
void carParkDrip();
void useDiary();

View File

@ -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 */

View File

@ -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();