mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-07 02:05:35 -04:00
use more inlines and enums
This commit is contained in:
@@ -32,6 +32,10 @@ public:
|
||||
int execute();
|
||||
~dMsgCtrl_c() {}
|
||||
|
||||
int getSelectNum() { return mpMsg->mSelectNum; }
|
||||
void setMsgStatus(u16 status) { mpMsg->mStatus = status; }
|
||||
|
||||
public:
|
||||
/* 0x00 */ u16 field_0x0;
|
||||
/* 0x04 */ u32 mMsgID;
|
||||
/* 0x08 */ msg_class* mpMsg;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/d_particle.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
class msg_class;
|
||||
@@ -12,10 +13,27 @@ class msg_class;
|
||||
namespace daObjMknjD {
|
||||
class Act_c : public dBgS_MoveBgActor {
|
||||
public:
|
||||
void anmAtr(unsigned short) {}
|
||||
void getMsg() {}
|
||||
void prm_get_Type() const {}
|
||||
void prm_get_swSave() const {}
|
||||
enum Prm_e {
|
||||
PRM_SWITCH_W = 0x08,
|
||||
PRM_SWITCH_S = 0x00,
|
||||
|
||||
PRM_TYPE_W = 0x01,
|
||||
PRM_TYPE_S = 0x10,
|
||||
};
|
||||
|
||||
int prm_get_swSave() const { return daObj::PrmAbstract<Prm_e>(this, PRM_SWITCH_W, PRM_SWITCH_S); }
|
||||
u8 prm_get_Type() const { return daObj::PrmAbstract<Prm_e>(this, PRM_TYPE_W, PRM_TYPE_S); }
|
||||
|
||||
void anmAtr(u16) {}
|
||||
u32 getMsg() {
|
||||
if (m0500 == 0) {
|
||||
dComIfGp_setMelodyNum(mTactMode);
|
||||
return 0x05B3;
|
||||
}
|
||||
else {
|
||||
return 0x1901;
|
||||
}
|
||||
}
|
||||
|
||||
s32 Mthd_Create();
|
||||
s32 Mthd_Delete();
|
||||
@@ -41,64 +59,39 @@ namespace daObjMknjD {
|
||||
int Draw();
|
||||
|
||||
static const char M_arcname[];
|
||||
//static Mtx M_tmp_mtx;
|
||||
static Mtx M_tmp_mtx;
|
||||
|
||||
/* 0x02C8 */ cXyz mLeftHalfPos;
|
||||
/* 0x02D4 */ cXyz mRightHalfPos;
|
||||
|
||||
/* 0x02E0 */ cXyz mShardPositions[0x14];
|
||||
/* 0x03D0 */ float mShardHeights[0x14];
|
||||
|
||||
/* 0x03D0 */ f32 mShardHeights[0x14];
|
||||
/* 0x0420 */ request_of_phase_process_class mPhs;
|
||||
|
||||
/* 0x0428 */ J3DModel* mMainMdl;
|
||||
/* 0x042C */ J3DModel* mBreakMdl;
|
||||
|
||||
/* 0x0430 */ u16 m0430;
|
||||
/* 0x0432 */ u16 m0432;
|
||||
/* 0x0434 */ u16 m0434;
|
||||
/* 0x0438 */ s32 mBreakTimer;
|
||||
|
||||
/* 0x043C */ u8 mMainMdlAlpha;
|
||||
/* 0x043D */ bool m043D;
|
||||
/* 0x043E */ u8 m043E;
|
||||
/* 0x043F */ u8 m043F;
|
||||
|
||||
/* 0x0440 */ JPABaseEmitter* mEmitters[4];
|
||||
/* 0x0450 */ dPa_smokeEcallBack mSmokeCBs[4];
|
||||
|
||||
/* 0x04D0 */ cXyz mBrokenPos;
|
||||
|
||||
/* 0x04DC */ s16 mCheckEventIdx;
|
||||
/* 0x04DE */ s16 mDemoEventIdx;
|
||||
/* 0x04E0 */ s16 mErrorEventIdx;
|
||||
/* 0x04E2 */ s16 mLessonEventIdx;
|
||||
|
||||
/* 0x04E4 */ s8 mActionIdx;
|
||||
/* 0x04E5 */ u8 mTactMode;
|
||||
/* 0x04E6 */ u8 mGiveItemNo;
|
||||
|
||||
/* 0x04E8 */ cXyz mGoalPos;
|
||||
|
||||
/* 0x04F4 */ u32 mMsgNo;
|
||||
/* 0x04F8 */ u32 mMsgPID;
|
||||
/* 0x04FC */ msg_class* mMsgPtr;
|
||||
|
||||
/* 0x0500 */ s32 m0500;
|
||||
/* 0x0504 */ bool m0504;
|
||||
|
||||
enum Prm_e {
|
||||
PRM_SWITCH_W = 0x08,
|
||||
PRM_SWITCH_S = 0x00,
|
||||
|
||||
PRM_TYPE_W = 0x01,
|
||||
PRM_TYPE_S = 0x10,
|
||||
};
|
||||
|
||||
int prm_get_swSave() { return daObj::PrmAbstract<Prm_e>(this, PRM_SWITCH_W, PRM_SWITCH_S); }
|
||||
u8 prm_get_Type() { return daObj::PrmAbstract<Prm_e>(this, PRM_TYPE_W, PRM_TYPE_S); }
|
||||
|
||||
static Mtx M_tmp_mtx;
|
||||
};
|
||||
|
||||
const char Act_c::M_arcname[] = "MknjD";
|
||||
|
||||
+21
-10
@@ -459,7 +459,7 @@ public:
|
||||
|
||||
void setItemBeastNumCount(int i_idx, s16 num) { mItemBeastNumCounts[i_idx] += num; }
|
||||
|
||||
u8 checkMesgCancelButton() { return field_0x4949; }
|
||||
u8 checkMesgCancelButton() { return mMesgCancelButton; }
|
||||
|
||||
void setPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] |= flag; }
|
||||
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[param_0][i] &= ~flag; }
|
||||
@@ -536,14 +536,17 @@ public:
|
||||
ItemTableList* getItemTable() { return mpItemTable; }
|
||||
void setFmapData(void * pData) { mpFmapData = pData; }
|
||||
|
||||
inline void stopFwaterTimer() { mFwaterTimer = 0; }
|
||||
inline u8 checkFwaterTimer() { return mFwaterTimer; }
|
||||
void stopFwaterTimer() { mFwaterTimer = 0; }
|
||||
u8 checkFwaterTimer() { return mFwaterTimer; }
|
||||
|
||||
inline u8 getMiniGameType() { return mMiniGameType; }
|
||||
u8 getMiniGameType() { return mMiniGameType; }
|
||||
|
||||
inline void show2dOn() { m2dShow = true; }
|
||||
inline void show2dOff() { m2dShow = false; }
|
||||
inline bool show2dCheck() { return m2dShow; }
|
||||
void show2dOn() { m2dShow = true; }
|
||||
void show2dOff() { m2dShow = false; }
|
||||
bool show2dCheck() { return m2dShow; }
|
||||
|
||||
u8 getMelodyNum() { return mMelodyNum; }
|
||||
void setMelodyNum(u8 melody) { mMelodyNum = melody; }
|
||||
|
||||
/* 0x0000 */ dBgS mBgS;
|
||||
/* 0x1404 */ dCcS mCcS;
|
||||
@@ -666,9 +669,9 @@ public:
|
||||
/* 0x4946 */ u8 field_0x4946;
|
||||
/* 0x4947 */ u8 field_0x4947;
|
||||
/* 0x4948 */ u8 field_0x4948;
|
||||
/* 0x4949 */ u8 field_0x4949;
|
||||
/* 0x4949 */ u8 mMesgCancelButton;
|
||||
/* 0x494A */ u8 field_0x494a[6];
|
||||
/* 0x4950 */ u8 mTactMode;
|
||||
/* 0x4950 */ u8 mMelodyNum;
|
||||
/* 0x4951 */ u8 field_0x4951;
|
||||
/* 0x4952 */ u8 field_0x4952;
|
||||
/* 0x4953 */ u8 field_0x4953;
|
||||
@@ -2315,6 +2318,14 @@ inline bool dComIfGp_2dShowCheck() {
|
||||
return g_dComIfG_gameInfo.play.show2dCheck();
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_setMelodyNum() {
|
||||
return g_dComIfG_gameInfo.play.getMelodyNum();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setMelodyNum(u8 melody) {
|
||||
g_dComIfG_gameInfo.play.setMelodyNum(melody);
|
||||
}
|
||||
|
||||
/**
|
||||
* === EVENT ===
|
||||
*/
|
||||
@@ -2355,7 +2366,7 @@ inline u8 dComIfGp_event_getPreItemNo() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().getPreItemNo();
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_setItemPartnerId(u32 id) {
|
||||
inline void dComIfGp_event_setItemPartnerId(unsigned int id) {
|
||||
g_dComIfG_gameInfo.play.getEvent().setPtI_Id(id);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
u8 getTalkXYBtn() { return mTalkButton; }
|
||||
bool chkTalkXY() { return mTalkButton == 1 || mTalkButton == 2 || mTalkButton == 3; }
|
||||
void setPtI_Id(u32 id) { mPtItem = id; }
|
||||
void setPtI_Id(unsigned int id) { mPtItem = id; }
|
||||
void setPtI(void* actor) { mPtItem = getPId(actor); }
|
||||
void setGtItm(u8 itemNo) { mGetItemNo = itemNo; }
|
||||
u8 getGtItm() { return mGetItemNo; }
|
||||
|
||||
+1
-15
@@ -208,20 +208,6 @@ public:
|
||||
/* 0x20 */ s16 field_0x20;
|
||||
};
|
||||
|
||||
enum dNpc_MessageStatus_e {
|
||||
dNpcMsgStts_MSG_PREPARING_e = 0x01,
|
||||
dNpcMsgStts_BOX_OPENING_e = 0x02,
|
||||
dNpcMsgStts_MSG_TYPING_e = 0x06,
|
||||
dNpcMsgStts_MSG_DISPLAYED_e = 0x0E,
|
||||
|
||||
dNpcMsgStts_MSG_CONTINUES_e = 0x0F,
|
||||
dNpcMsgStts_MSG_ENDS_e = 0x10,
|
||||
|
||||
dNpcMsgStts_BOX_CLOSING_e = 0x11,
|
||||
dNpcMsgStts_BOX_CLOSED_e = 0x12,
|
||||
dNpcMsgStts_MSG_DESTROYED_e = 0x13,
|
||||
};
|
||||
|
||||
class fopNpc_npc_c : public fopAc_ac_c {
|
||||
public:
|
||||
fopNpc_npc_c() {
|
||||
@@ -241,7 +227,7 @@ public:
|
||||
/* 0x6B0 */ msg_class* mpCurrMsg;
|
||||
/* 0x6B4 */ u8 pad_0x6B4[0x6C0 - 0x6B4];
|
||||
|
||||
virtual u16 next_msgStatus(u32* msgId) { return dNpcMsgStts_MSG_ENDS_e; }
|
||||
virtual u16 next_msgStatus(u32* msgId) { return fopMsgStts_MSG_ENDS_e; }
|
||||
virtual u32 getMsg() { return 0; }
|
||||
virtual void anmAtr(u16) {}
|
||||
|
||||
|
||||
+15
-2
@@ -6,6 +6,19 @@
|
||||
|
||||
class fopAc_ac_c;
|
||||
|
||||
enum fopMsg_MessageStatus_e {
|
||||
fopMsgStts_MSG_PREPARING_e = 0x01,
|
||||
fopMsgStts_BOX_OPENING_e = 0x02,
|
||||
fopMsgStts_MSG_TYPING_e = 0x06,
|
||||
fopMsgStts_MSG_DISPLAYED_e = 0x0E,
|
||||
fopMsgStts_MSG_CONTINUES_e = 0x0F,
|
||||
fopMsgStts_MSG_ENDS_e = 0x10,
|
||||
fopMsgStts_BOX_CLOSING_e = 0x11,
|
||||
fopMsgStts_BOX_CLOSED_e = 0x12,
|
||||
fopMsgStts_MSG_DESTROYED_e = 0x13,
|
||||
fopMsgStts_UNK15_e = 0x15,
|
||||
};
|
||||
|
||||
struct msg_method_class {
|
||||
/* 0x00 */ leafdraw_method_class base;
|
||||
};
|
||||
@@ -20,8 +33,8 @@ public:
|
||||
/* 0xEC */ u32 mMsgID;
|
||||
/* 0xF0 */ u32 field_0xf0;
|
||||
/* 0xF4 */ u32 field_0xf4;
|
||||
/* 0xF8 */ u16 mMode;
|
||||
/* 0xFA */ u8 mSelectedChoiceIdx;
|
||||
/* 0xF8 */ u16 mStatus;
|
||||
/* 0xFA */ u8 mSelectNum; // The index of the choice the player selected.
|
||||
}; // Size: 0xFC
|
||||
|
||||
extern leafdraw_method_class g_fopMsg_Method;
|
||||
|
||||
Reference in New Issue
Block a user