8A2E: Room : Check shelf change on exit.
Exit_CheckShelves |
8A2E |
LD DE,_bb3b |
|
8A31 |
LD HL,Shop_Shelves |
|
8A34 |
LD BC,$0003 |
|
8A37 |
LDIR |
|
8A39 |
LD DE,Inv_Pocket1 |
|
8A3C |
LD C,$03 |
Exit_CheckShelves_0 |
8A3E |
LD HL,_bb3b |
|
8A41 |
LD B,$03 |
|
8A43 |
LD A,(DE) |
Exit_CheckShelves_1 |
8A44 |
CP (HL) |
|
8A45 |
JR NZ,Exit_CheckShelves_2 |
|
8A47 |
LD (HL),$00 |
|
8A49 |
LD B,$01 |
Exit_CheckShelves_2 |
8A4B |
INC HL |
|
8A4C |
DJNZ Exit_CheckShelves_1 |
|
8A4E |
INC DE |
|
8A4F |
DEC C |
|
8A50 |
JR NZ,Exit_CheckShelves_0 |
|
8A52 |
LD HL,_bb3b |
|
8A55 |
LD B,$03 |
|
8A57 |
XOR A |
|
8A58 |
LD C,A |
Exit_CheckShelves_3 |
8A59 |
CP (HL) |
|
8A5A |
JR Z,Exit_CheckShelves_4 |
|
8A5C |
INC C |
Exit_CheckShelves_4 |
8A5D |
INC HL |
|
8A5E |
DJNZ Exit_CheckShelves_3 |
|
8A60 |
LD A,C |
|
8A61 |
AND A |
|
8A62 |
JR Z,Inv_AutoSelect |
|
8A64 |
LD DE,$0050 |
|
8A67 |
LD HL,IridiValue |
|
8A6A |
CALL BCD_SubDE |
|
8A6D |
JR NC,Exit_DepositTaken |
Exit_NotEnough |
8A6F |
CALL Message_DisplayAt |
|
8A72 |
DEFM "not enough!" |
|
8A7D |
DEFB $5E |
|
8A7E |
OR $01 |
|
8A80 |
RET |
Exit_DepositTaken |
8A81 |
CALL Message_DisplayAt |
|
8A84 |
DEFM "deposit taken 50ir" |
|
8A96 |
DEFB $5E |
|
8A97 |
JP Inv_AutoSelect |