Skip to content

Commit

Permalink
Black out screen when switching area maps
Browse files Browse the repository at this point in the history
  • Loading branch information
roukaour committed Jun 2, 2017
1 parent 18fb288 commit 2963854
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions engine/pokedex.asm
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
call Pokedex_BlackOutBG
xor a
ld [hSCX], a
call DelayFrame
;call DelayFrame
ld a, $7
ld [hWX], a
ld a, $90
Expand Down Expand Up @@ -2301,6 +2301,11 @@ Pokedex_FillBox: ; 413fe (10:53fe)

Pokedex_BlackOutBG: ; 41401 (10:5401)
; Make BG palettes black so that the BG becomes all black.
call _Pokedex_JustBlackOutBG
call DelayFrame
ret

_Pokedex_JustBlackOutBG:
ld a, [rSVBK]
push af
ld a, $5
Expand All @@ -2315,7 +2320,6 @@ Pokedex_BlackOutBG: ; 41401 (10:5401)
call DmgToCgbBGPals
ld a, $ff
call DmgToCgbObjPal0
call DelayFrame
ret

Pokedex_GetSGBLayout: ; 41423
Expand Down
12 changes: 6 additions & 6 deletions engine/pokegear.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2500,12 +2500,6 @@ _Area: ; 91d11
.set_region
ld [wd003], a
call .UpdateGFX

ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
xor a
ld [hBGMapMode], a
call .GetAndPlaceNest
.loop
call JoyTextDelay
Expand Down Expand Up @@ -2581,6 +2575,7 @@ _Area: ; 91d11

.UpdateGFX:
call ClearSprites
farcall _Pokedex_JustBlackOutBG
ld a, [wd003]
cp KANTO_REGION
jr z, .KantoGFX
Expand All @@ -2593,6 +2588,11 @@ _Area: ; 91d11
.FinishGFX
hlbgcoord 0, 0
call TownMapBGUpdate
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
xor a
ld [hBGMapMode], a
ret

.KantoGFX:
Expand Down

0 comments on commit 2963854

Please sign in to comment.