DREAMWEB: Blacklisted 'usetimedtext', 'getundertimed' and 'putundertimed'

This commit is contained in:
Bertrand Augereau 2011-07-23 19:18:10 +02:00
parent a58e2bea08
commit cbcdb61b28
5 changed files with 50 additions and 86 deletions

View File

@ -49,6 +49,9 @@ generator = cpp(context, "DreamGen", blacklist = [
'printchar',
'printdirect',
'printslow',
'usetimedtext',
'putundertimed',
'getundertimed',
'worktoscreen',
'width160',
'convertkey',

View File

@ -12853,46 +12853,6 @@ notonsartroof:
placesetobject();
}
void DreamGenContext::getundertimed() {
STACK_CHECK;
al = data.byte(kTimedy);
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
_sub(al, 3);
_tmp1:
ah = 0;
bx = ax;
al = data.byte(kTimedx);
ah = 0;
di = ax;
ch = (30);
cl = 240;
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiget();
}
void DreamGenContext::putundertimed() {
STACK_CHECK;
al = data.byte(kTimedy);
_cmp(data.byte(kForeignrelease), 0);
if (flags.z())
goto _tmp1;
_sub(al, 3);
_tmp1:
ah = 0;
bx = ax;
al = data.byte(kTimedx);
ah = 0;
di = ax;
ch = (30);
cl = 240;
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
multiput();
}
void DreamGenContext::dumptimedtext() {
STACK_CHECK;
_cmp(data.byte(kNeedtodumptimed), 1);
@ -12989,42 +12949,6 @@ notloadspeech3:
data.word(kTimedoffset) = bx;
}
void DreamGenContext::usetimedtext() {
STACK_CHECK;
_cmp(data.word(kTimecount), 0);
if (flags.z())
return /* (notext) */;
_dec(data.word(kTimecount));
_cmp(data.word(kTimecount), 0);
if (flags.z())
goto deltimedtext;
ax = data.word(kTimecount);
_cmp(ax, data.word(kCounttotimed));
if (flags.z())
goto firsttimed;
if (!flags.c())
return /* (notext) */;
goto notfirsttimed;
firsttimed:
getundertimed();
notfirsttimed:
bl = data.byte(kTimedy);
bh = 0;
al = data.byte(kTimedx);
ah = 0;
di = ax;
es = data.word(kTimedseg);
si = data.word(kTimedoffset);
dl = 237;
ah = 0;
printdirect();
data.byte(kNeedtodumptimed) = 1;
return;
deltimedtext:
putundertimed();
data.byte(kNeedtodumptimed) = 1;
}
void DreamGenContext::edenscdplayer() {
STACK_CHECK;
showfirstuse();
@ -21484,12 +21408,9 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_setallchanges: setallchanges(); break;
case addr_dochange: dochange(); break;
case addr_autoappear: autoappear(); break;
case addr_getundertimed: getundertimed(); break;
case addr_putundertimed: putundertimed(); break;
case addr_dumptimedtext: dumptimedtext(); break;
case addr_setuptimeduse: setuptimeduse(); break;
case addr_setuptimedtemp: setuptimedtemp(); break;
case addr_usetimedtext: usetimedtext(); break;
case addr_edenscdplayer: edenscdplayer(); break;
case addr_usewall: usewall(); break;
case addr_usechurchgate: usechurchgate(); break;

View File

@ -327,12 +327,9 @@ public:
static const uint16 addr_usechurchgate = 0xc730;
static const uint16 addr_usewall = 0xc72c;
static const uint16 addr_edenscdplayer = 0xc728;
static const uint16 addr_usetimedtext = 0xc724;
static const uint16 addr_setuptimedtemp = 0xc720;
static const uint16 addr_setuptimeduse = 0xc71c;
static const uint16 addr_dumptimedtext = 0xc718;
static const uint16 addr_putundertimed = 0xc714;
static const uint16 addr_getundertimed = 0xc710;
static const uint16 addr_autoappear = 0xc70c;
static const uint16 addr_dochange = 0xc708;
static const uint16 addr_setallchanges = 0xc704;
@ -1343,7 +1340,7 @@ public:
void storeit();
void lockeddoorway();
void isitworn();
void putundertimed();
//void putundertimed();
void dumpmap();
//void multidump();
void channel0only();
@ -1369,7 +1366,7 @@ public:
void restoreall();
void screenupdate();
void addlength();
void usetimedtext();
void wornerror();
void putundercentre();
void checkobjectsize();
void commandonly();
@ -1515,6 +1512,7 @@ public:
void openpoolboss();
void buttontwo();
void fillopen();
//void usetimedtext();
void delsprite();
void getroomspaths();
//void dumptextline();
@ -1570,7 +1568,6 @@ public:
void saveload();
void monitorlogo();
void loadposition();
void wornerror();
void entersymbol();
void showword();
void dirfile();
@ -1791,7 +1788,7 @@ public:
void findsetobject();
void singlekey();
//void seecommandtail();
void getundertimed();
//void getundertimed();
void hangone();
void carparkdrip();
void usediary();

View File

@ -419,6 +419,46 @@ void DreamGenContext::printdirect(uint16 x, uint16 *y, uint8 maxWidth, bool cent
}
}
void DreamGenContext::getundertimed() {
uint16 y = data.byte(kTimedy);
if (data.byte(kForeignrelease))
y -= 3;
ds = data.word(kBuffers);
si = kUndertimedtext;
multiget(data.byte(kTimedx), y, 240, kUndertimedysize);
}
void DreamGenContext::putundertimed() {
uint16 y = data.byte(kTimedy);
if (data.byte(kForeignrelease))
y -= 3;
ds = data.word(kBuffers);
si = kUndertimedtext;
multiput(data.byte(kTimedx), y, 240, kUndertimedysize);
}
void DreamGenContext::usetimedtext() {
if (data.word(kTimecount) == 0)
return;
--data.word(kTimecount);
if (data.word(kTimecount) == 0) {
putundertimed();
data.byte(kNeedtodumptimed) = 1;
return;
}
if (data.word(kTimecount) == data.word(kCounttotimed))
getundertimed();
else if (data.word(kTimecount) > data.word(kCounttotimed))
return;
es = data.word(kTimedseg);
si = data.word(kTimedoffset);
uint16 y = data.byte(kTimedy);
printdirect(data.byte(kTimedx), &y, 237, true);
data.byte(kNeedtodumptimed) = 1;
}
void DreamGenContext::getnumber() {
uint16 offset = di;
cl = getnumber(si, dl, (bool)(dl & 1), &offset);

View File

@ -46,6 +46,9 @@
void printchar(uint16 dst, uint16 src, uint16 *x, uint16 y, uint8 c, uint8 *width, uint8 *height);
void printdirect();
void printdirect(uint16 x, uint16 *y, uint8 maxWidth, bool centered);
void usetimedtext();
void getundertimed();
void putundertimed();
uint8 printslow(uint16 x, uint16 y, uint8 maxWidth, bool centered);
void printslow();
void dumptextline();