DREAMWEB: 'dolook' ported to C++
This commit is contained in:
parent
debd94fbaa
commit
5d5249e1d9
5 changed files with 28 additions and 40 deletions
|
@ -274,6 +274,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
|||
'findroominloc',
|
||||
'look',
|
||||
'autolook',
|
||||
'dolook',
|
||||
'reelsonscreen',
|
||||
'reconstruct',
|
||||
], skip_output = [
|
||||
|
|
|
@ -4894,44 +4894,6 @@ void DreamGenContext::drawfloor() {
|
|||
es = pop();
|
||||
}
|
||||
|
||||
void DreamGenContext::dolook() {
|
||||
STACK_CHECK;
|
||||
createpanel();
|
||||
showicon();
|
||||
undertextline();
|
||||
worktoscreenm();
|
||||
data.byte(kCommandtype) = 255;
|
||||
dumptextline();
|
||||
bl = data.byte(kRoomnum);
|
||||
_and(bl, 31);
|
||||
bh = 0;
|
||||
_add(bx, bx);
|
||||
es = data.word(kRoomdesc);
|
||||
_add(bx, (0));
|
||||
si = es.word(bx);
|
||||
_add(si, (0+(38*2)));
|
||||
findnextcolon();
|
||||
di = 66;
|
||||
_cmp(data.byte(kReallocation), 50);
|
||||
if (flags.c())
|
||||
goto notdream3;
|
||||
di = 40;
|
||||
notdream3:
|
||||
bx = 80;
|
||||
dl = 241;
|
||||
printslow();
|
||||
_cmp(al, 1);
|
||||
if (flags.z())
|
||||
goto afterlook;
|
||||
cx = 400;
|
||||
hangonp();
|
||||
afterlook:
|
||||
data.byte(kPointermode) = 0;
|
||||
data.byte(kCommandtype) = 0;
|
||||
redrawmainscrn();
|
||||
worktoscreenm();
|
||||
}
|
||||
|
||||
void DreamGenContext::redrawmainscrn() {
|
||||
STACK_CHECK;
|
||||
data.word(kTimecount) = 0;
|
||||
|
|
|
@ -376,7 +376,6 @@ public:
|
|||
static const uint16 addr_talk = 0xc480;
|
||||
static const uint16 addr_getback1 = 0xc47c;
|
||||
static const uint16 addr_redrawmainscrn = 0xc478;
|
||||
static const uint16 addr_dolook = 0xc474;
|
||||
static const uint16 addr_drawfloor = 0xc428;
|
||||
static const uint16 addr_deleteextext = 0xc420;
|
||||
static const uint16 addr_deleteexframe = 0xc41c;
|
||||
|
@ -1709,7 +1708,7 @@ public:
|
|||
void saveems();
|
||||
void locationpic();
|
||||
//void getflagunderp();
|
||||
void dolook();
|
||||
//void dolook();
|
||||
void opentvdoor();
|
||||
void triggermessage();
|
||||
void smallcandle();
|
||||
|
|
|
@ -2287,5 +2287,30 @@ void DreamGenContext::look() {
|
|||
dolook();
|
||||
}
|
||||
|
||||
void DreamGenContext::dolook() {
|
||||
createpanel();
|
||||
showicon();
|
||||
undertextline();
|
||||
worktoscreenm();
|
||||
data.byte(kCommandtype) = 255;
|
||||
dumptextline();
|
||||
uint8 index = data.byte(kRoomnum) & 31;
|
||||
uint16 offset = segRef(data.word(kRoomdesc)).word(kIntextdat + index * 2);
|
||||
uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext, 0) + offset;
|
||||
findnextcolon(&string);
|
||||
uint16 x;
|
||||
if (data.byte(kReallocation) < 50)
|
||||
x = 66;
|
||||
else
|
||||
x = 40;
|
||||
if (printslow(string, x, 80, 241, true) != 1)
|
||||
hangonp(400);
|
||||
|
||||
data.byte(kPointermode) = 0;
|
||||
data.byte(kCommandtype) = 0;
|
||||
redrawmainscrn();
|
||||
worktoscreenm();
|
||||
}
|
||||
|
||||
} /*namespace dreamgen */
|
||||
|
||||
|
|
|
@ -334,4 +334,5 @@
|
|||
void reconstruct();
|
||||
void look();
|
||||
void autolook();
|
||||
void dolook();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue