mirror of
https://github.com/zeldaret/oot
synced 2026-07-08 14:26:45 -04:00
Decompile Player (#387)
* Setup player decomp * Decompile z_player.c and z_player_lib.c * Decompile remaining z_player.c functions * Various player improvements * Player progress (some non matchings and .data migrated) * Player progress (reposition data and fix some non matchings) * Cleanup, improve and document parts of z_player_lib.c/z_player.c * Fix player renames in z_en_st.c * Fix missing open/close disps in z_player.c * Minor player fixes * Address player comments
This commit is contained in:
+101
-82
@@ -221,7 +221,7 @@ void func_80028990(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void func_80028A54(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
UNK_TYPE func_80028B18(GlobalContext* globalCtx, Vec3f*, Vec3f*, Vec3f*);
|
||||
void func_80028B74(GlobalContext*, Vec3f*, UNK_PTR, UNK_PTR, Color_RGB8*, Color_RGB8*);
|
||||
// ? func_80028BB0(?);
|
||||
void func_80028BB0(GlobalContext*, Vec3f*, Vec3f*, Vec3f*, Color_RGB8*, Color_RGB8*, s32, s32);
|
||||
// ? func_80028CEC(?);
|
||||
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
s16 scaleStep);
|
||||
@@ -247,7 +247,7 @@ void func_8002949C(GlobalContext* globalCtx, Vec3f* pos, u32, u32, u32, u32);
|
||||
// ? func_80029694(?);
|
||||
// ? func_80029724(?);
|
||||
void func_800297A4(GlobalContext* globalCtx, Vec3f* vec, f32, s32, s32, s32, s32, s32, s32, s32);
|
||||
// ? func_800298EC(?);
|
||||
void func_800298EC(GlobalContext* globalCtx, Vec3f* vec, s16);
|
||||
// ? func_8002993C(?);
|
||||
void func_800299AC(GlobalContext* globalCtx, Vec3f* v);
|
||||
// ? func_80029B30(?);
|
||||
@@ -265,13 +265,13 @@ void func_80029E8C(GlobalContext* globalCtx, Vec3f* burstDepthY, Vec3f* burstDep
|
||||
void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 arg4,
|
||||
s16* linkDetected);
|
||||
// ? func_80029F44(?);
|
||||
// ? func_80029FAC(?);
|
||||
void func_80029FAC(GlobalContext* globalCtx, Vec3f*, f32);
|
||||
// ? func_8002A140(?);
|
||||
// ? func_8002A1DC(?);
|
||||
// ? func_8002A2A4(?);
|
||||
// ? func_8002A32C(?);
|
||||
// ? func_8002A3C4(?);
|
||||
// ? func_8002A484(?);
|
||||
void func_8002A484(GlobalContext*, f32, s16, f32);
|
||||
// ? func_8002A4D4(?);
|
||||
void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
|
||||
void func_8002A65C(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 arg3, s16 arg4);
|
||||
@@ -292,7 +292,7 @@ void ActorShadow_DrawFunc_Circle(Actor* actor, Lights* lights, GlobalContext* gl
|
||||
void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFunc_Squiggly(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* globalCtx);
|
||||
void func_8002BDB0(Actor* actor, s32 arg1, s32 arg2, UNK_PTR arg3, s32 arg4, UNK_PTR arg5);
|
||||
void func_8002BDB0(Actor* actor, s32 arg1, s32 arg2, Vec3f* arg3, s32 arg4, Vec3f* arg5);
|
||||
void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx);
|
||||
s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag);
|
||||
void Flags_SetSwitch(GlobalContext* globalCtx, s32 flag);
|
||||
@@ -310,9 +310,9 @@ void Flags_SetTempClear(GlobalContext* globalCtx, s32 flag);
|
||||
void Flags_UnsetTempClear(GlobalContext* globalCtx, s32 flag);
|
||||
s32 Flags_GetCollectible(GlobalContext* globalCtx, s32 flag);
|
||||
void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag);
|
||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, u32 texture, s16 arg3, s16 arg4,
|
||||
void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 arg3, s16 arg4,
|
||||
u8 arg5, u8 arg6);
|
||||
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, u32 texture, s32 arg3, s32 arg4,
|
||||
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 arg3, s32 arg4,
|
||||
s32 arg5, s32 arg6, s32 arg7);
|
||||
s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx);
|
||||
void Actor_Kill(Actor* actor);
|
||||
@@ -342,10 +342,10 @@ s32 func_8002DDE4(GlobalContext* globalCtx);
|
||||
s32 func_8002DDF4(GlobalContext* globalCtx);
|
||||
void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB);
|
||||
void func_8002DE74(GlobalContext* globalCtx, Player* player);
|
||||
void func_8002DECC(GlobalContext* globalCtx, Player* player, Actor* actor);
|
||||
void func_8002DECC(GlobalContext* globalCtx, Player* player, Actor* horse);
|
||||
s32 func_8002DEEC(Player* player);
|
||||
void func_8002DF18(GlobalContext* globalCtx, Player* player);
|
||||
u32 func_8002DF38(GlobalContext* globalCtx, Actor* actor, u8 newAction);
|
||||
s32 func_8002DF38(GlobalContext* globalCtx, Actor* actor, u8 csMode);
|
||||
s32 func_8002DF54(GlobalContext* globalCtx, Actor* actor, u8 arg2);
|
||||
void func_8002DF90(DynaPolyActor* dynaActor);
|
||||
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
|
||||
@@ -378,7 +378,7 @@ u32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx);
|
||||
void func_8002F5C4(Actor* actorA, Actor* actorB, GlobalContext* globalCtx);
|
||||
void func_8002F5F0(Actor* actor, GlobalContext* globalCtx);
|
||||
u32 Actor_HasChild(GlobalContext* globalCtx, Actor* actor);
|
||||
u32 func_8002F63C(GlobalContext* globalCtx, Actor* actor, s32 arg2);
|
||||
u32 func_8002F63C(GlobalContext* globalCtx, Actor* horse, s32 arg2);
|
||||
u32 Actor_HasNoChild(GlobalContext* globalCtx, Actor* actor);
|
||||
void func_8002F698(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
|
||||
void func_8002F6D4(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
|
||||
@@ -393,7 +393,7 @@ void func_8002F91C(Actor* actor, u16 sfxId);
|
||||
void func_8002F948(Actor* actor, u16 sfxId);
|
||||
void func_8002F974(Actor* actor, u16 sfxId);
|
||||
void func_8002F994(Actor* actor, s32 arg1);
|
||||
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, UNK_TYPE arg2, UNK_TYPE arg3, UNK_TYPE arg4);
|
||||
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* arg2, u32 arg3, Vec3f* arg4);
|
||||
void func_800304B0(GlobalContext* globalCtx);
|
||||
void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx);
|
||||
@@ -516,6 +516,7 @@ f32 func_80038B7C(CollisionPoly*, Vec3f*);
|
||||
// ? T_BGCheck_getBGDataInfo(?);
|
||||
// ? func_8003C55C(?);
|
||||
// ? func_8003C614(?);
|
||||
f32 func_8003C890(CollisionContext*, CollisionPoly**, Vec3f*);
|
||||
f32 func_8003C8EC(GlobalContext*, CollisionContext*, CollisionPoly**, Vec3f*);
|
||||
f32 func_8003C940(CollisionContext*, CollisionPoly**, s32*, Vec3f*);
|
||||
f32 func_8003C9A4(CollisionContext*, CollisionPoly**, UNK_PTR, Actor*, Vec3f*);
|
||||
@@ -594,6 +595,7 @@ struct_80041C10_ret* func_80041C10(CollisionContext* colCtx, s32, s32);
|
||||
// ? func_80041EC8(?);
|
||||
// ? func_80041F10(?);
|
||||
u16 func_80041F34(CollisionContext*, CollisionPoly*, u8);
|
||||
s32 func_80041FA0(CollisionContext*, CollisionPoly*, u32);
|
||||
// ? func_80042048(?);
|
||||
// ? func_80042108(?);
|
||||
s32 func_8004213C(GlobalContext*, CollisionContext*, f32, f32, f32*, UNK_PTR);
|
||||
@@ -615,8 +617,13 @@ void func_80042FC4(GlobalContext*, CollisionContext*);
|
||||
void DynaPolyInfo_SetActorMove(DynaPolyActor* actor, DynaPolyMoveFlag flags);
|
||||
void func_800434A0(DynaPolyActor* dynaActor);
|
||||
void func_800434A8(DynaPolyActor* actor);
|
||||
void func_80043538(DynaPolyActor* dynaActor);
|
||||
void func_800434C8(CollisionContext* colCtx, u32 floorPolySource);
|
||||
void func_80043508(CollisionContext* colCtx, u32 floorPolySource);
|
||||
void func_80043538(DynaPolyActor* actor);
|
||||
s32 func_80043548(DynaPolyActor* dynaActor);
|
||||
s32 func_8004356C(DynaPolyActor* dynaActor);
|
||||
s32 func_80043590(DynaPolyActor* dynaActor);
|
||||
s32 func_800435B4(DynaPolyActor* dynaActor);
|
||||
f32 func_800437F0(f32, f32);
|
||||
// ? func_8004389C(?);
|
||||
// ? func_800438DC(?);
|
||||
@@ -683,7 +690,8 @@ void Camera_ChangeStatus(Camera* camera, s16 status);
|
||||
void func_80059EC8(Camera* camera);
|
||||
// ? func_8005A02C(?);
|
||||
// ? Camera_ChangeMode(?);
|
||||
// ? func_8005A444(?);
|
||||
s32 func_8005A444(Camera* camera, s16 arg1);
|
||||
s32 func_8005A470(Camera* camera, s16 arg1);
|
||||
// ? Camera_ChangeSetting(?);
|
||||
s32 func_8005A77C(Camera* camera, s16 button);
|
||||
// ? func_8005A7A8(?);
|
||||
@@ -696,12 +704,13 @@ s32 Camera_SetParam(Camera*, s32, void*);
|
||||
// ? func_8005AC48(?);
|
||||
// ? func_8005AC60(?);
|
||||
// ? func_8005AC6C(?);
|
||||
// ? func_8005AD40(?);
|
||||
s32 func_8005AD40(Camera* camera, Actor* doorActor, s16 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6);
|
||||
// ? func_8005AE64(?);
|
||||
Vec3f* func_8005AFB4(Vec3f* dst, Camera* camera);
|
||||
void Camera_SetCameraData(Camera*, s16, CutsceneCameraPoint*, CutsceneCameraPoint*, s16, s16, s32);
|
||||
// ? func_8005B044(?);
|
||||
s32 func_8005B198();
|
||||
// ? func_8005B1A4(?);
|
||||
s16 func_8005B1A4(Camera* camera);
|
||||
DamageTable* DamageTable_Get(s32 index);
|
||||
// ? func_8005B280(?);
|
||||
void func_8005B2AC(GraphicsContext* gfx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
|
||||
@@ -789,8 +798,6 @@ s32 Collider_QuadSetOC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 func_8005D218(GlobalContext* globalCtx, ColliderQuad* quad, Vec3f* arg2);
|
||||
s32 Collider_InitOcLine(GlobalContext* globalCtx, OcLine* line);
|
||||
s32 Collider_DestroyOcLine(GlobalContext* globalCtx, OcLine* line);
|
||||
// ? func_8005D334(?);
|
||||
// ? func_8005D3A4(?);
|
||||
void func_8005D3BC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DestroyContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_InitContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
@@ -805,10 +812,7 @@ s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* co
|
||||
s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetOCLine(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, OcLine* collider);
|
||||
// ? func_8005DF2C(?);
|
||||
// ? func_8005DF50(?);
|
||||
// ? func_8005DF74(?);
|
||||
// ? func_8005E2EC(?);
|
||||
void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v);
|
||||
// ? func_8005E4F8(?);
|
||||
// ? func_8005E604(?);
|
||||
// ? func_8005E800(?);
|
||||
@@ -833,7 +837,7 @@ s32 CollisionCheck_GeneralLineOcCheck(GlobalContext* globalCtx, CollisionCheckCo
|
||||
// ? func_800626B0(?);
|
||||
void Collider_CylinderUpdate(Actor* actor, ColliderCylinder* collider);
|
||||
void func_80062718(ColliderCylinder* collider, Vec3s* pos);
|
||||
// ? func_80062734(?);
|
||||
void func_80062734(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
|
||||
void func_800627A0(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void func_800628A4(s32 arg0, ColliderJntSph* collider);
|
||||
void func_80062A28(GlobalContext*, Vec3f*);
|
||||
@@ -845,7 +849,7 @@ void func_80062E14(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2);
|
||||
s32 func_80062ECC(f32, f32, f32, Vec3f*, Vec3f*, Vec3f*, Vec3f*, Vec3f*);
|
||||
void SaveContext_Init(void);
|
||||
// ? func_800636C0(?);
|
||||
void func_8006375C(s32 arg0, s32 arg1, float* d_80855320);
|
||||
void func_8006375C(s32 arg0, s32 arg1, const char* text);
|
||||
// ? func_8006376C(?);
|
||||
// ? func_80063828(?);
|
||||
void func_8006390C(Input* input);
|
||||
@@ -940,15 +944,17 @@ void func_800775D8();
|
||||
s32 func_800775E4();
|
||||
void func_800775F0(u16);
|
||||
// ? func_80077600(?);
|
||||
void func_800776E4(GlobalContext* globalCtx);
|
||||
void Lib_MemSet(u8* dest, size_t size, u8 val);
|
||||
f32 Math_Coss(s16 angle);
|
||||
f32 Math_Sins(s16 angle);
|
||||
s32 Math_ApproxUpdateScaledS(s16* fp, s16 target, s16 step);
|
||||
s32 Math_ApproxS(s16* fp, s16 target, s16 step);
|
||||
s32 Math_ApproxF(f32* fp, f32 target, f32 step);
|
||||
s32 func_80077AF8(s16* fp, s16 target, s16 step);
|
||||
s32 func_80077B58(s16* fp, s16 target, s16 step);
|
||||
s32 func_80077C6C(f32* fp, f32 target, f32 incrStep, f32 decrStep);
|
||||
s32 Math_ApproxUpdateScaledS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_ApproxS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_ApproxF(f32* pValue, f32 target, f32 step);
|
||||
s32 func_80077AF8(s16* pValue, s16 target, s16 step);
|
||||
s32 func_80077B58(s16* pValue, s16 target, s16 step);
|
||||
s32 func_80077C6C(f32* pValue, f32 target, f32 incrStep, f32 decrStep);
|
||||
void func_80077D10(f32* arg0, s16* arg1, Input* input);
|
||||
s16 Math_Rand_S16Offset(s16 base, s16 range);
|
||||
void Math_Vec3f_Copy(Vec3f* dest, Vec3f* src);
|
||||
void Math_Vec3s_ToVec3f(Vec3f* dest, Vec3s* src);
|
||||
@@ -975,6 +981,7 @@ void Health_InitData(GlobalContext* globalCtx);
|
||||
void Health_UpdateData(GlobalContext* globalCtx);
|
||||
void Health_Draw(GlobalContext* globalCtx);
|
||||
void Health_HandleCriticalAlarm(GlobalContext* globalCtx);
|
||||
u32 Health_IsCritical(void);
|
||||
void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type);
|
||||
void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius);
|
||||
void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius);
|
||||
@@ -1039,7 +1046,7 @@ Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b);
|
||||
// ? func_8007FFE0(?);
|
||||
// ? func_80080024(?);
|
||||
s16 func_800800F8(GlobalContext* globalCtx, s16 arg1, s16 arg2, Actor* actor, s16 arg4);
|
||||
UNK_TYPE func_800803F0(GlobalContext* globalCtx, s16 arg1);
|
||||
void func_800803F0(GlobalContext* globalCtx, s16 camId);
|
||||
// ? func_80080480(?);
|
||||
void func_80080788(UNK_TYPE, UNK_TYPE);
|
||||
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
|
||||
@@ -1076,6 +1083,7 @@ void func_80087680(GlobalContext* globalCtx);
|
||||
void func_800876C8(GlobalContext* globalCtx);
|
||||
s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2);
|
||||
void func_80088AA0(s16 seconds);
|
||||
void func_80088AF0(GlobalContext* globalCtx);
|
||||
void func_80088B34(s16 arg0);
|
||||
void Interface_Draw(GlobalContext* globalCtx);
|
||||
void Interface_Update(GlobalContext* globalCtx);
|
||||
@@ -1084,50 +1092,54 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
|
||||
void Path_CopyLastPoint(Path* path, Vec3f* dest);
|
||||
// ? func_8008E6A0(?);
|
||||
// ? func_8008E6AC(?);
|
||||
// ? func_8008E750(?);
|
||||
s32 func_8008E8DC(GlobalContext*, Player*);
|
||||
s32 func_8008E988(GlobalContext*);
|
||||
void Player_SetBootData(GlobalContext* globalCtx, Player* player);
|
||||
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* player);
|
||||
s32 Player_InCsMode(GlobalContext* globalCtx);
|
||||
s32 func_8008E9C4(Player* player);
|
||||
s32 func_8008E9D0(Player* player);
|
||||
// ? func_8008E9F8(?);
|
||||
// ? func_8008EA40(?);
|
||||
// ? func_8008EB2C(?);
|
||||
// ? func_8008EC04(?);
|
||||
void func_8008ECAC(GlobalContext*, Player* player);
|
||||
void func_8008EDF0(Player*);
|
||||
// ? func_8008EE08(?);
|
||||
s32 func_8008EF44(GlobalContext*, s32);
|
||||
s32 func_8008EF5C(GlobalContext* globalCtx, Vec3f* pos, f32 radius, f32 arg3);
|
||||
// ? func_8008F034(?);
|
||||
u8 func_8008F080(GlobalContext*);
|
||||
Player* func_8008F08C(GlobalContext*);
|
||||
s32 func_8008F098(GlobalContext*);
|
||||
s32 func_8008F0AC(GlobalContext*);
|
||||
s32 func_8008F0D8(Player* player, s32);
|
||||
s32 func_8008F104(Player* player);
|
||||
s32 Player_IsChildWithHylianShield(Player* player);
|
||||
s32 Player_ActionToModelGroup(Player* player, s32 actionParam);
|
||||
void Player_SetModelsForHoldingShield(Player* player);
|
||||
void Player_SetModels(Player* player, s32 modelGroup);
|
||||
void Player_SetModelGroup(Player* player, s32 modelGroup);
|
||||
void func_8008EC70(Player* player);
|
||||
void Player_SetEquipmentData(GlobalContext* globalCtx, Player* player);
|
||||
void Player_UpdateBottleHeld(GlobalContext* globalCtx, Player* player, s32 item, s32 actionParam);
|
||||
void func_8008EDF0(Player* player);
|
||||
void func_8008EE08(Player* player);
|
||||
s32 func_8008EF44(GlobalContext* globalCtx, s32 ammo);
|
||||
s32 Player_IsBurningStickInRange(GlobalContext* globalCtx, Vec3f* pos, f32 radius, f32 arg3);
|
||||
s32 Player_GetStrength(void);
|
||||
u8 Player_GetMask(GlobalContext* globalCtx);
|
||||
Player* Player_UnsetMask(GlobalContext* globalCtx);
|
||||
s32 Player_HasMirrorShieldEquipped(GlobalContext* globalCtx);
|
||||
s32 Player_HasMirrorShieldSetToDraw(GlobalContext* globalCtx);
|
||||
s32 Player_ActionToMagicSpell(Player* player, s32 actionParam);
|
||||
s32 Player_HoldsHookshot(Player* player);
|
||||
s32 func_8008F128(Player* player);
|
||||
s32 func_8008F158(s32);
|
||||
void func_8008F180(Player* player);
|
||||
s32 func_8008F1A0(Player* player);
|
||||
// ? func_8008F1CC(?);
|
||||
s32 func_8008F224(Player* player, s32);
|
||||
void func_8008F250(Player* player);
|
||||
s32 func_8008F270(Player* player, s32);
|
||||
s32 func_8008F29C(Player* player);
|
||||
s32 func_8008F2F8(GlobalContext*);
|
||||
// ? func_8008F470(?);
|
||||
// ? func_8008F87C(?);
|
||||
// ? func_8008FCC8(?);
|
||||
// ? func_800902F0(?);
|
||||
// ? func_80090440(?);
|
||||
u8 func_80090480(GlobalContext* globalCtx, Collider* collider, Struct_80090480_arg2* arg2, Vec3f* arg3, Vec3f* arg4);
|
||||
// ? func_80090604(?);
|
||||
// ? func_800906D4(?);
|
||||
// ? func_800907E4(?);
|
||||
// ? func_80090A28(?);
|
||||
// ? func_80090AFC(?);
|
||||
// ? func_80091880(?);
|
||||
// ? func_80091A24(?);
|
||||
s32 Player_ActionToSword(s32 actionParam);
|
||||
s32 Player_GetSwordHeld(Player* player);
|
||||
s32 Player_HoldsTwoHandedWeapon(Player* player);
|
||||
s32 Player_HoldsBrokenKnife(Player* player);
|
||||
s32 Player_ActionToBottle(Player* player, s32 actionParam);
|
||||
s32 Player_GetBottleHeld(Player* player);
|
||||
s32 Player_ActionToExplosive(Player* player, s32 actionParam);
|
||||
s32 Player_GetExplosiveHeld(Player* player);
|
||||
s32 func_8008F2BC(Player* player, s32 actionParam);
|
||||
s32 func_8008F2F8(GlobalContext* globalCtx);
|
||||
void func_8008F470(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, s32 lod,
|
||||
s32 tunic, s32 boots, s32 face, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
|
||||
void* arg);
|
||||
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor);
|
||||
s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
s32 func_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
|
||||
u8 func_80090480(GlobalContext* globalCtx, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip,
|
||||
Vec3f* newBase);
|
||||
void Player_DrawGetItem(GlobalContext* globalCtx, Player* player);
|
||||
u32 func_80091738(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime);
|
||||
void func_8009214C(GlobalContext* globalCtx, u8* segment, struct_80091A24_arg3* arg2, Vec3f* pos, Vec3s* rot, f32 scale,
|
||||
s32 sword, s32 tunic, s32 shield, s32 boots);
|
||||
void PreNMI_Init(PreNMIContext* prenmiCtx);
|
||||
Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2);
|
||||
void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 y, f32 x);
|
||||
@@ -1238,7 +1250,7 @@ void SkelAnime_LoadAnimationType5(GlobalContext* globalCtx, Actor* actor, SkelAn
|
||||
void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx);
|
||||
void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
|
||||
LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* limbDrawTable,
|
||||
Vec3s* arg6, s32 limbBufCount);
|
||||
Vec3s* transitionDrawTbl, s32 limbBufCount);
|
||||
void func_800A3B8C(SkelAnime* skelAnime);
|
||||
s32 func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
@@ -2126,7 +2138,7 @@ void Audio_InitSequencePlayers(void);
|
||||
// ? func_800ECDF8(?);
|
||||
// ? func_800ED200(?);
|
||||
// ? func_800ED458(?);
|
||||
// ? func_800ED858(?);
|
||||
void func_800ED858(u8);
|
||||
// ? func_800ED93C(?);
|
||||
// ? func_800EDA3C(?);
|
||||
// ? func_800EDD68(?);
|
||||
@@ -2168,11 +2180,15 @@ void Audio_InitSequencePlayers(void);
|
||||
// ? func_800F3ED4(?);
|
||||
// ? func_800F3F3C(?);
|
||||
// ? func_800F3F84(?);
|
||||
// ? func_800F4010(?);
|
||||
void func_800F4010(Vec3f*, u16, f32);
|
||||
void func_800F4138(Vec3f*, u16, f32);
|
||||
void func_800F4190(Vec3f*, u16);
|
||||
void func_800F436C(UNK_TYPE arg0, s16 arg1, f32 arg2);
|
||||
// ? func_800F4414(?);
|
||||
// ? func_800F4524(?);
|
||||
// ? func_800F4784(?);
|
||||
void func_800F47BC(void);
|
||||
void func_800F47FC(void);
|
||||
// ? func_800F491C(?);
|
||||
// ? func_800F4A70(?);
|
||||
void func_800F4C58(Vec3f*, u16, u8);
|
||||
@@ -2185,22 +2201,25 @@ void func_800F574C(f32 arg0, UNK_TYPE arg2);
|
||||
void func_800F595C(u16);
|
||||
void func_800F59E8(u16);
|
||||
// ? func_800F5ACC(?);
|
||||
// ? func_800F5C64(?);
|
||||
void func_800F5C64(u16);
|
||||
// ? func_800F5CF8(?);
|
||||
// ? func_800F5E18(?);
|
||||
// ? func_800F5E90(?);
|
||||
void func_800F5E90(u8);
|
||||
void func_800F6114(f32);
|
||||
void func_800F6268(f32, UNK_TYPE);
|
||||
void func_800F6584(UNK_TYPE);
|
||||
// ? func_800F64E0(?);
|
||||
void func_800F6584(UNK_TYPE);
|
||||
// ? func_800F66C0(?);
|
||||
void func_800F66DC(s8);
|
||||
// ? func_800F6700(?);
|
||||
// ? func_800F67A0(?);
|
||||
void func_800F67A0(u8);
|
||||
// ? func_800F6828(?);
|
||||
void func_800F68BC(s8);
|
||||
// ? func_800F68D4(?);
|
||||
// ? func_800F691C(?);
|
||||
void func_800F6964(u16);
|
||||
void func_800F6AB0(u8);
|
||||
// ? func_800F6B68(?);
|
||||
// ? func_800F6BB8(?);
|
||||
void func_800F6C14();
|
||||
@@ -2224,7 +2243,7 @@ void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u32 a2, u32* a3, u32* a4, u32*
|
||||
// ? func_800F87A0(?);
|
||||
// ? func_800F8884(?);
|
||||
void func_800F89E8(Vec3f*);
|
||||
void func_800F8D04(u32 a0);
|
||||
void func_800F8D04(u16 arg0);
|
||||
// ? func_800F8D04(?);
|
||||
// ? func_800F8E3C(?);
|
||||
// ? func_800F8F34(?);
|
||||
@@ -2316,10 +2335,10 @@ void SystemArena_Check();
|
||||
void SystemArena_Init(void* start, u32 size);
|
||||
void SystemArena_Cleanup();
|
||||
u8 SystemArena_IsInitalized();
|
||||
u32 Math_Rand_Next();
|
||||
u32 Math_Rand_Next(void);
|
||||
void Math_Rand_Seed(u32 seed);
|
||||
f32 Math_Rand_ZeroOne();
|
||||
f32 Math_Rand_Centered();
|
||||
f32 Math_Rand_ZeroOne(void);
|
||||
f32 Math_Rand_Centered(void);
|
||||
void Math_Rand_Seed_Variable(u32* rndNum, u32 seed);
|
||||
u32 Math_Rand_Next_Variable(u32* rndNum);
|
||||
f32 Math_Rand_ZeroOne_Variable(u32* rndNum);
|
||||
|
||||
@@ -45,6 +45,16 @@
|
||||
|
||||
#define CHECK_QUEST_ITEM(item) (gBitFlags[item] & gSaveContext.questItems)
|
||||
|
||||
#define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \
|
||||
? ITEM_NONE \
|
||||
: (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) \
|
||||
? ITEM_SWORD_BGS \
|
||||
: gSaveContext.equips.buttonItems[0])
|
||||
|
||||
#define C_BTN_ITEM(button) ((gSaveContext.buttonStatus[button + 1] != BTN_DISABLED) \
|
||||
? gSaveContext.equips.buttonItems[button + 1] \
|
||||
: ITEM_NONE)
|
||||
|
||||
#define CHECK_PAD(state, combo) (~(state.in.button | ~(combo)) == 0)
|
||||
|
||||
#define LOG(exp, value, format, file, line) \
|
||||
|
||||
+26
-64
@@ -27,10 +27,12 @@ extern u8 D_02003AC0[];
|
||||
extern u32 D_0201DA50;
|
||||
extern u32 D_0300AA48;
|
||||
extern u32 D_03012B20;
|
||||
//extern ? D_040020D0;
|
||||
//extern ? D_04002160;
|
||||
//extern ? D_04002280;
|
||||
//extern ? D_04003238;
|
||||
extern Vec3s D_04002040[];
|
||||
extern Vec3s D_040020D0[];
|
||||
extern Vec3s D_04002160[];
|
||||
extern Vec3s D_040021F0[];
|
||||
extern Vec3s D_04002280[];
|
||||
extern LinkAnimetionEntry D_04003238;
|
||||
extern u32 D_04004298;
|
||||
extern u8 D_04006020[];
|
||||
extern Gfx D_0400C820[];
|
||||
@@ -56,16 +58,16 @@ extern u32 D_04049AD0;
|
||||
//extern ? D_0404D1C0;
|
||||
extern Gfx D_0404D450[];
|
||||
//extern ? D_0500CA70;
|
||||
//extern ? D_06006CC0;
|
||||
//extern ? D_06016118;
|
||||
//extern ? D_06025218;
|
||||
//extern ? D_060252D8;
|
||||
//extern ? D_06025438;
|
||||
//extern ? D_06025598;
|
||||
//extern ? D_06025658;
|
||||
//extern ? D_060257B8;
|
||||
//extern ? D_0602A738;
|
||||
//extern ? D_0602CB48;
|
||||
extern Gfx D_06006CC0[];
|
||||
extern Gfx D_06016118[];
|
||||
extern Gfx D_06025218[];
|
||||
extern Gfx D_060252D8[];
|
||||
extern Gfx D_06025438[];
|
||||
extern Gfx D_06025598[];
|
||||
extern Gfx D_06025658[];
|
||||
extern Gfx D_060257B8[];
|
||||
extern Gfx D_0602A738[];
|
||||
extern Gfx D_0602CB48[];
|
||||
//extern ? D_070380D4;
|
||||
//extern ? D_0703811C;
|
||||
extern u8 D_080895C0[];
|
||||
@@ -408,50 +410,18 @@ extern s16 D_80120130;
|
||||
//extern ? D_80123978;
|
||||
//extern ? D_801239D4;
|
||||
extern MapData gMapDataTable;
|
||||
//extern ? D_80125870;
|
||||
extern s16 gSpoilingItems[3];
|
||||
extern s16 gSpoilingItemReverts[3];
|
||||
//extern ? D_80125B78;
|
||||
//extern ? D_80125C88;
|
||||
//extern ? D_80125C98;
|
||||
//extern ? D_80125D68;
|
||||
//extern ? D_80125E08;
|
||||
//extern ? D_80125E18;
|
||||
//extern ? D_80125E58;
|
||||
//extern ? D_80125F40;
|
||||
//extern ? D_80125F98;
|
||||
//extern ? D_80126008;
|
||||
//extern ? D_80126014;
|
||||
//extern ? D_8012601C;
|
||||
//extern ? D_8012602C;
|
||||
//extern ? D_80126038;
|
||||
//extern ? D_80126070;
|
||||
//extern ? D_80126080;
|
||||
//extern ? D_8012608C;
|
||||
//extern ? D_80126098;
|
||||
//extern ? D_801260A4;
|
||||
//extern ? D_801260B0;
|
||||
//extern ? D_801260BC;
|
||||
//extern ? D_801260C8;
|
||||
//extern ? D_801260D4;
|
||||
//extern ? D_80126100;
|
||||
//extern ? D_80126128;
|
||||
//extern ? D_80126134;
|
||||
//extern ? D_80126154;
|
||||
//extern ? D_80126184;
|
||||
//extern ? D_80126190;
|
||||
//extern ? D_8012619C;
|
||||
//extern ? D_801261CC;
|
||||
//extern ? D_801261D8;
|
||||
//extern ? D_801261E0;
|
||||
//extern ? D_80126200;
|
||||
//extern ? D_80126210;
|
||||
//extern ? D_80126218;
|
||||
//extern ? D_80126228;
|
||||
//extern ? D_80126234;
|
||||
//extern ? D_80126240;
|
||||
//extern ? D_80126250;
|
||||
//extern ? D_80126254;
|
||||
extern SkeletonHeader* gPlayerSkelHeaders[2];
|
||||
extern u8 gPlayerModelTypes[][5];
|
||||
extern Gfx* D_80125D68[];
|
||||
extern Gfx* D_80125DE8[];
|
||||
extern Gfx* D_80125E08[];
|
||||
extern Gfx* D_80125E18[];
|
||||
extern Gfx* D_80125E58[];
|
||||
extern Gfx* D_80125EF8[];
|
||||
extern Gfx gCullBackDList[];
|
||||
extern Gfx gCullFrontDList[];
|
||||
extern Gfx gEmptyDL[];
|
||||
extern u32 gBitFlags[32];
|
||||
extern u16 gEquipMasks[4];
|
||||
@@ -3403,14 +3373,6 @@ extern u8 D_8015FD70;
|
||||
//extern ? D_8015FDB0;
|
||||
//extern ? D_8015FDF8;
|
||||
extern MapData* gMapData;
|
||||
//extern ? D_80160001;
|
||||
//extern ? D_80160004;
|
||||
//extern ? D_80160005;
|
||||
//extern ? D_80160006;
|
||||
//extern ? D_80160008;
|
||||
//extern ? D_80160010;
|
||||
//extern ? D_80160014;
|
||||
//extern ? D_80160018;
|
||||
//extern ? D_80160020;
|
||||
//extern ? D_801600C0;
|
||||
extern u8 D_80161010;
|
||||
|
||||
+33
-19
@@ -7,6 +7,7 @@
|
||||
#include <ultra64/controller.h>
|
||||
#include <z64light.h>
|
||||
#include <z64actor.h>
|
||||
#include <z64player.h>
|
||||
#include <z64audio.h>
|
||||
#include <z64object.h>
|
||||
#include <z64cutscene.h>
|
||||
@@ -109,13 +110,13 @@ typedef struct {
|
||||
/* 0x0032 */ s8 magicLevel;
|
||||
/* 0x0033 */ s8 magic;
|
||||
/* 0x0034 */ s16 rupees;
|
||||
/* 0x0036 */ u16 bgsHitsLeft;
|
||||
/* 0x0036 */ u16 swordHealth;
|
||||
/* 0x0038 */ u16 naviTimer;
|
||||
/* 0x003A */ u8 magicAcquired;
|
||||
/* 0x003B */ char unk_3B[0x0001];
|
||||
/* 0x003C */ u8 doubleMagic;
|
||||
/* 0x003D */ u8 doubleDefense;
|
||||
/* 0x003E */ s8 bgsFlag;
|
||||
/* 0x003E */ u8 bgsFlag;
|
||||
/* 0x0040 */ ItemEquips childEquips;
|
||||
/* 0x004A */ ItemEquips adultEquips;
|
||||
/* 0x0054 */ char unk_54[0x0014];
|
||||
@@ -162,9 +163,12 @@ typedef struct {
|
||||
/* 0x1360 */ s32 sceneSetupIndex;
|
||||
/* 0x1364 */ s32 respawnFlag; // "restart_flag"
|
||||
/* 0x1368 */ RespawnData respawn[3]; // "restart_data"
|
||||
/* 0x13BC */ char unk_13BC[0x0008];
|
||||
/* 0x13BC */ f32 unk_13BC;
|
||||
/* 0x13C0 */ u16 unk_13C0;
|
||||
/* 0x13C2 */ char unk_13C2[0x0001];
|
||||
/* 0x13C3 */ u8 unk_13C3;
|
||||
/* 0x13C4 */ s16 dogParams;
|
||||
/* 0x13C6 */ u8 unk_13C6;
|
||||
/* 0x13C6 */ u8 textTriggerFlags;
|
||||
/* 0x13C7 */ u8 unk_13C7;
|
||||
/* 0x13C8 */ s16 nayrusLoveTimer;
|
||||
/* 0x13CA */ char unk_13CA[0x0002];
|
||||
@@ -606,7 +610,7 @@ typedef struct {
|
||||
} TargetContext; // size = 0x98
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 texture;
|
||||
/* 0x00 */ u8* texture;
|
||||
/* 0x04 */ s16 unk_4;
|
||||
/* 0x06 */ s16 unk_6;
|
||||
/* 0x08 */ u8 unk_8;
|
||||
@@ -618,7 +622,7 @@ typedef struct {
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 length; // number of actors loaded of this type
|
||||
/* 0x00 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x04 */ Actor* first; // pointer to first actor of this type
|
||||
} ActorListEntry; // size = 0x08
|
||||
|
||||
@@ -1103,10 +1107,10 @@ typedef struct {
|
||||
} ActorEntry; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s8 frontRoom; // Room to switch to when triggered from the front of the object
|
||||
/* 0x01 */ s8 frontEffects; // How the camera reacts during the front transition
|
||||
/* 0x02 */ s8 backRoom; // Room to switch to when triggered from the back of the object
|
||||
/* 0x03 */ s8 backEffects; // How the camera reacts during the back transition
|
||||
struct {
|
||||
s8 room; // Room to switch to
|
||||
s8 effects; // How the camera reacts during the transition
|
||||
} /* 0x00 */ sides[2]; // 0 = front, 1 = back
|
||||
/* 0x04 */ s16 id;
|
||||
/* 0x06 */ Vec3s pos;
|
||||
/* 0x0C */ s16 rotY;
|
||||
@@ -1178,7 +1182,6 @@ typedef struct {
|
||||
|
||||
typedef struct SelectContext {
|
||||
/* 0x0000 */ GameState state;
|
||||
/* 0x00A4 */ s32 unk_A4;
|
||||
/* 0x00A8 */ View view;
|
||||
/* 0x01D0 */ s32 count;
|
||||
/* 0x01D4 */ SceneSelectEntry* scenes;
|
||||
@@ -1224,7 +1227,6 @@ typedef struct GlobalContext {
|
||||
/* 0x000A6 */ u8 sceneConfig;
|
||||
/* 0x000A7 */ char unk_A7[0x9];
|
||||
/* 0x000B0 */ void* sceneSegment;
|
||||
/* 0x000B4 */ char unk_B4[0x4];
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E0 */ Camera mainCamera;
|
||||
/* 0x001E0 */ Camera subCameras[3];
|
||||
@@ -1252,11 +1254,15 @@ typedef struct GlobalContext {
|
||||
/* 0x11D30 */ s16 unk_11D30[2];
|
||||
/* 0x11D34 */ u8 nbTransitionActors;
|
||||
/* 0x11D38 */ TransitionActorEntry* transitionActorList;
|
||||
/* 0x11D3C */ char unk_11D3C[0x10];
|
||||
/* 0x11D4C */ s32 (*unk_11D4C)(struct GlobalContext*, Actor*);
|
||||
/* 0x11D50 */ char unk_11D50[0x8];
|
||||
/* 0x11D58 */ void (*unk_11D58)(struct GlobalContext*, s32);
|
||||
/* 0x11D5C */ void (*unk_11D5C)(struct GlobalContext*, Actor*);
|
||||
/* 0x11D3C */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, SkeletonHeader* skelHeader);
|
||||
/* 0x11D40 */ void (*playerUpdate)(Player* player, struct GlobalContext* globalCtx, Input* input);
|
||||
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct GlobalContext* globalCtx);
|
||||
/* 0x11D48 */ s32 (*startPlayerFishing)(struct GlobalContext* globalCtx);
|
||||
/* 0x11D4C */ s32 (*grabPlayer)(struct GlobalContext* globalCtx, Player* player);
|
||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(struct GlobalContext* globalCtx, Actor* actor, s32 mode);
|
||||
/* 0x11D54 */ void (*func_11D54)(Player* player, struct GlobalContext* globalCtx);
|
||||
/* 0x11D58 */ s32 (*damagePlayer)(struct GlobalContext* globalCtx, s32 damage);
|
||||
/* 0x11D5C */ void (*talkWithPlayer)(struct GlobalContext* globalCtx, Actor* actor);
|
||||
/* 0x11D60 */ MtxF mf_11D60;
|
||||
/* 0x11DA0 */ MtxF mf_11DA0;
|
||||
/* 0x11DE0 */ Mtx* unk_11DE0;
|
||||
@@ -1271,7 +1277,7 @@ typedef struct GlobalContext {
|
||||
/* 0x11DF8 */ ActorEntry* setupActorList;
|
||||
/* 0x11DFC */ UNK_PTR unk_11DFC;
|
||||
/* 0x11E00 */ EntranceEntry* setupEntranceList;
|
||||
/* 0x11E04 */ UNK_PTR setupExitList;
|
||||
/* 0x11E04 */ s16* setupExitList;
|
||||
/* 0x11E08 */ Path* setupPathList;
|
||||
/* 0x11E0C */ ElfMessage* cUpElfMsgs;
|
||||
/* 0x11E10 */ char unk_11E10[0x4];
|
||||
@@ -1301,7 +1307,6 @@ typedef struct GlobalContext {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ GameState state;
|
||||
/* 0x00A4 */ char unk_A4[4];
|
||||
/* 0x00A8 */ View view;
|
||||
} OpeningContext; // size = 0x1D0
|
||||
|
||||
@@ -2027,4 +2032,13 @@ typedef struct {
|
||||
/* 0x04 */ const char* name;
|
||||
} FlagSetEntry; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 limbCount;
|
||||
/* 0x01 */ char unk_01[0x01];
|
||||
/* 0x02 */ u8 dListCount;
|
||||
/* 0x04 */ Skeleton* skeleton;
|
||||
/* 0x08 */ char unk_08[0x18];
|
||||
/* 0x20 */ Vec3s* limbDrawTable;
|
||||
} struct_80091A24_arg3; // size >= 0x24
|
||||
|
||||
#endif
|
||||
|
||||
+2
-164
@@ -1,6 +1,7 @@
|
||||
#ifndef _Z64ACTOR_H_
|
||||
#define _Z64ACTOR_H_
|
||||
|
||||
#include <z64dma.h>
|
||||
#include <z64animation.h>
|
||||
#include <z64math.h>
|
||||
#include <z64collision_check.h>
|
||||
@@ -96,7 +97,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s rot; // Current actor shape rotation
|
||||
/* 0x06 */ u8 unk_06;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ f32 unk_08; // Model y axis offset. Represents model space units. collision mesh related
|
||||
/* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
|
||||
/* 0x10 */ f32 unk_10;
|
||||
@@ -190,12 +191,6 @@ typedef struct {
|
||||
/* 0x162 */ s16 unk_162;
|
||||
} DynaPolyActor; // size = 0x164
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 active;
|
||||
/* 0x04 */ Vec3f tip;
|
||||
/* 0x10 */ Vec3f base;
|
||||
} Struct_80090480_arg2;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MtxF* unk_00;
|
||||
/* 0x04 */ s16* unk_04;
|
||||
@@ -206,163 +201,6 @@ typedef struct {
|
||||
/* 0x14 */ s32 unk_14;
|
||||
} struct_80032E24;
|
||||
|
||||
struct Player;
|
||||
|
||||
typedef void (*PlayerActionFunc)(struct Player*, struct GlobalContext*);
|
||||
|
||||
typedef struct Player {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ s8 currentTunic;
|
||||
/* 0x014D */ s8 currentSword;
|
||||
/* 0x014E */ s8 currentShield;
|
||||
/* 0x014F */ s8 currentBoots;
|
||||
/* 0x0150 */ s8 heldItemCButtonIdx;
|
||||
/* 0x0151 */ s8 heldItemActionParam;
|
||||
/* 0x0152 */ s8 unk_152;
|
||||
/* 0x0153 */ s8 unk_153;
|
||||
/* 0x0154 */ s8 unk_154;
|
||||
/* 0x0155 */ char unk_155[0x003];
|
||||
/* 0x0158 */ s8 unk_158;
|
||||
/* 0x0159 */ char unk_159[0x002];
|
||||
/* 0x015B */ u8 unk_15B;
|
||||
/* 0x015C */ u8 unk_15C;
|
||||
/* 0x015D */ u8 unk_15D;
|
||||
/* 0x015E */ u8 unk_15E;
|
||||
/* 0x015F */ u8 currentMask;
|
||||
/* 0x0160 */ UNK_PTR unk_160;
|
||||
/* 0x0164 */ UNK_PTR unk_164;
|
||||
/* 0x0168 */ UNK_PTR unk_168;
|
||||
/* 0x016C */ UNK_PTR unk_16C;
|
||||
/* 0x0170 */ u8 unk_170;
|
||||
/* 0x0171 */ char unk_171[0x023];
|
||||
/* 0x0194 */ OSMesgQueue unk_194;
|
||||
/* 0x01AC */ char unk_1AC[0x004];
|
||||
/* 0x01B0 */ void* getItemModel; // Pointer to the space where the get item model is allocated
|
||||
/* 0x01B4 */ SkelAnime skelAnime;
|
||||
/* 0x01F8 */ char unk_1F8[0x1B4];
|
||||
/* 0x03AC */ Actor* heldActor;
|
||||
/* 0x03B0 */ Vec3f unk_3B0; // related to links hands
|
||||
/* 0x03BC */ char unk_3BC[0x00C];
|
||||
/* 0x03C8 */ Vec3f unk_3C8;
|
||||
/* 0x03D4 */ char unk_3D4[0x058];
|
||||
/* 0x042C */ s8 unk_42C;
|
||||
/* 0x042D */ s8 unk_42D;
|
||||
/* 0x042E */ s16 unk_42E;
|
||||
/* 0x0430 */ Actor* unk_430;
|
||||
/* 0x0434 */ u8 getItemId;
|
||||
/* 0x0435 */ char unk_435[0x001];
|
||||
/* 0x0436 */ u16 getItemDirection;
|
||||
/* 0x0438 */ Actor* interactRangeActor;
|
||||
/* 0x043C */ s8 unk_43C;
|
||||
/* 0x043D */ char unk_43D[0x003];
|
||||
/* 0x0440 */ Actor* rideActor;
|
||||
/* 0x0444 */ u8 action;
|
||||
/* 0x0445 */ char unk_445[0x003];
|
||||
/* 0x0448 */ Actor* unk_448;
|
||||
/* 0x044C */ char unk_44C[0x004];
|
||||
/* 0x0450 */ Vec3f unk_450;
|
||||
/* 0x045C */ char unk_45C[0x00E];
|
||||
/* 0x046A */ u16 unk_46A;
|
||||
/* 0x046C */ char unk_46C[0x06E];
|
||||
/* 0x04DA */ s16 unk_4DA;
|
||||
/* 0x04DC */ char unk_4DC[0x008];
|
||||
/* 0x04E4 */ Collider unk_4E4; // TODO determine type
|
||||
/* 0x04FC */ char unk_4FC[0x068];
|
||||
/* 0x0564 */ Collider unk_564; // TODO determine type
|
||||
/* 0x057C */ char unk_57C[0x07C];
|
||||
/* 0x05F8 */ u8 unk_5F8;
|
||||
/* 0x05F9 */ char unk_5F9[0x06B];
|
||||
/* 0x0664 */ Actor* unk_664;
|
||||
/* 0x0668 */ char unk_668[0x004];
|
||||
/* 0x066C */ s32 unk_66C;
|
||||
/* 0x0670 */ u32 swordEffectId;
|
||||
/* 0x0674 */ PlayerActionFunc actionFunc;
|
||||
/* 0x0678 */ u32 ageProperties;
|
||||
/* 0x067C */ u32 stateFlags1;
|
||||
/* 0x0680 */ u32 stateFlags2;
|
||||
/* 0x0684 */ Actor* unk_684;
|
||||
/* 0x0688 */ char unk_688[0x004];
|
||||
/* 0x068C */ Actor* navi;
|
||||
/* 0x0690 */ s16 naviMessageId;
|
||||
/* 0x0692 */ u8 unk_692;
|
||||
/* 0x0693 */ s8 exchangeItemId;
|
||||
/* 0x0694 */ Actor* naviTargetActor;
|
||||
/* 0x0698 */ f32 targetActorDistance;
|
||||
/* 0x069C */ char unk_69C[0x008];
|
||||
/* 0x06A4 */ f32 unk_6A4;
|
||||
/* 0x06A8 */ Actor* unk_6A8;
|
||||
/* 0x06AC */ char unk_6AC[0x001];
|
||||
/* 0x06AD */ u8 unk_6AD;
|
||||
/* 0x06AE */ char unk_6AE[0x2];
|
||||
/* 0x06B0 */ s16 unk_6B0;
|
||||
/* 0x06B2 */ char unk_6B4[0x4];
|
||||
/* 0x06B6 */ Vec3s unk_6B6;
|
||||
/* 0x06BC */ s16 unk_6BC;
|
||||
/* 0x06BE */ s16 unk_6BE;
|
||||
/* 0x06C0 */ s16 unk_6C0;
|
||||
/* 0x06C2 */ s16 unk_6C2;
|
||||
/* 0x06C4 */ f32 unk_6C4;
|
||||
/* 0x06C8 */ SkelAnime skelAnime2;
|
||||
/* 0x070C */ char unk_70C[0x128];
|
||||
/* 0x0834 */ s16 unk_834;
|
||||
/* 0x0836 */ char unk_836[0x002];
|
||||
/* 0x0838 */ f32 linearVelocity;
|
||||
/* 0x083C */ s16 currentYaw;
|
||||
/* 0x083E */ s16 targetYaw;
|
||||
/* 0x0840 */ u16 unk_840;
|
||||
/* 0x0842 */ s8 swordAnimation;
|
||||
/* 0x0843 */ s8 swordState;
|
||||
/* 0x0844 */ u8 unk_844;
|
||||
/* 0x0845 */ u8 unk_845;
|
||||
/* 0x0846 */ u8 unk_846;
|
||||
/* 0x0847 */ char unk_847[0x004];
|
||||
/* 0x084B */ s8 unk_84B[4];
|
||||
/* 0x084F */ s8 unk_84F;
|
||||
/* 0x0850 */ s16 unk_850;
|
||||
/* 0x0852 */ char unk_852[0x00A];
|
||||
/* 0x085C */ f32 stickLength;
|
||||
/* 0x0860 */ s16 stickFlameTimer;
|
||||
/* 0x0862 */ s8 overheadItemId;
|
||||
/* 0x0863 */ char unk_863[0x021];
|
||||
|
||||
/* 0x0884 */ f32 ledgeDistance; // The distance from link to a grabbable ledge
|
||||
// Only updates if pushing against a wall with a grabbable ledge above
|
||||
// If the ledge is too high to grab the value is 399.96f
|
||||
|
||||
/* 0x0888 */ f32 wallDistance; // Only updates if pushing against a wall with a grabbable ledge above
|
||||
/* 0x088C */ char unk_88C[0x008];
|
||||
/* 0x0894 */ s16 dropY; // Truncated copy of y position that does not update while falling
|
||||
/* 0x0896 */ s16 fallY; // The truncated y distance link has moved in that frame, positive is down, negative is up
|
||||
/* 0x0898 */ char unk_898[0x008];
|
||||
/* 0x08A0 */ u8 unk_8A0;
|
||||
/* 0x08A1 */ u8 unk_8A1;
|
||||
/* 0x08A2 */ u16 unk_8A2;
|
||||
/* 0x08A4 */ f32 unk_8A4;
|
||||
/* 0x08A8 */ f32 unk_8A8;
|
||||
/* 0x08AC */ f32 fanWindSpeed;
|
||||
/* 0x08B0 */ s16 fanWindDirection;
|
||||
/* 0x08B2 */ char unk_8B2[0x002];
|
||||
/* 0x08B4 */ Struct_80090480_arg2 swordDimensions; // Trail active, tip, base?
|
||||
/* 0x08D0 */ Struct_80090480_arg2 unk_8D0;
|
||||
/* 0x08EC */ Struct_80090480_arg2 unk_8EC;
|
||||
/* 0x0908 */ char unk_908[0x04];
|
||||
/* 0x090C */ f32 unk_90C;
|
||||
/* 0x0910 */ char unk_910[0x4C];
|
||||
/* 0x095C */ Vec3f unk_95C;
|
||||
/* 0x0968 */ char unk_968[0x78];
|
||||
/* 0x09E0 */ MtxF mf_9E0;
|
||||
/* 0x0A20 */ MtxF mf_A20;
|
||||
/* 0x0A60 */ char unk_A60[0x08];
|
||||
/* 0x0A68 */ s8 unk_A68;
|
||||
/* 0x0A69 */ char unk_A6A[0x0F];
|
||||
|
||||
/* 0x0A78 */ s8 invincibilityTimer; // Take no damage if this value is nonzero
|
||||
// Positive induces red flashing, negative does not
|
||||
// Counts towards zero each frame
|
||||
|
||||
/* 0x0A79 */ char unk_A79[0x1B];
|
||||
} Player; // size = 0xA94
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ITEM00_RUPEE_GREEN,
|
||||
/* 0x01 */ ITEM00_RUPEE_BLUE,
|
||||
|
||||
@@ -73,20 +73,20 @@ typedef struct {
|
||||
} ColliderInit_Actor; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 flags; // Toucher Attack ID Flags
|
||||
/* 0x00 */ u32 flags; // Toucher Attack ID Flags
|
||||
/* 0x04 */ u8 effect;
|
||||
/* 0x05 */ u8 damage; // Damage or Stun Timer
|
||||
} ColliderTouch; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 flags; // Collision Exclusion Mask
|
||||
/* 0x00 */ u32 flags; // Collision Exclusion Mask
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x05 */ u8 defense; // Damage Resistance
|
||||
/* 0x06 */ Vec3s unk_06;
|
||||
} ColliderBump; // size = 0x0C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 flags; // Collision Exclusion Mask
|
||||
/* 0x00 */ u32 flags; // Collision Exclusion Mask
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x05 */ u8 defense;
|
||||
} ColliderBumpInit; // size = 0x08
|
||||
|
||||
@@ -20,4 +20,5 @@ typedef struct {
|
||||
/* 0x08 */ u32 romStart;
|
||||
/* 0x0C */ u32 romEnd;
|
||||
} DmaEntry;
|
||||
|
||||
#endif
|
||||
|
||||
+42
-4
@@ -238,12 +238,17 @@ typedef enum {
|
||||
/* 0x99 */ ITEM_STICK_UPGRADE_30,
|
||||
/* 0x9A */ ITEM_NUT_UPGRADE_30,
|
||||
/* 0x9B */ ITEM_NUT_UPGRADE_40,
|
||||
/* 0xFC */ ITEM_LAST_USED = 0xFC,
|
||||
/* 0xFE */ ITEM_NONE_FE = 0xFE,
|
||||
/* 0xFF */ ITEM_NONE = 0xFF
|
||||
} ItemID;
|
||||
|
||||
#define ITEM_TRADE_CHILD ITEM_WEIRD_EGG
|
||||
#define ITEM_TRADE_ADULT ITEM_POCKET_EGG
|
||||
|
||||
// Get Item result may vary depending on context (chest/shop/scrub/drop)
|
||||
typedef enum {
|
||||
/* 0x00 */ GI_INVALID, // Link picks up chest and it sends him flying upwards
|
||||
/* 0x00 */ GI_NONE,
|
||||
/* 0x01 */ GI_BOMBS_5,
|
||||
/* 0x02 */ GI_NUTS_5,
|
||||
/* 0x03 */ GI_BOMBCHUS_10,
|
||||
@@ -278,7 +283,7 @@ typedef enum {
|
||||
/* 0x20 */ GI_ODD_POTION,
|
||||
/* 0x21 */ GI_SAW,
|
||||
/* 0x22 */ GI_SWORD_BROKEN,
|
||||
/* 0x23 */ GI_PERSCRIPTION,
|
||||
/* 0x23 */ GI_PRESCRIPTION,
|
||||
/* 0x24 */ GI_FROG,
|
||||
/* 0x25 */ GI_EYEDROPS,
|
||||
/* 0x26 */ GI_CLAIM_CHECK,
|
||||
@@ -368,9 +373,42 @@ typedef enum {
|
||||
/* 0x7A */ GI_NUT_UPGRADE_40,
|
||||
/* 0x7B */ GI_BULLET_BAG_50,
|
||||
/* 0x7C */ GI_ICE_TRAP, // freezes link when opened from a chest
|
||||
/* 0x7D */ GI_TEXT_0 // no model appears over Link, shows text id 0 (pocket egg)
|
||||
/* 0x7D */ GI_TEXT_0, // no model appears over Link, shows text id 0 (pocket egg)
|
||||
/* 0x7E */ GI_MAX
|
||||
} GetItemID;
|
||||
|
||||
#define ITEM_TRADE_ADULT ITEM_POCKET_EGG
|
||||
typedef enum {
|
||||
/* 0x00 */ EXCH_ITEM_NONE,
|
||||
/* 0x01 */ EXCH_ITEM_LETTER_ZELDA,
|
||||
/* 0x02 */ EXCH_ITEM_WEIRD_EGG,
|
||||
/* 0x03 */ EXCH_ITEM_CHICKEN,
|
||||
/* 0x04 */ EXCH_ITEM_BEAN,
|
||||
/* 0x05 */ EXCH_ITEM_POCKET_EGG,
|
||||
/* 0x06 */ EXCH_ITEM_POCKET_CUCCO,
|
||||
/* 0x07 */ EXCH_ITEM_COJIRO,
|
||||
/* 0x08 */ EXCH_ITEM_ODD_MUSHROOM,
|
||||
/* 0x09 */ EXCH_ITEM_ODD_POTION,
|
||||
/* 0x0A */ EXCH_ITEM_SAW,
|
||||
/* 0x0B */ EXCH_ITEM_SWORD_BROKEN,
|
||||
/* 0x0C */ EXCH_ITEM_PRESCRIPTION,
|
||||
/* 0x0D */ EXCH_ITEM_FROG,
|
||||
/* 0x0E */ EXCH_ITEM_EYEDROPS,
|
||||
/* 0x0F */ EXCH_ITEM_CLAIM_CHECK,
|
||||
/* 0x10 */ EXCH_ITEM_MASK_SKULL,
|
||||
/* 0x11 */ EXCH_ITEM_MASK_SPOOKY,
|
||||
/* 0x12 */ EXCH_ITEM_MASK_KEATON,
|
||||
/* 0x13 */ EXCH_ITEM_MASK_BUNNY,
|
||||
/* 0x14 */ EXCH_ITEM_MASK_TRUTH,
|
||||
/* 0x15 */ EXCH_ITEM_MASK_GORON,
|
||||
/* 0x16 */ EXCH_ITEM_MASK_ZORA,
|
||||
/* 0x17 */ EXCH_ITEM_MASK_GERUDO,
|
||||
/* 0x18 */ EXCH_ITEM_FISH,
|
||||
/* 0x19 */ EXCH_ITEM_BLUE_FIRE,
|
||||
/* 0x1A */ EXCH_ITEM_BUG,
|
||||
/* 0x1B */ EXCH_ITEM_POE,
|
||||
/* 0x1C */ EXCH_ITEM_BIG_POE,
|
||||
/* 0x1D */ EXCH_ITEM_LETTER_RUTO,
|
||||
/* 0x1E */ EXCH_ITEM_MAX
|
||||
} ExchangeItemID;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
#ifndef _Z64PLAYER_H_
|
||||
#define _Z64PLAYER_H_
|
||||
|
||||
#include <z64actor.h>
|
||||
|
||||
struct Player;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_SHIELD_NONE,
|
||||
/* 0x01 */ PLAYER_SHIELD_DEKU,
|
||||
/* 0x02 */ PLAYER_SHIELD_HYLIAN,
|
||||
/* 0x03 */ PLAYER_SHIELD_MIRROR,
|
||||
/* 0x04 */ PLAYER_SHIELD_MAX
|
||||
} PlayerShield;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_TUNIC_KOKIRI,
|
||||
/* 0x01 */ PLAYER_TUNIC_GORON,
|
||||
/* 0x02 */ PLAYER_TUNIC_ZORA,
|
||||
/* 0x03 */ PLAYER_TUNIC_MAX
|
||||
} PlayerTunic;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_BOOTS_NORMAL,
|
||||
/* 0x01 */ PLAYER_BOOTS_IRON,
|
||||
/* 0x02 */ PLAYER_BOOTS_HOVER,
|
||||
/* Values below are only relevant when setting regs in Player_SetBootData */
|
||||
/* 0x03 */ PLAYER_BOOTS_INDOOR,
|
||||
/* 0x04 */ PLAYER_BOOTS_IRON_UNDERWATER,
|
||||
/* 0x05 */ PLAYER_BOOTS_NORMAL_CHILD,
|
||||
/* 0x06 */ PLAYER_BOOTS_MAX
|
||||
} PlayerBoots;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_STR_NONE,
|
||||
/* 0x01 */ PLAYER_STR_BRACELET,
|
||||
/* 0x02 */ PLAYER_STR_SILVER_G,
|
||||
/* 0x03 */ PLAYER_STR_GOLD_G,
|
||||
/* 0x04 */ PLAYER_STR_MAX
|
||||
} PlayerStrength;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_MASK_NONE,
|
||||
/* 0x01 */ PLAYER_MASK_KEATON,
|
||||
/* 0x02 */ PLAYER_MASK_SKULL,
|
||||
/* 0x03 */ PLAYER_MASK_SPOOKY,
|
||||
/* 0x04 */ PLAYER_MASK_BUNNY,
|
||||
/* 0x05 */ PLAYER_MASK_GORON,
|
||||
/* 0x06 */ PLAYER_MASK_ZORA,
|
||||
/* 0x07 */ PLAYER_MASK_GERUDO,
|
||||
/* 0x08 */ PLAYER_MASK_TRUTH,
|
||||
/* 0x09 */ PLAYER_MASK_MAX
|
||||
} PlayerMask;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_AP_NONE,
|
||||
/* 0x01 */ PLAYER_AP_LAST_USED,
|
||||
/* 0x02 */ PLAYER_AP_FISHING_POLE,
|
||||
/* 0x03 */ PLAYER_AP_SWORD_MASTER,
|
||||
/* 0x04 */ PLAYER_AP_SWORD_KOKIRI,
|
||||
/* 0x05 */ PLAYER_AP_SWORD_BGS,
|
||||
/* 0x06 */ PLAYER_AP_STICK,
|
||||
/* 0x07 */ PLAYER_AP_HAMMER,
|
||||
/* 0x08 */ PLAYER_AP_BOW,
|
||||
/* 0x09 */ PLAYER_AP_BOW_FIRE,
|
||||
/* 0x0A */ PLAYER_AP_BOW_ICE,
|
||||
/* 0x0B */ PLAYER_AP_BOW_LIGHT,
|
||||
/* 0x0C */ PLAYER_AP_BOW_0C,
|
||||
/* 0x0D */ PLAYER_AP_BOW_0D,
|
||||
/* 0x0E */ PLAYER_AP_BOW_0E,
|
||||
/* 0x0F */ PLAYER_AP_SLINGSHOT,
|
||||
/* 0x10 */ PLAYER_AP_HOOKSHOT,
|
||||
/* 0x11 */ PLAYER_AP_LONGSHOT,
|
||||
/* 0x12 */ PLAYER_AP_BOMB,
|
||||
/* 0x13 */ PLAYER_AP_BOMBCHU,
|
||||
/* 0x14 */ PLAYER_AP_BOOMERANG,
|
||||
/* 0x15 */ PLAYER_AP_MAGIC_SPELL_15,
|
||||
/* 0x16 */ PLAYER_AP_MAGIC_SPELL_16,
|
||||
/* 0x17 */ PLAYER_AP_MAGIC_SPELL_17,
|
||||
/* 0x18 */ PLAYER_AP_FARORES_WIND,
|
||||
/* 0x19 */ PLAYER_AP_NAYRUS_LOVE,
|
||||
/* 0x1A */ PLAYER_AP_DINS_FIRE,
|
||||
/* 0x1B */ PLAYER_AP_NUT,
|
||||
/* 0x1C */ PLAYER_AP_OCARINA_FAIRY,
|
||||
/* 0x1D */ PLAYER_AP_OCARINA_TIME,
|
||||
/* 0x1E */ PLAYER_AP_BOTTLE,
|
||||
/* 0x1F */ PLAYER_AP_BOTTLE_FISH,
|
||||
/* 0x20 */ PLAYER_AP_BOTTLE_FIRE,
|
||||
/* 0x21 */ PLAYER_AP_BOTTLE_BUG,
|
||||
/* 0x22 */ PLAYER_AP_BOTTLE_POE,
|
||||
/* 0x23 */ PLAYER_AP_BOTTLE_BIG_POE,
|
||||
/* 0x24 */ PLAYER_AP_BOTTLE_LETTER,
|
||||
/* 0x25 */ PLAYER_AP_BOTTLE_POTION_RED,
|
||||
/* 0x26 */ PLAYER_AP_BOTTLE_POTION_BLUE,
|
||||
/* 0x27 */ PLAYER_AP_BOTTLE_POTION_GREEN,
|
||||
/* 0x28 */ PLAYER_AP_BOTTLE_MILK,
|
||||
/* 0x29 */ PLAYER_AP_BOTTLE_MILK_HALF,
|
||||
/* 0x2A */ PLAYER_AP_BOTTLE_FAIRY,
|
||||
/* 0x2B */ PLAYER_AP_LETTER_ZELDA,
|
||||
/* 0x2C */ PLAYER_AP_WEIRD_EGG,
|
||||
/* 0x2D */ PLAYER_AP_CHICKEN,
|
||||
/* 0x2E */ PLAYER_AP_BEAN,
|
||||
/* 0x2F */ PLAYER_AP_POCKET_EGG,
|
||||
/* 0x30 */ PLAYER_AP_POCKET_CUCCO,
|
||||
/* 0x31 */ PLAYER_AP_COJIRO,
|
||||
/* 0x32 */ PLAYER_AP_ODD_MUSHROOM,
|
||||
/* 0x33 */ PLAYER_AP_ODD_POTION,
|
||||
/* 0x34 */ PLAYER_AP_SAW,
|
||||
/* 0x35 */ PLAYER_AP_SWORD_BROKEN,
|
||||
/* 0x36 */ PLAYER_AP_PRESCRIPTION,
|
||||
/* 0x37 */ PLAYER_AP_FROG,
|
||||
/* 0x38 */ PLAYER_AP_EYEDROPS,
|
||||
/* 0x39 */ PLAYER_AP_CLAIM_CHECK,
|
||||
/* 0x3A */ PLAYER_AP_MASK_KEATON,
|
||||
/* 0x3B */ PLAYER_AP_MASK_SKULL,
|
||||
/* 0x3C */ PLAYER_AP_MASK_SPOOKY,
|
||||
/* 0x3D */ PLAYER_AP_MASK_BUNNY,
|
||||
/* 0x3E */ PLAYER_AP_MASK_GORON,
|
||||
/* 0x3F */ PLAYER_AP_MASK_ZORA,
|
||||
/* 0x40 */ PLAYER_AP_MASK_GERUDO,
|
||||
/* 0x41 */ PLAYER_AP_MASK_TRUTH,
|
||||
/* 0x42 */ PLAYER_AP_LENS,
|
||||
/* 0x43 */ PLAYER_AP_MAX
|
||||
} PlayerActionParam;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_LIMB_NONE,
|
||||
/* 0x01 */ PLAYER_LIMB_ROOT,
|
||||
/* 0x02 */ PLAYER_LIMB_WAIST,
|
||||
/* 0x03 */ PLAYER_LIMB_LOWER,
|
||||
/* 0x04 */ PLAYER_LIMB_R_THIGH,
|
||||
/* 0x05 */ PLAYER_LIMB_R_SHIN,
|
||||
/* 0x06 */ PLAYER_LIMB_R_FOOT,
|
||||
/* 0x07 */ PLAYER_LIMB_L_THIGH,
|
||||
/* 0x08 */ PLAYER_LIMB_L_SHIN,
|
||||
/* 0x09 */ PLAYER_LIMB_L_FOOT,
|
||||
/* 0x0A */ PLAYER_LIMB_UPPER,
|
||||
/* 0x0B */ PLAYER_LIMB_HEAD,
|
||||
/* 0x0C */ PLAYER_LIMB_HAT,
|
||||
/* 0x0D */ PLAYER_LIMB_COLLAR,
|
||||
/* 0x0E */ PLAYER_LIMB_L_SHOULDER,
|
||||
/* 0x0F */ PLAYER_LIMB_L_FOREARM,
|
||||
/* 0x10 */ PLAYER_LIMB_L_HAND,
|
||||
/* 0x11 */ PLAYER_LIMB_R_SHOULDER,
|
||||
/* 0x12 */ PLAYER_LIMB_R_FOREARM,
|
||||
/* 0x13 */ PLAYER_LIMB_R_HAND,
|
||||
/* 0x14 */ PLAYER_LIMB_SHEATH,
|
||||
/* 0x15 */ PLAYER_LIMB_TORSO,
|
||||
/* 0x16 */ PLAYER_LIMB_MAX
|
||||
} PlayerLimb;
|
||||
|
||||
#define PLAYER_LIMB_BUF_COUNT PLAYER_LIMB_MAX + 2 // 2 extra entries in limb buffers?
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ f32 unk_14;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ f32 unk_1C;
|
||||
/* 0x20 */ f32 unk_20;
|
||||
/* 0x24 */ f32 unk_24;
|
||||
/* 0x28 */ f32 unk_28;
|
||||
/* 0x2C */ f32 unk_2C;
|
||||
/* 0x30 */ f32 unk_30;
|
||||
/* 0x34 */ f32 unk_34;
|
||||
/* 0x38 */ f32 unk_38;
|
||||
/* 0x3C */ f32 unk_3C;
|
||||
/* 0x40 */ f32 unk_40;
|
||||
/* 0x44 */ Vec3s unk_44;
|
||||
/* 0x4A */ Vec3s unk_4A[4];
|
||||
/* 0x62 */ Vec3s unk_62[4];
|
||||
/* 0x7A */ Vec3s unk_7A[2];
|
||||
/* 0x86 */ Vec3s unk_86[2];
|
||||
/* 0x92 */ u16 unk_92;
|
||||
/* 0x94 */ u16 unk_94;
|
||||
/* 0x98 */ LinkAnimetionEntry* unk_98;
|
||||
/* 0x9C */ LinkAnimetionEntry* unk_9C;
|
||||
/* 0xA0 */ LinkAnimetionEntry* unk_A0;
|
||||
/* 0xA4 */ LinkAnimetionEntry* unk_A4;
|
||||
/* 0xA8 */ LinkAnimetionEntry* unk_A8;
|
||||
/* 0xAC */ LinkAnimetionEntry* unk_AC[4];
|
||||
/* 0xBC */ LinkAnimetionEntry* unk_BC[2];
|
||||
/* 0xC4 */ LinkAnimetionEntry* unk_C4[2];
|
||||
/* 0xCC */ LinkAnimetionEntry* unk_CC[2];
|
||||
} PlayerAgeProperties; // size = 0xD4
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 active;
|
||||
/* 0x04 */ Vec3f tip;
|
||||
/* 0x10 */ Vec3f base;
|
||||
} WeaponInfo; // size = 0x1C
|
||||
|
||||
typedef void (*PlayerFunc674)(struct Player*, struct GlobalContext*);
|
||||
typedef s32 (*PlayerFunc82C)(struct Player*, struct GlobalContext*);
|
||||
typedef void (*PlayerFuncA74)(struct GlobalContext*, struct Player*);
|
||||
|
||||
typedef struct Player {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ s8 currentTunic; // current tunic from `PlayerTunic`
|
||||
/* 0x014D */ s8 currentSword; // current sword Item ID
|
||||
/* 0x014E */ s8 currentShield; // current shield from `PlayerShield`
|
||||
/* 0x014F */ s8 currentBoots; // current boots from `PlayerBoots`
|
||||
/* 0x0150 */ s8 heldItemButton; // Button index for the item currently used
|
||||
/* 0x0151 */ s8 heldItemActionParam; // Action param for the item currently used
|
||||
/* 0x0152 */ u8 heldItemId; // Item id for the item currently used
|
||||
/* 0x0153 */ s8 prevBoots; // previous boots from `PlayerBoots`
|
||||
/* 0x0154 */ s8 itemActionParam; // the difference between this and heldItemActionParam is unclear
|
||||
/* 0x0155 */ char unk_155[0x003];
|
||||
/* 0x0158 */ u8 modelGroup;
|
||||
/* 0x0159 */ u8 nextModelGroup;
|
||||
/* 0x015A */ s8 unk_15A;
|
||||
/* 0x015B */ u8 modelAnimType;
|
||||
/* 0x015C */ u8 leftHandType;
|
||||
/* 0x015D */ u8 rightHandType;
|
||||
/* 0x015E */ u8 sheathType;
|
||||
/* 0x015F */ u8 currentMask; // current mask equipped from `PlayerMask`
|
||||
/* 0x0160 */ Gfx** rightHandDLists;
|
||||
/* 0x0164 */ Gfx** leftHandDLists;
|
||||
/* 0x0168 */ Gfx** sheathDLists;
|
||||
/* 0x016C */ Gfx** waistDLists;
|
||||
/* 0x0170 */ u8 giObjectLoading;
|
||||
/* 0x0174 */ DmaRequest giObjectDmaRequest;
|
||||
/* 0x0194 */ OSMesgQueue giObjectLoadQueue;
|
||||
/* 0x01AC */ OSMesg giObjectLoadMsg;
|
||||
/* 0x01B0 */ void* giObjectSegment; // also used for title card textures
|
||||
/* 0x01B4 */ SkelAnime skelAnime;
|
||||
/* 0x01F8 */ Vec3s limbDrawTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0288 */ Vec3s transitionDrawTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0318 */ Vec3s unk_318[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x03A8 */ s16 unk_3A8[2];
|
||||
/* 0x03AC */ Actor* heldActor;
|
||||
/* 0x03B0 */ Vec3f leftHandPos;
|
||||
/* 0x03BC */ Vec3s unk_3BC;
|
||||
/* 0x03C4 */ Actor* unk_3C4;
|
||||
/* 0x03C8 */ Vec3f unk_3C8;
|
||||
/* 0x03D4 */ char unk_3D4[0x058];
|
||||
/* 0x042C */ s8 doorType;
|
||||
/* 0x042D */ s8 doorDirection;
|
||||
/* 0x042E */ s16 doorTimer;
|
||||
/* 0x0430 */ Actor* doorActor;
|
||||
/* 0x0434 */ s8 getItemId;
|
||||
/* 0x0436 */ u16 getItemDirection;
|
||||
/* 0x0438 */ Actor* interactRangeActor;
|
||||
/* 0x043C */ s8 unk_43C;
|
||||
/* 0x043D */ char unk_43D[0x003];
|
||||
/* 0x0440 */ Actor* rideActor;
|
||||
/* 0x0444 */ u8 csMode;
|
||||
/* 0x0445 */ u8 prevCsMode;
|
||||
/* 0x0446 */ u8 unk_446;
|
||||
/* 0x0447 */ u8 unk_447;
|
||||
/* 0x0448 */ Actor* unk_448;
|
||||
/* 0x044C */ char unk_44C[0x004];
|
||||
/* 0x0450 */ Vec3f unk_450;
|
||||
/* 0x045C */ Vec3f unk_45C;
|
||||
/* 0x0468 */ char unk_468[0x002];
|
||||
/* 0x046A */ s16 unk_46A;
|
||||
/* 0x046C */ s16 unk_46C;
|
||||
/* 0x046E */ char unk_46E[0x02A];
|
||||
/* 0x0498 */ ColliderCylinder cylinder;
|
||||
/* 0x04E4 */ ColliderQuad swordQuads[2];
|
||||
/* 0x05E4 */ ColliderQuad shieldQuad;
|
||||
/* 0x0664 */ Actor* unk_664;
|
||||
/* 0x0668 */ char unk_668[0x004];
|
||||
/* 0x066C */ s32 unk_66C;
|
||||
/* 0x0670 */ s32 swordEffectIndex;
|
||||
/* 0x0674 */ PlayerFunc674 func_674;
|
||||
/* 0x0678 */ PlayerAgeProperties* ageProperties;
|
||||
/* 0x067C */ u32 stateFlags1;
|
||||
/* 0x0680 */ u32 stateFlags2;
|
||||
/* 0x0684 */ Actor* unk_684;
|
||||
/* 0x0688 */ Actor* boomerangActor;
|
||||
/* 0x068C */ Actor* naviActor;
|
||||
/* 0x0690 */ s16 naviMessageId;
|
||||
/* 0x0692 */ u8 stateFlags3;
|
||||
/* 0x0693 */ s8 exchangeItemId;
|
||||
/* 0x0694 */ Actor* targetActor;
|
||||
/* 0x0698 */ f32 targetActorDistance;
|
||||
/* 0x069C */ char unk_69C[0x004];
|
||||
/* 0x06A0 */ f32 unk_6A0;
|
||||
/* 0x06A4 */ f32 unk_6A4;
|
||||
/* 0x06A8 */ Actor* unk_6A8;
|
||||
/* 0x06AC */ s8 unk_6AC;
|
||||
/* 0x06AD */ u8 unk_6AD;
|
||||
/* 0x06AE */ u16 unk_6AE;
|
||||
/* 0x06B0 */ s16 unk_6B0;
|
||||
/* 0x06B2 */ char unk_6B4[0x004];
|
||||
/* 0x06B6 */ s16 unk_6B6;
|
||||
/* 0x06B8 */ s16 unk_6B8;
|
||||
/* 0x06BA */ s16 unk_6BA;
|
||||
/* 0x06BC */ s16 unk_6BC;
|
||||
/* 0x06BE */ s16 unk_6BE;
|
||||
/* 0x06C0 */ s16 unk_6C0;
|
||||
/* 0x06C2 */ s16 unk_6C2;
|
||||
/* 0x06C4 */ f32 unk_6C4;
|
||||
/* 0x06C8 */ SkelAnime skelAnime2;
|
||||
/* 0x070C */ Vec3s limbDrawTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x079C */ Vec3s transitionDrawTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x082C */ PlayerFunc82C func_82C;
|
||||
/* 0x0830 */ f32 unk_830;
|
||||
/* 0x0834 */ s16 unk_834;
|
||||
/* 0x0836 */ s8 unk_836;
|
||||
/* 0x0837 */ u8 unk_837;
|
||||
/* 0x0838 */ f32 linearVelocity;
|
||||
/* 0x083C */ s16 currentYaw;
|
||||
/* 0x083E */ s16 targetYaw;
|
||||
/* 0x0840 */ u16 unk_840;
|
||||
/* 0x0842 */ s8 swordAnimation;
|
||||
/* 0x0843 */ s8 swordState;
|
||||
/* 0x0844 */ s8 unk_844;
|
||||
/* 0x0845 */ u8 unk_845;
|
||||
/* 0x0846 */ u8 unk_846;
|
||||
/* 0x0847 */ s8 unk_847[4];
|
||||
/* 0x084B */ s8 unk_84B[4];
|
||||
/* 0x084F */ s8 unk_84F;
|
||||
/* 0x0850 */ s16 unk_850; // multipurpose timer
|
||||
/* 0x0854 */ f32 unk_854;
|
||||
/* 0x0858 */ f32 unk_858;
|
||||
/* 0x085C */ f32 unk_85C; // stick length among other things
|
||||
/* 0x0860 */ s16 unk_860; // stick flame timer among other things
|
||||
/* 0x0862 */ s8 unk_862; // get item draw ID + 1
|
||||
/* 0x0864 */ f32 unk_864;
|
||||
/* 0x0868 */ f32 unk_868;
|
||||
/* 0x086C */ f32 unk_86C;
|
||||
/* 0x0870 */ f32 unk_870;
|
||||
/* 0x0874 */ f32 unk_874;
|
||||
/* 0x0878 */ f32 unk_878;
|
||||
/* 0x087C */ s16 unk_87C;
|
||||
/* 0x087E */ s16 unk_87E;
|
||||
/* 0x0880 */ f32 unk_880;
|
||||
/* 0x0884 */ f32 wallHeight; // height used to determine whether link can climb or grab a ledge at the top
|
||||
/* 0x0888 */ f32 wallDistance; // distance to the colliding wall plane
|
||||
/* 0x088C */ u8 unk_88C;
|
||||
/* 0x088D */ u8 unk_88D;
|
||||
/* 0x088E */ u8 unk_88E;
|
||||
/* 0x088F */ u8 unk_88F;
|
||||
/* 0x0890 */ u8 unk_890;
|
||||
/* 0x0891 */ u8 shockTimer;
|
||||
/* 0x0892 */ u8 unk_892;
|
||||
/* 0x0893 */ u8 unk_893;
|
||||
/* 0x0894 */ s16 fallStartHeight; // last truncated Y position before falling
|
||||
/* 0x0896 */ s16 fallDistance; // truncated Y distance the player has fallen so far (positive is down)
|
||||
/* 0x0898 */ s16 unk_898;
|
||||
/* 0x089A */ s16 unk_89A;
|
||||
/* 0x089C */ s16 unk_89C;
|
||||
/* 0x089E */ u16 unk_89E;
|
||||
/* 0x08A0 */ u8 unk_8A0;
|
||||
/* 0x08A1 */ u8 unk_8A1;
|
||||
/* 0x08A2 */ s16 unk_8A2;
|
||||
/* 0x08A4 */ f32 unk_8A4;
|
||||
/* 0x08A8 */ f32 unk_8A8;
|
||||
/* 0x08AC */ f32 windSpeed;
|
||||
/* 0x08B0 */ s16 windDirection;
|
||||
/* 0x08B4 */ WeaponInfo swordInfo[3];
|
||||
/* 0x0908 */ Vec3f bodyPartsPos[18];
|
||||
/* 0x09E0 */ MtxF mf_9E0;
|
||||
/* 0x0A20 */ MtxF shieldMf;
|
||||
/* 0x0A60 */ u8 isBurning;
|
||||
/* 0x0A61 */ u8 flameTimers[18]; // one flame per body part
|
||||
/* 0x0A73 */ u8 unk_A73;
|
||||
/* 0x0A74 */ PlayerFuncA74 func_A74;
|
||||
/* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
|
||||
/* 0x0A79 */ u8 unk_A79;
|
||||
/* 0x0A7A */ u8 unk_A7A;
|
||||
/* 0x0A7B */ u8 unk_A7B;
|
||||
/* 0x0A7C */ f32 unk_A7C;
|
||||
/* 0x0A80 */ s16 unk_A80;
|
||||
/* 0x0A82 */ u16 unk_A82;
|
||||
/* 0x0A84 */ s16 unk_A84;
|
||||
/* 0x0A86 */ s8 unk_A86;
|
||||
/* 0x0A87 */ u8 unk_A87;
|
||||
/* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position
|
||||
} Player; // size = 0xA94
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user