From: Lukas Krickl Date: Wed, 15 Jan 2025 16:31:35 +0000 (+0100) Subject: actor: Fixed actors clearing their position whenever they move X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=88e99409fa04c1d84cece7cfed720bc2b43ce47c;p=gbrg%2F.git actor: Fixed actors clearing their position whenever they move --- diff --git a/src/actor.s b/src/actor.s index aa68120..b19cfd0 100644 --- a/src/actor.s +++ b/src/actor.s @@ -168,7 +168,9 @@ actor_anim_verify: pop bc ret z + push af call anim_clear + pop af ret ; truncates the position @@ -195,11 +197,11 @@ anim_truncate_pos: actor_tile_update_rf_flags: push_all - ; first unset existing flags + inc bc ; bc = y pos - ; add +8 to positions to center on tile + ; first unset existing flags - inc bc ; bc = y pos + ; sub 8 to positions to center on tile ld a, [bc] sub a, ANIM_MOVE_TILE_SIZE / 2 ; -8 to be in center ld d, a ; d = y pos @@ -229,6 +231,7 @@ actor_tile_update_rf_flags: or a, RF_ACTOR ld [hl], a +@skip: pop_all ret