Work on daTag_KMsg_c (#2171)

This commit is contained in:
hatal175
2024-06-29 14:27:21 +03:00
committed by GitHub
parent 2f689ced90
commit 51161a39fc
11 changed files with 336 additions and 173 deletions
@@ -33,12 +33,15 @@ public:
cXyz* GetCrossP() { return &mLin.GetEndP(); }
cM3dGLin* GetLinP() { return &mLin; }
bool ChkBackFlag() const { return mBackFlag; }
void onBackFlag() { mBackFlag = true; }
bool ChkFrontFlag() const { return mFrontFlag; }
void onFrontFlag() { mFrontFlag = true; }
bool GetPreWallChk() const { return mPreWallChk; }
bool GetPreGroundChk() const { return mPreGroundChk; }
bool GetPreRoofChk() const { return mPreRoofChk; }
cXyz* GetStartP() { return &mLin.GetStartP(); }
void ClrSttsRoofOff() { field_0x4c &= ~0x20000000; }
void ClrSttsWallOff() { field_0x4c &= ~0x40000000; }
};
#endif /* C_BG_S_LIN_CHK_H */
+2
View File
@@ -421,6 +421,8 @@ STATIC_ASSERT(sizeof(daNpcT_c) == 0xE40);
BOOL daNpcT_chkEvtBit(u32 i_idx);
BOOL daNpcT_chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3, int param_4);
u8 daNpcT_getDistTableIdx(int param_0, int param_1);
BOOL daNpcT_chkDoBtnIsSpeak(fopAc_ac_c* i_ActorP);
struct daBaseNpc_matAnm_c {
/* 8014D884 */ void calc(J3DMaterial*) const;
@@ -1,15 +1,41 @@
#ifndef D_A_TAG_KMSG_H
#define D_A_TAG_KMSG_H
#include "dolphin/types.h"
#include "f_op/f_op_actor.h"
#include "f_op/f_op_actor_mng.h"
#include "d/msg/d_msg_flow.h"
#include "d/com/d_com_inf_game.h"
struct daTag_KMsg_c : public fopAc_ac_c {
public:
/* 8048DE78 */ void create();
/* 8048DFDC */ void Delete();
/* 8048E010 */ void Execute();
/* 8048E8B8 */ bool Draw();
/* 8048E8C0 */ void isDelete();
/* 8048EA30 */ ~daTag_KMsg_c();
enum KMsg_Type {
KMSG_TYPE_0,
KMSG_TYPE_1,
KMSG_TYPE_2,
KMSG_TYPE_3,
KMSG_TYPE_4,
KMSG_TYPE_5,
};
/* 0x568 */ request_of_phase_process_class mPhase;
/* 0x570 */ dMsgFlow_c mMsgFlow;
/* 0x5BC */ u32 mFlowNodeNo;
/* 0x5C0 */ s16 mEventIdx;
/* 0x5C2 */ u8 field_0x5c2;
/* 0x5C3 */ u8 field_0x5c3;
/* 0x5C4 */ bool field_0x5c4;
/* 8048DE78 */ int create();
/* 8048DFDC */ int Delete();
/* 8048E010 */ int Execute();
/* 8048E8B8 */ int Draw();
/* 8048E8C0 */ int isDelete();
/* 8048EA30 */ virtual ~daTag_KMsg_c() {
if (getType() == KMSG_TYPE_3) {
dComIfG_resDelete(&mPhase, "Lv6Gate");
}
}
void stabMasterSword() { field_0x5c2 = 1; }
@@ -26,8 +52,53 @@ public:
return type;
}
/* 0x568 */ u8 field_0x568[0x5C2 - 0x568];
/* 0x5C2 */ u8 field_0x5c2;
u32 getFlowNodeNo() {
u16 rv = home.angle.z;
if (rv == 0xffff) {
return -1;
}
return rv;
}
u8 getBitSW() {
return home.angle.x;
}
u32 getTalkAngle() {
u32 talkAngle = (fopAcM_GetParam(this) & 0xe0) >> 5;
if (talkAngle == 7) {
return 0;
} else {
return talkAngle > 6 ? 6 : talkAngle;
}
}
u32 getTalkDis() {
u32 talkDis = fopAcM_GetParam(this) & 0x1f;
if (talkDis == 0x1f) {
return 0;
} else {
return talkDis > 0x13 ? 0x13 : talkDis;
}
}
f32 getAttnPosOffset() {
u32 attnPosOffset = (fopAcM_GetParam(this) & 0xff0000) >> 0x10;
if (attnPosOffset == 0xff) {
return 1000000000.0f;
} else {
return attnPosOffset;
}
}
u32 getChkType() {
return home.angle.x & 0x8000;
}
f32 getEyePosOffset() {
u32 eyeOffset = (fopAcM_GetParam(this) & 0xff00) >> 8;
return (eyeOffset == 0xff) ? 0 : eyeOffset;
}
};
#endif /* D_A_TAG_KMSG_H */