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

@@ -2203,7 +2203,7 @@ ReturnToMapWithSpeechTextbox::
call ClearSprites
call ReloadTilesetAndPalettes
call SpeechTextbox ; 1bpp or 2bpp according to wTextboxFlags[TEXT_2BPP_F]
ld hl, wVramState
ld hl, wStateFlags
set 0, [hl]
call UpdateSprites
call WaitBGMap2

View File

@@ -390,7 +390,7 @@ LoadMovementDataPointer::
add hl, bc
ld [hl], STEP_TYPE_RESET
ld hl, wVramState
ld hl, wStateFlags
set 7, [hl]
and a
ret
@@ -553,7 +553,7 @@ _GetMovementIndex::
ret
UpdateSprites::
ld a, [wVramState]
ld a, [wStateFlags]
bit 0, a
ret z
farcall UpdateAllObjectsFrozen
@@ -561,14 +561,14 @@ UpdateSprites::
ret
UpdateActiveSprites::
ld a, [wVramState]
ld a, [wStateFlags]
bit 0, a
ret z
farcall _UpdateActiveSprites
ret
UpdateSecondarySprites::
ld a, [wVramState]
ld a, [wStateFlags]
bit 0, a
ret z
farcall _UpdateSecondarySprites

View File

@@ -17,7 +17,7 @@ ScrollingMenu::
ret
.UpdatePalettes:
ld hl, wVramState
ld hl, wStateFlags
bit 0, [hl]
jp nz, UpdateTimePals
jp SetDefaultBGPAndOBP

View File

@@ -1,9 +1,9 @@
DisableSpriteUpdates::
xor a
ldh [hMapAnims], a
ld a, [wVramState]
ld a, [wStateFlags]
res 0, a
ld [wVramState], a
ld [wStateFlags], a
ld a, $0
ld [wSpriteUpdatesEnabled], a
ret
@@ -11,9 +11,9 @@ DisableSpriteUpdates::
EnableSpriteUpdates::
ld a, $1
ld [wSpriteUpdatesEnabled], a
ld a, [wVramState]
ld a, [wStateFlags]
set 0, a
ld [wVramState], a
ld [wStateFlags], a
ld a, $1
ldh [hMapAnims], a
ret

View File

@@ -7,7 +7,7 @@ UpdateTimeSensitivePals::
ret z
; obj update on?
ld a, [wVramState]
ld a, [wStateFlags]
bit 0, a ; obj update
ret z

View File

@@ -35,7 +35,7 @@ CloseText::
pop af
ldh [hOAMUpdate], a
ld hl, wVramState
ld hl, wStateFlags
res 6, [hl]
ret