ld b, BTNUP
input_held
jr z, @not_up REL
- call player_try_scroll_up
ld b, PLAYER_SPEED
ld c, 0
call player_stage_move_n
call player_try_move
+
+ ; only scroll if player actually moved
+ cp a, 0
+ jr nz, @not_up REL
+ call player_try_scroll_up
@not_up:
ld b, BTNDOWN
; moves scroll and performs map loads if needed
; inputs:
; b/c: new y/x position
+ ; returns:
+ ; a: 1 == collision
+ ; a: 0 no collision
player_try_move:
; write temporary collider
push bc
ld a, c
ld [player+act_pos_x], a
-
+
+ xor a, a
ret
; draws the special player actor