Effects of branch space [Commit 3]: accounting for techniques (#28)

This commit is contained in:
xCrystal
2023-10-29 12:03:23 +01:00
parent 5362006c4d
commit a8b5145236
6 changed files with 104 additions and 44 deletions

View File

@@ -3212,9 +3212,15 @@ InitBranchArrowsSprites:
ld c, NUM_DIRECTIONS
.loop
ld a, [de]
cp -1 ;
jr z, .next1 ; skip this arrow if this direction is not available
cp BRANCH_DIRECTION_INVALID
jr z, .next1 ; skip this arrow if this direction is not valid
cp BRANCH_DIRECTION_UNAVAILABLE
gender_to_pal
ld b, a
jr nz, .available
ld b, PAL_OW_EMOTE ; draw grey arrow if this direction is unavailable
.available
; draw this arrow and advance hUsedSpriteIndex
; preserve loop variables d, e, c
push de
@@ -3222,11 +3228,13 @@ InitBranchArrowsSprites:
ldh a, [hUsedSpriteIndex]
ld e, a
ld d, HIGH(wShadowOAM)
; copy all bytes minus the attributes one
; the palette matches the player's color palette
; copy all bytes minus the attributes one. the palette matches the
; player's color palette, or is PAL_OW_EMOTE if direction is unavailable
push bc
ld bc, SPRITEOAMSTRUCT_LENGTH - 1
call CopyBytes
gender_to_pal
pop bc
ld a, b ; palette
ld [de], a
inc de
ld a, e