summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2024-04-15 17:39:47 -0700
committerGitHub <noreply@github.com>2024-04-15 18:39:47 -0600
commita0a5d6b00a6fb0e0b88c5176b3ae307d194acff2 (patch)
treec7032a9f2ca3db0b8db2f4fcc2f8be6b9fe1c78f /include
parentae4ef8e69d9d0029010b432a7e3040be55fd5351 (diff)
d_a_tag_event / d_a_tag_chkpoint done (#2133)
* cleanup evtarea * d_a_tag_chkpoint done * d_a_tag_event done * remove asm
Diffstat (limited to 'include')
-rw-r--r--include/rel/d/a/d_a_horse/d_a_horse.h5
-rw-r--r--include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h22
-rw-r--r--include/rel/d/a/tag/d_a_tag_event/d_a_tag_event.h49
-rw-r--r--include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h29
4 files changed, 83 insertions, 22 deletions
diff --git a/include/rel/d/a/d_a_horse/d_a_horse.h b/include/rel/d/a/d_a_horse/d_a_horse.h
index 669751530d..318b35ef47 100644
--- a/include/rel/d/a/d_a_horse/d_a_horse.h
+++ b/include/rel/d/a/d_a_horse/d_a_horse.h
@@ -58,7 +58,7 @@ public:
/* 0x00000080 */ NO_DRAW_WAIT = 0x80,
/* 0x00010000 */ PLAYER_BACK_RIDE_LASH = 0x10000,
/* 0x20000000 */ TURN_CANCEL_KEEP = 0x20000000,
- /* 0x80000000 */ RODEO_MODE = 0x80000000
+ /* 0x80000000 */ FLG0_RODEO_MODE = 0x80000000
};
fopAc_ac_c* getZeldaActor();
@@ -183,7 +183,7 @@ public:
bool checkTurnStandCamera() const { return checkResetStateFlg0(TURN_STAND_CAMERA); }
bool checkTurnStand() const { return checkResetStateFlg0(TURN_STAND); }
- bool checkRodeoMode() const { return checkStateFlg0(RODEO_MODE); }
+ bool checkRodeoMode() const { return checkStateFlg0(FLG0_RODEO_MODE); }
bool checkCutTurnCancel() const { return checkEndResetStateFlg0(CUT_TURN_CANCEL); }
bool checkTurnCancelKeep() const { return checkStateFlg0(TURN_CANCEL_KEEP); }
bool checkTurn() const { return field_0x16b4 == 3 && field_0x1720 == 0; }
@@ -205,6 +205,7 @@ public:
void onMoveAccept() { onEndResetStateFlg0(MOVE_ACCEPT); }
void onPlayerLash() { onEndResetStateFlg0(ERFLG0_UNK_18); }
void offPlayerBackRideLash() { offStateFlg0(PLAYER_BACK_RIDE_LASH); }
+ void onRodeoMode() { onStateFlg0(FLG0_RODEO_MODE); }
static u8 const m_footJointTable[8];
static f32 const m_callLimitDistance2;
diff --git a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h
index f8aca71ef4..ac293af7b4 100644
--- a/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h
+++ b/include/rel/d/a/tag/d_a_tag_chkpoint/d_a_tag_chkpoint.h
@@ -6,14 +6,14 @@
class daTag_Chk_c : public fopAc_ac_c {
public:
- /* 8048A6F8 */ s32 execute();
+ /* 8048A6F8 */ int execute();
u16 getAreaType() { return home.angle.z & 0x100; }
u16 getHeight() { return fopAcM_GetParam(this) & 0xff; }
u8 getSwBit() { return fopAcM_GetParam(this) >> 8; }
u8 getSwBit2() { return fopAcM_GetParam(this) >> 16; }
- s32 create() {
+ int create() {
fopAcM_SetupActor(this, daTag_Chk_c);
if (getAreaType() == 0) {
@@ -21,30 +21,32 @@ public:
scale.y *= 100.0f;
scale.z *= 50.0f;
- mPos1.set(current.pos.x - scale.x, current.pos.y, current.pos.z - scale.z);
- mPos2.set(current.pos.x + scale.x, current.pos.y + scale.y, current.pos.z + scale.z);
+ mVtxA.set(current.pos.x - scale.x, current.pos.y, current.pos.z - scale.z);
+ mVtxB.set(current.pos.x + scale.x, current.pos.y + scale.y, current.pos.z + scale.z);
} else {
scale.x *= 100.0f;
scale.y *= 100.0f;
scale.z *= 0.0f;
- mPos1.set(0.0f, current.pos.y, 0.0f);
- mPos2.set(0.0f, current.pos.y + scale.y, 0.0f);
+ mVtxA.set(0.0f, current.pos.y, 0.0f);
+ mVtxB.set(0.0f, current.pos.y + scale.y, 0.0f);
}
attention_info.position = current.pos;
- u16 l_height = getHeight();
- l_height != 0xff ? attention_info.position.y += l_height * 10.0f : attention_info.position.y += scale.y * 0.5f;
+ u16 height = getHeight();
+ height != 0xff ? attention_info.position.y += height * 10.0f : attention_info.position.y += scale.y * 0.5f;
eyePos = attention_info.position;
return cPhs_COMPLEATE_e;
}
+
private:
/* 0x568 */ u8 field_0x568[8];
- /* 0x570 */ cXyz mPos1;
- /* 0x57C */ cXyz mPos2;
+ /* 0x570 */ cXyz mVtxA;
+ /* 0x57C */ cXyz mVtxB;
};
+
STATIC_ASSERT(sizeof(daTag_Chk_c) == 0x588);
#endif /* D_A_TAG_CHKPOINT_H */
diff --git a/include/rel/d/a/tag/d_a_tag_event/d_a_tag_event.h b/include/rel/d/a/tag/d_a_tag_event/d_a_tag_event.h
index da8d716057..4101684a62 100644
--- a/include/rel/d/a/tag/d_a_tag_event/d_a_tag_event.h
+++ b/include/rel/d/a/tag/d_a_tag_event/d_a_tag_event.h
@@ -1,6 +1,53 @@
#ifndef D_A_TAG_EVENT_H
#define D_A_TAG_EVENT_H
-#include "dolphin/types.h"
+#include "f_op/f_op_actor_mng.h"
+
+class daTag_Event_c : public fopAc_ac_c {
+public:
+ enum Action_e {
+ ACTION_WAIT,
+ ACTION_ARRIVAL,
+ ACTION_HUNT,
+ ACTION_HUNT2,
+ ACTION_READY,
+ ACTION_NEXT,
+ ACTION_EVENT,
+ };
+
+ /* 8048AD68 */ u8 getEventNo();
+ /* 8048AD74 */ u8 getSwbit();
+ /* 8048AD80 */ u8 getSwbit2();
+ /* 8048AD8C */ u8 getType();
+ /* 8048AD98 */ u16 getInvalidEventFlag();
+ /* 8048ADA4 */ u16 getAreaType();
+ /* 8048ADB0 */ u16 getValidEventFlag();
+ /* 8048ADBC */ BOOL horseRodeo();
+ /* 8048ADEC */ BOOL arrivalTerms();
+ /* 8048AEEC */ void demoInitProc();
+ /* 8048AEF8 */ void demoEndProc();
+ /* 8048AEFC */ void demoProc();
+ /* 8048AF00 */ int create();
+ /* 8048B0E4 */ int actionNext();
+ /* 8048B1B0 */ int actionEvent();
+ /* 8048B268 */ int actionReady();
+ /* 8048B378 */ BOOL checkArea();
+ /* 8048B514 */ int actionHunt();
+ /* 8048B5C8 */ int actionArrival();
+ /* 8048B5F4 */ int actionWait();
+ /* 8048B5FC */ int actionHunt2();
+ /* 8048B6D4 */ int execute();
+ /* 8048B784 */ int draw();
+
+ void setActio(u8 i_action) { mAction = i_action; }
+
+ /* 0x568 */ s16 mEventIdx;
+ /* 0x56A */ s16 mMapEventIdx;
+ /* 0x56C */ s16 mMapToolId;
+ /* 0x56E */ s16 field_0x56e;
+ /* 0x570 */ s16 mHunt2Timer;
+ /* 0x572 */ u8 mAction;
+ /* 0x573 */ u8 field_0x573;
+};
#endif /* D_A_TAG_EVENT_H */
diff --git a/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h b/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h
index 989bdb2fa0..4f6e14b3f3 100644
--- a/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h
+++ b/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h
@@ -6,32 +6,43 @@
class daTag_EvtArea_c : public fopAc_ac_c {
public:
/* 8048C4F8 */ cPhs__Step create();
- /* 8048C728 */ bool Delete();
- /* 8048C730 */ bool Execute();
- /* 8048C894 */ bool Draw();
+ /* 8048C728 */ BOOL Delete();
+ /* 8048C730 */ BOOL Execute();
+ /* 8048C894 */ BOOL Draw();
/* 8048C89C */ BOOL isDelete();
/* 8048C94C */ BOOL chkPointInArea(cXyz, cXyz);
+
/* 8048CD08 */ BOOL chkPointInArea(cXyz param_0) {
cXyz local_28;
local_28.set(0.0f, 0.0f, 0.0f);
return chkPointInArea(param_0, local_28);
}
+
/* 8048CD68 */ virtual ~daTag_EvtArea_c() {}
- inline s32 getType() {
+ s32 getType() {
u8 type = (u8)shape_angle.z;
return type == 0xff ? 0 : type;
}
- inline s32 getNo() {
+ s32 getNo() {
u16 no = (shape_angle.z & 0xff00) >> 8;
return no == 0xff ? 0 : no;
}
- inline u32 getOnEvtBit();
- inline u32 getOffEvtBit();
- inline u8 getBitSW();
- inline u8 getBitSW2();
+ u32 getOnEvtBit() {
+ u32 ret = fopAcM_GetParam(this) & 0xfff;
+ return ret == 0xfff ? -1 : ret;
+ }
+
+ u32 getOffEvtBit() {
+ u32 ret = (fopAcM_GetParam(this) & 0xfff000) >> 12;
+ return ret == 0xfff ? -1 : ret;
+ }
+
+ u8 getBitSW() { return home.angle.x & 0xff; }
+
+ u8 getBitSW2() { return (home.angle.x & 0xff00) >> 8; }
private:
/* 0x568 vtable */