2#include "message_ids.h"
5#include "sprite/npc/ChuckQuizmo.h"
6#include "sprite/player.h"
8#ifndef CHUCK_QUIZMO_NPC_ID
9 #error CHUCK_QUIZMO_NPC_ID must be defined for Quizmo.inc.c
14 .idle = ANIM_ChuckQuizmo_Idle, \
15 .walk = ANIM_ChuckQuizmo_Walk, \
16 .run = ANIM_ChuckQuizmo_Run, \
17 .chase = ANIM_ChuckQuizmo_Run, \
18 .anim_4 = ANIM_ChuckQuizmo_Idle, \
19 .anim_5 = ANIM_ChuckQuizmo_Idle, \
20 .death = ANIM_ChuckQuizmo_Still, \
21 .hit = ANIM_ChuckQuizmo_Still, \
22 .anim_8 = ANIM_ChuckQuizmo_Run, \
23 .anim_9 = ANIM_ChuckQuizmo_Run, \
24 .anim_A = ANIM_ChuckQuizmo_Run, \
25 .anim_B = ANIM_ChuckQuizmo_Run, \
26 .anim_C = ANIM_ChuckQuizmo_Run, \
27 .anim_D = ANIM_ChuckQuizmo_Run, \
28 .anim_E = ANIM_ChuckQuizmo_Run, \
29 .anim_F = ANIM_ChuckQuizmo_Run, \
109 2, 1, 1, 2, 2, 0, 2, 0,
110 2, 1, 0, 2, 1, 1, 0, 2,
111 0, 2, 1, 0, 0, 2, 1, 0,
112 2, 1, 1, 2, 2, 1, 1, 1,
113 0, 2, 2, 2, 2, 0, 1, 1,
114 2, 1, 2, 1, 2, 0, 0, 1,
115 1, 0, 1, 2, 1, 0, 2, 2,
116 1, 2, 0, 2, 2, 1, 1, 1,
152 u16 curTown1 = (enemy->varTable[0] & 0xFF0000) >> 16;
153 u16 curTown2 = (enemy->varTable[0] & 0xFF0000) >> 16;
154 u16 numMaps = (enemy->varTable[0] & 0xFF00) >> 8;
155 u16 curMap = (enemy->varTable[0] & 0xFF) >> 0;
180 for (i = 0; i < 8; i++) {
192 script->varTable[0] =
true;
195 script->varTable[0] =
false;
237 if (npc !=
nullptr && npc->
flags != 0) {
251 script->functionTemp[0] = 0;
254 script->functionTemp[0] += 8;
255 if (
script->functionTemp[0] > 255) {
256 script->functionTemp[0] = 255;
261 if (
script->functionTemp[0] == 255) {
273 script->functionTemp[0] = 255;
274 script->functionTemp[1] = 0;
277 script->functionTemp[0] -= 8;
278 if (
script->functionTemp[0] < 0) {
279 script->functionTemp[0] = 0;
283 if (
script->functionTemp[0] == 0 &&
script->functionTemp[1] == 0) {
284 script->functionTemp[1] = 1;
285 }
else if (
script->functionTemp[1] == 1) {
291 if (npc !=
nullptr && npc->
flags != 0) {
314 if (quizzesAnswered < 999) {
361 if (
stageData->microphoneRaiseAmt >= 255) {
384 if (
stageData->microphoneRaiseAmt <= 0) {
482 script->functionTemp[0] = 60;
490 script->functionTemp[0]--;
492 if (
script->functionTemp[0] < 0) {
503 script->functionTemp[0] = 60;
511 script->functionTemp[0]--;
513 if (
script->functionTemp[0] < 0) {
530 script->functionTemp[0] = 60;
536 script->functionTemp[0]--;
538 if (
script->functionTemp[0] == 0) {
550 }
else if (result == 2) {
1112#if VERSION_US || VERSION_IQUE
1207 .playerSearchInterval = -1,
BSS s32 PopupMenu_SelectedIndex
void N Quizmo_CreateReactionEffect(void)
void N Quizmo_NPC_OnRender(Npc *npc)
@ QUIZ_ARRAY_INDEX_ORIGIN_Z
@ QUIZ_ARRAY_INDEX_ORIGIN_Y
@ QUIZ_ARRAY_INDEX_ORIGIN_X
@ QUIZ_ARRAY_INDEX_ANSWER_RESULT
@ QUIZ_ARRAY_INDEX_SAVED_FOV
@ QUIZ_ARRAY_ANSWER_RESULT
@ FX_INSTANCE_FLAG_DISMISS
@ STORY_CH0_KAMMY_RETURNED_TO_BOWSER
@ STORY_CH2_BEGAN_PEACH_MISSION
@ STORY_CH1_BEGAN_PEACH_MISSION
@ STORY_CH7_BEGAN_PEACH_MISSION
@ STORY_CH3_BEGAN_PEACH_MISSION
@ STORY_CH6_BEGAN_PEACH_MISSION
@ STORY_CH4_BEGAN_PEACH_MISSION
@ STORY_CH5_STAR_SPRIT_DEPARTED
@ ITEM_ENTITY_FLAG_HIDING
@ PS_FLAG_MOVEMENT_LOCKED
@ ENEMY_FLAG_IGNORE_ENTITY_COLLISION
@ SOUND_LRAW_QUIZ_TICKING
@ SOUND_LRAW_AUDIENCE_MURMUR
#define BASE_PASSIVE_FLAGS
@ NPC_FLAG_IGNORE_WORLD_COLLISION
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
s32 evt_get_variable(Evt *script, Bytecode var)
ItemEntity * get_item_entity(s32 itemEntityIndex)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
void mdl_set_all_tint_type(s32)
f32 evt_get_float_variable(Evt *script, Bytecode var)
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
void * heap_malloc(s32 size)
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
#define ContinueSpeech(ARGS...)
#define SpeakToPlayer(ARGS...)
void kill_enemy(Enemy *enemy)
Npc * get_npc_unsafe(s32 npcID)
Npc * get_npc_by_index(s32 listIndex)
@ GB_ChuckQuizmo_Map
doesnt correspond to mapID
@ GB_ChuckQuizmo_Town
0-6, doesnt correspond to areaID
@ GF_Quizmo_ChangedLocation
ApiStatus GetPlayerPos(Evt *script, bool isInitialCall)
ApiStatus NpcMoveTo(Evt *script, bool isInitialCall)
ApiStatus EnablePartnerAI(Evt *script, bool isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, bool isInitialCall)
ApiStatus UseSettingsFrom(Evt *script, bool isInitialCall)
ApiStatus SetCamLeadPlayer(Evt *script, bool isInitialCall)
ApiStatus SetPlayerAnimation(Evt *script, bool isInitialCall)
ApiStatus AddStarPieces(Evt *script, bool isInitialCall)
ApiStatus SetPanTarget(Evt *script, bool isInitialCall)
ApiStatus NpcFacePlayer(Evt *script, bool isInitialCall)
ApiStatus SetMessageValue(Evt *script, bool isInitialCall)
ApiStatus DisablePartnerAI(Evt *script, bool isInitialCall)
ApiStatus FacePlayerTowardPoint(Evt *script, bool isInitialCall)
ApiStatus GetNpcPos(Evt *script, bool isInitialCall)
ApiStatus ShowChoice(Evt *script, bool isInitialCall)
ApiStatus PlaySound(Evt *script, bool isInitialCall)
ApiStatus SetCamType(Evt *script, bool isInitialCall)
ApiStatus SetCamPitch(Evt *script, bool isInitialCall)
ApiStatus GetCamDistance(Evt *script, bool isInitialCall)
ApiStatus CloseChoice(Evt *script, bool isInitialCall)
ApiStatus DisablePlayerPhysics(Evt *script, bool isInitialCall)
Disables player physics if disable is true, enables it if false.
ApiStatus GetCamType(Evt *script, bool isInitialCall)
ApiStatus SetNpcSprite(Evt *script, bool isInitialCall)
ApiStatus StopSound(Evt *script, bool isInitialCall)
ApiStatus SetNpcPos(Evt *script, bool isInitialCall)
ApiStatus SetCamSpeed(Evt *script, bool isInitialCall)
ApiStatus SetNpcJumpscale(Evt *script, bool isInitialCall)
ApiStatus SetMessageText(Evt *script, bool isInitialCall)
ApiStatus WaitForCam(Evt *script, bool isInitialCall)
ApiStatus PlayerMoveTo(Evt *script, bool isInitialCall)
ApiStatus SetPlayerFlagBits(Evt *script, bool isInitialCall)
ApiStatus SetPlayerPos(Evt *script, bool isInitialCall)
Sets the player position.
ApiStatus PanToTarget(Evt *script, bool isInitialCall)
ApiStatus GetCamPitch(Evt *script, bool isInitialCall)
ApiStatus SetCamDistance(Evt *script, bool isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, bool isInitialCall)
#define ArrayVar(INDEX)
User Word.
#define FLOAT_TO_FIXED(x)
Progammatically converts f32 --> Float.
#define Else
Marks the end of an if statement and the start of the else block.
#define Ref(sym)
Address/pointer constant.
#define DivF(VAR, FLOAT_VALUE)
#define MAX_ITEM_ENTITIES
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define AddF(VAR, FLOAT_VALUE)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define IfGt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR <= RVAR.
#define IsThreadRunning(TID, OUTVAR)
Sets OUTVAR to true/false depending on whether a thread with the given ID exists (i....
#define EndIf
Marks the end of an if statement or an else block.
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
#define IfLe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR > RVAR.
#define BreakLoop
Breaks out of the innermost loop.
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define KillThread(TID)
Kills a thread by its thread ID.
#define UseArray(INT_PTR)
Loads an s32 array pointer into the current thread for use with ArrayVar(INDEX).
#define SetF(VAR, FLOAT_VALUE)
Sets the given variable to a given value, but supports Floats.
#define MulF(VAR, FLOAT_VALUE)
#define ExecGetTID(EVT_SOURCE, OUTVAR)
Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define NPC_DISPOSE_LOCATION
#define SubF(VAR, FLOAT_VALUE)
#define PlayEffect(args...)
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Loop(TIMES)
Marks the beginning of a loop.
#define Exec(EVT_SOURCE)
Launches a new thread.
#define Return
Kills the current EVT thread.
void(* onRender)(struct Npc *)
Run after the display list for this NPC is built.
GameStatus * gGameStatusPtr
u8 * gBackgroundTintModePtr
PlayerStatus gPlayerStatus