* swball cleanup

* daSwc00_c OK

* Revert change in configure - we'll handle rel/dol changes in seperate PR
This commit is contained in:
hatal175
2025-04-18 02:23:05 +03:00
committed by GitHub
parent e65e571498
commit d5b277bbc5
12 changed files with 394 additions and 859 deletions
+10 -2
View File
@@ -3,6 +3,7 @@
#include <dolphin/gx.h>
#include <dolphin/mtx.h>
#include "JSystem/JUtility/JUTAssert.h"
// Perhaps move to a new J3DEnum.h?
enum J3DError {
@@ -134,11 +135,18 @@ struct J3DSys {
// Type 0: Opa Buffer
// Type 1: Xlu Buffer
void setDrawBuffer(J3DDrawBuffer* buffer, int type) { mDrawBuffer[type] = buffer; }
void setDrawBuffer(J3DDrawBuffer* buffer, int type) {
J3D_ASSERT(114, type >= 0 && type < 2, "Error : range over.");
J3D_ASSERT(115, buffer, "Error : null pointer.");
mDrawBuffer[type] = buffer;
}
// Type 0: Opa Buffer
// Type 1: Xlu Buffer
J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; }
J3DDrawBuffer* getDrawBuffer(int type) {
J3D_ASSERT(121, type >= 0 && type < 2, "Error : range over.");
return mDrawBuffer[type];
}
Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; }
J3DShapePacket* getShapePacket() const { return mShapePacket; }
+1 -1
View File
@@ -30,7 +30,7 @@ public:
/* 80CF3D84 */ void PutCrrPos();
/* 80CF406C */ int draw();
/* 80CF41F4 */ int _delete();
/* 80CF4354 */ ~daObjSwBallA_c();
/* 80CF4354 */ virtual ~daObjSwBallA_c() {}
u32 getArg0() { return fopAcM_GetParamBit(this, 0, 8); }
u32 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }
+1 -1
View File
@@ -30,7 +30,7 @@ public:
/* 80CF5388 */ void PutCrrPos();
/* 80CF56A4 */ int draw();
/* 80CF582C */ int _delete();
/* 80CF5940 */ ~daObjSwBallB_c();
/* 80CF5940 */ virtual ~daObjSwBallB_c() {}
s32 getID() { return fopAcM_GetParamBit(this, 0, 8); }
u32 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }
+23 -3
View File
@@ -13,7 +13,15 @@
*/
class daSwc00_c : public fopAc_ac_c {
public:
public:
typedef void (daSwc00_c::*actionFunc)();
enum Action {
ACTION_WAIT,
ACTION_ORDER_EVENT,
ACTION_EVENT,
ACTION_DEAD,
};
/* 805A15FC */ int execute();
/* 805A18E8 */ void event_proc_call();
/* 805A19A4 */ void actionWait();
@@ -21,14 +29,26 @@ public:
/* 805A1A94 */ void actionEvent();
/* 805A1AF0 */ void actionDead();
void setAction(u8 action) { mAction = action; }
/* 0x568 */ cXyz field_0x568;
/* 0x574 */ cXyz field_0x574;
/* 0x580 */ u16 mEventID;
/* 0x580 */ s16 mEventID;
/* 0x582 */ u8 mAction;
/* 0x584 */ u8 field_0x584[4];
/* 0x583 */ u8 field_0x583;
/* 0x584 */ u8 field_0x584;
/* 0x585 */ u8 field_0x585[3];
};
STATIC_ASSERT(sizeof(daSwc00_c) == 0x588);
inline u8 daSwc00_getCondition(daSwc00_c* i_this) {
return i_this->shape_angle.x;
}
inline int daSwc00_getShape(daSwc00_c* i_this) {
return (fopAcM_GetParam(i_this) >> 18) & 3;
}
#endif /* D_A_SWC00_H */
+14 -7
View File
@@ -1,24 +1,31 @@
#include "JSystem/JHostIO/JORReflexible.h"
#include "SSystem/SComponent/c_xyz.h"
class dScnPly_env_otherHIO_c {
class dScnPly_env_otherHIO_c : public JORReflexible {
public:
/* 80259440 */ dScnPly_env_otherHIO_c();
/* 8025AC0C */ virtual ~dScnPly_env_otherHIO_c() {}
void genMessage(JORMContext*);
/* 0x4 */ f32 mShadowDensity;
/* 0x8 */ u8 mLODBias;
/* 0x9 */ u8 field_0x9;
/* 0xA */ u8 mDispTransCylinder;
/* 0x04 */ f32 mShadowDensity;
/* 0x08 */ u8 mLODBias;
/* 0x09 */ u8 field_0x9;
/* 0x0A */ u8 mDispTransCylinder;
#ifdef DEBUG
/* 0x0B */ u8 field_0xb[0x46 - 0xb];
/* 0x46 */ u8 field_0x46;
/* 0x47 */ u8 field_0x47[0x4f - 0x47];
#endif
};
class dScnPly_env_debugHIO_c {
class dScnPly_env_debugHIO_c : public JORReflexible {
public:
/* 80259468 */ dScnPly_env_debugHIO_c();
/* 8025ABC4 */ virtual ~dScnPly_env_debugHIO_c() {}
void genMessage(JORMContext*);
private:
/* 0x04 */ u8 field_0x4;
/* 0x08 */ cXyz mBoxCullMinSize;
/* 0x14 */ cXyz mBoxCullMaxSize;