Prev: 68A2 Up: Map Next: 691A
68F4: Enter room
This is called when the hero should enter a room. It resets the game window position, expands out the room definition into tile references then plots those tiles, centres the map position, sets an appropriate sprite for the hero (walk or crawl), sets up movable items then zoomboxes the scene onto the screen and boosts the score by one. Finally it squashes the stack and jumps to the main loop.
Used by the routines at transition, main_loop_setup, keyscan_break and reset_game.
enter_room 68F4 LD HL,$0000 Reset the game_window_offset X and Y coordinates to zero
68F7 LD ($A7C7),HL
68FA CALL setup_room Setup the room
68FD CALL plot_interior_tiles Render visible tiles array into the screen buffer
6900 LD HL,$EA74 Set the map_position to (116,234)
6903 LD ($81BB),HL
6906 CALL set_hero_sprite_for_room Set appropriate sprite for the room (standing or crawl)
6909 LD HL,$8000 Reset the hero's screen position
690C CALL calc_vischar_iso_pos_from_vischar
690F CALL setup_movable_items Setup movable items
6912 CALL zoombox Zoombox the scene onto the screen
6915 LD B,$01 Increment score by one
6917 CALL increase_score
FALL THROUGH into squash_stack_goto_main.
Prev: 68A2 Up: Map Next: 691A