Prev: 8A04 Up: Map Next: 8A9A
8A2E: Room : Check shelf change on exit.
Input
Output
Check for shelf change.
Exit_CheckShelves 8A2E LD DE,_bb3b Copy of inventory on entry.
8A31 LD HL,Shop_Shelves
8A34 LD BC,$0003
8A37 LDIR
8A39 LD DE,Inv_Pocket1 Run through the inventory.
8A3C LD C,$03
Exit_CheckShelves_0 8A3E LD HL,_bb3b Compare each item with the copy made on entry. If any object is the same elminate it from the list.
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 Run through copy and see if there are any objects left.
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 IF nothings change just exit.
8A61 AND A
8A62 JR Z,Inv_AutoSelect
8A64 LD DE,$0050 Take away 50 iridi from cash.
8A67 LD HL,IridiValue
8A6A CALL BCD_SubDE
8A6D JR NC,Exit_DepositTaken
This entry point is used by the routines at Offer_Handle and 8AC4.
Exit_NotEnough 8A6F CALL Message_DisplayAt Displays not enough.
8A72 DEFM "not enough!"
8A7D DEFB $5E
8A7E OR $01
8A80 RET
Exit_DepositTaken 8A81 CALL Message_DisplayAt
8A84 DEFM "deposit taken 50ir" Deposit taken 50ir
8A96 DEFB $5E
8A97 JP Inv_AutoSelect
Prev: 8A04 Up: Map Next: 8A9A