diff options
Diffstat (limited to 'include/SSystem')
| -rw-r--r-- | include/SSystem/SComponent/c_cc_d.h | 1 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_lib.h | 5 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_math.h | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index fe834acc38..b8b1ba29fa 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -458,6 +458,7 @@ public: void OffAtVsPlayerBit() { mObjAt.OffSPrmBit(0xC); } void OnAtVsPlayerBit() { mObjAt.OnSPrmBit(0xC); } void OnCoSPrmBit(u32 flag) { mObjCo.OnSPrmBit(flag); } + void SetTgSPrm(u32 prm) { mObjTg.SetSPrm(prm); } void SetCoSPrm(u32 prm) { mObjCo.SetSPrm(prm); } }; // Size = 0x40 diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index 886f72583d..f1488363f6 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -94,6 +94,11 @@ T cLib_calcTimer(T* value) { return *value; } +template <typename T> +T cLib_getRndValue(T min, T range) { + return (T)(min + cM_rndF((f32)range)); +} + void MtxInit(void); void MtxTrans(f32, f32, f32, u8); void MtxScale(f32, f32, f32, u8); diff --git a/include/SSystem/SComponent/c_math.h b/include/SSystem/SComponent/c_math.h index 1a9f67eefe..ae0d798509 100644 --- a/include/SSystem/SComponent/c_math.h +++ b/include/SSystem/SComponent/c_math.h @@ -18,11 +18,11 @@ float cM_rndF2(float); float cM_rndFX2(float); inline f32 cM_scos(s16 s) { - return JMath::sincosTable_.table[static_cast<u16>(s) >> 3].second; + return JMASCos(s); } inline f32 cM_ssin(s16 s) { - return JMath::sincosTable_.table[static_cast<u16>(s) >> 3].first; + return JMASSin(s); } inline s16 cM_deg2s(f32 val) { |
