|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
Provides common utilities.
Functions | |
| void | memSet (void *dst, int val, ulong size) |
| See memset. | |
| float | addCalcPos (mVec3_c *currentPos, const mVec3_c &targetPos, float ratio, float maxStep, float minStep) |
Smoothly moves currentPos towards targetPos using proportional scaling. | |
| bool | chasePos (mVec3_c *currentPos, const mVec3_c &targetPos, float step) |
Moves currentPos towards targetPos by a fixed step amount. | |
| s16 | targetAngleY (const mVec3_c &vec1, const mVec3_c &vec2) |
| Calculates the yaw (Y-axis) orientation angle from an origin position to a target position. | |
| s16 | targetAngleX (const mVec3_c &vec1, const mVec3_c &vec2) |
| Calculates the pitch (X-axis) orientation angle from an origin position to a target position. | |
| bool | isZero (float val) |
| Checks if a floating-point value is effectively zero within epsilon tolerance. | |
| void cLib::memSet | ( | void * | dst, |
| int | val, | ||
| ulong | size ) |
| float cLib::addCalcPos | ( | mVec3_c * | currentPos, |
| const mVec3_c & | targetPos, | ||
| float | ratio, | ||
| float | maxStep, | ||
| float | minStep ) |
Smoothly moves currentPos towards targetPos using proportional scaling.
If the applied step overshoots the target, the position is snapped exactly to the target.
| currentPos | The position to be updated. |
| targetPos | The target position. |
| ratio | The smoothing ratio (between 0.0f and 1.0f). Higher value means snappier movement. |
| maxStep | The maximum step for a single update. |
| minStep | The minimum step to prevent jittering. |
Moves currentPos towards targetPos by a fixed step amount.
If the applied step overshoots the target, the position is snapped exactly to the target.
| currentPos | The position to be updated. |
| targetPos | The target position. |
| step | The step value. |
true if the position reached the target, false otherwise.