forked from rh-hideout/pokeemerald-expansion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.c
236 lines (202 loc) · 6.31 KB
/
data.c
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
#include "global.h"
#include "malloc.h"
#include "battle.h"
#include "data.h"
#include "graphics.h"
#include "trainer_pools.h"
#include "battle_transition.h"
#include "constants/abilities.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/trainers.h"
#include "constants/battle_ai.h"
const u16 gMinigameDigits_Pal[] = INCBIN_U16("graphics/link/minigame_digits.gbapal");
const u32 gMinigameDigits_Gfx[] = INCBIN_U32("graphics/link/minigame_digits.4bpp.lz");
static const u32 sMinigameDigitsThin_Gfx[] = INCBIN_U32("graphics/link/minigame_digits2.4bpp.lz"); // Unused
#define BATTLER_OFFSET(i) (gHeap + 0x8000 + MON_PIC_SIZE * (i))
const struct SpriteFrameImage gBattlerPicTable_PlayerLeft[] =
{
{BATTLER_OFFSET(0), MON_PIC_SIZE},
{BATTLER_OFFSET(1), MON_PIC_SIZE},
{BATTLER_OFFSET(2), MON_PIC_SIZE},
{BATTLER_OFFSET(3), MON_PIC_SIZE},
};
const struct SpriteFrameImage gBattlerPicTable_OpponentLeft[] =
{
{BATTLER_OFFSET(4), MON_PIC_SIZE},
{BATTLER_OFFSET(5), MON_PIC_SIZE},
{BATTLER_OFFSET(6), MON_PIC_SIZE},
{BATTLER_OFFSET(7), MON_PIC_SIZE},
};
const struct SpriteFrameImage gBattlerPicTable_PlayerRight[] =
{
{BATTLER_OFFSET(8), MON_PIC_SIZE},
{BATTLER_OFFSET(9), MON_PIC_SIZE},
{BATTLER_OFFSET(10), MON_PIC_SIZE},
{BATTLER_OFFSET(11), MON_PIC_SIZE},
};
const struct SpriteFrameImage gBattlerPicTable_OpponentRight[] =
{
{BATTLER_OFFSET(12), MON_PIC_SIZE},
{BATTLER_OFFSET(13), MON_PIC_SIZE},
{BATTLER_OFFSET(14), MON_PIC_SIZE},
{BATTLER_OFFSET(15), MON_PIC_SIZE},
};
const union AnimCmd sAnim_GeneralFrame0[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END,
};
const union AnimCmd sAnim_GeneralFrame3[] =
{
ANIMCMD_FRAME(3, 0),
ANIMCMD_END,
};
// Many of these affine anims seem to go unused, and
// instead SetSpriteRotScale is used to manipulate
// the battler sprites directly (for instance, in AnimTask_SwitchOutShrinkMon).
// Those with explicit indexes are referenced elsewhere.
static const union AffineAnimCmd sAffineAnim_Battler_Normal[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_Flipped[] =
{
AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_Emerge[] =
{
AFFINEANIMCMD_FRAME(0x28, 0x28, 0, 0),
AFFINEANIMCMD_FRAME(0x12, 0x12, 0, 12),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_Return[] =
{
AFFINEANIMCMD_FRAME( -0x2, -0x2, 0, 18),
AFFINEANIMCMD_FRAME(-0x10, -0x10, 0, 15),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_HorizontalSquishLoop[] =
{
AFFINEANIMCMD_FRAME(0xA0, 0x100, 0, 0),
AFFINEANIMCMD_FRAME( 0x4, 0x0, 0, 8),
AFFINEANIMCMD_FRAME(-0x4, 0x0, 0, 8),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd sAffineAnim_Battler_Grow[] =
{
AFFINEANIMCMD_FRAME(0x2, 0x2, 0, 20),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_Shrink[] =
{
AFFINEANIMCMD_FRAME(-0x2, -0x2, 0, 20),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_BigToSmall[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(-0x10, -0x10, 0, 9),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_GrowLarge[] =
{
AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 63),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_TipRight[] =
{
AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 5),
AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 5),
AFFINEANIMCMD_END,
};
const union AffineAnimCmd *const gAffineAnims_BattleSpritePlayerSide[] =
{
[BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Normal,
[BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge,
[BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return,
sAffineAnim_Battler_HorizontalSquishLoop,
sAffineAnim_Battler_Grow,
sAffineAnim_Battler_Shrink,
sAffineAnim_Battler_GrowLarge,
sAffineAnim_Battler_TipRight,
sAffineAnim_Battler_BigToSmall,
};
static const union AffineAnimCmd sAffineAnim_Battler_SpinShrink[] =
{
AFFINEANIMCMD_FRAME(-0x4, -0x4, 4, 63),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_TipLeft[] =
{
AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 5),
AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 5),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_RotateUpAndBack[] =
{
AFFINEANIMCMD_FRAME(0x0, 0x0, -5, 20),
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 20),
AFFINEANIMCMD_FRAME(0x0, 0x0, 5, 20),
AFFINEANIMCMD_END,
};
static const union AffineAnimCmd sAffineAnim_Battler_Spin[] =
{
AFFINEANIMCMD_FRAME(0x0, 0x0, 9, 110),
AFFINEANIMCMD_END,
};
const union AffineAnimCmd *const gAffineAnims_BattleSpriteOpponentSide[] =
{
[BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Normal,
[BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge,
[BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return,
sAffineAnim_Battler_HorizontalSquishLoop,
sAffineAnim_Battler_Grow,
sAffineAnim_Battler_Shrink,
sAffineAnim_Battler_SpinShrink,
sAffineAnim_Battler_TipLeft,
sAffineAnim_Battler_RotateUpAndBack,
sAffineAnim_Battler_BigToSmall,
sAffineAnim_Battler_Spin,
};
const union AffineAnimCmd *const gAffineAnims_BattleSpriteContest[] =
{
[BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Flipped,
[BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge,
[BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return,
sAffineAnim_Battler_HorizontalSquishLoop,
sAffineAnim_Battler_Grow,
sAffineAnim_Battler_Shrink,
sAffineAnim_Battler_SpinShrink,
sAffineAnim_Battler_TipLeft,
sAffineAnim_Battler_RotateUpAndBack,
sAffineAnim_Battler_BigToSmall,
sAffineAnim_Battler_Spin,
};
static const union AnimCmd sAnim_MonPic_0[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END,
};
static const union AnimCmd sAnim_MonPic_1[] =
{
ANIMCMD_FRAME(1, 0),
ANIMCMD_END,
};
const union AnimCmd *const gAnims_MonPic[MAX_MON_PIC_FRAMES] =
{
sAnim_MonPic_0,
sAnim_MonPic_1,
};
const union AnimCmd *const gAnims_Trainer[] ={
sAnim_GeneralFrame0,
sAnim_GeneralFrame0,
};
#include "data/trainer_parties.h"
const struct Trainer gTrainers[DIFFICULTY_COUNT][TRAINERS_COUNT] =
{
#include "data/trainers.h"
};
#include "data/text/follower_messages.h"