![]() |
Routines |
| Prev: C51A | Up: Map | Next: C530 |
|
Used by the routine at build_room.
Called while a room is built (build_room). Looks through the 32 entries of special_objs_tbl for objects not yet collected whose current room is the one being entered, and builds an object record for each in records 2 and 3 ($5C48 and $5C68) -- the two slots the game keeps for special objects. Whatever is left of those two records is cleared.
The 32 starting rooms in the table are all different, so at the start no room has more than one. A third match would build a record over $5C88, the room's first object, and clear_spare_spec_records would then never stop clearing; how the drop code keeps it to two has not been checked here.
|
||||||||
| find_special_objs_here | C525 | LD DE,$5C48 | ||||||
| C528 | EXX | |||||||
| C529 | LD IY,special_objs_tbl | |||||||
| C52D | LD B,(IX+$08) | the room | ||||||
| Prev: C51A | Up: Map | Next: C530 |