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

@ -107,10 +107,7 @@ _SlotMachine:
call PlayMusic
call DelayFrame
call DisableLCD
hlbgcoord 0, 0
ld bc, vBGMap1 - vBGMap0
ld a, " "
call ByteFill
call ClearBGMap0or2
ld b, CGB_SLOT_MACHINE
call GetCGBLayout
callfar ClearSpriteAnims

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

View File

@ -5,10 +5,7 @@ InitDisplayForHallOfFame:
call DisableLCD
call LoadStandardFont
call LoadFontsBattleExtra
hlbgcoord 0, 0
ld bc, vBGMap1 - vBGMap0
ld a, " "
call ByteFill
call ClearBGMap0or2
hlcoord 0, 0, wAttrmap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
@ -34,10 +31,7 @@ InitDisplayForRedCredits:
call DisableLCD
call LoadStandardFont
call LoadFontsBattleExtra
hlbgcoord 0, 0
ld bc, vBGMap1 - vBGMap0
ld a, " "
call ByteFill
call ClearBGMap0or2
hlcoord 0, 0, wAttrmap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a

View File

@ -239,17 +239,13 @@ LoadMapTimeOfDay:
ldh [rVBK], a
xor a
ld bc, vBGMap1 - vBGMap0
hlbgcoord 0, 0
call ByteFill
call FillBGMap0or2
pop af
ldh [rVBK], a
ld a, "■"
ld bc, vBGMap1 - vBGMap0
hlbgcoord 0, 0
call ByteFill
call FillBGMap0or2
ret
.PushAttrmap:

View File

@ -1,3 +1,10 @@
ClearBGMap0or2::
ld a, " "
FillBGMap0or2::
hlbgcoord 0, 0
ld bc, vBGMap1 - vBGMap0
jp ByteFill
ClearBGPalettes::
call ClearPalettes
WaitBGMap::