Routines |
Prev: 31733 | Up: Map | Next: 31843 |
31746 | LD HL,32746 | L=234 (LSB of the display file address for the first slot in the inventory: 20714) | ||
31749 | LD C,6 | Clear the six slots in the current on-screen inventory | ||
31751 | LD H,80 | |||
31753 | LD B,8 | |||
31755 | LD (HL),0 | |||
31757 | INC H | |||
31758 | DJNZ 31755 | |||
31760 | INC L | |||
31761 | DEC C | |||
31762 | JR NZ,31751 | |||
31764 | LD DE,20714 | DE=display file address for the first slot in the inventory | ||
31767 | LD BC,39144 | The safe key UDG is at 39144 | ||
31770 | LD HL,32747 | 32747 holds the inventory flags | ||
31773 | LD A,6 | INK 6 | ||
31775 | BIT 0,(HL) | Has ERIC got the safe key? | ||
31777 | CALL NZ,31844 | Print it if so | ||
31780 | INC B | BC=39400: Science Lab storeroom key UDG | ||
31781 | LD A,7 | INK 7 | ||
31783 | BIT 1,(HL) | Has ERIC got the Science Lab storeroom key? | ||
31785 | CALL NZ,31844 | Print it if so | ||
31788 | LD A,4 | INK 4 | ||
31790 | INC B | BC=39656: frog UDG | ||
31791 | BIT 2,(HL) | Has ERIC got the frog? | ||
31793 | CALL NZ,31844 | Print it if so | ||
31796 | INC B | BC=39912: water pistol UDG (left half) | ||
31797 | BIT 3,(HL) | Has ERIC got the water pistol? | ||
31799 | JR Z,31819 | Jump if not | ||
31801 | LD A,5 | INK 5 for the water-filled pistol | ||
31803 | BIT 4,(HL) | Has ERIC got the water pistol with sherry in it? | ||
31805 | JR Z,31809 | Jump if not | ||
31807 | LD A,67 | INK 3: BRIGHT 1 for the sherry-filled pistol | ||
31809 | PUSH AF | |||
31810 | CALL 31844 | Print the left half of the water pistol | ||
31813 | POP AF | |||
31814 | INC B | BC=40168: water pistol UDG (right half) | ||
31815 | CALL 31844 | Print the right half of the water pistol | ||
31818 | DEC B | |||
31819 | INC B | |||
31820 | INC B | BC=40424: 3 stinkbombs UDG | ||
31821 | LD A,7 | INK 7 | ||
31823 | BIT 5,(HL) | Has ERIC got 3 stinkbombs? | ||
31825 | JR NZ,31837 | Jump if so | ||
31827 | INC B | BC=40680: 2 stinkbombs UDG | ||
31828 | BIT 6,(HL) | Has ERIC got 2 stinkbombs? | ||
31830 | JR NZ,31837 | Jump if so | ||
31832 | BIT 7,(HL) | Has ERIC got 1 stinkbomb? | ||
31834 | JR Z,31840 | Jump if not | ||
31836 | INC B | BC=40936: 1 stinkbomb UDG | ||
31837 | CALL 31844 | Print the stinkbombs | ||
31840 | LD H,210 | 210=ERIC | ||
31842 | RET |
Prev: 31733 | Up: Map | Next: 31843 |