Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
StarBeamSupport.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "sprite/player.h"
4
5EvtScript N(EVS_PlayBeamFX) = {
7 PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0)
8 Wait(5)
9 PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0)
10 IfEq(LVarA, 1)
11 Wait(5)
12 PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0)
13 EndIf
15 Wait(20)
16 PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.0), 30, 0)
17 Return
18 End
19};
20
21s32 N(SpiritsFlyDelay)[] = { 35, 0, 5, 10, 15, 20, 25, 30 };
22s32 N(SpiritsFlyAwayDelay)[] = { 35, 0, 5, 10, 15, 20, 25, 30 };
23
24f32 N(SpiritsScatterPos)[] = {
25 89.0f, 180.0f, 0.0f,
26 -36.0f, 180.0f, 0.0f,
27 204.0f, 180.0f, 0.0f,
28 30.0f, 97.0f, 477.0f,
29 230.0f, 81.0f, 0.0f,
30 129.0f, 180.0f, 0.0f,
31 -60.0f, 180.0f, 0.0f,
32 -234.0f, 39.0f, 0.0f,
33};
34
35enum {
49};
50
51BSS EffectInstance* N(BeamEffect);
52BSS char N(padding)[4];
53BSS s32 N(MiscParticlesTimeLeft)[8];
54BSS s32 N(SpiritsMoveTime)[8];
55BSS s32 N(StarBeamStage);
56
57API_CALLABLE(N(ProcessPeachStarBeam)) {
58 PeachStarBeamFXData* effectData;
59 PeachStarBeamSpirit* spirit;
60 Bytecode* args = script->ptrReadPos;
62 ActorState* playerState = &player->state;
63 s32 i;
64 f32 currentPosX, currentPosY, currentPosZ;
65 f32 targetPosX, targetPosY, targetPosZ;
66 f32 goalPosX, goalPosY, goalPosZ;
67 s32 cond;
68 Evt* newScript;
69 f32 dist;
70
71 enum {
72 FT_STATE = 0,
73 FT_DELAY = 1,
74 FT_IS_PEACH_BEAM = 2,
75 };
76
77 if (isInitialCall) {
78 N(StarBeamStage) = 0;
79 script->functionTemp[FT_IS_PEACH_BEAM] = evt_get_variable(script, *args++);
80 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_CREATE_EFFECT;
81 }
82
83 if (player->targetListLength == 1) {
84 Actor* target = get_actor(player->targetActorID);
85 if (target == NULL) {
86 return ApiStatus_DONE2;
87 }
88 get_actor_part(target, player->targetPartID);
89 targetPosX = target->curPos.x + target->headOffset.x;
90 if (target->flags & ACTOR_FLAG_UPSIDE_DOWN) {
91 targetPosY = target->curPos.y + target->headOffset.y - target->size.y;
92 } else if (!(target->flags & ACTOR_FLAG_HALF_HEIGHT)) {
93 targetPosY = target->curPos.y + target->headOffset.y + target->size.y;
94 } else {
95 targetPosY = target->curPos.y + target->headOffset.y + target->size.y * 2;
96 }
97 targetPosZ = target->curPos.z + target->headOffset.z;
98 } else {
99 targetPosX = 64.0f;
100 targetPosY = 80.0f;
101 targetPosZ = 0.0f;
102 }
103
104 switch (script->functionTemp[FT_STATE]) {
114 effectData = N(BeamEffect)->data.peachStarBeam;
115 for (i = 0; i < ARRAY_COUNT(effectData->spirits); i++) {
116 if (script->functionTemp[FT_IS_PEACH_BEAM] || i != 0) {
117 spirit = &effectData->spirits[i];
118 if (N(MiscParticlesTimeLeft)[i] != 0) {
119 N(MiscParticlesTimeLeft)[i]--;
120 } else {
121 N(MiscParticlesTimeLeft)[i] = 20;
122 if (N(SpiritsFlyDelay)[i] <= 0) {
123 fx_misc_particles(4, spirit->lockedPos.x, spirit->lockedPos.y, spirit->lockedPos.z, 20.0f, 20.0f, 1.0f, 10, 20);
124 } else {
125 fx_misc_particles(4, spirit->pos.x, spirit->pos.y, spirit->pos.z, 20.0f, 20.0f, 1.0f, 10, 20);
126 }
127 }
128 }
129 }
130 break;
132 effectData = N(BeamEffect)->data.peachStarBeam;
133 for (i = 0; i < ARRAY_COUNT(effectData->spirits); i++) {
134 if (script->functionTemp[FT_IS_PEACH_BEAM] || i != 0) {
135 spirit = &effectData->spirits[i];
136 if (N(MiscParticlesTimeLeft)[i] != 0) {
137 N(MiscParticlesTimeLeft)[i]--;
138 } else {
139 N(MiscParticlesTimeLeft)[i] = 20;
140 if (N(SpiritsFlyAwayDelay)[i] <= 0) {
141 fx_misc_particles(4, spirit->lockedPos.x, spirit->lockedPos.y, spirit->lockedPos.z, 20.0f, 20.0f, 1.0f, 10, 20);
142 } else {
143 fx_misc_particles(4, spirit->pos.x, spirit->pos.y, spirit->pos.z, 20.0f, 20.0f, 1.0f, 10, 20);
144 }
145 }
146 }
147 }
148 break;
149 }
150
151 switch (script->functionTemp[FT_STATE]) {
153 currentPosX = player->curPos.x;
154 currentPosY = player->curPos.y + player->size.y + 30.0f;
155 currentPosZ = player->curPos.z;
156
157 playerState->curPos.x = currentPosX;
158 playerState->curPos.y = currentPosY + 150.0f;
159 playerState->curPos.z = currentPosZ;
160
161 playerState->goalPos.x = currentPosX;
162 playerState->goalPos.y = currentPosY;
163 playerState->goalPos.z = currentPosZ;
164
165 if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
166 N(BeamEffect) = fx_peach_star_beam(0, currentPosX, currentPosY, currentPosZ, 1.0f, 0);
167 } else {
168 N(BeamEffect) = fx_peach_star_beam(1, currentPosX, currentPosY, currentPosZ, 1.0f, 0);
169 }
170 playerState->dist = 48.0f;
171 N(BeamEffect)->data.peachStarBeam->unk_3C = 0;
172 N(BeamEffect)->data.peachStarBeam->circleRadius = playerState->dist;
173 N(BeamEffect)->data.peachStarBeam->beamAlpha = 0;
174 N(BeamEffect)->data.peachStarBeam->twinkYOffset = 30.0f;
175 N(BeamEffect)->data.peachStarBeam->rotSpeed = 5.0f;
176 for (i = 0; i < ARRAY_COUNT(N(MiscParticlesTimeLeft)); i++) {
177 N(MiscParticlesTimeLeft)[i] = rand_int(20);
178 }
179
180 script->functionTemp[FT_DELAY] = 40;
181 if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
183 } else {
185 }
186 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_SPIRITS_APPEAR;
187 break;
189 playerState->curPos.y += (playerState->goalPos.y - playerState->curPos.y) / 10.0f;
190 N(BeamEffect)->data.peachStarBeam->circleCenter.x = playerState->curPos.x;
191 N(BeamEffect)->data.peachStarBeam->circleCenter.y = playerState->curPos.y;
192 N(BeamEffect)->data.peachStarBeam->circleCenter.z = playerState->curPos.z;
193 N(BeamEffect)->data.peachStarBeam->unk_3C = 0;
194 N(BeamEffect)->data.peachStarBeam->circleRadius = playerState->dist;
195 N(BeamEffect)->data.peachStarBeam->beamAlpha = 0;
196 if (script->functionTemp[FT_DELAY] == 0) {
197 script->functionTemp[FT_DELAY] = 20;
198 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_ZOOM_OUT;
199 } else {
200 script->functionTemp[FT_DELAY]--;
201 }
202 break;
204 if (script->functionTemp[FT_DELAY] == 0) {
206 btl_cam_move(10);
207 script->functionTemp[FT_DELAY] = 15;
208 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_SHRINK_CIRCLE;
209 } else {
210 script->functionTemp[FT_DELAY]--;
211 }
212 break;
214 playerState->dist += (24.0f - playerState->dist) * 0.125f;
215 N(BeamEffect)->data.peachStarBeam->circleRadius = playerState->dist;
216 if (script->functionTemp[FT_DELAY] == 0) {
217 playerState->goalPos.x = targetPosX;
218 playerState->goalPos.y = targetPosY;
219 playerState->goalPos.z = targetPosZ;
220 for (i = 0; i < ARRAY_COUNT(N(SpiritsMoveTime)); i++) {
221 N(SpiritsMoveTime)[i] = 30;
222 }
223
224 if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
226 } else {
228 }
229 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_FLY_TO_TARGET;
230 } else {
231 script->functionTemp[FT_DELAY]--;
232 }
233 break;
235 cond = FALSE;
236 playerState->dist += (48.0f - playerState->dist) * 0.25f;
237 N(BeamEffect)->data.peachStarBeam->circleRadius = playerState->dist;
238 for (i = 0; i < 2; i++) {
239 if (i != 0) {
240 spirit = &effectData->spirits[i];
241 if (N(SpiritsFlyDelay)[i] < 0) {
242 currentPosX = playerState->curPos.x;
243 currentPosY = playerState->curPos.y;
244 currentPosZ = playerState->curPos.z;
245
246 goalPosX = playerState->goalPos.x;
247 goalPosY = playerState->goalPos.y;
248 goalPosZ = playerState->goalPos.z;
249
250 playerState->curPos.x += goalPosX - currentPosX;
251 playerState->curPos.y += goalPosY - currentPosY;
252 playerState->curPos.z += goalPosZ - currentPosZ;
253 } else {
254 cond = TRUE;
255 if (N(SpiritsFlyDelay)[i] != 0) {
256 N(SpiritsFlyDelay)[i]--;
257 } else {
258 currentPosX = playerState->curPos.x;
259 currentPosY = playerState->curPos.y;
260 currentPosZ = playerState->curPos.z;
261 goalPosX = playerState->goalPos.x;
262 goalPosY = playerState->goalPos.y;
263 goalPosZ = playerState->goalPos.z;
264 dist = dist2D(currentPosX, currentPosZ, goalPosX, goalPosZ);
265 playerState->curPos.x += (goalPosX - currentPosX) / N(SpiritsMoveTime)[i];
266 playerState->curPos.y += (goalPosY - currentPosY) / N(SpiritsMoveTime)[i];
267 playerState->curPos.z += (goalPosZ - currentPosZ) / N(SpiritsMoveTime)[i];
268 if (N(SpiritsMoveTime)[i] == 1) {
269 N(SpiritsFlyDelay)[i] = -1;
270 playerState->curPos.x = goalPosX;
271 playerState->curPos.y = goalPosY;
272 playerState->curPos.z = goalPosZ;
273 } else {
274 playerState->curPos.y += dist / 60.0f;
275 }
276 N(SpiritsMoveTime)[i]--;
277 }
278 }
279 }
280 }
281
282 N(BeamEffect)->data.peachStarBeam->circleCenter.x = playerState->curPos.x;
283 N(BeamEffect)->data.peachStarBeam->circleCenter.y = playerState->curPos.y;
284 N(BeamEffect)->data.peachStarBeam->circleCenter.z = playerState->curPos.z;
285 N(BeamEffect)->data.peachStarBeam->pos.x = playerState->curPos.x;
286 N(BeamEffect)->data.peachStarBeam->pos.y = 0.0f;
287 N(BeamEffect)->data.peachStarBeam->pos.z = playerState->curPos.z;
288 if (!cond) {
289 playerState->curPos.x = playerState->goalPos.x;
290 playerState->curPos.y = playerState->goalPos.y;
291 playerState->curPos.z = playerState->goalPos.z;
292 N(BeamEffect)->data.peachStarBeam->circleCenter.x = playerState->curPos.x;
293 N(BeamEffect)->data.peachStarBeam->circleCenter.y = playerState->curPos.y;
294 N(BeamEffect)->data.peachStarBeam->circleCenter.z = playerState->curPos.z;
295 N(BeamEffect)->data.peachStarBeam->pos.x = playerState->curPos.x;
296 N(BeamEffect)->data.peachStarBeam->pos.y = 0.0f;
297 N(BeamEffect)->data.peachStarBeam->pos.z = playerState->curPos.z;
298 effectData = N(BeamEffect)->data.peachStarBeam;
299 for (i = 0; i < ARRAY_COUNT(effectData->spirits); i++) {
300 if (script->functionTemp[FT_IS_PEACH_BEAM] || i != 0) {
301 spirit = &effectData->spirits[i];
302 N(SpiritsFlyDelay)[i] = 1;
303 spirit->flags &= ~2;
304 }
305 }
306
308 btl_cam_move(30);
309 script->functionTemp[FT_DELAY] = 15;
310 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_MAKE_ADDITIONAL_EFFECTS;
311 }
312 break;
314 if (script->functionTemp[FT_DELAY] == 0) {
315 playerState->moveTime = 0;
316 N(BeamEffect)->data.peachStarBeam->unk_3C = 0;
317 N(BeamEffect)->data.peachStarBeam->beamAlpha = 0;
318 if (script->functionTemp[FT_IS_PEACH_BEAM]) {
319 N(BeamEffect)->data.peachStarBeam->primR = 240;
320 N(BeamEffect)->data.peachStarBeam->primG = 80;
321 N(BeamEffect)->data.peachStarBeam->primB = 200;
322 N(BeamEffect)->data.peachStarBeam->envR = 240;
323 N(BeamEffect)->data.peachStarBeam->envG = 240;
324 N(BeamEffect)->data.peachStarBeam->envB = 240;
325 }
326 newScript = start_script(&N(EVS_PlayBeamFX), EVT_PRIORITY_A, 0);
327
328 newScript->varTable[0] = playerState->curPos.x;
329 newScript->varTable[1] = playerState->curPos.y * 0.5f;
330 newScript->varTable[2] = playerState->curPos.z;
331 newScript->varTable[10] = script->functionTemp[FT_IS_PEACH_BEAM];
332
334 script->functionTemp[FT_DELAY] = 45;
335 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_MAKE_BEAM;
336 } else {
337 script->functionTemp[FT_DELAY]--;
338 }
339 break;
341 playerState->moveTime += 30;
342 if (playerState->moveTime > 255) {
343 playerState->moveTime = 255;
344 }
345 N(BeamEffect)->data.peachStarBeam->unk_3C = playerState->moveTime;
346 N(BeamEffect)->data.peachStarBeam->beamAlpha = playerState->moveTime;
347 if (script->functionTemp[FT_DELAY] == 0) {
348 N(StarBeamStage) = 1;
349 if (!script->functionTemp[FT_IS_PEACH_BEAM] && player->targetListLength == 1) {
351 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_IMMUNE;
352 } else {
353 script->functionTemp[FT_DELAY] = 15;
354 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_WAIT;
355 }
356 } else {
357 script->functionTemp[FT_DELAY] = 15;
358 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_WAIT;
359 }
360 } else {
361 script->functionTemp[FT_DELAY]--;
362 }
363 break;
365 if (script->functionTemp[FT_DELAY] == 0) {
366 script->functionTemp[FT_DELAY] = 10;
367 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_FADE_OUT_BEAM;
368 } else {
369 script->functionTemp[FT_DELAY]--;
370 }
371 break;
373 playerState->moveTime -= 30;
374 if (playerState->moveTime < 0) {
375 playerState->moveTime = 0;
376 }
377 N(BeamEffect)->data.peachStarBeam->unk_3C = playerState->moveTime;
378 N(BeamEffect)->data.peachStarBeam->beamAlpha = playerState->moveTime;
379 if (script->functionTemp[FT_DELAY] == 0) {
380 script->functionTemp[FT_DELAY] = 10;
381 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_START_FLY_AWAY;
382 } else {
383 script->functionTemp[FT_DELAY]--;
384 }
385 break;
387 if (script->functionTemp[FT_DELAY] != 0) {
388 script->functionTemp[FT_DELAY]--;
389 break;
390 }
391 playerState->goalPos.x = targetPosX;
392 playerState->goalPos.y = targetPosY + 170.0f;
393 playerState->goalPos.z = targetPosZ;
394 script->functionTemp[FT_DELAY] = 20;
395 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_SPIRITS_FLY_AWAY;
396 break;
398 if (script->functionTemp[FT_DELAY] != 0) {
399 script->functionTemp[FT_DELAY]--;
400 if (script->functionTemp[FT_DELAY] == 0) {
401 if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
404 } else {
407 }
408 }
409 }
410 cond = FALSE;
411 effectData = N(BeamEffect)->data.peachStarBeam;
412 for (i = 0; i < ARRAY_COUNT(effectData->spirits); i++) {
413 if (script->functionTemp[FT_IS_PEACH_BEAM] || i != 0) {
414 spirit = &effectData->spirits[i];
415 if (N(SpiritsFlyAwayDelay)[i] >= 0) {
416 cond = TRUE;
417 if (N(SpiritsFlyAwayDelay)[i] != 0) {
418 N(SpiritsFlyAwayDelay)[i]--;
419 } else {
420 spirit->flags |= 2;
421 currentPosY = spirit->lockedPos.y;
422 spirit->lockedPos.y += (playerState->goalPos.y - currentPosY) / 10.0f;
423 if (fabsf(spirit->lockedPos.y - playerState->goalPos.y) < 1.0) {
424 N(SpiritsFlyAwayDelay)[i] = -1;
425 }
426 }
427 }
428 }
429 }
430
431 if (!cond) {
432 N(StarBeamStage) = 2;
433 N(BeamEffect)->flags |= FX_INSTANCE_FLAG_DISMISS;
434 return ApiStatus_DONE2;
435 }
436 break;
438 N(BeamEffect)->data.peachStarBeam->unk_3C = 0;
439 N(BeamEffect)->data.peachStarBeam->beamAlpha = 0;
440 for (i = 0; i < ARRAY_COUNT(N(SpiritsMoveTime)); i++) {
441 N(SpiritsMoveTime)[i] = 15;
442 }
443
444 if (!script->functionTemp[FT_IS_PEACH_BEAM]) {
446 } else {
448 }
449 script->functionTemp[FT_STATE] = PEACH_STAR_BEAM_SPIRITS_SCATTER;
450 break;
452 cond = FALSE;
453 effectData = N(BeamEffect)->data.peachStarBeam;
454 for (i = 0; i < ARRAY_COUNT(effectData->spirits); i++) {
455 if (script->functionTemp[FT_IS_PEACH_BEAM] || i != 0) {
456 spirit = &effectData->spirits[i];
457 if (N(SpiritsFlyDelay)[i] < 0) {
458 currentPosX = spirit->lockedPos.x;
459 currentPosY = spirit->lockedPos.y;
460 currentPosZ = spirit->lockedPos.z;
461
462 goalPosX = N(SpiritsScatterPos)[3 * i + 0];
463 goalPosY = N(SpiritsScatterPos)[3 * i + 1];
464 goalPosZ = N(SpiritsScatterPos)[3 * i + 2];
465
466 spirit->lockedPos.x += goalPosX - currentPosX;
467 spirit->lockedPos.y += goalPosY - currentPosY;
468 spirit->lockedPos.z += goalPosZ - currentPosZ;
469 } else {
470 cond = TRUE;
471 if (N(SpiritsFlyDelay)[i] != 0) {
472 N(SpiritsFlyDelay)[i]--;
473 } else {
474 currentPosX = spirit->lockedPos.x;
475 currentPosY = spirit->lockedPos.y;
476 currentPosZ = spirit->lockedPos.z;
477
478 spirit->flags |= 2;
479
480 goalPosX = N(SpiritsScatterPos)[3 * i + 0];
481 goalPosY = N(SpiritsScatterPos)[3 * i + 1];
482 goalPosZ = N(SpiritsScatterPos)[3 * i + 2];
483 dist = dist2D(currentPosX, currentPosZ, goalPosX, goalPosZ);
484 spirit->lockedPos.x += (goalPosX - currentPosX) / N(SpiritsMoveTime)[i];
485 spirit->lockedPos.y += (goalPosY - currentPosY) / N(SpiritsMoveTime)[i];
486 spirit->lockedPos.z += (goalPosZ - currentPosZ) / N(SpiritsMoveTime)[i];
487 if (N(SpiritsMoveTime)[i] == 1) {
488 N(SpiritsFlyDelay)[i] = -1;
489 spirit->lockedPos.x = goalPosX;
490 spirit->lockedPos.y = goalPosY;
491 spirit->lockedPos.z = goalPosZ;
492 } else {
493 spirit->lockedPos.y += dist / 60.0f;
494 }
495 N(SpiritsMoveTime)[i]--;
496 }
497 }
498 }
499 }
500
501 if (!cond) {
502 N(StarBeamStage) = 2;
503 N(BeamEffect)->flags |= FX_INSTANCE_FLAG_DISMISS;
504 return ApiStatus_DONE2;
505 }
506 break;
507 }
508 return ApiStatus_BLOCK;
509}
510
511API_CALLABLE(N(GetStage)) {
512 script->varTable[0] = N(StarBeamStage);
513 return ApiStatus_DONE2;
514}
515
516API_CALLABLE(N(unkStarBeamBgFunc)) {
517 if (isInitialCall) {
518 script->functionTemp[0] = 230;
519 }
520
521 mdl_set_shroud_tint_params(0, 0, 0, script->functionTemp[0]);
522
523 script->functionTemp[0] -= 5;
524 if (script->functionTemp[0] <= 200) {
525 mdl_set_shroud_tint_params(0, 0, 0, 200);
526 return ApiStatus_DONE2;
527 }
528
529 return ApiStatus_BLOCK;
530}
@ PEACH_STAR_BEAM_START_FLY_AWAY
@ PEACH_STAR_BEAM_ZOOM_OUT
@ PEACH_STAR_BEAM_SPIRITS_FLY_AWAY
@ PEACH_STAR_BEAM_SPIRITS_APPEAR
@ PEACH_STAR_BEAM_CREATE_EFFECT
@ PEACH_STAR_BEAM_FADE_OUT_BEAM
@ PEACH_STAR_BEAM_MAKE_BEAM
@ PEACH_STAR_BEAM_SHRINK_CIRCLE
@ PEACH_STAR_BEAM_WAIT
@ PEACH_STAR_BEAM_IMMUNE
@ PEACH_STAR_BEAM_FLY_TO_TARGET
@ PEACH_STAR_BEAM_MAKE_ADDITIONAL_EFFECTS
@ PEACH_STAR_BEAM_SPIRITS_SCATTER
Vec3s headOffset
ActorState state
s16 targetActorID
Vec2bu size
Vec3f curPos
Bytecode EvtScript[]
s8 targetListLength
#define rand_int
PeachStarBeamSpirit spirits[8]
Definition effects.h:2182
@ FX_INSTANCE_FLAG_DISMISS
Definition enums.h:3517
@ ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED
Actor glows and listens for Star Beam and Peach Beam events.
Definition enums.h:3386
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ SOUND_ID_TRIGGER_CHANGE_SOUND
Definition enums.h:532
@ SOUND_LRAW_USE_PEACH_BEAM
Definition enums.h:970
@ SOUND_LRAW_USE_STAR_BEAM
Definition enums.h:969
@ SOUND_LOOP_USE_PEACH_BEAM
Definition enums.h:1686
@ SOUND_STAR_BEAM_FIRE
Definition enums.h:971
@ SOUND_LOOP_USE_STAR_BEAM
Definition enums.h:1685
@ ACTOR_FLAG_HALF_HEIGHT
Definition enums.h:3335
@ ACTOR_FLAG_UPSIDE_DOWN
HP bar offset below actor (e.g. Swooper when upside-down).
Definition enums.h:3331
@ EVT_PRIORITY_A
Definition evt.h:153
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
#define ApiStatus_BLOCK
Definition evt.h:116
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
f32 fabsf(f32 f)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:670
void btl_cam_use_preset(s32)
Definition camera.c:1919
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:1191
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
void btl_cam_move(s16)
Definition camera.c:1953
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
Definition model.c:3906
void snd_stop_tracking_env_sound_pos(s32 soundID, s32 keepPlaying)
Definition sfx.c:447
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define BSS
Definition macros.h:7
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define Float(DOUBLE)
Definition macros.h:51
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define PlayEffect(args...)
Definition macros.h:807
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217
struct Actor * playerActor
BattleStatus gBattleStatus
Definition battle.c:11