Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
JumpSupport.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
4#include "sprite/player.h"
5
6s32 N(D_802A10F0)[] = {
7 9, 3, 9, 3, 9, 3, 8, 3,
8 7, 3, 6, 2, 5, 2, 4, 2,
9};
10
11API_CALLABLE(N(CalcJumpReboundTime)) {
12 BattleStatus* battleStatus = &gBattleStatus;
13 Actor* playerActor = battleStatus->playerActor;
14 f32 posX = playerActor->curPos.x;
15 f32 posY = playerActor->curPos.y;
16 f32 posZ = playerActor->curPos.z;
17 f32 goalX = playerActor->state.goalPos.x;
18 f32 goalY = playerActor->state.goalPos.y;
19 f32 goalZ = playerActor->state.goalPos.z;
20
21 script->varTable[0] = (dist3D(posX, posY, posZ, goalX, goalY, goalZ) * 15.0f) / 100.0f;
22
23 if (script->varTable[0] > 20) {
24 script->varTable[0] = 20;
25 }
26
28 if (script->varTable[0] < 6) {
29 script->varTable[0] = 6;
30 }
31 } else if (script->varTable[0] < 12) {
32 script->varTable[0] = 12;
33 }
34
35 return ApiStatus_DONE2;
36}
37
38EvtScript N(EVS_CheckForAPress) = {
39 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
40 Loop(5)
41 Call(CheckButtonPress, BUTTON_A, LVar0)
42 IfEq(LVar0, TRUE)
44 EndIf
45 Wait(1)
47 Return
48 End
49};
50
51EvtScript N(EVS_JumpSupport_Approach) = {
52 Call(SetGoalToFirstTarget, ACTOR_SELF)
53 Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2)
54 Sub(LVar0, 40)
55 Call(InitTargetIterator)
56 Call(SetGoalToTarget, ACTOR_PLAYER)
57 Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
58 Sub(LVar3, Float(70.0))
61 EndIf
62 Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5)
63 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH)
64 Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0))
65 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
66 Call(CancelablePlayerRunToGoal, 0, LVar0)
67 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
68 Call(SetGoalToTarget, ACTOR_PLAYER)
69 ExecWait(N(EVS_CheckForAPress))
70 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump)
71 Return
72 End
73};
74
75// calculate time for a jump attack based on player and target positions
76EvtScript N(EVS_JumpSupport_CalcJumpTime) = {
77 Call(SetGoalToTarget, ACTOR_PLAYER)
78 Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8)
79 Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9)
82 Else
85 EndIf
86 // 15 + (abs(goalX - actorX) - 20) / 10.588
87 Sub(LVar6, 20)
88 DivF(LVar6, Float(10.588))
89 AddF(LVar6, 15)
91 Return
92 End
93};
94
95// calculate time for a jump attack based on player and target positions
96// this variation is only used for first strikes with Super Boots
97EvtScript N(EVS_JumpSupport_CalcJumpTime_Alt1) = {
98 Call(SetGoalToTarget, ACTOR_PLAYER)
99 Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8)
100 Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9)
102 Sub(LVar6, LVar7)
103 Else
104 Sub(LVar7, LVar6)
105 Set(LVar6, LVar7)
106 EndIf
107 // 15 + (abs(goalX - actorX) - 20) / 22.5
108 Sub(LVar6, 20)
109 DivF(LVar6, Float(22.5))
110 AddF(LVar6, 15)
111 Set(LVarA, LVar6)
112 Return
113 End
114};
115
116// calculate time for a jump attack based on player and target positions
117// this variation is only used for first strikes with Ultra Boots
118EvtScript N(EVS_JumpSupport_CalcJumpTime_Alt2) = {
119 Call(SetGoalToTarget, ACTOR_PLAYER)
120 Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8)
121 Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9)
123 Sub(LVar6, LVar7)
124 Else
125 Sub(LVar7, LVar6)
126 Set(LVar6, LVar7)
127 EndIf
128 // 22 + (abs(goalX - actorX) - 20) / 18.0
129 Sub(LVar6, 20)
130 DivF(LVar6, Float(18.0))
131 AddF(LVar6, 22)
132 Set(LVarA, LVar6)
133 Return
134 End
135};
136
137// normal dismount after successful follow-up hit
138EvtScript N(EVS_JumpSupport_Rebound) = {
139 Call(PlayerYieldTurn)
140 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
141 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
142 Call(func_802693F0)
143 // jump to position 40 units ahead of home
144 Call(SetGoalToHome, ACTOR_PLAYER)
145 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
146 Add(LVar0, 40)
147 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
148 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
149 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.3))
150 Call(N(CalcJumpReboundTime))
151 Call(PlayerHopToGoal, LVar0, 0, 0)
152 // small second jump 20 units back
153 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
154 Wait(1)
155 Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0)
156 Call(PlayerHopToGoal, 6, 0, 2)
157 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
158 Wait(5)
159 // walk home
160 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
161 Call(SetGoalToHome, ACTOR_PLAYER)
162 Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0))
163 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
164 Call(PlayerRunToGoal, 0)
165 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
166 Return
167 End
168};
169
170// weak dismount after unsuccessful Power/Mega Jump
171EvtScript N(EVS_JumpSupport_WeakRebound) = {
172 Call(PlayerYieldTurn)
173 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
174 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
175 Call(func_802693F0)
176 // jump to position 50 units behind player
177 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
178 Sub(LVar0, 50)
179 Set(LVar1, 0)
180 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
181 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
182 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.8))
183 Call(N(CalcJumpReboundTime))
184 Call(PlayerHopToGoal, LVar0, 0, 0)
185 // small second jump 30 units back
186 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
187 Wait(1)
188 Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0)
189 Call(PlayerHopToGoal, 6, 0, 2)
190 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
191 Wait(2)
192 // walk home
193 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
194 Call(SetGoalToHome, ACTOR_PLAYER)
195 Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0))
196 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
197 Call(PlayerRunToGoal, 0)
198 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
199 Return
200 End
201};
202
203EvtScript N(EVS_JumpSupport_NoFollowUp) = {
204 Call(PlayerYieldTurn)
205 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
206 Call(UseBattleCamPreset, BTL_CAM_PLAYER_MISTAKE)
207 Call(func_802693F0)
208 // jump to position 40 units behind player
209 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
210 Sub(LVar0, 40)
211 Set(LVar1, 0)
212 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
213 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
214 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0))
215 Call(N(CalcJumpReboundTime))
216 Call(PlayerHopToGoal, LVar0, 0, 0)
217 // small second jump 20 units back
218 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
219 Wait(1)
220 Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0)
221 Call(PlayerHopToGoal, 6, 0, 2)
222 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
223 Wait(2)
224 // walk home
225 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
226 Call(SetGoalToHome, ACTOR_PLAYER)
227 Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0))
228 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
229 Call(PlayerRunToGoal, 0)
230 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
231 Return
232 End
233};
234
235// Unused
236EvtScript N(EVS_JumpSupport_UnusedRebound) = {
237 Call(PlayerYieldTurn)
238 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
239 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
240 Call(func_802693F0)
241 // jump to position 60 units behind player
242 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
243 Sub(LVar0, 60)
244 Set(LVar1, 0)
245 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
246 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
247 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.8))
248 Call(N(CalcJumpReboundTime))
249 Call(PlayerHopToGoal, LVar0, 0, 0)
250 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
251 Wait(1)
252 // small second jump 20 units back
253 Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0)
254 Call(PlayerHopToGoal, 6, 0, 2)
255 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land)
256 Wait(2)
257 // walk home
258 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
259 Call(SetGoalToHome, ACTOR_PLAYER)
260 Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0))
261 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
262 Call(PlayerRunToGoal, 0)
263 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
264 Return
265 End
266};
267
268// Unused
269// dismount after hit bouncing all the way to home position
270EvtScript N(EVS_JumpSupport_BouncingRebound) = {
271 Call(PlayerYieldTurn)
272 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
273 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
274 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
275 Call(func_802693F0)
276 // jump to position 60 units ahead of home
277 Call(SetGoalToHome, ACTOR_PLAYER)
278 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
279 Add(LVar0, 60)
280 Set(LVar1, 0)
281 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
282 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0))
283 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Land)
284 Call(N(CalcJumpReboundTime))
285 Call(PlayerHopToGoal, LVar0, 0, 0)
287 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0))
289 // small second jump 30 units back
290 Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0)
291 Call(PlayerHopToGoal, 8, 0, 2)
293 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0))
295 // small third jump 20 units back
296 Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0)
297 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
298 Call(PlayerHopToGoal, 6, 0, 2)
300 Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0))
302 // final small jump to home position (10 units)
303 Call(SetGoalToHome, ACTOR_PLAYER)
304 Call(PlayerHopToGoal, 4, 0, 2)
305 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
306 Return
307 End
308};
309
310EvtScript N(EVS_JumpSupport_Miss) = {
311 Call(SetJumpAnimations, ACTOR_PLAYER, 0, 0, 0, ANIM_Mario1_SpinFall)
312 Call(PlayerLandJump)
313 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_SpinFall)
314 Wait(2)
316 Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0))
318 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP)
319 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp)
320 Wait(10)
321 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff)
322 Wait(20)
323 Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE)
324 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
325 Call(func_802693F0)
326 // walk home
327 Call(EnablePlayerBlur, ACTOR_BLUR_RESET)
328 Call(PlayerYieldTurn)
329 Call(SetGoalToHome, ACTOR_PLAYER)
330 Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0))
331 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run)
332 Call(PlayerRunToGoal, 0)
333 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
334 Return
335 End
336};
337
338// load the action command
339EvtScript N(EVS_JumpSupport_ApproachAndJump) = {
340 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
341 Call(action_command_jump_init)
342 ExecWait(N(EVS_JumpSupport_Approach))
343 ExecWait(N(EVS_JumpSupport_CalcJumpTime))
344 Call(action_command_jump_start, LVarA, 3)
345 Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_MIDAIR)
346 Call(SetGoalToTarget, ACTOR_PLAYER)
347 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp)
348 Call(PlayerBasicJumpToGoal, LVarA, PLAYER_BASIC_JUMP_0)
349 Return
350 End
351};
352
353// Incomplete and unused variation of EVS_JumpSupport_ApproachAndJump at one point intended for Super Jump
354EvtScript N(EVS_JumpSupport_UnusedSuper) = {
355 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
356 Call(action_command_jump_init)
357 ExecWait(N(EVS_JumpSupport_Approach))
358 Call(InitTargetIterator)
359 ExecWait(N(EVS_JumpSupport_CalcJumpTime_Alt1))
360 Set(LVarB, LVarA)
361 Add(LVarB, 14)
362 Add(LVarB, -3)
363 Call(action_command_jump_start, LVarB, 3)
364 Call(UseBattleCamPreset, BTL_CAM_PLAYER_SUPER_JUMP_MIDAIR)
365 Call(SetGoalToTarget, ACTOR_PLAYER)
366 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump)
367 Call(PlayerSuperJumpToGoal, LVarA, PLAYER_SUPER_JUMP_0)
368 Wait(7)
369 Call(GetPlayerActionSuccess, LVar0)
371 CaseGt(0)
372 Call(PlayerSuperJumpToGoal, 3, PLAYER_SUPER_JUMP_1)
374 Call(PlayerSuperJumpToGoal, 5, PLAYER_SUPER_JUMP_1)
376 Return
377 End
378};
379
380// Incomplete and unused variation of EVS_JumpSupport_ApproachAndJump at one point intended for Ultra Jump
381EvtScript N(EVS_JumpSupport_UnusedUltra) = {
382 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
383 Call(action_command_jump_init)
384 ExecWait(N(EVS_JumpSupport_Approach))
385 ExecWait(N(EVS_JumpSupport_CalcJumpTime_Alt2))
386 Call(SetActionDifficultyTable, Ref(N(D_802A10F0)))
387 Set(LVarB, LVarA)
388 Sub(LVarB, 4)
389 Add(LVarB, -3)
390 Call(action_command_jump_start, LVarB, 3)
391 Call(UseBattleCamPreset, BTL_CAM_PLAYER_ULTRA_JUMP_MIDAIR)
392 Call(SetGoalToTarget, ACTOR_PLAYER)
393 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioW2_Carried, ANIM_MarioB1_Stomp)
394 Call(PlayerUltraJumpToGoal, LVarA, PLAYER_ULTRA_JUMP_0)
395 Call(CloseActionCommandInfo)
396 Set(LVar9, 0)
397 Call(GetPlayerActionSuccess, LVar0)
398 IfGt(LVar0, 0)
399 Set(LVar9, 1)
400 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Stomp)
401 Call(SetActorRotation, ACTOR_SELF, 0, 0, 0)
402 Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0)
403 Wait(2)
404 Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
405 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
406 Call(action_command_jump_init)
407 Call(action_command_jump_start, 13, 3)
408 Call(UseBattleCamPreset, BTL_CAM_PLAYER_UNUSED_ULTRA_JUMP)
409 Call(PlayerUltraJumpToGoal, 15, PLAYER_ULTRA_JUMP_2)
410 Goto(10)
411 Else
412 Call(LoadActionCommand, ACTION_COMMAND_JUMP)
413 Call(action_command_jump_init)
414 Call(action_command_jump_start, 2, 3)
415 Call(PlayerUltraJumpToGoal, 4, PLAYER_ULTRA_JUMP_1)
416 Goto(10)
417 EndIf
418 Label(10)
419 Return
420 End
421};
@ ACTION_COMMAND_MODE_NOT_LEARNED
Definition action_cmd.h:38
ActorState state
Vec3f curPos
Bytecode EvtScript[]
@ ACTION_COMMAND_JUMP
Definition enums.h:3473
@ BUTTON_A
Definition enums.h:2790
@ BS_FLAGS1_EXECUTING_MOVE
Definition enums.h:3578
@ PLAYER_ULTRA_JUMP_2
Definition enums.h:4315
@ PLAYER_ULTRA_JUMP_0
Definition enums.h:4313
@ PLAYER_ULTRA_JUMP_1
Definition enums.h:4314
@ PLAYER_SUPER_JUMP_0
Definition enums.h:4303
@ PLAYER_SUPER_JUMP_1
Definition enums.h:4304
@ BTL_CAM_PLAYER_MISTAKE
Definition enums.h:4851
@ BTL_CAM_PLAYER_SUPER_JUMP_MIDAIR
Definition enums.h:4859
@ BTL_CAM_PLAYER_UNUSED_ULTRA_JUMP
Definition enums.h:4861
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ BTL_CAM_PLAYER_JUMP_MIDAIR
Definition enums.h:4856
@ BTL_CAM_PLAYER_ULTRA_JUMP_MIDAIR
Definition enums.h:4860
@ BTL_CAM_PLAYER_ATTACK_APPROACH
Definition enums.h:4848
@ PLAYER_BASIC_JUMP_0
Definition enums.h:4295
@ SOUND_TRIP
Definition enums.h:784
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ ACTOR_BLUR_RESET
Definition enums.h:6415
@ CAM_BATTLE
Definition enums.h:1801
#define ApiStatus_DONE2
Definition evt.h:118
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz)
Definition 43F0.c:677
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 Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define DivF(VAR, FLOAT_VALUE)
Definition macros.h:386
#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 EndChildThread
Marks the end of a child thread block.
Definition macros.h:563
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#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 CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#define BreakLoop
Breaks out of the innermost loop.
Definition macros.h:251
#define LVar8
Definition macros.h:156
#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 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 Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#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 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