Skip to content
Merged

Daswc #2398

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ def MatchingFor(*versions):
ActorRel(MatchingFor("GZ2E01"), "d_a_scene_exit2"),
ActorRel(MatchingFor("GZ2E01"), "d_a_shop_item"),
ActorRel(MatchingFor("GZ2E01"), "d_a_sq"),
ActorRel(NonMatching, "d_a_swc00"),
ActorRel(MatchingFor("GZ2E01"), "d_a_swc00"),
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_CstaSw"),
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_ajnot"),
ActorRel(NonMatching, "d_a_tag_attack_item"),
Expand Down
12 changes: 10 additions & 2 deletions include/JSystem/J3DGraphBase/J3DSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_obj_swBallA.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class daObjSwBallA_c : public fopAc_ac_c , public dEvLib_callback_c {
/* 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); }
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_obj_swBallB.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class daObjSwBallB_c : public fopAc_ac_c, public dEvLib_callback_c {
/* 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); }
Expand Down
26 changes: 23 additions & 3 deletions include/d/actor/d_a_swc00.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,42 @@
*/
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();
/* 805A1A28 */ void actionOrderEvent();
/* 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 */
21 changes: 14 additions & 7 deletions include/d/d_s_play_env.h
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/d/actor/d_a_e_fm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ static void e_fm_damage_run(e_fm_class* i_this) {
}

if (i_this->speedF > 1.0f && move_speed < 1.0f) {
dComIfGp_getVibration().StartShock(YREG_S(3) + VIBMODE_S_POWER7, 0xF, cXyz(0.0f, 1.0f, 0.0f));
dComIfGp_getVibration().StartShock(YREG_S(3) + (int)VIBMODE_S_POWER7, 0xF, cXyz(0.0f, 1.0f, 0.0f));
dComIfGp_particle_set(0x8150, &i_this->home.pos, NULL, NULL);
mDoAud_seStart(Z2SE_OBJ_FM_DIRTFALL, NULL, 0, 0);
i_this->mSound.startCreatureSound(Z2SE_EN_FM_FOOTNOTE, 0, -1);
Expand Down
Loading