Prev: D1E6 Up: Map Next: D219
D1EF: Fill the object table for the new room
Used by the routine at build_screen_objects.
Clears the screen buffer; builds the room's walls, arches and fixed objects into records 4 onwards (retrieve_screen); puts any collectable objects in this room into records 2 and 3 (find_special_objs_here); and places the player in the doorway he came through (adjust_plyr_xyz_for_room_size). Then resets the per-room state and asks for the whole room to be drawn and copied to the screen ($5BB7).
$5BAF is the portcullis-moving flag and $5BB0 a count the portcullis code keeps; $5BBD is the bouncing ball's turning height and $5BBF the spiked-ball-falling flag. $5BC0 takes bit 0 of the room number: the dropping spiked balls (upd_63) stay put while it is non-zero; picking an object up (pickup_object) or collecting an extra life (upd_103) clears it.
build_room D1EF CALL clear_scrn_buffer build the room
D1F2 CALL retrieve_screen
D1F5 CALL find_special_objs_here
D1F8 CALL adjust_plyr_xyz_for_room_size
D1FB XOR A clear the per-room flags
D1FC LD ($5BAF),A
D1FF LD ($5BB0),A
D202 LD ($5BBD),A
D205 LD ($5BBF),A
D208 LD A,$01 draw the whole room this frame
D20A LD ($5BB7),A
D20D LD A,($5C10) odd rooms hold their spiked balls
D210 AND $01
D212 LD ($5BC0),A
D215 CALL flag_room_visited the room counts as visited
D218 RET
Prev: D1E6 Up: Map Next: D219