mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
DREAMWEB: Convert 'examineob'
This commit is contained in:
parent
ceb36fe0d6
commit
ae2c4bcaf0
@ -110,77 +110,71 @@ void DreamGenContext::obicons() {
|
||||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::examineob() {
|
||||
STACK_CHECK;
|
||||
void DreamGenContext::examineob(bool examineAgain) {
|
||||
data.byte(kPointermode) = 0;
|
||||
data.word(kTimecount) = 0;
|
||||
examineagain:
|
||||
data.byte(kInmaparea) = 0;
|
||||
data.byte(kExamagain) = 0;
|
||||
data.byte(kOpenedob) = 255;
|
||||
data.byte(kOpenedtype) = 255;
|
||||
data.byte(kInvopen) = 0;
|
||||
al = data.byte(kCommandtype);
|
||||
data.byte(kObjecttype) = al;
|
||||
data.byte(kItemframe) = 0;
|
||||
data.byte(kPointerframe) = 0;
|
||||
createpanel();
|
||||
showpanel();
|
||||
showman();
|
||||
showexit();
|
||||
obicons();
|
||||
obpicture();
|
||||
describeob();
|
||||
undertextline();
|
||||
data.byte(kCommandtype) = 255;
|
||||
readmouse();
|
||||
showpointer();
|
||||
worktoscreen();
|
||||
delpointer();
|
||||
waitexam:
|
||||
readmouse();
|
||||
showpointer();
|
||||
vsync();
|
||||
dumppointer();
|
||||
dumptextline();
|
||||
delpointer();
|
||||
data.byte(kGetback) = 0;
|
||||
bx = offset_examlist;
|
||||
_cmp(data.byte(kInvopen), 0);
|
||||
if (flags.z())
|
||||
goto notuseinv;
|
||||
bx = offset_invlist1;
|
||||
_cmp(data.byte(kInvopen), 1);
|
||||
if (flags.z())
|
||||
goto notuseinv;
|
||||
bx = offset_withlist1;
|
||||
notuseinv:
|
||||
checkcoords();
|
||||
_cmp(data.byte(kQuitrequested), 0);
|
||||
if (!flags.z())
|
||||
goto stopwaiting;
|
||||
_cmp(data.byte(kExamagain), 0);
|
||||
if (flags.z())
|
||||
goto norex;
|
||||
goto examineagain;
|
||||
norex:
|
||||
_cmp(data.byte(kGetback), 0);
|
||||
if (flags.z())
|
||||
goto waitexam;
|
||||
stopwaiting:
|
||||
while (true) {
|
||||
if (examineAgain) {
|
||||
data.byte(kInmaparea) = 0;
|
||||
data.byte(kExamagain) = 0;
|
||||
data.byte(kOpenedob) = 255;
|
||||
data.byte(kOpenedtype) = 255;
|
||||
data.byte(kInvopen) = 0;
|
||||
al = data.byte(kCommandtype);
|
||||
data.byte(kObjecttype) = al;
|
||||
data.byte(kItemframe) = 0;
|
||||
data.byte(kPointerframe) = 0;
|
||||
createpanel();
|
||||
showpanel();
|
||||
showman();
|
||||
showexit();
|
||||
obicons();
|
||||
obpicture();
|
||||
describeob();
|
||||
undertextline();
|
||||
data.byte(kCommandtype) = 255;
|
||||
readmouse();
|
||||
showpointer();
|
||||
worktoscreen();
|
||||
delpointer();
|
||||
examineAgain = false;
|
||||
}
|
||||
|
||||
readmouse();
|
||||
showpointer();
|
||||
vsync();
|
||||
dumppointer();
|
||||
dumptextline();
|
||||
delpointer();
|
||||
data.byte(kGetback) = 0;
|
||||
switch (data.byte(kInvopen)) {
|
||||
case 0:
|
||||
bx = offset_examlist;
|
||||
checkcoords();
|
||||
break;
|
||||
case 1:
|
||||
bx = offset_invlist1;
|
||||
checkcoords();
|
||||
break;
|
||||
default:
|
||||
bx = offset_withlist1;
|
||||
checkcoords();
|
||||
break;
|
||||
}
|
||||
if (data.byte(kQuitrequested) != 0)
|
||||
break;
|
||||
if (data.byte(kExamagain) != 0)
|
||||
examineAgain = true;
|
||||
else if (data.byte(kGetback) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
data.byte(kPickup) = 0;
|
||||
_cmp(data.word(kWatchingtime), 0);
|
||||
if (!flags.z())
|
||||
goto iswatching;
|
||||
_cmp(data.byte(kNewlocation), 255);
|
||||
if (!flags.z())
|
||||
goto justgetback;
|
||||
iswatching:
|
||||
makemainscreen();
|
||||
data.byte(kInvopen) = 0;
|
||||
data.byte(kOpenedob) = 255;
|
||||
return;
|
||||
justgetback:
|
||||
if (data.word(kWatchingtime) != 0 || data.byte(kNewlocation) == 255) {
|
||||
// iswatching
|
||||
makemainscreen();
|
||||
}
|
||||
|
||||
data.byte(kInvopen) = 0;
|
||||
data.byte(kOpenedob) = 255;
|
||||
}
|
||||
|
@ -249,5 +249,5 @@
|
||||
void showcity();
|
||||
uint16 getpersframe(uint8 index);
|
||||
void convicons();
|
||||
void examineob();
|
||||
void examineob(bool examineAgain = true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user