Skip to content

Commit 8f97cd9

Browse files
authored
obj_kanban2 equivalent (#2434)
* kanban2 equivalent * some kanban2 doc * fix some fake padding issues
1 parent 792dd60 commit 8f97cd9

File tree

9 files changed

+1756
-1258
lines changed

9 files changed

+1756
-1258
lines changed

include/d/actor/d_a_obj_Turara.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
* @details
1515
*
1616
*/
17-
struct fakeTuraraPadding {
18-
u8 a[8];
19-
};
2017

21-
class daTurara_c : public dBgS_MoveBgActor, public fakeTuraraPadding, public dEvLib_callback_c {
18+
class daTurara_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
2219
public:
2320
daTurara_c() : dEvLib_callback_c(this) {}
2421
/* 80B9E710 */ ~daTurara_c() {}

include/d/actor/d_a_obj_amiShutter.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
* @details
1515
*
1616
*/
17-
struct fakeAmiShutterPadding {
18-
u8 padding[8];
19-
};
2017

21-
class daAmiShutter_c : public dBgS_MoveBgActor, public fakeAmiShutterPadding, public dEvLib_callback_c {
18+
class daAmiShutter_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
2219
public:
2320
typedef void (daAmiShutter_c::*modeProc)();
2421

include/d/actor/d_a_obj_kanban2.h

Lines changed: 66 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#define D_A_OBJ_KANBAN2_H
33

44
#include "f_op/f_op_actor_mng.h"
5+
#include "d/d_cc_d.h"
6+
#include "d/d_cc_uty.h"
7+
#include "d/d_bg_s_acch.h"
8+
#include "d/d_msg_flow.h"
59

610
/**
711
* @ingroup actors-objects
@@ -13,24 +17,24 @@
1317
*/
1418
class daObj_Kanban2_c : public fopAc_ac_c {
1519
public:
16-
/* 80581790 */ void draw();
20+
/* 80581790 */ int draw();
1721
/* 80581938 */ void setKanbanSE(int);
1822
/* 805819BC */ void createBreakParts(u32, csXyz);
1923
/* 805819FC */ void createWallHitBreak();
20-
/* 80581B5C */ void getKanbanCutType();
21-
/* 80581C48 */ void getKanbanWolfCutType();
24+
/* 80581B5C */ int getKanbanCutType();
25+
/* 80581C48 */ int getKanbanWolfCutType();
2226
/* 80581D04 */ void damage_check();
23-
/* 8058221C */ void float_damage_check();
24-
/* 805822F0 */ void deletePart();
25-
/* 805825A4 */ void getWallAngle();
27+
/* 8058221C */ bool float_damage_check();
28+
/* 805822F0 */ bool deletePart();
29+
/* 805825A4 */ s16 getWallAngle();
2630
/* 8058271C */ void setGroundAngle();
27-
/* 80582894 */ void checkWaterSurface();
28-
/* 80582944 */ void checkPataGround(s16, s16);
31+
/* 80582894 */ bool checkWaterSurface();
32+
/* 80582944 */ bool checkPataGround(s16, s16);
2933
/* 80582A68 */ void setCullMtx();
3034
/* 80582AAC */ void setSmokeEffect(cXyz);
3135
/* 80582AFC */ void setWaterEffect();
3236
/* 80582C40 */ void setCenterPos();
33-
/* 80582E68 */ void checkCarryOn();
37+
/* 80582E68 */ BOOL checkCarryOn();
3438
/* 80582EF0 */ void setActionMode(int, int);
3539
/* 80582F40 */ void calcNormalSwing();
3640
/* 80583364 */ void executeNormal();
@@ -41,21 +45,66 @@ class daObj_Kanban2_c : public fopAc_ac_c {
4145
/* 805849CC */ void action();
4246
/* 80584AD8 */ void mtx_set();
4347
/* 80584CFC */ void cc_set();
44-
/* 80584DF0 */ void execute();
45-
/* 80584ED8 */ void _delete();
46-
/* 80584F64 */ void CreateHeap();
47-
/* 805850E8 */ void create();
48+
/* 80584DF0 */ int execute();
49+
/* 80584ED8 */ int _delete();
50+
/* 80584F64 */ int CreateHeap();
51+
/* 805850E8 */ int create();
4852

49-
private:
50-
/* 0x568 */ u8 field_0x568[0xa50 - 0x568];
53+
/* 0x568 */ request_of_phase_process_class mPhase;
54+
/* 0x570 */ J3DModel* mpModel;
55+
/* 0x574 */ J3DModel* mpPartModel[18];
56+
/* 0x5BC */ Z2SoundObjSimple mSound;
57+
/* 0x5DC */ cXyz field_0x5dc;
58+
/* 0x5E8 */ csXyz field_0x5e8;
59+
/* 0x5EE */ csXyz field_0x5ee;
60+
/* 0x5F4 */ csXyz field_0x5f4;
61+
/* 0x5FC */ f32 field_0x5fc;
62+
/* 0x600 */ f32 field_0x600;
63+
/* 0x604 */ f32 field_0x604;
64+
/* 0x608 */ s16 field_0x608;
65+
/* 0x60A */ s16 field_0x60a;
66+
/* 0x60C */ int mAction;
67+
/* 0x610 */ int mPrevAction;
68+
/* 0x614 */ int mMode;
69+
/* 0x618 */ u32 mShadowId;
70+
/* 0x61C */ u32 mPartFlags;
71+
/* 0x620 */ u32 field_0x620;
72+
/* 0x624 */ s16 field_0x624;
73+
/* 0x626 */ u8 field_0x626;
74+
/* 0x627 */ u8 field_0x627;
75+
/* 0x628 */ u8 mInvulnerabilityTimer;
76+
/* 0x629 */ u8 field_0x629;
77+
/* 0x62A */ u8 field_0x62a;
78+
/* 0x62B */ u8 field_0x62b;
79+
/* 0x62C */ u8 field_0x62c;
80+
/* 0x62D */ u8 field_0x62d;
81+
/* 0x62E */ u8 field_0x62e;
82+
/* 0x630 */ dBgS_AcchCir mAcchCir;
83+
/* 0x670 */ dBgS_ObjAcch mAcch;
84+
/* 0x848 */ dCcD_Stts mCcStts;
85+
/* 0x884 */ dCcD_Sph mCcSph;
86+
/* 0x9BC */ dCcU_AtInfo mAtInfo;
87+
/* 0x9E0 */ u32 field_0x9e0;
88+
/* 0x9E4 */ u32 field_0x9e4;
89+
/* 0x9E8 */ u32 mWaterEffID[4];
90+
/* 0x9F8 */ u32 field_0x9f8;
91+
/* 0x9FC */ u8 mInitHIO;
92+
/* 0x9FE */ s16 field_0x9fe;
93+
/* 0xA00 */ s16 mFlowID;
94+
/* 0xA04 */ dMsgFlow_c mMsgFlow;
5195
};
5296

5397
STATIC_ASSERT(sizeof(daObj_Kanban2_c) == 0xa50);
5498

55-
class daObj_Kanban2_HIO_c {
99+
class daObj_Kanban2_HIO_c : public JORReflexible {
56100
public:
57101
/* 8058176C */ daObj_Kanban2_HIO_c();
58-
/* 80585578 */ ~daObj_Kanban2_HIO_c();
102+
/* 80585578 */ virtual ~daObj_Kanban2_HIO_c() {}
103+
104+
void genMessage(JORMContext*);
105+
106+
/* 0x4 */ s8 id;
107+
/* 0x8 */ f32 base_size;
59108
};
60109

61110

include/d/actor/d_a_obj_lv3Water2.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
#include "d/d_event_lib.h"
66
#include "f_op/f_op_actor_mng.h"
77

8-
struct fakeLv3Water2Padding {
9-
u8 a[8];
10-
};
11-
128
/**
139
* @ingroup actors-objects
1410
* @class daLv3Water2_c
@@ -17,7 +13,7 @@ struct fakeLv3Water2Padding {
1713
* @details Water in the central room (where the boss entrance is). It can be raised twice.
1814
*
1915
*/
20-
class daLv3Water2_c : public dBgS_MoveBgActor, public fakeLv3Water2Padding, public dEvLib_callback_c {
16+
class daLv3Water2_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
2117
public:
2218
daLv3Water2_c() : dEvLib_callback_c(this) {}
2319
~daLv3Water2_c() {}

include/d/actor/d_a_obj_lv4CandleTag.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
#include "f_op/f_op_actor_mng.h"
66
#include "m_Do/m_Do_hostIO.h"
77

8-
struct unknown {
9-
u8 unk[8];
10-
};
11-
12-
// dalv4CandleTag_c should inherit fopAc_ac_c, unknown, and dEvLib_callback_c
13-
// but this causes issues with weak function ordering
148
/**
159
* @ingroup actors-objects
1610
* @class dalv4CandleTag_c
@@ -19,7 +13,7 @@ struct unknown {
1913
* @details
2014
*
2115
*/
22-
class dalv4CandleTag_c : public fopAc_ac_c {
16+
class dalv4CandleTag_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c {
2317
public:
2418
enum Mode {
2519
MODE_WATCH,
@@ -31,11 +25,6 @@ class dalv4CandleTag_c : public fopAc_ac_c {
3125
// dalv4CandleTag_c() : dEvLib_callback_c(this) {}
3226
~dalv4CandleTag_c() {}
3327

34-
// These members are not real, remove once inheritance issue is resolved
35-
unknown mBase2;
36-
dEvLib_callback_c mBase3;
37-
void* mVtable;
38-
3928
/* 80C5D4B8 */ void setBaseMtx();
4029
/* 80C5D4F0 */ cPhs__Step create();
4130
/* 80C5D5D4 */ int Execute();
@@ -48,7 +37,7 @@ class dalv4CandleTag_c : public fopAc_ac_c {
4837
/* 80C5D8AC */ void modeNGWait();
4938
/* 80C5D8FC */ void init_modeEnd();
5039
/* 80C5D908 */ void modeEnd();
51-
/* 80C5D90C */ int eventStart();
40+
/* 80C5D90C */ bool eventStart();
5241
/* 80C5D930 */ int Draw();
5342
/* 80C5D938 */ int Delete();
5443

include/d/actor/d_a_obj_syRock.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
* @details Breakable stalactites seen in Lakebed Temple
1313
*
1414
*/
15-
struct fakeSyRockPadding {
16-
u8 a[8];
17-
};
1815

19-
class daSyRock_c : public dBgS_MoveBgActor, public fakeSyRockPadding, public dEvLib_callback_c {
16+
class daSyRock_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
2017
public:
2118
daSyRock_c() : dEvLib_callback_c(this) {}
2219
/* 80D03DAC */ ~daSyRock_c() {};

include/d/actor/d_a_obj_waterPillar.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
* @details Water columns that can carry broken stalactites (see d_a_obj_syrock)
1515
*
1616
*/
17-
18-
struct fakeWtPillarPadding {
19-
u8 a[8];
20-
};
21-
22-
class daWtPillar_c : public fopAc_ac_c, public fakeWtPillarPadding, public dEvLib_callback_c {
17+
class daWtPillar_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c {
2318
public:
2419
daWtPillar_c();
2520
~daWtPillar_c() {}

0 commit comments

Comments
 (0)