Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
mega_quake.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_mega_quake
6
8
9API_CALLABLE(func_802A10A4_756824) {
10 if (isInitialCall) {
11 script->functionTemp[0] = 0;
12 }
13
14 if (script->functionTemp[0] != 0) {
15 if (script->functionTemp[0] != 1) {
16 return ApiStatus_BLOCK;
17 }
18 } else {
19 script->functionTemp[1] = 30;
20 script->functionTemp[0] = 1;
21 }
22
26
27 if (script->functionTemp[1] != 0) {
28 script->functionTemp[1]--;
29 return ApiStatus_BLOCK;
30 } else {
34 return ApiStatus_DONE2;
35 }
36}
37
39
44 CaseEq(0)
45 Set(LVarD, 80) // duration
49 CaseEq(1)
50 Set(LVarD, 80) // duration
54 CaseEq(2)
55 Set(LVarD, 80) // duration
60 Return
61 End
62};
63
67 CaseEq(0)
69 CaseEq(1)
71 CaseEq(2)
74 Thread
75 Wait(8)
77 Add(LVar0, 24)
78 Add(LVar1, 10)
79 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0)
80 Wait(2)
81 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0)
82 Wait(2)
83 PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0)
89 Thread
90 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.3))
91 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5))
92 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0))
93 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5))
94 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.05))
95 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.6))
96 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.15))
97 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.07519531))
99 Thread
101 Add(LVar0, 24)
102 Add(LVar1, 10)
103 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
104 Wait(5)
105 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
106 Wait(5)
107 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0)
108 Wait(5)
109 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0)
111 Thread
112 Wait(10)
113 PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
117 Thread
118 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.24))
119 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2))
120 Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.4))
121 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2))
122 Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.84))
123 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.48))
124 Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.12))
125 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.06))
127 Thread
129 Add(LVar0, 24)
130 Add(LVar1, 10)
131 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0)
132 Wait(5)
133 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0)
134 Wait(5)
135 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0)
136 Wait(5)
137 PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0)
139 Thread
140 Wait(10)
141 PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0)
148 Wait(15)
149 SetF(LVar6, Float(0.0))
150 Loop(10)
151 Set(LVar4, LVar3)
152 Set(LVar5, LVar2)
153 AddF(LVar6, Float(36.0))
155 Set(LVarA, LVarF)
156 PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar3, 1, LVar2, LVar4, 1, LVar5, Float(4.0), 30, 0, 0, 0, 0)
157 Set(LVarF, LVarA)
158 EndLoop
159 Wait(10)
160 Else
163 EndIf
166 CaseEq(0)
168 CaseEq(1)
170 CaseEq(2)
173 Wait(10)
176 CaseEq(0)
178 CaseEq(1)
180 CaseEq(2)
183 Set(LVar9, 0)
185 Label(10)
189 Goto(11)
190 EndIf
198 Label(11)
200 Add(LVar9, 1)
203 Goto(10)
204 EndIf
205 Thread
206 Wait(10)
209 Wait(10)
212 Return
213 End
214};
BSS s32 PopupMenu_SelectedIndex
#define ULTRA_HAMMER_DMG_GOOD
#define ULTRA_HAMMER_DMG_BAD
Bytecode EvtScript[]
@ OVERLAY_BLUR
Definition enums.h:2400
@ 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
@ SCREEN_LAYER_BACK
Definition enums.h:2383
@ ITER_NEXT
Definition enums.h:2025
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_PLAYER_HAMMER_QUAKE
Definition enums.h:4867
@ BTL_CAM_DEFAULT
Definition enums.h:4823
#define SUPPRESS_EVENTS_HAMMER
Definition enums.h:2912
@ SOUND_HAMMER_STRIKE_3
Definition enums.h:1559
@ SOUND_HAMMER_QUAKE_2
Definition enums.h:1561
@ SOUND_HAMMER_QUAKE_1
Definition enums.h:1560
@ SOUND_HAMMER_STRIKE_1
Definition enums.h:1557
@ SOUND_HAMMER_QUAKE_3
Definition enums.h:1562
@ SOUND_HAMMER_STRIKE_2
Definition enums.h:1558
@ BTL_RUMBLE_PLAYER_MAX
Definition enums.h:4262
@ ACTOR_PLAYER
Definition enums.h:2085
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2877
@ DAMAGE_TYPE_QUAKE_HAMMER
Definition enums.h:2871
@ DAMAGE_TYPE_QUAKE
Definition enums.h:2862
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
@ DAMAGE_TYPE_MULTIPLE_POPUPS
Definition enums.h:2879
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_BLOCK
Definition evt.h:116
void set_screen_overlay_params_back(u8, f32)
void set_screen_overlay_center(s32, s32, s32, s32)
ApiStatus AddVectorPolar(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define LVar6
Definition macros.h:154
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define AddF(VAR, FLOAT_VALUE)
Definition macros.h:383
#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 SCREEN_WIDTH
Definition macros.h:109
#define LVarF
Definition macros.h:163
#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 Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
Definition macros.h:278
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:275
#define Float(DOUBLE)
Definition macros.h:51
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define SCREEN_HEIGHT
Definition macros.h:110
#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 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 SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
Definition macros.h:373
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#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 PlayEffect(args...)
Definition macros.h:807
#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 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 LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVarE
Definition macros.h:162
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217