1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 23:44:53 +00:00

z_skin_matrix.c decompiled (1 non matching, 1 non equivalent) (#243)

* func_800A7BE4 and func_800A7C20 done

- func_800A7BE4 copy of "Math_Vec3f_ToVec3s" in z_lib.c
- func_800A7C20 copy of "Math_Vec3s_ToVec3f" in z_lib.c

* done func_800A7A24

* func_800A76A4 done

* func_800A6E10 done

* func_800A6EF4 done

* func_800A6FA0 done

* func_800A72FC done

* Deleted z_skin_matrix.data.s and updated spec

* func_800A730C done

* func_800A735C done

* func_800A7E70 done, func_800A7C60 matching but I'm not happy with it (weird types in function params)

* Corrections. func_800A7C60 in skin_matrix done, Matrix_MtxFToMtx in sys_matrix done.

* func_800A7EC0 nonmatching

* func_800A8030 nonmatching but VERY close (two registers swapped)

* func_800A8030 done

* updating comments

* func_800A7704 done

* func_800A7894 done

* halfway through deciphering mips_to_c for func_800A73E0

* func_800A73E0 functional but non-matching (saved register differences and probably regalloc)

* Renaming some arguments and rewriting comments

* Renamed files across whole project and deleted asm nonmatchings

* ran format.sh

* fixed function name

* fixing multiplcation order in SkinMatrix_MtxFMtxFMult

* Corrections in SkinMatrix_MtxFMtxFMult

* Formatting changes after review

* Changes as per code review

* fixing rename error

* fixing rename error

* rename fixes

* fixing function rename error

* ran ./format.sh

* last couple of changes as per code review

* renamed SetScaling -> SetScale

* Skin_Matrix_Invert -> SkinMatrix_Invert

* Renaming and fixing debug message print

* Renamed argument "mf" to more specific "clear" in SkinMatrix_GetClear

* renamed again to "mfp"

* snake case to camel case changes
This commit is contained in:
AdamKiddle 2020-08-08 16:23:16 +01:00 committed by GitHub
parent 34c73dda62
commit 54f762b419
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 947 additions and 1443 deletions

View file

@ -1300,22 +1300,18 @@ void func_800A663C(GlobalContext* globalCtx, PSkinAwb*, SkeletonHeader*, Animati
void func_800A6888(GlobalContext*, PSkinAwb*);
// ? func_800A698C(?);
// ? func_800A6AC4(?);
// ? func_800A6E10(?);
void func_800A6EF4(MtxF* mf, Vec3f* src, Vec3f* dest);
void func_800A6FA0(MtxF* mf1, MtxF* mf2, MtxF* dest);
// ? func_800A72FC(?);
// ? func_800A730C(?);
// ? func_800A735C(?);
// ? func_800A73E0(?);
void func_800A76A4(MtxF* dest, f32 x, f32 y, f32 z);
void func_800A7704(MtxF* dest, s16 x, s16 y, s16 z);
// ? func_800A7894(?);
void func_800A7A24(MtxF* dest, f32 x, f32 y, f32 z);
// ? func_800A7B04(?);
// ? func_800A7B84(?);
// ? func_800A7C60(?);
Mtx* func_800A7E70(GraphicsContext* gfxCtx, MtxF* src);
void func_800A7EC0(MtxF* dest, s16 arg1, f32 x, f32 y, f32 z);
void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
void SkinMatrix_MtxFMtxFMult(MtxF* mfB, MtxF* mfA, MtxF* dest);
void SkinMatrix_GetClear(MtxF** mf);
void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
void SkinMatrix_SetRotateRPY(MtxF* mf, s16 roll, s16 pitch, s16 yaw);
void SkinMatrix_SetTranslate(MtxF* mf, f32 x, f32 y, f32 z);
void SkinMatrix_SetScaleRotateYRPTranslate(MtxF* mf, f32 scaleX, f32 scaleY, f32 scaleZ, s16 yaw, s16 roll, s16 pitch, f32 dx, f32 dy, f32 dz);
Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src);
void func_800A7EC0(MtxF *mf, s16 a, f32 x, f32 y, f32 z);
// ? func_800A81A0(?);
// ? func_800A82C8(?);
// ? func_800A9A9C(?);
@ -1754,7 +1750,7 @@ void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec);
Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest);
Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line);
Mtx* Matrix_NewMtx(GraphicsContext* gfxCtx, char* file, s32 line);
Mtx* Matrix_MtxFToNewMtx(MtxF* src, GraphicsContext* gfxCtx);
Mtx* Matrix_SkinMatrix_MtxFToNewMtx(MtxF* src, GraphicsContext* gfxCtx);
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
void Matrix_MtxFCopy(MtxF* dest, MtxF* src);
void Matrix_MtxToMtxF(Mtx* src, MtxF* dest);