DREAMWEB: Ported 'clearwork'

This commit is contained in:
Bertrand Augereau 2011-07-30 23:11:48 +02:00
parent a4f05b36e4
commit 5d13e2f837
5 changed files with 8 additions and 16 deletions

View File

@ -41,6 +41,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'frameoutbh',
'frameoutfx',
'cls',
'clearwork',
'printundermon',
'kernchars',
'getnextword',

View File

@ -3267,18 +3267,6 @@ void DreamGenContext::createpanel2() {
showframe();
}
void DreamGenContext::clearwork() {
STACK_CHECK;
ax = 0x0;
es = data.word(kWorkspace);
di = 0;
cx = (200*320)/64;
clearloop:
_stosw(32);
if (--cx)
goto clearloop;
}
void DreamGenContext::zoom() {
STACK_CHECK;
_cmp(data.word(kWatchingtime), 0);
@ -20347,7 +20335,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_pixelcheckset: pixelcheckset(); break;
case addr_createpanel: createpanel(); break;
case addr_createpanel2: createpanel2(); break;
case addr_clearwork: clearwork(); break;
case addr_vsync: vsync(); break;
case addr_doshake: doshake(); break;
case addr_zoom: zoom(); break;

View File

@ -628,7 +628,6 @@ public:
static const uint16 addr_zoom = 0xc210;
static const uint16 addr_doshake = 0xc20c;
static const uint16 addr_vsync = 0xc208;
static const uint16 addr_clearwork = 0xc204;
static const uint16 addr_createpanel2 = 0xc200;
static const uint16 addr_createpanel = 0xc1fc;
static const uint16 addr_pixelcheckset = 0xc1f8;
@ -1367,7 +1366,7 @@ public:
void turnanypathoff();
void openfilefromc();
void gettime();
void clearwork();
//void clearwork();
void loadtraveltext();
//void worktoscreen();
void getexpos();

View File

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

View File

@ -379,5 +379,9 @@ void DreamGenContext::showframe() {
ch = height;
}
void DreamGenContext::clearwork() {
memset(workspace(), 0, 320*200);
}
} /*namespace dreamgen */