diff options
Diffstat (limited to 'engine/cgb_layouts.asm')
-rw-r--r-- | engine/cgb_layouts.asm | 160 |
1 files changed, 61 insertions, 99 deletions
diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm index 74d476dec..84fb6c9de 100644 --- a/engine/cgb_layouts.asm +++ b/engine/cgb_layouts.asm @@ -6,7 +6,7 @@ CheckCGB: ; 8d55 ret ; 8d59 -Predef_LoadSGBLayoutCGB: ; 8d59 +LoadSGBLayoutCGB: ; 8d59 ld a, b cp SCGB_RAM jr nz, .not_ram @@ -40,12 +40,12 @@ Predef_LoadSGBLayoutCGB: ; 8d59 dw _CGB_Pokedex dw _CGB_SlotMachine dw _CGB06 - dw _CGB07 + dw _CGB_GSIntro dw _CGB_Diploma dw _CGB_MapPals dw _CGB_PartyMenu dw _CGB_Evolution - dw _CGB0c + dw _CGB_GSTitleScreen dw _CGB0d dw _CGB_MoveList dw _CGB0f @@ -58,7 +58,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59 dw _CGB_PokedexUnownMode dw _CGB_BillsPC dw _CGB_UnownPuzzle - dw _CGB_GamefreakLogo ; called before copyright + dw _CGB_GamefreakLogo dw _CGB_PlayerOrMonFrontpicPals dw _CGB_TradeTube dw _CGB_TrainerOrMonFrontpicPals @@ -67,15 +67,15 @@ Predef_LoadSGBLayoutCGB: ; 8d59 ; 8db8 _CGB_BattleGrayscale: ; 8db8 - ld hl, PalPacket_9c66 + 1 + ld hl, PalPacket_BattleGrayscale + 1 ld de, wBGPals1 ld c, 4 call CopyPalettes - ld hl, PalPacket_9c66 + 1 + ld hl, PalPacket_BattleGrayscale + 1 ld de, wBGPals1 palette PAL_BATTLE_BG_EXP ld c, 4 call CopyPalettes - ld hl, PalPacket_9c66 + 1 + ld hl, PalPacket_BattleGrayscale + 1 ld de, wOBPals1 ld c, 2 call CopyPalettes @@ -158,9 +158,9 @@ _CGB_FinishBattleScreenLayout: ; 8e23 InitPartyMenuBGPal7: ; 8e85 farcall Function100dc0 Mobile_InitPartyMenuBGPal7: ; 8e8b - ld hl, Palette_b311 + ld hl, PartyMenuBGPalette jr nc, .not_mobile - ld hl, Palette_b309 + ld hl, PartyMenuBGMobilePalette .not_mobile ld de, wBGPals1 palette 7 ld bc, 1 palettes @@ -171,9 +171,9 @@ Mobile_InitPartyMenuBGPal7: ; 8e8b InitPartyMenuBGPal0: ; 8e9f farcall Function100dc0 - ld hl, Palette_b311 + ld hl, PartyMenuBGPalette jr nc, .not_mobile - ld hl, Palette_b309 + ld hl, PartyMenuBGMobilePalette .not_mobile ld de, wBGPals1 palette 0 ld bc, 1 palettes @@ -258,35 +258,16 @@ _CGB_StatsScreenHPPals: ; 8edb ; 8f52 StatsScreenPagePals: ; 8f52 -; pink - RGB 31, 31, 31 - RGB 31, 19, 31 - RGB 31, 15, 31 - RGB 00, 00, 00 -; green - RGB 31, 31, 31 - RGB 21, 31, 14 - RGB 17, 31, 00 - RGB 00, 00, 00 -; blue - RGB 31, 31, 31 - RGB 17, 31, 31 - RGB 17, 31, 31 - RGB 00, 00, 00 +INCLUDE "gfx/stats/pages.pal" ; 8f6a StatsScreenPals: ; 8f6a -; pink - RGB 31, 19, 31 -; green - RGB 21, 31, 14 -; blue - RGB 17, 31, 31 +INCLUDE "gfx/stats/stats.pal" ; 8f70 _CGB_Pokedex: ; 8f70 ld de, wBGPals1 - ld a, $1d + ld a, PREDEFPAL_POKEDEX call GetPredefPal call LoadHLPaletteIntoDE ; dex interface palette ld a, [CurPartySpecies] @@ -319,21 +300,16 @@ _CGB_Pokedex: ; 8f70 ; 8fba .PokedexQuestionMarkPalette: ; 8fba - RGB 11, 23, 00 - RGB 07, 17, 00 - RGB 06, 16, 03 - RGB 05, 12, 01 +INCLUDE "gfx/pokedex/question_mark.pal" +; 8fc2 .PokedexCursorPalette: ; 8fc2 - RGB 00, 00, 00 - RGB 11, 23, 00 - RGB 07, 17, 00 - RGB 00, 00, 00 +INCLUDE "gfx/pokedex/cursor.pal" ; 8fca _CGB_BillsPC: ; 8fca ld de, wBGPals1 - ld a, $1d + ld a, PREDEFPAL_POKEDEX call GetPredefPal call LoadHLPaletteIntoDE ld a, [CurPartySpecies] @@ -385,15 +361,12 @@ _CGB_BillsPC: ; 8fca ; 9036 .BillsPCOrangePalette: ; 9036 - RGB 31, 15, 00 - RGB 23, 12, 00 - RGB 15, 07, 00 - RGB 00, 00, 00 +INCLUDE "gfx/pc/orange.pal" ; 903e _CGB_PokedexUnownMode: ; 903e ld de, wBGPals1 - ld a, $1d + ld a, PREDEFPAL_POKEDEX call GetPredefPal call LoadHLPaletteIntoDE ld a, [CurPartySpecies] @@ -467,11 +440,11 @@ _CGB_SlotMachine: ; 906e ; 90f8 _CGB06: ; 90f8 - ld hl, PalPacket_9ca6 + 1 + ld hl, PalPacket_SCGB_06 + 1 call CopyFourPalettes call WipeAttrMap ld de, wOBPals1 - ld a, $3c + ld a, PREDEFPAL_PACK call GetPredefPal call LoadHLPaletteIntoDE hlcoord 0, 6, AttrMap @@ -485,7 +458,7 @@ _CGB06: ; 90f8 ret ; 9122 -_CGB07: ; 9122 +_CGB_GSIntro: ; 9122 ld b, 0 ld hl, .Jumptable add hl, bc @@ -497,16 +470,16 @@ _CGB07: ; 9122 ; 912d .Jumptable: ; 912d - dw .Function9133 - dw .Function9166 - dw .Function9180 + dw .ShellderLaprasScene + dw .JigglypuffPikachuScene + dw .StartersCharizardScene ; 9133 -.Function9133: ; 9133 - ld hl, .Palette_914e +.ShellderLaprasScene: ; 9133 + ld hl, .ShellderLaprasBGPalette ld de, wBGPals1 call LoadHLPaletteIntoDE - ld hl, .Palette_9156 + ld hl, .ShellderLaprasOBPals ld de, wOBPals1 ld bc, 2 palettes ld a, BANK(wOBPals1) @@ -515,13 +488,13 @@ _CGB07: ; 9122 ret ; 914e -.Palette_914e: ; 914e +.ShellderLaprasBGPalette: ; 914e RGB 19, 31, 19 RGB 18, 23, 31 RGB 11, 21, 28 RGB 04, 16, 24 -.Palette_9156: ; 9156 +.ShellderLaprasOBPals: ; 9156 RGB 29, 29, 29 RGB 20, 19, 20 RGB 19, 06, 04 @@ -533,25 +506,25 @@ _CGB07: ; 9122 RGB 03, 04, 06 ; 9166 -.Function9166: ; 9166 +.JigglypuffPikachuScene: ; 9166 ld de, wBGPals1 - ld a, $38 + ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG call GetPredefPal call LoadHLPaletteIntoDE ld de, wOBPals1 - ld a, $39 + ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB call GetPredefPal call LoadHLPaletteIntoDE call WipeAttrMap ret ; 9180 -.Function9180: ; 9180 - ld hl, PalPacket_9c36 + 1 +.StartersCharizardScene: ; 9180 + ld hl, PalPacket_Pack + 1 call CopyFourPalettes ld de, wOBPals1 - ld a, $3a + ld a, PREDEFPAL_GS_INTRO_STARTERS_TRANSITION call GetPredefPal call LoadHLPaletteIntoDE call WipeAttrMap @@ -559,7 +532,7 @@ _CGB07: ; 9122 ; 9195 _CGB11: ; 9195 - ld hl, Palettes_b789 + ld hl, Palettes_SCGB_11 ld de, wBGPals1 ld bc, 5 palettes ld a, BANK(wBGPals1) @@ -577,7 +550,7 @@ _CGB_Diploma: ; 91ad ld a, BANK(wBGPals1) call FarCopyWRAM - ld hl, PalPacket_9cb6 + 1 + ld hl, PalPacket_Diploma + 1 call CopyFourPalettes call WipeAttrMap call ApplyAttrMap @@ -592,7 +565,7 @@ _CGB_MapPals: ; 91c8 ; 91d1 _CGB_PartyMenu: ; 91d1 - ld hl, PalPacket_9c56 + 1 + ld hl, PalPacket_PartyMenu + 1 call CopyFourPalettes call InitPartyMenuBGPal0 call InitPartyMenuBGPal7 @@ -606,7 +579,7 @@ _CGB_Evolution: ; 91e4 ld a, c and a jr z, .pokemon - ld a, $1a + ld a, PREDEFPAL_BLACKOUT call GetPredefPal call LoadHLPaletteIntoDE jr .got_palette @@ -636,13 +609,13 @@ _CGB_Evolution: ; 91e4 ret ; 9228 -_CGB0c: ; 9228 - ld hl, Palettes_b6f1 +_CGB_GSTitleScreen: ; 9228 + ld hl, UnusedGSTitleBGPals ld de, wBGPals1 ld bc, 5 palettes ld a, BANK(wBGPals1) call FarCopyWRAM - ld hl, Palettes_b719 + ld hl, UnusedGSTitleOBPals ld de, wOBPals1 ld bc, 2 palettes ld a, BANK(wOBPals1) @@ -656,7 +629,7 @@ _CGB0c: ; 9228 ; 9251 _CGB0d: ; 9251 - ld hl, PalPacket_9cb6 + 1 + ld hl, PalPacket_Diploma + 1 call CopyFourPalettes call WipeAttrMap call ApplyAttrMap @@ -664,10 +637,10 @@ _CGB0d: ; 9251 ; 925e _CGB_UnownPuzzle: ; 925e - ld hl, PalPacket_9bc6 + 1 + ld hl, PalPacket_UnownPuzzle + 1 call CopyFourPalettes ld de, wOBPals1 - ld a, $4c + ld a, PREDEFPAL_UNOWN_PUZZLE call GetPredefPal call LoadHLPaletteIntoDE ld a, [rSVBK] @@ -675,9 +648,9 @@ _CGB_UnownPuzzle: ; 925e ld a, BANK(wOBPals1) ld [rSVBK], a ld hl, wOBPals1 - ld a, $1f + ld a, LOW(palred 31 + palgreen 0 + palblue 0) ld [hli], a - ld a, $0 + ld a, HIGH(palred 31 + palgreen 0 + palblue 0) ld [hl], a pop af ld [rSVBK], a @@ -712,7 +685,7 @@ _CGB_TrainerCard: ; 9289 ld a, PRYCE call GetTrainerPalettePointer call LoadPalette_White_Col1_Col2_Black - ld a, $24 + ld a, PREDEFPAL_CGB_BADGE call GetPredefPal call LoadHLPaletteIntoDE @@ -794,7 +767,7 @@ _CGB_TrainerCard: ; 9289 _CGB_MoveList: ; 9373 ld de, wBGPals1 - ld a, $10 + ld a, PREDEFPAL_GOLDENROD call GetPredefPal call LoadHLPaletteIntoDE ld a, [PlayerHPPal] @@ -818,7 +791,7 @@ _CGB_MoveList: ; 9373 ; 93a6 _CGB0f: ; 93a6 - ld hl, PalPacket_9c46 + 1 + ld hl, PalPacket_SCGB_0F + 1 call CopyFourPalettes call WipeAttrMap call ApplyAttrMap @@ -830,7 +803,7 @@ _CGB0f: ; 93a6 _CGB_PokedexSearchOption: ; 93ba ld de, wBGPals1 - ld a, $1d + ld a, PREDEFPAL_POKEDEX call GetPredefPal call LoadHLPaletteIntoDE call WipeAttrMap @@ -891,11 +864,11 @@ _CGB_PackPals: ; 93d3 ; 9439 .ChrisPackPals: ; 9439 -INCLUDE "data/palettes/pack.pal" +INCLUDE "gfx/pack/pack.pal" ; 9469 .KrisPackPals: ; 9469 -INCLUDE "data/palettes/pack_f.pal" +INCLUDE "gfx/pack/pack_f.pal" ; 9499 _CGB_Pokepic: ; 9499 @@ -934,7 +907,7 @@ _CGB_Pokepic: ; 9499 ; 94d0 _CGB13: ; 94d0 - ld hl, PalPacket_9ba6 + 1 + ld hl, PalPacket_SCGB_13 + 1 call CopyFourPalettes call WipeAttrMap hlcoord 0, 4, AttrMap @@ -954,7 +927,7 @@ _CGB13: ; 94d0 _CGB_GamefreakLogo: ; 94fa ld de, wBGPals1 - ld a, $4e + ld a, PREDEFPAL_GAMEFREAK_LOGO call GetPredefPal call LoadHLPaletteIntoDE ld hl, .Palette @@ -970,10 +943,7 @@ _CGB_GamefreakLogo: ; 94fa ; 9521 .Palette: ; 9521 - RGB 31, 31, 31 - RGB 13, 11, 00 - RGB 23, 12, 28 - RGB 00, 00, 00 +INCLUDE "gfx/splash/logo.pal" ; 9529 _CGB_PlayerOrMonFrontpicPals: ; 9529 @@ -999,7 +969,7 @@ _CGB1e: ; 9542 ; 9555 _CGB_TradeTube: ; 9555 - ld hl, PalPacket_9cc6 + 1 + ld hl, PalPacket_TradeTube + 1 call CopyFourPalettes ld hl, PartyMenuOBPals ld de, wOBPals1 @@ -1007,7 +977,7 @@ _CGB_TradeTube: ; 9555 ld a, BANK(wOBPals1) call FarCopyWRAM ld de, wOBPals1 palette 7 - ld a, $1c + ld a, PREDEFPAL_TRADE_TUBE call GetPredefPal call LoadHLPaletteIntoDE call WipeAttrMap @@ -1059,13 +1029,5 @@ _CGB_MysteryGift: ; 9591 ; 95e0 .Palettes: ; 95e0 - RGB 31, 31, 31 - RGB 16, 31, 14 - RGB 05, 14, 21 - RGB 05, 13, 10 - - RGB 31, 31, 31 - RGB 11, 21, 25 - RGB 05, 14, 21 - RGB 00, 03, 19 +INCLUDE "gfx/mystery_gift/mystery_gift.pal" ; 95f0 |