2020-07-18 02:47:33 +02:00
|
|
|
#ifndef _FUNCTIONS_H_
|
|
|
|
#define _FUNCTIONS_H_
|
|
|
|
|
|
|
|
#include "ultra64.h"
|
2021-04-08 19:42:36 +02:00
|
|
|
#include "common.h"
|
|
|
|
#include "map.h"
|
2020-08-15 02:49:33 +02:00
|
|
|
#include "enums.h"
|
2020-07-18 02:47:33 +02:00
|
|
|
|
2021-03-29 02:05:56 +02:00
|
|
|
f32 fabsf(f32 f);
|
|
|
|
f32 sqrtf(f32 f);
|
|
|
|
f64 sqrt(f64 d);
|
2021-04-08 19:42:36 +02:00
|
|
|
f32 cosine(s16 arg0);
|
2020-12-25 00:39:47 +01:00
|
|
|
|
2021-07-08 17:53:00 +02:00
|
|
|
s32 strcmp(const char* str1, const char* str2);
|
|
|
|
|
2020-12-25 00:39:47 +01:00
|
|
|
void nuBoot(void);
|
|
|
|
void boot_idle(void);
|
|
|
|
void boot_main(void);
|
|
|
|
|
2020-07-29 05:35:42 +02:00
|
|
|
void osCleanupThread(void);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void playFX_30(s32, f32, f32, f32);
|
|
|
|
void playFX_31(s32, f32, f32, f32);
|
2021-04-29 19:09:30 +02:00
|
|
|
f32 signF(f32 val);
|
2021-01-03 10:34:04 +01:00
|
|
|
|
2021-04-24 20:56:22 +02:00
|
|
|
void* heap_malloc(s32 size);
|
2021-01-19 17:31:43 +01:00
|
|
|
HeapNode* _heap_create(s32* addr, u32 size);
|
2021-04-24 20:56:22 +02:00
|
|
|
s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest);
|
2020-08-27 00:54:55 +02:00
|
|
|
|
2020-09-22 05:10:53 +02:00
|
|
|
s32 get_global_byte(s32 index);
|
2020-09-19 17:16:02 +02:00
|
|
|
s32 get_global_flag(s32 index);
|
2020-09-22 05:10:53 +02:00
|
|
|
s32 get_area_byte(s32 index);
|
2020-09-19 17:16:02 +02:00
|
|
|
s32 get_area_flag(s32 index);
|
|
|
|
|
2020-09-25 23:18:09 +02:00
|
|
|
Shadow* get_shadow_by_index(s32 index);
|
2021-04-23 13:55:30 +02:00
|
|
|
s32 get_time_freeze_mode(void);
|
2020-09-25 23:18:09 +02:00
|
|
|
void render_player_model();
|
2021-04-26 19:47:38 +02:00
|
|
|
s16 get_game_mode(void);
|
2020-09-25 23:18:09 +02:00
|
|
|
|
2020-10-03 22:04:49 +02:00
|
|
|
f32 integrate_gravity(void);
|
2020-12-20 04:47:09 +01:00
|
|
|
f32 get_clamped_angle_diff(f32, f32);
|
2020-10-03 22:04:49 +02:00
|
|
|
|
2021-04-23 13:55:30 +02:00
|
|
|
void _render_transition_stencil(s32, f32, s32);
|
2020-11-08 01:30:14 +01:00
|
|
|
u32 get_entity_type(s32 arg0);
|
2020-11-18 06:32:18 +01:00
|
|
|
Entity* get_entity_by_index(s32 index);
|
2020-11-21 08:40:54 +01:00
|
|
|
s32 create_entity(StaticEntityData*, s32, s32, s32, s32, s32);
|
2021-06-30 04:27:12 +02:00
|
|
|
void playFX_22(s32, f32, f32, f32, f32, f32, s32, s32);
|
|
|
|
void entity_shattering_idle(Entity* entity);
|
2021-04-18 19:25:32 +02:00
|
|
|
void func_802666E4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, s16);
|
2020-11-18 06:32:18 +01:00
|
|
|
|
2021-02-08 16:53:44 +01:00
|
|
|
void step_game_loop(void);
|
2021-02-08 19:02:14 +01:00
|
|
|
s32 resume_all_group(s32 groupFlags);
|
2021-04-29 19:38:02 +02:00
|
|
|
f32 length2D(f32 x, f32 y);
|
2021-06-30 04:27:12 +02:00
|
|
|
void player_input_to_move_vector(f32* angle, f32* magnitude);
|
2021-06-16 11:52:15 +02:00
|
|
|
void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3);
|
|
|
|
f32 func_800E5348(void);
|
2021-04-29 19:38:02 +02:00
|
|
|
|
|
|
|
void transform_point(Matrix4f mtx, f32, f32, f32, f32, f32*, f32*, f32*, f32*);
|
|
|
|
void draw_number(s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style);
|
|
|
|
void set_hud_element_scale(s32 index, f32 scale);
|
2021-02-08 16:53:44 +01:00
|
|
|
|
2021-06-16 11:52:15 +02:00
|
|
|
void set_entity_model_render_command_list(s32 idx, u32* commandList);
|
|
|
|
void set_entity_model_flags(s32 idx, s32 newFlags);
|
|
|
|
void clear_entity_model_flags(s32 idx, s32 newFlags);
|
|
|
|
void exec_entity_model_commandlist(s32 idx);
|
|
|
|
s32 load_entity_model(s32* cmdList);
|
|
|
|
|
|
|
|
f32 func_800E34D8(void);
|
2021-06-30 04:27:12 +02:00
|
|
|
f32 player_check_collision_below(f32, s32* colliderID);
|
|
|
|
s32 can_trigger_loading_zone(void);
|
2021-06-16 11:52:15 +02:00
|
|
|
void func_802667F0(s32, Actor*, f32, f32, f32);
|
|
|
|
|
2021-07-16 20:27:27 +02:00
|
|
|
void* general_heap_malloc(s32 size);
|
|
|
|
s32 general_heap_free(s32 size);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void entity_Shadow_init(Shadow* entity);
|
|
|
|
void entity_SaveBlock_idle(Entity* entity);
|
|
|
|
void entity_SaveBlock_pause_game(void);
|
|
|
|
void entity_SaveBlock_resume_game(void);
|
|
|
|
void entity_SaveBlock_save_data(void);
|
|
|
|
void entity_SaveBlock_show_tutorial_message(Entity* entity);
|
|
|
|
void entity_SaveBlock_wait_for_close_tutorial(Entity* entity);
|
|
|
|
void entity_SaveBlock_show_choice_message(void);
|
|
|
|
void entity_SaveBlock_show_result_message(void);
|
|
|
|
void entity_SaveBlock_wait_for_close_result(Entity* entity);
|
|
|
|
void entity_SaveBlock_wait_for_close_choice(Entity* entity);
|
|
|
|
void entity_SaveBlock_init(Entity* entity);
|
|
|
|
void entity_GreenStompSwitch_idle(Entity* entity);
|
|
|
|
void entity_GreenStompSwitch_retract(Entity* entity);
|
|
|
|
void entity_GreenStompSwitch_extend(Entity* entity);
|
|
|
|
void entity_HugeBlueSwitch_idle(Entity* entity);
|
|
|
|
void entity_small_switch_idle(Entity* entity);
|
|
|
|
void entity_RedSwitch_wait_and_reset(Entity* entity);
|
|
|
|
void entity_base_switch_anim_init(Entity* entity);
|
|
|
|
s32 entity_RedSwitch_animate_scale(Entity* entity);
|
|
|
|
void entity_base_switch_start_bound_script(Entity* entity);
|
|
|
|
void entity_base_switch_animate_scale(Entity* entity);
|
|
|
|
void entity_base_switch_init(Entity* entity);
|
|
|
|
f32 entity_block_hit_init_scale(Entity* entity);
|
|
|
|
void entity_block_hit_animate_scale(Entity* entity);
|
|
|
|
s32 entity_block_handle_collision(Entity* entity);
|
|
|
|
void entity_BlueSwitch_init(Entity* entity);
|
|
|
|
void entity_HugeBlueSwitch_init(Entity* entity);
|
|
|
|
|
2021-07-19 13:49:30 +02:00
|
|
|
s32 dispatch_damage_event_actor_0(Actor* actor, s32 damageAmount, s32 event);
|
|
|
|
|
2021-07-16 20:27:27 +02:00
|
|
|
// todo remove once we have libultra's def
|
|
|
|
extern void guOrtho(Mtx *m, float l, float r, float b, float t,
|
|
|
|
float n, float f, float scale);
|
2020-10-17 05:47:10 +02:00
|
|
|
// Text
|
2021-07-13 15:43:14 +02:00
|
|
|
MessagePrintState* msg_get_printer_for_string(s32 stringID, s32* a1);
|
2021-04-22 05:19:31 +02:00
|
|
|
|
2021-04-24 20:56:22 +02:00
|
|
|
void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);
|
2020-10-17 05:47:10 +02:00
|
|
|
|
2020-09-25 23:18:09 +02:00
|
|
|
void parent_collider_to_model(s32 colliderID, s16 modelIndex);
|
2020-08-10 09:42:50 +02:00
|
|
|
void clone_model(u16 srcModelID, u16 newModelID);
|
2020-09-18 03:28:34 +02:00
|
|
|
Model* get_model_from_list_index(s32 listIndex);
|
2020-09-25 23:18:09 +02:00
|
|
|
s32 get_model_list_index_from_tree_index(s32 treeIndex);
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 get_transform_group_index(s32);
|
2021-05-08 07:34:57 +02:00
|
|
|
void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY,
|
2020-09-19 17:17:53 +02:00
|
|
|
f32* sizeZ);
|
2021-02-16 11:32:34 +01:00
|
|
|
s32 collision_main_above(void);
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 player_test_lateral_overlap(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32);
|
|
|
|
Npc* peach_make_disguise_npc(s32 peachDisguise);
|
2020-09-18 03:28:34 +02:00
|
|
|
|
2021-07-16 20:27:27 +02:00
|
|
|
void draw_box(s32 flags, s32 windowStyle, s16 posX, s16 posY, s32 posZ, s32 width, s32 height, s32 opacity,
|
|
|
|
s32 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(s32),
|
|
|
|
s32 drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f* outMtx);
|
|
|
|
|
2021-02-20 15:41:30 +01:00
|
|
|
s32 partner_player_can_pause(void);
|
2021-03-15 14:30:09 +01:00
|
|
|
s32 disable_player_static_collisions(void);
|
|
|
|
s32 disable_player_input(void);
|
2021-04-29 19:09:30 +02:00
|
|
|
void func_80027088(s32);
|
2021-04-22 05:19:31 +02:00
|
|
|
void set_time_freeze_mode(s32);
|
2020-11-23 19:48:34 +01:00
|
|
|
|
2021-06-21 06:30:57 +02:00
|
|
|
s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID);
|
|
|
|
|
2021-03-19 11:25:14 +01:00
|
|
|
void get_dpad_input_radial(f32* angle, f32* magnitude);
|
2021-04-29 19:09:30 +02:00
|
|
|
void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outS);
|
|
|
|
|
2021-07-03 13:22:53 +02:00
|
|
|
void create_popup_menu(void*);
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 npc_test_move_simple_without_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
|
2020-10-20 01:48:16 +02:00
|
|
|
|
2020-08-10 09:42:50 +02:00
|
|
|
void update_collider_transform(s16 colliderID);
|
2020-08-27 00:54:55 +02:00
|
|
|
void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
|
|
|
|
|
2020-10-08 21:03:58 +02:00
|
|
|
s32 is_trigger_bound(Trigger*, Bytecode* script);
|
2020-09-06 17:53:48 +02:00
|
|
|
Trigger* create_trigger(TriggerDefinition* def);
|
|
|
|
s32 _bound_script_trigger_handler(Trigger* trigger);
|
2020-11-23 20:19:13 +01:00
|
|
|
Trigger* get_trigger_by_id(s32 triggerID);
|
2020-09-06 17:53:48 +02:00
|
|
|
|
2020-11-27 20:38:52 +01:00
|
|
|
Actor* get_actor(ActorID actorID);
|
2020-10-17 05:47:10 +02:00
|
|
|
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
|
2021-02-04 12:28:01 +01:00
|
|
|
s32 add_coins(s32 amt);
|
2020-10-08 21:03:58 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2);
|
2020-10-08 21:03:58 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*);
|
2021-02-18 12:54:07 +01:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 get_variable(ScriptInstance* script, Bytecode var);
|
|
|
|
s32 set_variable(ScriptInstance* script, Bytecode var, s32 value);
|
|
|
|
f32 get_float_variable(ScriptInstance* script, Bytecode var);
|
|
|
|
f32 set_float_variable(ScriptInstance* script, Bytecode var, f32 value);
|
|
|
|
void set_script_timescale(ScriptInstance* script, f32 timescale);
|
2020-07-18 02:47:33 +02:00
|
|
|
f32 sin_deg(f32 x);
|
|
|
|
f32 cos_deg(f32 x);
|
2020-10-26 02:12:01 +01:00
|
|
|
f32 sin_rad(f32 x);
|
2021-01-20 16:42:05 +01:00
|
|
|
f32 cos_rad(f32 x);
|
|
|
|
s32 round(f32);
|
2020-08-15 06:27:01 +02:00
|
|
|
f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
|
2020-08-15 16:26:43 +02:00
|
|
|
f32 clamp_angle(f32 theta);
|
2020-11-10 17:27:02 +01:00
|
|
|
s32 sign(s32 value);
|
2020-08-12 03:01:33 +02:00
|
|
|
s32 func_80055448(s32);
|
|
|
|
s32 func_80055464(s32, s32);
|
2020-12-02 01:13:24 +01:00
|
|
|
void func_800561A4(s32);
|
2020-09-18 03:28:34 +02:00
|
|
|
s32 osGetId();
|
2020-09-27 03:02:29 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 battle_heap_create(void);
|
|
|
|
void filemenu_init(s32);
|
|
|
|
|
|
|
|
s32 test_ray_zones(f32, f32, f32, f32*, f32*, f32*, f32*, f32*, f32*, f32*);
|
|
|
|
|
2021-03-07 19:32:24 +01:00
|
|
|
void mem_clear(s8* data, s32 numBytes);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
HudElement* create_hud_element(s32* iconIndex);
|
|
|
|
void set_hud_element_render_pos(s32 iconIndex, s32 posX, s32 posY);
|
2021-02-04 12:28:01 +01:00
|
|
|
|
2021-04-01 20:00:29 +02:00
|
|
|
void intro_logos_set_fade_color(s16 color);
|
|
|
|
void intro_logos_set_fade_alpha(s16 alpha);
|
|
|
|
|
|
|
|
void set_game_mode(s16 idx);
|
2020-10-28 07:42:14 +01:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void fx_walk(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
|
2020-12-22 14:24:49 +01:00
|
|
|
void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*);
|
2020-10-26 03:37:22 +01:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
f32 get_xz_dist_to_player(f32, f32);
|
2020-12-22 15:58:31 +01:00
|
|
|
void func_800E06C0(s32);
|
2021-02-06 16:20:35 +01:00
|
|
|
void close_status_menu(void);
|
2021-06-30 04:27:12 +02:00
|
|
|
void btl_state_update_switch_to_partner(s32);
|
2020-10-30 04:56:54 +01:00
|
|
|
|
2020-12-23 07:56:34 +01:00
|
|
|
Shadow* create_shadow_type(s32 type, f32 x, f32 y, f32 z);
|
2021-03-29 02:05:56 +02:00
|
|
|
s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 centerY, f32 sizeX, f32 sizeZ);
|
2020-11-02 20:53:06 +01:00
|
|
|
PlayerData* get_player_data(void);
|
|
|
|
|
2020-11-12 06:18:35 +01:00
|
|
|
// Pause
|
|
|
|
s32 pause_interp_vertical_scroll(s32 deltaBefore);
|
|
|
|
void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileDescriptor, s32 uls, s32 ult, s32 dsdx, s32 dtdy);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 npc_raycast_down_ahead(s32, f32*, f32*, f32*, f32*, f32, f32);
|
|
|
|
s32 npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*);
|
|
|
|
s32 npc_test_move_taller_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
|
|
|
|
s32 npc_test_move_simple_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
|
|
|
|
s32 npc_test_move_complex_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
|
2020-12-22 14:24:49 +01:00
|
|
|
|
2021-01-03 10:02:50 +01:00
|
|
|
Npc* get_npc_by_index(s32 listIndex);
|
|
|
|
|
2020-10-19 01:27:14 +02:00
|
|
|
// Partner
|
2021-06-30 04:27:12 +02:00
|
|
|
void partner_walking_update_player_tracking(Npc* partner);
|
|
|
|
void partner_walking_update_motion(Npc* partner);
|
2020-11-09 00:26:29 +01:00
|
|
|
void enable_partner_ai(void);
|
2021-06-30 04:27:12 +02:00
|
|
|
void partner_walking_enable(Npc* partner, s32 val);
|
|
|
|
void partner_flying_enable(Npc* partner, s32 val);
|
|
|
|
void partner_flying_update_player_tracking(Npc* partner);
|
|
|
|
s32 partner_is_flying(void);
|
|
|
|
void partner_flying_update_motion(Npc* partner);
|
|
|
|
void partner_clear_player_tracking(Npc* partner);
|
2020-10-19 01:27:14 +02:00
|
|
|
|
2021-02-20 15:41:30 +01:00
|
|
|
void set_background_color_blend(u8 r, u8 g, u8 b, u8 a);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void partner_set_tether_distance(f32);
|
2020-09-27 19:57:40 +02:00
|
|
|
s32 does_script_exist(s32 id);
|
2020-11-16 04:04:33 +01:00
|
|
|
s32 does_script_exist_by_ref(ScriptInstance* script);
|
2021-04-24 20:56:22 +02:00
|
|
|
ScriptInstance* start_script(Script* source, s32 priority, s32 initialState);
|
|
|
|
ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialState, u8 groupFlags);
|
2020-09-27 03:02:29 +02:00
|
|
|
|
2020-11-27 20:38:52 +01:00
|
|
|
void set_animation_rate(ActorID actorID, s32 partIndex, f32 rate);
|
2020-08-22 05:04:10 +02:00
|
|
|
void func_8011B7C0(u16, s32, s32);
|
2021-06-30 04:27:12 +02:00
|
|
|
AnimatedMesh* get_animator_by_index(s32 arg0);
|
|
|
|
void set_screen_overlay_params_front(u8, f32);
|
|
|
|
void set_screen_overlay_params_back(s32, f32);
|
|
|
|
void set_screen_overlay_alpha(s32, f32);
|
|
|
|
void get_screen_overlay_params(s32, f32*, f32*);
|
|
|
|
s32 set_screen_overlay_color(s32, u8, u8, u8);
|
|
|
|
void set_screen_overlay_center(s32, s32, s32, s32);
|
2020-08-14 06:20:11 +02:00
|
|
|
s32 rand_int(s32);
|
2020-08-15 04:24:08 +02:00
|
|
|
void sort_items(void);
|
|
|
|
s32 is_ability_active(s32 arg0);
|
2020-08-16 06:24:20 +02:00
|
|
|
f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration);
|
2021-04-08 19:42:36 +02:00
|
|
|
void sin_cos_deg(f32 rad, f32* outSinTheta, f32* outCosTheta);
|
2020-07-18 02:47:33 +02:00
|
|
|
|
2021-05-01 21:03:42 +02:00
|
|
|
void enable_world_fog(void);
|
|
|
|
void set_world_fog_dist(s32 start, s32 end);
|
|
|
|
void set_world_fog_color(s32 r, s32 g, s32 b, s32 a);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
ModelTransformGroup* get_transform_group(s32 index);
|
2021-05-08 07:34:57 +02:00
|
|
|
|
2021-01-15 21:35:39 +01:00
|
|
|
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign,
|
|
|
|
s32 pickupVar);
|
2021-01-06 15:19:41 +01:00
|
|
|
s32 make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 pickupVar);
|
2020-10-22 03:39:50 +02:00
|
|
|
void set_item_entity_position(s32 itemEntityIndex, f32 x, f32 y, f32 z);
|
2020-10-27 00:10:32 +01:00
|
|
|
ItemEntity* get_item_entity(s32 itemEntityIndex);
|
|
|
|
s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar);
|
2020-10-30 03:15:51 +01:00
|
|
|
void set_item_entity_flags(s32 itemEntityIndex, s32 flag);
|
2020-09-06 17:53:48 +02:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 create_generic_entity_frontUI(void (*updateFunc)(void), void (*drawFunc)(void));
|
|
|
|
DynamicEntity* get_generic_entity(s32 idx);
|
2021-03-07 19:32:24 +01:00
|
|
|
|
2020-08-21 17:04:57 +02:00
|
|
|
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height);
|
|
|
|
|
2020-09-22 02:56:17 +02:00
|
|
|
void disable_player_shadow(void);
|
2020-10-29 17:08:00 +01:00
|
|
|
void move_player(s32 duration, f32 heading, f32 speed);
|
2021-03-07 19:32:24 +01:00
|
|
|
s32 enable_player_input(void);
|
2020-09-22 02:56:17 +02:00
|
|
|
|
2021-03-29 09:34:39 +02:00
|
|
|
Npc* get_npc_safe(NpcID npcId);
|
|
|
|
Npc* get_npc_unsafe(NpcID npcId);
|
|
|
|
Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr);
|
2020-08-19 02:31:39 +02:00
|
|
|
void set_npc_yaw(Npc* npcPtr, f32 angle);
|
2020-11-22 21:47:15 +01:00
|
|
|
void npc_move_heading(Npc* npc, f32 speed, f32 yaw);
|
2020-11-23 20:19:13 +01:00
|
|
|
void disable_npc_blur(Npc* npc);
|
2020-08-15 07:00:29 +02:00
|
|
|
|
2020-08-15 07:55:16 +02:00
|
|
|
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
|
|
|
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
2020-08-15 16:26:43 +02:00
|
|
|
void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta);
|
2020-08-15 07:55:16 +02:00
|
|
|
|
2021-03-26 15:46:45 +01:00
|
|
|
s32 sfx_adjust_env_sound_pos(s32 soundID, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
|
2021-07-19 13:49:30 +02:00
|
|
|
void sfx_play_sound(s32 soundID);
|
2021-03-26 15:46:45 +01:00
|
|
|
s32 sfx_play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
|
|
|
|
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
|
2021-04-01 20:00:29 +02:00
|
|
|
void func_801497FC(s32 arg0);
|
2020-11-20 15:44:08 +01:00
|
|
|
s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2);
|
2020-09-25 23:18:09 +02:00
|
|
|
|
2021-02-16 11:32:34 +01:00
|
|
|
s32 basic_window_update(void);
|
|
|
|
s32 basic_hidden_window_update(void);
|
|
|
|
|
2020-12-30 09:18:27 +01:00
|
|
|
void player_create_target_list(Actor* actor);
|
|
|
|
void enemy_create_target_list(Actor* actor);
|
|
|
|
|
|
|
|
void set_actor_yaw(ActorID actorID, s32 yaw);
|
|
|
|
void set_part_yaw(ActorID actorID, s32 partIndex, s32 value);
|
|
|
|
|
|
|
|
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
|
|
|
|
|
2021-03-29 09:34:39 +02:00
|
|
|
void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType);
|
|
|
|
void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType);
|
2020-12-30 09:18:27 +01:00
|
|
|
void remove_part_decoration(ActorPart* part, s32 decorationIndex);
|
|
|
|
void remove_actor_decoration(Actor* actor, s32 decorationIndex);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 player_team_is_ability_active(Actor* actor, Ability ability);
|
2020-12-30 09:18:27 +01:00
|
|
|
|
|
|
|
void create_part_shadow(ActorID actorID, s32 partIndex);
|
|
|
|
void remove_part_shadow(ActorID actorID, s32 partIndex);
|
|
|
|
void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part); // arg0 unused
|
2020-09-25 23:18:09 +02:00
|
|
|
|
|
|
|
ScriptInstance* get_script_by_index(s32 index);
|
|
|
|
|
2021-06-21 06:30:57 +02:00
|
|
|
void set_action_state(s32 actionState);
|
|
|
|
s32 get_collider_type_by_id(s32 colliderID);
|
2021-06-30 04:27:12 +02:00
|
|
|
void suggest_player_anim_setUnkFlag(s32 arg0);
|
2021-06-21 06:30:57 +02:00
|
|
|
void subtract_hp(s32 amt);
|
|
|
|
void open_status_menu_long(void);
|
|
|
|
|
2020-10-13 03:28:01 +02:00
|
|
|
void suspend_all_group(s32 groupFlags);
|
|
|
|
void kill_script(ScriptInstance* instanceToKill);
|
2021-06-30 04:27:12 +02:00
|
|
|
void exec_entity_commandlist(Entity* entity);
|
2020-10-13 03:28:01 +02:00
|
|
|
|
2021-04-01 20:00:29 +02:00
|
|
|
void sfx_reset_door_sounds(void);
|
|
|
|
|
2020-12-30 08:03:05 +01:00
|
|
|
void func_802D7460(f32 x, f32 y, f32 z, s32 arg3);
|
|
|
|
void func_802D74C0(f32 x, f32 y, f32 z, s32 arg3);
|
|
|
|
|
2021-03-23 03:25:48 +01:00
|
|
|
void show_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32);
|
2021-02-28 02:05:02 +01:00
|
|
|
void add_xz_vec3f(Vec3f* vector, f32 speed, f32 angleDeg);
|
|
|
|
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg);
|
2021-02-12 22:31:22 +01:00
|
|
|
|
2021-03-24 09:39:43 +01:00
|
|
|
void func_80138D88(s32, s32, s32, s32, f32);
|
2021-06-21 06:30:57 +02:00
|
|
|
|
2021-07-08 17:53:00 +02:00
|
|
|
// State funcs
|
|
|
|
void state_init_startup(void);
|
|
|
|
void state_step_startup(void);
|
|
|
|
void state_drawUI_startup(void);
|
|
|
|
void state_init_logos(void);
|
|
|
|
void state_step_logos(void);
|
|
|
|
void state_drawUI_logos(void);
|
|
|
|
void state_init_title_screen(void);
|
|
|
|
void state_step_title_screen(void);
|
|
|
|
void state_drawUI_title_screen(void);
|
|
|
|
void state_init_enter_demo(void);
|
|
|
|
void state_step_enter_world(void);
|
|
|
|
void state_drawUI_enter_world(void);
|
|
|
|
void state_init_change_map(void);
|
|
|
|
void state_step_change_map(void);
|
|
|
|
void state_drawUI_change_map(void);
|
|
|
|
void func_80036430(void);
|
|
|
|
void func_8003646C(void);
|
|
|
|
void func_80036640(void);
|
|
|
|
void state_init_enter_world(void);
|
|
|
|
void state_step_enter_world(void);
|
|
|
|
void state_drawUI_enter_world(void);
|
|
|
|
void state_init_world(void);
|
|
|
|
void state_step_world(void);
|
|
|
|
void state_drawUI_world(void);
|
|
|
|
void state_init_battle(void);
|
|
|
|
void state_step_battle(void);
|
|
|
|
void state_drawUI_battle(void);
|
|
|
|
void state_init_end_battle(void);
|
|
|
|
void state_step_end_battle(void);
|
|
|
|
void state_drawUI_end_battle(void);
|
|
|
|
void state_init_pause(void);
|
|
|
|
void state_step_pause(void);
|
|
|
|
void state_drawUI_pause(void);
|
|
|
|
void state_init_unpause(void);
|
|
|
|
void state_step_unpause(void);
|
|
|
|
void state_drawUI_unpause(void);
|
|
|
|
void state_init_language_select(void);
|
|
|
|
void state_step_language_select(void);
|
|
|
|
void state_drawUI_language_select(void);
|
|
|
|
void state_init_exit_language_select(void);
|
|
|
|
void state_step_exit_language_select(void);
|
|
|
|
void state_drawUI_exit_language_select(void);
|
|
|
|
void state_init_file_select(void);
|
|
|
|
void state_step_file_select(void);
|
|
|
|
void state_drawUI_file_select(void);
|
|
|
|
void state_init_exit_file_select(void);
|
|
|
|
void state_step_exit_file_select(void);
|
|
|
|
void state_drawUI_exit_file_select(void);
|
|
|
|
void state_init_intro(void);
|
|
|
|
void state_step_intro(void);
|
|
|
|
void state_drawUI_intro(void);
|
|
|
|
void state_init_demo(void);
|
|
|
|
void state_step_demo(void);
|
|
|
|
void state_drawUI_demo(void);
|
|
|
|
|
2021-06-21 06:30:57 +02:00
|
|
|
// Effect funcs
|
2021-06-30 04:27:12 +02:00
|
|
|
void playFX_01(f32, f32, f32);
|
|
|
|
void playFX_11(s32, f32, f32, f32, f32);
|
2021-07-08 17:53:00 +02:00
|
|
|
void playFX_18(s32, f32, f32, f32, f32, f32, f32, s32);
|
2021-06-30 04:27:12 +02:00
|
|
|
void playFX_3D(s32 var1, f32 var2, f32 var3, f32 var4, f32 var5, f32 var6, f32 var7, s32 var8, s32* unk);
|
2021-07-08 17:53:00 +02:00
|
|
|
EffectInstance* playFX_40(s32, f32, f32, f32, s32);
|
2021-06-30 04:27:12 +02:00
|
|
|
EffectInstance* playFX_52(s32, f32, f32, f32, f32, s32);
|
|
|
|
EffectInstance* playFX_6B(s32, f32, f32, f32, f32, s32);
|
|
|
|
//EffectInstance* playFX_82(s32, f32, f32, f32, f32, s32 time);
|
|
|
|
EffectInstance* playFX_4E(s32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_54(s32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_80(s32, f32, f32, f32, f32, s32);
|
|
|
|
EffectInstance* playFX_51(s32, f32, f32, f32, f32, s32);
|
|
|
|
void playFX_50(s32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_3F(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
|
2021-07-08 17:53:00 +02:00
|
|
|
EffectInstance* playFX_36(s32, f32, f32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_83(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
EffectInstance* playFX_7B(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
void playFX_32(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
|
|
|
|
EffectInstance* playFX_56(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
void playFX_33(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
EffectInstance* playFX_69(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
void playFX_2D(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
|
|
|
|
void playFX_2E(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
void playFX_17(s32 arg0, f32 arg1, f32 arg2, f32 arg3);
|
|
|
|
void playFX_19(s32 arg0, f32 arg1, f32 arg2, f32 arg3);
|
|
|
|
void playFX_1D(s32, f32, f32, f32, f32, s32, f32, s32);
|
|
|
|
void fx_sweat(s32, f32, f32, f32, f32, f32, s32);
|
|
|
|
void playFX_2F(s32, f32, f32, f32, f32, s32, EffectInstanceData**);
|
|
|
|
void playFX_3B(s32, f32, f32, f32, f32, EffectInstanceData**);
|
|
|
|
void fx_land(s32, f32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_6F(s32, f32, f32, f32, f32, s32);
|
|
|
|
EffectInstance* playFX_72(s32, f32, f32, f32, f32, f32, f32, s32, s32);
|
|
|
|
void playFX_26(s32, f32, f32, f32);
|
2021-07-18 17:21:37 +02:00
|
|
|
EffectInstance* playFX_64(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8);
|
|
|
|
void playFX_08(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
|
|
|
|
void playFX_09(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
|
|
|
|
EffectInstance* playFX_5A(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
|
|
|
EffectInstance* playFX_59(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8);
|
|
|
|
EffectInstance* playFX_58(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
|
2021-07-17 16:45:08 +02:00
|
|
|
EffectInstance* playFX_0C(f32, f32, f32, f32, f32);
|
|
|
|
EffectInstance* playFX_23(u32, f32, f32, f32, f32);
|
2021-07-19 20:27:56 +02:00
|
|
|
void playFX_0F(s32, f32, f32, f32, f32, f32, f32, f32);
|
2021-03-24 09:39:43 +01:00
|
|
|
|
2021-04-01 20:00:29 +02:00
|
|
|
void func_802B2078(void);
|
2021-04-29 19:09:30 +02:00
|
|
|
extern f32 gCurtainScale;
|
|
|
|
extern f32 gCurtainScaleGoal;
|
|
|
|
extern f32 gCurtainFade;
|
|
|
|
extern f32 gCurtainFadeGoal;
|
|
|
|
extern UNK_FUN_PTR(gCurtainDrawCallback);
|
2021-06-30 04:27:12 +02:00
|
|
|
void spr_update_player_sprite(s32, s32, f32);
|
2021-04-01 20:00:29 +02:00
|
|
|
|
|
|
|
void initialize_curtains(void);
|
|
|
|
void update_curtains(void);
|
|
|
|
// render_curtains
|
|
|
|
void set_curtain_scale_goal(f32 scale);
|
|
|
|
void set_curtain_scale(f32 scale);
|
|
|
|
void set_curtain_draw_callback(UNK_FUN_PTR(callback));
|
|
|
|
void set_curtain_fade_goal(f32 fade);
|
|
|
|
void set_curtain_fade(f32 fade);
|
|
|
|
|
2021-02-20 15:41:30 +01:00
|
|
|
// Dead functions:
|
2021-03-29 09:34:39 +02:00
|
|
|
Npc* func_8003E4BC(NpcID npcId); // get_npc_safe
|
|
|
|
Npc* func_8003E534(NpcID npcId); // get_npc_safe
|
2021-03-26 15:52:37 +01:00
|
|
|
void func_80077BD0(s32, s32, s32, s32, s32, s32);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
void dead_playFX_11(s32, f32, f32, f32, f32);
|
2021-03-26 15:52:37 +01:00
|
|
|
s32 dead_get_variable(ScriptInstance* script, Bytecode var);
|
|
|
|
f32 dead_get_float_variable(ScriptInstance* script, Bytecode var);
|
|
|
|
s32 dead_set_variable(ScriptInstance* script, Bytecode var, s32 value);
|
|
|
|
f32 dead_set_float_variable(ScriptInstance* script, Bytecode var, f32 value);
|
|
|
|
|
|
|
|
f32 dead_cos_rad(f32 x);
|
|
|
|
f32 dead_atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
|
2021-02-20 15:41:30 +01:00
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 create_generic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void));
|
2021-04-22 05:19:31 +02:00
|
|
|
EntityModel* get_entity_model(s32 idx);
|
2021-06-30 04:27:12 +02:00
|
|
|
f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z);
|
2021-04-08 19:42:36 +02:00
|
|
|
|
2021-04-29 19:09:30 +02:00
|
|
|
void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5);
|
|
|
|
void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3);
|
|
|
|
void func_8004A784(Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5);
|
2021-06-15 10:05:16 +02:00
|
|
|
void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
|
|
|
|
|
2021-06-30 04:27:12 +02:00
|
|
|
s32* spr_get_npc_palettes(u16 arg0);
|
|
|
|
void spr_draw_player_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
|
|
|
|
void spr_draw_npc_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, Matrix4f* arg4);
|
|
|
|
void guRotateRPYF(float mf[4][4], f32 x, f32 y, f32 z);
|
2021-06-15 10:05:16 +02:00
|
|
|
s32 spr_update_sprite(s32 arg0, s32 arg1, f32 arg2);
|
2021-06-30 04:27:12 +02:00
|
|
|
s32 npc_raycast_down_ahead(s32, f32*, f32*, f32*, f32*, f32, f32);
|
2021-06-15 10:05:16 +02:00
|
|
|
void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta);
|
2021-07-18 17:21:37 +02:00
|
|
|
|
2021-04-29 19:09:30 +02:00
|
|
|
|
2021-07-16 13:08:22 +02:00
|
|
|
void* load_asset_by_name(const char* assetName, u32* decompressedSize);
|
|
|
|
|
2020-07-18 02:47:33 +02:00
|
|
|
#endif
|