mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-11-06 05:30:59 +13:00
SGB Pokegear Palette
This commit is contained in:
parent
a898be1634
commit
279746cdda
|
|
@ -191,6 +191,8 @@ DEF SCGB_DEFAULT EQU $ff
|
||||||
const PREDEFPAL_SUNGLOW_CITY_MORN
|
const PREDEFPAL_SUNGLOW_CITY_MORN
|
||||||
const PREDEFPAL_OCHRE_TOWN
|
const PREDEFPAL_OCHRE_TOWN
|
||||||
const PREDEFPAL_OCHRE_TOWN_MORN
|
const PREDEFPAL_OCHRE_TOWN_MORN
|
||||||
|
const PREDEFPAL_POKEGEAR_KRIS
|
||||||
|
const PREDEFPAL_POKEGEAR_TOPAZ
|
||||||
DEF NUM_PREDEF_PALS EQU const_value
|
DEF NUM_PREDEF_PALS EQU const_value
|
||||||
|
|
||||||
; SGB system command codes
|
; SGB system command codes
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,9 @@ InitPartyMenuBGPal0:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_CGB_PokegearPals:
|
_CGB_PokegearPals:
|
||||||
|
ld a, [wOptions2]
|
||||||
|
and 1 << MENU_ACCOUNT
|
||||||
|
jr z, .SGBmode
|
||||||
ld a, [wPlayerGender]
|
ld a, [wPlayerGender]
|
||||||
and a ; MALE
|
and a ; MALE
|
||||||
jr z, .male
|
jr z, .male
|
||||||
|
|
@ -198,6 +201,41 @@ _CGB_PokegearPals:
|
||||||
ldh [hCGBPalUpdate], a
|
ldh [hCGBPalUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.SGBmode
|
||||||
|
ld a, [wPlayerGender]
|
||||||
|
and a ; MALE
|
||||||
|
jr z, .male2
|
||||||
|
dec a ; FEMALE
|
||||||
|
jr z, .female
|
||||||
|
ld a, PREDEFPAL_POKEGEAR_TOPAZ ; topaz palette
|
||||||
|
jr .got_sgb_pal
|
||||||
|
|
||||||
|
.male2
|
||||||
|
ld a, PREDEFPAL_POKEGEAR ; default pokegear interface palette
|
||||||
|
jr .got_sgb_pal
|
||||||
|
|
||||||
|
.female
|
||||||
|
ld a, PREDEFPAL_POKEGEAR_KRIS ; kris palette
|
||||||
|
|
||||||
|
.got_sgb_pal
|
||||||
|
call GetPredefPal
|
||||||
|
ld de, wBGPals1
|
||||||
|
; Copy 8 BG palettes
|
||||||
|
ld b, 8
|
||||||
|
.bg_loop
|
||||||
|
push hl
|
||||||
|
call LoadHLPaletteIntoDE
|
||||||
|
pop hl
|
||||||
|
dec b
|
||||||
|
jr nz, .bg_loop
|
||||||
|
; Copy 6 OB palettes, should be pointing at code from loading the overworld object palettes
|
||||||
|
ld b, 6
|
||||||
|
.ob_loop
|
||||||
|
call LoadHLOBPaletteIntoDE
|
||||||
|
dec b
|
||||||
|
jr nz, .ob_loop
|
||||||
|
ret
|
||||||
|
|
||||||
_CGB_StatsScreenHPPals:
|
_CGB_StatsScreenHPPals:
|
||||||
ld de, wBGPals1
|
ld de, wBGPals1
|
||||||
ld a, [wCurHPPal]
|
ld a, [wCurHPPal]
|
||||||
|
|
@ -565,7 +603,7 @@ _CGB_MapPals:
|
||||||
; Copy PAL_BG_TEXT and 6 OB palettes
|
; Copy PAL_BG_TEXT and 6 OB palettes
|
||||||
ld b, 7
|
ld b, 7
|
||||||
.ob_loop
|
.ob_loop
|
||||||
call .LoadHLOBPaletteIntoDE
|
call LoadHLOBPaletteIntoDE
|
||||||
dec b
|
dec b
|
||||||
jr nz, .ob_loop
|
jr nz, .ob_loop
|
||||||
; Copy PAL_OW_TREE and PAL_OW_ROCK
|
; Copy PAL_OW_TREE and PAL_OW_ROCK
|
||||||
|
|
@ -589,12 +627,12 @@ _CGB_MapPals:
|
||||||
jr nc, .bg_darkness
|
jr nc, .bg_darkness
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
.bg_done
|
.bg_done
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
@ -602,50 +640,50 @@ _CGB_MapPals:
|
||||||
.bg_darkness
|
.bg_darkness
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
jr .bg_done
|
jr .bg_done
|
||||||
.bg_morn_day
|
.bg_morn_day
|
||||||
; Lot of commented out code for spaceworld-style mornings.
|
; Lot of commented out code for spaceworld-style mornings.
|
||||||
; ld a, [wTimeOfDayPal]
|
; ld a, [wTimeOfDayPal]
|
||||||
; cp MORN_F
|
; cp MORN_F
|
||||||
; jr nz, .bg_day
|
; jr nz, .bg_day
|
||||||
; call .LoadHLColorIntoDE
|
; call LoadHLColorIntoDE
|
||||||
; inc hl
|
; inc hl
|
||||||
; inc hl
|
; inc hl
|
||||||
; call .LoadHLColorIntoDE
|
; call LoadHLColorIntoDE
|
||||||
; dec hl
|
; dec hl
|
||||||
; dec hl
|
; dec hl
|
||||||
; call .LoadHLColorIntoDE
|
; call LoadHLColorIntoDE
|
||||||
; call .LoadHLColorIntoDE
|
; call LoadHLColorIntoDE
|
||||||
; jr .bg_done
|
; jr .bg_done
|
||||||
;.bg_day
|
;.bg_day
|
||||||
call LoadHLPaletteIntoDE
|
call LoadHLPaletteIntoDE
|
||||||
jr .bg_done
|
jr .bg_done
|
||||||
|
|
||||||
.LoadHLOBPaletteIntoDE:
|
LoadHLOBPaletteIntoDE:
|
||||||
; shades 0, 1, 2, 3 -> 0, 0, 1, 3
|
; shades 0, 1, 2, 3 -> 0, 0, 1, 3
|
||||||
push hl
|
push hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
call .LoadHLColorIntoDE
|
call LoadHLColorIntoDE
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.LoadHLColorIntoDE:
|
LoadHLColorIntoDE:
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(wBGPals1)
|
ld a, BANK(wBGPals1)
|
||||||
|
|
|
||||||
|
|
@ -142,4 +142,6 @@
|
||||||
RGB 31,31,31, 27,23,01, 12,15,20, 00,00,00 ; PREDEFPAL_SUNGLOW_CITY_MORN #
|
RGB 31,31,31, 27,23,01, 12,15,20, 00,00,00 ; PREDEFPAL_SUNGLOW_CITY_MORN #
|
||||||
RGB 31,31,31, 31,20,00, 15,20,20, 00,00,00 ; PREDEFPAL_OCHRE_TOWN
|
RGB 31,31,31, 31,20,00, 15,20,20, 00,00,00 ; PREDEFPAL_OCHRE_TOWN
|
||||||
RGB 31,31,31, 28,17,00, 12,15,20, 00,00,00 ; PREDEFPAL_OCHRE_TOWN_MORN #
|
RGB 31,31,31, 28,17,00, 12,15,20, 00,00,00 ; PREDEFPAL_OCHRE_TOWN_MORN #
|
||||||
|
RGB 31,31,31, 26,28,31, 17,24,30, 00,00,00 ; PREDEFPAL_POKEGEAR_KRIS
|
||||||
|
RGB 31,31,31, 29,24,31, 23,17,31, 00,00,00 ; PREDEFPAL_POKEGEAR_TOPAZ
|
||||||
|
|
||||||
Loading…
Reference in a new issue