Skip to content

Commit 69aaeee

Browse files
authored
d_a_obj_tobyhouse equivalent (#2546)
1 parent d9ac8d7 commit 69aaeee

File tree

8 files changed

+634
-799
lines changed

8 files changed

+634
-799
lines changed

config/GZ2E01/rels/d_a_obj_tobyhouse/symbols.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ l_bck = .rodata:0x00000018; // type:object size:0xC scope:global
5656
@stringBase0 = .rodata:0x00000074; // type:object size:0x98 scope:local data:string_table
5757
...data.0 = .data:0x00000000; // type:label scope:local
5858
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
59-
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
60-
lbl_664_data_10 = .data:0x00000010; // type:object size:0x10
59+
@1787 = .data:0x0000000C; // type:object size:0x14 scope:local
6160
l_arcName = .data:0x00000020; // type:object size:0x8 scope:global
6261
l_staff_name = .data:0x00000028; // type:object size:0x4 scope:global data:4byte
6362
l_event_name = .data:0x0000002C; // type:object size:0x8 scope:global
@@ -91,7 +90,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
9190
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
9291
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
9392
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
94-
lbl_664_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
93+
init$1832 = .bss:0x00000045; // type:object size:0x1 scope:local data:byte
9594
@4351 = .bss:0x00000048; // type:object size:0xC scope:local
9695
l_shotSmokeScale$4350 = .bss:0x00000058; // type:object size:0xC scope:local
9796
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000064; // type:object size:0x4 scope:global

config/GZ2J01/rels/d_a_obj_tobyhouse/symbols.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ l_bck = .rodata:0x00000018; // type:object size:0xC scope:global
5555
@4905 = .rodata:0x00000070; // type:object size:0x4 scope:local
5656
@stringBase0 = .rodata:0x00000074; // type:object size:0x98 scope:local data:string_table
5757
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
58-
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
59-
lbl_664_data_10 = .data:0x00000010; // type:object size:0x10
58+
@1787 = .data:0x0000000C; // type:object size:0x14 scope:local
6059
l_arcName = .data:0x00000020; // type:object size:0x8 scope:global
6160
l_staff_name = .data:0x00000028; // type:object size:0x4 scope:global data:4byte
6261
l_event_name = .data:0x0000002C; // type:object size:0x8 scope:global
@@ -90,7 +89,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
9089
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
9190
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
9291
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
93-
lbl_664_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
92+
init$1832 = .bss:0x00000045; // type:object size:0x1 data:byte scope:local
9493
@4351 = .bss:0x00000048; // type:object size:0xC scope:local
9594
l_shotSmokeScale$4350 = .bss:0x00000058; // type:object size:0xC scope:local
9695
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000064; // type:object size:0x4 scope:global

config/GZ2P01/rels/d_a_obj_tobyhouse/symbols.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ l_bck = .rodata:0x00000018; // type:object size:0xC scope:global
5555
@4905 = .rodata:0x00000070; // type:object size:0x4 scope:local
5656
@stringBase0 = .rodata:0x00000074; // type:object size:0x98 scope:local data:string_table
5757
cNullVec__6Z2Calc = .data:0x00000000; // type:object size:0xC scope:global
58-
@1787 = .data:0x0000000C; // type:object size:0x4 scope:local
59-
lbl_664_data_10 = .data:0x00000010; // type:object size:0x10
58+
@1787 = .data:0x0000000C; // type:object size:0x14 scope:local
6059
l_arcName = .data:0x00000020; // type:object size:0x8 scope:global
6160
l_staff_name = .data:0x00000028; // type:object size:0x4 scope:global data:4byte
6261
l_event_name = .data:0x0000002C; // type:object size:0x8 scope:global
@@ -90,7 +89,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
9089
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
9190
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
9291
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
93-
lbl_664_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
92+
init$1832 = .bss:0x00000045; // type:object size:0x1 data:byte scope:local
9493
@4351 = .bss:0x00000048; // type:object size:0xC scope:local
9594
l_shotSmokeScale$4350 = .bss:0x00000058; // type:object size:0xC scope:local
9695
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000064; // type:object size:0x4 scope:global

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ def MatchingFor(*versions) -> bool:
21412141
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tmoon"),
21422142
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_toaru_maki"),
21432143
ActorRel(NonMatching, "d_a_obj_toby"),
2144-
ActorRel(NonMatching, "d_a_obj_tobyhouse"),
2144+
ActorRel(Equivalent, "d_a_obj_tobyhouse"), # weak function order
21452145
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_togeTrap"),
21462146
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tombo"),
21472147
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tornado"),

include/JSystem/J3DGraphAnimator/J3DJoint.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ class J3DMtxCalc {
2828
virtual void calc() = 0;
2929

3030
static J3DMtxBuffer* getMtxBuffer() { return mMtxBuffer; }
31-
static J3DJoint* getJoint() { return mJoint; }
31+
static J3DJoint* getJoint() {
32+
J3D_ASSERT(185, mJoint != NULL, "Error : null pointer.")
33+
return mJoint;
34+
}
3235
static void setJoint(J3DJoint* joint) { mJoint = joint; }
3336

3437
static J3DMtxBuffer* mMtxBuffer;
Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef D_A_OBJ_TOBYHOUSE_H
22
#define D_A_OBJ_TOBYHOUSE_H
33

4+
#include "d/d_bg_s_movebg_actor.h"
45
#include "f_op/f_op_actor_mng.h"
56

67
/**
@@ -11,30 +12,90 @@
1112
* @details
1213
*
1314
*/
14-
class daObjTobyHouse_c : public fopAc_ac_c {
15+
class daObjTobyHouse_c : public dBgS_MoveBgActor {
1516
public:
17+
typedef void (daObjTobyHouse_c::*actionFunc)();
18+
19+
enum Action {
20+
ACTION_WAIT,
21+
ACTION_ORDER_EVENT,
22+
ACTION_EVENT,
23+
ACTION_DEAD,
24+
};
25+
26+
enum Type {
27+
TYPE_0,
28+
TYPE_1,
29+
};
30+
1631
/* 80D15F0C */ void initBaseMtx();
1732
/* 80D15F48 */ void setBaseMtx();
18-
/* 80D15FE0 */ void Create();
19-
/* 80D161A4 */ void CreateHeap();
20-
/* 80D163F0 */ void create1st();
21-
/* 80D164C0 */ void Execute(f32 (**)[3][4]);
33+
/* 80D15FE0 */ int Create();
34+
/* 80D161A4 */ int CreateHeap();
35+
/* 80D163F0 */ int create1st();
36+
/* 80D164C0 */ int Execute(Mtx**);
2237
/* 80D16560 */ void action();
2338
/* 80D1661C */ void actionWait();
2439
/* 80D166E0 */ void actionOrderEvent();
2540
/* 80D167BC */ void actionEvent();
2641
/* 80D16860 */ void actionDead();
2742
/* 80D16864 */ void demoProc();
2843
/* 80D171C0 */ void sceneChange();
29-
/* 80D17230 */ void Draw();
30-
/* 80D17374 */ void checkLODModel();
31-
/* 80D174F8 */ void Delete();
44+
/* 80D17230 */ int Draw();
45+
/* 80D17374 */ BOOL checkLODModel();
46+
/* 80D174F8 */ int Delete();
3247

33-
private:
34-
/* 0x568 */ u8 field_0x568[0x600 - 0x568];
48+
bool checkWater() { return fopAcM_GetParamBit(this, 31, 1); }
49+
void setAction(u8 action) { mAction = action; }
50+
51+
/* 0x5A0 */ request_of_phase_process_class mPhase;
52+
/* 0x5A8 */ J3DModel* mModel;
53+
/* 0x5AC */ J3DModel* mLODModel;
54+
/* 0x5B0 */ mDoExt_bckAnm* mBcks[3];
55+
/* 0x5BC */ mDoExt_bckAnm* mActiveBck;
56+
/* 0x5C0 */ int field_0x5c0;
57+
/* 0x5C4 */ int field_0x5c4;
58+
/* 0x5C8 */ int field_0x5c8;
59+
/* 0x5CC */ int mStaffId;
60+
/* 0x5D0 */ int mEventIdIdx;
61+
/* 0x5D4 */ s16 mEventIds[2];
62+
/* 0x5D8 */ u16 mBirlPJnt;
63+
/* 0x5DA */ u16 mBirlCannonJnt;
64+
/* 0x5DC */ u8 field_0x5dc;
65+
/* 0x5DD */ u8 mAction;
66+
/* 0x5DE */ u8 field_0x5de;
67+
/* 0x5E0 */ s16 field_0x5e0;
68+
/* 0x5E2 */ u8 field_0x5e2;
69+
/* 0x5E3 */ u8 field_0x5e3;
70+
/* 0x5E4 */ u8 field_0x5e4;
71+
/* 0x5E5 */ u8 mType;
72+
/* 0x5E8 */ f32 mHeightOffset;
73+
/* 0x5EC */ u16 mDemoTimer;
74+
/* 0x5F0 */ JPABaseEmitter* field_0x5f0;
75+
/* 0x5F4 */ JPABaseEmitter* field_0x5f4;
76+
/* 0x5F8 */ JPABaseEmitter* field_0x5f8;
77+
/* 0x5FC */ JPABaseEmitter* field_0x5fc;
3578
};
3679

3780
STATIC_ASSERT(sizeof(daObjTobyHouse_c) == 0x600);
3881

82+
#ifdef DEBUG
83+
84+
class daObjTobyHouse_HIO_c : public mDoHIO_entry_c {
85+
public:
86+
daObjTobyHouse_HIO_c();
87+
~daObjTobyHouse_HIO_c() {}
88+
void genMessage(JORMContext* ctx);
89+
90+
/* 0x06 */ u8 mHawkeyeMediumLOD;
91+
/* 0x07 */ u8 field_0x07;
92+
/* 0x08 */ u8 mDrawCollision;
93+
/* 0x0A */ s16 mShakingCycle;
94+
/* 0x0C */ f32 mShakingAmplitude;
95+
/* 0x10 */ f32 mLODDistance;
96+
};
97+
98+
#endif
99+
39100

40101
#endif /* D_A_OBJ_TOBYHOUSE_H */

include/d/d_camera.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,5 +1191,7 @@ class dCamera_c {
11911191
dCamera_c* dCam_getBody();
11921192
camera_class* dCam_getCamera();
11931193
s16 dCam_getControledAngleY(camera_class* param_0);
1194+
s16 dCam_getAngleX(camera_class* i_cam);
1195+
s16 dCam_getAngleY(camera_class* i_cam);
11941196

11951197
#endif /* D_D_CAMERA_H */

0 commit comments

Comments
 (0)