Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
sleepy_sheep.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "entity.h"
4#include "ld_addrs.h"
5#include "effects.h"
6#include "sprite/player.h"
7#include "include_asset.h"
8
9#define NAMESPACE battle_item_sleepy_sheep
10
12
14void virtual_entity_set_pos(s32, s32, s32, s32);
15void virtual_entity_set_scale(s32, f32, f32, f32);
17
18extern s32 D_802A3E88_7214D8[];
20extern f32 D_802A3F00_721550[];
21
22BSS s32 D_802A3F54; // unused?
24BSS s32 D_802A3F80[2]; // unused?
26
27API_CALLABLE(N(func_802A123C_71E88C)) {
28 Vec3f* posPtr = &D_802A3F88;
29 s32 entityID;
30 f32 x, y, z;
31 s32 cond;
32 s32 i;
33
34 if (isInitialCall) {
35 script->functionTemp[0] = 0;
36 }
37
38 switch (script->functionTemp[0]) {
39 case 0:
40 posPtr->x = -200.0f;
41 posPtr->z = 10.0f;
42 for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
44 x = D_802A3E88_7214D8[i * 3] + posPtr->x;
45 y = D_802A3E88_7214D8[i * 3 + 1];
46 z = D_802A3E88_7214D8[i * 3 + 2] + posPtr->z;
47 virtual_entity_set_pos(entityID, x, y, z);
49 }
50 script->functionTemp[1] = (gGameStatusPtr->frameCounter % 10) & 0xFFFF;
51 script->functionTemp[0] = 1;
52 break;
53 case 1:
54 posPtr->x += 6.0f;
55 cond = FALSE;
56 if (!((gGameStatusPtr->frameCounter % 3) & 0xFFFF)) {
57 script->functionTemp[1] = (script->functionTemp[1] + 1) % 10;
58 }
59
60 for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
61 entityID = D_802A3F58[i];
62 x = D_802A3E88_7214D8[i * 3] + posPtr->x;
63 y = D_802A3E88_7214D8[i * 3 + 1];
64 z = D_802A3E88_7214D8[i * 3 + 2] + posPtr->z;
65 virtual_entity_set_pos(entityID, x, y, z);
66 if (!cond && script->functionTemp[1] == i && !((gGameStatusPtr->frameCounter % 5) & 0xFFFF)) {
67 if (x > 0.0f) {
68 y = x;
69 if (x > 100.0f) {
70 y = x - 50.0f;
71 }
72 y = rand_int(y);
73 }
74
75 if (x > 40.0f) {
76 x = -(x - 40.0f);
77 }
78 fx_landing_dust(3, x, y, z, 0.0f);
79 cond = TRUE;
80 }
81 }
83 s32 randIdx = rand_int(9);
84
85 x = D_802A3E88_7214D8[randIdx * 3] + posPtr->x;
86 y = D_802A3E88_7214D8[randIdx * 3 + 1];
87 z = D_802A3E88_7214D8[randIdx * 3 + 2] + posPtr->z;
88
89 fx_landing_dust(2, x, y, z, 0.0f);
90 }
91 if (posPtr->x >= 320.0f) {
92 script->functionTemp[0] = 2;
93 }
94 break;
95 case 2:
96 for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
98 }
99 return ApiStatus_DONE2;
100 }
101 return ApiStatus_BLOCK;
102}
103
104API_CALLABLE(N(func_802A1740_71ED90)) {
105 BattleStatus* battleStatus = &gBattleStatus;
106 Actor* player = battleStatus->playerActor;
107 s32 i;
108
109 if (isInitialCall) {
110 script->functionTemp[0] = 0;
111 script->functionTemp[1] = 90;
112 }
113
114 for (i = 0; i < player->targetListLength; i++) {
115 s8 targetIdx = player->targetIndexList[i];
116 SelectableTarget* target = &player->targetData[targetIdx];
117 Actor* targetActor = get_actor(target->actorID);
118 ActorPart* targetPart = get_actor_part(targetActor, target->partID);
119
120 if (targetActor->transparentStatus == 0 && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) {
121 targetActor->yaw += 33.0f;
122 targetActor->yaw = clamp_angle(targetActor->yaw);
123 }
124 }
125
126 if (script->functionTemp[1] != 0) {
127 script->functionTemp[1]--;
128 return ApiStatus_BLOCK;
129 }
130
131 return ApiStatus_DONE2;
132}
133
134API_CALLABLE(N(func_802A1848_71EE98)) {
135 BattleStatus* battleStatus = &gBattleStatus;
136 Actor* player = battleStatus->playerActor;
137 s32 i;
138 s32 cond;
139
140 if (isInitialCall) {
141 script->functionTemp[0] = 0;
142 }
143
144 cond = FALSE;
145
146 for (i = 0; i < player->targetListLength; i++) {
147 s8 targetIdx = player->targetIndexList[i];
148 SelectableTarget* target = &player->targetData[targetIdx];
149 Actor* targetActor = get_actor(target->actorID);
150
151 if (targetActor != NULL) {
152 ActorPart* targetPart = get_actor_part(targetActor, target->partID);
153 if ((targetActor->transparentStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) {
154 if (targetActor->yaw < 360.0f) {
155 targetActor->yaw += 33.0f;
156 if (targetActor->yaw >= 360.0f) {
157 targetActor->yaw = 360.0f;
158 }
159 cond = TRUE;
160 }
161 }
162 }
163 }
164
165 if (!cond) {
166 return ApiStatus_DONE2;
167 }
168 return ApiStatus_BLOCK;
169}
170
172
173static s32 _pad = 0;
174
175#include "battle/move/item/sleepy_sheep1.png.h"
176INCLUDE_IMG("battle/move/item/sleepy_sheep1.png", battle_item_sleepy_sheep1_png);
177INCLUDE_PAL("battle/move/item/sleepy_sheep1.pal", battle_item_sleepy_sheep1_pal);
178
179#include "battle/move/item/sleepy_sheep2.png.h"
180INCLUDE_IMG("battle/move/item/sleepy_sheep2.png", battle_item_sleepy_sheep2_png);
181INCLUDE_PAL("battle/move/item/sleepy_sheep2.pal", battle_item_sleepy_sheep2_pal);
182
183#include "battle/move/item/sleepy_sheep3.png.h"
184INCLUDE_IMG("battle/move/item/sleepy_sheep3.png", battle_item_sleepy_sheep3_png);
185INCLUDE_PAL("battle/move/item/sleepy_sheep3.pal", battle_item_sleepy_sheep3_pal);
186
187Vtx N(model)[] = {
188 { .v = {{ -28, 0, 0 }, FALSE, { 0, 1536 }, { 0, 0, 0, 255 }}},
189 { .v = {{ 27, 0, 0 }, FALSE, { 1792, 1536 }, { 0, 0, 0, 255 }}},
190 { .v = {{ 27, 47, 0 }, FALSE, { 1792, 0 }, { 0, 0, 0, 255 }}},
191 { .v = {{ -28, 47, 0 }, FALSE, { 0, 0 }, { 0, 0, 0, 255 }}},
192};
193
194Gfx N(frame1_displayList)[] = {
195 gsDPPipeSync(),
196 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
197 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
198 gsDPSetTexturePersp(G_TP_PERSP),
199 gsDPSetTextureDetail(G_TD_CLAMP),
200 gsDPSetTextureLOD(G_TL_TILE),
201 gsDPSetTextureLUT(G_TT_NONE),
202 gsDPSetTextureFilter(G_TF_AVERAGE),
203 gsDPSetTextureConvert(G_TC_FILT),
204 gsDPSetTextureLUT(G_TT_RGBA16),
205 gsDPLoadTLUT_pal16(0, battle_item_sleepy_sheep1_pal),
206 gsDPLoadTextureTile_4b(battle_item_sleepy_sheep1_png, G_IM_FMT_CI, battle_item_sleepy_sheep1_png_width, battle_item_sleepy_sheep1_png_height, 0, 0, battle_item_sleepy_sheep1_png_width - 1, battle_item_sleepy_sheep1_png_height - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD),
207 gsSPClearGeometryMode(G_LIGHTING),
208 gsSPClearGeometryMode(G_SHADING_SMOOTH),
209 gsSPVertex(N(model), ARRAY_COUNT(N(model)), 0),
210 gsSP1Triangle(0, 1, 2, 0),
211 gsSP1Triangle(0, 2, 3, 0),
212 gsDPPipeSync(),
213 gsSPEndDisplayList(),
214};
215
216Gfx N(frame2_displayList)[] = {
217 gsDPPipeSync(),
218 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
219 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
220 gsDPSetTexturePersp(G_TP_PERSP),
221 gsDPSetTextureDetail(G_TD_CLAMP),
222 gsDPSetTextureLOD(G_TL_TILE),
223 gsDPSetTextureLUT(G_TT_NONE),
224 gsDPSetTextureFilter(G_TF_AVERAGE),
225 gsDPSetTextureConvert(G_TC_FILT),
226 gsDPSetTextureLUT(G_TT_RGBA16),
227 gsDPLoadTLUT_pal16(0, battle_item_sleepy_sheep2_pal),
228 gsDPLoadTextureTile_4b(battle_item_sleepy_sheep2_png, G_IM_FMT_CI, battle_item_sleepy_sheep2_png_width, battle_item_sleepy_sheep2_png_height, 0, 0, battle_item_sleepy_sheep2_png_width - 1, battle_item_sleepy_sheep2_png_height - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD),
229 gsSPClearGeometryMode(G_LIGHTING),
230 gsSPClearGeometryMode(G_SHADING_SMOOTH),
231 gsSPVertex(N(model), ARRAY_COUNT(N(model)), 0),
232 gsSP1Triangle(0, 1, 2, 0),
233 gsSP1Triangle(0, 2, 3, 0),
234 gsDPPipeSync(),
235 gsSPEndDisplayList(),
236};
237
238Gfx N(frame3_displayList)[] = {
239 gsDPPipeSync(),
240 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
241 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
242 gsDPSetTexturePersp(G_TP_PERSP),
243 gsDPSetTextureDetail(G_TD_CLAMP),
244 gsDPSetTextureLOD(G_TL_TILE),
245 gsDPSetTextureLUT(G_TT_NONE),
246 gsDPSetTextureFilter(G_TF_AVERAGE),
247 gsDPSetTextureConvert(G_TC_FILT),
248 gsDPSetTextureLUT(G_TT_RGBA16),
249 gsDPLoadTLUT_pal16(0, battle_item_sleepy_sheep3_pal),
250 gsDPLoadTextureTile_4b(battle_item_sleepy_sheep3_png, G_IM_FMT_CI, battle_item_sleepy_sheep3_png_width, battle_item_sleepy_sheep3_png_height, 0, 0, battle_item_sleepy_sheep3_png_width - 1, battle_item_sleepy_sheep3_png_height - 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD),
251 gsSPClearGeometryMode(G_LIGHTING),
252 gsSPClearGeometryMode(G_SHADING_SMOOTH),
253 gsSPVertex(N(model), ARRAY_COUNT(N(model)), 0),
254 gsSP1Triangle(0, 1, 2, 0),
255 gsSP1Triangle(0, 2, 3, 0),
256 gsDPPipeSync(),
257 gsSPEndDisplayList(),
258};
259
260EntityModelScript N(modelCommandList) = {
262 ems_Draw(N(frame1_displayList), 2)
263 ems_Draw(N(frame2_displayList), 3)
264 ems_Draw(N(frame1_displayList), 2)
265 ems_Draw(N(frame3_displayList), 2)
267 ems_End
268};
269
270EntityModelScript N(modelCommandList2) = {
272 ems_Draw(N(frame2_displayList),3)
273 ems_Draw(N(frame1_displayList),2)
274 ems_Draw(N(frame3_displayList),2)
275 ems_Draw(N(frame1_displayList),2)
277 ems_End
278};
279
280EntityModelScript N(modelCommandList3) = {
282 ems_Draw(N(frame1_displayList), 2)
283 ems_Draw(N(frame3_displayList), 2)
284 ems_Draw(N(frame1_displayList), 2)
285 ems_Draw(N(frame2_displayList), 3)
287 ems_End
288};
289
290EvtScript N(EVS_UseItem) = {
291 SetConst(LVarA, ITEM_SLEEPY_SHEEP)
292 ExecWait(N(UseItemWithEffect))
293 Call(UseBattleCamPreset, BTL_CAM_REPOSITION)
294 Call(SetBattleCamTarget, -67, -15, -5)
295 Call(SetBattleCamOffsetY, 45)
296 Call(SetBattleCamDist, 169)
297 Call(MoveBattleCamOver, 50)
298 Thread
299 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHEEP_STAMPEDE)
300 Loop(7)
301 Call(StartRumble, BTL_RUMBLE_HIT_MIN)
302 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
303 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
304 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
305 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
306 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
307 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0))
308 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
309 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0))
310 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
311 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.25))
312 Wait(2)
313 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
314 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5))
315 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5))
316 Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2))
317 EndLoop
319 Wait(20)
320 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
321 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
322 Add(LVar1, 32)
324 Wait(30)
325 Call(SetActorYaw, ACTOR_PLAYER, 30)
326 Wait(1)
327 Call(SetActorYaw, ACTOR_PLAYER, 60)
328 Wait(1)
329 Call(SetActorYaw, ACTOR_PLAYER, 90)
330 Wait(1)
331 Call(SetActorYaw, ACTOR_PLAYER, 120)
332 Wait(1)
333 Call(SetActorYaw, ACTOR_PLAYER, 150)
334 Wait(1)
335 Call(SetActorYaw, ACTOR_PLAYER, 180)
336 Thread
337 Call(N(func_802A123C_71E88C))
339 Call(InitTargetIterator)
340 Thread
341 Wait(40)
342 Call(N(func_802A1740_71ED90))
343 Call(N(func_802A1848_71EE98))
345 Call(UseBattleCamPreset, BTL_CAM_DEFAULT)
346 Call(MoveBattleCamOver, 20)
347 Wait(8)
348 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Flail, ANIM_Mario1_Flail, ANIM_Mario1_Fall)
349 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
350 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
351 Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
352 Call(PlayerHopToGoal, 15, 0, 0)
353 Thread
354 Wait(5)
355 Call(SetActorYaw, ACTOR_PLAYER, 150)
356 Wait(1)
357 Call(SetActorYaw, ACTOR_PLAYER, 120)
358 Wait(1)
359 Call(SetActorYaw, ACTOR_PLAYER, 90)
360 Wait(1)
361 Call(SetActorYaw, ACTOR_PLAYER, 60)
362 Wait(1)
363 Call(SetActorYaw, ACTOR_PLAYER, 30)
364 Wait(1)
365 Call(SetActorYaw, ACTOR_PLAYER, 0)
367 Wait(40)
368 Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList)))
369 Set(LVar7, -200)
370 Set(LVar8, 0)
371 Set(LVar9, 0)
373 Call(SetVirtualEntityScale, LVarA, Float(0.711), Float(0.711), Float(0.711))
376 Call(SetOwnerTarget, ACTOR_PLAYER, 0)
377 Call(SetGoalToTarget, ACTOR_PLAYER)
378 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
379 Sub(LVar0, 60)
381 Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
383 Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_BLOCK)
384 Thread
385 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_VacantStare)
386 Call(SetActorScale, ACTOR_PLAYER, Float(1.2), Float(0.9), Float(1.0))
387 Wait(1)
388 Call(SetActorScale, ACTOR_PLAYER, Float(1.3), Float(0.8), Float(1.0))
389 Wait(3)
390 Call(SetActorScale, ACTOR_PLAYER, Float(1.2), Float(0.9), Float(1.0))
391 Wait(1)
392 Call(SetActorScale, ACTOR_PLAYER, Float(1.0), Float(1.0), Float(1.0))
394 PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0)
395 Wait(2)
397 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
398 Add(LVar0, 60)
400 PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0)
401 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
402 Add(LVar0, 20)
404 PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0)
405 Add(LVar0, 10)
407 PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0)
408 Wait(5)
409 Thread
410 Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
411 Add(LVar0, 270)
415 Wait(30)
416 Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES)
417 Call(MoveBattleCamOver, 20)
418 Call(InitTargetIterator)
419 Label(0)
420 Call(SetGoalToTarget, ACTOR_SELF)
421 Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0)
423 Goto(1)
424 EndIf
425 Call(GetItemPower, ITEM_SLEEPY_SHEEP, LVar0, LVar1)
426 Call(MakeStatusField, LVar0, STATUS_FLAG_SLEEP, 100, LVar0)
428 Label(1)
429 Wait(5)
430 Call(ChooseNextTarget, ITER_NEXT, LVar0)
432 Goto(0)
433 EndIf
434 Wait(30)
435 ExecWait(N(PlayerGoHome))
436 Return
437 End
438};
439
441 0, 0, 0,
442 -30, 0, -50,
443 -27, 0, 30,
444 -70, 0, -5,
445 -105, 0, 30,
446 -110, 0, -50,
447 -145, 0, -5,
448 -170, 0, -50,
449 -190, 0, -30,
450 -210, 0, -10,
451};
452
453f32 D_802A3F00_721550[] = { 1.0f, 1.0f, 0.75f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.75f, 0.75f };
454
456 &N(modelCommandList),
457 &N(modelCommandList2),
458 &N(modelCommandList3),
459 &N(modelCommandList),
460 &N(modelCommandList2),
461 &N(modelCommandList3),
462 &N(modelCommandList),
463 &N(modelCommandList2),
464 &N(modelCommandList3),
465 &N(modelCommandList)
466};
s8 transparentStatus
struct SelectableTarget targetData[24]
s8 targetIndexList[24]
Bytecode EvtScript[]
s8 targetListLength
#define rand_int
#define clamp_angle
s32 EntityModelScript[]
Definition entity.h:7
#define ems_Restart
Definition entity.h:49
#define ems_SetRenderMode(mode)
Definition entity.h:51
#define ems_End
Definition entity.h:47
#define ems_Draw(dlist, holdTime)
Definition entity.h:48
@ EMOTE_QUESTION
Definition enums.h:497
@ BS_FLAGS1_TRIGGER_EVENTS
Definition enums.h:3575
@ ITER_NO_MORE
Definition enums.h:2030
@ ITER_NEXT
Definition enums.h:2025
@ ACTOR_EVENT_FLAG_ILLUSORY
Player attacks pass through and miss.
Definition enums.h:3374
@ HIT_RESULT_MISS
Definition enums.h:1956
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_REPOSITION
Definition enums.h:4841
@ BTL_CAM_VIEW_ENEMIES
Definition enums.h:4825
@ EMOTER_POS
Definition enums.h:506
@ STATUS_FLAG_SLEEP
Definition enums.h:2812
@ SOUND_HIT_BLOCK
Definition enums.h:768
@ SOUND_SHEEP_STAMPEDE
Definition enums.h:1172
@ RENDER_MODE_ALPHATEST
Definition enums.h:3276
@ BTL_RUMBLE_HIT_MIN
Definition enums.h:4254
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_SELF
Definition enums.h:2084
@ CAM_BATTLE
Definition enums.h:1801
@ DAMAGE_TYPE_STATUS_ALWAYS_HITS
Definition enums.h:2880
@ DAMAGE_TYPE_NO_CONTACT
Definition enums.h:2878
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_BLOCK
Definition evt.h:116
ActorPart * get_actor_part(Actor *actor, s32 partID)
Definition 190B20.c:1191
Actor * get_actor(s32 actorID)
Definition actor_api.c:155
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityMoveSpeed(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityJumpGravity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityScale(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus ShowEmote(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus GetItemPower(Evt *script, b32 isInitialCall)
ApiStatus VirtualEntityJumpTo(Evt *script, b32 isInitialCall)
ApiStatus VirtualEntityMoveTo(Evt *script, b32 isInitialCall)
#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 Sub(VAR, INT_VALUE)
Definition macros.h:377
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#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 BSS
Definition macros.h:7
#define ARRAY_COUNT(arr)
Definition macros.h:40
#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 ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#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 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 PlayEffect(args...)
Definition macros.h:807
#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 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
BSS Vec3f D_802A3F88
BSS s32 D_802A3F54
BSS s32 D_802A3F80[2]
BSS s32 D_802A3F58[10]
EntityModelScript * D_802A3F28_721578[10]
void virtual_entity_set_pos(s32, s32, s32, s32)
s32 virtual_entity_create(EntityModelScript *)
f32 D_802A3F00_721550[]
void virtual_entity_delete_by_index(s32)
void virtual_entity_set_scale(s32, f32, f32, f32)
s32 D_802A3E88_7214D8[]
struct Actor * playerActor
GameStatus * gGameStatusPtr
Definition main_loop.c:32
BattleStatus gBattleStatus
Definition battle.c:11