Routines |
Prev: B29F | Up: Map | Next: B32D |
This resets the hero's position, redraws the scene, then zoomboxes it onto the screen.
Used by the routines at transition and keyscan_break.
|
||||
Reset hero's position.
|
||||
reset_outdoors | B2FC | LD HL,$8000 | Reset the hero's screen position | |
B2FF | CALL calc_vischar_iso_pos_from_vischar | |||
Centre the map position on the hero.
|
||||
B302 | LD HL,$8018 | Point HL at the hero's iso_pos.x | ||
B305 | LD A,(HL) | Read it into (A, C) | ||
B306 | INC L | |||
B307 | LD C,(HL) | |||
B308 | CALL divide_by_8 | Divide (C,A) by 8 (with no rounding). Result is in A | ||
11 here is the width of the game screen minus half of the hero's width
|
||||
B30B | SUB $0B | Subtract 11 | ||
B30D | LD ($81BB),A | Set map_position.x | ||
B310 | INC L | Advance HL to the hero's iso_pos.y | ||
B311 | LD A,(HL) | Read it into (A, C) | ||
B312 | INC L | |||
B313 | LD C,(HL) | |||
B314 | CALL divide_by_8 | Divide (C,A) by 8 (with no rounding). Result is in A | ||
6 here is the height of the game screen minus half of the hero's height
|
||||
B317 | SUB $06 | Subtract 6 | ||
B319 | LD ($81BC),A | Set map_position.y | ||
B31C | XOR A | Set the global current room index to room_0_OUTDOORS | ||
B31D | LD ($68A0),A | |||
B320 | CALL get_supertiles | Update the supertiles in map_buf | ||
B323 | CALL plot_all_tiles | Plot all tiles | ||
B326 | CALL setup_movable_items | Setup movable items | ||
B329 | CALL zoombox | Zoombox the scene onto the screen | ||
B32C | RET | Return |
Prev: B29F | Up: Map | Next: B32D |