Go to the source code of this file.
|
bool | cLib_IsZero (f32 value) |
|
void | cLib_memCpy (void *dst, const void *src, unsigned long size) |
|
void | cLib_memSet (void *ptr, int value, unsigned long size) |
|
f32 | cLib_addCalc (f32 *o_value, f32 target, f32 scale, f32 maxStep, f32 minStep) |
|
void | cLib_addCalc2 (f32 *o_value, f32 target, f32 scale, f32 maxStep) |
|
void | cLib_addCalc0 (f32 *o_value, f32 scale, f32 maxStep) |
|
f32 | cLib_addCalcPos (cXyz *o_value, cXyz const &target, f32 scale, f32 maxStep, f32 minStep) |
|
f32 | cLib_addCalcPosXZ (cXyz *o_value, cXyz const &target, f32 scale, f32 maxStep, f32 minStep) |
|
void | cLib_addCalcPos2 (cXyz *o_value, cXyz const &target, f32 scale, f32 maxStep) |
|
void | cLib_addCalcPosXZ2 (cXyz *o_value, cXyz const &target, f32 scale, f32 maxStep) |
|
s16 | cLib_addCalcAngleS (s16 *o_value, s16 target, s16 scale, s16 maxStep, s16 minStep) |
|
void | cLib_addCalcAngleS2 (s16 *o_value, s16 target, s16 scale, s16 maxStep) |
|
int | cLib_chaseUC (u8 *o_value, u8 target, u8 step) |
|
int | cLib_chaseS (s16 *o_value, s16 target, s16 step) |
|
int | cLib_chaseF (f32 *o_value, f32 target, f32 step) |
|
int | cLib_chasePos (cXyz *o_value, cXyz const &target, f32 step) |
|
int | cLib_chasePosXZ (cXyz *o_value, cXyz const &target, f32 step) |
|
int | cLib_chaseAngleS (s16 *o_value, s16 target, s16 step) |
|
s16 | cLib_targetAngleY (const Vec *lhs, const Vec *rhs) |
|
s16 | cLib_targetAngleY (const Vec &lhs, const Vec &rhs) |
|
s16 | cLib_targetAngleX (const cXyz *, const cXyz *) |
|
void | cLib_offsetPos (cXyz *pDest, cXyz const *pSrc, s16 angle, cXyz const *vec) |
|
s32 | cLib_distanceAngleS (s16 x, s16 y) |
|
template<typename T > |
void | cLib_offBit (T &value, T bit) |
|
template<typename T > |
void | cLib_onBit (T &value, T bit) |
|
template<typename T > |
T | cLib_checkBit (T value, T bit) |
|
template<typename T > |
T | cLib_minMaxLimit (T val, T min, T max) |
|
template<typename T > |
T | cLib_maxLimit (T val, T max) |
|
template<typename T > |
T | cLib_getRndValue (T min, T range) |
|
template<typename T > |
T | cLib_calcTimer (T *value) |
|
void | MtxInit (void) |
|
void | MtxTrans (f32, f32, f32, u8) |
|
void | MtxScale (f32, f32, f32, u8) |
|
void | MtxPosition (cXyz *, cXyz *) |
|
void | MtxPush (void) |
|
Mtx * | MtxPull (void) |
|
◆ cLib_addCalc()
Changes value by step towards target. Step amount is clamped between a min and max, and scaled as a fraction of the remaining distance.
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum step amount |
minStep | Minimum step amount |
- Returns
- The absolute value of remaining distance to target
◆ cLib_addCalc0()
Changes value by step towards zero. Step amount is clamped between a max and -max, and scaled as a fraction of the remaining distance.
- Parameters
-
pvalue | Pointer to value to change |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum (+/-) step amount |
◆ cLib_addCalc2()
Changes value by step towards target. Step amount is clamped between a max and -max, and scaled as a fraction of the remaining distance.
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum (+/-) step amount |
◆ cLib_addCalcAngleS()
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.
- Parameters
-
pvalue | Pointer to angle value to change |
target | Target angle to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum step amount |
minStep | Minimum step amount |
- Returns
- The remaining distance to target
◆ cLib_addCalcAngleS2()
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.
- Parameters
-
pvalue | Pointer to angle value to change |
target | Target angle to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum (+/-) step amount |
◆ cLib_addCalcPos()
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.
- Parameters
-
ppos | Pointer to position to change |
target | Target position to move towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum step amount |
minStep | Minimum step amount |
- Returns
- The absolute value of remaining distance to target
◆ cLib_addCalcPos2()
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.
- Parameters
-
ppos | Pointer to position to change |
target | Target position to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum (+/-) step amount |
◆ cLib_addCalcPosXZ()
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.
- Parameters
-
ppos | Pointer to position to change |
target | Target position to move towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum step amount |
minStep | Minimum step amount |
- Returns
- The absolute value of remaining distance to target
◆ cLib_addCalcPosXZ2()
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.
- Parameters
-
ppos | Pointer to position to change |
target | Target position to move value towards |
scale | Fraction of remaining distance to scale step by |
maxStep | Maximum (+/-) step amount |
◆ cLib_calcTimer()
T cLib_calcTimer |
( |
T * |
value | ) |
|
◆ cLib_chaseAngleS()
Changes angle value by step towards target
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_chaseF()
Changes float value by step towards target
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_chasePos()
Changes position by step towards target
- Parameters
-
pvalue | Pointer to position to change |
target | Target position to move towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_chasePosXZ()
Changes position's X/Z components by step towards target
- Parameters
-
pvalue | Pointer to position to change |
target | Target position to move towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_chaseS()
Changes signed short value by step towards target
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_chaseUC()
int cLib_chaseUC |
( |
u8 * |
pvalue, |
|
|
u8 |
target, |
|
|
u8 |
step |
|
) |
| |
Changes unsigned char value by step towards target
- Parameters
-
pvalue | Pointer to value to change |
target | Target to move value towards |
step | Step amount |
- Returns
- TRUE when target is reached, FALSE otherwise
◆ cLib_checkBit()
T cLib_checkBit |
( |
T |
value, |
|
|
T |
bit |
|
) |
| |
|
inline |
◆ cLib_distanceAngleS()
Gets the target x-angle from position A to position B
- Parameters
-
lhs | Pointer to position A |
rhs | Pointer to position B |
- Returns
- X-Angle from position A to position B
◆ cLib_getRndValue()
T cLib_getRndValue |
( |
T |
min, |
|
|
T |
range |
|
) |
| |
◆ cLib_IsZero()
◆ cLib_maxLimit()
T cLib_maxLimit |
( |
T |
val, |
|
|
T |
max |
|
) |
| |
|
inline |
◆ cLib_memCpy()
c_lib.cpp Copies a source block of memory to a destination block of memory
- Parameters
-
dst | Pointer to destination memory |
src | Pointer to source data to be copied |
num | Number of bytes to copy |
◆ cLib_memSet()
Sets the first num bytes of given block of memory to specified value
- Parameters
-
ptr | Pointer to block of memory |
value | Value to be set |
num | Number of bytes to set |
◆ cLib_minMaxLimit()
T cLib_minMaxLimit |
( |
T |
val, |
|
|
T |
min, |
|
|
T |
max |
|
) |
| |
|
inline |
◆ cLib_offBit()
void cLib_offBit |
( |
T & |
value, |
|
|
T |
bit |
|
) |
| |
|
inline |
◆ cLib_offsetPos()
Adds an offset to a source position in a given angle direction and places the result in pdest
- Parameters
-
pdest | The resulting position |
psrc | The source position |
angle | The direction to offset psrc in |
vec | The offset cXyz to add to psrc |
◆ cLib_onBit()
void cLib_onBit |
( |
T & |
value, |
|
|
T |
bit |
|
) |
| |
|
inline |
◆ cLib_targetAngleX()
Gets the target x-angle from position A to position B
- Parameters
-
lhs | Pointer to position A |
rhs | Pointer to position B |
- Returns
- X-Angle from position A to position B
◆ cLib_targetAngleY() [1/2]
Gets the target y-angle from position A to position B
- Parameters
-
lhs | Reference to position A |
rhs | Reference to position B |
- Returns
- Y-angle from position A to position B
◆ cLib_targetAngleY() [2/2]
Gets the target y-angle from position A to position B
- Parameters
-
lhs | Pointer to position A |
rhs | Pointer to position B |
- Returns
- Y-angle from position A to position B
◆ MtxInit()
Initializes calc_mtx to mtx stack
◆ MtxPosition()
Multiplies a src position by the calc_mtx and puts the result in dest
- Parameters
-
src | The src position to be multiplied |
dest | The resulting multiplied position |
◆ MtxPull()
◆ MtxPush()
◆ MtxScale()
◆ MtxTrans()
◆ calc_mtx