summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JMath/JMath.h4
-rw-r--r--include/SSystem/SComponent/c_lib.h52
-rw-r--r--include/msl_c/math.h1
3 files changed, 54 insertions, 3 deletions
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index 802d24f2aa..228c129d1c 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -3,4 +3,8 @@
#include "dolphin/types.h"
+struct JMath {
+ static u8 sincosTable_[65536];
+};
+
#endif /* JMATH_H */
diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h
index cb8abeb0c9..e8cafc04be 100644
--- a/include/SSystem/SComponent/c_lib.h
+++ b/include/SSystem/SComponent/c_lib.h
@@ -1,6 +1,52 @@
-#ifndef C_LIB_H
-#define C_LIB_H
+#ifndef C_LIB_H_
+#define C_LIB_H_
+#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
-#endif /* C_LIB_H */
+void cLib_memCpy(void* dst, const void* src, unsigned long size);
+void cLib_memSet(void* ptr, int value, unsigned long size);
+
+float cLib_addCalc(float*, float, float, float, float);
+void cLib_addCalc2(float*, float, float, float);
+void cLib_addCalc0(float*, float, float);
+float cLib_addCalcPos(cXyz*, const cXyz&, float, float, float);
+float cLib_addCalcPosXZ(cXyz*, const cXyz&, float, float, float);
+void cLib_addCalcPos2(cXyz*, const cXyz&, float, float);
+void cLib_addCalcPosXZ2(cXyz*, const cXyz&, float, float);
+short cLib_addCalcAngleS(short*, short, short, short, short);
+void cLib_addCalcAngleS2(short*, short, short, short);
+
+int cLib_chaseUC(unsigned char*, unsigned char, unsigned char);
+int cLib_chaseS(short*, short, short);
+int cLib_chaseF(float*, float, float);
+int cLib_chasePos(cXyz*, const cXyz&, float);
+int cLib_chasePosXZ(cXyz*, const cXyz&, float);
+int cLib_chaseAngleS(short*, short, short);
+
+s16 cLib_targetAngleY(const Vec* lhs, const Vec* rhs);
+s16 cLib_targetAngleY(const Vec& lhs, const Vec& rhs);
+short cLib_targetAngleX(const cXyz*, const cXyz*);
+
+void cLib_offsetPos(cXyz*, const cXyz*, short, const cXyz*);
+s32 cLib_distanceAngleS(s16 x, s16 y);
+
+inline void cLib_offBit(u8& pVar, u8 pBit) {
+ pVar &= ~pBit;
+}
+inline void cLib_onBit(u8& pVar, u8 pBit) {
+ pVar |= pBit;
+}
+inline u8 cLib_checkBit(u8& pVar, u8 pBit) {
+ return pVar & pBit;
+}
+
+void MtxInit(void);
+void MtxTrans(float, float, float, unsigned char);
+void MtxScale(float, float, float, unsigned char);
+void MtxPosition(cXyz*, cXyz*);
+void MtxPush(void);
+Mtx* MtxPull(void);
+
+
+#endif \ No newline at end of file
diff --git a/include/msl_c/math.h b/include/msl_c/math.h
index 2349c35840..998f1698c5 100644
--- a/include/msl_c/math.h
+++ b/include/msl_c/math.h
@@ -4,6 +4,7 @@
#include "dolphin/types.h"
extern "C" {
+s32 abs(s32);
f64 acos(f64);
f32 acosf(f32);
f64 asin(f64);