Make town map pals more intuitive in source
This commit is contained in:
364
engine/color.asm
364
engine/color.asm
@@ -5,10 +5,8 @@ SHINY_ATK_BIT EQU 5
|
|||||||
SHINY_DEF_VAL EQU 10
|
SHINY_DEF_VAL EQU 10
|
||||||
SHINY_SPD_VAL EQU 10
|
SHINY_SPD_VAL EQU 10
|
||||||
SHINY_SPC_VAL EQU 10
|
SHINY_SPC_VAL EQU 10
|
||||||
LO_NYBBLE EQU $0f
|
|
||||||
HI_NYBBLE EQU $f0
|
|
||||||
|
|
||||||
CheckShininess: ; 8a68
|
CheckShininess:
|
||||||
; Check if a mon is shiny by DVs at bc.
|
; Check if a mon is shiny by DVs at bc.
|
||||||
; Return carry if shiny.
|
; Return carry if shiny.
|
||||||
|
|
||||||
@@ -22,19 +20,19 @@ CheckShininess: ; 8a68
|
|||||||
|
|
||||||
; Defense
|
; Defense
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and LO_NYBBLE
|
and $f
|
||||||
cp SHINY_DEF_VAL
|
cp SHINY_DEF_VAL
|
||||||
jr nz, .NotShiny
|
jr nz, .NotShiny
|
||||||
|
|
||||||
; Speed
|
; Speed
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and HI_NYBBLE
|
and $f0
|
||||||
cp SHINY_SPD_VAL << 4
|
cp SHINY_SPD_VAL << 4
|
||||||
jr nz, .NotShiny
|
jr nz, .NotShiny
|
||||||
|
|
||||||
; Special
|
; Special
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and LO_NYBBLE
|
and $f
|
||||||
cp SHINY_SPC_VAL
|
cp SHINY_SPC_VAL
|
||||||
jr nz, .NotShiny
|
jr nz, .NotShiny
|
||||||
|
|
||||||
@@ -45,10 +43,8 @@ CheckShininess: ; 8a68
|
|||||||
.NotShiny
|
.NotShiny
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 8a88
|
|
||||||
|
|
||||||
|
CheckContestMon:
|
||||||
CheckContestMon: ; 8a88
|
|
||||||
; Check a mon's DVs at hl in the bug catching contest.
|
; Check a mon's DVs at hl in the bug catching contest.
|
||||||
; Return carry if its DVs are good enough to place in the contest.
|
; Return carry if its DVs are good enough to place in the contest.
|
||||||
|
|
||||||
@@ -59,7 +55,7 @@ CheckContestMon: ; 8a88
|
|||||||
|
|
||||||
; Defense
|
; Defense
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and LO_NYBBLE
|
and $f
|
||||||
cp 10
|
cp 10
|
||||||
jr c, .Bad
|
jr c, .Bad
|
||||||
|
|
||||||
@@ -70,7 +66,7 @@ CheckContestMon: ; 8a88
|
|||||||
|
|
||||||
; Special
|
; Special
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and LO_NYBBLE
|
and $f
|
||||||
cp 10
|
cp 10
|
||||||
jr c, .Bad
|
jr c, .Bad
|
||||||
|
|
||||||
@@ -81,10 +77,8 @@ CheckContestMon: ; 8a88
|
|||||||
.Bad
|
.Bad
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 8aa4
|
|
||||||
|
|
||||||
|
Function8aa4:
|
||||||
Function8aa4: ; 8aa4
|
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld hl, PalPacket_9ce6
|
ld hl, PalPacket_9ce6
|
||||||
@@ -106,16 +100,13 @@ Function8aa4: ; 8aa4
|
|||||||
ld hl, BlkPacket_9a86
|
ld hl, BlkPacket_9a86
|
||||||
call Function9809
|
call Function9809
|
||||||
ret
|
ret
|
||||||
; 8ad1
|
|
||||||
|
|
||||||
|
InitPartyMenuPalettes:
|
||||||
InitPartyMenuPalettes: ; 8ad1
|
|
||||||
ld hl, PalPacket_9c56 + 1
|
ld hl, PalPacket_9c56 + 1
|
||||||
call CopyFourPalettes
|
call CopyFourPalettes
|
||||||
call InitPartyMenuOBPals
|
call InitPartyMenuOBPals
|
||||||
call WipeAttrMap
|
call WipeAttrMap
|
||||||
ret
|
ret
|
||||||
; 8ade
|
|
||||||
|
|
||||||
SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
|
SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
|
||||||
ld hl, wHPPals
|
ld hl, wHPPals
|
||||||
@@ -142,9 +133,8 @@ SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
|
|||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
ret
|
ret
|
||||||
; 8b07
|
|
||||||
|
|
||||||
Function8b07: ; 8b07
|
Function8b07:
|
||||||
; Unreferenced
|
; Unreferenced
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
@@ -177,9 +167,7 @@ Function8b07: ; 8b07
|
|||||||
RGB 08, 16, 28
|
RGB 08, 16, 28
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; 8b3f
|
Function8b3f:
|
||||||
|
|
||||||
Function8b3f: ; 8b3f
|
|
||||||
; Unreferenced
|
; Unreferenced
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret nz
|
ret nz
|
||||||
@@ -188,9 +176,8 @@ Function8b3f: ; 8b3f
|
|||||||
ret z
|
ret z
|
||||||
ld hl, BlkPacket_9a86
|
ld hl, BlkPacket_9a86
|
||||||
jp Function9809
|
jp Function9809
|
||||||
; 8b4d
|
|
||||||
|
|
||||||
Function8b4d: ; 8b4d
|
Function8b4d:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
jr nz, .cgb
|
jr nz, .cgb
|
||||||
ld a, [hSGB]
|
ld a, [hSGB]
|
||||||
@@ -204,9 +191,8 @@ Function8b4d: ; 8b4d
|
|||||||
ld a, $3b
|
ld a, $3b
|
||||||
call GetPredefPal
|
call GetPredefPal
|
||||||
jp LoadHLPaletteIntoDE
|
jp LoadHLPaletteIntoDE
|
||||||
; 8b67
|
|
||||||
|
|
||||||
Function8b67: ; 8b67
|
Function8b67:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
jr nz, .cgb
|
jr nz, .cgb
|
||||||
ld a, [hSGB]
|
ld a, [hSGB]
|
||||||
@@ -220,9 +206,8 @@ Function8b67: ; 8b67
|
|||||||
ld a, $3c
|
ld a, $3c
|
||||||
call GetPredefPal
|
call GetPredefPal
|
||||||
jp LoadHLPaletteIntoDE
|
jp LoadHLPaletteIntoDE
|
||||||
; 8b81
|
|
||||||
|
|
||||||
Function8b81: ; 8b81
|
Function8b81:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
jr nz, .asm_8bb2
|
jr nz, .asm_8bb2
|
||||||
ld a, [hSGB]
|
ld a, [hSGB]
|
||||||
@@ -253,9 +238,8 @@ Function8b81: ; 8b81
|
|||||||
call GetMonPalettePointer_
|
call GetMonPalettePointer_
|
||||||
call LoadPalette_White_Col1_Col2_Black
|
call LoadPalette_White_Col1_Col2_Black
|
||||||
ret
|
ret
|
||||||
; 8bbd
|
|
||||||
|
|
||||||
Function8bbd: ; 8bbd
|
Function8bbd:
|
||||||
ld a, [TrainerClass]
|
ld a, [TrainerClass]
|
||||||
call GetTrainerPalettePointer
|
call GetTrainerPalettePointer
|
||||||
ld a, e
|
ld a, e
|
||||||
@@ -290,9 +274,8 @@ asm_8bd7
|
|||||||
pop hl
|
pop hl
|
||||||
call LoadPalette_White_Col1_Col2_Black
|
call LoadPalette_White_Col1_Col2_Black
|
||||||
ret
|
ret
|
||||||
; 8bec
|
|
||||||
|
|
||||||
Function8bec: ; 8bec
|
Function8bec:
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_8bf7
|
jr nz, .asm_8bf7
|
||||||
@@ -321,9 +304,8 @@ Function8bec: ; 8bec
|
|||||||
call FillBoxCGB
|
call FillBoxCGB
|
||||||
call LoadEDTile
|
call LoadEDTile
|
||||||
ret
|
ret
|
||||||
; 8c1d
|
|
||||||
|
|
||||||
ApplyMonOrTrainerPals: ; 8c1d
|
ApplyMonOrTrainerPals:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld a, e
|
ld a, e
|
||||||
@@ -344,9 +326,8 @@ ApplyMonOrTrainerPals: ; 8c1d
|
|||||||
call ApplyAttrMap
|
call ApplyAttrMap
|
||||||
call ApplyPals
|
call ApplyPals
|
||||||
ret
|
ret
|
||||||
; 8c43
|
|
||||||
|
|
||||||
ApplyHPBarPals: ; 8c43
|
ApplyHPBarPals:
|
||||||
ld a, [wWhichHPBar]
|
ld a, [wWhichHPBar]
|
||||||
and a
|
and a
|
||||||
jr z, .Enemy
|
jr z, .Enemy
|
||||||
@@ -395,9 +376,8 @@ ApplyHPBarPals: ; 8c43
|
|||||||
ld a, e
|
ld a, e
|
||||||
call FillBoxCGB
|
call FillBoxCGB
|
||||||
ret
|
ret
|
||||||
; 8c8a
|
|
||||||
|
|
||||||
LoadStatsScreenPals: ; 8c8a
|
LoadStatsScreenPals:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld hl, StatsScreenPals
|
ld hl, StatsScreenPals
|
||||||
@@ -420,9 +400,8 @@ LoadStatsScreenPals: ; 8c8a
|
|||||||
call ApplyPals
|
call ApplyPals
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ret
|
ret
|
||||||
; 8cb4
|
|
||||||
|
|
||||||
Function8cb4: ; 8cb4
|
Function8cb4:
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, 0
|
ld h, 0
|
||||||
rept 3
|
rept 3
|
||||||
@@ -463,9 +442,8 @@ endr
|
|||||||
call WipeAttrMap
|
call WipeAttrMap
|
||||||
call ApplyAttrMap
|
call ApplyAttrMap
|
||||||
ret
|
ret
|
||||||
; 8d05
|
|
||||||
|
|
||||||
Palettes_8d05: ; 8d05
|
Palettes_8d05:
|
||||||
RGB 20, 31, 11
|
RGB 20, 31, 11
|
||||||
RGB 31, 19, 00
|
RGB 31, 19, 00
|
||||||
RGB 31, 10, 09
|
RGB 31, 10, 09
|
||||||
@@ -516,12 +494,9 @@ Palettes_8d05: ; 8d05
|
|||||||
RGB 00, 21, 00
|
RGB 00, 21, 00
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; 8d55
|
|
||||||
|
|
||||||
INCLUDE "predef/cgb.asm"
|
INCLUDE "predef/cgb.asm"
|
||||||
|
|
||||||
|
Function95f0:
|
||||||
Function95f0: ; 95f0
|
|
||||||
ld hl, Palette_9608
|
ld hl, Palette_9608
|
||||||
ld de, UnknBGPals
|
ld de, UnknBGPals
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
@@ -531,22 +506,18 @@ Function95f0: ; 95f0
|
|||||||
call WipeAttrMap
|
call WipeAttrMap
|
||||||
call ApplyAttrMap
|
call ApplyAttrMap
|
||||||
ret
|
ret
|
||||||
; 9608
|
|
||||||
|
|
||||||
Palette_9608: ; 9608
|
Palette_9608:
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 09, 31, 31
|
RGB 09, 31, 31
|
||||||
RGB 10, 12, 31
|
RGB 10, 12, 31
|
||||||
RGB 00, 03, 19
|
RGB 00, 03, 19
|
||||||
|
|
||||||
; 9610
|
CopyFourPalettes:
|
||||||
|
|
||||||
|
|
||||||
CopyFourPalettes: ; 9610
|
|
||||||
ld de, UnknBGPals
|
ld de, UnknBGPals
|
||||||
ld c, $4
|
ld c, $4
|
||||||
|
|
||||||
CopyPalettes: ; 9615
|
CopyPalettes:
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@@ -559,9 +530,8 @@ CopyPalettes: ; 9615
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 9625
|
|
||||||
|
|
||||||
GetPredefPal: ; 9625
|
GetPredefPal:
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, $0
|
ld h, $0
|
||||||
rept 3 ; multiply by 8
|
rept 3 ; multiply by 8
|
||||||
@@ -570,9 +540,8 @@ endr
|
|||||||
ld bc, Palettes_9df6
|
ld bc, Palettes_9df6
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ret
|
ret
|
||||||
; 9630
|
|
||||||
|
|
||||||
LoadHLPaletteIntoDE: ; 9630
|
LoadHLPaletteIntoDE:
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
@@ -587,9 +556,8 @@ LoadHLPaletteIntoDE: ; 9630
|
|||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 9643
|
|
||||||
|
|
||||||
LoadPalette_White_Col1_Col2_Black: ; 9643
|
LoadPalette_White_Col1_Col2_Black:
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
@@ -619,9 +587,8 @@ LoadPalette_White_Col1_Col2_Black: ; 9643
|
|||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 9663
|
|
||||||
|
|
||||||
FillBoxCGB: ; 9663
|
FillBoxCGB:
|
||||||
.row
|
.row
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
@@ -636,9 +603,8 @@ FillBoxCGB: ; 9663
|
|||||||
dec b
|
dec b
|
||||||
jr nz, .row
|
jr nz, .row
|
||||||
ret
|
ret
|
||||||
; 9673
|
|
||||||
|
|
||||||
Function9673: ; 9673
|
Function9673:
|
||||||
push af
|
push af
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
@@ -667,27 +633,23 @@ endr
|
|||||||
pop bc
|
pop bc
|
||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
; 9699
|
|
||||||
|
|
||||||
|
WipeAttrMap:
|
||||||
WipeAttrMap: ; 9699
|
|
||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ret
|
ret
|
||||||
; 96a4
|
|
||||||
|
|
||||||
ApplyPals: ; 96a4
|
ApplyPals:
|
||||||
ld hl, UnknBGPals
|
ld hl, UnknBGPals
|
||||||
ld de, BGPals
|
ld de, BGPals
|
||||||
ld bc, 16 palettes
|
ld bc, 16 palettes
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
ret
|
ret
|
||||||
; 96b3
|
|
||||||
|
|
||||||
ApplyAttrMap: ; 96b3
|
ApplyAttrMap:
|
||||||
ld a, [rLCDC]
|
ld a, [rLCDC]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .UpdateVBank1
|
jr z, .UpdateVBank1
|
||||||
@@ -728,7 +690,6 @@ ApplyAttrMap: ; 96b3
|
|||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ret
|
ret
|
||||||
; 96f3
|
|
||||||
|
|
||||||
CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
|
CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
|
||||||
ld hl, wHPPals
|
ld hl, wHPPals
|
||||||
@@ -755,19 +716,16 @@ CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
|
|||||||
ld a, e
|
ld a, e
|
||||||
call FillBoxCGB
|
call FillBoxCGB
|
||||||
ret
|
ret
|
||||||
; 971a
|
|
||||||
|
|
||||||
|
InitPartyMenuOBPals:
|
||||||
InitPartyMenuOBPals: ; 971a
|
|
||||||
ld hl, Palettes_b681
|
ld hl, Palettes_b681
|
||||||
ld de, UnknOBPals
|
ld de, UnknOBPals
|
||||||
ld bc, 2 palettes
|
ld bc, 2 palettes
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
ret
|
ret
|
||||||
; 9729
|
|
||||||
|
|
||||||
GetBattlemonBackpicPalettePointer: ; 9729
|
GetBattlemonBackpicPalettePointer:
|
||||||
push de
|
push de
|
||||||
callba GetPartyMonDVs
|
callba GetPartyMonDVs
|
||||||
ld c, l
|
ld c, l
|
||||||
@@ -776,9 +734,8 @@ GetBattlemonBackpicPalettePointer: ; 9729
|
|||||||
call GetPlayerOrMonPalettePointer
|
call GetPlayerOrMonPalettePointer
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
; 973a
|
|
||||||
|
|
||||||
GetEnemyFrontpicPalettePointer: ; 973a
|
GetEnemyFrontpicPalettePointer:
|
||||||
push de
|
push de
|
||||||
callba GetEnemyMonDVs
|
callba GetEnemyMonDVs
|
||||||
ld c, l
|
ld c, l
|
||||||
@@ -787,9 +744,8 @@ GetEnemyFrontpicPalettePointer: ; 973a
|
|||||||
call GetFrontpicPalettePointer
|
call GetFrontpicPalettePointer
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
; 974b
|
|
||||||
|
|
||||||
GetPlayerOrMonPalettePointer: ; 974b
|
GetPlayerOrMonPalettePointer:
|
||||||
and a
|
and a
|
||||||
jp nz, GetMonNormalOrShinyPalettePointer
|
jp nz, GetMonNormalOrShinyPalettePointer
|
||||||
ld a, [wPlayerSpriteSetupFlags]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
@@ -804,14 +760,13 @@ GetPlayerOrMonPalettePointer: ; 974b
|
|||||||
.male
|
.male
|
||||||
ld hl, PlayerPalette
|
ld hl, PlayerPalette
|
||||||
ret
|
ret
|
||||||
; 9764
|
|
||||||
|
|
||||||
GetFrontpicPalettePointer: ; 9764
|
GetFrontpicPalettePointer:
|
||||||
and a
|
and a
|
||||||
jp nz, GetMonNormalOrShinyPalettePointer
|
jp nz, GetMonNormalOrShinyPalettePointer
|
||||||
ld a, [TrainerClass]
|
ld a, [TrainerClass]
|
||||||
|
|
||||||
GetTrainerPalettePointer: ; 976b
|
GetTrainerPalettePointer:
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
add hl,hl
|
add hl,hl
|
||||||
@@ -819,14 +774,12 @@ GetTrainerPalettePointer: ; 976b
|
|||||||
ld bc, TrainerPalettes
|
ld bc, TrainerPalettes
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ret
|
ret
|
||||||
; 9775
|
|
||||||
|
|
||||||
GetMonPalettePointer_: ; 9775
|
GetMonPalettePointer_:
|
||||||
call GetMonPalettePointer
|
call GetMonPalettePointer
|
||||||
ret
|
ret
|
||||||
; 9779
|
|
||||||
|
|
||||||
Function9779: mobile ; 9779
|
Function9779: mobile
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld hl, Palettes_979c
|
ld hl, Palettes_979c
|
||||||
@@ -844,9 +797,8 @@ Function9779: mobile ; 9779
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
ret
|
ret
|
||||||
; 979c
|
|
||||||
|
|
||||||
Palettes_979c: ; 979c
|
Palettes_979c:
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 25, 25, 25
|
RGB 25, 25, 25
|
||||||
RGB 13, 13, 13
|
RGB 13, 13, 13
|
||||||
@@ -877,9 +829,7 @@ Palettes_979c: ; 979c
|
|||||||
RGB 20, 15, 03
|
RGB 20, 15, 03
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; 97cc
|
Function97cc:
|
||||||
|
|
||||||
Function97cc: ; 97cc
|
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@@ -891,9 +841,8 @@ Function97cc: ; 97cc
|
|||||||
call GetPredefPal
|
call GetPredefPal
|
||||||
call Function97e5
|
call Function97e5
|
||||||
ret
|
ret
|
||||||
; 97e5
|
|
||||||
|
|
||||||
Function97e5: ; 97e5
|
Function97e5:
|
||||||
ld c, 1 palettes
|
ld c, 1 palettes
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@@ -901,9 +850,8 @@ Function97e5: ; 97e5
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 97ee
|
|
||||||
|
|
||||||
GetMonPalettePointer: ; 97ee
|
GetMonPalettePointer:
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, $0
|
ld h, $0
|
||||||
rept 3
|
rept 3
|
||||||
@@ -912,9 +860,8 @@ endr
|
|||||||
ld bc, PokemonPalettes
|
ld bc, PokemonPalettes
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ret
|
ret
|
||||||
; 97f9
|
|
||||||
|
|
||||||
GetMonNormalOrShinyPalettePointer: ; 97f9
|
GetMonNormalOrShinyPalettePointer:
|
||||||
push bc
|
push bc
|
||||||
call GetMonPalettePointer
|
call GetMonPalettePointer
|
||||||
pop bc
|
pop bc
|
||||||
@@ -926,9 +873,8 @@ rept 4
|
|||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
ret
|
ret
|
||||||
; 9809
|
|
||||||
|
|
||||||
Function9809: ; 9809
|
Function9809:
|
||||||
ld a, [wcfbe]
|
ld a, [wcfbe]
|
||||||
push af
|
push af
|
||||||
set 7, a
|
set 7, a
|
||||||
@@ -937,9 +883,8 @@ Function9809: ; 9809
|
|||||||
pop af
|
pop af
|
||||||
ld [wcfbe], a
|
ld [wcfbe], a
|
||||||
ret
|
ret
|
||||||
; 981a
|
|
||||||
|
|
||||||
PushSGBPals: ; 981a
|
PushSGBPals:
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $7
|
and $7
|
||||||
ret z
|
ret z
|
||||||
@@ -978,9 +923,8 @@ PushSGBPals: ; 981a
|
|||||||
dec b
|
dec b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 9853
|
|
||||||
|
|
||||||
Function9853: ; 9853
|
Function9853:
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret nz
|
ret nz
|
||||||
di
|
di
|
||||||
@@ -1010,10 +954,8 @@ Function9853: ; 9853
|
|||||||
ld [wcfbe], a
|
ld [wcfbe], a
|
||||||
ei
|
ei
|
||||||
ret
|
ret
|
||||||
; 9890
|
|
||||||
|
|
||||||
|
Function9890::
|
||||||
Function9890:: ; 9890
|
|
||||||
call CheckCGB
|
call CheckCGB
|
||||||
ret z
|
ret z
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@@ -1066,9 +1008,8 @@ Function9890:: ; 9890
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 98eb
|
|
||||||
|
|
||||||
Function98eb: ; 98eb
|
Function98eb:
|
||||||
ld hl, .PalPacketPointerTable
|
ld hl, .PalPacketPointerTable
|
||||||
ld c, 9
|
ld c, 9
|
||||||
.loop
|
.loop
|
||||||
@@ -1084,9 +1025,8 @@ Function98eb: ; 98eb
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 98ff
|
|
||||||
|
|
||||||
.PalPacketPointerTable: ; 98ff
|
.PalPacketPointerTable:
|
||||||
dw PalPacket_9d56
|
dw PalPacket_9d56
|
||||||
dw PalPacket_9d76
|
dw PalPacket_9d76
|
||||||
dw PalPacket_9d86
|
dw PalPacket_9d86
|
||||||
@@ -1096,9 +1036,8 @@ Function98eb: ; 98eb
|
|||||||
dw PalPacket_9dc6
|
dw PalPacket_9dc6
|
||||||
dw PalPacket_9dd6
|
dw PalPacket_9dd6
|
||||||
dw PalPacket_9de6
|
dw PalPacket_9de6
|
||||||
; 9911
|
|
||||||
|
|
||||||
Function9911: ; 9911
|
Function9911:
|
||||||
di
|
di
|
||||||
xor a
|
xor a
|
||||||
ld [rJOYP], a
|
ld [rJOYP], a
|
||||||
@@ -1111,32 +1050,28 @@ Function9911: ; 9911
|
|||||||
call PushSGBPals
|
call PushSGBPals
|
||||||
ei
|
ei
|
||||||
ret
|
ret
|
||||||
; 992c
|
|
||||||
|
|
||||||
Function992c: ; 992c
|
Function992c:
|
||||||
call .LoadSGBBorderPointers
|
call .LoadSGBBorderPointers
|
||||||
push de
|
push de
|
||||||
call Function9a24
|
call Function9a24
|
||||||
pop hl
|
pop hl
|
||||||
call Function99d8
|
call Function99d8
|
||||||
ret
|
ret
|
||||||
; 9938
|
|
||||||
|
|
||||||
.LoadSGBBorderPointers: ; 9938
|
.LoadSGBBorderPointers:
|
||||||
ld hl, SGBBorder
|
ld hl, SGBBorder
|
||||||
ld de, SGBBorderMap
|
ld de, SGBBorderMap
|
||||||
ret
|
ret
|
||||||
; 993f
|
|
||||||
|
|
||||||
Function993f: ; 993f
|
Function993f:
|
||||||
ld hl, VTiles0
|
ld hl, VTiles0
|
||||||
ld bc, $2000
|
ld bc, $2000
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ret
|
ret
|
||||||
; 994a
|
|
||||||
|
|
||||||
Function994a: ; 994a
|
Function994a:
|
||||||
ld hl, PalPacket_9d26
|
ld hl, PalPacket_9d26
|
||||||
call PushSGBPals
|
call PushSGBPals
|
||||||
call SGBDelayCycles
|
call SGBDelayCycles
|
||||||
@@ -1180,15 +1115,13 @@ endr
|
|||||||
call Function99ab
|
call Function99ab
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 99ab
|
|
||||||
|
|
||||||
Function99ab: ; 99ab
|
Function99ab:
|
||||||
ld hl, PalPacket_9d16
|
ld hl, PalPacket_9d16
|
||||||
call PushSGBPals
|
call PushSGBPals
|
||||||
jp SGBDelayCycles
|
jp SGBDelayCycles
|
||||||
; 99b4
|
|
||||||
|
|
||||||
Function99b4: ; 99b4
|
Function99b4:
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
@@ -1204,9 +1137,8 @@ Function99b4: ; 99b4
|
|||||||
xor a
|
xor a
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
ret
|
ret
|
||||||
; 99d8
|
|
||||||
|
|
||||||
Function99d8: ; 99d8
|
Function99d8:
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
@@ -1239,9 +1171,8 @@ Function99d8: ; 99d8
|
|||||||
xor a
|
xor a
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
ret
|
ret
|
||||||
; 9a24
|
|
||||||
|
|
||||||
Function9a24: ; 9a24
|
Function9a24:
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld a, %11100100
|
ld a, %11100100
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
@@ -1264,7 +1195,6 @@ Function9a24: ; 9a24
|
|||||||
xor a
|
xor a
|
||||||
ld [rBGP], a
|
ld [rBGP], a
|
||||||
ret
|
ret
|
||||||
; 9a52
|
|
||||||
|
|
||||||
CopyData: ; 0x9a52
|
CopyData: ; 0x9a52
|
||||||
; copy bc bytes of data from hl to de
|
; copy bc bytes of data from hl to de
|
||||||
@@ -1310,7 +1240,7 @@ DrawDefaultTiles: ; 0x9a64
|
|||||||
ret
|
ret
|
||||||
; 0x9a7a
|
; 0x9a7a
|
||||||
|
|
||||||
SGBDelayCycles: ; 9a7a
|
SGBDelayCycles:
|
||||||
ld de, 7000
|
ld de, 7000
|
||||||
.wait
|
.wait
|
||||||
nop
|
nop
|
||||||
@@ -1321,51 +1251,47 @@ SGBDelayCycles: ; 9a7a
|
|||||||
or e
|
or e
|
||||||
jr nz, .wait
|
jr nz, .wait
|
||||||
ret
|
ret
|
||||||
; 9a86
|
|
||||||
|
|
||||||
BlkPacket_9a86: ; 9a86
|
BlkPacket_9a86:
|
||||||
db $21, $01, $03, $00, $00, $00, $13, $11, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $03, $00, $00, $00, $13, $11, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9a96: ; 9a96
|
BlkPacket_9a96:
|
||||||
db $21, $01, $07, $05, $00, $0a, $13, $0d, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $05, $00, $0a, $13, $0d, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9aa6: ; 9a86
|
BlkPacket_9aa6:
|
||||||
db $22, $05, $07, $0a, $00, $0c, $13, $11, $03, $05, $01, $00, $0a, $03, $03, $00
|
db $22, $05, $07, $0a, $00, $0c, $13, $11, $03, $05, $01, $00, $0a, $03, $03, $00
|
||||||
db $0a, $08, $13, $0a, $03, $0a, $00, $04, $08, $0b, $03, $0f, $0b, $00, $13, $07
|
db $0a, $08, $13, $0a, $03, $0a, $00, $04, $08, $0b, $03, $0f, $0b, $00, $13, $07
|
||||||
|
|
||||||
BlkPacket_9ac6: ; 9a86
|
BlkPacket_9ac6:
|
||||||
db $21, $01, $07, $05, $00, $01, $07, $07, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $05, $00, $01, $07, $07, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9ad6: ; 9a86
|
BlkPacket_9ad6:
|
||||||
db $21, $01, $07, $05, $0b, $01, $13, $02, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $05, $0b, $01, $13, $02, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9ae6: ; 9a86
|
BlkPacket_9ae6:
|
||||||
db $21, $01, $07, $05, $01, $01, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $05, $01, $01, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9af6: ; 9a86
|
BlkPacket_9af6:
|
||||||
db $21, $01, $07, $05, $07, $05, $0d, $0b, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $05, $07, $05, $0d, $0b, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9b06: ; 9a86
|
BlkPacket_9b06:
|
||||||
db $22, $05, $03, $05, $00, $00, $13, $0b, $03, $0a, $00, $04, $13, $09, $02, $0f
|
db $22, $05, $03, $05, $00, $00, $13, $0b, $03, $0a, $00, $04, $13, $09, $02, $0f
|
||||||
db $00, $06, $13, $07, $03, $00, $04, $04, $0f, $09, $03, $00, $00, $0c, $13, $11
|
db $00, $06, $13, $07, $03, $00, $04, $04, $0f, $09, $03, $00, $00, $0c, $13, $11
|
||||||
|
|
||||||
BlkPacket_9b26: ; 9a86
|
BlkPacket_9b26:
|
||||||
db $23, $07, $07, $10, $00, $00, $02, $0c, $02, $00, $0c, $00, $12, $01, $02, $00
|
db $23, $07, $07, $10, $00, $00, $02, $0c, $02, $00, $0c, $00, $12, $01, $02, $00
|
||||||
db $0c, $02, $12, $03, $02, $00, $0c, $04, $12, $05, $02, $00, $0c, $06, $12, $07
|
db $0c, $02, $12, $03, $02, $00, $0c, $04, $12, $05, $02, $00, $0c, $06, $12, $07
|
||||||
db $02, $00, $0c, $08, $12, $09, $02, $00, $0c, $0a, $12, $0b, $00, $00, $00, $00
|
db $02, $00, $0c, $08, $12, $09, $02, $00, $0c, $0a, $12, $0b, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9b56: ; 9a86
|
BlkPacket_9b56:
|
||||||
db $22, $03, $07, $20, $00, $00, $13, $04, $03, $0f, $00, $06, $13, $11, $03, $05
|
db $22, $03, $07, $20, $00, $00, $13, $04, $03, $0f, $00, $06, $13, $11, $03, $05
|
||||||
db $0f, $01, $12, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
db $0f, $01, $12, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9b76: ; 9a86
|
BlkPacket_9b76:
|
||||||
db $21, $01, $07, $10, $00, $00, $13, $05, $00, $00, $00, $00, $00, $00, $00, $00
|
db $21, $01, $07, $10, $00, $00, $13, $05, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
|
|
||||||
BlkPacket_9b86: ; 9a86
|
BlkPacket_9b86:
|
||||||
db $21, $02, $07, $0a, $00, $04, $13, $0d, $03, $05, $00, $06, $13, $0b, $00, $00
|
db $21, $02, $07, $0a, $00, $04, $13, $0d, $03, $05, $00, $06, $13, $0b, $00, $00
|
||||||
; 9b96
|
|
||||||
|
|
||||||
; 9b96
|
|
||||||
|
|
||||||
PalPacket_9b96: db $51, $48, $00, $49, $00, $4a, $00, $4b, $00, $00, $00, $00, $00, $00, $00, $00
|
PalPacket_9b96: db $51, $48, $00, $49, $00, $4a, $00, $4b, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
PalPacket_9ba6: db $51, $2b, $00, $24, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
PalPacket_9ba6: db $51, $2b, $00, $24, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
||||||
@@ -1405,9 +1331,8 @@ PalPacket_9db6: db $79, $31, $08, $00, $0b, $0c, $a5, $ca, $c9, $7e, $d0, $06, $
|
|||||||
PalPacket_9dc6: db $79, $26, $08, $00, $0b, $39, $cd, $48, $0c, $d0, $34, $a5, $c9, $c9, $80, $d0
|
PalPacket_9dc6: db $79, $26, $08, $00, $0b, $39, $cd, $48, $0c, $d0, $34, $a5, $c9, $c9, $80, $d0
|
||||||
PalPacket_9dd6: db $79, $1b, $08, $00, $0b, $ea, $ea, $ea, $ea, $ea, $a9, $01, $cd, $4f, $0c, $d0
|
PalPacket_9dd6: db $79, $1b, $08, $00, $0b, $ea, $ea, $ea, $ea, $ea, $a9, $01, $cd, $4f, $0c, $d0
|
||||||
PalPacket_9de6: db $79, $10, $08, $00, $0b, $4c, $20, $08, $ea, $ea, $ea, $ea, $ea, $60, $ea, $ea
|
PalPacket_9de6: db $79, $10, $08, $00, $0b, $4c, $20, $08, $ea, $ea, $ea, $ea, $ea, $60, $ea, $ea
|
||||||
; 9df6
|
|
||||||
|
|
||||||
Palettes_9df6: ; 9df6
|
Palettes_9df6:
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 22, 25, 19
|
RGB 22, 25, 19
|
||||||
RGB 16, 21, 30
|
RGB 16, 21, 30
|
||||||
@@ -1803,9 +1728,7 @@ Palettes_9df6: ; 9df6
|
|||||||
RGB 21, 21, 21
|
RGB 21, 21, 21
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
|
|
||||||
; a06e
|
SGBBorderMap:
|
||||||
|
|
||||||
SGBBorderMap: ; a06e
|
|
||||||
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
|
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
|
||||||
db $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$54, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54
|
db $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$54, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54
|
||||||
db $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54
|
db $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54
|
||||||
@@ -1834,9 +1757,8 @@ SGBBorderMap: ; a06e
|
|||||||
db $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54
|
db $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54
|
||||||
db $33,$14, $34,$14, $35,$14, $35,$54, $34,$54, $24,$54, $07,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54
|
db $33,$14, $34,$14, $35,$14, $35,$54, $34,$54, $24,$54, $07,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54
|
||||||
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $20,$14, $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54, $20,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
|
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $20,$14, $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54, $20,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
|
||||||
; a49e
|
|
||||||
|
|
||||||
SGBBorderPalettes: ; a49e
|
SGBBorderPalettes:
|
||||||
RGB 24, 06, 06
|
RGB 24, 06, 06
|
||||||
RGB 24, 24, 26
|
RGB 24, 24, 26
|
||||||
RGB 14, 15, 20
|
RGB 14, 15, 20
|
||||||
@@ -1917,13 +1839,10 @@ SGBBorderPalettes: ; a49e
|
|||||||
RGB 31, 31, 25
|
RGB 31, 31, 25
|
||||||
RGB 31, 31, 25
|
RGB 31, 31, 25
|
||||||
|
|
||||||
; a51e
|
SGBBorder:
|
||||||
|
|
||||||
SGBBorder: ; a51e
|
|
||||||
INCBIN "gfx/misc/sgb_border.2bpp"
|
INCBIN "gfx/misc/sgb_border.2bpp"
|
||||||
; a8be
|
|
||||||
|
|
||||||
Palettes_a8be: ; a8be
|
Palettes_a8be:
|
||||||
RGB 30, 26, 15
|
RGB 30, 26, 15
|
||||||
RGB 00, 23, 00
|
RGB 00, 23, 00
|
||||||
|
|
||||||
@@ -1933,23 +1852,19 @@ Palettes_a8be: ; a8be
|
|||||||
RGB 30, 26, 15
|
RGB 30, 26, 15
|
||||||
RGB 31, 00, 00
|
RGB 31, 00, 00
|
||||||
|
|
||||||
Palettes_a8ca: ; a8ca
|
Palettes_a8ca:
|
||||||
RGB 30, 26, 15
|
RGB 30, 26, 15
|
||||||
RGB 04, 17, 31
|
RGB 04, 17, 31
|
||||||
; a8ce
|
|
||||||
|
|
||||||
; a8ce
|
|
||||||
INCLUDE "gfx/pics/palette_pointers.asm"
|
INCLUDE "gfx/pics/palette_pointers.asm"
|
||||||
; b0ce
|
|
||||||
|
|
||||||
; b0ce
|
|
||||||
INCLUDE "gfx/trainers/palette_pointers.asm"
|
INCLUDE "gfx/trainers/palette_pointers.asm"
|
||||||
; b1de
|
|
||||||
|
|
||||||
LoadMapPals: ; b1de
|
LoadMapPals:
|
||||||
callba LoadSpecialMapPalette
|
callba LoadSpecialMapPalette
|
||||||
jr c, .got_pals
|
jr c, .got_pals
|
||||||
|
|
||||||
|
; Which palette group is based on whether we're outside or inside
|
||||||
ld a, [wPermission]
|
ld a, [wPermission]
|
||||||
and 7
|
and 7
|
||||||
ld e, a
|
ld e, a
|
||||||
@@ -1960,16 +1875,18 @@ LoadMapPals: ; b1de
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
; Futher refine by time of day
|
||||||
ld a, [TimeOfDayPal]
|
ld a, [TimeOfDayPal]
|
||||||
and 3
|
and 3
|
||||||
rept 3
|
|
||||||
add a
|
add a
|
||||||
endr
|
add a
|
||||||
|
add a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
|
; Switch to palettes WRAM bank
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
@@ -1977,14 +1894,14 @@ endr
|
|||||||
ld hl, UnknBGPals
|
ld hl, UnknBGPals
|
||||||
ld b, 8
|
ld b, 8
|
||||||
.outer_loop
|
.outer_loop
|
||||||
ld a, [de]
|
ld a, [de] ; lookup index for TilesetBGPalette
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
rept 3
|
add hl, hl
|
||||||
add hl,hl
|
add hl, hl
|
||||||
endr
|
add hl, hl
|
||||||
ld de, TilesetBGPalette
|
ld de, TilesetBGPalette
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, l
|
ld e, l
|
||||||
@@ -2042,43 +1959,41 @@ endr
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
ret
|
ret
|
||||||
; b279
|
|
||||||
|
|
||||||
.TilesetColorsPointers: ; b279
|
.TilesetColorsPointers
|
||||||
dw TilesetColors1
|
dw .OutdoorColors ; unused
|
||||||
dw TilesetColors1
|
dw .OutdoorColors ; TOWN
|
||||||
dw TilesetColors1
|
dw .OutdoorColors ; ROUTE
|
||||||
dw TilesetColors2
|
dw .IndoorColors ; INDOOR
|
||||||
dw TilesetColors3
|
dw .DungeonColors ; CAVE
|
||||||
dw TilesetColors4
|
dw .Perm5Colors ; PERM_5
|
||||||
dw TilesetColors2
|
dw .IndoorColors ; GATE
|
||||||
dw TilesetColors3
|
dw .DungeonColors ; DUNGEON
|
||||||
; b289
|
|
||||||
|
|
||||||
TilesetColors1: ; b289
|
; Valid indices: $00 - $29
|
||||||
db $00, $01, $02, $28, $04, $05, $06, $07
|
.OutdoorColors
|
||||||
db $08, $09, $0a, $28, $0c, $0d, $0e, $0f
|
db $00, $01, $02, $28, $04, $05, $06, $07 ; morn
|
||||||
db $10, $11, $12, $29, $14, $15, $16, $17
|
db $08, $09, $0a, $28, $0c, $0d, $0e, $0f ; day
|
||||||
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
|
db $10, $11, $12, $29, $14, $15, $16, $17 ; nite
|
||||||
|
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
|
||||||
|
|
||||||
TilesetColors2: ; b289
|
.IndoorColors
|
||||||
db $20, $21, $22, $23, $24, $25, $26, $07
|
db $20, $21, $22, $23, $24, $25, $26, $07 ; morn
|
||||||
db $20, $21, $22, $23, $24, $25, $26, $07
|
db $20, $21, $22, $23, $24, $25, $26, $07 ; day
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $07
|
db $10, $11, $12, $13, $14, $15, $16, $07 ; nite
|
||||||
db $18, $19, $1a, $1b, $1c, $1d, $1e, $07
|
db $18, $19, $1a, $1b, $1c, $1d, $1e, $07 ; dark
|
||||||
|
|
||||||
TilesetColors3: ; b289
|
.DungeonColors
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
db $00, $01, $02, $03, $04, $05, $06, $07 ; morn
|
||||||
db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
|
db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $17
|
db $10, $11, $12, $13, $14, $15, $16, $17 ; nite
|
||||||
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
|
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
|
||||||
|
|
||||||
TilesetColors4: ; b289
|
.Perm5Colors
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
db $00, $01, $02, $03, $04, $05, $06, $07 ; morn
|
||||||
db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
|
db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day
|
||||||
db $10, $11, $12, $13, $14, $15, $16, $17
|
db $10, $11, $12, $13, $14, $15, $16, $17 ; nite
|
||||||
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
|
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
|
||||||
; b309
|
|
||||||
|
|
||||||
Palette_b309: ; b309 mobile
|
Palette_b309: ; b309 mobile
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
@@ -2086,26 +2001,22 @@ Palette_b309: ; b309 mobile
|
|||||||
RGB 30, 10, 06
|
RGB 30, 10, 06
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b311
|
|
||||||
|
|
||||||
Palette_b311: ; b311 not mobile
|
Palette_b311: ; b311 not mobile
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 17, 19, 31
|
RGB 17, 19, 31
|
||||||
RGB 14, 16, 31
|
RGB 14, 16, 31
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b319
|
TilesetBGPalette:
|
||||||
|
|
||||||
TilesetBGPalette: ; b319
|
|
||||||
INCLUDE "tilesets/bg.pal"
|
INCLUDE "tilesets/bg.pal"
|
||||||
|
|
||||||
MapObjectPals:: ; b469
|
MapObjectPals::
|
||||||
INCLUDE "tilesets/ob.pal"
|
INCLUDE "tilesets/ob.pal"
|
||||||
|
|
||||||
RoofPals: ; b569
|
RoofPals:
|
||||||
INCLUDE "tilesets/roof.pal"
|
INCLUDE "tilesets/roof.pal"
|
||||||
|
|
||||||
Palettes_b641: ; b641
|
Palettes_b641:
|
||||||
RGB 27, 31, 27
|
RGB 27, 31, 27
|
||||||
RGB 21, 21, 21
|
RGB 21, 21, 21
|
||||||
RGB 13, 13, 13
|
RGB 13, 13, 13
|
||||||
@@ -2146,9 +2057,7 @@ Palettes_b641: ; b641
|
|||||||
RGB 07, 07, 12
|
RGB 07, 07, 12
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b681
|
Palettes_b681:
|
||||||
|
|
||||||
Palettes_b681: ; b681
|
|
||||||
RGB 27, 31, 27
|
RGB 27, 31, 27
|
||||||
RGB 31, 19, 10
|
RGB 31, 19, 10
|
||||||
RGB 31, 07, 04
|
RGB 31, 07, 04
|
||||||
@@ -2219,8 +2128,7 @@ Palettes_b681: ; b681
|
|||||||
RGB 20, 15, 03
|
RGB 20, 15, 03
|
||||||
RGB 07, 07, 07
|
RGB 07, 07, 07
|
||||||
|
|
||||||
|
Palettes_b6f1:
|
||||||
Palettes_b6f1: ; b6f1
|
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 18, 23, 31
|
RGB 18, 23, 31
|
||||||
RGB 15, 20, 31
|
RGB 15, 20, 31
|
||||||
@@ -2246,8 +2154,7 @@ Palettes_b6f1: ; b6f1
|
|||||||
RGB 18, 23, 31
|
RGB 18, 23, 31
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
|
Palettes_b719:
|
||||||
Palettes_b719: ; b719
|
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 07, 06, 03
|
RGB 07, 06, 03
|
||||||
RGB 07, 06, 03
|
RGB 07, 06, 03
|
||||||
@@ -2258,9 +2165,7 @@ Palettes_b719: ; b719
|
|||||||
RGB 26, 22, 00
|
RGB 26, 22, 00
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b729
|
MalePokegearPals:
|
||||||
|
|
||||||
MalePokegearPals: ; b729
|
|
||||||
RGB 28, 31, 20
|
RGB 28, 31, 20
|
||||||
RGB 21, 21, 21
|
RGB 21, 21, 21
|
||||||
RGB 13, 13, 13
|
RGB 13, 13, 13
|
||||||
@@ -2291,9 +2196,7 @@ MalePokegearPals: ; b729
|
|||||||
RGB 15, 07, 00
|
RGB 15, 07, 00
|
||||||
RGB 31, 00, 00
|
RGB 31, 00, 00
|
||||||
|
|
||||||
; b759
|
FemalePokegearPals:
|
||||||
|
|
||||||
FemalePokegearPals: ; b759
|
|
||||||
RGB 28, 31, 20
|
RGB 28, 31, 20
|
||||||
RGB 21, 21, 21
|
RGB 21, 21, 21
|
||||||
RGB 13, 13, 13
|
RGB 13, 13, 13
|
||||||
@@ -2324,9 +2227,7 @@ FemalePokegearPals: ; b759
|
|||||||
RGB 15, 07, 00
|
RGB 15, 07, 00
|
||||||
RGB 31, 00, 00
|
RGB 31, 00, 00
|
||||||
|
|
||||||
; b789
|
Palettes_b789:
|
||||||
|
|
||||||
Palettes_b789: ; b789
|
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 30, 22, 24
|
RGB 30, 22, 24
|
||||||
RGB 18, 18, 18
|
RGB 18, 18, 18
|
||||||
@@ -2347,9 +2248,7 @@ Palettes_b789: ; b789
|
|||||||
RGB 18, 18, 18
|
RGB 18, 18, 18
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b7a9
|
Palettes_b7a9:
|
||||||
|
|
||||||
Palettes_b7a9: ; b7a9
|
|
||||||
RGB 31, 31, 31
|
RGB 31, 31, 31
|
||||||
RGB 24, 25, 28
|
RGB 24, 25, 28
|
||||||
RGB 24, 24, 09
|
RGB 24, 24, 09
|
||||||
@@ -2430,4 +2329,3 @@ Palettes_b7a9: ; b7a9
|
|||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
RGB 00, 00, 00
|
RGB 00, 00, 00
|
||||||
|
|
||||||
; b829
|
|
||||||
|
@@ -248,7 +248,7 @@ MapSetupCommands: ; 15440
|
|||||||
dba EnterMapMusic ; 07
|
dba EnterMapMusic ; 07
|
||||||
dba ForceMapMusic ; 08
|
dba ForceMapMusic ; 08
|
||||||
dba FadeInMusic ; 09
|
dba FadeInMusic ; 09
|
||||||
dba LoadBlockData ; 0a
|
dba LoadBlockData ; 0a (callback 1)
|
||||||
dba LoadNeighboringBlockData ; 0b
|
dba LoadNeighboringBlockData ; 0b
|
||||||
dba SaveScreen ; 0c
|
dba SaveScreen ; 0c
|
||||||
dba BufferScreen ; 0d
|
dba BufferScreen ; 0d
|
||||||
|
@@ -2841,7 +2841,7 @@ TownMapPals: ; 91f13
|
|||||||
; The palette data is condensed to nybbles,
|
; The palette data is condensed to nybbles,
|
||||||
|
|
||||||
; least-significant first.
|
; least-significant first.
|
||||||
ld hl, TownMapPalMap
|
ld hl, .PalMap
|
||||||
srl a
|
srl a
|
||||||
jr c, .odd
|
jr c, .odd
|
||||||
; Even-numbered tile ids take the bottom nybble...
|
; Even-numbered tile ids take the bottom nybble...
|
||||||
@@ -2878,13 +2878,20 @@ TownMapPals: ; 91f13
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
TownMapPalMap:
|
.PalMap
|
||||||
dn 1, 1, 2, 1, 2, 2, 0, 0, 1, 1, 1, 3, 5, 4, 5, 4
|
townmappals: MACRO
|
||||||
dn 1, 1, 2, 1, 2, 2, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0
|
rept _NARG / 2
|
||||||
dn 1, 1, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
dn \2, \1
|
||||||
dn 0, 0, 0, 0, 4, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0
|
shift
|
||||||
dn 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3
|
shift
|
||||||
dn 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
|
endr
|
||||||
|
endm
|
||||||
|
townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 3, 1, 4, 5, 4, 5
|
||||||
|
townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0
|
||||||
|
townmappals 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
townmappals 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
townmappals 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0
|
||||||
|
townmappals 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
; 91f7b
|
; 91f7b
|
||||||
|
|
||||||
TownMapMon: ; 91f7b
|
TownMapMon: ; 91f7b
|
||||||
|
Reference in New Issue
Block a user