6#include "sprite/player.h"
9extern Addr entity_model_Chest_ROM_END;
10extern Addr entity_model_Chest_ROM_START;
114 gSPDisplayList(gfxPos++, gfx);
115 gSPPopMatrix(gfxPos++, G_MTX_MODELVIEW);
139 ((angle <= 40.0f) || (angle >= 320.0f))) {
145 entity->
flags &= ~ENTITY_FLAG_SHOWS_INSPECT_PROMPT;
152 entity->
flags &= ~ENTITY_FLAG_SHOWS_INSPECT_PROMPT;
226 switch (data->
state) {
266 if (effect != NULL) {
279 f32 giveItemLerpAlpha;
280 f32 horizontalOffset;
283 f32 intermediateTheta;
291 switch (chest->
state) {
330 theta = theta / 360.0f;
346 horizontalOffset = 0.0f;
349 fx_radial_shimmer(0, chest->
itemEntityPos.
x + horizontalOffset * sinRight - depthOffset * sinFwd,
352 fx_got_item_outline(0, chest->
itemEntityPos.
x + horizontalOffset * sinRight - sinFwd * depthOffset,
376 case ITEM_SUPER_BOOTS:
379 case ITEM_ULTRA_BOOTS:
385 case ITEM_SUPER_HAMMER:
388 case ITEM_ULTRA_HAMMER:
502 .modelAnimationNodes = 0,
505 .fpHandleCollision = NULL,
508 .aabbSize = { 50, 45, 46 }
514 .modelAnimationNodes = 0,
517 .fpHandleCollision = NULL,
520 .aabbSize = { 28, 26, 23 }
EvtScript Entity_Chest_AdjustCam_ISK
EntityBlueprint Entity_Chest
void entity_Chest_start_bound_script(Entity *entity)
EntityModelScript Entity_Chest_RenderScript
Gfx Entity_Chest_RenderBox[]
EvtScript Entity_Chest_AdjustCam_TIK
void entity_GiantChest_give_equipment(Entity *entity)
void entity_GiantChest_hide_effect(Entity *entity)
void entity_GiantChest_init(Entity *entity)
void entity_Chest_begin_opening(Entity *entity)
EvtScript Entity_Chest_AdjustCam_KZN
EvtScript Entity_Chest_ResetCam_Default
EntityBlueprint Entity_GiantChest
void entity_Chest_close(Entity *entity)
void entity_Chest_clear_item_id(Entity *entity)
void entity_Chest_readargs(Entity *entity)
void entity_Chest_setupGfx(s32 entityIndex)
void entity_Chest_init(Entity *entity)
Gfx Entity_Chest_RenderLid[]
void entity_GiantChest_await_got_item(Entity *entity)
void entity_Chest_check_opened(Entity *entity)
void entity_GiantChest_open(Entity *entity)
EvtScript Entity_Chest_ResetCam_ISK
EntityScript Entity_Chest_Script
void entity_Chest_reset_camera(Entity *entity)
EntityScript Entity_GiantChest_Script
EntityScript Entity_Chest_ScriptOpened
void entity_Chest_idle(Entity *entity)
void entity_Chest_open(Entity *entity)
void entity_Chest_enable_player_input(Entity *entity)
void entity_Chest_adjust_camera(Entity *entity)
struct GotItemOutlineFXData * gotItemOutline
s32 CreateEntityVarArgBuffer[]
f32 giveItemRadiusInterpPhase
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
#define ENTITY_ADDR(entity, type, data)
#define es_SetCallback(func, time)
struct EffectInstance * gotItemEffect
f32 giveItemHeightInterpPhase
@ ITEM_SPAWN_MODE_DECORATION
@ PA_FLAG_INTERACT_PROMPT_AVAILABLE
! prompt
@ ENTITY_COLLISION_PLAYER_TOUCH_WALL
@ ENTITY_COLLISION_PLAYER_TOUCH_FLOOR
@ RENDER_MODE_SURFACE_OPA
@ ENTITY_FLAG_SHOWS_INSPECT_PROMPT
@ EVT_FLAG_RUN_IMMEDIATELY
don't wait for next update_scripts call
Entity * get_entity_by_index(s32 index)
void suggest_player_anim_always_forward(AnimID anim)
s32 disable_player_input(void)
s32 entity_start_script(Entity *entity)
s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupVar)
s32 enable_player_input(void)
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
void set_entity_commandlist(Entity *entity, s32 *entityScript)
void remove_item_entity_by_index(s32 index)
void suggest_player_anim_allow_backward(AnimID anim)
void exec_entity_commandlist(Entity *entity)
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z)
void sfx_play_sound(s32 soundID)
ApiStatus ResetCam(Evt *script, b32 isInitialCall)
ApiStatus SetCamPitch(Evt *script, b32 isInitialCall)
ApiStatus PanToTarget(Evt *script, b32 isInitialCall)
ApiStatus SetCamDistance(Evt *script, b32 isInitialCall)
ApiStatus AdjustCam(Evt *script, b32 isInitialCall)
ApiStatus WaitForCam(Evt *script, b32 isInitialCall)
ApiStatus GetPlayerPos(Evt *script, b32 isInitialCall)
ApiStatus UseSettingsFrom(Evt *script, b32 isInitialCall)
ApiStatus SetPanTarget(Evt *script, b32 isInitialCall)
ApiStatus SetCamSpeed(Evt *script, b32 isInitialCall)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define EVT_GAME_FLAG_CUTOFF
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define EVT_INDEX_OF_GAME_FLAG(v)
#define Return
Kills the current EVT thread.
void(* renderSetupFunc)(s32)
u8 Addr[]
Linker symbol address, as in ld_addrs.h.
GameStatus * gGameStatusPtr
PlayerStatus gPlayerStatus
DisplayContext * gDisplayContext
s32 set_global_flag(s32 index)
s32 get_global_flag(s32 index)