mirror of
https://github.com/zeldaret/tp
synced 2026-09-03 02:03:55 -04:00
move / fix bunch of stuff (#133)
* fix some class structures / d_event wip * d_event wip * move gamepad stuff * move m_Do_main * move d_bomb / partial m_Do_reset * format * remove asm * add Z2SoundID enum * move some Z2 classes * fix * move more Z2 stuff * fix fopAc_ac_c more
This commit is contained in:
+72
-12
@@ -3,30 +3,85 @@
|
||||
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "d/kankyo/d_kankyo.h"
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
|
||||
struct JKRSolidHeap;
|
||||
|
||||
class dEvt_info_c {
|
||||
public:
|
||||
dEvt_info_c();
|
||||
virtual ~dEvt_info_c();
|
||||
void setEventName(char*);
|
||||
void getEventName();
|
||||
void beforeProc();
|
||||
void onCondition(u16);
|
||||
void offCondition(u16);
|
||||
bool checkCommandCatch();
|
||||
bool checkCommandDoor();
|
||||
bool checkCommandDemoAccrpt();
|
||||
|
||||
void setCommand(u16 command) { mCommand = command; }
|
||||
void setMapToolId(u8 id) { mMapToolId = id; }
|
||||
void setEventId(s16 id) { mEventId = id; }
|
||||
void setCondition(u16 condition) { mCondition = condition; }
|
||||
void setArchiveName(char* name) { mArchiveName = name; }
|
||||
u8 getMapToolId() { return mMapToolId; }
|
||||
s16 getEventId() { return mEventId; }
|
||||
u8 getIdx() { return mIndex; }
|
||||
char* getArchiveName() { return mArchiveName; }
|
||||
bool chkCondition(u16 condition) { return mCondition == condition; }
|
||||
|
||||
bool checkCommandTalk() { return mCommand == 1; }
|
||||
bool checkCommandItem() { return mCommand == 4; }
|
||||
|
||||
private:
|
||||
/* 0x04 */ u16 mCommand;
|
||||
/* 0x06 */ u16 mCondition;
|
||||
/* 0x08 */ s16 mEventId;
|
||||
/* 0x0A */ u8 mMapToolId;
|
||||
|
||||
public:
|
||||
/* 0x0B */ u8 mIndex;
|
||||
/* 0x0C */ char* mArchiveName;
|
||||
/* 0x10 */ void* field_0x10;
|
||||
/* 0x14 */ void* field_0x14;
|
||||
}; // Size = 0x18
|
||||
|
||||
struct actor_place {
|
||||
cXyz mPosition;
|
||||
csXyz mAngle;
|
||||
u8 mRoomNo;
|
||||
u8 field_0x13;
|
||||
};
|
||||
|
||||
struct actor_attention_types {
|
||||
/* 0x00 */ u32 mDistance1;
|
||||
/* 0x04 */ u32 mDistance2;
|
||||
/* 0x08 */ u32 mDistance3;
|
||||
/* 0x0C */ cXyz mPosition;
|
||||
/* 0x18 */ u32 mFlags;
|
||||
}; // Size = 0x1C
|
||||
|
||||
class dJntCol_c;
|
||||
|
||||
class fopAc_ac_c : public leafdraw_class {
|
||||
public:
|
||||
/* 0x0C0 */ int mAcType;
|
||||
/* 0x0C4 */ create_tag_class mAcTg;
|
||||
/* 0x0D8 */ create_tag_class mDwTg;
|
||||
/* 0x0EC */ profile_method_class* mSubMtd;
|
||||
/* 0x0F0 */ JKRSolidHeap* unk_0x0F0;
|
||||
/* 0x0F4 */ u8 unk_0x0F4[0x496 - 0xF4];
|
||||
/* 0x496 */ u8 unk_0x496;
|
||||
/* 0x497 */ u8 unk_0x497[0x499 - 0x497];
|
||||
/* 0x499 */ s8 unk_0x499;
|
||||
/* 0x49A */ u8 unk_0x49A[0x4A8 - 0x49A];
|
||||
/* 0x0F0 */ JKRSolidHeap* mHeap;
|
||||
/* 0x0F4 */ dEvt_info_c mEvtInfo;
|
||||
/* 0x10C */ dKy_tevstr_c mTevStr;
|
||||
/* 0x494 */ s16 mSetID;
|
||||
/* 0x496 */ u8 mGroup;
|
||||
/* 0x497 */ u8 mCullType;
|
||||
/* 0x498 */ u8 mDemoActorId;
|
||||
/* 0x499 */ s8 mSubtype;
|
||||
/* 0x49C */ u32 mStatus;
|
||||
/* 0x4A0 */ u32 mCondition;
|
||||
/* 0x4A4 */ u32 mParentPcId;
|
||||
/* 0x4A8 */ actor_place mOrig;
|
||||
/* 0x4BC */ actor_place mNext;
|
||||
/* 0x4D0 */ actor_place mCurrent;
|
||||
@@ -44,18 +99,23 @@ public:
|
||||
/* 0x514 */ f32 mRadius;
|
||||
} mSphere;
|
||||
} mCull;
|
||||
/* 0x520 */ u8 unk_0x520[0xC];
|
||||
/* 0x520 */ float mCullSizeFar;
|
||||
/* 0x524 */ void* field_0x524; // possibly J3DModel*
|
||||
/* 0x528 */ dJntCol_c* mJntCol;
|
||||
/* 0x52C */ f32 mSpeedF;
|
||||
/* 0x530 */ f32 mGravity;
|
||||
/* 0x534 */ f32 mMaxFallSpeed;
|
||||
/* 0x538 */ cXyz mEyePos;
|
||||
/* 0x544 */ actor_attention_types mAttentionInfo;
|
||||
/* 0x560 */ u8 field_0x560[0x10]; // not 100% sure on this
|
||||
|
||||
/* 80018B64 */ fopAc_ac_c();
|
||||
/* 80018C8C */ ~fopAc_ac_c();
|
||||
fopAc_ac_c();
|
||||
~fopAc_ac_c();
|
||||
|
||||
static u8 stopStatus[4];
|
||||
static u32 stopStatus;
|
||||
|
||||
const cXyz& getPosition() const { return mCurrent.mPosition; }
|
||||
const csXyz& getAngle() const { return mCurrent.mAngle; }
|
||||
}; // Size: unknown
|
||||
}; // Size: 0x570?
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,6 +76,22 @@ inline s16 fopAcM_GetName(fopAc_ac_c* pActor) {
|
||||
return fpcM_GetName(pActor);
|
||||
}
|
||||
|
||||
inline u32 fopAcM_checkStatus(fopAc_ac_c* pActor, u32 status) {
|
||||
return pActor->mStatus & status;
|
||||
}
|
||||
|
||||
inline u32 fopAcM_checkCarryNow(fopAc_ac_c* pActor) {
|
||||
return pActor->mStatus & 0x2000;
|
||||
}
|
||||
|
||||
inline u32 fopAcM_checkHookCarryNow(fopAc_ac_c* pActor) {
|
||||
return fopAcM_checkStatus(pActor, 0x100000);
|
||||
}
|
||||
|
||||
inline u32 fopAcM_GetParam(const void* pActor) {
|
||||
return fpcM_GetParam(pActor);
|
||||
}
|
||||
|
||||
void* fopAcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, void* pData);
|
||||
void fopAcM_setStageLayer(void*);
|
||||
int fopAcM_setRoomLayer(void*, int);
|
||||
|
||||
Reference in New Issue
Block a user