-
Notifications
You must be signed in to change notification settings - Fork 806
/
tileset_palettes.asm
137 lines (117 loc) · 2.23 KB
/
tileset_palettes.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
LoadSpecialMapPalette:
ld a, [wMapTileset]
cp TILESET_POKECOM_CENTER
jr z, .pokecom_2f
cp TILESET_BATTLE_TOWER_INSIDE
jr z, .battle_tower_inside
cp TILESET_ICE_PATH
jr z, .ice_path
cp TILESET_HOUSE
jr z, .house
cp TILESET_RADIO_TOWER
jr z, .radio_tower
cp TILESET_MANSION
jr z, .mansion_mobile
jr .do_nothing
.pokecom_2f
call LoadPokeComPalette
scf
ret
.battle_tower_inside
call LoadBattleTowerInsidePalette
scf
ret
.ice_path
ld a, [wEnvironment]
and $7
cp INDOOR ; Hall of Fame
jr z, .do_nothing
call LoadIcePathPalette
scf
ret
.house
call LoadHousePalette
scf
ret
.radio_tower
call LoadRadioTowerPalette
scf
ret
.mansion_mobile
call LoadMansionPalette
scf
ret
.do_nothing
and a
ret
LoadPokeComPalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, PokeComPalette
ld bc, 8 palettes
call FarCopyWRAM
ret
PokeComPalette:
INCLUDE "gfx/tilesets/pokecom_center.pal"
LoadBattleTowerInsidePalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, BattleTowerInsidePalette
ld bc, 8 palettes
call FarCopyWRAM
ret
BattleTowerInsidePalette:
INCLUDE "gfx/tilesets/battle_tower_inside.pal"
LoadIcePathPalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, IcePathPalette
ld bc, 8 palettes
call FarCopyWRAM
ret
IcePathPalette:
INCLUDE "gfx/tilesets/ice_path.pal"
LoadHousePalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, HousePalette
ld bc, 8 palettes
call FarCopyWRAM
ret
HousePalette:
INCLUDE "gfx/tilesets/house.pal"
LoadRadioTowerPalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, RadioTowerPalette
ld bc, 8 palettes
call FarCopyWRAM
ret
RadioTowerPalette:
INCLUDE "gfx/tilesets/radio_tower.pal"
MansionPalette1:
INCLUDE "gfx/tilesets/mansion_1.pal"
LoadMansionPalette:
ld a, BANK(wBGPals1)
ld de, wBGPals1
ld hl, MansionPalette1
ld bc, 8 palettes
call FarCopyWRAM
ld a, BANK(wBGPals1)
ld de, wBGPals1 palette PAL_BG_YELLOW
ld hl, MansionPalette2
ld bc, 1 palettes
call FarCopyWRAM
ld a, BANK(wBGPals1)
ld de, wBGPals1 palette PAL_BG_WATER
ld hl, MansionPalette1 palette 6
ld bc, 1 palettes
call FarCopyWRAM
ld a, BANK(wBGPals1)
ld de, wBGPals1 palette PAL_BG_ROOF
ld hl, MansionPalette1 palette 8
ld bc, 1 palettes
call FarCopyWRAM
ret
MansionPalette2:
INCLUDE "gfx/tilesets/mansion_2.pal"