DREAMWEB: 'allocatework' ported to C++

This commit is contained in:
Bertrand Augereau 2011-08-03 12:21:46 +02:00
parent 52fef5a599
commit 7fd8895de6
5 changed files with 7 additions and 10 deletions

View File

@ -80,6 +80,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'liftsprite',
'frameoutv',
'modifychar',
'allocatework',
'lockmon',
'cancelch0',
'cancelch1',

View File

@ -2999,13 +2999,6 @@ dumpevery2:
goto dumpevery2;
}
void DreamGenContext::allocatework() {
STACK_CHECK;
bx = 0x1000;
allocatemem();
data.word(kWorkspace) = ax;
}
void DreamGenContext::loadpalfromiff() {
STACK_CHECK;
dx = 2481;
@ -20223,7 +20216,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_getreelstart: getreelstart(); break;
case addr_deleverything: deleverything(); break;
case addr_dumpeverything: dumpeverything(); break;
case addr_allocatework: allocatework(); break;
case addr_showpcx: showpcx(); break;
case addr_loadpalfromiff: loadpalfromiff(); break;
case addr_setmode: setmode(); break;

View File

@ -637,7 +637,6 @@ public:
static const uint16 addr_setmode = 0xc1dc;
static const uint16 addr_loadpalfromiff = 0xc1d8;
static const uint16 addr_showpcx = 0xc1cc;
static const uint16 addr_allocatework = 0xc1c8;
static const uint16 addr_dumpeverything = 0xc1c4;
static const uint16 addr_deleverything = 0xc1c0;
static const uint16 addr_getreelstart = 0xc1b8;
@ -1819,7 +1818,7 @@ public:
void afterintroroom();
void blockget();
void usetrainer();
void allocatework();
//void allocatework();
void addtopresslist();
void walkandexamine();
void dmaend();

View File

@ -21,6 +21,7 @@
*/
uint16 allocatemem(uint16 paragraphs);
uint8 *workspace();
void allocatework();
void clearwork();
void multidump();
void multidump(uint16 x, uint16 y, uint8 width, uint8 height);

View File

@ -34,6 +34,10 @@ uint8 *DreamGenContext::workspace() {
return result;
}
void DreamGenContext::allocatework() {
data.word(kWorkspace) = allocatemem(0x1000);
}
void DreamGenContext::multiget() {
multiget(di, bx, cl, ch);
}