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