DREAMWEB: 'dumptextline' ported to C++

This commit is contained in:
Bertrand Augereau 2011-07-21 22:46:16 +02:00
parent c4f9afaa02
commit 60d4970fd0
5 changed files with 14 additions and 21 deletions

View File

@ -44,6 +44,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'kernchars',
'getnextword',
'getnumber',
'dumptextline',
'printboth',
'printchar',
'printdirect',

View File

@ -19538,24 +19538,6 @@ _tmp1:
multiput();
}
void DreamGenContext::dumptextline() {
STACK_CHECK;
_cmp(data.byte(kNewtextline), 1);
if (!flags.z())
return /* (nodumptextline) */;
data.byte(kNewtextline) = 0;
di = data.word(kTextaddressx);
bx = data.word(kTextaddressy);
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
_sub(bx, 3);
_tmp1:
cl = (228);
ch = (13);
multidump();
}
void DreamGenContext::animpointer() {
STACK_CHECK;
_cmp(data.byte(kPointermode), 2);
@ -21741,7 +21723,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_dumppointer: dumppointer(); break;
case addr_undertextline: undertextline(); break;
case addr_deltextline: deltextline(); break;
case addr_dumptextline: dumptextline(); break;
case addr_animpointer: animpointer(); break;
case addr_setmouse: setmouse(); break;
case addr_readmouse: readmouse(); break;

View File

@ -92,7 +92,6 @@ public:
static const uint16 addr_readmouse = 0xcae4;
static const uint16 addr_setmouse = 0xcae0;
static const uint16 addr_animpointer = 0xcadc;
static const uint16 addr_dumptextline = 0xcad8;
static const uint16 addr_deltextline = 0xcad4;
static const uint16 addr_undertextline = 0xcad0;
static const uint16 addr_dumppointer = 0xcacc;
@ -1518,7 +1517,7 @@ public:
void fillopen();
void delsprite();
void getroomspaths();
void dumptextline();
//void dumptextline();
void fadescreendownhalf();
void useplate();
void candles1();

View File

@ -318,6 +318,17 @@ void DreamGenContext::printslow() {
al = printslow(di, bx, dl, (bool)(dl & 1));
}
void DreamGenContext::dumptextline() {
if (data.byte(kNewtextline) != 1)
return;
data.byte(kNewtextline) = 0;
uint16 x = data.word(kTextaddressx);
uint16 y = data.word(kTextaddressy);
if (data.byte(kForeignrelease) != 0)
y -= 3;
multidump(x, y, 228, 13);
}
uint8 DreamGenContext::printslow(uint16 x, uint16 y, uint8 maxWidth, bool centered) {
data.byte(kPointerframe) = 1;
data.byte(kPointermode) = 3;

View File

@ -46,6 +46,7 @@
void printdirect();
uint8 printslow(uint16 x, uint16 y, uint8 maxWidth, bool centered);
void printslow();
void dumptextline();
void getnumber();
uint8 getnumber(uint16 maxWidth, bool centered, uint16* offset);
void kernchars();