Remove unnecessary DMG and SGB checking (#7)

This commit is contained in:
xCrystal
2023-07-26 14:29:16 +02:00
parent 15f452ff26
commit acd022d765
30 changed files with 10 additions and 713 deletions

View File

@@ -218,7 +218,7 @@ Pokedex_InitMainScreen:
ld a, 7
ld [wDexListingHeight], a
call Pokedex_PrintListing
call Pokedex_SetBGMapMode_3ifDMG_4ifCGB
call Pokedex_SetBGMapMode4
call Pokedex_ResetBGMapMode
call Pokedex_DrawMainScreenBG
ld a, POKEDEX_SCX
@@ -814,12 +814,6 @@ Pokedex_UpdateUnownMode:
ld a, DEXSTATE_OPTION_SCR
ld [wJumptableIndex], a
call DelayFrame
call Pokedex_CheckSGB
jr nz, .decompress
farcall LoadSGBPokedexGFX2
jr .done
.decompress
ld hl, PokedexLZ
ld de, vTiles2 tile $31
lb bc, BANK(PokedexLZ), 58
@@ -2420,12 +2414,6 @@ Pokedex_LoadGFX:
ld hl, vTiles2 tile $60
ld bc, $20 tiles
call Pokedex_InvertTiles
call Pokedex_CheckSGB
jr nz, .LoadPokedexLZ
farcall LoadSGBPokedexGFX
jr .LoadPokedexSlowpokeLZ
.LoadPokedexLZ:
ld hl, PokedexLZ
ld de, vTiles2 tile $31
call Decompress
@@ -2461,14 +2449,6 @@ INCBIN "gfx/pokedex/pokedex.2bpp.lz"
PokedexSlowpokeLZ:
INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
Pokedex_CheckSGB:
ldh a, [hCGB]
or a
ret nz
ldh a, [hSGB]
dec a
ret
Pokedex_LoadUnownFont:
ld a, BANK(sScratch)
call OpenSRAM
@@ -2553,15 +2533,6 @@ Pokedex_SetBGMapMode4:
call DelayFrames
ret
Pokedex_SetBGMapMode_3ifDMG_4ifCGB:
ldh a, [hCGB]
and a
jr z, .DMG
call Pokedex_SetBGMapMode4
.DMG:
call Pokedex_SetBGMapMode3
ret
Pokedex_ResetBGMapMode:
xor a
ldh [hBGMapMode], a