documentation: core2/ba/physics

This commit is contained in:
Banjo Kazooie
2024-06-16 22:36:36 -05:00
parent 8fe5c3b4d1
commit 092de6aae3
208 changed files with 2342 additions and 2163 deletions

33
include/actor.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef ACTOR_H
#define ACTOR_H
#define ACTOR_FLAG_NONE (0)
#define ACTOR_FLAG_UNKNOWN_0 (1 << 0) // 0x1
#define ACTOR_FLAG_UNKNOWN_1 (1 << 1) // 0x2
#define ACTOR_FLAG_UNKNOWN_2 (1 << 2) // 0x4
#define ACTOR_FLAG_UNKNOWN_3 (1 << 3) // 0x8
#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10
#define ACTOR_FLAG_UNKNOWN_5 (1 << 5) // 0x20
#define ACTOR_FLAG_UNKNOWN_6 (1 << 6) // 0x40
#define ACTOR_FLAG_UNKNOWN_7 (1 << 7) // 0x80
#define ACTOR_FLAG_UNKNOWN_8 (1 << 8) // 0x100
#define ACTOR_FLAG_UNKNOWN_9 (1 << 9) // 0x200
#define ACTOR_FLAG_UNKNOWN_10 (1 << 10) // 0x400
#define ACTOR_FLAG_UNKNOWN_11 (1 << 11) // 0x800
#define ACTOR_FLAG_UNKNOWN_12 (1 << 12) // 0x1000
#define ACTOR_FLAG_UNKNOWN_13 (1 << 13) // 0x2000
#define ACTOR_FLAG_UNKNOWN_14 (1 << 14) // 0x4000
#define ACTOR_FLAG_UNKNOWN_15 (1 << 15) // 0x8000
#define ACTOR_FLAG_UNKNOWN_16 (1 << 16) // 0x10000
#define ACTOR_FLAG_UNKNOWN_17 (1 << 17) // 0x20000
#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000
#define ACTOR_FLAG_UNKNOWN_19 (1 << 19) // 0x80000
#define ACTOR_FLAG_UNKNOWN_20 (1 << 20) // 0x100000
#define ACTOR_FLAG_UNKNOWN_21 (1 << 21) // 0x200000
#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000
#define ACTOR_FLAG_UNKNOWN_23 (1 << 23) // 0x800000
#define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000
#define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000
#define ACTOR_FLAG_UNKNOWN_26 (1 << 26) // 0x4000000
#endif // ACTOR_H

View File

@@ -40,11 +40,6 @@ typedef struct animation_file_s{
u8 pad6[2];
} AnimationFile;
typedef struct animation_file_cache_s{
AnimationFile *unk0;
u16 unk4_15:15;
u16 unk4_0:1;
u8 pad6[2];
}AnimationFileCache;
#endif

View File

@@ -1,6 +1,19 @@
#ifndef __MEM_H__
#define __MEM_H__
/**
* copy memory area
*/
void memcpy(void * dst, void *src, int size);
void func_80254630(void * dst, void *src, int size); //memcopy_fast
/**
* copy an array of wide_characters
*/
void wmemcpy(void * dst, void *src, int size);
/**
* copy memory area
*/
void memmove(u8* dst, u8* src, s32 n);
#endif

View File

@@ -0,0 +1,53 @@
#ifndef __BA_PHYSICS_H__
#define __BA_PHYSICS_H__
#include <ultra64.h>
typedef enum ba_physics_type_e{
BA_PHYSICS_NONE,
BA_PHYSICS_UNK1,
BA_PHYSICS_NORMAL,
BA_PHYSICS_LOCKED_ROTATION,
BA_PHYSICS_UNK4,
BA_PHYSICS_INVERTED_YAW,
BA_PHYSICS_AIRBORN,
BA_PHYSICS_FREEZE,
BA_PHYSICS_UNK8,
BA_PHYSICS_NO_GRAVITY,
BA_PHYSICS_CLIMB,
BA_PHYSICS_TRANSFORM,
BA_PHYSICS_GOTO,
BA_PHYSICS_END
}BaPhysicsType;
void baphysics_get_position_change(f32 dst[3]);
void baphysics_init(void);
void baphysics_update(void);
void baphysics_reset_horizontal_velocity(void);
void baphysics_set_type(BaPhysicsType);
void baphysics_set_target_velocity(f32 src[3]);
void baphysics_set_target_horizontal_velocity(f32);
void baphysics_set_target_yaw(f32);
void baphysics_set_vertical_velocity(f32);
void baphysics_set_horizontal_velocity(f32, f32);
void baphysics_set_velocity(f32 src[3]);
f32 baphysics_get_gravity(void);
BaPhysicsType baphysics_get_type(void);
f32 baphysics_get_target_horizontal_velocity(void);
f32 baphysics_get_target_vertical_velocity(void);
f32 baphysics_get_target_yaw(void);
void baphysics_get_velocity(f32 dst[3]);
f32 baphysics_get_vertical_velocity(void);
f32 baphysics_get_horizontal_velocity(void);
f32 baphysics_get_horizontal_velocity_percentage(void);
void baphysics_reset(void);
void baphysics_set_acceleration(f32);
void baphysics_reset_gravity(void);
void baphysics_reset_terminal_velocity(void);
void baphysics_set_goto_duration(f32);
void baphysics_set_goto_position(f32 src[3]);
void baphysics_set_gravity(f32);
void baphysics_set_terminal_velocity(f32);
int baphysics_is_slower_than(f32);
int baphysics_goto_done(void);
#endif

View File

@@ -5,7 +5,7 @@ enum yaw_state_e{
YAW_STATE_0_NONE,
YAW_STATE_1_DEFAULT,
YAW_STATE_2_UNBOUNDED,
YAW_STATE_3_BOUNDED,
YAW_STATE_3_BOUNDED
};
void yaw_init(void);

View File

@@ -108,10 +108,6 @@ void pitch_setIdeal(f32);
f32 pitch_get(void);
f32 player_getYPosition(void);
void func_80297970(f32);
f32 _get_vertVelocity(void);
void climbGetBottom(f32 dst[3]);
void yaw_setIdeal(f32);
@@ -155,7 +151,7 @@ void actor_collisionOff(Actor *);
void *assetcache_get(enum asset_e assetId);
Actor *actor_new(s32 (*position)[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
Actor *actor_new(s32 position[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
Actor *func_802C8A54(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AA8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AF8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
@@ -209,7 +205,7 @@ void fxhealthscore_free(enum item_e, struct8s *);
struct7s *fxairscore_new(s32);
void fxairscore_update(enum item_e, struct7s *);
void fxairscore_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
void fxairscore_free(s32, struct8s *);
void fxairscore_free(s32, struct7s *);
@@ -252,9 +248,9 @@ void particleEmitter_setParticleVelocityRange(ParticleEmitter *, f32, f32, f32,
void func_802EFF50(ParticleEmitter *, f32);
void particleEmitter_setRGB(ParticleEmitter *this, s32 arg1[3]);
void particleEmitter_setSpawnInterval(ParticleEmitter *, f32);
int func_8024DC04(f32, f32, f32);
void func_8024E3A8(f32 [3], f32);
OSContPad *func_8024F3F4(void);
OSMesgQueue *pfsManager_getFrameReplyQ(void);
void ml_vec3f_clear(f32 dst[3]);
@@ -322,20 +318,6 @@ void func_80294980(f32 arg0[3]);
f32 get_slope_timer(void);
f32 get_turbo_duration(void);
void func_80295C08(void (* arg0)(void));
void func_802978DC(int);
void func_80297970(f32);
void func_8029797C(f32);
void player_setYVelocity(f32);
void func_802979AC(f32, f32);
f32 func_80297A64(void);
f32 func_80297A70(void);
f32 func_80297A7C(void);
f32 _get_horzVelocity(void);
f32 func_80297AF0(void);
void gravity_set(f32);
void func_80297B64(f32);
void func_80297BF8(f32);
int func_80297C04(f32);
void func_80297CCC(f32);
f32 pitch_getIdeal(void);
void pitch_setAngVel(f32, f32);
@@ -455,11 +437,11 @@ void func_8032728C(f32[3], f32, s32, int(*)(Actor *));
Actor *func_8032813C(enum actor_e actor_id, f32 position[3], s32 yaw);
int func_8032863C(AnimCtrl *, f32, f32);
int func_80328A2C(Actor *, f32, s32, f32);
void func_80328A84(Actor *, u32);
void subaddie_set_state(Actor *, u32);
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
int func_80328B38(Actor *, s32, f32);
void func_80328B8C(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
int func_80328BD4(Actor *, s32, f32, s32, f32 );
int subaddie_maybe_set_state(Actor *, s32, f32);
void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
int subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
void func_80328CEC(Actor *, s32, s32, s32);
void func_80328FB0(Actor *, f32);
int func_80329030(Actor *, s32);
@@ -501,7 +483,6 @@ void func_80352CF4(f32 *, f32 *, f32, f32);
AnimCtrl *baanim_getAnimCtrlPtr(void);
void _get_velocity(f32 dst[3]);
void player_setYPosition(f32);
NodeProp *func_80304C38(enum actor_e arg0, Actor *arg1);
@@ -576,6 +557,6 @@ void ability_unlock(enum ability_e);
extern void func_802EE278(Actor *, s32, s32, s32, f32, f32);
extern void fxSparkle_chTreasure(s16[3]);
extern void actor_collisionOn(Actor *);
extern void func_80328AC8(Actor *, s32);
extern void subaddie_set_state_forward(Actor *, s32);
#endif