3API_CALLABLE(func_8005DB00);
4API_CALLABLE(func_8005DD54);
5API_CALLABLE(func_8005DDF0);
88API_CALLABLE(func_8005DB00) {
90 f32 targetDir, npcYaw;
99 script->functionTemp[0] = 0;
102 switch (script->functionTemp[0]) {
108 npc->
curAnim = script->varTable[10];
109 script->functionTemp[0] = 1;
122 npcYaw = script->functionTemp[1] == -1 ? npc->
yaw : script->functionTemp[1];
125 script->varTable[0] = 1;
132 npcYaw = script->functionTemp[1] == -1 ? npc->
yaw : script->functionTemp[1];
135 script->varTable[0] = 1;
146API_CALLABLE(func_8005DD54) {
149 script->varTable[0] = angle;
150 if (angle >= 180.0f) {
153 if (angle >= 90.0f) {
154 angle = 180.0f - angle;
156 script->varTable[2] = (s32) (((90.0f - angle) * 95.0f) / 90.0f) + 160;
160API_CALLABLE(func_8005DDF0) {
EvtScript EVS_NpcHitRecoil
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
s32 evt_get_variable(Evt *script, Bytecode var)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
f32 evt_get_float_variable(Evt *script, Bytecode var)
f32 get_clamped_angle_diff(f32, f32)
Npc * get_npc_unsafe(s32 npcID)
EncounterStatus gCurrentEncounter
ApiStatus GetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus SetNpcImgFXParams(Evt *script, b32 isInitialCall)
ApiStatus SetNpcAnimation(Evt *script, b32 isInitialCall)
ApiStatus BindNpcAI(Evt *script, b32 isInitialCall)
ApiStatus SetNpcRotation(Evt *script, b32 isInitialCall)
ApiStatus SetNpcPos(Evt *script, b32 isInitialCall)
ApiStatus SetSelfVar(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)
ApiStatus GetSelfVar(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#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 EndIf
Marks the end of an if statement or an else block.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#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 Return
Kills the current EVT thread.
PartnerStatus gPartnerStatus
PlayerStatus gPlayerStatus