Alchemy
Loading...
Searching...
No Matches

atalanta.c

Go to the documentation of this file.
1/// @file
2/// The Atalanta summon.
3/// Part of effect.c, the battle effect object, compiled only through it.
4
6
7/// The trail particles' random rotations, 48 bytes each, after the 384
8/// particles in PARTICLES.
9#define ATALANTA_MATRICES (Ram_MapCellBuffer + 0x3800)
10
11/// The pictures in the slash sheet: five flash frames, then the slash in
12/// three parts.
27};
28
29/// Rain of blades: under a violet sky, a 3x3 formation of objects flies along a
30/// stored path while sixteen blades gather trails of light, flash and fly off;
31/// A or B skips ahead.
32///
33/// Abilities: Atalanta (scene kind 4).
34///
35/// Then 24 blades fall diagonally on the targets and burst into flame, hitting
36/// each target as they land.
37///
38/// The gathering lasts up to 220 frames and the fall 88. work->particles holds
39/// the 16 gathering blades and then the falling ones; PARTICLES holds 24 trail
40/// particles for each gathering blade, with their rotations in
41/// ATALANTA_MATRICES. The formation is nine objects in work->objects, released
42/// between the parts. Loads the violet sky into BG1 and scrolls it with
43/// BattleFx_AdvanceScrollOnInterval during the gathering, holding view->busy;
44/// restores gBgScroll[1].x and gives BG1 back with
45/// BattleFx_SetupBlendedDisplay between the parts. Leaves the ember sheet in
46/// Ram_MapCellBuffer, and ends with the transfer callback removed, the
47/// blitters freed and the canvas layer closed.
48///
49/// effect: the targets.
51 s32 point[3];
52 struct EffectPosition screen;
53 struct SpritePlacement position;
54 struct EffectPosition target;
55 BlitterPair draw;
56 void **slots;
57 struct BattleBackgroundView *view;
58 void *canvas;
59 struct BattleEffectWork *work;
60 s8 *path;
61 s32 i;
62 s32 j;
63 s32 frame;
64 u8 *sheet;
65 s32 scrollX;
66 s32 pathX;
67 s32 pathY;
68 s32 row;
69 s32 column;
70
71 // The slots are read from the background's: the effect work, the canvas
72 // and the sheet come before it, the blitters after it.
74 view = slots[0];
78 scrollX = gBgScroll[1].x;
79 work->effect = effect;
80 // Setup: the canvas, with colours 0 and 1 black, is wiped to colour 1 from
81 // the top, so the screen goes black before the formation is spawned.
84 BG_PLTT[0] = 0;
85 BG_PLTT[1] = 0;
91 // The formation: nine objects from resource object 370, sprite priority 1.
92 BattleFx_SpawnObjects(9, 370, 1);
102 /* FAKEMATCH: the one-pass block keeps the table address after the second
103 * read; as no block, 2 instructions differ in tbs-en. */
104 do {
106 } while (0);
107 // The projection centre moves down to line 240 for the gathering;
108 // BattleFx_SetupBlendedDisplay puts it back at 120 between the parts.
109 gProjection.centerY = 240;
110 WaitFrames(1);
111 // The violet sky scrolls one pixel left every four frames.
113 work->scrollTimer = 0;
114 work->scrollInterval = 4;
115 work->scrollStepX = -1;
116 work->scrollStepY = 0;
119 view->busy = 1;
122 pathX = 0;
123 pathY = 0;
124 // Each blade starts at a random spot with 24 trail particles, each on a
125 // random rotation kept in ATALANTA_MATRICES.
126 for (i = 0; i != 16; i++) {
127 struct EffectStep *slash = &work->particles[i];
128
129 slash->x = (Random16() % 96 + 12) << 16;
130 slash->y = ((Random16() & 63) + 32) << 16;
131 slash->velocityX = 0;
132 slash->velocityY = 0;
133 slash->variant = 0;
134 for (j = 0; j != 24; j++) {
135 PARTICLES[i * 24 + j].x = (Random16() & 15) + 48;
140 Transform_Store(ATALANTA_MATRICES + (i * 24 + j) * 48);
141 }
142 }
146 // The gathering: 220 frames, or until A or B is pressed.
147 for (frame = 0; frame != 220 && !(gKeysRepeat & (KEY_A | KEY_B)); frame++) {
148 // The formation follows the path through frame 209: two 16-bit
149 // coordinates, then a signed byte step for each axis every frame. Its
150 // nine objects stand 32 pixels apart, the top-left one at the path
151 // position.
152 if (frame <= 209) {
153 if (frame == 0) {
154 pathX = (path[0] << 8) + (u8)path[1];
155 pathY = (path[2] << 8) + (u8)path[3];
156 path += 4;
157 } else {
158 pathX += path[0];
159 pathY += path[1];
160 path += 2;
161 }
162 position.groundHeight = 0;
163 position.height = 0xff0000;
164 for (row = 0; row != 3; row++) {
165 for (column = 0; column != 3; column++) {
166 position.x = (pathX + 80 + column * 32) << 16;
167 position.y = (64 - pathY + row * 32) << 16;
168 Object_ApplyProjectedPlacementFar(work->objects[row * 3 + column],
169 &position, &gAtalanta_UnitScale, 0);
170 }
171 }
172 }
173 point[1] = 0;
174 point[2] = 0;
175 // From frame 48 the backdrop darkens over 24 frames
176 // (Palette_StepFadeTransfer, which the canvas layer scheduled).
177 if (frame == 48) {
178 work->fadeFrames = 24;
179 work->fadeStep = 0;
180 }
181 // Blade i appears at frame i * 8 + 64: its trails close in for 16
182 // frames, it flashes for 5 (with a sound on the last), and from frame
183 // i * 8 + 85 it flies off, accelerating down and to the left.
184 for (i = 0; i != 16; i++) {
185 s32 start = i * 8 + 64;
186
187 if (frame >= start) {
188 struct EffectStep *slash = &work->particles[i];
189 s32 x = Q_16_16_TO_INT(slash->x);
190 s32 y = Q_16_16_TO_INT(slash->y);
191
192 if (frame == i * 8 + 84)
194 if (frame >= i * 8 + 85) {
195 slash->x += slash->velocityX;
196 slash->y += slash->velocityY;
197 slash->velocityX -= 0x10000;
198 slash->velocityY += 0x20000;
199 draw[0](canvas, work->sheet + ATALANTA_SLASH_TOP, x + 4, y - 40, 16,
200 21);
201 draw[0](canvas, work->sheet + ATALANTA_SLASH_MIDDLE, x - 16, y - 19,
202 29, 35);
203 draw[0](canvas, work->sheet + ATALANTA_SLASH_BOTTOM, x - 20, y + 16,
204 21, 24);
205 } else if (frame >= i * 8 + 80) {
206 // The flash: five pictures, one a frame, the later ones in parts.
207 switch (frame - start - 16) {
208 case 0:
209 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_1, x - 7, y - 14,
210 14, 28);
211 break;
212 case 1:
213 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_2, x - 11,
214 y - 22, 23, 44);
215 break;
216 case 2:
217 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_3_TOP, x - 4,
218 y - 31, 20, 30);
219 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_3_BOTTOM, x - 16,
220 y - 1, 22, 33);
221 break;
222 case 3:
223 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_4_TOP, x + 1,
224 y - 38, 18, 27);
225 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_4_MIDDLE, x - 11,
226 y - 11, 22, 22);
227 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_4_BOTTOM, x - 19,
228 y + 11, 19, 28);
229 break;
230 case 4:
231 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_5_TOP, x + 4,
232 y - 40, 16, 23);
233 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_5_MIDDLE, x - 10,
234 y - 17, 23, 28);
235 draw[0](canvas, work->sheet + ATALANTA_SLASH_FLASH_5_BOTTOM, x - 20,
236 y + 11, 20, 28);
237 break;
238 }
239 } else {
240 // The trails: a particle's x is its distance from the blade (48 to
241 // 63, plain pixels, not 16.16); while it is positive the particle is
242 // drawn on its stored rotation and moves 4 closer, so all are in
243 // within the blade's 16 gathering frames.
244 for (j = 0; j != 24; j++) {
245 struct EffectStep *trail = &PARTICLES[i * 24 + j];
246
247 if (trail->x > 0) {
248 Transform_Load(ATALANTA_MATRICES + (i * 24 + j) * 48);
249 point[0] = trail->x;
250 // The Japanese release draws the blade trails 16 pixels higher;
251 // the later releases move them 16 pixels down.
252#if !TBS_PATCH_1
253 {
254 /* FAKEMATCH: the named result pointer gives the 124-byte frame
255 * and j in a stack slot, as native; as the plain &screen
256 * argument, 372 instructions differ in tbs-ja. */
257 struct EffectPosition *out = &screen;
258
259 EffectPosition_ProjectPoint(point, out);
260 }
261 screen.x = (screen.x >> 1) + x;
262 screen.y = screen.y + y;
263#else
264 EffectPosition_ProjectPoint(point, &screen);
265 screen.x = (screen.x >> 1) + x;
266 screen.y = screen.y + y + 16;
267#endif
268 trail->x -= 4;
269 draw[1](canvas, sheet + gBattleFx_MoteCells[4], screen.x - 2,
270 screen.y - 5, 5, 10);
271 }
272 }
273 }
274 }
275 }
277 }
278 // Between the parts: stop the scroll, give BG1 back to the battle, release
279 // the formation and load the ember streak sheet into the map cell buffer
280 // for the flames.
282 view->busy = 0;
283 gBgScroll[1].x = scrollX;
285 for (i = 0; i != 9; i++)
287 REG_BG2PA = Q_8_8(0.5);
290 Ram_MapCellBuffer, 1, 0);
291 // Second part: aim 32 blades above the field, in pixels, to fall
292 // diagonally: blade i on target i % 6 where there is one, on a random
293 // column otherwise. Only the first 24 fall. The x start allows for the
294 // blade's fall of 6 across for every 12 down, to land on the target's
295 // half-width x.
296 for (i = 0; i != 32; i++) {
297 struct EffectStep *slash = &work->particles[i];
298 s32 member = i % 6;
299
300 if (member < work->effect->count) {
302 &target);
303 slash->y = -((Random16() & 31) + 40);
304 slash->x = target.x / 2 + (80 - slash->y) / 2;
305 } else {
306 slash->x = (Random16() & 63) + 80;
307 slash->y = -((Random16() & 31) + 40);
308 }
309 slash->variant = -1;
310 }
311 // 88 frames: 24 blades fall, blade i from frame 2i (all of them from
312 // frame 41), the lower part cut short near the ground. Past row 79 a
313 // blade lands, shaking the screen and hitting target i % 6 if there is
314 // one, and bursts into flame for 24 frames, its slash still standing for
315 // the first 12.
316 for (frame = 0; frame != 88; frame++) {
317 for (i = 0; i != 24; i++) {
318 struct EffectStep *slash = &work->particles[i];
319
320 if (frame >= i * 2 || frame > 40) {
321 // Landed (variant counts the frames since): the flame's six
322 // pictures, 4 frames each, the two blitters alternating by blade.
323 if (slash->variant >= 0) {
324 if (slash->variant <= 23) {
325 s32 cell = slash->variant / 4;
326 u32 width;
327
328 // UB: width is assigned in one argument and read in another.
329#ifdef UBFIX
330 width = gBattleFx_PuffArcCellWidths[cell];
331 draw[i & 1](canvas,
333 slash->x - (width >> 1) - 8,
334 slash->y + gBattleFx_PuffArcCellBiasY[cell] - 40, width,
336#else
337 draw[i & 1](
339 slash->x - ((width = gBattleFx_PuffArcCellWidths[cell]) >> 1) -
340 8,
341 slash->y + gBattleFx_PuffArcCellBiasY[cell] - 40, width,
343#endif
344 if (slash->variant <= 11) {
345 draw[0](canvas, work->sheet + ATALANTA_SLASH_TOP, slash->x + 4,
346 slash->y - 40, 16, 21);
347 draw[0](canvas, work->sheet + ATALANTA_SLASH_MIDDLE,
348 slash->x - 16, slash->y - 19, 29, 35);
349 }
350 }
351 slash->variant++;
352 } else {
353 s32 height = 24;
354
355 // Falling: the blade's lower part is cut off below row 96.
356 if (slash->y > 56)
357 height = height - slash->y + 56;
358 draw[0](canvas, work->sheet + ATALANTA_SLASH_TOP, slash->x + 4,
359 slash->y - 40, 16, 21);
360 draw[0](canvas, work->sheet + ATALANTA_SLASH_MIDDLE, slash->x - 16,
361 slash->y - 19, 29, 35);
362 if (height > 0)
363 draw[0](canvas, work->sheet + ATALANTA_SLASH_BOTTOM, slash->x - 20,
364 slash->y + 16, 21, height);
365 slash->x -= 6;
366 slash->y += 12;
367 if (slash->y > 79) {
368 s32 member;
369
370 slash->variant = 0;
371 work->shakeFrames = 2;
373 member = i % 6;
374 if (member < work->effect->count) {
377 8);
379 1);
380 }
381 }
382 }
383 }
384 }
385 Camera_ApplyShake(4, 8);
386 EFFECT_END_FRAME(work);
387 }
389}
390
391#undef ATALANTA_MATRICES
@ SPRITE_COLOR_WHITE
solid colour 15, white
Definition animspr.h:26
SlashSheetCell
The pictures in the slash sheet: five flash frames, then the slash in three parts.
Definition atalanta.c:13
@ ATALANTA_SLASH_FLASH_2
Definition atalanta.c:15
@ ATALANTA_SLASH_FLASH_5_TOP
Definition atalanta.c:21
@ ATALANTA_SLASH_BOTTOM
Definition atalanta.c:26
@ ATALANTA_SLASH_FLASH_3_BOTTOM
Definition atalanta.c:17
@ ATALANTA_SLASH_FLASH_5_BOTTOM
Definition atalanta.c:23
@ ATALANTA_SLASH_FLASH_4_MIDDLE
Definition atalanta.c:19
@ ATALANTA_SLASH_FLASH_4_TOP
Definition atalanta.c:18
@ ATALANTA_SLASH_TOP
Definition atalanta.c:24
@ ATALANTA_SLASH_FLASH_4_BOTTOM
Definition atalanta.c:20
@ ATALANTA_SLASH_MIDDLE
Definition atalanta.c:25
@ ATALANTA_SLASH_FLASH_5_MIDDLE
Definition atalanta.c:22
@ ATALANTA_SLASH_FLASH_3_TOP
Definition atalanta.c:16
@ ATALANTA_SLASH_FLASH_1
Definition atalanta.c:14
#define ATALANTA_MATRICES
The trail particles' random rotations, 48 bytes each, after the 384 particles in PARTICLES.
Definition atalanta.c:9
void BattleFx_RunAtalanta(struct BattleEffectArgument *effect)
Rain of blades: under a violet sky, a 3x3 formation of objects flies along a stored path while sixtee...
Definition atalanta.c:50
@ POSE_DAMAGE
taking damage
Definition battle.h:176
@ COMPOSITE_ADDITIVE
@ COMPOSITE_MAX
void BattleFx_ProcessPendingGraphicsTransfer(void)
Copies the canvas to VRAM once the effect has finished drawing a frame (transferPending): the 128x128...
Definition canvas.c:103
void BattleFx_WipeCanvas(s32 mode, s32 value)
Wipes the whole canvas to one colour with a ragged edge: each row (or column) lags a random 0 to 63 p...
Definition canvas.c:27
void BattleFx_ConfigureEffectDisplay(void)
Puts the battle screen back into the display state every effect starts from and ends with: no blendin...
Definition display.c:16
void BattleFx_AdvanceScrollOnInterval(void)
Scrolls BG1 by (scrollStepX, scrollStepY) once every scrollInterval frames.
Definition display.c:37
void Resource_LoadAndDecompress(s32 id, void *dst, s32 skipPalette, s32 copyPalette)
Decompresses a resource whose first 128 bytes may be a palette.
void ObjectGroup_UpdateMembers(s32 actorId, s32 palette, s32 animation, s32 timerSlot, s32 timerFrames)
Updates every animation group of one battler's object.
Definition dispatch.c:254
void BattleFx_SetupBlendedDisplay(void)
Shows the BG1 battle background behind a cleared canvas: clears the canvas buffer and the 16 KiB of V...
Definition dispatch.c:217
void BattleFx_SelectLivingTargets(struct BattleEffectArgument *effect)
Shows the battle objects of every unit with HP left on the targets' side: the enemies (units 128 to 1...
Definition dispatch.c:184
What every part of the battle effect object shares: its includes, macros and frame-loop helpers.
#define EFFECT_SHOW_WIDE_CANVAS(top)
Shows the canvas: the effect display mode, BG2 stretched to twice its width (the 128-pixel canvas sho...
#define EFFECT_PRESENT_FRAME(work)
Ends a frame of a canvas effect: marks the canvas ready for the transfer callback,...
#define EFFECT_SET_TRANSFER(work, mode, value)
Sets how the canvas transfer treats what is left in the canvas after each copy: mode with value (see ...
@ CANVAS_COPY
copy as drawn
@ CANVAS_COPY_AND_FADE
copy, keeping 50% or 75% (transferValue) of each pixel in the canvas for the next frame
#define EFFECT_CALLBACK_ORDER
The scheduler order of every per-frame effect callback (Scheduler_AddOrUpdateCallback sorts the frame...
#define EFFECT_FINISH_CANVAS()
The usual end of a canvas effect: stops the transfer callback before freeing what it reads,...
#define EFFECT_LOAD_BLITTER(slot, flags, mode)
Builds a blitter for the 128x128 canvas (1 << 7 pixels each way) in work slot slot: BattleFx_BuildBli...
#define EFFECT_DISPCNT
The battle screen's display mode while an effect plays: background mode 1 with BG0 to BG2,...
#define EFFECT_END_FRAME(work)
The usual end of an effect frame: counts down the targets' flash timers (ObjectGroup_TickMemberTimers...
#define EFFECT_BEGIN_NARROW_CANVAS(bgControl)
Opens the canvas layer at the canvas's own width, one texel per pixel, where BattleFx_BeginCanvasLaye...
u16 gBattleFx_PuffArcCells[]
u8 gBattleFx_PuffArcCellHeights[]
u8 gBattleFx_PuffArcCellBiasY[]
u16 gBattleFx_MoteCells[]
Mote cells: particle sheets hold ten, cell n (from 0) n + 1 pixels wide and twice that tall.
u8 gBattleFx_PuffArcCellWidths[]
struct SpriteScale gAtalanta_UnitScale
Staged particle scale: Atalanta's formation objects keep this scale, one to one, throughout.
void BattleFx_SpawnObjects(s32 entryCount, s32 source, u32 priority)
Creates the effect's animation objects in gBattleFxWork's objects.
Definition eruption.c:220
void BattleMotion_ApplyVariantMotionFar(s32 id, s32 variant)
void BattleBackground_LoadFar(s32 mode, s32 resource, s32 level)
void Object_ApplyProjectedPlacementFar(struct AnimationObject *sprite, const struct SpritePlacement *position, const struct SpriteScale *scale, s32 facing)
Far call to Render_ApplyProjectedPlacement.
void ResourceObject_ReleaseFar(struct AnimationObject *sprite)
void AudioCommand_PlayFar(s32 id)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
Definition frame.c:97
void Camera_ApplyShake(s32 rangeX, u32 rangeY)
Shakes the battle view while gBattleFxWork's shakeFrames lasts, moving BG1 and the projection centre ...
Definition hail.c:364
@ HEAP_SLOT_BATTLE_EFFECT
Definition heap_state.h:42
@ HEAP_SLOT_BLITTER_ALTERNATE
Definition heap_state.h:47
@ HEAP_SLOT_BATTLE_BACKGROUND
Definition heap_state.h:45
@ HEAP_SLOT_BATTLE_SHEET
Definition heap_state.h:44
@ HEAP_SLOT_BLITTER
Definition heap_state.h:46
@ HEAP_SLOT_BATTLE_CANVAS
Definition heap_state.h:43
#define Q_8_8(n)
The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel.
Definition io_reg.h:59
#define BGCNT_CHAR_BASE(block)
Definition io_reg.h:25
#define BGCNT_256_COLORS
Definition io_reg.h:27
#define BGCNT_PRIORITY(n)
Definition io_reg.h:24
@ KEY_B
Definition io_reg.h:244
@ KEY_A
Definition io_reg.h:243
#define REG_DISPCNT
Definition io_reg.h:9
#define BGCNT_SCREEN_BASE(block)
Definition io_reg.h:28
#define REG_BG2CNT
Definition io_reg.h:21
#define BG_PLTT
Definition io_reg.h:157
#define REG_BG2PA
Definition io_reg.h:61
#define BGCNT_WRAP
Affine backgrounds only: wrap around instead of showing the backdrop.
Definition io_reg.h:30
static s32 Iwram_CopyWords(volatile void *destination, const volatile void *source, s32 size)
Definition iwram_call.h:85
volatile u32 gKeysRepeat
Pressed keys, repeating while held: after 19 frames, then every 6.
struct BgScroll gBgScroll[]
u32 Random16(void)
Advances the game's random number generator (the C library's classic linear congruential one),...
Definition math.c:10
void EffectPosition_ProjectScaledBattler(s32 id, struct EffectPosition *position)
The screen position of a battler, scaled for the battle view, 16 pixels higher.
Definition positions.c:88
s32 EffectPosition_ProjectPoint(const void *point, struct EffectPosition *position)
Projects a point in the current transform onto the screen, 16 pixels higher, and returns the projecti...
Definition positions.c:64
struct Projection gProjection
#define Ram_MapCellBuffer
Definition ram_buffer.h:10
char ResourceId_SlashSheet
char ResourceId_LimePalette
char ResourceId_VioletSkyBackdrop
char ResourceId_ParticleSpritesA
char ResourceId_StagedParticlePath
char ResourceId_EmberStreakSheet
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
Definition scheduler.c:102
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
Definition scheduler.c:146
#define SE_212
Definition songs.h:207
#define SE_HEAVY_IMPACT
Definition songs.h:127
void * gWorkSlot[]
The battle background's work slot as the background code reads it: its display mode (2 draws it as an...
s32 busy
while set, BattleCamera_SetRange leaves BG1's scroll
The command shared by an effect's caller, dispatcher and handlers.
s16 actors[8]
the targets' unit ids, count of them
s32 count
targets in actors, at least 1
The running battle effect's work: its canvas image, 64 particles, the display registers it stages and...
s32 fadeFrames
backdrop fade frames left (Palette_StepFadeTransfer)
s32 frame
frame counter some effects keep, from 0
s32 fadeStep
CANVAS_FADE_STEPs the backdrop has darkened so far.
s32 shakeFrames
shake frames left; Camera_ApplyShake counts down
struct AnimationObject * objects[16]
the effect's animation objects
s32 transferMode
How the canvas transfer callbacks treat the canvas after each copy (enum CanvasTransferMode in effect...
s32 scrollStepY
added to BG1 or BG2 y at each step
s32 scrollTimer
frames since the last interval scroll step
struct BattleEffectArgument * effect
the command being run
s32 scrollStepX
added to BG1 or BG2 x at each step
s32 scrollInterval
frames between interval scroll steps
struct EffectStep particles[64]
free while variant is -1
A point projected onto the screen, with its depth.
Definition effect_step.h:46
s32 y
screen pixels
Definition effect_step.h:59
s32 x
screen pixels
Definition effect_step.h:58
A moving point of an effect: its position, its velocity and a value each effect uses its own way (a s...
Definition effect_step.h:13
s32 velocityX
16.16 fixed-point pixels per frame
Definition effect_step.h:28
s32 variant
each effect's own: a size, a countdown, -1 for idle
Definition effect_step.h:31
s32 x
16.16 fixed-point pixels
Definition effect_step.h:24
s32 y
16.16 fixed-point pixels
Definition effect_step.h:25
s32 velocityY
16.16 fixed-point pixels per frame
Definition effect_step.h:29
s32 centerY
screen pixels
Definition project.h:17
A sprite's screen position and its two vertical offsets, in 16.16 pixels.
s32 x
screen x of the sprite's centre
s32 y
screen y at the ground; sets the depth slot
s32 groundHeight
how far the shadow is raised above y
s32 height
how far the image is raised above y
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
Definition system.c:150
void SceneTransform_ApplyYaw(s32 angle)
Rotates gTransform about the Y axis by angle.
Definition transform.c:113
void Transform_Load(const void *src)
Copies the matrix at src into gTransform. Called by BattleFx_RunAtalanta.
Definition transform.c:44
void SceneTransform_ApplyPitch(s32 angle)
Rotates gTransform about the X axis by angle.
Definition transform.c:97
void Render_ResetTransformState(void)
Allocates the one-level save area (heap slot HEAP_SLOT_TRANSFORM_STACK), clears gTransformStackDepth ...
Definition transform.c:19
void Transform_Store(void *dst)
Copies gTransform to dst. Called by BattleFx_RunAtalanta.
Definition transform.c:39
void SceneTransform_ApplyRoll(s32 angle)
Rotates gTransform about the Z axis by angle.
Definition transform.c:129
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed char s8
Definition types.h:10
unsigned char u8
Definition types.h:11
#define EFFECT_CLIP_BOUNDS
Clips overflow on all four sides.
Definition effect.h:224
#define Q_16_16_TO_INT(v)
Definition effect.h:231
#define PARTICLES
The map cell buffer (gMapCellBuffer), which the effects borrow, has two views here: Ram_MapCellBuffer...
Definition effect.h:221
DrawRectangle BlitterPair[2]
A blitter pair: [0] built in HEAP_SLOT_BLITTER and [1] in HEAP_SLOT_BLITTER_ALTERNATE (BattleFx_Fetch...
Definition effect.h:244