sys_matrix OK, documented, rename some other mathematics functions (#787)

* Import data and bss, add some name options

* Decomp rest of stack functions,
remove RSPMatrix,
split header

* sys_matrix OK (thanks Tharo)

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* pragma weaks in sinf and cosf, change documentation
change mcros to use 0x8000

* Rename sinf and cosf

* Correct initialisation of sMtxFClear

* More minor cleanup

* Rename stack functions

* Matrix_InsertMatrix -> Matrix_Mult

* The big transpose rename

* Fix MirRay_DrawReflectedBeam

* Matrix_InsertTranslation -> Matrix_Translate

* Matrix_Insert.Rotation_s -> Matrix_Rotate$1S
+ RotateY -> RotateYS

* Matrix_Insert(.)Rotation_f -> Matrix_Rotate$1F

* Matrix_RotateStateAroundXAxis -> Matrix_RotateXFApply
Matrix_SetStateXRotation -> Matrix_RotateXFNew

* Matrix_MultiplyVector3fByState -> Matrix_MultVec3f

* Matrix_MultiplyVector3fXZByCurrentState -> Matrix_MultVec3fXZ

* Matrix_GetStateTranslation -> Matrix_MultZero

* Matrix_GetStateTranslationAndScaled(.) -> Matrix_MultVec$1

* Matrix_FromRSPMatrix -> Matrix_MtxToMtxF

* Matrix_MultiplyVector3fByMatrix -> Matrix_MultVec3fExt

* Matrix_TransposeXYZ -> Matrix_Transpose

* Matrix_ToRSPMatrix -> Matrix_MtxFToMtx

* Matrix_AppendToPolyOpaDisp -> Matrix_MtxFToNewMtx
and document the conversion functions

* Matrix_NormalizeXYZ -> Matrix_ReplaceRotation

* Matrix_InsertRotationAroundUnitVector_f -> Matrix_RotateAxisF and S

* Matrix_InsertRotation -> Matrix_RotateZYX

* Document the last functions

* Small cleanup

* Matrix_JointPosition -> Matrix_TranslateRotateZYX

* Matrix_SetStateRotationAndTranslation -> Matrix_SetTranslateRotateYXZ

* func_8018219C -> Matrix_MtxFToYXZRot

* func_801822C4 -> Matrix_MtxFToZYXRot

* Fix files

* Format

* Review 1

* Renames

* Fix warning in EnDragon

* Format

* Convert `mode` to an actual enum

* Add enums, typedefs, externs to sys_matrix header

* Review

* One more

* More review

* Fix function names

* Format

* Fix names

* Format

* Review

* engineer's review

* Fix build

* Format

* Fix again

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
EllipticEllipsis
2022-05-26 04:24:39 +01:00
committed by GitHub
parent e1477702ca
commit 8049dec339
303 changed files with 5474 additions and 3324 deletions
+37 -37
View File
@@ -251,7 +251,7 @@
0x800880B0:("osGetIntMask",),
0x80088110:("osVoiceSetWord",),
0x800882A0:("guScale",),
0x80088350:("__sinf",),
0x80088350:("sinf",),
0x80088510:("sins",),
0x80088580:("_VirtualToPhysicalTask",),
0x8008868C:("osSpTaskLoad",),
@@ -410,7 +410,7 @@
0x80091AF0:("__osViInit",),
0x80091C10:("__osViSwapContext",),
0x80091F10:("osPiGetCmdQueue",),
0x80091F40:("__cosf",),
0x80091F40:("cosf",),
0x800920B0:("osEPiReadIo",),
0x80092100:("osViSetSpecialFeatures",),
0x80092260:("coss",),
@@ -3354,45 +3354,45 @@
0x801800CC:("Math_Atan2F",),
0x80180100:("Math_FAtan2F",),
0x8018012C:("Math_Acot2F",),
0x80180160:("Matrix_StateAlloc",),
0x8018019C:("Matrix_StatePush",),
0x801801CC:("Matrix_StatePop",),
0x801801E8:("Matrix_CopyCurrentState",),
0x8018020C:("Matrix_SetCurrentState",),
0x80180234:("Matrix_GetCurrentState",),
0x80180244:("Matrix_InsertMatrix",),
0x8018029C:("Matrix_InsertTranslation",),
0x80180160:("Matrix_Init",),
0x8018019C:("Matrix_Push",),
0x801801CC:("Matrix_Pop",),
0x801801E8:("Matrix_Get",),
0x8018020C:("Matrix_Put",),
0x80180234:("Matrix_GetCurrent",),
0x80180244:("Matrix_Mult",),
0x8018029C:("Matrix_Translate",),
0x8018039C:("Matrix_Scale",),
0x80180478:("Matrix_InsertXRotation_s",),
0x80180610:("Matrix_InsertXRotation_f",),
0x801807B8:("Matrix_RotateStateAroundXAxis",),
0x80180900:("Matrix_SetStateXRotation",),
0x801809AC:("Matrix_RotateY",),
0x80180B48:("Matrix_InsertYRotation_f",),
0x80180CF8:("Matrix_InsertZRotation_s",),
0x80180E90:("Matrix_InsertZRotation_f",),
0x8018103C:("Matrix_InsertRotation",),
0x801812FC:("Matrix_JointPosition",),
0x80181650:("Matrix_SetStateRotationAndTranslation",),
0x801817FC:("Matrix_ToRSPMatrix",),
0x80180478:("Matrix_RotateXS",),
0x80180610:("Matrix_RotateXF",),
0x801807B8:("Matrix_RotateXFApply",),
0x80180900:("Matrix_RotateXFNew",),
0x801809AC:("Matrix_RotateYS",),
0x80180B48:("Matrix_RotateYF",),
0x80180CF8:("Matrix_RotateZS",),
0x80180E90:("Matrix_RotateZF",),
0x8018103C:("Matrix_RotateZYX",),
0x801812FC:("Matrix_TranslateRotateZYX",),
0x80181650:("Matrix_SetTranslateRotateYXZ",),
0x801817FC:("Matrix_MtxFToMtx",),
0x80181A18:("Matrix_ToMtx",),
0x80181A40:("Matrix_NewMtx",),
0x80181A6C:("Matrix_AppendToPolyOpaDisp",),
0x80181A98:("Matrix_MultiplyVector3fByState",),
0x80181B50:("Matrix_GetStateTranslation",),
0x80181B78:("Matrix_GetStateTranslationAndScaledX",),
0x80181BC4:("Matrix_GetStateTranslationAndScaledY",),
0x80181C10:("Matrix_GetStateTranslationAndScaledZ",),
0x80181C5C:("Matrix_MultiplyVector3fXZByCurrentState",),
0x80181A6C:("Matrix_MtxFToNewMtx",),
0x80181A98:("Matrix_MultVec3f",),
0x80181B50:("Matrix_MultZero",),
0x80181B78:("Matrix_MultVecX",),
0x80181BC4:("Matrix_MultVecY",),
0x80181C10:("Matrix_MultVecZ",),
0x80181C5C:("Matrix_MultVec3fXZ",),
0x80181CDC:("Matrix_MtxFCopy",),
0x80181D64:("Matrix_FromRSPMatrix",),
0x80181FB8:("Matrix_MultiplyVector3fByMatrix",),
0x80182068:("Matrix_TransposeXYZ",),
0x801820A0:("Matrix_NormalizeXYZ",),
0x8018219C:("func_8018219C",),
0x801822C4:("func_801822C4",),
0x801823EC:("Matrix_InsertRotationAroundUnitVector_f",),
0x8018284C:("Matrix_InsertRotationAroundUnitVector_s",),
0x80181D64:("Matrix_MtxToMtxF",),
0x80181FB8:("Matrix_MultVec3fExt",),
0x80182068:("Matrix_Transpose",),
0x801820A0:("Matrix_ReplaceRotation",),
0x8018219C:("Matrix_MtxFToYXZRot",),
0x801822C4:("Matrix_MtxFToZYXRot",),
0x801823EC:("Matrix_RotateAxisF",),
0x8018284C:("Matrix_RotateAxisS",),
0x80182C90:("SysUcode_GetUCodeBoot",),
0x80182CA0:("SysUcode_GetUCodeBootSize",),
0x80182CBC:("SysUcode_GetUCode",),