diff options
-rw-r--r-- | home.asm | 35 | ||||
-rw-r--r-- | home/map.asm | 4 | ||||
-rw-r--r-- | home/rtc.asm | 2 | ||||
-rwxr-xr-x | home/sprite_updates.asm | 19 | ||||
-rw-r--r-- | wram.asm | 2 |
5 files changed, 32 insertions, 30 deletions
@@ -37,9 +37,9 @@ INCLUDE "home/map.asm" InexplicablyEmptyFunction:: ; 2e16 ; Inexplicably empty. ; Seen in PredefPointers. - rept 16 +rept 16 nop - endr +endr ret INCLUDE "home/farcall.asm" @@ -47,10 +47,12 @@ INCLUDE "home/predef.asm" INCLUDE "home/window.asm" INCLUDE "home/flag.asm" -Function2f7b:: +Unreferenced_CheckBPressedDebug:: +; Used in debug ROMs to walk through walls and avoid encounters. ld a, [wMonStatusFlags] bit 1, a ret z + ld a, [hJoyDown] bit 1, a ret @@ -64,33 +66,14 @@ xor_a_dec_a:: dec a ret -Function2f8b:: +Unreferenced_CheckFieldDebug:: push hl ld hl, wMonStatusFlags bit 1, [hl] pop hl ret - -DisableSpriteUpdates:: ; 2f93 (0:2f93) - xor a - ld [hMapAnims], a - ld a, [wVramState] - res 0, a - ld [wVramState], a - ld a, $0 - ld [wRTCEnabled], a - ret - -EnableSpriteUpdates:: ; 2fa4 (0:2fa4) - ld a, $1 - ld [wRTCEnabled], a - ld a, [wVramState] - set 0, a - ld [wVramState], a - ld a, $1 - ld [hMapAnims], a - ret - + +INCLUDE "home/sprite_updates.asm" INCLUDE "home/string.asm" IsInJohto:: @@ -739,7 +722,7 @@ ApplyTilemap:: ; 3472 (0:3472) ld a, [hCGB] and a jr z, .asm_3484 - ld a, [wRTCEnabled] + ld a, [wSpriteUpdatesEnabled] cp $0 jr z, .asm_3484 ld a, $1 diff --git a/home/map.asm b/home/map.asm index 2766878b..ebdd00ff 100644 --- a/home/map.asm +++ b/home/map.asm @@ -209,7 +209,7 @@ Function2086:: Function20ac:: ld a, $1 - ld [wRTCEnabled], a + ld [wSpriteUpdatesEnabled], a farcall Function8c3e9 farcall UpdateTimeOfDayPal call OverworldTextModeSwitch @@ -2128,7 +2128,7 @@ FinishExitMenu:: ReturnToMapWithSpeechTextbox:: push af ld a, $1 - ld [wRTCEnabled], a + ld [wSpriteUpdatesEnabled], a call ClearBGPalettes call ClearSprites call ReloadTilesetAndPalettes diff --git a/home/rtc.asm b/home/rtc.asm index afe9028e..5cbd1f04 100644 --- a/home/rtc.asm +++ b/home/rtc.asm @@ -2,7 +2,7 @@ RTC:: ; 343 ; update time and time-sensitive palettes ; rtc enabled? - ld a, [wRTCEnabled] + ld a, [wSpriteUpdatesEnabled] cp 0 ret z diff --git a/home/sprite_updates.asm b/home/sprite_updates.asm new file mode 100755 index 00000000..8b8aee32 --- /dev/null +++ b/home/sprite_updates.asm @@ -0,0 +1,19 @@ +DisableSpriteUpdates:: + xor a + ldh [hMapAnims], a + ld a, [wVramState] + res 0, a + ld [wVramState], a + ld a, $0 + ld [wSpriteUpdatesEnabled], a + ret + +EnableSpriteUpdates:: + ld a, $1 + ld [wSpriteUpdatesEnabled], a + ld a, [wVramState] + set 0, a + ld [wVramState], a + ld a, $1 + ldh [hMapAnims], a + ret
\ No newline at end of file @@ -131,7 +131,7 @@ wAutoInputLength:: db ; c2ca wMonStatusFlags:: ds 1 ; c1cb wGameLogicPaused:: ds 1 ; c1cc -wRTCEnabled:: ds 1 +wSpriteUpdatesEnabled:: db wc1ce:: ds 1 ; c1ce wMapTimeOfDay:: ds 1 ; c1cf ds 3 |