diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/player.s | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/player.s b/src/player.s index fa649c6..5060e87 100644 --- a/src/player.s +++ b/src/player.s @@ -238,7 +238,24 @@ @do_update_sprites: ;; And with that, update all the sprites with the information we have ;; collected (i.e. heading, thrust, coordinates). - JAL update_sprites + __fallthrough__ update_sprites + .endproc + + .proc update_sprites + ;; It's just an update of coordinates or something more? + lda #%00000100 + and zp_state + beq @update_coordinates + + jsr update_player_tiles + + ;; Clear out `update` flag. + lda zp_state + and #%11111011 + sta zp_state + + @update_coordinates: + JAL update_sprites_coordinates .endproc ;; Updates the `zp_velocity_y` and the `zp_position_y` depending on whether @@ -703,23 +720,6 @@ rts .endproc - .proc update_sprites - ;; It's just an update of coordinates or something more? - lda #%00000100 - and zp_state - beq @update_coordinates - - jsr update_player_tiles - - ;; Clear out `update` flag. - lda zp_state - and #%11111011 - sta zp_state - - @update_coordinates: - JAL update_sprites_coordinates - .endproc - ;; Update the tiles used for the player's sprites. This includes which tile ;; IDs to use on each slot, and also the attributes to be used, as the ;; heading affects whether things are to be flipped horizontally or not. |
