mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-06 10:45:22 -04:00
d_a_player_main work
This commit is contained in:
@@ -81,6 +81,7 @@ public:
|
||||
bool checkBBoardFlag() const { return mbHasBillboard == 1; }
|
||||
void entryTexMtxAnimator(J3DAnmTextureSRTKey* anm) { mMaterialTable.entryTexMtxAnimator(anm); }
|
||||
void entryTevRegAnimator(J3DAnmTevRegKey* anm) { mMaterialTable.entryTevRegAnimator(anm); }
|
||||
void entryMatColorAnimator(J3DAnmColor* anm) { mMaterialTable.entryMatColorAnimator(anm); }
|
||||
void setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnm, J3DTexMtxAnm* pDualAnmR) {
|
||||
mMaterialTable.setTexMtxAnimator(pAnm, pTexAnm, pDualAnmR);
|
||||
}
|
||||
@@ -102,7 +103,6 @@ public:
|
||||
}
|
||||
|
||||
// TODO
|
||||
void entryMatColorAnimator(J3DAnmColor*) {}
|
||||
void getBasicMtxCalc() {}
|
||||
void getBinary() {}
|
||||
void getRootNode() {}
|
||||
|
||||
@@ -566,7 +566,7 @@ struct J3DZMode {
|
||||
J3DZMode() { mZModeID = j3dDefaultZModeID; }
|
||||
explicit J3DZMode(const J3DZModeInfo& info) { setZModeInfo(info); }
|
||||
|
||||
u8 getCompareEnaable() const { return j3dZModeTable[mZModeID * 3 + 0]; }
|
||||
u8 getCompareEnable() const { return j3dZModeTable[mZModeID * 3 + 0]; }
|
||||
u8 getFunc() const { return j3dZModeTable[mZModeID * 3 + 1]; }
|
||||
u8 getUpdateEnable() const { return j3dZModeTable[mZModeID * 3 + 2]; }
|
||||
|
||||
@@ -575,8 +575,8 @@ struct J3DZMode {
|
||||
mZModeID = calcZModeID(compareEn, info.mFunc, info.mUpdateEnable);
|
||||
}
|
||||
|
||||
void load() {
|
||||
J3DGDSetZMode(getCompareEnaable(), GXCompare(getFunc()), getUpdateEnable());
|
||||
void load() const {
|
||||
J3DGDSetZMode(getCompareEnable(), GXCompare(getFunc()), getUpdateEnable());
|
||||
}
|
||||
|
||||
void setCompareEnable(u8 i_compare) {
|
||||
|
||||
@@ -225,4 +225,16 @@ inline void* JKRGetTypeResource(u32 tag, const char* name, JKRArchive* arc) {
|
||||
return JKRArchive::getGlbResource(tag, name, arc);
|
||||
}
|
||||
|
||||
inline u32 JKRReadIdxResource(void* buffer, u32 bufferSize, u32 index, JKRArchive* arc) {
|
||||
return arc->readIdxResource(buffer, bufferSize, index);
|
||||
}
|
||||
|
||||
inline u32 JKRReadIdResource(void* buffer, u32 bufferSize, u16 id, JKRArchive* arc) {
|
||||
return arc->readResource(buffer, bufferSize, id);
|
||||
}
|
||||
|
||||
inline u32 JKRReadResource(void* buffer, u32 bufferSize, u16 id, JKRArchive* arc) {
|
||||
return arc->readResource(buffer, bufferSize, id);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
JPABaseParticle() : mLink(this), mCurFrame(0.0f) {}
|
||||
void setOffsetPosition(f32 x, f32 y, f32 z) { mGlobalPosition.set(x, y, z); }
|
||||
void setOffsetPosition(const JGeometry::TVec3<f32>& pos) { mGlobalPosition.set(pos); }
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>& out) const { out.set(mGlobalPosition); }
|
||||
|
||||
bool checkStatus(u32 flag) { return mStatus & flag; }
|
||||
bool isInvisibleParticle() { return checkStatus(JPAPtclStts_Invisible); }
|
||||
@@ -50,7 +51,6 @@ public:
|
||||
void getAge() const {}
|
||||
void getDrawParamCPtr() {}
|
||||
void getDrawParamPPtr() {}
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>&) const {}
|
||||
void getHeight() {}
|
||||
void getLifeTime() const {}
|
||||
void getLocalPosition(JGeometry::TVec3<f32>&) const {}
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "d/d_particle.h"
|
||||
#include "d/d_cc_d.h"
|
||||
|
||||
inline u8 dComIfGs_getSelectEquip(int i_no);
|
||||
inline u8 dComIfGp_getMiniGameType();
|
||||
|
||||
class daPy_mtxFollowEcallBack_c : public dPa_levelEcallBack {
|
||||
public:
|
||||
void execute(JPABaseEmitter*);
|
||||
@@ -433,9 +436,11 @@ public:
|
||||
bool checkArrowShoot() const { return checkResetFlg0(daPyRFlg0_ARROW_SHOOT); }
|
||||
|
||||
bool checkGrabWear() const { return field_0x2b0 < 0.0f; }
|
||||
bool checkNormalSwordEquip() const {
|
||||
return dComIfGs_getSelectEquip(0) == SWORD || dComIfGp_getMiniGameType() == 2;
|
||||
}
|
||||
void setFace(daPy_FACE face) { mFace = face; }
|
||||
|
||||
void checkNormalSwordEquip() const {}
|
||||
void checkMasterSwordEquip() const {}
|
||||
void checkFinalMasterSwordEquip() const {}
|
||||
void checkBowMiniGame() const {}
|
||||
|
||||
@@ -124,10 +124,10 @@ public:
|
||||
|
||||
/* 0x04 */ bool field_0x04;
|
||||
/* 0x05 */ bool field_0x05;
|
||||
/* 0x08 */ u8 field_0x08[0x0C - 0x08];
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0C;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ u8 field_0x14[0x20 - 0x14];
|
||||
/* 0x14 */ cXyz field_0x14;
|
||||
/* 0x20 */ const csXyz* field_0x20;
|
||||
/* 0x24 */ JPABaseEmitter* mpEmitter;
|
||||
}; // Size: 0x28
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
void draw();
|
||||
~daPy_swBlur_c() {}
|
||||
|
||||
/* 0x010 */ ResTIMG* mpBlurTex;
|
||||
/* 0x010 */ ResTIMG* mpTex;
|
||||
/* 0x014 */ int field_0x014;
|
||||
/* 0x018 */ int field_0x018;
|
||||
/* 0x01C */ int mBlurColorType;
|
||||
@@ -1546,7 +1546,7 @@ public:
|
||||
ModeFlg_CAUGHT = 0x10000000,
|
||||
ModeFlg_SUBJECT = 0x20000000,
|
||||
ModeFlg_40000000 = 0x40000000,
|
||||
ModeFlg_BT = 0x80000000,
|
||||
ModeFlg_PARRY = 0x80000000,
|
||||
};
|
||||
|
||||
typedef BOOL (daPy_lk_c::*ProcFunc)();
|
||||
@@ -2315,7 +2315,7 @@ public:
|
||||
BOOL procFoodThrow();
|
||||
BOOL procFoodSet_init();
|
||||
BOOL procFoodSet();
|
||||
void setSwordModel(int);
|
||||
void setSwordModel(BOOL);
|
||||
void setLightSaver();
|
||||
BOOL checkDemoShieldNoDraw();
|
||||
BOOL checkDemoSwordNoDraw(int);
|
||||
@@ -2597,16 +2597,16 @@ public:
|
||||
/* 0x2EC8 */ J3DAnmTextureSRTKey* mpGicer01Btk;
|
||||
/* 0x2ECC */ JKRSolidHeap* m2ECC;
|
||||
/* 0x2ED0 */ void* m_item_bck_buffer;
|
||||
/* 0x2ED4 */ J3DAnmTextureSRTKey* mpHeldItemModelAnimTexEx;
|
||||
/* 0x2ED8 */ J3DAnmTextureSRTKey* mpSwordAnimBTK;
|
||||
/* 0x2EDC */ J3DAnmTevRegKey* mpHeldItemAnimBRK;
|
||||
/* 0x2ED4 */ J3DAnmTextureSRTKey* mpHeldItemBtk;
|
||||
/* 0x2ED8 */ J3DAnmTextureSRTKey* mpSwordBtk;
|
||||
/* 0x2EDC */ J3DAnmTevRegKey* mpHeldItemBrk;
|
||||
/* 0x2EE0 */ J3DModel* mpBottleContentsModel;
|
||||
/* 0x2EE4 */ J3DModel* mpBottleCapModel;
|
||||
/* 0x2EE8 */ J3DModel* mpSwordModel1;
|
||||
/* 0x2EEC */ J3DModel* mpSwordTipStabModel;
|
||||
/* 0x2EF0 */ J3DAnmColor* m2EF0;
|
||||
/* 0x2EF4 */ J3DAnmTextureSRTKey* m2EF4;
|
||||
/* 0x2EF8 */ J3DAnmTevRegKey* m2EF8;
|
||||
/* 0x2EF0 */ J3DAnmColor* mpCutfBpk;
|
||||
/* 0x2EF4 */ J3DAnmTextureSRTKey* mpCutfBtk;
|
||||
/* 0x2EF8 */ J3DAnmTevRegKey* mpCutfBrk2EF8;
|
||||
/* 0x2EFC */ mDoExt_brkAnm m2EFC;
|
||||
/* 0x2F14 */ J3DModel* mpSuimenMunyaModel;
|
||||
/* 0x2F18 */ J3DAnmTextureSRTKey* mpSuimenMunyaBtk;
|
||||
|
||||
+40
-20
@@ -14,6 +14,12 @@ struct actor_method_class {
|
||||
/* 0x14 */ u8 field_0x14[0xC]; // Likely padding
|
||||
};
|
||||
|
||||
// Unclear what this is. Only used by one actor (PLAYER)
|
||||
struct actor_method_class2 {
|
||||
/* 0x00 */ actor_method_class base;
|
||||
/* 0x20 */ u32 field_0x20;
|
||||
};
|
||||
|
||||
enum fopAc_Status_e {
|
||||
// Note: The lowest 5 bits of the status field (& 0x1F) act as an index controlling the map icon type.
|
||||
fopAcStts_SHOWMAP_e = 0x00000020,
|
||||
@@ -123,6 +129,7 @@ enum dEvt_Command_e {
|
||||
enum dEvt_Condition_e {
|
||||
dEvtCnd_NONE_e = 0x0000,
|
||||
dEvtCnd_CANTALK_e = 0x0001,
|
||||
dEvtCnd_UNK2_e = 0x0002,
|
||||
dEvtCnd_CANDOOR_e = 0x0004,
|
||||
dEvtCnd_CANGETITEM_e = 0x0008,
|
||||
dEvtCnd_CANTALKITEM_e = 0x0020,
|
||||
@@ -132,46 +139,59 @@ enum dEvt_Condition_e {
|
||||
// TODO: move to d_event.h
|
||||
class dEvt_info_c {
|
||||
public:
|
||||
typedef s16 (*CallbackFunc)(void*, int);
|
||||
|
||||
dEvt_info_c();
|
||||
virtual ~dEvt_info_c() {}
|
||||
void setEventName(char*);
|
||||
char* getEventName();
|
||||
void beforeProc();
|
||||
|
||||
void setCommand(u16 command) { mCommand = command; }
|
||||
void setMapToolId(u8 id) { mMapToolId = id; }
|
||||
void setEventId(s16 id) { mEventId = id; }
|
||||
void setCondition(u16 condition) { mCondition = condition; }
|
||||
u16 getCondition() { return mCondition; }
|
||||
//void setArchiveName(char* name) { mArchiveName = name; }
|
||||
u8 getMapToolId() { return mMapToolId; }
|
||||
void setToolId(u8 id) { mMapToolId = id; }
|
||||
s16 getEventId() { return mEventId; }
|
||||
s16 getIdx() { return mIndex; }
|
||||
void setIdx(u8 i_idx) { mIndex = i_idx; }
|
||||
//char* getArchiveName() { return mArchiveName; }
|
||||
void setEventId(s16 id) { mEventId = id; }
|
||||
|
||||
u16 getCondition() { return mCondition; }
|
||||
void setCondition(u16 condition) { mCondition = condition; }
|
||||
BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; }
|
||||
void onCondition(u16 cond) { mCondition |= cond; }
|
||||
void offCondition(u16 cond) { mCondition &= ~cond; }
|
||||
s16 runPhotoEventCB(void* ac, int flag) {
|
||||
if (mpPhotoCB == NULL)
|
||||
return -1;
|
||||
return mpPhotoCB(ac, flag);
|
||||
}
|
||||
void beforeProc() { mCondition = dEvtCnd_NONE_e; }
|
||||
|
||||
BOOL checkCommandTalk() { return mCommand == dEvtCmd_INTALK_e; }
|
||||
BOOL checkCommandItem() { return mCommand == dEvtCmd_INGETITEM_e; }
|
||||
BOOL checkCommandDoor() { return mCommand == dEvtCmd_INDOOR_e; }
|
||||
BOOL checkCommandDemoAccrpt() { return mCommand == dEvtCmd_INDEMO_e; }
|
||||
BOOL checkCommandCatch() { return mCommand == dEvtCmd_INCATCH_e; }
|
||||
u16 getCommand() { return mCommand; }
|
||||
void setCommand(u16 command) { mCommand = command; }
|
||||
|
||||
void setXyEventCB(CallbackFunc cb) { mpEventCB = cb; }
|
||||
s16 runXyEventCB(void* ac, int flag) {
|
||||
if (mpEventCB == NULL)
|
||||
return -1;
|
||||
return mpEventCB(ac, flag);
|
||||
}
|
||||
void setXyCheckCB(CallbackFunc cb) { mpCheckCB = cb; }
|
||||
s16 runXyCheckCB(void* ac, int flag) {
|
||||
if (mpCheckCB == NULL)
|
||||
return -1;
|
||||
return mpCheckCB(ac, flag);
|
||||
}
|
||||
void setPhotoEventCB(CallbackFunc cb) { mpPhotoCB = cb; }
|
||||
s16 runPhotoEventCB(void* ac, int flag) {
|
||||
if (mpPhotoCB == NULL)
|
||||
return -1;
|
||||
return mpPhotoCB(ac, flag);
|
||||
}
|
||||
|
||||
public:
|
||||
/* 0x04 */ u16 mCommand;
|
||||
/* 0x06 */ u16 mCondition;
|
||||
/* 0x08 */ s16 mEventId;
|
||||
/* 0x0A */ u8 mMapToolId;
|
||||
/* 0x0B */ s8 mIndex;
|
||||
/* 0x0C */ s16 (*mpEventCB)(void*, int);
|
||||
/* 0x10 */ s16 (*mpCheckCB)(void*, int);
|
||||
/* 0x14 */ s16 (*mpPhotoCB)(void*, int);
|
||||
/* 0x0C */ CallbackFunc mpEventCB;
|
||||
/* 0x10 */ CallbackFunc mpCheckCB;
|
||||
/* 0x14 */ CallbackFunc mpPhotoCB;
|
||||
}; // Size = 0x18
|
||||
|
||||
struct actor_place {
|
||||
|
||||
Reference in New Issue
Block a user