wVramState -> wStateFlags and define flag constants (from pokecrystal f72f078c0e68736adf81f6c45c84f0c1e127a231)

This commit is contained in:
xCrystal
2024-02-11 00:34:46 +01:00
parent b1fd8f941a
commit e44744c587
27 changed files with 88 additions and 82 deletions

View File

@@ -8,10 +8,10 @@ INCBIN "gfx/tilesets/forest-tree/4.2bpp"
CelebiShrineEvent:
call DelayFrame
ld a, [wVramState]
ld a, [wStateFlags]
push af
xor a
ld [wVramState], a
ld [wStateFlags], a
call LoadCelebiGFX
depixel 0, 10, 7, 0
ld a, SPRITE_ANIM_OBJ_CELEBI
@@ -49,7 +49,7 @@ CelebiShrineEvent:
.done
pop af
ld [wVramState], a
ld [wStateFlags], a
call .RestorePlayerSprite_DespawnLeaves
call CelebiEvent_SetBattleType
ret

View File

@@ -149,11 +149,11 @@ OWCutAnimation_WithCutTreeAsObject:
.got_oam_addr
ld [wCurSpriteOAMAddr], a
ld [wCutTreeOAMAddr], a
ld hl, wVramState
set 2, [hl] ; do not clear wShadowOAM during DoNextFrameForAllSprites
ld hl, wStateFlags
set DONT_CLEAR_SHADOW_OAM_IN_SPRITE_ANIMS_F, [hl]
callfar DoNextFrameForAllSprites
ld hl, wVramState
res 2, [hl]
ld hl, wStateFlags
res DONT_CLEAR_SHADOW_OAM_IN_SPRITE_ANIMS_F, [hl]
call .OWCutJumptable
call DelayFrame
jr .loop
@@ -448,10 +448,10 @@ Cut_Headbutt_GetPixelFacing:
FlyFromAnim:
call DelayFrame
ld a, [wVramState]
ld a, [wStateFlags]
push af
xor a
ld [wVramState], a
ld [wStateFlags], a
call FlyFunction_InitGFX
depixel 10, 10, 4, 0
ld a, SPRITE_ANIM_OBJ_RED_WALK
@@ -477,15 +477,15 @@ FlyFromAnim:
.exit
pop af
ld [wVramState], a
ld [wStateFlags], a
ret
FlyToAnim:
call DelayFrame
ld a, [wVramState]
ld a, [wStateFlags]
push af
xor a
ld [wVramState], a
ld [wStateFlags], a
call FlyFunction_InitGFX
depixel 31, 10, 4, 0
ld a, SPRITE_ANIM_OBJ_RED_WALK
@@ -514,7 +514,7 @@ FlyToAnim:
.exit
pop af
ld [wVramState], a
ld [wStateFlags], a
call .RestorePlayerSprite_DespawnLeaves
ret

View File

@@ -41,7 +41,7 @@ RedCredits::
ld [wMusicFade], a
farcall FadeOutToWhite
xor a
ld [wVramState], a
ld [wStateFlags], a
ldh [hMapAnims], a
farcall InitDisplayForRedCredits
ld c, 8
@@ -61,7 +61,7 @@ HallOfFame_FadeOutMusic:
ld [wMusicFade], a
farcall FadeOutToWhite
xor a
ld [wVramState], a
ld [wStateFlags], a
ldh [hMapAnims], a
farcall InitDisplayForHallOfFame
ld c, 100