Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
spin_smash.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "sprite/player.h"
4
5#define NAMESPACE battle_move_spin_smash
6
7API_CALLABLE(func_802A1000_737890) {
9 Actor* playerActor = battleStatus->playerActor;
10 f32 xPos = playerActor->curPos.x + 20.0f;
11 f32 yPos = playerActor->curPos.y + 15.0f;
12 f32 zPos = playerActor->curPos.z + 5.0f;
13
14 fx_stars_spread(0, xPos, yPos, zPos, 6, 20);
15
16 return ApiStatus_DONE2;
17}
18
19API_CALLABLE(func_802A1074_737904) {
21 Actor* playerActor = battleStatus->playerActor;
22 f32 xPos = playerActor->curPos.x + 20.0f;
23 f32 yPos = playerActor->curPos.y + 15.0f;
24 f32 zPos = playerActor->curPos.z + 5.0f;
25
26 fx_steam_burst(0, xPos, yPos, zPos, 1.0f, 20);
27
28 return ApiStatus_DONE2;
29}
30
32
36
42 CaseEq(0)
43 Set(LVarD, 60) // duration
47 CaseEq(1)
48 Set(LVarD, 60) // duration
52 CaseEq(2)
53 Set(LVarD, 60) // duration
58 Return
59 End
60};
61
67 Set(LVar1, 0)
68 Loop(10)
73 EndIf
74 Wait(1)
75 Add(LVar1, 1)
80 CaseLt(3)
81 Wait(4)
82 CaseLt(5)
83 Wait(3)
84 CaseLt(7)
85 Wait(2)
86 CaseLt(9)
87 Wait(1)
88 CaseLt(11)
89 Wait(0)
98 Wait(8)
102 Loop(45)
103 Wait(1)
107 EndIf
108 EndLoop
109 EndIf
112 Set(LVar1, 0)
113 Loop(30)
114 Wait(1)
116 IfNe(LVar0, 0)
117 IfNe(LVar1, 1)
119 Set(LVar1, 1)
120 EndIf
121 EndIf
125 EndIf
126 EndLoop
127 Label(0)
128 Wait(1)
130 IfEq(LVar0, 0)
131 Goto(0)
132 EndIf
134 Wait(3)
136 Wait(3)
142 Wait(10)
144 Wait(25)
146 Return
147 EndIf
160 Wait(10)
163 Return
169 Thread
170 Set(LVar0, 0)
171 Loop(10)
172 Add(LVar0, 18)
174 Wait(1)
175 EndLoop
177 Wait(10)
181 Return
182 End
183};
184
190 Set(LVar1, 0)
191 Loop(10)
193 IfEq(LVar0, TRUE)
196 EndIf
197 Wait(1)
198 Add(LVar1, 1)
200 EndLoop
203 CaseLt(3)
204 Wait(4)
205 CaseLt(5)
206 Wait(3)
207 CaseLt(7)
208 Wait(2)
209 CaseLt(9)
210 Wait(1)
211 CaseLt(11)
212 Wait(0)
216 Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
220 Wait(8)
224 Loop(45)
225 Wait(1)
229 EndIf
230 EndLoop
231 EndIf
234 Set(LVar1, 0)
235 Loop(30)
236 Wait(1)
238 IfNe(LVar0, 0)
239 IfNe(LVar1, 1)
241 Set(LVar1, 1)
242 EndIf
243 EndIf
247 EndIf
248 EndLoop
249 Label(0)
250 Wait(1)
252 IfEq(LVar0, 0)
253 Goto(0)
254 EndIf
256 Wait(3)
258 Wait(3)
264 Wait(10)
266 Wait(25)
268 Return
269 EndIf
282 Wait(10)
285 Return
291 Thread
292 Set(LVar0, 0)
293 Loop(10)
294 Add(LVar0, 18)
296 Wait(1)
297 EndLoop
299 Wait(10)
303 Return
304 End
305};
306
312 Set(LVar1, 0)
313 Loop(10)
315 IfEq(LVar0, TRUE)
318 EndIf
319 Wait(1)
320 Add(LVar1, 1)
322 EndLoop
325 CaseLt(3)
326 Wait(4)
327 CaseLt(5)
328 Wait(3)
329 CaseLt(7)
330 Wait(2)
331 CaseLt(9)
332 Wait(1)
333 CaseLt(11)
334 Wait(0)
340 Wait(8)
344 Loop(45)
345 Wait(1)
349 EndIf
350 EndLoop
351 EndIf
354 Set(LVar1, 0)
355 Loop(30)
356 Wait(1)
358 IfNe(LVar0, 0)
359 IfNe(LVar1, 1)
361 Set(LVar1, 1)
362 EndIf
363 EndIf
367 EndIf
368 EndLoop
369 Label(0)
370 Wait(1)
372 IfEq(LVar0, 0)
373 Goto(0)
374 EndIf
376 Wait(3)
378 Wait(3)
384 Wait(10)
386 Wait(25)
388 Return
389 EndIf
402 Wait(10)
405 Return
411 Thread
412 Set(LVar0, 0)
413 Loop(10)
414 Add(LVar0, 18)
416 Wait(1)
417 EndLoop
419 Wait(10)
423 Return
424 End
425};
BSS s32 PopupMenu_SelectedIndex
#define BASIC_HAMMER_DMG_GOOD
#define SUPER_HAMMER_DMG_GOOD
#define BASIC_HAMMER_DMG_BAD
#define ULTRA_HAMMER_DMG_GOOD
#define SUPER_HAMMER_DMG_BAD
#define ULTRA_HAMMER_DMG_BAD
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
Vec3f curPos
Bytecode EvtScript[]
@ ACTION_COMMAND_SMASH
Definition enums.h:3474
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3575
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3574
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3570
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1952
@ HIT_RESULT_HIT
Definition enums.h:1950
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1953
@ HIT_RESULT_NICE
Definition enums.h:1951
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_PLAYER_HAMMER_QUAKE
Definition enums.h:4867
@ BTL_CAM_PLAYER_AIM_HAMMER
Definition enums.h:4864
#define SUPPRESS_EVENTS_HAMMER
Definition enums.h:2912
@ DMG_SRC_SPIN_SMASH
Definition enums.h:1990
@ SOUND_HAMMER_WINDUP
Definition enums.h:744
@ SOUND_SPIN_SMASH_1
Definition enums.h:1563
@ SOUND_SPIN_SMASH_3
Definition enums.h:1565
@ SOUND_SPIN_SMASH_2
Definition enums.h:1564
@ BTL_RUMBLE_PLAYER_MIN
Definition enums.h:4258
@ BTL_RUMBLE_PLAYER_HEAVY
Definition enums.h:4260
@ BTL_RUMBLE_PLAYER_LIGHT
Definition enums.h:4259
@ ACTOR_PLAYER
Definition enums.h:2085
@ DAMAGE_TYPE_SPIN_SMASH
Definition enums.h:2876
@ DAMAGE_TYPE_SMASH
Definition enums.h:2857
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:319
#define LVarF
Definition macros.h:163
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:352
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:341
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251
#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 LVarD
Definition macros.h:161
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define CaseLt(RVAR)
Marks the start of a switch case that executes only if LVAR < RVAR. It also marks the end of any prev...
Definition macros.h:325
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
Definition macros.h:328
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVarE
Definition macros.h:162
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217
BattleStatus gBattleStatus
Definition battle.c:11