From 670d6a54c7dbc9b6cca2979732a24ac73769ecae Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Fri, 17 Jan 2025 21:03:31 +0100 Subject: [PATCH] actor: Added player version of rf flag update sub --- src/actor.s | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.30.2