2013-09-09 19:33:03 +00:00
|
|
|
; Replaces the functionality of sgb.asm to work with CGB hardware.
|
|
|
|
|
|
|
|
CheckCGB: ; 8d55
|
|
|
|
ld a, [hCGB]
|
|
|
|
and a
|
|
|
|
ret
|
|
|
|
; 8d59
|
|
|
|
|
2015-07-22 20:36:28 +00:00
|
|
|
Predef_LoadSGBLayoutCGB: ; 8d59
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, b
|
2015-11-20 20:15:32 +00:00
|
|
|
cp SCGB_RAM
|
|
|
|
jr nz, .not_ram
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [SGBPredef]
|
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
|
2016-05-11 13:49:03 +00:00
|
|
|
call ResetBGPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld l, a
|
|
|
|
ld h, 0
|
|
|
|
add hl, hl
|
2015-12-27 02:59:03 +00:00
|
|
|
ld de, .dw
|
2013-09-09 19:33:03 +00:00
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2015-10-21 14:43:42 +00:00
|
|
|
ld de, .ReturnFromJumpTable
|
2013-09-09 19:33:03 +00:00
|
|
|
push de
|
2017-06-09 21:01:10 +00:00
|
|
|
jp hl
|
2013-09-09 19:33:03 +00:00
|
|
|
; 8d79
|
|
|
|
|
2015-10-21 14:43:42 +00:00
|
|
|
.ReturnFromJumpTable: ; 8d79
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 8d7a
|
|
|
|
|
2016-04-10 19:01:49 +00:00
|
|
|
.dw ; 8d7a
|
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
|
|
|
|
dw _CGB07
|
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
|
2015-11-13 05:49:27 +00:00
|
|
|
dw _CGB0c
|
|
|
|
dw _CGB0d
|
2016-06-06 22:23:00 +00:00
|
|
|
dw _CGB_MoveList
|
2015-11-13 05:49:27 +00:00
|
|
|
dw _CGB0f
|
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
|
2016-05-04 15:46:23 +00:00
|
|
|
dw _CGB_GamefreakLogo ; called before copyright
|
2016-05-14 02:46:32 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
; 8db8
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_BattleGrayscale: ; 8db8
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c66 + 1
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2017-12-11 01:50:08 +00:00
|
|
|
ld c, 4
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyPalettes
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c66 + 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
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyPalettes
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c66 + 1
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2017-12-11 01:50:08 +00:00
|
|
|
ld c, 2
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyPalettes
|
2015-12-28 15:57:04 +00:00
|
|
|
jr _CGB_FinishBattleScreenLayout
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_BattleColors: ; 8ddb
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetBattlemonBackpicPalettePointer
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
push hl
|
2017-12-11 01:50:08 +00:00
|
|
|
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [EnemyHPPal]
|
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
add hl, bc
|
2017-12-11 01:50:08 +00:00
|
|
|
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY_HP
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [PlayerHPPal]
|
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
pop hl
|
2017-12-11 01:50:08 +00:00
|
|
|
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_ENEMY
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [SGBPredef], a
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyPals
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_FinishBattleScreenLayout: ; 8e23
|
|
|
|
call InitPartyMenuBGPal7
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2017-12-11 01:50:08 +00:00
|
|
|
ld a, PAL_BATTLE_BG_ENEMY_HP
|
2013-09-09 19:33:03 +00:00
|
|
|
call ByteFill
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 4, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 0, AttrMap
|
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
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 7, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 11, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 12, AttrMap
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 8e85
|
|
|
|
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
InitPartyMenuBGPal7: ; 8e85
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall Function100dc0
|
2015-12-28 15:57:04 +00:00
|
|
|
Mobile_InitPartyMenuBGPal7: ; 8e8b
|
2014-03-02 06:22:33 +00:00
|
|
|
ld hl, Palette_b311
|
2015-12-26 23:11:55 +00:00
|
|
|
jr nc, .not_mobile
|
2014-03-02 06:22:33 +00:00
|
|
|
ld hl, Palette_b309
|
2015-12-26 23:11:55 +00:00
|
|
|
.not_mobile
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1 palette 7
|
2015-12-26 23:11:55 +00:00
|
|
|
ld bc, 1 palettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld a, BANK(wBGPals1)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
|
|
|
ret
|
|
|
|
; 8e9f
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
InitPartyMenuBGPal0: ; 8e9f
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall Function100dc0
|
2014-03-02 06:22:33 +00:00
|
|
|
ld hl, Palette_b311
|
2015-12-26 23:11:55 +00:00
|
|
|
jr nc, .not_mobile
|
2014-03-02 06:22:33 +00:00
|
|
|
ld hl, Palette_b309
|
2015-12-26 23:11:55 +00:00
|
|
|
.not_mobile
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1 palette 0
|
2015-12-26 23:11:55 +00:00
|
|
|
ld bc, 1 palettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld a, BANK(wBGPals1)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
|
|
|
ret
|
|
|
|
; 8eb9
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_PokegearPals: ; 8eb9
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2013-09-09 19:33:03 +00:00
|
|
|
bit 0, a
|
2015-12-28 15:57:04 +00:00
|
|
|
jr z, .male
|
|
|
|
ld hl, FemalePokegearPals
|
|
|
|
jr .got_pals
|
2013-09-09 19:33:03 +00:00
|
|
|
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 8edb
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_StatsScreenHPPals: ; 8edb
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2017-12-10 00:41:03 +00:00
|
|
|
ld a, [wCurHPPal]
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
add hl, bc
|
2017-12-11 01:50:08 +00:00
|
|
|
call LoadPalette_White_Col1_Col2_Black ; hp palette
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
ld bc, TempMonDVs
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
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
|
|
|
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 16, AttrMap
|
2015-12-17 02:57:42 +00:00
|
|
|
ld bc, 10
|
2017-12-11 01:50:08 +00:00
|
|
|
ld a, $2 ; exp palette
|
2013-09-09 19:33:03 +00:00
|
|
|
call ByteFill
|
2015-12-17 02:57:42 +00:00
|
|
|
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 13, 5, AttrMap
|
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
|
|
|
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 15, 5, AttrMap
|
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
|
|
|
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 17, 5, AttrMap
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 8f52
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
StatsScreenPagePals: ; 8f52
|
|
|
|
; pink
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 31, 31, 31
|
|
|
|
RGB 31, 19, 31
|
|
|
|
RGB 31, 15, 31
|
|
|
|
RGB 00, 00, 00
|
2017-12-11 01:50:08 +00:00
|
|
|
; green
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 31, 31, 31
|
|
|
|
RGB 21, 31, 14
|
|
|
|
RGB 17, 31, 00
|
|
|
|
RGB 00, 00, 00
|
2017-12-11 01:50:08 +00:00
|
|
|
; blue
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 31, 31, 31
|
|
|
|
RGB 17, 31, 31
|
|
|
|
RGB 17, 31, 31
|
|
|
|
RGB 00, 00, 00
|
|
|
|
; 8f6a
|
|
|
|
|
2015-12-23 03:19:33 +00:00
|
|
|
StatsScreenPals: ; 8f6a
|
2017-12-11 01:50:08 +00:00
|
|
|
; pink
|
2014-03-02 21:02:55 +00:00
|
|
|
RGB 31, 19, 31
|
2017-12-11 01:50:08 +00:00
|
|
|
; green
|
2014-03-02 21:02:55 +00:00
|
|
|
RGB 21, 31, 14
|
2017-12-11 01:50:08 +00:00
|
|
|
; blue
|
2014-03-02 21:02:55 +00:00
|
|
|
RGB 17, 31, 31
|
|
|
|
; 8f70
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-01-10 01:51:14 +00:00
|
|
|
_CGB_Pokedex: ; 8f70
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1d
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2017-12-11 01:50:08 +00:00
|
|
|
call LoadHLPaletteIntoDE ; dex interface palette
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 1, 1, AttrMap
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 8fba
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.PokedexQuestionMarkPalette: ; 8fba
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 11, 23, 00
|
|
|
|
RGB 07, 17, 00
|
|
|
|
RGB 06, 16, 03
|
|
|
|
RGB 05, 12, 01
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.PokedexCursorPalette: ; 8fc2
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 00, 00, 00
|
|
|
|
RGB 11, 23, 00
|
|
|
|
RGB 07, 17, 00
|
|
|
|
RGB 00, 00, 00
|
|
|
|
; 8fca
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_BillsPC: ; 8fca
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1d
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
cp $ff
|
2015-12-17 02:57:42 +00:00
|
|
|
jr nz, .GetMonPalette
|
2017-12-11 01:50:08 +00:00
|
|
|
ld hl, .BillsPCOrangePalette
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
jr .Resume
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.GetMonPalette:
|
2013-09-09 19:33:03 +00:00
|
|
|
ld bc, TempMonDVs
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetPlayerOrMonPalettePointer
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
2016-04-10 18:42:14 +00:00
|
|
|
.Resume:
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 1, 4, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 7, 7
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9009
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Function9009: ; 9009
|
|
|
|
ld hl, .BillsPCOrangePalette
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2014-03-02 21:02:55 +00:00
|
|
|
jr .asm_901a
|
|
|
|
|
2015-12-17 02:57:42 +00:00
|
|
|
.unused
|
2014-03-02 21:02:55 +00:00
|
|
|
ld bc, TempMonDVs
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetPlayerOrMonPalettePointer
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
2014-03-02 21:02:55 +00:00
|
|
|
.asm_901a
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 1, 1, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 7, 7
|
2014-03-02 21:02:55 +00:00
|
|
|
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
|
2014-03-02 21:02:55 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9036
|
2013-09-15 21:31:18 +00:00
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.BillsPCOrangePalette: ; 9036
|
2013-09-15 21:31:18 +00:00
|
|
|
RGB 31, 15, 00
|
|
|
|
RGB 23, 12, 00
|
|
|
|
RGB 15, 07, 00
|
|
|
|
RGB 00, 00, 00
|
|
|
|
; 903e
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-01-10 03:56:37 +00:00
|
|
|
_CGB_PokedexUnownMode: ; 903e
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1d
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetMonPalettePointer_
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 7, 5, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 7, 7
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 906e
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_SlotMachine: ; 906e
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 10, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $2
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 17, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 10, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $2
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 4, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 6, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $3
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 17, 4, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 6, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $3
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 6, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 2, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $4
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 17, 6, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 2, 3
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $4
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 4, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 2, 12
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 3, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 10, 1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 16, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 10, 1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 12, AttrMap
|
2015-12-17 02:57:42 +00:00
|
|
|
ld bc, $78
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $7
|
|
|
|
call ByteFill
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 90f8
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB06: ; 90f8
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9ca6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $3c
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 6, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 12, SCREEN_WIDTH
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9122
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB07: ; 9122
|
2014-03-02 21:02:55 +00:00
|
|
|
ld b, 0
|
2017-12-11 01:50:08 +00:00
|
|
|
ld hl, .Jumptable
|
2013-09-09 19:33:03 +00:00
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
add hl, bc
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2017-06-09 21:01:10 +00:00
|
|
|
jp hl
|
2013-09-09 19:33:03 +00:00
|
|
|
; 912d
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Jumptable: ; 912d
|
|
|
|
dw .Function9133
|
|
|
|
dw .Function9166
|
|
|
|
dw .Function9180
|
2014-03-02 21:02:55 +00:00
|
|
|
; 9133
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Function9133: ; 9133
|
|
|
|
ld hl, .Palette_914e
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2017-12-11 01:50:08 +00:00
|
|
|
ld hl, .Palette_9156
|
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)
|
2014-03-02 21:02:55 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2014-03-02 21:02:55 +00:00
|
|
|
ret
|
|
|
|
; 914e
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Palette_914e: ; 914e
|
2014-03-02 21:02:55 +00:00
|
|
|
RGB 19, 31, 19
|
|
|
|
RGB 18, 23, 31
|
|
|
|
RGB 11, 21, 28
|
|
|
|
RGB 04, 16, 24
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Palette_9156: ; 9156
|
2014-03-02 21:02:55 +00: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
|
|
|
|
; 9166
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Function9166: ; 9166
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2014-03-02 21:02:55 +00:00
|
|
|
ld a, $38
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2014-03-02 21:02:55 +00:00
|
|
|
ld a, $39
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2014-03-02 21:02:55 +00:00
|
|
|
ret
|
|
|
|
; 9180
|
|
|
|
|
2017-12-11 01:50:08 +00:00
|
|
|
.Function9180: ; 9180
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c36 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2014-03-02 21:02:55 +00:00
|
|
|
ld a, $3a
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2014-03-02 21:02:55 +00:00
|
|
|
ret
|
|
|
|
; 9195
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB11: ; 9195
|
2014-03-02 06:22:33 +00:00
|
|
|
ld hl, Palettes_b789
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyPals
|
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 91ad
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_Diploma: ; 91ad
|
|
|
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-28 15:57:04 +00:00
|
|
|
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9cb6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 91c8
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_MapPals: ; 91c8
|
2015-12-22 23:03:00 +00:00
|
|
|
call LoadMapPals
|
|
|
|
ld a, SCGB_MAPPALS
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [SGBPredef], a
|
|
|
|
ret
|
|
|
|
; 91d1
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_PartyMenu: ; 91d1
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c56 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 91e4
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_Evolution: ; 91e4
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, c
|
|
|
|
and a
|
2015-12-17 02:57:42 +00:00
|
|
|
jr z, .pokemon
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1a
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-09 23:25:44 +00:00
|
|
|
jr .got_palette
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2015-12-17 02:57:42 +00:00
|
|
|
.pokemon
|
2013-09-09 19:33:03 +00:00
|
|
|
ld hl, PartyMon1DVs
|
2015-11-04 16:19:58 +00:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartyMon]
|
|
|
|
call AddNTimes
|
|
|
|
ld c, l
|
|
|
|
ld b, h
|
|
|
|
ld a, [PlayerHPPal]
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9228
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB0c: ; 9228
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, Palettes_b6f1
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, Palettes_b719
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2016-06-06 22:23:00 +00:00
|
|
|
ld a, SCGB_DIPLOMA
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [SGBPredef], a
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9251
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB0d: ; 9251
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9cb6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 925e
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_UnownPuzzle: ; 925e
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9bc6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $4c
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [rSVBK]
|
|
|
|
push af
|
2018-01-01 14:08:21 +00:00
|
|
|
ld a, BANK(wOBPals1)
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [rSVBK], a
|
2018-01-01 14:08:21 +00:00
|
|
|
ld hl, wOBPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1f
|
|
|
|
ld [hli], a
|
|
|
|
ld a, $0
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
ld [rSVBK], a
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9289
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_TrainerCard: ; 9289
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $24
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
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
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
call ByteFill
|
2017-12-11 01:50:08 +00:00
|
|
|
; fill trainer sprite area with same-gender palette
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 14, 1, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 7, 5
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 18, 1, AttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [hl], $1
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 2, 11, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 6, 11, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 11, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 14, 11, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 2, 14, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 6, 14, AttrMap
|
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
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 14, AttrMap
|
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
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2013-09-09 19:33:03 +00:00
|
|
|
and a
|
|
|
|
push af
|
2015-12-17 02:57:42 +00:00
|
|
|
jr z, .got_gender3
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 14, 14, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 2, 4
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-12-17 02:57:42 +00:00
|
|
|
.got_gender3
|
2013-09-09 19:33:03 +00:00
|
|
|
pop af
|
|
|
|
ld c, $0
|
2015-12-17 02:57:42 +00:00
|
|
|
jr nz, .got_gender4
|
2013-09-09 19:33:03 +00:00
|
|
|
inc c
|
2015-12-17 02:57:42 +00:00
|
|
|
.got_gender4
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, c
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 18, 1, AttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ld [hl], a
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9373
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_MoveList: ; 9373
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $10
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [PlayerHPPal]
|
|
|
|
ld l, a
|
2014-03-02 21:02:55 +00:00
|
|
|
ld h, 0
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
add hl, bc
|
2015-12-17 02:57:42 +00:00
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 11, 1, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 2, 9
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 93a6
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB0f: ; 93a6
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9c46 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 93ba
|
|
|
|
|
2016-01-10 03:56:37 +00:00
|
|
|
_CGB_PokedexSearchOption: ; 93ba
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1d
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 93d3
|
|
|
|
|
2015-12-28 15:57:04 +00:00
|
|
|
_CGB_PackPals: ; 93d3
|
2015-12-17 02:57:42 +00:00
|
|
|
; pack pals
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [BattleType]
|
2014-06-14 05:53:20 +00:00
|
|
|
cp BATTLETYPE_TUTORIAL
|
2015-12-17 02:57:42 +00:00
|
|
|
jr z, .tutorial_male
|
2014-06-14 05:53:20 +00:00
|
|
|
|
2017-12-28 12:15:46 +00:00
|
|
|
ld a, [wPlayerGender]
|
2013-09-09 19:33:03 +00:00
|
|
|
bit 0, a
|
2015-12-17 02:57:42 +00:00
|
|
|
jr z, .tutorial_male
|
2014-06-14 05:53:20 +00:00
|
|
|
|
2015-12-22 23:03:00 +00:00
|
|
|
ld hl, .KrisPackPals
|
2015-12-17 02:57:42 +00:00
|
|
|
jr .got_gender
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2015-12-17 02:57:42 +00:00
|
|
|
.tutorial_male
|
2015-12-22 23:03:00 +00:00
|
|
|
ld hl, .ChrisPackPals
|
2013-09-09 19:33:03 +00:00
|
|
|
|
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)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 1, 10
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 10, 0, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 1, 10
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $2
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 7, 2, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 9, 1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $3
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 7, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 3, 5
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $4
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 3, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 3, 5
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 9439
|
|
|
|
|
2015-12-22 23:03:00 +00:00
|
|
|
.ChrisPackPals: ; 9439
|
2017-12-16 03:36:33 +00:00
|
|
|
INCLUDE "data/palettes/pack.pal"
|
2014-03-02 21:02:55 +00:00
|
|
|
; 9469
|
|
|
|
|
2015-12-22 23:03:00 +00:00
|
|
|
.KrisPackPals: ; 9469
|
2017-12-16 03:36:33 +00:00
|
|
|
INCLUDE "data/palettes/pack_f.pal"
|
2014-03-02 21:02:55 +00:00
|
|
|
; 9499
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-01-09 21:28:22 +00:00
|
|
|
_CGB_Pokepic: ; 9499
|
2015-12-28 15:57:04 +00:00
|
|
|
call _CGB_MapPals
|
2015-12-17 02:57:42 +00:00
|
|
|
ld de, SCREEN_WIDTH
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderTopCoord]
|
2015-12-17 02:57:42 +00:00
|
|
|
.loop
|
2013-09-09 19:33:03 +00:00
|
|
|
and a
|
2015-12-17 02:57:42 +00:00
|
|
|
jr z, .found_top
|
2013-09-09 19:33:03 +00:00
|
|
|
dec a
|
|
|
|
add hl, de
|
2015-12-17 02:57:42 +00:00
|
|
|
jr .loop
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2015-12-17 02:57:42 +00:00
|
|
|
.found_top
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderLeftCoord]
|
2013-09-09 19:33:03 +00:00
|
|
|
ld e, a
|
|
|
|
ld d, $0
|
|
|
|
add hl, de
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderTopCoord]
|
2013-09-09 19:33:03 +00:00
|
|
|
ld b, a
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderBottomCoord]
|
2013-09-09 19:33:03 +00:00
|
|
|
inc a
|
|
|
|
sub b
|
|
|
|
ld b, a
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderLeftCoord]
|
2013-09-09 19:33:03 +00:00
|
|
|
ld c, a
|
2015-10-24 14:34:19 +00:00
|
|
|
ld a, [wMenuBorderRightCoord]
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 94d0
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB13: ; 94d0
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9ba6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 4, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 10, SCREEN_WIDTH
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $2
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 0, 6, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 6, SCREEN_WIDTH
|
2013-09-09 19:33:03 +00:00
|
|
|
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
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [hCGBPalUpdate], a
|
|
|
|
ret
|
|
|
|
; 94fa
|
|
|
|
|
2016-05-04 15:46:23 +00:00
|
|
|
_CGB_GamefreakLogo: ; 94fa
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $4e
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-22 23:03:00 +00:00
|
|
|
ld hl, .Palette
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-22 23:03:00 +00:00
|
|
|
ld hl, .Palette
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1 palette 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9521
|
|
|
|
|
2015-12-22 23:03:00 +00:00
|
|
|
.Palette: ; 9521
|
2014-03-02 21:02:55 +00:00
|
|
|
RGB 31, 31, 31
|
|
|
|
RGB 13, 11, 00
|
|
|
|
RGB 23, 12, 28
|
|
|
|
RGB 00, 00, 00
|
|
|
|
; 9529
|
2013-09-09 19:33:03 +00:00
|
|
|
|
2016-05-14 02:46:32 +00:00
|
|
|
_CGB_PlayerOrMonFrontpicPals: ; 9529
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
ld bc, TempMonDVs
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetPlayerOrMonPalettePointer
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9542
|
|
|
|
|
2015-11-13 05:49:27 +00:00
|
|
|
_CGB1e: ; 9542
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetMonPalettePointer_
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9555
|
|
|
|
|
2016-05-14 02:46:32 +00:00
|
|
|
_CGB_TradeTube: ; 9555
|
2014-03-02 21:02:55 +00:00
|
|
|
ld hl, PalPacket_9cc6 + 1
|
2015-10-21 14:43:42 +00:00
|
|
|
call CopyFourPalettes
|
2017-12-16 03:36:33 +00:00
|
|
|
ld hl, PartyMenuOBPals
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1
|
2015-12-22 23:03:00 +00:00
|
|
|
ld bc, 1 palettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld a, BANK(wOBPals1)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wOBPals1 palette 7
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1c
|
2015-12-22 23:03:00 +00:00
|
|
|
call GetPredefPal
|
2015-10-21 14:43:42 +00:00
|
|
|
call LoadHLPaletteIntoDE
|
2015-12-17 02:57:42 +00:00
|
|
|
call WipeAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9578
|
|
|
|
|
2016-05-14 02:46:32 +00:00
|
|
|
_CGB_TrainerOrMonFrontpicPals: ; 9578
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
ld bc, TempMonDVs
|
2015-12-17 02:57:42 +00:00
|
|
|
call GetFrontpicPalettePointer
|
|
|
|
call LoadPalette_White_Col1_Col2_Black
|
|
|
|
call WipeAttrMap
|
|
|
|
call ApplyAttrMap
|
|
|
|
call ApplyPals
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 9591
|
|
|
|
|
2016-06-06 22:23:00 +00:00
|
|
|
_CGB_MysteryGift: ; 9591
|
2015-12-22 23:03:00 +00:00
|
|
|
ld hl, .Palettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld de, wBGPals1
|
2015-12-22 23:03:00 +00:00
|
|
|
ld bc, 2 palettes
|
2018-01-01 14:08:21 +00:00
|
|
|
ld a, BANK(wBGPals1)
|
2013-09-09 19:33:03 +00:00
|
|
|
call FarCopyWRAM
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyPals
|
|
|
|
call WipeAttrMap
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 3, 7, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 8, 14
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 1, 5, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 1, 18
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 1, 16, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 1, 18
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-07-22 19:57:02 +00:00
|
|
|
hlcoord 0, 0, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 17, 2
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-02-10 22:16:31 +00:00
|
|
|
hlcoord 18, 5, AttrMap
|
2015-11-13 05:49:27 +00:00
|
|
|
lb bc, 12, 1
|
2013-09-09 19:33:03 +00:00
|
|
|
ld a, $1
|
2015-11-13 05:49:27 +00:00
|
|
|
call FillBoxCGB
|
2015-12-17 02:57:42 +00:00
|
|
|
call ApplyAttrMap
|
2013-09-09 19:33:03 +00:00
|
|
|
ret
|
|
|
|
; 95e0
|
|
|
|
|
2015-12-22 23:03:00 +00:00
|
|
|
.Palettes: ; 95e0
|
2013-09-15 21:08:10 +00:00
|
|
|
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
|
|
|
|
; 95f0
|