papermario/include/functions.h

100 lines
3.2 KiB
C
Raw Normal View History

2020-07-18 02:47:33 +02:00
#ifndef _FUNCTIONS_H_
#define _FUNCTIONS_H_
#include "ultra64.h"
#include "common_structs.h"
2020-08-15 02:49:33 +02:00
#include "enums.h"
2020-07-18 02:47:33 +02:00
2020-07-29 05:35:42 +02:00
void osCleanupThread(void);
2020-08-27 00:54:55 +02:00
s32 heap_malloc(s32 size);
2020-09-02 20:20:29 +02:00
HeapNode* _heap_create(void* addr, s32 size);
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);
void render_player_model();
2020-10-03 22:04:49 +02:00
f32 integrate_gravity(void);
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);
2020-09-19 17:17:53 +02:00
void get_model_center_and_size(s32 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY,
f32* sizeZ);
2020-09-18 03:28:34 +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-10-15 05:49:49 +02:00
Actor* get_actor(s32 actorID);
2020-10-08 21:03:58 +02:00
s32 func_800494C0(Npc* npc, s32 arg1, s32 arg2);
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-09-18 22:07:15 +02:00
s16 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);
s32 func_80055448(s32);
s32 func_80055464(s32, s32);
s32 func_800554A4(s32, s32);
s32 func_800554E8(s32, s32);
s32 func_800555E4(s32);
2020-09-18 03:28:34 +02:00
s32 osGetId();
2020-09-27 03:02:29 +02:00
s32 func_800EF394(f32);
2020-09-27 19:57:40 +02:00
s32 does_script_exist(s32 id);
2020-10-13 05:18:02 +02:00
ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState);
ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, s32 initialState, u8 groupFlags);
2020-09-27 03:02:29 +02:00
2020-08-22 05:04:10 +02:00
void func_8011B7C0(u16, s32, s32);
2020-08-12 23:13:09 +02:00
void func_80137D88(s32, f32);
2020-08-15 16:26:43 +02:00
void func_80137DA4(s32, f32);
2020-09-06 17:53:48 +02:00
s32 func_80137E10(s32, u8, u8, u8);
2020-08-15 16:26:43 +02:00
void func_80137E4C(s32, s32, s32, s32);
s32 rand_int(s32);
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);
2020-07-18 02:47:33 +02:00
2020-09-06 17:53:48 +02:00
void make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 unk1, s32 unk2, s32 unk3);
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-08-16 06:24:20 +02:00
Npc* get_npc_safe(NpcId npcId);
Npc* get_npc_unsafe(NpcId npcId);
2020-08-16 07:13:03 +02:00
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr);
void set_npc_yaw(Npc* npcPtr, f32 angle);
2020-10-08 21:03:58 +02:00
Enemy* get_enemy(NpcId npcId);
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);
s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
2020-08-12 04:45:27 +02:00
s32 set_music_track(s32 musicPlayer, s32 songID, s32 variation, s32 unk, s32 volume);
2020-09-25 23:18:09 +02:00
ScriptInstance* get_script_by_index(s32 index);
2020-10-13 03:28:01 +02:00
void suspend_all_group(s32 groupFlags);
void kill_script(ScriptInstance* instanceToKill);
2020-07-18 02:47:33 +02:00
#endif