Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Decorations.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
2
3EvtScript N(EVS_TexPan_Lava) = {
6 Set(LVar0, 0)
7 Set(LVar1, 0)
8 Loop(0)
11 Sub(LVar0, -300)
12 Sub(LVar1, -500)
13 Wait(1)
15 Return
16 End
17};
18
19EvtScript N(EVS_TexAnim_LavaBubble) = {
22 Set(LVar0, 0)
23 Set(LVar1, 0)
24 Loop(0)
26 Add(LVar0, 0x4000)
27 Add(LVar1, 0)
28 Wait(5)
30 Return
31 End
32};
33
34EvtScript N(EVS_MovingPlatform) = {
35 Set(LVarA, LVar0) // modelID
36 Set(LVar9, LVar1) // start X
37 Set(LVar8, LVar2) // end X
38 Set(LVar7, LVar3) // move time
39 Label(0)
43 Loop(0)
46 Wait(1)
47 IfEq(LVar1, 0)
49 EndIf
54 Loop(0)
57 Wait(1)
58 IfEq(LVar1, 0)
60 EndIf
62 Goto(0)
63 Return
64 End
65};
Bytecode EvtScript[]
@ TEX_PANNER_MAIN
Definition enums.h:4415
@ TEX_PANNER_AUX
Definition enums.h:4416
@ EASING_LINEAR
Definition enums.h:510
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus SetTexPanOffset(Evt *script, b32 isInitialCall)
Sets offsets for texture panners.
ApiStatus TranslateGroup(Evt *script, b32 isInitialCall)
Translates the given group's position.
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus SetTexPanner(Evt *script, b32 isInitialCall)
Sets a model's pannerID and sets the texture pan flag.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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 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 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 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 Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217