; standing on tile
; 0 = player, 1-N = map actors
.de t_actor, 1
- ; 2 bytes of custom state storage
- ; to be used by tile routine
-.de t_p0, 1
-.de t_state, 1
+ ; if != 0 this points to an event
+ ; that should execute when the player hits the tile
+.de t_event, 2
; graphical tile
.de t_tile, 1
.de t_size, 0
+
+ ; tile event struct
+.se 0
+.de te_type, 1
+.de te_flags, 1
+ ; pointer to map
+ ; that should be loaded on
+ ; event trigger
+ ; if it is 0000
+ ; the current map remains
+.de te_target_map, 2
+.de te_y, 1
+.de te_x, 1
; updates the special player actor
player_update:
- call scroll_center_player
+ ; call scroll_center_player
call player_inputs
call player_handle_move
and a, BTNDOWN
jr z, @not_down REL
ld a, [player+act_pos_y]
- cp a, 0xF0 ; max value
+ cp a, 0x60 ; max value
jr z, @not_down REL
inc a
ld [player+act_pos_y], a
and a, BTNRIGHT
jr z, @not_right REL
ld a, [player+act_pos_x]
- cp a, 0xF0 ; max value
+ cp a, 0x90 ; max value
jr z, @not_right REL
inc a
ld [player+act_pos_x], a