Further remove unnecessary DMG/SGB checking (#7) and remove SGB layouts and palette data (#1)

This commit is contained in:
xCrystal
2023-07-26 17:01:20 +02:00
parent acd022d765
commit d30b9dd60f
68 changed files with 284 additions and 1826 deletions

View File

@@ -2654,7 +2654,7 @@ ForcePlayerMonChoice:
call ExitMenu
call LoadTilemapToTempTilemap
call WaitBGMap
call GetMemSGBLayout
call GetMemCGBLayout
call SetPalettes
xor a
ld c, a
@@ -2673,7 +2673,7 @@ ForcePlayerMonChoice:
call DelayFrame
call _LoadHPBar
call CloseWindow
call GetMemSGBLayout
call GetMemCGBLayout
call SetPalettes
call SendOutMonText
call NewBattleMonStatus
@@ -2815,8 +2815,8 @@ LostBattle:
jr nz, .LostLinkBattle
; Grayscale
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
ld b, CGB_BATTLE_GRAYSCALE
call GetCGBLayout
call SetPalettes
jr .end
@@ -4890,7 +4890,7 @@ BattleMenuPKMN_Loop:
call _LoadHPBar
call CloseWindow
call LoadTilemapToTempTilemap
call GetMemSGBLayout
call GetMemCGBLayout
call SetPalettes
jp BattleMenu
@@ -4970,7 +4970,7 @@ TryPlayerSwitch:
call ClearSprites
call _LoadHPBar
call CloseWindow
call GetMemSGBLayout
call GetMemCGBLayout
call SetPalettes
ld a, [wCurPartyMon]
ld [wCurBattleMon], a
@@ -6795,8 +6795,8 @@ FinishBattleAnim:
push bc
push de
push hl
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
ld b, CGB_BATTLE_COLORS
call GetCGBLayout
call SetPalettes
call DelayFrame
pop hl
@@ -7880,8 +7880,8 @@ BattleIntro:
farcall ClearBattleRAM
call InitEnemy
call BackUpBGMap2
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
ld b, CGB_BATTLE_GRAYSCALE
call GetCGBLayout
ld hl, rLCDC
res rLCDC_WINDOW_TILEMAP, [hl] ; select vBGMap0/vBGMap2
call InitBattleDisplay
@@ -8236,8 +8236,8 @@ _DisplayLinkRecord:
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
call WaitBGMap2
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
ld c, 8
call DelayFrames
@@ -8716,8 +8716,8 @@ InitBattleDisplay:
ldh [rWY], a
call WaitBGMap
call HideSprites
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
ld b, CGB_BATTLE_COLORS
call GetCGBLayout
call SetPalettes
ld a, $90
ldh [hWY], a

View File

@@ -27,8 +27,8 @@ BattleCommand_BatonPass:
hlcoord 1, 0
lb bc, 4, 10
call ClearBox
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
ld b, CGB_BATTLE_COLORS
call GetCGBLayout
call SetPalettes
call BatonPass_LinkPlayerSwitch

View File

@@ -12,7 +12,7 @@ _ReturnToBattle_UseBall:
.continue
farcall GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call GetMemCGBLayout
call CloseWindow
call LoadStandardMenuHeader
call WaitBGMap

View File

@@ -250,8 +250,8 @@ _ShowLinkBattleParticipants:
ld [hli], a
ld [hl], "<BOLD_S>"
farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
ld a, $e4
ldh [rOBP0], a

View File

@@ -1148,8 +1148,8 @@ BattleAnimCmd_BeatUp:
.done
pop af
ld [wCurPartySpecies], a
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
ld b, CGB_BATTLE_COLORS
call GetCGBLayout
pop af
ldh [rSVBK], a

View File

@@ -291,11 +291,6 @@ BattleBGEffect_CycleOBPalsGrayAndYellow:
dc 2, 1, 0, 0
db -2
.PalsSGB:
dc 3, 3, 0, 0
dc 3, 0, 0, 0
db -2
BattleBGEffect_CycleMidOBPalsGrayAndYellow:
ld de, .PalsCGB
call BattleBGEffect_GetNthDMGPal
@@ -307,11 +302,6 @@ BattleBGEffect_CycleMidOBPalsGrayAndYellow:
dc 3, 1, 2, 0
db -2
.PalsSGB:
dc 3, 3, 0, 0
dc 3, 0, 3, 0
db -2
BattleBGEffect_CycleBGPals_Inverted:
ld de, .Pals
call BattleBGEffect_GetNthDMGPal

View File

@@ -3410,8 +3410,6 @@ BattleAnimFunction_SkyAttack:
.GBCPals:
db $ff, $aa, $55, $aa
.SGBPals:
db $ff, $ff, $00, $00
BattleAnimFunction_GrowthSwordsDance:
; Moves object in a circle where the height is 1/8 the width, while also moving upward 2 pixels per frame

View File

@@ -600,8 +600,8 @@ DebugRoom_EditPagedValues:
inc a
ldh [hBGMapMode], a
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
.resume
call DelayFrame

View File

@@ -74,8 +74,8 @@ DisplayCaughtContestMonStats:
ld [wOptions], a
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
ret

View File

@@ -29,8 +29,8 @@ PlaceDiplomaOnScreen:
call PlaceString
call EnableLCD
call WaitBGMap
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
call SetPalettes
call DelayFrame
ret

View File

@@ -15,8 +15,8 @@ BlindingFlash:
set STATUSFLAGS_FLASH_F, [hl]
farcall ReplaceTimeOfDayPals
farcall UpdateTimeOfDayPal
ld b, SCGB_MAPPALS
call GetSGBLayout
ld b, CGB_MAPPALS
call GetCGBLayout
farcall LoadOW_BGPal7
farcall FadeInPalettes
ret

View File

@@ -254,8 +254,8 @@ AnimateHOFMonEntrance:
call WaitBGMap
xor a
ldh [hBGMapMode], a
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetCGBLayout
call SetPalettes
call HOF_SlideBackpic
xor a
@@ -387,8 +387,8 @@ _HallOfFamePC:
ld de, .EmptyString
call PlaceString
call WaitBGMap
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetCGBLayout
call SetPalettes
decoord 6, 5
ld c, ANIM_MON_HOF
@@ -541,8 +541,8 @@ HOF_AnimatePlayerPic:
xor a
ldh [hBGMapMode], a
ld [wCurPartySpecies], a
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
ld b, CGB_PLAYER_OR_MON_FRONTPIC_PALS
call GetCGBLayout
call SetPalettes
call HOF_SlideBackpic
xor a

View File

@@ -406,8 +406,8 @@ MagnetTrain_Jumptable_FirstRunThrough:
ld [wTimeOfDayPal], a
ld a, TOWN
ld [wEnvironment], a
ld b, SCGB_MAPPALS
call GetSGBLayout
ld b, CGB_MAPPALS
call GetCGBLayout
call UpdateTimePals
ldh a, [rBGP]

View File

@@ -3,8 +3,8 @@ MoveTutor:
call ClearBGPalettes
call ClearScreen
call DelayFrame
ld b, SCGB_PACKPALS
call GetSGBLayout
ld b, CGB_PACKPALS
call GetCGBLayout
xor a
ld [wItemAttributeValue], a
call .GetMoveTutorMove

View File

@@ -4,8 +4,8 @@ Pokepic::
call MenuBox
call UpdateSprites
call ApplyTilemap
ld b, SCGB_POKEPIC
call GetSGBLayout
ld b, CGB_POKEPIC
call GetCGBLayout
xor a
ldh [hBGMapMode], a
ld a, [wCurPartySpecies]
@@ -32,7 +32,7 @@ ClosePokepic::
call CopyMenuHeader
call ClearMenuBoxInterior
call WaitBGMap
call GetMemSGBLayout
call GetMemCGBLayout
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch

View File

@@ -62,8 +62,8 @@ _UnownPrinter:
ld [wTempMonDVs], a
ld [wTempMonDVs + 1], a
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
ld b, CGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetCGBLayout
call SetPalettes
.joy_loop

View File

@@ -37,8 +37,8 @@ OverworldBGMap:
ret
BattleBGMap:
ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout
ld b, CGB_BATTLE_GRAYSCALE
call GetCGBLayout
call SetPalettes
ret

View File

@@ -8,8 +8,8 @@ _MemoryGame:
.LoadGFXAndPals:
call DisableLCD
ld b, SCGB_DIPLOMA
call GetSGBLayout
ld b, CGB_DIPLOMA
call GetCGBLayout
callfar ClearSpriteAnims
ld hl, MemoryGameLZ
ld de, vTiles2 tile $00

View File

@@ -111,8 +111,8 @@ _SlotMachine:
ld bc, vBGMap1 - vBGMap0
ld a, " "
call ByteFill
ld b, SCGB_SLOT_MACHINE
call GetSGBLayout
ld b, CGB_SLOT_MACHINE
call GetCGBLayout
callfar ClearSpriteAnims
ld hl, wSlots
ld bc, wSlotsDataEnd - wSlots

View File

@@ -48,8 +48,8 @@ _UnownPuzzle:
ld a, %10010011
ldh [rLCDC], a
call WaitBGMap
ld b, SCGB_UNOWN_PUZZLE
call GetSGBLayout
ld b, CGB_UNOWN_PUZZLE
call GetCGBLayout
ld a, $e4
call DmgToCgbBGPals
ld a, $24

Some files were not shown because too many files have changed in this diff Show More