diff options
| author | lepelog <lepelog@users.noreply.github.com> | 2021-06-02 14:13:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 08:13:31 -0400 |
| commit | b728ec1ef544571b02ef5fe05f418b9935c2b071 (patch) | |
| tree | d9eff34f05e9f50033a1361745a98571f7354346 /include/SSystem | |
| parent | e915df66c806bdff65aa243649f7abfe6cc19227 (diff) | |
J3duclip, fop_actor_mng and related stuff (#131)
* J3DUClipper sinit
* sincosTable_ etc
* decompile JMATrigonometric sinit
* f_op_actor_mng
* move f_op_actor_mng and parts of mDo_ext
* J3DSys sinit
* f_op_scene_req
* failed matching attempt for decodeSZS__9JKRDecompFPUcPUcUlUl
* mX -> x
* fix mCull and fopAcM_prm_class members
* fix a few function parameters
* move missing NON_MATCHING
* remove some unneeded data
* turns out that data was not unused
* remove unused asm
* readd asm deleted by accident
Diffstat (limited to 'include/SSystem')
| -rw-r--r-- | include/SSystem/SComponent/c_malloc.h | 7 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_math.h | 9 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_phase.h | 2 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_sxyz.h | 6 |
4 files changed, 16 insertions, 8 deletions
diff --git a/include/SSystem/SComponent/c_malloc.h b/include/SSystem/SComponent/c_malloc.h index c7ca63e5a3..0732d73266 100644 --- a/include/SSystem/SComponent/c_malloc.h +++ b/include/SSystem/SComponent/c_malloc.h @@ -1,14 +1,9 @@ #ifndef C_MALLOC_H #define C_MALLOC_H +#include "JSystem/JKernel/JKRHeap.h" #include "dolphin/types.h" -// TODO: move to correct include -struct JKRHeap { - /* 802CE4D4 */ void* alloc(u32, int); - /* 802CE548 */ void free(void*); -}; - struct cMl { static JKRHeap* Heap; /* 80263220 */ static void init(JKRHeap*); diff --git a/include/SSystem/SComponent/c_math.h b/include/SSystem/SComponent/c_math.h index 25aa15451c..632fa9091e 100644 --- a/include/SSystem/SComponent/c_math.h +++ b/include/SSystem/SComponent/c_math.h @@ -1,6 +1,7 @@ #ifndef C_MATH_H #define C_MATH_H +#include "JSystem/JMath/JMATrigonometric.h" #include "dolphin/types.h" s16 cM_rad2s(float); @@ -16,4 +17,12 @@ float cM_rnd2(void); float cM_rndF2(float); float cM_rndFX2(float); +inline f32 cM_scos(s16 s) { + return JMath::sincosTable_.table[static_cast<u16>(s) >> 3].b1; +} + +inline f32 cM_ssin(s16 s) { + return JMath::sincosTable_.table[static_cast<u16>(s) >> 3].a1; +} + #endif /* C_MATH_H */ diff --git a/include/SSystem/SComponent/c_phase.h b/include/SSystem/SComponent/c_phase.h index 0c7bcc7c9c..5ab4f80537 100644 --- a/include/SSystem/SComponent/c_phase.h +++ b/include/SSystem/SComponent/c_phase.h @@ -7,6 +7,8 @@ typedef int (*cPhs__Handler)(void*); enum cPhs__Step { cPhs_ZERO_e = 0x00, + cPhs_UNK_1 = 0x01, + cPhs_UNK_2 = 0x02, // names from Wind Waker debug strings cPhs_COMPLEATE_e = 0x04, cPhs_ERROR_e = 0x05, diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index 51d8beafde..61843437ef 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -4,9 +4,8 @@ #include "dolphin/types.h" struct SVec { - s16 mX, mY, mZ; + s16 x, y, z; }; - class csXyz : public SVec { public: static const csXyz Zero; @@ -18,6 +17,9 @@ public: /* 8026745C */ void operator+=(csXyz&); /* 80267490 */ csXyz operator-(csXyz&); /* 802674E8 */ csXyz operator*(f32); + s16 GetX() const { return x; } + s16 GetY() const { return y; } + s16 GetZ() const { return z; } }; #endif /* C_SXYZ_H */ |
