mirror of
https://github.com/zeldaret/tp
synced 2026-06-24 09:41:32 -04:00
project cleanup (#2895)
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include "string.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
|
||||
/* 8026F93C-8026F95C 26A27C 0020+00 0/0 3/3 0/0 .text cLib_memCpy__FPvPCvUl */
|
||||
/**
|
||||
* Copies a source block of memory to a destination block of memory
|
||||
* @param dst Pointer to destination memory
|
||||
@@ -18,7 +17,6 @@ void cLib_memCpy(void* dst, const void* src, unsigned long num) {
|
||||
memcpy(dst, src, num);
|
||||
}
|
||||
|
||||
/* 8026F95C-8026F97C 26A29C 0020+00 0/0 4/4 0/0 .text cLib_memSet__FPviUl */
|
||||
/**
|
||||
* Sets the first num bytes of given block of memory to specified value
|
||||
* @param ptr Pointer to block of memory
|
||||
@@ -29,7 +27,6 @@ void cLib_memSet(void* ptr, int value, unsigned long num) {
|
||||
memset(ptr, value, num);
|
||||
}
|
||||
|
||||
/* 8026F97C-8026FA3C 26A2BC 00C0+00 0/0 50/50 178/178 .text cLib_addCalc__FPfffff */
|
||||
/**
|
||||
* Changes value by step towards target. Step amount is clamped between a min and max, and
|
||||
* scaled as a fraction of the remaining distance.
|
||||
@@ -75,7 +72,6 @@ f32 cLib_addCalc(f32* pvalue, f32 target, f32 scale, f32 maxStep, f32 minStep) {
|
||||
return fabsf(target - *pvalue);
|
||||
}
|
||||
|
||||
/* 8026FA3C-8026FA80 26A37C 0044+00 0/0 20/20 701/701 .text cLib_addCalc2__FPffff */
|
||||
/**
|
||||
* Changes value by step towards target. Step amount is clamped between a max and -max, and
|
||||
* scaled as a fraction of the remaining distance.
|
||||
@@ -96,7 +92,6 @@ void cLib_addCalc2(f32* pvalue, f32 target, f32 scale, f32 maxStep) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8026FA80-8026FAB8 26A3C0 0038+00 0/0 2/2 322/322 .text cLib_addCalc0__FPfff */
|
||||
/**
|
||||
* Changes value by step towards zero. Step amount is clamped between a max and -max, and
|
||||
* scaled as a fraction of the remaining distance.
|
||||
@@ -114,7 +109,6 @@ void cLib_addCalc0(f32* pvalue, f32 scale, f32 maxStep) {
|
||||
*pvalue -= step;
|
||||
}
|
||||
|
||||
/* 8026FAB8-8026FDF4 26A3F8 033C+00 0/0 3/3 78/78 .text cLib_addCalcPos__FP4cXyzRC4cXyzfff */
|
||||
/**
|
||||
* Changes position by step towards target position. Step amount is clamped between a min and max,
|
||||
* and scaled as a fraction of the remaining distance.
|
||||
@@ -149,7 +143,6 @@ f32 cLib_addCalcPos(cXyz* ppos, const cXyz& target, f32 scale, f32 maxStep, f32
|
||||
return ppos->abs(target);
|
||||
}
|
||||
|
||||
/* 8026FDF4-80270178 26A734 0384+00 0/0 1/1 4/4 .text cLib_addCalcPosXZ__FP4cXyzRC4cXyzfff */
|
||||
/**
|
||||
* Changes position's X/Z components by step towards target position. Step amount is clamped
|
||||
* between a min and max, and scaled as a fraction of the remaining distance.
|
||||
@@ -187,7 +180,6 @@ f32 cLib_addCalcPosXZ(cXyz* ppos, const cXyz& target, f32 scale, f32 maxStep, f3
|
||||
return (*ppos - target).absXZ();
|
||||
}
|
||||
|
||||
/* 80270178-80270350 26AAB8 01D8+00 0/0 2/2 33/33 .text cLib_addCalcPos2__FP4cXyzRC4cXyzff */
|
||||
/**
|
||||
* Changes position by step towards target position. Step amount is clamped between a max and -max
|
||||
* and scaled as a fraction of the remaining distance.
|
||||
@@ -207,7 +199,6 @@ void cLib_addCalcPos2(cXyz* ppos, const cXyz& target, f32 scale, f32 maxStep) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80270350-80270540 26AC90 01F0+00 0/0 0/0 4/4 .text cLib_addCalcPosXZ2__FP4cXyzRC4cXyzff */
|
||||
/**
|
||||
* Changes position's X/Z components by step towards target position. Step amount is clamped between
|
||||
* a max and -max and scaled as a fraction of the remaining distance.
|
||||
@@ -230,8 +221,6 @@ void cLib_addCalcPosXZ2(cXyz* ppos, const cXyz& target, f32 scale, f32 maxStep)
|
||||
}
|
||||
}
|
||||
|
||||
/* 80270540-80270608 26AE80 00C8+00 0/0 81/81 244/244 .text cLib_addCalcAngleS__FPsssss
|
||||
*/
|
||||
/**
|
||||
* Changes angle value by step towards target. Step amount is clamped between a min and max, and
|
||||
* scaled as a fraction of the remaining distance.
|
||||
@@ -273,7 +262,6 @@ s16 cLib_addCalcAngleS(s16* pvalue, s16 target, const s16 scale, s16 maxStep, s1
|
||||
return target - *pvalue;
|
||||
}
|
||||
|
||||
/* 80270608-8027065C 26AF48 0054+00 0/0 2/2 849/849 .text cLib_addCalcAngleS2__FPssss */
|
||||
/**
|
||||
* Changes angle value by step towards target angle. Step amount is clamped between a max and -max
|
||||
* and scaled as a fraction of the remaining distance.
|
||||
@@ -294,7 +282,6 @@ void cLib_addCalcAngleS2(s16* pvalue, s16 target, s16 scale, s16 maxStep) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 8027065C-802706D0 26AF9C 0074+00 0/0 3/3 14/14 .text cLib_chaseUC__FPUcUcUc */
|
||||
/**
|
||||
* Changes unsigned char value by step towards target
|
||||
* @param pvalue Pointer to value to change
|
||||
@@ -325,7 +312,6 @@ int cLib_chaseUC(u8* pvalue, u8 target, u8 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 802706D0-80270740 26B010 0070+00 0/0 4/4 49/49 .text cLib_chaseS__FPsss */
|
||||
/**
|
||||
* Changes signed short value by step towards target
|
||||
* @param pvalue Pointer to value to change
|
||||
@@ -349,7 +335,6 @@ int cLib_chaseS(s16* pvalue, s16 target, s16 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80270740-802707AC 26B080 006C+00 0/0 70/70 448/448 .text cLib_chaseF__FPfff */
|
||||
/**
|
||||
* Changes float value by step towards target
|
||||
* @param pvalue Pointer to value to change
|
||||
@@ -373,7 +358,6 @@ int cLib_chaseF(f32* pvalue, f32 target, f32 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 802707AC-80270990 26B0EC 01E4+00 0/0 3/3 60/60 .text cLib_chasePos__FP4cXyzRC4cXyzf */
|
||||
/**
|
||||
* Changes position by step towards target
|
||||
* @param pvalue Pointer to position to change
|
||||
@@ -396,8 +380,6 @@ int cLib_chasePos(cXyz* pvalue, const cXyz& target, f32 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80270990-80270B90 26B2D0 0200+00 0/0 1/0 19/19 .text cLib_chasePosXZ__FP4cXyzRC4cXyzf
|
||||
*/
|
||||
/**
|
||||
* Changes position's X/Z components by step towards target
|
||||
* @param pvalue Pointer to position to change
|
||||
@@ -421,7 +403,6 @@ int cLib_chasePosXZ(cXyz* pvalue, const cXyz& target, f32 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80270B90-80270C04 26B4D0 0074+00 0/0 4/4 213/213 .text cLib_chaseAngleS__FPsss */
|
||||
/**
|
||||
* Changes angle value by step towards target
|
||||
* @param pvalue Pointer to value to change
|
||||
@@ -445,7 +426,6 @@ int cLib_chaseAngleS(s16* pvalue, s16 target, s16 step) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 80270C04-80270C3C 26B544 0038+00 0/0 39/39 454/454 .text cLib_targetAngleY__FPC3VecPC3Vec */
|
||||
/**
|
||||
* Gets the target y-angle from position A to position B
|
||||
* @param lhs Pointer to position A
|
||||
@@ -456,7 +436,6 @@ s16 cLib_targetAngleY(const Vec* lhs, const Vec* rhs) {
|
||||
return cM_atan2s(rhs->x - lhs->x, rhs->z - lhs->z);
|
||||
}
|
||||
|
||||
/* 80270C3C-80270C74 26B57C 0038+00 0/0 0/0 7/7 .text cLib_targetAngleY__FRC3VecRC3Vec */
|
||||
/**
|
||||
* Gets the target y-angle from position A to position B
|
||||
* @param lhs Reference to position A
|
||||
@@ -467,7 +446,6 @@ s16 cLib_targetAngleY(const Vec& lhs, const Vec& rhs) {
|
||||
return cM_atan2s(rhs.x - lhs.x, rhs.z - lhs.z);
|
||||
}
|
||||
|
||||
/* 80270C74-80270DC0 26B5B4 014C+00 0/0 2/2 109/109 .text cLib_targetAngleX__FPC4cXyzPC4cXyz */
|
||||
/**
|
||||
* Gets the target x-angle from position A to position B
|
||||
* @param lhs Pointer to position A
|
||||
@@ -480,8 +458,6 @@ s16 cLib_targetAngleX(cXyz const* lhs, cXyz const* rhs) {
|
||||
return cM_atan2s(diff.y, f1);
|
||||
}
|
||||
|
||||
/* 80270DC0-80270E24 26B700 0064+00 0/0 2/2 118/118 .text cLib_offsetPos__FP4cXyzPC4cXyzsPC4cXyz
|
||||
*/
|
||||
/**
|
||||
* Adds an offset to a source position in a given angle direction and places the result in pdest
|
||||
* @param pdest The resulting position
|
||||
@@ -497,7 +473,6 @@ void cLib_offsetPos(cXyz* pdest, cXyz const* psrc, s16 angle, cXyz const* vec) {
|
||||
pdest->z = psrc->z + (vec->z * cos - vec->x * sin);
|
||||
}
|
||||
|
||||
/* 80270E24-80270E4C 26B764 0028+00 0/0 48/48 71/71 .text cLib_distanceAngleS__Fss */
|
||||
/**
|
||||
* Gets the target x-angle from position A to position B
|
||||
* @param lhs Pointer to position A
|
||||
@@ -508,13 +483,10 @@ s32 cLib_distanceAngleS(s16 x, s16 y) {
|
||||
return abs(static_cast<s16>(x - y));
|
||||
}
|
||||
|
||||
/* 80430DB8-80430F98 05DAD8 01E0+00 2/1 0/0 0/0 .bss mtx */
|
||||
static Mtx mtx[10];
|
||||
|
||||
/* 80450768-80450770 -00001 0004+04 6/6 2/2 695/695 .sdata calc_mtx */
|
||||
Mtx* calc_mtx = mtx;
|
||||
|
||||
/* 80270E4C-80270E5C 26B78C 0010+00 0/0 1/1 0/0 .text MtxInit__Fv */
|
||||
/**
|
||||
* Initializes calc_mtx to mtx stack
|
||||
*/
|
||||
@@ -522,7 +494,6 @@ void MtxInit() {
|
||||
calc_mtx = mtx;
|
||||
}
|
||||
|
||||
/* 80270E5C-80270EA4 26B79C 0048+00 0/0 0/0 43/43 .text MtxTrans__FfffUc */
|
||||
void MtxTrans(f32 x_trans, f32 y_trans, f32 z_trans, u8 param_3) {
|
||||
if (param_3 == 0) {
|
||||
MTXTrans(*calc_mtx, x_trans, y_trans, z_trans);
|
||||
@@ -533,7 +504,6 @@ void MtxTrans(f32 x_trans, f32 y_trans, f32 z_trans, u8 param_3) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80270EA4-80270EEC 26B7E4 0048+00 0/0 0/0 46/46 .text MtxScale__FfffUc */
|
||||
void MtxScale(f32 x_trans, f32 y_trans, f32 z_trans, u8 param_3) {
|
||||
if (param_3 == 0) {
|
||||
MTXScale(*calc_mtx, x_trans, y_trans, z_trans);
|
||||
@@ -544,7 +514,6 @@ void MtxScale(f32 x_trans, f32 y_trans, f32 z_trans, u8 param_3) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 80270EEC-80270F1C 26B82C 0030+00 0/0 2/2 615/615 .text MtxPosition__FP4cXyzP4cXyz */
|
||||
/**
|
||||
* Multiplies a src position by the calc_mtx and puts the result in dest
|
||||
* @param src The src position to be multiplied
|
||||
@@ -554,7 +523,6 @@ void MtxPosition(cXyz* src, cXyz* dest) {
|
||||
MTXMultVec(*calc_mtx, src, dest);
|
||||
}
|
||||
|
||||
/* 80270F1C-80270F58 26B85C 003C+00 0/0 0/0 20/20 .text MtxPush__Fv */
|
||||
void MtxPush() {
|
||||
Mtx mtx;
|
||||
MTXCopy(*calc_mtx, mtx);
|
||||
@@ -562,7 +530,6 @@ void MtxPush() {
|
||||
MTXCopy(mtx, *calc_mtx);
|
||||
}
|
||||
|
||||
/* 80270F58-80270F68 26B898 0010+00 0/0 0/0 20/20 .text MtxPull__Fv */
|
||||
Mtx* MtxPull() {
|
||||
return calc_mtx--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user