From: Lukas Krickl Date: Tue, 14 Jan 2025 05:07:50 +0000 (+0100) Subject: map: removed map_set and map_unset_flag X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=5e6cb424ac049dc0560421c63101577e993e4896;p=gbrg%2F.git map: removed map_set and map_unset_flag --- diff --git a/src/map.s b/src/map.s index 9f2be4d..9b96ef9 100644 --- a/src/map.s +++ b/src/map.s @@ -429,35 +429,6 @@ room_get_flag_ptr: add hl, de ; hl + de ret - ; sets a tile position flag - ; as a flag - ; for actor -> actor collision detection - ; inputs: - ; a: the flag to set (flags | a) - ; de: y/x -room_set_flag: - ld b, a - call room_get_flag_ptr - ld a, [hl] - or a, b - ld [hl], a - - ret - - ; unsets a tile position flag - ; as a flag - ; for actor -> actor collision detection - ; inputs: - ; a: the flag to set (flags ^ a) - ; de: y/x -room_unset_flag: - ld b, a - call room_get_flag_ptr - ld a, [hl] - xor a, b - ld [hl], a - ret - ; gets flags at a certain position ; applies a mask ; inputs: diff --git a/src/player.s b/src/player.s index 3c6ac56..fd75f7b 100644 --- a/src/player.s +++ b/src/player.s @@ -101,7 +101,7 @@ player_update: @no_anim: ; set collision mask - ld a, RF_WALL | RF_DOOR + ld a, RF_WALL | RF_DOOR | RF_ACTOR ld [ct_mask], a ; anim_target_y = y movement target diff --git a/src/wram.s b/src/wram.s index d85cdf2..58e3e26 100644 --- a/src/wram.s +++ b/src/wram.s @@ -125,7 +125,8 @@ damage_anim: .adv 1 ; need to look up the actor in question by ; iterating over the actor table + player ; and checking each position - ; TODO: maybe add an actor lookup table for each tile + ; note: if RF_ACTOR is set the highest 4 bits of RF flags will + ; be set to the actor's id .de RF_ACTOR, 4 ; current room struct