Clear BGMap before clear level screen to avoid glitch due to SCX=4 [bugfix to f6320585bf] (#35)

This commit is contained in:
xCrystal
2024-01-17 14:25:29 +01:00
parent f6320585bf
commit 0abe559e11
6 changed files with 19 additions and 21 deletions

View File

@@ -4,13 +4,16 @@ ClearedLevelScreen:
ldh [hSCY], a
ld a, -$4
ldh [hSCX], a
call DisableLCD
call ClearTilemap
call ClearBGMap0or2
call LoadFrame
call LoadStandardFont
call ClearMenuAndWindowData
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
call EnableLCD
ld hl, .LevelCleared1Text
bccoord 3, 1
call PrintHLTextAtBC
@@ -54,4 +57,4 @@ AddLevelCoinsToBalance:
ld [bc], a
pop bc
farcall GiveCoins
ret
ret

View File

@@ -14,11 +14,12 @@ GameMenu:
GameMenu_KeepMusic:
xor a
ldh [hMapAnims], a
ldh [hSCX], a
ldh [hSCY], a
call ClearTilemap
call LoadFrame
call LoadStandardFont
xor a
ldh [hSCX], a
ldh [hSCY], a
call ClearMenuAndWindowData
ld b, CGB_DIPLOMA
call GetCGBLayout