mirror of
https://github.com/encounter/tp.git
synced 2026-03-30 11:40:53 -07:00
a61e3491f7
* initial freezard actor struct + setActionMode OK * daE_FZ_Draw * setReflectAngle * mBoundSoundset * daE_FZ_Execute & execute * demoDelete * daE_FZ_Delete & _delete * CreateHeap * useHeapInit * cc_set * mtx_set * action WIP * way_gake_check * executeRollMove * executeMove * draw WIP * executeDamage * checkpoint * create * checkpoint * daE_FZ_c::executeWait * checkpoint * daE_FZ_c::damage_check almost done * rm asm * rm headers * setup_profile WIP + doxygen update * fix merge issues * docs fix? * fix2 * doxygen updates * setup g_profile_E_FZ, profile setup script WIP * update github actions * update progress.md
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef JASCALC_H
|
|
#define JASCALC_H
|
|
|
|
#include "dolphin/types.h"
|
|
|
|
/**
|
|
* @ingroup jsystem-jaudio
|
|
*
|
|
*/
|
|
struct JASCalc {
|
|
/* 8028F2E8 */ static void imixcopy(s16 const*, s16 const*, s16*, u32);
|
|
/* 8028F318 */ static void bcopyfast(void const*, void*, u32);
|
|
/* 8028F354 */ static void bcopy(void const*, void*, u32);
|
|
/* 8028F454 */ static void bzerofast(void*, u32);
|
|
/* 8028F480 */ static void bzero(void*, u32);
|
|
/* 8028F578 */ static f32 pow2(f32);
|
|
|
|
// Could not make it work as inline - specialization is in JASCalc.cpp
|
|
template <typename A, typename B>
|
|
static A clamp(B x); /* {
|
|
if (std::numeric_limits<A>::min() >= x)
|
|
return std::numeric_limits<A>::min();
|
|
if (x >= std::numeric_limits<A>::max())
|
|
return std::numeric_limits<A>::max();
|
|
return x;
|
|
} */
|
|
|
|
static f32 clamp01(f32 i_value) {
|
|
if (i_value <= 0.0f) {
|
|
return 0.0f;
|
|
}
|
|
if (i_value >= 1.0f) {
|
|
return 1.0f;
|
|
}
|
|
return i_value;
|
|
}
|
|
|
|
f32 fake1();
|
|
f32 fake2(long x);
|
|
f32 fake3();
|
|
|
|
static s16 const CUTOFF_TO_IIR_TABLE[128][4];
|
|
};
|
|
|
|
#endif /* JASCALC_H */
|