dw l1
dw l1
dw l1
+
+l2:
+ mapdef 0, map_r_nop, 0, l1_exits, bank8000, bank8800, bank8C00, bank9000, tile_id_table
+#include "spawn.inc"
call vblank_wait
call enableinterrupts
- call player_init
- call ui_init
-
ret
; loads all map related data that
; inputs:
; de: new map ptr
map_try_full_reload:
- ld hl, map
- ld a, [hl+]
- ld h, [hl]
- ld l, a ; hl = map
-
- ld a, [hl] ; read flags
+ ld a, [de] ; read flags
and a, MAP_F_DO_FULL_REDRAW
ret z
; map transition routines
; gets the down exit and sets transition state
map_get_exit_down_and_set_load:
+ ; fix player position
+ ld hl, player+act_pos_y
+ xor a, a
+ ld [hl], a
+
ld hl, map_exit_down
ld a, [hl+]
ld d, [hl]
; this call does not return
; if a full load is needed
call map_try_full_reload
-
+
ld hl, update_map_load_down
call game_set_state
ret