src/core1: cleaned up function prototypes for math library (ml)

umbenannt:      src/core1/code_18350.c -> src/core1/ml.c
        neue Datei:     include/core1/ml.h
This commit is contained in:
mariob92
2024-10-17 10:58:39 +02:00
parent 8a55096c9c
commit bc6680d618
78 changed files with 133 additions and 167 deletions

View File

@@ -6,7 +6,6 @@
extern f32 func_802E4B38(void);
extern f32 ml_mapRange_f(f32, f32, f32, f32, f32);
void baanim_80289F30(void);

View File

@@ -7,14 +7,12 @@
#include "prop.h"
extern void func_803012F8(void);
extern f32 ml_distanceSquared_vec3f(f32 arg0[3], f32 arg1[3]);
extern void __baMarker_8028BA00(s32);
extern void spawnQueue_actor_s16(void);
extern void func_802A6388(f32);
extern f32 chwadingboots_802D6E4C(Actor *);
extern void set_turbo_duration(f32);
extern f32 chtrainers_getDuration(Actor *);
extern int ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 val);
extern void func_802EE354(Actor *, s32, s32, s32, f32, f32, f32, f32 arg8[3], s32, f32 arg10[2]);
extern void func_8035644C(s32);
extern void func_8035646C(s32 arg0);

View File

@@ -6,9 +6,7 @@
#include "core2/ba/physics.h"
void func_80254008(void);
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
void assetcache_release(void *); //assetcache_free
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
void func_8033A280(f32);
extern s32 osCicId;

View File

@@ -3,10 +3,6 @@
#include "variables.h"
#include "core2/ba/physics.h"
extern f32 ml_sin_deg(f32);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
extern void func_80256D0C(f32, f32, f32, f32, f32, f32 *, f32 *, f32 *);
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
extern f32 climbGetRadius(void);
extern f32 func_8029CED0(void);

View File

@@ -14,7 +14,6 @@ f32 baanim_getTimer(void);
void baanim_setEndAndDuration(f32, f32);
f32 func_8029B2E8(void);
f32 func_8029B33C(void);
f32 ml_interpolate_f(f32, f32, f32);
f32 func_8029B30C();
/* .data */

View File

@@ -7,10 +7,7 @@
extern void player_setYPosition(f32);
extern void yaw_applyIdeal(void);
extern f32 func_80257A44(f32, f32);
extern f32 cosf(f32);
extern f32 ml_remainder_f(f32, f32);
extern f32 func_80257AD4(f32, f32);
/* .bss */
struct {

View File

@@ -11,7 +11,6 @@ f32 func_8029B2E8(void);
void func_8029AD28(f32, s32);
void baanim_scaleDuration(f32);
f32 func_8029B30C(void);
f32 ml_interpolate_f(f32, f32, f32);
void func_80299594(s32, f32);
// .data

View File

@@ -5,7 +5,6 @@
#include "core2/ba/physics.h"
extern void func_8029AD68(f32, s32);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
int bswalrus_inSet(enum bs_e state);

View File

@@ -4,7 +4,6 @@
#include <math.h>
extern f32 mapModel_getFloorY(f32[3]);
extern f32 func_80257204(f32, f32, f32, f32);
typedef enum {
CH_BAT_STATE_ROOSTING = 1,

View File

@@ -3,7 +3,6 @@
#include "functions.h"
#include "variables.h"
extern void func_8025982C(f32[3], f32[3], f32[3], f32);
extern void func_8025A6CC(enum comusic_e arg0, s32 arg1);
extern void chBottlesBonusCursor_func_802DF99C(void);
extern f32 *chBottlesBonusCursor_func_802E05AC(s32);

View File

@@ -11,7 +11,6 @@
extern u8 D_8037DCC8; //bottles bonus flags???
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
extern void func_8025AABC(enum comusic_e);
extern f32 func_8024E420(s32, s32, s32);
extern f32 func_8033DDB8(void);

View File

@@ -5,7 +5,6 @@
void func_802D77D4(Actor *this);
extern void player_setClimbParams(f32[3], f32[3], f32, u32);
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32[3], f32[3]);
typedef struct {
f32 unk0[3];

View File

@@ -2,8 +2,6 @@
#include "functions.h"
#include "variables.h"
extern bool ml_vec3f_point_within_horizontal_distance(f32[3], f32, f32, f32);
/* .data */
ActorAnimationInfo chCrabAnimations[] ={
{ 0, 0.0f},

View File

@@ -7,7 +7,6 @@ Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
void func_8035F138(Actor *this);
BKModelBin *func_803257B4(ActorMarker *marker);
extern void actor_postdrawMethod(ActorMarker *);
extern f32 func_80257204(f32, f32, f32, f32);
typedef struct {
s32 unk0;

View File

@@ -4,7 +4,6 @@
#define _HorzDist3v(v1, v2) ((v1[0]-v2[0])*(v1[0]-v2[0]) + (v1[2]-v2[2])*(v1[2]-v2[2]))
extern void func_802D729C(Actor *, f32);
extern f32 func_80257204(f32, f32, f32, f32);
extern Actor *bundle_spawn_f32(enum actor_e, f32[3]);
void chicecube_update(Actor *this);

View File

@@ -4,7 +4,6 @@
#include "snacker.h"
extern f32 ml_distanceSquared_vec3f(f32 [3], f32 [3]);
extern f32 func_80309B24(f32[3]);
extern void func_80328FF0(Actor *, f32);
extern void mapSpecificFlags_setN(s32, s32, s32);

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern int ml_vec3f_within_horizontal_distance(f32[3], f32[3], f32);
extern void func_802EFA20(ParticleEmitter *, f32, f32);
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
extern void func_80328FB0(Actor *, f32);

View File

@@ -2,8 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 ml_mapAbsRange_f(f32, f32, f32, f32, f32);
extern void func_8025901C(f32, f32 *, f32 *, f32);
extern f32 func_8029B2D0(void);
void func_8029957C(s32 arg0);

View File

@@ -4,7 +4,6 @@
#include "variables.h"
extern void controller_getJoystick(s32, f32*);
extern f32 ml_acosf(f32);
extern f32 player_getYaw(void);
extern void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max);
ParticleEmitter * func_802EDD8C(f32[3], f32, f32);

View File

@@ -8,7 +8,6 @@
#include "core2/ba/physics.h"
extern void controller_getJoystick(s32, f32*);
extern f32 ml_acosf(f32);
extern f32 player_getYaw(void);
extern void particleEmitter_setSphericalParticleVelocityRange(ParticleEmitter *this, f32 pitch_min, f32 yaw_min, f32 radial_min, f32 pitch_max, f32 yaw_max, f32 radial_max);
ParticleEmitter * func_802EDD8C(f32[3], f32, f32);

View File

@@ -4,8 +4,6 @@
#include "core2/statetimer.h"
extern int func_80258424(f32 vec[3], f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ);
/* .bss */
u8 D_8037D210;
u8 D_8037D211;

View File

@@ -4,9 +4,6 @@
extern void rumbleManager_80250E6C(f32, f32);
extern void ml_translate_y_local(f32[3], f32[3], f32);
extern void ml_translate_z_local(f32[3], f32[3], f32);
extern void ml_translate_x_local(f32[3], f32[3], f32);
extern void func_802BE720(void);
typedef struct {

View File

@@ -8,7 +8,6 @@
#include "core2/ba/physics.h"
extern int ml_vec3f_point_within_horizontal_distance(f32 vec[3], f32 x, f32 z, f32 val);
extern f32 player_getYaw(void);
/* .bss */

View File

@@ -3,9 +3,6 @@
#include "variables.h"
f32 mlDiffDegF(f32, f32);
/* .bss */
static f32 s_position[3];
static f32 s_rotation[3];

View File

@@ -7,8 +7,6 @@ extern bool func_80320C94(f32[3], f32[3], f32, f32 sp54[3], s32, s32);
extern f32 func_8033229C(ActorMarker *);
extern bool func_80309D58(f32[3], s32);
extern void ml_vec3f_normalize(f32 [3]);
typedef struct {
s16 flags;
// u8 pad2[0x2];

View File

@@ -3,8 +3,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_8025715C(f32, f32);
extern f32 func_802575BC(f32);
extern f32 func_80309B24(f32[3]);
extern void sfxsource_playSfxAtVolume(u8, f32);
extern void func_802CC340(Actor *, f32[3]);

View File

@@ -11,7 +11,6 @@ extern void sfxsource_set_fade_distances(u8, f32, f32);
extern void sfxsource_set_position(u8, f32[3]);
extern void func_8030E2C4(u8);
extern void sfxsource_setSampleRate(u8, s32);
extern void ml_vec3f_normalize(f32[3]);
typedef struct{
f32 unk0[3];

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern void func_80256E24(f32 [3], f32, f32, f32, f32, f32);
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
extern void func_803255FC(Actor *);
extern void func_80325760(Actor *);

View File

@@ -3,13 +3,11 @@
#include "functions.h"
#include "variables.h"
extern f32 ml_vec3f_horizontal_distance_zero_likely(f32 [3], f32[3]);
extern void func_8025A788(enum comusic_e, f32, f32);
extern void func_8031CC40(enum map_e, s32);
extern void fxRipple_802F363C(f32);
extern void func_802F9D38(s32);
extern void func_802EE6CC(f32[3], f32[3], s32[4], s32, f32, f32, s32, s32, s32);
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
extern void func_802EE2E8(Actor *arg0, s32 arg1, s32 cnt, s32 arg3, f32 arg4, f32 arg5, f32 arg6);
extern void gcquiz_func_80319EA4(void);
extern void fileProgressFlag_set(enum file_progress_e, bool);

View File

@@ -2,8 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_80257248(f32[3], f32[3]);
typedef struct {
f32 unk0;
f32 unk4;

View File

@@ -6,7 +6,6 @@
extern void func_80252C08(f32[3],f32[3], f32, f32[3]);
extern void func_80252CC4(f32[3],s32, f32, s32);
extern f32 func_802560D0(f32[3], f32[3], f32[3]);
extern f32 vtxList_getGlobalNorm(BKVertexList *);
extern void points_to_boundingBoxWithMargin(f32 arg0[3], f32 arg1[3], f32 margin, f32 min[3], f32 max[3]);

View File

@@ -8,7 +8,6 @@
extern f32 func_80257680(f32, f32, f32);
extern void func_80252330(f32, f32, f32);
typedef struct {

View File

@@ -7,8 +7,6 @@
#include <math.h>
#include "prop.h"
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
extern f32 func_802586B0(f32[3], f32[3]);
extern void mapModel_getCubeBounds(s32 min[3], s32 max[3]);
extern f32 func_803243D0(struct56s *arg0, f32 arg1[3]);
extern void bitfield_setBit(u32*, s32, bool);

View File

@@ -4,7 +4,6 @@
#include "variables.h"
#include "n_libaudio.h"
extern f32 func_80256AB4(f32, f32, f32, f32);
extern void func_80335394(s32, f32);
extern f32 sfx_randf2(f32, f32);

View File

@@ -9,10 +9,8 @@ extern s32 fileProgressFlag_get(s32);
extern s32 fileProgressFlag_getN(s32 offset, s32 numBits);
extern void func_8031FFAC(void);
extern void fileProgressFlag_set(enum file_progress_e index, s32 set);
extern void ml_vec3h_to_vec3f(f32 *, s32);
extern NodeProp *func_80304ED0(void*, f32 *);
extern void func_8031CD44(enum map_e, s32, f32, f32, s32);
extern void func_80256E24(f32 *, f32, f32, f32, f32, f32);
extern void mapSpecificFlags_set(s32, s32);
bool cutscene_skipEnterLairCutsceneCheck(void);

View File

@@ -13,11 +13,9 @@ void volatileFlag_clear(void);
void volatileFlag_set(enum volatile_flags_e index, s32 set);
s32 fileProgressFlag_getN(enum file_progress_e offset, s32 numBits);
void func_8031CE70(f32 *arg0, s32 arg1, s32 arg2);
void ml_vec3h_to_vec3f(f32 *, s32);
void func_8028F3D8(f32 *, f32, void(*)(ActorMarker *), ActorMarker *);
struct unkfunc_80304ED0 *func_80304ED0(void*, f32 *);
void func_8031CD44(s32, s32, f32, f32, s32);
void func_80256E24(f32 *, f32, f32, f32, f32, f32);
#define OBSCURE(ptr) (((((s32)(ptr) ^ 0x746DF219) & 0xFF) + ((((s32)(ptr) >> 0x18) & 0xFF) << 0x18) + ((((s32)(ptr) >> 8) & 0xFFFF) << 8)) ^ 0x19)

View File

@@ -46,7 +46,6 @@ void func_80323238(void){}
// =============================================BREAK ???
extern f32 ml_vec3f_length(f32 [3], f32[3]);
extern f32 ml_distanceSquared_vec3f(f32 [3], f32 [3]);
extern void func_80341180(f32, s32, s32, f32 *, f32 [3]);
/* .code */

View File

@@ -8,8 +8,6 @@
#define DIST_SQ_VEC3F(v1, v2) ((v1[0] - v2[0])*(v1[0] - v2[0]) + (v1[1] - v2[1])*(v1[1] - v2[1]) + (v1[2] - v2[2])*(v1[2] - v2[2]))
extern f32 ml_vec3f_length(f32[3], f32[3]);
extern bool ml_vec3f_within_distance(f32[3], f32[3], f32);
extern void func_802D7124(Actor *, f32);
extern void func_802EE6CC(f32[3], s32[4], s32[4], s32, f32, f32, s32, s32, s32);

View File

@@ -15,10 +15,6 @@ extern f32 func_8033229C(ActorMarker *marker);
extern f32 func_80309B24(f32 [3]);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
extern f32 ml_distanceSquared_vec3f(f32[3], f32[3]);
extern BKCollisionTri *func_80320C94(f32 arg0[3], f32 arg1[3], f32 arg2, f32 arg3[3], s32 arg4, u32 arg5);
/* .h */

View File

@@ -4,7 +4,6 @@
#include "core2/ba/physics.h"
extern void ml_vec3f_assign(f32[3], f32, f32, f32);
/* .data */
s32 D_80363790 = 0;

View File

@@ -1,11 +1,10 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include "ml/mtx.h"
extern f32 func_80255D70(f32);
#define LENGTH_SQ_VEC4F(v) (v[0]*v[0] + v[1]*v[1] + v[2]*v[2] + v[3]*v[3])
/* .data */

View File

@@ -1,10 +1,10 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include "core2/ba/physics.h"
extern int func_80258424(f32 vec[3], f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ);
extern f32 func_8031C5D4(struct0*);
extern void func_8031C5AC(struct0 *, f32 *);
extern f32 func_8031C5E4(struct0*);
@@ -12,7 +12,6 @@ extern void func_8031C5FC(struct0 *, f32);
extern void func_80244FC0(f32 arg0[3], f32 arg1[3], f32 arg2, f32 arg3, s32 arg4, u32 arg5);
extern s32 func_80244E54(f32[3], f32[3], f32 [3], u32, f32, f32);
extern BKCollisionTri *func_802457C4(f32[3], f32[3], f32, f32, f32[3], s32, u32);
extern f32 func_80255D70(f32 arg0);
extern s32 func_8029463C(void);
extern BKCollisionTri *func_80320C94(f32[3], f32[3], f32, f32[3], s32, u32);

View File

@@ -5,7 +5,6 @@
extern void func_8032F64C(f32[3], s32);
extern void func_80323240(struct56s *, f32, f32[3]);
extern f32 func_80323F74(struct56s *, f32, f32);
extern f32 func_80256AB4(f32, f32, f32, f32);
typedef struct {
s32 unk0;

View File

@@ -2,8 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 ml_vec3f_length_sq(f32[3], f32[3]);
typedef struct{
f32 unk0;
f32 unk4[3];

View File

@@ -7,8 +7,6 @@
extern void func_80244D94(f32[3], f32[3], f32[3], u32, f32);
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
extern f32 func_8033EA14(s32);
extern void func_8033EA40(s32, f32);
extern void projectile_setSprite(u8, enum asset_e);

View File

@@ -2,9 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_8025715C(f32, f32);
extern f32 func_802575BC(f32);
extern void ml_interpolate_vec3f(f32[3], f32[3], f32[3], f32);
extern bool func_80320DB0(f32[3], f32, f32[3], u32);
/* .h */

View File

@@ -4,7 +4,6 @@
#include "core2/ba/physics.h"
extern void func_80256E24(f32[3], f32, f32, f32, f32, f32);
extern f32 player_getYaw(void);
extern void chJigsawDance_setState(Actor *, s32);
extern void bsjig_setJiggyMarkerPtr(ActorMarker *);

View File

@@ -6,7 +6,6 @@
void animctrl_setAnimTimer(AnimCtrl*, f32);
void func_8025AC20(s32, s32, s32, f32, char*, s32);
f32 func_80257618(void);
typedef enum {
TRANSITION_ID_1_BLACK_IN = 1,
@@ -320,7 +319,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
case 0xA:
//zoom out only
vp_rotation[2] = 0.0f;
scale = (1.0f - func_80257618())*s_current_transition.transistion_info->scale + 0.1;
scale = (1.0f - func_80257618(percentage))*s_current_transition.transistion_info->scale + 0.1;
break;
}
if(!(s_current_transition.substate < 3) || s_current_transition.transistion_info->uid != 0x11){

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_80259198(f32, f32);
extern f32 func_802BD51C(void);
extern f32 player_getYaw(void);
extern void func_802BD870(f32, f32, f32, f32);

View File

@@ -3,7 +3,6 @@
#include "variables.h"
extern f32 func_802453DC(struct56s *, f32, f32[3], s32);
extern f32 func_80259198(f32, f32);
extern f32 func_802BD51C(void);
extern f32 player_getYaw(void);
extern void func_802BE244(f32, f32);

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_80259198(f32, f32);
extern f32 player_getYaw(void);
extern void func_802BD870(f32, f32, f32, f32);

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_80259198(f32, f32);
extern f32 player_getYaw(void);
extern f32 player_getPitch(void);
extern void func_802BD870(f32, f32, f32, f32);

View File

@@ -2,7 +2,6 @@
#include "functions.h"
#include "variables.h"
extern f32 func_80259198(f32, f32);
extern void func_802BD870(f32, f32, f32, f32);
/* .bss */

View File

@@ -7,13 +7,10 @@
extern bool func_80245314(f32[3], f32[3], f32, f32, u32);
extern int func_80244D94(f32[3], f32[3], f32[3], u32, f32);
extern int func_8024575C(f32[3], f32[3], f32, f32[3], s32, u32);
extern f32 ml_vec3f_length(f32[3], f32[3]);
extern f32 func_80259198(f32, f32);
extern f32 func_8028E82C(void);
extern f32 player_getYaw(void);
extern f32 func_8028EF88(void);
extern int func_80320DB0(f32[3], f32, f32[3], u32);
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
typedef struct {
f32* unk0;

View File

@@ -4,7 +4,6 @@
extern void func_802BD780(f32[3], f32[3], f32, f32, f32, f32);
extern f32 func_80257CF8(f32, f32, f32, f32, f32);
void ncFirstPersonCamera_setState(enum nc_first_person_state state);

View File

@@ -5,7 +5,6 @@
#include "core2/nc/camera.h"
extern void func_8025727C(f32, f32, f32, f32, f32, f32, f32*, f32*);
/* .bss */
static f32 ncStaticCameraPosition[3];

View File

@@ -11,7 +11,6 @@
#define SNACKER_BB_DIALOG_0 VER_SELECT(0xe26, 0xa68, 0, 0)
#define SNACKER_BB_DIALOG_1 VER_SELECT(0xe33, 0xa75, 0, 0)
s32 ml_vec3f_point_within_horizontal_distance(f32 *, f32, f32, f32);
void ncFirstPersonCamera_getZoomedInRotation(f32 *);
extern u8 D_8037DCCA;