mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-27 00:45:10 -04:00
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
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef J3DSYS_H
|
||||
#define J3DSYS_H
|
||||
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Perhaps move to a new J3DEnum.h?
|
||||
@@ -9,4 +10,31 @@ enum J3DError {
|
||||
kJ3DError_Alloc = 4,
|
||||
};
|
||||
|
||||
struct _GXTexCacheSize {};
|
||||
|
||||
struct J3DSys {
|
||||
Mtx mMtx;
|
||||
u8 _30[0x11C - 0x30];
|
||||
/* 8030FDE8 */ J3DSys();
|
||||
/* 8030FEC0 */ void loadPosMtxIndx(int, u16) const;
|
||||
/* 8030FEE4 */ void loadNrmMtxIndx(int, u16) const;
|
||||
/* 8030FF0C */ void setTexCacheRegion(_GXTexCacheSize);
|
||||
/* 803100BC */ void drawInit();
|
||||
/* 8031073C */ void reinitGX();
|
||||
/* 8031079C */ void reinitGenMode();
|
||||
/* 803107E8 */ void reinitLighting();
|
||||
/* 80310894 */ void reinitTransform();
|
||||
/* 80310998 */ void reinitTexture();
|
||||
/* 80310A3C */ void reinitTevStages();
|
||||
/* 80310D44 */ void reinitIndStages();
|
||||
/* 80310E3C */ void reinitPixelProc();
|
||||
|
||||
static u8 mCurrentMtx[48];
|
||||
static f32 mCurrentS[3];
|
||||
static f32 mParentS[3];
|
||||
static u8 sTexCoordScaleTable[64 + 4 /* padding */];
|
||||
};
|
||||
|
||||
extern J3DSys j3dSys;
|
||||
|
||||
#endif /* J3DSYS_H */
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#ifndef J3DUCLIPPER_H
|
||||
#define J3DUCLIPPER_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class J3DUClipper {
|
||||
public:
|
||||
J3DUClipper() { init(); }
|
||||
virtual ~J3DUClipper() {}
|
||||
/* 80273778 */ void init();
|
||||
/* 8027378C */ void calcViewFrustum();
|
||||
/* 802738FC */ u32 clip(f32 const (*)[4], Vec, f32) const;
|
||||
/* 80273A44 */ u32 clip(f32 const (*)[4], Vec*, Vec*) const;
|
||||
|
||||
private:
|
||||
Vec _04;
|
||||
Vec _10;
|
||||
Vec _1C;
|
||||
Vec _28;
|
||||
u8 _34[0x4C - 0x34];
|
||||
f32 mFovY;
|
||||
f32 mAspect;
|
||||
f32 mNear;
|
||||
f32 mFar;
|
||||
};
|
||||
|
||||
#endif /* J3DUCLIPPER_H */
|
||||
|
||||
@@ -75,8 +75,9 @@ public:
|
||||
/* vt[22] */ virtual bool state_compare(JKRHeap::TState const&,
|
||||
JKRHeap::TState const&) const; /* override */
|
||||
|
||||
u8 field_0x6c;
|
||||
|
||||
private:
|
||||
u32 field_0x6c;
|
||||
u32 field_0x70;
|
||||
u32 field_0x74;
|
||||
CMemBlock* mHeadFreeList;
|
||||
@@ -85,9 +86,9 @@ private:
|
||||
CMemBlock* mTailUsedList;
|
||||
|
||||
public:
|
||||
static void createRoot(int, bool);
|
||||
static void create(u32, JKRHeap*, bool);
|
||||
static void create(void*, u32, JKRHeap*, bool);
|
||||
static JKRExpHeap* createRoot(int, bool);
|
||||
static JKRExpHeap* create(u32, JKRHeap*, bool);
|
||||
static JKRExpHeap* create(void*, u32, JKRHeap*, bool);
|
||||
};
|
||||
|
||||
#endif /* JKREXPHEAP_H */
|
||||
|
||||
@@ -18,7 +18,6 @@ protected:
|
||||
JKRSolidHeap(void*, u32, JKRHeap*, bool);
|
||||
virtual ~JKRSolidHeap();
|
||||
|
||||
s32 adjustSize(void);
|
||||
void* allocFromHead(u32, int);
|
||||
void* allocFromTail(u32, int);
|
||||
|
||||
@@ -54,6 +53,8 @@ private:
|
||||
/* 0x78 */ Unknown* field_0x78;
|
||||
|
||||
public:
|
||||
s32 adjustSize(void);
|
||||
|
||||
static JKRSolidHeap* create(u32, JKRHeap*, bool);
|
||||
};
|
||||
|
||||
|
||||
@@ -3,4 +3,36 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace std {
|
||||
template <typename A1, typename B1>
|
||||
struct pair {
|
||||
A1 a1;
|
||||
B1 b1;
|
||||
pair() {
|
||||
a1 = A1();
|
||||
b1 = B1();
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
struct TSinCosTable {
|
||||
std::pair<f32, f32> table[0x2000];
|
||||
};
|
||||
|
||||
struct TAtanTable {
|
||||
f32 table[1025];
|
||||
u8 pad[0x1C];
|
||||
};
|
||||
|
||||
struct TAsinAcosTable {
|
||||
f32 table[1025];
|
||||
u8 pad[0x1C];
|
||||
};
|
||||
|
||||
namespace JMath {
|
||||
extern TSinCosTable sincosTable_;
|
||||
extern TAtanTable atanTable_;
|
||||
extern TAsinAcosTable asinAcosTable_;
|
||||
}; // namespace JMath
|
||||
|
||||
#endif /* JMATRIGONOMETRIC_H */
|
||||
|
||||
@@ -3,8 +3,4 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct JMath {
|
||||
static u8 sincosTable_[65536];
|
||||
};
|
||||
|
||||
#endif /* JMATH_H */
|
||||
|
||||
Reference in New Issue
Block a user