Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SuperBlock.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "npc.h"
3#include "effects.h"
4#include "hud_element.h"
5
6// ----------------------------------------------------------------
7// Requirements
8
9// GameFlag for super block availability
10#ifndef SUPER_BLOCK_GAMEFLAG
11 #error SUPER_BLOCK_GAMEFLAG is not defined!
12#endif
13
14// MapVar for super block entity ID
15#ifndef SUPER_BLOCK_MAPVAR
16 #error SUPER_BLOCK_MAPVAR is not defined!
17#endif
18
19// ----------------------------------------------------------------
20// User macros
21
22// use this in an EvtScript calling MakeEntity for this super block
23// expects SUPER_BLOCK_GAMEFLAG and SUPER_BLOCK_MAPVAR to be valid
24// expected args are: x, y, z, angle
25#define EVT_MAKE_SUPER_BLOCK(args...) \
26 Call(MakeEntity, Ref(Entity_SuperBlock), args, MAKE_ENTITY_END)\
27 Set(SUPER_BLOCK_MAPVAR, LVar0)\
28 Call(AssignBlockFlag, SUPER_BLOCK_GAMEFLAG)\
29 Call(AssignScript, Ref(N(SuperBlock_OnHit)))
30
31// ----------------------------------------------------------------
32// Implementation
33
34#define SUPER_BLOCK_NUM_ORBS 3
35
36s32 N(SuperBlock_CantUpgradeMessages)[2] = {
37 MSG_Menus_00F0, MSG_Menus_00F1
38};
39
40s16 N(SuperBlock_PartnerIDs)[8] = {
49};
50
51s32 N(SuperBlock_UpgradeDescMessages)[8][2] = {
52 { MSG_Menus_00E0, MSG_Menus_00E1 },
53 { MSG_Menus_00E2, MSG_Menus_00E3 },
54 { MSG_Menus_00E4, MSG_Menus_00E5 },
55 { MSG_Menus_00E6, MSG_Menus_00E7 },
56 { MSG_Menus_00E8, MSG_Menus_00E9 },
57 { MSG_Menus_00EA, MSG_Menus_00EB },
58 { MSG_Menus_00EC, MSG_Menus_00ED },
59 { MSG_Menus_00EE, MSG_Menus_00EF }
60};
61
62f32 N(SuperBlock_UpgradeOrbAngles)[SUPER_BLOCK_NUM_ORBS] = {
63 140.0f, 180.0f, 220.0f
64};
65
66API_CALLABLE(N(SuperBlock_SetOverride40)) {
68 return ApiStatus_DONE2;
69}
70
71API_CALLABLE(N(SuperBlock_ClearOverride40)) {
72 gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
73 return ApiStatus_DONE2;
74}
75
76API_CALLABLE(N(SuperBlock_HideBlockContent)) {
77 entity_upgrade_block_hide_content(evt_get_variable(script, *script->ptrReadPos));
78 return ApiStatus_DONE2;
79}
80
81API_CALLABLE(N(SuperBlock_GetPartnerRank)) {
82 PlayerData* playerData = &gPlayerData;
83 Bytecode* args = script->ptrReadPos;
84 s32 partnerIdx = evt_get_variable(script, *args++);
85 s32 evt_var = *args++;
86
87 playerData->partners[partnerIdx].level++;
88 evt_set_variable(script, evt_var, playerData->partners[partnerIdx].level);
89
90 return ApiStatus_DONE2;
91}
92
93s32 N(SuperBlock_get_partner_rank)(s32 idx, s16 maxLevel) {
94 if (!gPlayerData.partners[idx].enabled) {
95 return -1;
96 }
97
98 if (gPlayerData.partners[idx].level <= maxLevel) {
99 return gPlayerData.partners[idx].level;
100 }
101
102 return -1;
103}
104
105API_CALLABLE(N(SuperBlock_CountEligiblePartners)) {
106 PlayerData* playerData = &gPlayerData;
107 s16 var = script->varTable[12] >= 0;
108 s32 i;
109
110 script->varTable[0] = -1;
111
112 for (i = 1; i < ARRAY_COUNT(playerData->partners); i++) {
113 if (playerData->partners[i].enabled && N(SuperBlock_get_partner_rank)(i, var) != -1) {
114 script->varTable[0] = 1;
115 break;
116 }
117 }
118
119 return ApiStatus_DONE2;
120}
121
122API_CALLABLE(N(SuperBlock_ShowSelectPartnerMenu)) {
123 PlayerData* playerData = &gPlayerData;
124 PopupMenu* popupMenu;
125 s32 partnerID;
126 s32 canUpgradePartner;
127 s32 hasUltraStone;
128 s32 entryIndex;
129 s32 i;
130
131 // create the 'partner upgrade' popup menu
132 if (isInitialCall) {
133 popupMenu = heap_malloc(sizeof(PopupMenu));
134 script->functionTempPtr[2] = popupMenu;
135 hasUltraStone = script->varTable[12] >= 0;
136
137 // build the popup menu entries from unlocked partners
138 entryIndex = 0;
139 for (i = 0; i < ARRAY_COUNT(N(SuperBlock_PartnerIDs)); i++) {
140 partnerID = N(SuperBlock_PartnerIDs)[i];
141 if (playerData->partners[partnerID].enabled) {
142 popupMenu->userIndex[entryIndex] = partnerID;
143 popupMenu->nameMsg[entryIndex] = gPartnerPopupProperties[partnerID].nameMsg;
144 canUpgradePartner = N(SuperBlock_get_partner_rank)(partnerID, hasUltraStone);
145 if (canUpgradePartner >= 0) {
146 popupMenu->ptrIcon[entryIndex] = wPartnerHudScripts[partnerID];
147 popupMenu->enabled[entryIndex] = TRUE;
148 popupMenu->descMsg[entryIndex] = N(SuperBlock_UpgradeDescMessages)[i][canUpgradePartner];
149 } else {
150 popupMenu->ptrIcon[entryIndex] = wDisabledPartnerHudScripts[partnerID];
151 popupMenu->enabled[entryIndex] = FALSE;
152 popupMenu->descMsg[entryIndex] = N(SuperBlock_CantUpgradeMessages)[hasUltraStone];
153 }
154 popupMenu->value[entryIndex] = playerData->partners[partnerID].level;
155 entryIndex++;
156 }
157 }
158
160 popupMenu->numEntries = entryIndex;
161 popupMenu->initialPos = 0;
163 script->functionTemp[0] = 0;
164 }
165
166 // wait for player to close popup
167 popupMenu = script->functionTempPtr[2];
168 if (script->functionTemp[0] == 0) {
169 script->functionTemp[1] = popupMenu->result;
170 if (script->functionTemp[1] == POPUP_RESULT_CHOOSING) {
171 return ApiStatus_BLOCK;
172 }
174 }
175
176 // wait for popup to hide
177 script->functionTemp[0]++;
178 if (script->functionTemp[0] < 15) {
179 return ApiStatus_BLOCK;
180 }
182
183 if (script->functionTemp[1] != POPUP_RESULT_CANCEL) {
184 script->varTable[0] = gPartnerPopupProperties[popupMenu->userIndex[script->functionTemp[1] - 1]].nameMsg;
185 script->varTable[1] = popupMenu->userIndex[script->functionTemp[1] - 1];
186 } else {
187 script->varTable[0] = -1;
188 }
189
190 heap_free(script->functionTempPtr[2]);
191 return ApiStatus_DONE2;
192}
193
194API_CALLABLE(N(SuperBlock_SwitchToPartner)) {
195 switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
196 return ApiStatus_DONE2;
197}
198
199API_CALLABLE(N(SuperBlock_LoadCurrentPartnerName)) {
201 return ApiStatus_DONE2;
202}
203
204API_CALLABLE(N(SuperBlock_StartGlowEffect)) {
205 Bytecode* args = script->ptrReadPos;
206 s32 entityIdx = evt_get_variable(script, *args++);
207 Entity* entity = get_entity_by_index(entityIdx);
208 s32 effectPtrOutVar = *args++;
209 EffectInstance* effectInst = fx_energy_orb_wave(0, entity->pos.x, entity->pos.y + 12.5f, entity->pos.z, 0.7f, 0);
210
211 evt_set_variable(script, effectPtrOutVar, (s32) effectInst);
212 return ApiStatus_DONE2;
213}
214
215API_CALLABLE(N(SuperBlock_EndGlowEffect)) {
216 EffectInstance* effect = (EffectInstance*)evt_get_variable(script, *script->ptrReadPos);
217
219 return ApiStatus_DONE2;
220}
221
222API_CALLABLE(N(SuperBlock_GatherEnergyFX)) {
223 Entity* entity = get_entity_by_index(evt_get_variable(script, *script->ptrReadPos));
224
225 fx_radial_shimmer(4, entity->pos.x, entity->pos.y + 12.5f, entity->pos.z, 1.0f, 75);
226 return ApiStatus_DONE2;
227}
228
229API_CALLABLE(N(SuperBlock_RadiateFaintEnergyFX)) {
231
232 fx_radial_shimmer(9, npc->pos.x, npc->pos.y + 12.5f, npc->pos.z, 1.0f, 30);
233 return ApiStatus_DONE2;
234}
235
250
251API_CALLABLE(N(SuperBlock_AnimateEnergyOrbs)) {
252 Bytecode* args = script->ptrReadPos;
253 Npc* partner = get_npc_safe(NPC_PARTNER);
254 EnergyOrbSet* userData;
255 f32 sinTheta, cosTheta;
256 f32 x;
257 f32 t1;
258 s32 i;
259
260 sin_cos_deg(gCameras[gCurrentCameraID].curYaw, &sinTheta, &cosTheta);
261
262 if (isInitialCall) {
263 script->userData = (EnergyOrbSet*)general_heap_malloc(sizeof(EnergyOrbSet));
264 userData = (EnergyOrbSet*)script->userData;
265
266 userData->superBlock = get_entity_by_index(evt_get_variable(script, *args++));
267
268 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
269 userData->orbEffects[i] = (EffectInstance*)fx_motion_blur_flame(0, userData->superBlock->pos.x,
270 userData->superBlock->pos.y + 12.5f, userData->superBlock->pos.z, 1.0f, -1);
271 t1 = 0.0f;
272 userData->posZ[i] = t1;
273 userData->posY[i] = t1;
274 userData->posX[i] = t1;
275 userData->partnerPosZ[i] = t1;
276 userData->partnerPosY[i] = t1;
277 userData->partnerPosX[i] = t1;
278 }
279
280 userData->scatterState = 0;
281 userData->gatherState = 0;
282 userData->scatterStateTime = 0;
283 userData->gatherStateTime = 0;
284
285 t1 = 50.0f;
286 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
287 x = 0.0f;
288 add_vec2D_polar(&x, &userData->partnerPosY[i], t1, N(SuperBlock_UpgradeOrbAngles)[i]);
289 userData->partnerPosX[i] = cosTheta * x;
290 userData->partnerPosZ[i] = sinTheta * x;
291 userData->partnerPosX[i] = partner->pos.x - (userData->superBlock->pos.x + userData->partnerPosX[i]);
292 userData->partnerPosY[i] = partner->pos.y - (userData->superBlock->pos.y + userData->partnerPosY[i]);
293 userData->partnerPosZ[i] = partner->pos.z - (userData->superBlock->pos.z + userData->partnerPosZ[i]);
294 }
295 }
296
297 userData = (EnergyOrbSet*)script->userData;
298 switch (userData->scatterState) {
299 case 0:
300 t1 = update_lerp(EASING_CUBIC_OUT, 0.0f, 50.0f, userData->scatterStateTime, 20 * DT);
301 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
302 x = userData->posY[i] = 0.0f;
303 add_vec2D_polar(&x, &userData->posY[i], t1, N(SuperBlock_UpgradeOrbAngles)[i]);
304 userData->posX[i] = cosTheta * x;
305 userData->posZ[i] = sinTheta * x;
306 }
307
308 userData->scatterStateTime++;
309 if (userData->scatterStateTime >= (s32)(21 * DT)) {
310 userData->scatterState = 1;
311 userData->scatterStateTime = 0;
312 }
313 break;
314 case 1:
315 t1 = 50.0f;
316 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
317 x = userData->posY[i] = 0.0f;
318 add_vec2D_polar(&x, &userData->posY[i], t1, N(SuperBlock_UpgradeOrbAngles)[i]);
319 userData->posX[i] = cosTheta * x;
320 userData->posZ[i] = sinTheta * x;
321 }
322
323 userData->scatterStateTime++;
324 if (userData->scatterStateTime > (s32)(15 * DT)) {
325 userData->scatterStateTime = 15 * DT;
326 userData->scatterState = 2;
327 }
328 break;
329 case 2:
330 userData->scatterStateTime++;
331 if (userData->scatterStateTime > (s32)(30 * DT)) {
332 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
333 userData->orbEffects[i]->flags |= FX_INSTANCE_FLAG_DISMISS;
334 }
335 return ApiStatus_DONE2;
336 }
337 break;
338 }
339
340 switch (userData->gatherState) {
341 case 0:
342 userData->gatherStateTime++;
343 if (userData->gatherStateTime > (s32)(15 * DT)) {
344 userData->gatherState = 1;
345 userData->gatherStateTime = 0;
346 }
347 break;
348 case 1:
349 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
350 userData->posX[i] += update_lerp(EASING_QUADRATIC_IN, 0.0f, userData->partnerPosX[i], userData->gatherStateTime, 20 * DT);
351 userData->posY[i] += update_lerp(EASING_QUADRATIC_IN, 0.0f, userData->partnerPosY[i], userData->gatherStateTime, 20 * DT);
352 userData->posZ[i] += update_lerp(EASING_QUADRATIC_IN, 0.0f, userData->partnerPosZ[i], userData->gatherStateTime, 20 * DT);
353 }
354
355 userData->gatherStateTime++;
356 if (userData->gatherStateTime > (s32)(20 * DT)) {
357 userData->gatherState = 2;
358 userData->gatherStateTime = 0;
359 }
360 break;
361 }
362
363 for (i = 0; i < SUPER_BLOCK_NUM_ORBS; i++) {
364 userData->orbEffects[i]->data.motionBlurFlame->pos.x = userData->posX[i];
365 userData->orbEffects[i]->data.motionBlurFlame->pos.y = userData->posY[i];
366 userData->orbEffects[i]->data.motionBlurFlame->pos.z = userData->posZ[i];
367 }
368
369 return ApiStatus_BLOCK;
370}
371
372API_CALLABLE(N(SuperBlock_WhiteScreenFlash)) {
373 Bytecode* args = script->ptrReadPos;
374 s32 ret = ApiStatus_BLOCK;
375
376 if (isInitialCall) {
377 script->varTable[0] = evt_get_variable(script, *args++);
378 script->varTable[1] = evt_get_variable(script, *args++);
379 script->functionTemp[0] = 0;
380 script->functionTemp[1] = 0;
382 }
383
384 switch (script->functionTemp[0]) {
385 case 0:
386 if (script->functionTemp[1] == 255) {
387 script->functionTemp[0] = 1;
388 script->functionTemp[2] = 0;
389 }
390 script->functionTemp[1] += script->varTable[0];
391 if (script->functionTemp[1] > 255) {
392 script->functionTemp[1] = 255;
393 }
394 break;
395
396 case 1:
397 script->functionTemp[2]++;
398 if (script->functionTemp[2] >= 2) {
399 script->functionTemp[0] = 2;
400 }
401 break;
402
403 case 2:
404 if (script->functionTemp[1] == 0) {
405 ret = ApiStatus_DONE1;
406 }
407 script->functionTemp[1] -= script->varTable[1];
408 if (script->functionTemp[1] < 0) {
409 script->functionTemp[1] = 0;
410 }
411 break;
412 }
413
415
416 return ret;
417}
418
419API_CALLABLE(N(SuperBlock_PartnerSparkles2)) {
420 Npc* partner = get_npc_safe(NPC_PARTNER);
421 fx_sparkles(FX_SPARKLES_2, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f);
422 return ApiStatus_DONE2;
423}
424
425API_CALLABLE(N(SuperBlock_PartnerSparkles4)) {
426 Npc* partner = get_npc_safe(NPC_PARTNER);
427 fx_sparkles(FX_SPARKLES_4, partner->pos.x, partner->pos.y + 30.0f, partner->pos.z, 30.0f);
428 return ApiStatus_DONE2;
429}
430
431API_CALLABLE(N(SuperBlock_WaitForPlayerToLand)) {
432 script->varTable[0] = FALSE;
434 script->varTable[0] = TRUE;
435 }
436 return ApiStatus_DONE2;
437}
438
439EvtScript N(SuperBlock_ShowUpgradeEffects) = {
440 Wait(10 * DT)
442 Call(N(SuperBlock_GatherEnergyFX), SUPER_BLOCK_MAPVAR)
443 Wait(85 * DT)
444 Thread
446 Call(N(SuperBlock_WhiteScreenFlash), 70, 70)
447 Wait(27 * DT)
449 Call(N(SuperBlock_WhiteScreenFlash), 50, 50)
451 Thread
452 Wait(3)
453 Call(N(SuperBlock_HideBlockContent), SUPER_BLOCK_MAPVAR)
455 Thread
456 Wait(47 * DT)
457 Call(N(SuperBlock_RadiateFaintEnergyFX))
458 Call(N(SuperBlock_PartnerSparkles2))
459 Wait(5 * DT)
460 Call(N(SuperBlock_PartnerSparkles4))
461 Wait(5 * DT)
462 Call(N(SuperBlock_PartnerSparkles2))
464 Wait(3)
465 Call(N(SuperBlock_AnimateEnergyOrbs), SUPER_BLOCK_MAPVAR)
466 Wait(30 * DT)
467 Return
468 End
469};
470
471EvtScript N(SuperBlock_OnHit) = {
472 IfEq(SUPER_BLOCK_GAMEFLAG, 1)
473 Return
474 EndIf
476 IfEq(LVar0, 1)
477 Return
478 EndIf
479 Call(N(SuperBlock_WaitForPlayerToLand))
480 IfEq(LVar0, 1)
481 Return
482 EndIf
484 Call(N(SuperBlock_SetOverride40))
488 Call(N(SuperBlock_StartGlowEffect), SUPER_BLOCK_MAPVAR, LVar9)
489 Call(FindItem, ITEM_ULTRA_STONE, LVarC)
490 Call(N(SuperBlock_CountEligiblePartners))
491 IfEq(LVar0, -1)
492 Call(ShowMessageAtScreenPos, MSG_Menus_00DC, 160, 40)
493 Wait(10)
494 Call(N(SuperBlock_EndGlowEffect), LVar9)
498 Call(N(SuperBlock_ClearOverride40))
499 Return
500 EndIf
503 Call(ShowMessageAtScreenPos, MSG_Menus_00DA, 160, 40)
504 Else
505 Call(ShowMessageAtScreenPos, MSG_Menus_00DB, 160, 40)
506 EndIf
507 Call(N(SuperBlock_ShowSelectPartnerMenu))
508 IfEq(LVar0, -1)
509 Call(N(SuperBlock_EndGlowEffect), LVar9)
513 Call(N(SuperBlock_ClearOverride40))
514 Return
515 EndIf
516 Set(LVarA, LVar0)
517 Set(LVarB, LVar1)
521 Call(N(SuperBlock_SwitchToPartner), LVarB)
522 Else
524 EndIf
525 Wait(10 * DT)
526 Call(ShowMessageAtScreenPos, MSG_Menus_00DF, 160, 40)
527 Call(ShowChoice, MSG_Choice_000D)
529 IfNe(LVar0, 0)
530 Call(N(SuperBlock_EndGlowEffect), LVar9)
534 Call(N(SuperBlock_ClearOverride40))
535 Return
536 EndIf
537 ExecWait(N(SuperBlock_ShowUpgradeEffects))
538 Call(N(SuperBlock_GetPartnerRank), LVarB, LVarD)
539 Set(SUPER_BLOCK_GAMEFLAG, 1)
540 Call(N(SuperBlock_EndGlowEffect), LVar9)
541 Call(N(SuperBlock_LoadCurrentPartnerName))
542 IfEq(LVarD, 1)
543 Call(ShowMessageAtScreenPos, MSG_Menus_00DD, 160, 40)
544 Else
545 Call(ShowMessageAtScreenPos, MSG_Menus_00DE, 160, 40)
546 EndIf
550 Call(N(SuperBlock_ClearOverride40))
551 Return
552 End
553};
PartnerPopupProperties gPartnerPopupProperties[]
Definition 5B320.c:331
void create_standard_popup_menu(PopupMenu *popup)
#define SUPER_BLOCK_NUM_ORBS
s32 N SuperBlock_get_partner_rank(s32 idx, s16 maxLevel)
Entity * superBlock
EffectInstance * orbEffects[3]
PartnerData partners[12]
Bytecode EvtScript[]
#define general_heap_malloc
@ FX_SPARKLES_2
Definition effects.h:236
@ FX_SPARKLES_4
Definition effects.h:238
@ FX_INSTANCE_FLAG_DISMISS
Definition enums.h:3517
@ OVERLAY_VIEWPORT_COLOR
Definition enums.h:2389
@ SCREEN_LAYER_FRONT
Definition enums.h:2382
@ POPUP_MENU_UPGRADE_PARTNER
Definition enums.h:3135
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ NPC_PARTNER
Definition enums.h:2528
@ POPUP_RESULT_CANCEL
Definition enums.h:3178
@ POPUP_RESULT_CHOOSING
Definition enums.h:3177
@ EASING_CUBIC_OUT
Definition enums.h:515
@ EASING_QUADRATIC_IN
Definition enums.h:511
@ SOUND_RELEASE_ENERGY
Definition enums.h:1578
@ SOUND_GROW
Definition enums.h:1435
@ SOUND_GATHER_ENERGY
Definition enums.h:1579
@ PARTNER_BOMBETTE
Definition enums.h:2888
@ PARTNER_LAKILESTER
Definition enums.h:2893
@ PARTNER_WATT
Definition enums.h:2891
@ PARTNER_BOW
Definition enums.h:2894
@ PARTNER_SUSHIE
Definition enums.h:2892
@ PARTNER_PARAKARRY
Definition enums.h:2889
@ PARTNER_KOOPER
Definition enums.h:2887
@ PARTNER_GOOMBARIO
Definition enums.h:2886
@ GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS
Definition enums.h:4339
@ GLOBAL_OVERRIDES_40
Definition enums.h:4325
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
Definition enums.h:3006
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
#define ApiStatus_DONE1
Definition evt.h:117
#define ApiStatus_BLOCK
Definition evt.h:116
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
f32 update_lerp(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration)
Definition 43F0.c:735
void hide_popup_menu(void)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1847
void set_screen_overlay_params_front(u8, f32)
void destroy_popup_menu(void)
s32 heap_free(void *ptr)
Definition heap.c:42
void sin_cos_deg(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:720
void switch_to_partner(s32 arg0)
Definition partners.c:906
void set_screen_overlay_color(s32, u8, u8, u8)
void set_message_text_var(s32 msgID, s32 index)
Definition msg.c:1520
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Definition 43F0.c:685
void entity_upgrade_block_hide_content(s32)
Definition SuperBlock.c:40
void * heap_malloc(s32 size)
Definition heap.c:34
HudScript * wDisabledPartnerHudScripts[]
Definition partners.c:136
s32 userIndex[32]
HudScript * wPartnerHudScripts[]
Definition partners.c:130
s32 nameMsg[32]
HudScript * ptrIcon[32]
s32 value[32]
s32 enabled[32]
s32 descMsg[32]
Npc * get_npc_safe(s32 npcID)
Definition npc.c:1010
@ GF_Tutorial_SuperBlock
has learned about super blocks
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus ModifyGlobalOverrideFlags(Evt *script, b32 isInitialCall)
ApiStatus DisablePartnerAI(Evt *script, b32 isInitialCall)
ApiStatus IsStartingConversation(Evt *script, b32 isInitialCall)
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus GetCurrentPartnerID(Evt *script, b32 isInitialCall)
ApiStatus EnablePartnerAI(Evt *script, b32 isInitialCall)
ApiStatus ShowChoice(Evt *script, b32 isInitialCall)
ApiStatus CloseMessage(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)
ApiStatus func_802CF56C(Evt *script, b32 isInitialCall)
ApiStatus ShowMessageAtScreenPos(Evt *script, b32 isInitialCall)
ApiStatus FindItem(Evt *script, b32 isInitialCall)
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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 LVarC
Definition macros.h:160
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVarB
Definition macros.h:159
#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 DT
Definition macros.h:522
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define LVarD
Definition macros.h:161
#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 LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217
Vec3f pos
s32 gOverrideFlags
Definition main_loop.c:11
PartnerStatus gPartnerStatus
Definition partners.c:42
Camera gCameras[4]
Definition cam_main.c:17
PlayerData gPlayerData
Definition 77480.c:40
s32 gCurrentCameraID
Definition cam_math.c:4