DREAMWEB: Ported 'fillryan' to C++
This commit is contained in:
parent
a6b6d05a2c
commit
e6162f1a78
5 changed files with 17 additions and 48 deletions
|
@ -190,6 +190,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||||
'obtoinv',
|
'obtoinv',
|
||||||
'showryanpage',
|
'showryanpage',
|
||||||
'findallryan',
|
'findallryan',
|
||||||
|
'fillryan',
|
||||||
], skip_output = [
|
], skip_output = [
|
||||||
# These functions are processed but not output
|
# These functions are processed but not output
|
||||||
'dreamweb',
|
'dreamweb',
|
||||||
|
|
|
@ -3758,51 +3758,6 @@ nottrigger2:
|
||||||
data.byte(kKerning) = 0;
|
data.byte(kKerning) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamGenContext::fillryan() {
|
|
||||||
STACK_CHECK;
|
|
||||||
es = data.word(kBuffers);
|
|
||||||
di = (0+(228*13)+32);
|
|
||||||
findallryan();
|
|
||||||
si = (0+(228*13)+32);
|
|
||||||
al = data.byte(kRyanpage);
|
|
||||||
ah = 0;
|
|
||||||
cx = 20;
|
|
||||||
_mul(cx);
|
|
||||||
_add(si, ax);
|
|
||||||
di = (80);
|
|
||||||
bx = (58);
|
|
||||||
cx = 2;
|
|
||||||
ryanloop2:
|
|
||||||
push(cx);
|
|
||||||
push(di);
|
|
||||||
push(bx);
|
|
||||||
cx = 5;
|
|
||||||
ryanloop1:
|
|
||||||
push(cx);
|
|
||||||
push(di);
|
|
||||||
push(bx);
|
|
||||||
ax = es.word(si);
|
|
||||||
_add(si, 2);
|
|
||||||
push(si);
|
|
||||||
push(es);
|
|
||||||
obtoinv();
|
|
||||||
es = pop();
|
|
||||||
si = pop();
|
|
||||||
bx = pop();
|
|
||||||
di = pop();
|
|
||||||
cx = pop();
|
|
||||||
_add(di, (44));
|
|
||||||
if (--cx)
|
|
||||||
goto ryanloop1;
|
|
||||||
bx = pop();
|
|
||||||
di = pop();
|
|
||||||
cx = pop();
|
|
||||||
_add(bx, (44));
|
|
||||||
if (--cx)
|
|
||||||
goto ryanloop2;
|
|
||||||
showryanpage();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::fillopen() {
|
void DreamGenContext::fillopen() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
deltextline();
|
deltextline();
|
||||||
|
@ -17245,7 +17200,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
|
||||||
case addr_set16colpalette: set16colpalette(); break;
|
case addr_set16colpalette: set16colpalette(); break;
|
||||||
case addr_realcredits: realcredits(); break;
|
case addr_realcredits: realcredits(); break;
|
||||||
case addr_monprint: monprint(); break;
|
case addr_monprint: monprint(); break;
|
||||||
case addr_fillryan: fillryan(); break;
|
|
||||||
case addr_fillopen: fillopen(); break;
|
case addr_fillopen: fillopen(); break;
|
||||||
case addr_findallopen: findallopen(); break;
|
case addr_findallopen: findallopen(); break;
|
||||||
case addr_examineob: examineob(); break;
|
case addr_examineob: examineob(); break;
|
||||||
|
|
|
@ -495,7 +495,6 @@ public:
|
||||||
static const uint16 addr_examineob = 0xc33c;
|
static const uint16 addr_examineob = 0xc33c;
|
||||||
static const uint16 addr_findallopen = 0xc32c;
|
static const uint16 addr_findallopen = 0xc32c;
|
||||||
static const uint16 addr_fillopen = 0xc324;
|
static const uint16 addr_fillopen = 0xc324;
|
||||||
static const uint16 addr_fillryan = 0xc320;
|
|
||||||
static const uint16 addr_monprint = 0xc314;
|
static const uint16 addr_monprint = 0xc314;
|
||||||
static const uint16 addr_realcredits = 0xc2f8;
|
static const uint16 addr_realcredits = 0xc2f8;
|
||||||
static const uint16 addr_set16colpalette = 0xc2f4;
|
static const uint16 addr_set16colpalette = 0xc2f4;
|
||||||
|
@ -1746,7 +1745,7 @@ public:
|
||||||
void dropobject();
|
void dropobject();
|
||||||
void isitright();
|
void isitright();
|
||||||
void reexfromopen();
|
void reexfromopen();
|
||||||
void fillryan();
|
//void fillryan();
|
||||||
void drawitall();
|
void drawitall();
|
||||||
void usestereo();
|
void usestereo();
|
||||||
void showcurrentfile();
|
void showcurrentfile();
|
||||||
|
|
|
@ -1841,5 +1841,19 @@ void DreamGenContext::findallryan(uint8 *inv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::fillryan() {
|
||||||
|
uint8 *inv = segRef(data.word(kBuffers)).ptr(kRyaninvlist, 60);
|
||||||
|
findallryan(inv);
|
||||||
|
inv += data.byte(kRyanpage) * 2 * 10;
|
||||||
|
for (size_t i = 0; i < 2; ++i) {
|
||||||
|
for (size_t j = 0; j < 5; ++j) {
|
||||||
|
uint8 objIndex = *inv++;
|
||||||
|
uint8 objType = *inv++;
|
||||||
|
obtoinv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showryanpage();
|
||||||
|
}
|
||||||
|
|
||||||
} /*namespace dreamgen */
|
} /*namespace dreamgen */
|
||||||
|
|
||||||
|
|
|
@ -229,4 +229,5 @@
|
||||||
void showryanpage();
|
void showryanpage();
|
||||||
void findallryan();
|
void findallryan();
|
||||||
void findallryan(uint8 *inv);
|
void findallryan(uint8 *inv);
|
||||||
|
void fillryan();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue