pokecrystal/engine/gfx/cgb_layouts.asm

982 lines
18 KiB
NASM
Raw Normal View History

; Replaces the functionality of sgb.asm to work with CGB hardware.
2018-06-24 14:09:41 +00:00
CheckCGB:
ld a, [hCGB]
and a
ret
2018-06-24 14:09:41 +00:00
LoadSGBLayoutCGB:
ld a, b
2015-11-20 20:15:32 +00:00
cp SCGB_RAM
jr nz, .not_ram
2018-01-23 22:39:09 +00:00
ld a, [wSGBPredef]
2015-11-20 20:15:32 +00:00
.not_ram
2015-12-23 03:19:33 +00:00
cp SCGB_PARTY_MENU_HP_PALS
jp z, CGB_ApplyPartyMenuHPPals
call ResetBGPals
ld l, a
ld h, 0
add hl, hl
2015-12-27 02:59:03 +00:00
ld de, .dw
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
ld de, .ReturnFromJumpTable
push de
jp hl
2018-06-24 14:09:41 +00:00
.ReturnFromJumpTable:
ret
2018-06-24 14:09:41 +00:00
.dw
2015-12-28 15:57:04 +00:00
dw _CGB_BattleGrayscale
dw _CGB_BattleColors
dw _CGB_PokegearPals
dw _CGB_StatsScreenHPPals
2016-01-10 01:51:14 +00:00
dw _CGB_Pokedex
2015-12-28 15:57:04 +00:00
dw _CGB_SlotMachine
2015-11-13 05:49:27 +00:00
dw _CGB06
2018-01-18 05:16:03 +00:00
dw _CGB_GSIntro
2016-06-06 22:23:00 +00:00
dw _CGB_Diploma
2015-12-28 15:57:04 +00:00
dw _CGB_MapPals
2016-06-06 22:23:00 +00:00
dw _CGB_PartyMenu
dw _CGB_Evolution
2018-01-18 05:16:03 +00:00
dw _CGB_GSTitleScreen
2015-11-13 05:49:27 +00:00
dw _CGB0d
2016-06-06 22:23:00 +00:00
dw _CGB_MoveList
dw _CGB_BetaPikachuMinigame
2016-01-10 03:56:37 +00:00
dw _CGB_PokedexSearchOption
2015-11-13 05:49:27 +00:00
dw _CGB11
2016-01-09 21:28:22 +00:00
dw _CGB_Pokepic
2015-11-13 05:49:27 +00:00
dw _CGB13
2015-12-28 15:57:04 +00:00
dw _CGB_PackPals
dw _CGB_TrainerCard
2016-01-10 03:56:37 +00:00
dw _CGB_PokedexUnownMode
2016-06-06 22:23:00 +00:00
dw _CGB_BillsPC
dw _CGB_UnownPuzzle
2018-01-18 05:16:03 +00:00
dw _CGB_GamefreakLogo
dw _CGB_PlayerOrMonFrontpicPals
dw _CGB_TradeTube
dw _CGB_TrainerOrMonFrontpicPals
2016-06-06 22:23:00 +00:00
dw _CGB_MysteryGift
2015-11-13 05:49:27 +00:00
dw _CGB1e
2018-06-24 14:09:41 +00:00
_CGB_BattleGrayscale:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_BattleGrayscale + 1
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-11 01:50:08 +00:00
ld c, 4
call CopyPalettes
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_BattleGrayscale + 1
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette PAL_BATTLE_BG_EXP
2017-12-11 01:50:08 +00:00
ld c, 4
call CopyPalettes
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_BattleGrayscale + 1
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2017-12-11 01:50:08 +00:00
ld c, 2
call CopyPalettes
2015-12-28 15:57:04 +00:00
jr _CGB_FinishBattleScreenLayout
2018-06-24 14:09:41 +00:00
_CGB_BattleColors:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
call GetBattlemonBackpicPalettePointer
push hl
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER
2015-12-17 02:57:42 +00:00
call GetEnemyFrontpicPalettePointer
push hl
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY
2018-01-23 22:39:09 +00:00
ld a, [wEnemyHPPal]
ld l, a
ld h, $0
add hl, hl
2015-12-27 02:59:03 +00:00
add hl, hl
2017-12-16 03:36:33 +00:00
ld bc, HPBarPals
add hl, bc
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY_HP
2018-01-23 22:39:09 +00:00
ld a, [wPlayerHPPal]
ld l, a
ld h, $0
add hl, hl
2015-12-27 02:59:03 +00:00
add hl, hl
2017-12-16 03:36:33 +00:00
ld bc, HPBarPals
add hl, bc
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER_HP
2017-12-16 03:36:33 +00:00
ld hl, ExpBarPalette
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_EXP
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
pop hl
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_ENEMY
pop hl
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_PLAYER
2015-12-28 15:57:04 +00:00
ld a, SCGB_BATTLE_COLORS
2018-01-23 22:39:09 +00:00
ld [wSGBPredef], a
2015-12-17 02:57:42 +00:00
call ApplyPals
2018-06-24 14:09:41 +00:00
_CGB_FinishBattleScreenLayout:
2015-12-28 15:57:04 +00:00
call InitPartyMenuBGPal7
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_ENEMY_HP
call ByteFill
2018-01-23 22:39:09 +00:00
hlcoord 0, 4, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 8, 10
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_PLAYER
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 10
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_ENEMY
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 4, 10
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_ENEMY_HP
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 7, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 5, 10
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_PLAYER_HP
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 11, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 1, 9
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_EXP
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 12, wAttrMap
2015-11-16 21:01:45 +00:00
ld bc, 6 * SCREEN_WIDTH
2017-12-11 01:50:08 +00:00
ld a, PAL_BATTLE_BG_TEXT
call ByteFill
2017-12-25 17:41:31 +00:00
ld hl, BattleObjectPals
2018-01-01 14:08:21 +00:00
ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY
2015-12-28 15:57:04 +00:00
ld bc, 6 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
InitPartyMenuBGPal7:
2017-12-24 17:47:30 +00:00
farcall Function100dc0
2018-06-24 14:09:41 +00:00
Mobile_InitPartyMenuBGPal7:
2018-01-18 16:37:05 +00:00
ld hl, PartyMenuBGPalette
jr nc, .not_mobile
2018-01-18 16:37:05 +00:00
ld hl, PartyMenuBGMobilePalette
.not_mobile
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette 7
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
2018-06-24 14:09:41 +00:00
InitPartyMenuBGPal0:
2017-12-24 17:47:30 +00:00
farcall Function100dc0
2018-01-18 16:37:05 +00:00
ld hl, PartyMenuBGPalette
jr nc, .not_mobile
2018-01-18 16:37:05 +00:00
ld hl, PartyMenuBGMobilePalette
.not_mobile
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette 0
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
2018-06-24 14:09:41 +00:00
_CGB_PokegearPals:
ld a, [wPlayerGender]
2018-01-22 19:34:55 +00:00
bit PLAYERGENDER_FEMALE_F, a
2015-12-28 15:57:04 +00:00
jr z, .male
ld hl, FemalePokegearPals
jr .got_pals
2015-12-28 15:57:04 +00:00
.male
ld hl, MalePokegearPals
.got_pals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 6 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_StatsScreenHPPals:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-10 00:41:03 +00:00
ld a, [wCurHPPal]
ld l, a
ld h, $0
add hl, hl
2015-12-27 02:59:03 +00:00
add hl, hl
2017-12-16 03:36:33 +00:00
ld bc, HPBarPals
add hl, bc
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; hp palette
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
2015-12-17 02:57:42 +00:00
call GetPlayerOrMonPalettePointer
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; mon palette
2017-12-16 03:36:33 +00:00
ld hl, ExpBarPalette
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; exp palette
ld hl, StatsScreenPagePals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1 palette 3
2017-12-11 01:50:08 +00:00
ld bc, 3 palettes ; pink, green, and blue page palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 8, SCREEN_WIDTH
2017-12-11 01:50:08 +00:00
ld a, $1 ; mon palette
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
2018-01-23 22:39:09 +00:00
hlcoord 10, 16, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, 10
2017-12-11 01:50:08 +00:00
ld a, $2 ; exp palette
call ByteFill
2015-12-17 02:57:42 +00:00
2018-01-23 22:39:09 +00:00
hlcoord 13, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 2
2017-12-11 01:50:08 +00:00
ld a, $3 ; pink page palette
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
2018-01-23 22:39:09 +00:00
hlcoord 15, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 2
2017-12-11 01:50:08 +00:00
ld a, $4 ; green page palette
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
2018-01-23 22:39:09 +00:00
hlcoord 17, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 2
2017-12-11 01:50:08 +00:00
ld a, $5 ; blue page palette
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
StatsScreenPagePals:
INCLUDE "gfx/stats/pages.pal"
2018-06-24 14:09:41 +00:00
StatsScreenPals:
INCLUDE "gfx/stats/stats.pal"
2018-06-24 14:09:41 +00:00
_CGB_Pokedex:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
2017-12-11 01:50:08 +00:00
call LoadHLPaletteIntoDE ; dex interface palette
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
cp $ff
2015-12-28 15:57:04 +00:00
jr nz, .is_pokemon
2017-12-11 01:50:08 +00:00
ld hl, .PokedexQuestionMarkPalette
call LoadHLPaletteIntoDE ; green question mark palette
2015-12-28 15:57:04 +00:00
jr .got_palette
2015-12-28 15:57:04 +00:00
.is_pokemon
2015-12-17 02:57:42 +00:00
call GetMonPalettePointer_
2017-12-11 01:50:08 +00:00
call LoadPalette_White_Col1_Col2_Black ; mon palette
2015-12-28 15:57:04 +00:00
.got_palette
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 1, 1, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 7
2017-12-11 01:50:08 +00:00
ld a, $1 ; green question mark palette
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-28 15:57:04 +00:00
call InitPartyMenuOBPals
2017-12-11 01:50:08 +00:00
ld hl, .PokedexCursorPalette
2018-01-01 14:08:21 +00:00
ld de, wOBPals1 palette 7 ; green cursor palette
2015-12-17 02:57:42 +00:00
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
.PokedexQuestionMarkPalette:
INCLUDE "gfx/pokedex/question_mark.pal"
2018-06-24 14:09:41 +00:00
.PokedexCursorPalette:
INCLUDE "gfx/pokedex/cursor.pal"
2018-06-24 14:09:41 +00:00
_CGB_BillsPC:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
call LoadHLPaletteIntoDE
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
cp $ff
2015-12-17 02:57:42 +00:00
jr nz, .GetMonPalette
2017-12-11 01:50:08 +00:00
ld hl, .BillsPCOrangePalette
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
jr .Resume
.GetMonPalette:
2018-01-23 22:39:09 +00:00
ld bc, wTempMonDVs
2015-12-17 02:57:42 +00:00
call GetPlayerOrMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
.Resume:
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 1, 4, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 7
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-28 15:57:04 +00:00
call InitPartyMenuOBPals
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
.Function9009:
2017-12-11 01:50:08 +00:00
ld hl, .BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .asm_901a
2015-12-17 02:57:42 +00:00
.unused
2018-01-23 22:39:09 +00:00
ld bc, wTempMonDVs
2015-12-17 02:57:42 +00:00
call GetPlayerOrMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
.asm_901a
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 1, 1, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 7
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-28 15:57:04 +00:00
call InitPartyMenuOBPals
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
.BillsPCOrangePalette:
INCLUDE "gfx/pc/orange.pal"
2018-06-24 14:09:41 +00:00
_CGB_PokedexUnownMode:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
call LoadHLPaletteIntoDE
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
2015-12-17 02:57:42 +00:00
call GetMonPalettePointer_
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 7, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 7
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-28 15:57:04 +00:00
call InitPartyMenuOBPals
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_SlotMachine:
2017-12-11 01:50:08 +00:00
ld hl, SlotMachinePals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-11 01:50:08 +00:00
ld bc, 16 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 0, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 10, 3
ld a, $2
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 17, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 10, 3
ld a, $2
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 4, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 6, 3
ld a, $3
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 17, 4, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 6, 3
ld a, $3
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 6, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 3
ld a, $4
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 17, 6, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 3
ld a, $4
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 4, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 12
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 3, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 10, 1
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 16, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 10, 1
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 12, wAttrMap
2015-12-17 02:57:42 +00:00
ld bc, $78
ld a, $7
call ByteFill
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB06:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_SCGB_06 + 1
call CopyFourPalettes
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2018-01-18 20:06:43 +00:00
ld a, PREDEFPAL_PACK
call GetPredefPal
call LoadHLPaletteIntoDE
2018-01-23 22:39:09 +00:00
hlcoord 0, 6, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 12, SCREEN_WIDTH
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_GSIntro:
ld b, 0
2017-12-11 01:50:08 +00:00
ld hl, .Jumptable
add hl, bc
2015-12-27 02:59:03 +00:00
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
2018-06-24 14:09:41 +00:00
.Jumptable:
2018-01-18 05:16:03 +00:00
dw .ShellderLaprasScene
dw .JigglypuffPikachuScene
dw .StartersCharizardScene
2018-06-24 14:09:41 +00:00
.ShellderLaprasScene:
2018-01-18 05:16:03 +00:00
ld hl, .ShellderLaprasBGPalette
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
call LoadHLPaletteIntoDE
2018-01-18 05:16:03 +00:00
ld hl, .ShellderLaprasOBPals
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2015-12-17 02:57:42 +00:00
ld bc, 2 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call WipeAttrMap
ret
2018-06-24 14:09:41 +00:00
.ShellderLaprasBGPalette:
RGB 19, 31, 19
RGB 18, 23, 31
RGB 11, 21, 28
RGB 04, 16, 24
2018-06-24 14:09:41 +00:00
.ShellderLaprasOBPals:
RGB 29, 29, 29
RGB 20, 19, 20
RGB 19, 06, 04
RGB 03, 04, 06
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 00, 00
RGB 03, 04, 06
2018-06-24 14:09:41 +00:00
.JigglypuffPikachuScene:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
call WipeAttrMap
ret
2018-06-24 14:09:41 +00:00
.StartersCharizardScene:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_Pack + 1
call CopyFourPalettes
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2018-01-18 20:06:43 +00:00
ld a, PREDEFPAL_GS_INTRO_STARTERS_TRANSITION
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
call WipeAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB11:
ld hl, BetaPokerPals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 5 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call ApplyPals
call WipeAttrMap
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_Diploma:
2016-06-06 22:23:00 +00:00
ld hl, DiplomaPalettes
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 16 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-28 15:57:04 +00:00
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_MapPals:
call LoadMapPals
ld a, SCGB_MAPPALS
2018-01-23 22:39:09 +00:00
ld [wSGBPredef], a
ret
2018-06-24 14:09:41 +00:00
_CGB_PartyMenu:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_PartyMenu + 1
call CopyFourPalettes
2015-12-28 15:57:04 +00:00
call InitPartyMenuBGPal0
call InitPartyMenuBGPal7
call InitPartyMenuOBPals
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_Evolution:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
ld a, c
and a
2015-12-17 02:57:42 +00:00
jr z, .pokemon
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_BLACKOUT
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-09 23:25:44 +00:00
jr .got_palette
2015-12-17 02:57:42 +00:00
.pokemon
2018-01-23 22:39:09 +00:00
ld hl, wPartyMon1DVs
ld bc, PARTYMON_STRUCT_LENGTH
2018-01-23 22:39:09 +00:00
ld a, [wCurPartyMon]
call AddNTimes
ld c, l
ld b, h
2018-01-23 22:39:09 +00:00
ld a, [wPlayerHPPal]
2015-12-17 02:57:42 +00:00
call GetPlayerOrMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-25 17:41:31 +00:00
ld hl, BattleObjectPals
2018-01-01 14:08:21 +00:00
ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY
2015-12-09 23:25:44 +00:00
ld bc, 6 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2015-12-09 23:25:44 +00:00
.got_palette
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_GSTitleScreen:
2018-01-18 05:16:03 +00:00
ld hl, UnusedGSTitleBGPals
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 5 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2018-01-18 05:16:03 +00:00
ld hl, UnusedGSTitleOBPals
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2015-12-17 02:57:42 +00:00
ld bc, 2 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2016-06-06 22:23:00 +00:00
ld a, SCGB_DIPLOMA
2018-01-23 22:39:09 +00:00
ld [wSGBPredef], a
2015-12-17 02:57:42 +00:00
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB0d:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_UnownPuzzle:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_UnownPuzzle + 1
call CopyFourPalettes
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_UNOWN_PUZZLE
call GetPredefPal
call LoadHLPaletteIntoDE
ld a, [rSVBK]
push af
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
ld [rSVBK], a
2018-01-01 14:08:21 +00:00
ld hl, wOBPals1
2018-01-18 05:16:03 +00:00
ld a, LOW(palred 31 + palgreen 0 + palblue 0)
ld [hli], a
2018-01-18 05:16:03 +00:00
ld a, HIGH(palred 31 + palgreen 0 + palblue 0)
ld [hl], a
pop af
ld [rSVBK], a
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_TrainerCard:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-11 01:50:08 +00:00
xor a ; CHRIS
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, FALKNER ; KRIS
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, BUGSY
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, WHITNEY
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, MORTY
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, CHUCK
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, JASMINE
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
2017-12-11 01:50:08 +00:00
ld a, PRYCE
2015-12-17 02:57:42 +00:00
call GetTrainerPalettePointer
call LoadPalette_White_Col1_Col2_Black
ld a, PREDEFPAL_CGB_BADGE
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
2017-12-11 01:50:08 +00:00
; fill screen with opposite-gender palette for the card border
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, [wPlayerGender]
and a
2017-12-11 01:50:08 +00:00
ld a, $1 ; kris
2015-12-17 02:57:42 +00:00
jr z, .got_gender
2017-12-11 01:50:08 +00:00
ld a, $0 ; chris
2015-12-17 02:57:42 +00:00
.got_gender
call ByteFill
2017-12-11 01:50:08 +00:00
; fill trainer sprite area with same-gender palette
2018-01-23 22:39:09 +00:00
hlcoord 14, 1, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 7, 5
ld a, [wPlayerGender]
and a
2017-12-11 01:50:08 +00:00
ld a, $0 ; chris
2015-12-17 02:57:42 +00:00
jr z, .got_gender2
2017-12-11 01:50:08 +00:00
ld a, $1 ; kris
2015-12-17 02:57:42 +00:00
.got_gender2
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2017-12-11 01:50:08 +00:00
; top-right corner still uses the border's palette
2018-01-23 22:39:09 +00:00
hlcoord 18, 1, wAttrMap
ld [hl], $1
2018-01-23 22:39:09 +00:00
hlcoord 2, 11, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $1 ; falkner
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 6, 11, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $2 ; bugsy
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 11, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $3 ; whitney
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 14, 11, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $4 ; morty
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 2, 14, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $5 ; chuck
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 6, 14, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $6 ; jasmine
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 14, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
2017-12-11 01:50:08 +00:00
ld a, $7 ; pryce
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2017-12-11 01:50:08 +00:00
; clair uses kris's palette
ld a, [wPlayerGender]
and a
push af
2015-12-17 02:57:42 +00:00
jr z, .got_gender3
2018-01-23 22:39:09 +00:00
hlcoord 14, 14, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 4
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
.got_gender3
pop af
ld c, $0
2015-12-17 02:57:42 +00:00
jr nz, .got_gender4
inc c
2015-12-17 02:57:42 +00:00
.got_gender4
ld a, c
2018-01-23 22:39:09 +00:00
hlcoord 18, 1, wAttrMap
ld [hl], a
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_MoveList:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 03:48:57 +00:00
ld a, PREDEFPAL_GOLDENROD
call GetPredefPal
call LoadHLPaletteIntoDE
2018-01-23 22:39:09 +00:00
ld a, [wPlayerHPPal]
ld l, a
ld h, 0
add hl, hl
2015-12-27 02:59:03 +00:00
add hl, hl
2017-12-16 03:36:33 +00:00
ld bc, HPBarPals
add hl, bc
2015-12-17 02:57:42 +00:00
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 11, 1, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 2, 9
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_BetaPikachuMinigame:
ld hl, PalPacket_BetaPikachuMinigame + 1
call CopyFourPalettes
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_PokedexSearchOption:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_PackPals:
2015-12-17 02:57:42 +00:00
; pack pals
2018-01-23 22:39:09 +00:00
ld a, [wBattleType]
cp BATTLETYPE_TUTORIAL
2015-12-17 02:57:42 +00:00
jr z, .tutorial_male
ld a, [wPlayerGender]
2018-01-22 19:34:55 +00:00
bit PLAYERGENDER_FEMALE_F, a
2015-12-17 02:57:42 +00:00
jr z, .tutorial_male
ld hl, .KrisPackPals
2015-12-17 02:57:42 +00:00
jr .got_gender
2015-12-17 02:57:42 +00:00
.tutorial_male
ld hl, .ChrisPackPals
2015-12-17 02:57:42 +00:00
.got_gender
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2015-12-17 02:57:42 +00:00
ld bc, 8 palettes ; 6 palettes?
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 1, 10
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 10, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 1, 10
ld a, $2
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 7, 2, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 9, 1
ld a, $3
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 7, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 3, 5
ld a, $4
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 3, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 3, 5
ld a, $5
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
.ChrisPackPals:
INCLUDE "gfx/pack/pack.pal"
2018-06-24 14:09:41 +00:00
.KrisPackPals:
INCLUDE "gfx/pack/pack_f.pal"
2018-06-24 14:09:41 +00:00
_CGB_Pokepic:
2015-12-28 15:57:04 +00:00
call _CGB_MapPals
2015-12-17 02:57:42 +00:00
ld de, SCREEN_WIDTH
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderTopCoord]
2015-12-17 02:57:42 +00:00
.loop
and a
2015-12-17 02:57:42 +00:00
jr z, .found_top
dec a
add hl, de
2015-12-17 02:57:42 +00:00
jr .loop
2015-12-17 02:57:42 +00:00
.found_top
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderLeftCoord]
ld e, a
ld d, $0
add hl, de
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderTopCoord]
ld b, a
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderBottomCoord]
inc a
sub b
ld b, a
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderLeftCoord]
ld c, a
2015-10-24 14:34:19 +00:00
ld a, [wMenuBorderRightCoord]
sub c
inc a
ld c, a
ld a, $0
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB13:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_SCGB_13 + 1
call CopyFourPalettes
2015-12-17 02:57:42 +00:00
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 0, 4, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 10, SCREEN_WIDTH
ld a, $2
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 6, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 6, SCREEN_WIDTH
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
call ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
2018-06-24 14:09:41 +00:00
_CGB_GamefreakLogo:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_GAMEFREAK_LOGO
call GetPredefPal
call LoadHLPaletteIntoDE
ld hl, .Palette
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
call LoadHLPaletteIntoDE
ld hl, .Palette
2018-01-01 14:08:21 +00:00
ld de, wOBPals1 palette 1
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ret
2018-06-24 14:09:41 +00:00
.Palette:
INCLUDE "gfx/splash/logo.pal"
2018-06-24 14:09:41 +00:00
_CGB_PlayerOrMonFrontpicPals:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
2015-12-17 02:57:42 +00:00
call GetPlayerOrMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ret
2018-06-24 14:09:41 +00:00
_CGB1e:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
2015-12-17 02:57:42 +00:00
call GetMonPalettePointer_
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_TradeTube:
2018-01-18 05:16:03 +00:00
ld hl, PalPacket_TradeTube + 1
call CopyFourPalettes
2017-12-16 03:36:33 +00:00
ld hl, PartyMenuOBPals
2018-01-01 14:08:21 +00:00
ld de, wOBPals1
ld bc, 1 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wOBPals1)
call FarCopyWRAM
2018-01-01 14:08:21 +00:00
ld de, wOBPals1 palette 7
2018-01-18 05:16:03 +00:00
ld a, PREDEFPAL_TRADE_TUBE
call GetPredefPal
call LoadHLPaletteIntoDE
2015-12-17 02:57:42 +00:00
call WipeAttrMap
ret
2018-06-24 14:09:41 +00:00
_CGB_TrainerOrMonFrontpicPals:
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-23 22:39:09 +00:00
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
2015-12-17 02:57:42 +00:00
call GetFrontpicPalettePointer
call LoadPalette_White_Col1_Col2_Black
call WipeAttrMap
call ApplyAttrMap
call ApplyPals
ret
2018-06-24 14:09:41 +00:00
_CGB_MysteryGift:
ld hl, .Palettes
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
ld bc, 2 palettes
2018-01-01 14:08:21 +00:00
ld a, BANK(wBGPals1)
call FarCopyWRAM
2015-12-17 02:57:42 +00:00
call ApplyPals
call WipeAttrMap
2018-01-23 22:39:09 +00:00
hlcoord 3, 7, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 8, 14
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 1, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 1, 18
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 1, 16, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 1, 18
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 0, 0, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 17, 2
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2018-01-23 22:39:09 +00:00
hlcoord 18, 5, wAttrMap
2015-11-13 05:49:27 +00:00
lb bc, 12, 1
ld a, $1
2015-11-13 05:49:27 +00:00
call FillBoxCGB
2015-12-17 02:57:42 +00:00
call ApplyAttrMap
ret
2018-06-24 14:09:41 +00:00
.Palettes:
INCLUDE "gfx/mystery_gift/mystery_gift.pal"