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

@@ -104,9 +104,6 @@ PokeGear:
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
ldh a, [hCGB]
and a
ret z
ld a, %11100100
call DmgToCgbObjPal0
ret
@@ -256,14 +253,10 @@ InitPokegearTilemap:
ret
.UpdateBGMap:
ldh a, [hCGB]
and a
jr z, .dmg
ld a, $2
ldh [hBGMapMode], a
ld c, 3
call DelayFrames
.dmg
call WaitBGMap
ret
@@ -1676,14 +1669,9 @@ _TownMap:
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
ldh a, [hCGB]
and a
jr z, .dmg
ld a, %11100100
call DmgToCgbObjPal0
call DelayFrame
.dmg
ld d, 0
ld e, 1
call .loop
@@ -2387,19 +2375,14 @@ TownMapBGUpdate:
ldh [hBGMapAddress], a
ld a, h
ldh [hBGMapAddress + 1], a
; Only update palettes on CGB
ldh a, [hCGB]
and a
jr z, .tiles
; BG Map mode 2 (palettes)
ld a, 2
ldh [hBGMapMode], a
; The BG Map is updated in thirds, so we wait
; 3 frames to update the whole screen's palettes.
ld c, 3
call DelayFrames
.tiles
; Update BG Map tiles
call WaitBGMap
; Turn off BG Map update