Skip to content

Commit 2b873ea

Browse files
authored
kbrg/obrg done (#2558)
* kbrg done * obrg done * cleanup
1 parent a1b63ae commit 2b873ea

File tree

6 files changed

+1379
-1367
lines changed

6 files changed

+1379
-1367
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,8 +2154,8 @@ def MatchingFor(*versions) -> bool:
21542154
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_vground"),
21552155
ActorRel(NonMatching, "d_a_obj_volcball"),
21562156
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_volcbom"),
2157-
ActorRel(NonMatching, "d_a_obj_warp_kbrg"),
2158-
ActorRel(NonMatching, "d_a_obj_warp_obrg"),
2157+
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_warp_kbrg"),
2158+
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_warp_obrg"),
21592159
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_waterGate"),
21602160
ActorRel(Equivalent, "d_a_obj_waterPillar"), # vtable order
21612161
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_waterfall"),

include/d/actor/d_a_midna.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@ class daMidna_c : public fopAc_ac_c {
383383
mpKago = NULL;
384384
}
385385

386+
void onTagWaitPosPortalObj(const cXyz* i_pos) {
387+
mTagWaitPos = *i_pos;
388+
onStateFlg0(daMidna_FLG0(FLG0_PORTAL_OBJ_CALL | FLG0_TAG_WAIT));
389+
}
390+
386391
static daMidna_texData_s const m_texDataTable[21];
387392
static daMidna_anmData_s const m_anmDataTable[53];
388393

include/d/actor/d_a_obj_warp_kbrg.h

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@
22
#define D_A_OBJ_WARP_KBRG_H
33

44
#include "f_op/f_op_actor_mng.h"
5+
#include "d/d_bg_s_movebg_actor.h"
6+
#include "d/d_msg_flow.h"
57

68
/**
79
* @ingroup actors-objects
810
* @class daObjWarpKBrg_c
9-
* @brief Warp K Bridge (Kakariko Gorge Bridge?)
11+
* @brief Kakariko Gorge Warp Bridge
1012
*
1113
* @details
1214
*
1315
*/
14-
class daObjWarpKBrg_c : public fopAc_ac_c {
16+
class daObjWarpKBrg_c : public dBgS_MoveBgActor {
1517
public:
18+
enum Action_e {
19+
ACTION_WAIT_e,
20+
ACTION_ORDER_EVENT_e,
21+
ACTION_TALK_EVENT_e,
22+
ACTION_WAIT_WARP_EVENT_e,
23+
ACTION_WARP_EVENT_e,
24+
ACTION_ORDER_A_TALK_EVENT_e,
25+
ACTION_DEAD_e,
26+
ACTION_WAIT2_e,
27+
ACTION_ORDER_EVENT2_e,
28+
ACTION_WARP_EVENT2_e,
29+
ACTION_DEAD2_e,
30+
};
31+
1632
/* 80D26FA8 */ void initBaseMtx();
1733
/* 80D27008 */ void setBaseMtx();
18-
/* 80D270C4 */ void Create();
19-
/* 80D27300 */ void CreateHeap();
20-
/* 80D276B4 */ void create1st();
21-
/* 80D2781C */ void Execute(f32 (**)[3][4]);
34+
/* 80D276B4 */ int create1st();
2235
/* 80D27890 */ void event_proc_call();
2336
/* 80D27A38 */ void orderZHintEvent();
2437
/* 80D27B2C */ void actionWait();
@@ -34,7 +47,7 @@ class daObjWarpKBrg_c : public fopAc_ac_c {
3447
/* 80D28248 */ void actionDead2();
3548
/* 80D2824C */ void demoProc();
3649
/* 80D28A50 */ void calcObjPos();
37-
/* 80D28AE0 */ void checkTalkDistance();
50+
/* 80D28AE0 */ bool checkTalkDistance();
3851
/* 80D28B7C */ void calcMidnaWaitPos();
3952
/* 80D28C10 */ void setBindEffect();
4053
/* 80D28CDC */ void followBindEffect();
@@ -44,11 +57,50 @@ class daObjWarpKBrg_c : public fopAc_ac_c {
4457
/* 80D290A8 */ void followDstEffect();
4558
/* 80D29158 */ void endSrcEffect();
4659
/* 80D291FC */ void endDstEffect();
47-
/* 80D292A0 */ void Draw();
48-
/* 80D29448 */ void Delete();
4960

50-
private:
51-
/* 0x568 */ u8 field_0x568[0x69c - 0x568];
61+
/* 80D27300 */ virtual int CreateHeap();
62+
/* 80D270C4 */ virtual int Create();
63+
/* 80D2781C */ virtual int Execute(Mtx**);
64+
/* 80D292A0 */ virtual int Draw();
65+
/* 80D29448 */ virtual int Delete();
66+
67+
u8 getNameArg() { return fopAcM_GetParamBit(this, 31, 2); }
68+
u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
69+
u8 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }
70+
u8 getArg0() { return fopAcM_GetParamBit(this, 16, 8); }
71+
72+
void setAction(u8 i_action) { mAction = i_action; }
73+
u16 getMsgID() { return mMsgID; }
74+
75+
/* 0x5A0 */ request_of_phase_process_class mPhase;
76+
/* 0x5A8 */ request_of_phase_process_class mEvPhase;
77+
/* 0x5B0 */ J3DModel* mpBridgeModel;
78+
/* 0x5B4 */ mDoExt_btkAnm* mpBridgeBtk;
79+
/* 0x5B8 */ mDoExt_bckAnm* mpBridgeBck;
80+
/* 0x5BC */ J3DModel* mpPortalModel;
81+
/* 0x5C0 */ mDoExt_btkAnm* mpPortalBtk;
82+
/* 0x5C4 */ mDoExt_brkAnm* mpPortalBrk;
83+
/* 0x5C8 */ u8 field_0x5c8;
84+
/* 0x5C9 */ u8 mTimer;
85+
/* 0x5CA */ u8 mAction;
86+
/* 0x5CB */ u8 mPrmInit;
87+
/* 0x5CC */ u16 mMsgID;
88+
/* 0x5CE */ s16 mEventId[2];
89+
/* 0x5D4 */ int mStaffId;
90+
/* 0x5D8 */ u8 mEventType;
91+
/* 0x5D9 */ u8 field_0x5d9;
92+
/* 0x5DC */ dMsgFlow_c mMsgFlow;
93+
/* 0x628 */ cXyz mMidnaWaitPos;
94+
/* 0x634 */ cXyz mObjPos;
95+
/* 0x640 */ JPABaseEmitter* mStartEfEmitterID[3];
96+
/* 0x64C */ JPABaseEmitter* mDisappEfEmitterID[5];
97+
/* 0x660 */ JPABaseEmitter* mAppEfEmitterID[6];
98+
/* 0x678 */ JPABaseEmitter* mEndEfEmitterID[2];
99+
/* 0x680 */ u8 field_0x680[0x688 - 0x680];
100+
/* 0x688 */ JPABaseEmitter* mBindEfEmitterID[4];
101+
/* 0x698 */ u16 mEffJointNo;
102+
/* 0x69A */ u8 field_0x69a;
103+
/* 0x69B */ u8 field_0x69b;
52104
};
53105

54106
STATIC_ASSERT(sizeof(daObjWarpKBrg_c) == 0x69c);

include/d/actor/d_a_obj_warp_obrg.h

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,32 @@
22
#define D_A_OBJ_WARP_OBRG_H
33

44
#include "f_op/f_op_actor_mng.h"
5+
#include "d/d_bg_s_movebg_actor.h"
6+
#include "d/d_msg_flow.h"
57

68
/**
79
* @ingroup actors-objects
810
* @class daObjWarpOBrg_c
9-
* @brief Warp O Bridge (Eldin Bridge?)
11+
* @brief Eldin Warp Bridge
1012
*
1113
* @details
1214
*
1315
*/
14-
class daObjWarpOBrg_c : public fopAc_ac_c {
16+
class daObjWarpOBrg_c : public dBgS_MoveBgActor {
1517
public:
18+
enum Action_e {
19+
ACTION_WAIT_e,
20+
ACTION_ORDER_EVENT_e,
21+
ACTION_TALK_EVENT_e,
22+
ACTION_WARP_EVENT_e,
23+
ACTION_DEAD_e,
24+
ACTION_ORDER_EVENT_DST_e,
25+
ACTION_WARP_EVENT_DST_e,
26+
};
27+
1628
/* 80D299B8 */ void initBaseMtx();
1729
/* 80D29A00 */ void setBaseMtx();
18-
/* 80D29ACC */ void Create();
19-
/* 80D29BB4 */ void CreateHeap();
20-
/* 80D29E7C */ void create1st();
21-
/* 80D2A008 */ void Execute(f32 (**)[3][4]);
30+
/* 80D29E7C */ int create1st();
2231
/* 80D2A04C */ void event_proc_call();
2332
/* 80D2A194 */ void actionWait();
2433
/* 80D2A4CC */ void actionOrderEvent();
@@ -28,13 +37,41 @@ class daObjWarpOBrg_c : public fopAc_ac_c {
2837
/* 80D2A9E4 */ void actionWarpEventDst();
2938
/* 80D2AA30 */ void actionDead();
3039
/* 80D2AA34 */ void demoProc();
31-
/* 80D2B3BC */ void checkTalkDistance();
40+
/* 80D2B3BC */ bool checkTalkDistance();
3241
/* 80D2B534 */ void calcMidnaWaitPos();
33-
/* 80D2B5C8 */ void Draw();
34-
/* 80D2B6C0 */ void Delete();
3542

36-
private:
37-
/* 0x568 */ u8 field_0x568[0x640 - 0x568];
43+
/* 80D29BB4 */ virtual int CreateHeap();
44+
/* 80D29ACC */ virtual int Create();
45+
/* 80D2A008 */ virtual int Execute(Mtx**);
46+
/* 80D2B5C8 */ virtual int Draw();
47+
/* 80D2B6C0 */ virtual int Delete();
48+
49+
u8 getNameArg() { return subtype; }
50+
u8 getSwNo() { return fopAcM_GetParamBit(this, 0, 8); }
51+
u8 getSwNo2() { return fopAcM_GetParamBit(this, 8, 8); }
52+
u8 getArg0() { return fopAcM_GetParamBit(this, 16, 8); }
53+
u8 getMyPortalID() { return fopAcM_GetParamBit(this, 24, 7); }
54+
55+
void setAction(u8 i_action) { mAction = i_action; }
56+
u16 getMsgID() { return mMsgID; }
57+
58+
/* 0x5A0 */ request_of_phase_process_class mPhase;
59+
/* 0x5A8 */ J3DModel* mpModel;
60+
/* 0x5AC */ mDoExt_bckAnm* mpBck;
61+
/* 0x5B0 */ mDoExt_btkAnm* mpBtk;
62+
/* 0x5B4 */ dMsgFlow_c mMsgFlow;
63+
/* 0x600 */ JPABaseEmitter* mEfEmitter[5];
64+
/* 0x614 */ cXyz field_0x614;
65+
/* 0x620 */ cXyz mMidnaWaitPos;
66+
/* 0x62C */ f32 mTalkRange;
67+
/* 0x630 */ int mStaffId;
68+
/* 0x634 */ s16 mEventId;
69+
/* 0x636 */ u16 mMsgID;
70+
/* 0x638 */ u8 mPrmInit;
71+
/* 0x639 */ u8 field_0x639;
72+
/* 0x63A */ u8 field_0x63a;
73+
/* 0x63B */ u8 mAction;
74+
/* 0x63C */ u8 mTimer;
3875
};
3976

4077
STATIC_ASSERT(sizeof(daObjWarpOBrg_c) == 0x640);

0 commit comments

Comments
 (0)