| Alien (BUGFIX 1.7) | Routines |
| Prev: 31759 | Up: Map | Next: 31820 |
|
List the item ids lying in the current room — scan ItemLocations from the top down for entries equal to the room number, appending each match to RoomItemList.
|
||||
| 31796 | LD A,(31242) | C = current room | ||
| 31799 | LD C,A | |||
| 31800 | LD HL,29961 | scan ItemLocations from item 21 down | ||
| 31803 | LD DE,29962 | DE -> RoomItemList write pointer | ||
| 31806 | LD B,22 | |||
| 31808 | LD A,(HL) | item's location | ||
| 31809 | CP C | lying in this room? | ||
| 31810 | JR NZ,31816 | |||
| 31812 | LD A,B | yes: append its id (= B-1) to the list | ||
| 31813 | DEC A | |||
| 31814 | LD (DE),A | |||
| 31815 | INC DE | |||
| 31816 | DEC HL | |||
| 31817 | DJNZ 31808 | |||
| 31819 | RET | |||
| Prev: 31759 | Up: Map | Next: 31820 |