From: Lukas Krickl Date: Fri, 17 Jan 2025 20:03:31 +0000 (+0100) Subject: actor: Added player version of rf flag update sub X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=670d6a54c7dbc9b6cca2979732a24ac73769ecae;p=gbrg%2F.git actor: Added player version of rf flag update sub --- diff --git a/src/actor.s b/src/actor.s index b19cfd0..9d5e1e4 100644 --- a/src/actor.s +++ b/src/actor.s @@ -182,13 +182,22 @@ actor_anim_verify: anim_truncate_pos: ret + ; same as actor_tile_update_rf_flags + ; but decs hl before calling and + ; increments again after +player_tile_update_rf_flags: + dec hl + call actor_tile_update_rf_flags + inc hl + ret + ; marks the current actor's tile ; as occupied by an actor ; also removes the flag from the actor's current tile ; this only works for the default case of ; an acotr needing a single tile. ; inputs: - ; bc: original y/x position ptr + ; bc: (actor ptr) original y/x position ptr ; anim_target_y/x: target position ; returns: ; sets the RF_ACTOR flag at target_y/x