DREAMWEB: Fix quitting in the inventory screen

This commit is contained in:
Bertrand Augereau 2011-09-02 20:54:48 +02:00
parent 6764bfaa1d
commit bd4bc2215f
2 changed files with 14 additions and 1 deletions

View File

@ -336,11 +336,16 @@ waitexam: ;call delpointer
jz notuseinv jz notuseinv
mov bx,offset cs:withlist1 mov bx,offset cs:withlist1
notuseinv: call checkcoords notuseinv: call checkcoords
cmp quitrequested, 0
jnz stopwaiting
cmp examagain,0 cmp examagain,0
jz norex jz norex
jmp examineagain jmp examineagain
norex: cmp getback,0 norex: cmp getback,0
jz waitexam jz waitexam
stopwaiting:
mov pickup,0 mov pickup,0
cmp watchingtime,0 cmp watchingtime,0

View File

@ -3921,6 +3921,9 @@ waitexam:
bx = offset_withlist1; bx = offset_withlist1;
notuseinv: notuseinv:
checkcoords(); checkcoords();
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto stopwaiting;
_cmp(data.byte(kExamagain), 0); _cmp(data.byte(kExamagain), 0);
if (flags.z()) if (flags.z())
goto norex; goto norex;
@ -3929,6 +3932,7 @@ norex:
_cmp(data.byte(kGetback), 0); _cmp(data.byte(kGetback), 0);
if (flags.z()) if (flags.z())
goto waitexam; goto waitexam;
stopwaiting:
data.byte(kPickup) = 0; data.byte(kPickup) = 0;
_cmp(data.word(kWatchingtime), 0); _cmp(data.word(kWatchingtime), 0);
if (!flags.z()) if (!flags.z())
@ -4301,7 +4305,7 @@ doopeninv:
data.byte(kOpenedob) = 255; data.byte(kOpenedob) = 255;
goto waitexam; goto waitexam;
return; return;
/*continuing to unbounded code: examineagain from examineob:3-66*/ /*continuing to unbounded code: examineagain from examineob:3-69*/
examineagain: examineagain:
data.byte(kInmaparea) = 0; data.byte(kInmaparea) = 0;
data.byte(kExamagain) = 0; data.byte(kExamagain) = 0;
@ -4344,6 +4348,9 @@ waitexam:
bx = offset_withlist1; bx = offset_withlist1;
notuseinv: notuseinv:
checkcoords(); checkcoords();
_cmp(data.byte(kQuitrequested), 0);
if (!flags.z())
goto stopwaiting;
_cmp(data.byte(kExamagain), 0); _cmp(data.byte(kExamagain), 0);
if (flags.z()) if (flags.z())
goto norex; goto norex;
@ -4352,6 +4359,7 @@ norex:
_cmp(data.byte(kGetback), 0); _cmp(data.byte(kGetback), 0);
if (flags.z()) if (flags.z())
goto waitexam; goto waitexam;
stopwaiting:
data.byte(kPickup) = 0; data.byte(kPickup) = 0;
_cmp(data.word(kWatchingtime), 0); _cmp(data.word(kWatchingtime), 0);
if (!flags.z()) if (!flags.z())