DREAMWEB: 'dumpblink' ported to C++

This commit is contained in:
Bertrand Augereau 2011-08-24 13:22:11 +02:00
parent 7f7775e574
commit 42e435c604
5 changed files with 15 additions and 26 deletions

View File

@ -150,6 +150,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'obname',
'delpointer',
'showblink',
'dumpblink',
], skip_output = [
# These functions are processed but not output
'dreamweb',

View File

@ -16238,27 +16238,6 @@ void DreamGenContext::zoomicon() {
showframe();
}
void DreamGenContext::dumpblink() {
STACK_CHECK;
_cmp(data.byte(kShadeson), 0);
if (!flags.z())
return /* (nodumpeye) */;
_cmp(data.byte(kBlinkcount), 0);
if (!flags.z())
return /* (nodumpeye) */;
al = data.byte(kBlinkframe);
_cmp(al, 6);
if (!flags.c())
return /* (nodumpeye) */;
push(ds);
di = 44;
bx = 32;
cl = 16;
ch = 12;
multidump();
ds = pop();
}
void DreamGenContext::worktoscreenm() {
STACK_CHECK;
animpointer();
@ -18311,7 +18290,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_showwatch: showwatch(); break;
case addr_gettime: gettime(); break;
case addr_zoomicon: zoomicon(); break;
case addr_dumpblink: dumpblink(); break;
case addr_worktoscreenm: worktoscreenm(); break;
case addr_blank: blank(); break;
case addr_allpointer: allpointer(); break;

View File

@ -98,7 +98,6 @@ public:
static const uint16 addr_allpointer = 0xcaa4;
static const uint16 addr_blank = 0xcaa0;
static const uint16 addr_worktoscreenm = 0xca9c;
static const uint16 addr_dumpblink = 0xca98;
static const uint16 addr_zoomicon = 0xca90;
static const uint16 addr_gettime = 0xca8c;
static const uint16 addr_showwatch = 0xca88;
@ -1376,6 +1375,7 @@ public:
//void lockmon();
//void dochange();
void getanyaddir();
//void dumpblink();
void showsaveops();
void intromonks1();
void resetlocation();
@ -1510,7 +1510,7 @@ public:
void getfreead();
void showarrows();
void walkintoroom();
void getridoftemptext();
void usehatch();
void printoutermon();
void setuppit();
void showpcx();
@ -1647,7 +1647,6 @@ public:
void talk();
void usedryer();
void dumpeverything();
void usehatch();
//void zoom();
void outofinv();
void viewfolder();
@ -1863,7 +1862,7 @@ public:
void issetobonmap();
void getdestinfo();
void drunk();
void dumpblink();
void getridoftemptext();
void setuptimeduse();
void grafittidoor();
void input();

View File

@ -1298,6 +1298,16 @@ void DreamGenContext::showblink() {
showframe((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), 44, 32, blinkTab[blinkFrame], 0, &width, &height);
}
void DreamGenContext::dumpblink() {
if (data.byte(kShadeson) != 0)
return;
if (data.byte(kBlinkcount) != 0)
return;
if (data.byte(kBlinkframe) >= 6)
return;
multidump(44, 32, 16, 12);
}
bool DreamGenContext::isCD() {
// The original sources has two codepaths depending if the game is 'if cd' or not
// This is a hack to guess which version to use with the assumption that if we have a cd version

View File

@ -180,4 +180,5 @@
void obname(uint8 command, uint8 commandType);
void delpointer();
void showblink();
void dumpblink();