Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
hos_02.inc.c
Go to the documentation of this file.
1#include "battle/battle.h"
3
4#define NAMESPACE A(hos_02)
5
6EvtScript N(EVS_PreBattle) = {
10 Set(LVar0, 0)
11 Set(LVar1, 0)
12 Set(LVar2, 0)
13 Set(LVar3, 0)
14 Loop(0)
15 Add(LVar0, -50)
16 Add(LVar1, 300)
17 Add(LVar2, 90)
18 Add(LVar3, -200)
21 Wait(1)
24 Thread
25 Set(LVarA, 0)
26 Label(2)
28 Label(0)
32 Mul(LVar0, 3)
34 Add(LVarA, -3)
36 Wait(1)
37 IfEq(LVar1, 1)
38 Goto(0)
39 EndIf
41 Label(1)
45 Mul(LVar0, 3)
47 Add(LVarA, -3)
49 Wait(1)
50 IfEq(LVar1, 1)
51 Goto(1)
52 EndIf
53 Goto(2)
55 Thread
56 Set(LVarA, 0)
57 Label(2)
58 Call(MakeLerp, -10, 4, 40, EASING_COS_IN_OUT)
59 Label(0)
63 Mul(LVar0, -3)
65 Add(LVarA, -3)
67 Wait(1)
68 IfEq(LVar1, 1)
69 Goto(0)
70 EndIf
71 Call(MakeLerp, 4, -10, 40, EASING_COS_IN_OUT)
72 Label(1)
76 Mul(LVar0, -3)
78 Add(LVarA, -3)
80 Wait(1)
81 IfEq(LVar1, 1)
82 Goto(1)
83 EndIf
84 Goto(2)
86 Return
87 End
88};
89
90EvtScript N(EVS_PostBattle) = {
91 Return
92 End
93};
94
95Stage NAMESPACE = {
96 .texture = "hos_tex",
97 .shape = "hos_bt02_shape",
98 .hit = "hos_bt02_hit",
99 .bg = "nok_bg",
100 .preBattle = &N(EVS_PreBattle),
101 .postBattle = &N(EVS_PostBattle),
102};
Bytecode EvtScript[]
@ TEX_PANNER_MAIN
Definition enums.h:4415
@ TEX_PANNER_AUX
Definition enums.h:4416
@ TEX_PANNER_1
Definition enums.h:4399
@ EASING_COS_IN_OUT
Definition enums.h:520
#define MODEL_o371
#define MODEL_o372
#define MODEL_o375
#define MODEL_o376
ApiStatus TranslateModel(Evt *script, b32 isInitialCall)
Translates the given model's position.
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus SetTexPanOffset(Evt *script, b32 isInitialCall)
Sets offsets for texture panners.
ApiStatus ClampAngleFloat(Evt *script, b32 isInitialCall)
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus SetTexPanner(Evt *script, b32 isInitialCall)
Sets a model's pannerID and sets the texture pan flag.
#define Mul(VAR, INT_VALUE)
Definition macros.h:378
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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 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 LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#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