DREAMWEB: 'deltextline' ported to C++

This commit is contained in:
Bertrand Augereau 2011-08-03 16:19:27 +02:00
parent 095689ab49
commit 2b03076149
5 changed files with 13 additions and 20 deletions

View file

@ -97,6 +97,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'makenextblock',
'loopchannel0',
'parseblaster',
'deltextline',
], skip_output = [
# These functions are processed but not output
'dreamweb',

View file

@ -18443,22 +18443,6 @@ _tmp1:
multiget();
}
void DreamGenContext::deltextline() {
STACK_CHECK;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
_sub(bx, 3);
_tmp1:
ds = data.word(kBuffers);
si = (0);
cl = (228);
ch = (13);
multiput();
}
void DreamGenContext::animpointer() {
STACK_CHECK;
_cmp(data.byte(kPointermode), 2);
@ -20317,7 +20301,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_delpointer: delpointer(); break;
case addr_dumppointer: dumppointer(); break;
case addr_undertextline: undertextline(); break;
case addr_deltextline: deltextline(); break;
case addr_animpointer: animpointer(); break;
case addr_setmouse: setmouse(); break;
case addr_readmouse: readmouse(); break;

View file

@ -88,7 +88,6 @@ public:
static const uint16 addr_readmouse = 0xcae4;
static const uint16 addr_setmouse = 0xcae0;
static const uint16 addr_animpointer = 0xcadc;
static const uint16 addr_deltextline = 0xcad4;
static const uint16 addr_undertextline = 0xcad0;
static const uint16 addr_dumppointer = 0xcacc;
static const uint16 addr_delpointer = 0xcac8;
@ -1398,7 +1397,7 @@ public:
void useelevator2();
void buttonone();
void keyboardread();
void deltextline();
//void deltextline();
void entercode();
void getopenedsize();
void getpersframe();

View file

@ -882,5 +882,15 @@ void DreamGenContext::crosshair() {
showframe(src, kZoomx + 24, kZoomy + 19, frame, 0, &width, &height);
}
void DreamGenContext::deltextline() {
uint16 x = data.word(kTextaddressx);
uint16 y = data.word(kTextaddressy);
if (data.byte(kForeignrelease) != 0)
y -= 3;
ds = data.word(kBuffers);
si = kTextunder;
multiput(x, y, kUndertextsizex, kUndertextsizey);
}
} /*namespace dreamgen */

View file

@ -113,5 +113,5 @@
void zoom();
void crosshair();
void showrain();
void deltextline();