Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
d_down_jump.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
4#include "effects.h"
5#include "sprite/player.h"
6
7#define NAMESPACE battle_move_d_down_jump
8
10
11API_CALLABLE(N(SpawnImpactFX)) {
12 Bytecode* args = script->ptrReadPos;
13 s32 x = evt_get_variable(script, *args++);
14 s32 y = evt_get_variable(script, *args++);
15 s32 z = evt_get_variable(script, *args++);
16
17 if (script->varTable[10] == 0) {
18 fx_green_impact(TRUE, x, y, z, 0.0f);
19 } else {
20 fx_green_impact(FALSE, x, y, z, 0.0f);
21 }
22
23 return ApiStatus_DONE2;
24}
25
29
35 CaseEq(0)
37 CaseEq(1)
39 CaseEq(2)
42 Return
43 End
44};
45
51 Return
52 EndIf
57 Wait(1)
72 Return
80 Wait(5)
96 Wait(1)
101 Return
102 End
103};
104
110 Return
111 EndIf
115 Wait(1)
129 Return
138 Wait(5)
151 Wait(7)
157 Wait(1)
162 Return
163 End
164};
165
171 Return
172 EndIf
176 Wait(1)
190 Return
199 Wait(5)
216 Wait(1)
221 Return
222 End
223};
BSS s32 PopupMenu_SelectedIndex
@ AC_DIFFICULTY_3
Definition action_cmd.h:45
Bytecode EvtScript[]
@ ACTION_COMMAND_JUMP
Definition enums.h:3507
@ ACTOR_SOUND_HURT
Definition enums.h:2070
@ BS_FLAGS1_NO_RATING
Definition enums.h:3610
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3609
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3608
@ BS_FLAGS1_INCLUDE_POWER_UPS
Definition enums.h:3604
@ PLAYER_ULTRA_JUMP_4
Definition enums.h:3902
@ PLAYER_SUPER_JUMP_4
Definition enums.h:3892
@ PLAYER_SUPER_JUMP_5
Definition enums.h:3893
@ HIT_RESULT_NO_DAMAGE
Definition enums.h:1978
@ HIT_RESULT_HIT
Definition enums.h:1976
@ HIT_RESULT_NICE_NO_DAMAGE
Definition enums.h:1979
@ HIT_RESULT_NICE
Definition enums.h:1977
@ HIT_RESULT_MISS
Definition enums.h:1982
@ BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH
Definition enums.h:4435
@ BTL_CAM_PLAYER_PRE_JUMP_FINISH
Definition enums.h:4434
@ BTL_CAM_PLAYER_JUMP_FINISH
Definition enums.h:4442
@ PLAYER_BASIC_JUMP_3
Definition enums.h:3883
@ DMG_SRC_D_DOWN_JUMP
Definition enums.h:2018
@ SOUND_ACTOR_JUMPED_2
Definition enums.h:781
@ SOUND_D_DOWN_HIT_1
Definition enums.h:1550
@ SOUND_ACTOR_JUMPED_1
Definition enums.h:780
@ SOUND_NONE
Definition enums.h:550
@ SOUND_D_DOWN_HIT_3
Definition enums.h:1552
@ SOUND_ACTOR_JUMPED_3
Definition enums.h:782
@ SOUND_D_DOWN_HIT_2
Definition enums.h:1551
@ ACTOR_PLAYER
Definition enums.h:2118
@ ACTOR_BLUR_ENABLE
Definition enums.h:6005
@ ACTOR_BLUR_DISABLE
Definition enums.h:6004
@ DAMAGE_TYPE_IGNORE_DEFENSE
Definition enums.h:2911
@ DAMAGE_TYPE_JUMP
Definition enums.h:2892
#define ApiStatus_DONE2
Definition evt.h:119
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1725
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#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:320
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:564
#define LVarF
Definition macros.h:164
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define EndCaseGroup
Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
Definition macros.h:353
#define CaseOrEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR.
Definition macros.h:342
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:299
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:476
#define LVar2
Definition macros.h:151
#define LVar1
Definition macros.h:150
#define LVarA
Definition macros.h:159
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:363
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:270
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:561
#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:329
#define LVar0
Definition macros.h:149
#define Return
Kills the current EVT thread.
Definition macros.h:218