mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 20:35:13 +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:
parent
34c73dda62
commit
54f762b419
85 changed files with 947 additions and 1443 deletions
|
@ -47,13 +47,13 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
|||
scale = 1.0f / scale;
|
||||
Math_Vec3f_Scale(&sp154, scale);
|
||||
|
||||
func_800A7A24(&sp110, sp160.x, sp160.y, sp160.z);
|
||||
SkinMatrix_SetTranslate(&sp110, sp160.x, sp160.y, sp160.z);
|
||||
func_800A7EC0(&spD0, this->addAngle, sp154.x, sp154.y, sp154.z);
|
||||
func_800A6FA0(&sp110, &spD0, &sp90);
|
||||
func_800A7A24(&sp110, -sp160.x, -sp160.y, -sp160.z);
|
||||
func_800A6FA0(&sp90, &sp110, &sp50);
|
||||
func_800A6EF4(&sp50, p1, &sp38);
|
||||
func_800A6EF4(&sp50, p2, &sp44);
|
||||
SkinMatrix_MtxFMtxFMult(&sp110, &spD0, &sp90);
|
||||
SkinMatrix_SetTranslate(&sp110, -sp160.x, -sp160.y, -sp160.z);
|
||||
SkinMatrix_MtxFMtxFMult(&sp90, &sp110, &sp50);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&sp50, p1, &sp38);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&sp50, p2, &sp44);
|
||||
|
||||
elem->p1.x = sp38.x;
|
||||
elem->p1.y = sp38.y;
|
||||
|
@ -715,11 +715,11 @@ void EffectBlure_DrawSmooth(EffectBlure* this, GraphicsContext* gfxCtx) {
|
|||
this->elements[this->numElements - 1].flags |= 2;
|
||||
|
||||
EffectBlure_SetupSmooth(this, gfxCtx);
|
||||
func_800A7A24(&spDC, this->elements[0].p2.x, this->elements[0].p2.y, this->elements[0].p2.z);
|
||||
func_800A76A4(&sp9C, 0.1f, 0.1f, 0.1f);
|
||||
func_800A6FA0(&spDC, &sp9C, &sp5C);
|
||||
SkinMatrix_SetTranslate(&spDC, this->elements[0].p2.x, this->elements[0].p2.y, this->elements[0].p2.z);
|
||||
SkinMatrix_SetScale(&sp9C, 0.1f, 0.1f, 0.1f);
|
||||
SkinMatrix_MtxFMtxFMult(&spDC, &sp9C, &sp5C);
|
||||
|
||||
mtx = func_800A7E70(gfxCtx, &sp5C);
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp5C);
|
||||
if (mtx == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -844,13 +844,13 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
|
|||
scale = 1.0f / scale;
|
||||
Math_Vec3f_Scale(&sp198, scale);
|
||||
|
||||
func_800A7A24(&sp154, sp1B0.x, sp1B0.y, sp1B0.z);
|
||||
SkinMatrix_SetTranslate(&sp154, sp1B0.x, sp1B0.y, sp1B0.z);
|
||||
func_800A7EC0(&sp114, 0x3FFF, sp198.x, sp198.y, sp198.z);
|
||||
func_800A6FA0(&sp154, &sp114, &spD4);
|
||||
func_800A7A24(&sp154, -sp1B0.x, -sp1B0.y, -sp1B0.z);
|
||||
func_800A6FA0(&spD4, &sp154, &sp94);
|
||||
SkinMatrix_MtxFMtxFMult(&sp154, &sp114, &spD4);
|
||||
SkinMatrix_SetTranslate(&sp154, -sp1B0.x, -sp1B0.y, -sp1B0.z);
|
||||
SkinMatrix_MtxFMtxFMult(&spD4, &sp154, &sp94);
|
||||
|
||||
mtx = func_800A7E70(gfxCtx, &sp94);
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp94);
|
||||
if (mtx == NULL) {
|
||||
// Translates to: "Forced termination because a matrix cannot be taken"
|
||||
osSyncPrintf("EffectBlureInfo2_disp_makeDisplayList()マトリックス取れないので,強制終了\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue