Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
smooch.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "sprite/npc/BattleMisstar.h"
4#include "sprite/player.h"
5
6#define NAMESPACE battle_move_smooch
7
9
10#include "common/AddHP.inc.c"
11
12API_CALLABLE(N(SpawnRecoverFX)) {
13 Bytecode* args = script->ptrReadPos;
14 s32 x = evt_get_variable(script, *args++);
15 s32 y = evt_get_variable(script, *args++);
16 s32 z = evt_get_variable(script, *args++);
17 s32 duration = evt_get_variable(script, *args++);
18
19 fx_recover(0, x, y, z, duration);
20
21 return ApiStatus_DONE2;
22}
23
25 { 15, 15 },
26 { -33, 27 },
27 { -22, -26 },
28 { 10, -35 },
29 { 35, 0 },
30};
31
36 Wait(16)
37 Thread
38 Wait(10)
40 Wait(1)
42 Wait(1)
44 Wait(1)
46 Wait(1)
48 Wait(1)
50 Wait(1)
54 Add(LVar1, 25)
55 Add(LVar0, 30)
57 Wait(15)
60 Add(LVar0, 15)
61 Add(LVar1, 15)
62 Add(LVar2, -5)
65 Thread
67 Wait(2)
76 Wait(2)
79 Thread
81 Add(LVar1, 15)
82 Add(LVar0, 5)
85 Add(LVar1, 20)
86 Add(LVar0, 25)
90 Wait(12)
91 Thread
94 Thread
95 Loop(2)
96 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
97 Wait(1)
98 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0))
99 Wait(1)
100 Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0))
101 Wait(1)
102 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0))
103 Wait(1)
104 Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0))
105 Wait(1)
106 Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0))
107 Wait(1)
108 Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0))
109 Wait(1)
110 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.85), Float(1.0))
111 Wait(1)
112 Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.9), Float(1.0))
113 Wait(1)
114 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.95), Float(1.0))
115 Wait(1)
116 EndLoop
117 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
118 Wait(1)
119 Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0))
120 Wait(1)
121 Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0))
122 Wait(1)
123 Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0))
124 Wait(1)
125 Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0))
126 Wait(1)
127 Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0))
128 Wait(1)
129 Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0))
130 Wait(1)
131 Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.3), Float(1.0))
132 Wait(1)
133 Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0))
134 Wait(1)
135 Call(SetActorScale, ACTOR_SELF, Float(0.95), Float(1.1), Float(1.0))
136 Wait(1)
137 Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0))
138 Wait(1)
141 Loop(10)
142 Wait(3)
143 EndLoop
146 Add(LVar0, 0)
147 Add(LVar1, 35)
150 Add(LVar1, 25)
152 Call(N(AddHP), 20)
153 Thread
163 Call(PlayerHopToGoal, 20, 0, 0)
165 Wait(4)
172 Return
173 End
174};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ NPC_BTL_SPIRIT
Definition enums.h:2531
@ EASING_COS_IN_OUT
Definition enums.h:520
@ SOUND_SMOOCH
Definition enums.h:966
@ SOUND_LONG_PLAYER_JUMP
Definition enums.h:782
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1689
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus FadeBackgroundLighten(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
ApiStatus SetNpcRotation(Evt *script, b32 isInitialCall)
ApiStatus ShowStartRecoveryShimmer(Evt *script, b32 isInitialCall)
ApiStatus NpcFlyTo(Evt *script, b32 isInitialCall)
#define LVar6
Definition macros.h:154
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#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 UseBuf(INT_PTR)
Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
Definition macros.h:389
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define Float(DOUBLE)
Definition macros.h:51
#define LVar5
Definition macros.h:153
#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 LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define BufRead2(VAR1, VAR2)
Consumes the next two s32s from the buffer and stores them in the given variables.
Definition macros.h:395
#define PlayEffect(args...)
Definition macros.h:807
#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 LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217