Skip to content

Commit c40e255

Browse files
authored
d_a_obj_Y_taihou equivalent (#2303)
* Transfer of Y_taihou work to cleaner and newer branch * d_a_obj_Y_taihou nearly equivalent except for 2 functions * Functionally correct d_a_obj_Y_taihou, but some issues remain * d_a_obj_Y_taihou equivalent now; many thanks hatal! * Update configure(dot)py and the config files for Y_taihou
1 parent 036b67c commit c40e255

File tree

8 files changed

+382
-776
lines changed

8 files changed

+382
-776
lines changed

config/GZ2E01/rels/d_a_obj_Y_taihou/splits.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ REL/global_destructor_chain.c:
1616

1717
d/actor/d_a_obj_Y_taihou.cpp:
1818
.text start:0x000000EC end:0x00001744
19-
.rodata start:0x00000000 end:0x0000008C
19+
.rodata start:0x00000000 end:0x00000089
2020
.data start:0x00000000 end:0x00000130
2121
.bss start:0x00000008 end:0x000000D0

config/GZ2E01/rels/d_a_obj_Y_taihou/symbols.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ _epilog = .text:0x0000002C; // type:function size:0x2C scope:global
33
_unresolved = .text:0x00000058; // type:function size:0x20 scope:global
44
__register_global_object = .text:0x00000078; // type:function size:0x1C scope:global
55
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
6-
ccHitCallback__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x000000EC; // type:function size:0x154 scope:global
7-
pushPullcallBack__FP10fopAc_ac_cP10fopAc_ac_csQ29dBgW_Base13PushPullLabel = .text:0x00000240; // type:function size:0xE0 scope:global
6+
ccHitCallback__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf = .text:0x000000EC; // type:function size:0x154 scope:local
7+
pushPullcallBack__FP10fopAc_ac_cP10fopAc_ac_csQ29dBgW_Base13PushPullLabel = .text:0x00000240; // type:function size:0xE0 scope:local
88
__dt__4cXyzFv = .text:0x00000320; // type:function size:0x3C scope:global
9-
searchIronBallCallback__FPvPv = .text:0x0000035C; // type:function size:0x8C scope:global
9+
searchIronBallCallback__FPvPv = .text:0x0000035C; // type:function size:0x8C scope:local
1010
create1st__14daObjYtaihou_cFv = .text:0x000003E8; // type:function size:0xC8 scope:global
1111
setIronBall__14daObjYtaihou_cFP12daObjCarry_c = .text:0x000004B0; // type:function size:0x58 scope:global
1212
getEvent__14daObjYtaihou_cFUc = .text:0x00000508; // type:function size:0x14 scope:global
@@ -22,13 +22,13 @@ Create__14daObjYtaihou_cFv = .text:0x00000FE4; // type:function size:0xB0 scope:
2222
Execute__14daObjYtaihou_cFPPA3_A4_f = .text:0x00001094; // type:function size:0xB8 scope:global
2323
Draw__14daObjYtaihou_cFv = .text:0x0000114C; // type:function size:0xD0 scope:global
2424
Delete__14daObjYtaihou_cFv = .text:0x0000121C; // type:function size:0x6C scope:global
25-
daObjYtaihou_create1st__FP14daObjYtaihou_c = .text:0x00001288; // type:function size:0x11C scope:global
25+
daObjYtaihou_create1st__FP14daObjYtaihou_c = .text:0x00001288; // type:function size:0x11C scope:local
2626
__dt__8cM3dGCylFv = .text:0x000013A4; // type:function size:0x48 scope:global
2727
__dt__8cM3dGAabFv = .text:0x000013EC; // type:function size:0x48 scope:global
2828
__dt__10dCcD_GSttsFv = .text:0x00001434; // type:function size:0x5C scope:global
29-
daObjYtaihou_MoveBGDelete__FP14daObjYtaihou_c = .text:0x00001490; // type:function size:0x20 scope:global
30-
daObjYtaihou_MoveBGExecute__FP14daObjYtaihou_c = .text:0x000014B0; // type:function size:0x20 scope:global
31-
daObjYtaihou_MoveBGDraw__FP14daObjYtaihou_c = .text:0x000014D0; // type:function size:0x2C scope:global
29+
daObjYtaihou_MoveBGDelete__FP14daObjYtaihou_c = .text:0x00001490; // type:function size:0x20 scope:local
30+
daObjYtaihou_MoveBGExecute__FP14daObjYtaihou_c = .text:0x000014B0; // type:function size:0x20 scope:local
31+
daObjYtaihou_MoveBGDraw__FP14daObjYtaihou_c = .text:0x000014D0; // type:function size:0x2C scope:local
3232
__dt__10cCcD_GSttsFv = .text:0x000014FC; // type:function size:0x48 scope:global
3333
__dt__17dEvLib_callback_cFv = .text:0x00001544; // type:function size:0x48 scope:global
3434
eventStart__17dEvLib_callback_cFv = .text:0x0000158C; // type:function size:0x8 scope:global
@@ -65,10 +65,10 @@ l_shotSmokeOffset$3962 = .rodata:0x00000054; // type:object size:0xC scope:local
6565
@4109 = .rodata:0x00000070; // type:object size:0x4 scope:local
6666
l_cc_offset$4147 = .rodata:0x00000074; // type:object size:0xC scope:local
6767
@stringBase0 = .rodata:0x00000080; // type:object size:0x9 scope:local data:string_table
68-
l_arcName = .data:0x00000000; // type:object size:0x4 scope:global
69-
l_cc_cyl_src = .data:0x00000004; // type:object size:0x44 scope:global
68+
l_arcName = .data:0x00000000; // type:object size:0x4 scope:local
69+
l_cc_cyl_src = .data:0x00000004; // type:object size:0x44 scope:local
7070
l_offsetAngle$3829 = .data:0x00000048; // type:object size:0x8 scope:local
71-
daObjYtaihou_METHODS = .data:0x00000050; // type:object size:0x20 scope:global
71+
daObjYtaihou_METHODS = .data:0x00000050; // type:object size:0x20 scope:local
7272
g_profile_Obj_Ytaihou = .data:0x00000070; // type:object size:0x30 scope:global
7373
__vt__10cCcD_GStts = .data:0x000000A0; // type:object size:0xC scope:global
7474
__vt__10dCcD_GStts = .data:0x000000AC; // type:object size:0xC scope:global
@@ -95,7 +95,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
9595
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
9696
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
9797
l_wheelMinR$3836 = .bss:0x00000048; // type:object size:0x4 scope:local data:float
98-
lbl_396_bss_4C = .bss:0x0000004C; // type:object size:0x1 data:byte
98+
lbl_396_bss_4C = .bss:0x0000004C; // type:object size:0x1 scope:local data:byte
9999
@3951 = .bss:0x00000050; // type:object size:0xC scope:local
100100
l_effectScale$3950 = .bss:0x00000060; // type:object size:0xC scope:local
101101
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x0000006C; // type:object size:0x4 scope:global

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ def MatchingFor(*versions):
18271827
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_Lv5Key"),
18281828
ActorRel(Equivalent, "d_a_obj_Turara"),
18291829
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_TvCdlst"),
1830-
ActorRel(NonMatching, "d_a_obj_Y_taihou"),
1830+
ActorRel(Equivalent, "d_a_obj_Y_taihou"), # weak func ordering.
18311831
ActorRel(NonMatching, "d_a_obj_amiShutter"),
18321832
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_ari"),
18331833
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_automata"),

include/d/actor/d_a_obj_Y_taihou.h

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#ifndef D_A_OBJ_Y_TAIHOU_H
22
#define D_A_OBJ_Y_TAIHOU_H
33

4-
#include "f_op/f_op_actor_mng.h"
4+
#include "d/d_bg_s_movebg_actor.h"
55
#include "d/actor/d_a_obj_carry.h"
6+
#include "d/d_event_lib.h"
67

78
/**
89
* @ingroup actors-objects
@@ -12,27 +13,43 @@
1213
* @details
1314
*
1415
*/
15-
class daObjYtaihou_c : public fopAc_ac_c {
16+
class daObjYtaihou_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
1617
public:
17-
/* 80B9FDE8 */ void create1st();
18+
daObjYtaihou_c() : dEvLib_callback_c(this) { mIronBallId = -1; }
19+
/* 80B9FDE8 */ int create1st();
1820
/* 80B9FEB0 */ void setIronBall(daObjCarry_c*);
19-
/* 80B9FF08 */ void getEvent(u8);
21+
/* 80B9FF08 */ int getEvent(u8);
2022
/* 80B9FF1C */ void loadAngle();
2123
/* 80B9FFAC */ void saveAngle();
2224
/* 80BA0060 */ void setNextAngle();
2325
/* 80BA0084 */ void setMtx();
2426
/* 80BA0208 */ void rotateCheck();
2527
/* 80BA045C */ void shotCheck();
26-
/* 80BA0964 */ void eventStart();
27-
/* 80BA0974 */ void CreateHeap();
28-
/* 80BA09E4 */ void Create();
29-
/* 80BA0A94 */ void Execute(f32 (**)[3][4]);
30-
/* 80BA0B4C */ void Draw();
31-
/* 80BA0C1C */ void Delete();
32-
/* 80BA0FA4 */ ~daObjYtaihou_c();
28+
/* 80BA0964 */ virtual BOOL eventStart();
29+
/* 80BA0974 */ int CreateHeap();
30+
/* 80BA09E4 */ int Create();
31+
/* 80BA0A94 */ int Execute(Mtx** i_mtx);
32+
/* 80BA0B4C */ int Draw();
33+
/* 80BA0C1C */ int Delete();
34+
/* 80BA0FA4 */ ~daObjYtaihou_c() {}
35+
36+
void setAddAngle(s8 add_angle) { mAddAngle = add_angle; }
37+
s32 getIronBallId() { return mIronBallId; }
38+
void startBomb() { mStartBomb = 0xffff; }
3339

3440
private:
35-
/* 0x568 */ u8 field_0x568[0x778 - 0x568];
41+
/* 0x5b8 */ Mtx mMtx;
42+
/* 0x5e8 */ J3DModel* mpModel;
43+
/* 0x5ec */ dCcD_Stts mStts;
44+
/* 0x628 */ dCcD_Cyl mCyl;
45+
/* 0x764 */ s32 mIronBallId;
46+
/* 0x768 */ u32 mParticleKeys[2];
47+
/* 0x770 */ s16 mStartBomb;
48+
/* 0x772 */ s16 field_0x772;
49+
/* 0x774 */ s8 field_0x774;
50+
/* 0x775 */ u8 field_0x775;
51+
/* 0x776 */ s8 mAddAngle;
52+
/* 0x777 */ s8 mOldAddAngle;
3653
};
3754

3855
STATIC_ASSERT(sizeof(daObjYtaihou_c) == 0x778);

include/d/actor/d_a_obj_carry.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,18 @@ class daObjCarry_c : public fopAc_ac_c {
274274
void startCtrl() { mCtrl = 1; }
275275
void endCtrl() { mCtrl = 0; }
276276
void setDrop() { field_0xcf2 = 3; }
277-
277+
void offDraw() { mDraw = 1; }
278+
void onDraw() { mDraw = 0; }
278279
bool isDraw() { return mDraw == false; }
279280

281+
void setPower(fopAc_ac_c* cannon_actor, f32 my_0xde0, f32 my_0xde4, s16 my_0xde8) {
282+
mpCannonActor = cannon_actor;
283+
field_0xde0 = my_0xde0;
284+
field_0xde4 = my_0xde4;
285+
field_0xde8 = my_0xde8;
286+
field_0xdea = 1;
287+
}
288+
280289
static void make_prm(csXyz* param_1, u8 param_2, u8 param_3, u8 param_4, u8 param_5,
281290
u8 param_6 = 0) {
282291
param_1->x = (param_4 << 8) | param_3;

include/d/actor/d_a_player.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ class daPy_py_c : public fopAc_ac_c {
10261026
void onForceGameOver() { onNoResetFlg2(FLG2_FORCE_GAMEOVER); }
10271027
void onForceWolfChange() { onEndResetFlg0(ERFLG0_UNK_2); }
10281028
void onDoPutEmphasys() { onEndResetFlg1(ERFLG1_UNK_10000000); }
1029+
void onDoExchangePutIn() { onEndResetFlg1(ERFLG1_UNK_4000000); }
10291030
void onNsScream() { onEndResetFlg1(ERFLG1_UNK_1); }
10301031
void onNsScreamAnm() { onEndResetFlg1(daPy_ERFLG1(ERFLG1_UNK_1 | ERFLG1_UNK_2)); }
10311032
void onNeckSearchWide() { onEndResetFlg0(ERFLG0_UNK_400); }

include/d/d_bg_w_base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class dBgW_Base : public cBgW_BgId {
2929
PPLABEL_NONE = 0,
3030
PPLABEL_PUSH = 1,
3131
PPLABEL_PULL = 2,
32+
PPLABEL_3 = 3,
3233
PPLABEL_4 = 4,
3334
PPLABEL_HEAVY = 8,
3435
};

0 commit comments

Comments
 (0)