![]() |
Routines |
| Prev: D3C6 | Up: Map | Next: D3E2 |
|
Walks the room table from the start, since records vary in length and there is no index. A room that is not in the table gets no objects at all: the table is cleared from DE and the routine returns.
|
||||||||||
| find_screen | D3CF | LD A,(HL) | this record's room number against the one the player is in | |||||||
| D3D0 | INC HL | |||||||||
| D3D1 | CP (IX+$08) | |||||||||
| D3D4 | JR Z,found_screen | |||||||||
| D3D6 | LD A,(HL) | not it: the second byte is the record's length counted from that byte itself, so adding it lands on the next record's room number | ||||||||
| D3D7 | CALL add_HL_A | |||||||||
| D3DA | AND A | past the end of the table: no such room; otherwise go round again | ||||||||
| D3DB | SBC HL,BC | |||||||||
| D3DD | JR NC,zero_end_of_graphic_objs_tbl | |||||||||
| D3DF | ADD HL,BC | |||||||||
| D3E0 | JR find_screen | |||||||||
| Prev: D3C6 | Up: Map | Next: D3E2 |