Skip to content

Commit 294d104

Browse files
authored
Minor work on octhashi/sekizoa I had lying around (#2314)
* Minor octhashi changes * Minor work on sekizoa
1 parent 19e1865 commit 294d104

File tree

5 files changed

+266
-1784
lines changed

5 files changed

+266
-1784
lines changed

config/GZ2E01/rels/d_a_obj_octhashi/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ __vt__8cM3dGSph = .data:0x000000B0; // type:object size:0xC scope:global
8282
__vt__8cM3dGCyl = .data:0x000000BC; // type:object size:0xC scope:global
8383
__vt__8cM3dGAab = .data:0x000000C8; // type:object size:0xC scope:global
8484
__vt__15daObjOCTHASHI_c = .data:0x000000D4; // type:object size:0x28 scope:global
85-
lbl_584_bss_0 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte
85+
l_cyl_height_init = .bss:0x00000000; // type:object size:0x1 scope:local data:byte

include/d/actor/d_a_obj_octhashi.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#ifndef D_A_OBJ_OCTHASHI_H
22
#define D_A_OBJ_OCTHASHI_H
33

4+
#include "SSystem/SComponent/c_phase.h"
45
#include "d/d_bg_s_movebg_actor.h"
5-
#include "d/d_com_inf_game.h"
6+
#include "d/d_cc_d.h"
7+
#include "d/d_cc_uty.h"
68

79
/**
810
* @ingroup actors-objects
@@ -52,14 +54,15 @@ class daObjOCTHASHI_c : public dBgS_MoveBgActor {
5254
/* 0x6e8 */ s16 field_0x6e8;
5355
/* 0x6ec */ Z2Creature mSound;
5456
private:
55-
/* 0x77c */ u8 field_0x77c[4];
56-
/* 0x780 */ J3DModel* mpModel[8];
57-
/* 0x7a0 */ u8 field_0x7a0[0x7a4 - 0x7a0];
58-
/* 0x7a4 */ request_of_phase_process_class mPhaseReq;
59-
/* 0x7ac */ dCcD_Stts field_0x7ac[8];
60-
/* 0x98c */ dCcD_Sph mColliders[8];
57+
/* 0x077c */ u8 field_0x77c[4];
58+
/* 0x0780 */ J3DModel* mpModel[8];
59+
/* 0x07a0 */ u8 field_0x7a0[0x7a4 - 0x7a0];
60+
/* 0x07a4 */ request_of_phase_process_class mPhaseReq;
61+
/* 0x07ac */ dCcD_Stts field_0x7ac[8];
62+
/* 0x098c */ dCcD_Sph mColliders[8];
6163
/* 0x134c */ dCcD_Cyl mCyl;
62-
/* 0x1488 */ u8 field_0x1488[0x14b0 - 0x1488];
64+
/* 0x1488 */ dCcU_AtInfo field_0x1488;
65+
/* 0x148C */ int field_0x148c;
6366
};
6467

6568
STATIC_ASSERT(sizeof(daObjOCTHASHI_c) == 0x14b0);

include/d/actor/d_a_obj_sekizoa.h

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*/
1414
class daObj_Sekizoa_c : public daNpcT_c {
1515
public:
16+
typedef void (daObj_Sekizoa_c::*cutFunc)(int);
17+
1618
/* 80CCE34C */ ~daObj_Sekizoa_c();
1719
/* 80CCE570 */ void create();
1820
/* 80CCE8B0 */ void CreateHeap();
@@ -48,14 +50,14 @@ class daObj_Sekizoa_c : public daNpcT_c {
4850
/* 80CD3F08 */ void wait(void*);
4951
/* 80CD425C */ void puzzle(void*);
5052
/* 80CD45B0 */ void talk(void*);
51-
/* 80CD5A40 */ daObj_Sekizoa_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
52-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
53-
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
54-
daNpcT_evtData_c const*, char**);
53+
/* 80CD5A40 */ daObj_Sekizoa_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
54+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
55+
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, daNpcT_evtData_c const* param_7,
56+
char** param_8) : daNpcT_c(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8){}
5557
/* 80CD5B84 */ void chkGoal();
5658

57-
/* 80CD5B7C */ s32 getBackboneJointNo();
58-
/* 80CD5B74 */ s32 getHeadJointNo();
59+
/* 80CD5B7C */ s32 getBackboneJointNo() { return 1; }
60+
/* 80CD5B74 */ s32 getHeadJointNo() { return 3; }
5961
/* 80CCF358 */ void afterJntAnm(int);
6062
/* 80CCF3E4 */ void setParam();
6163
/* 80CCF6BC */ BOOL checkChangeEvt();
@@ -124,8 +126,8 @@ class daObj_Sekizoa_c : public daNpcT_c {
124126
return type;
125127
}
126128

127-
static void* mCutNameList[9];
128-
static u8 mCutList[108];
129+
static char* mCutNameList[9];
130+
static cutFunc mCutList[9];
129131

130132
/* 0x0E40 */ u8 field_0xe40[0x10C8 - 0xE40];
131133
/* 0x10C8 */ u8 field_0x10c8;
@@ -136,4 +138,10 @@ class daObj_Sekizoa_c : public daNpcT_c {
136138
/* 0x1174 */ u8 field_0x1174[0x1180 - 0x1174];
137139
};
138140

141+
struct daObj_Sekizoa_Param_c {
142+
/* 80CD5C30 */ virtual ~daObj_Sekizoa_Param_c() {}
143+
144+
static u8 const m[156];
145+
};
146+
139147
#endif /* D_A_OBJ_SEKIZOA_H */

src/d/actor/d_a_obj_octhashi.cpp

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@
55

66
#include "d/actor/d_a_obj_octhashi.h"
77
#include "d/d_cc_d.h"
8-
#include "dol2asm.h"
9-
#include "d/d_resorce.h"
108
#include "SSystem/SComponent/c_math.h"
119
#include "d/d_bg_w.h"
1210
#include "d/d_cc_uty.h"
13-
#include "Z2AudioLib/Z2Instances.h"
11+
#include "d/d_com_inf_game.h"
1412

15-
//
16-
// Declarations:
17-
//
18-
19-
/* ############################################################################################## */
2013
/* 80CA6480-80CA64C0 000000 0040+00 6/6 0/0 0/0 .rodata ccSphSrc$3655 */
2114
const static dCcD_SrcSph ccSphSrc = {
2215
{
@@ -50,14 +43,14 @@ static dCcD_SrcCyl ccCylSrc = {
5043
} // mCyl
5144
};
5245

53-
static s8 lbl_584_bss_0 = 0;
46+
static s8 l_cyl_height_init = 0;
5447

5548
/* 80CA4BB8-80CA4D98 000078 01E0+00 1/1 0/0 0/0 .text initCcCylinder__15daObjOCTHASHI_cFv
5649
*/
5750
void daObjOCTHASHI_c::initCcCylinder() {
58-
if (lbl_584_bss_0 == 0) {
51+
if (l_cyl_height_init == 0) {
5952
ccCylSrc.mCyl.mHeight = (f32)(mPieceNum + 1) * 800.0f - 100.f;
60-
lbl_584_bss_0 = 1;
53+
l_cyl_height_init = 1;
6154
}
6255
for (int idx = 0; idx < mPieceNum; ++idx) {
6356
field_0x7ac[idx].Init(200, 0xff, this);
@@ -306,16 +299,10 @@ static int daObjOCTHASHI_Execute(daObjOCTHASHI_c* i_this) {
306299
return i_this->MoveBGExecute();
307300
}
308301

309-
// FIXME: Does this go here?
310-
static bool daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0);
311-
312302
/* 80CA5AE0-80CA5B98 000FA0 00B8+00 1/0 0/0 0/0 .text CreateHeap__15daObjOCTHASHI_cFv */
313303
int daObjOCTHASHI_c::CreateHeap() {
314304
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName[0], "S_octhashi00.bmd");
315-
316-
if (modelData == NULL) {
317-
// FIXME: For shield decomp matching, needs a JUT assert.
318-
}
305+
JUT_ASSERT(84, modelData != 0);
319306

320307
int idx = 0;
321308
while (idx < mPieceNum) {
@@ -329,33 +316,6 @@ int daObjOCTHASHI_c::CreateHeap() {
329316
return 1;
330317
}
331318

332-
/* 80CA65CC-80CA65EC -00001 0020+00 1/0 0/0 0/0 .data l_daObjOCTHASHI_Method */
333-
static actor_method_class l_daObjOCTHASHI_Method = {
334-
(process_method_func)daObjOCTHASHI_Create,
335-
(process_method_func)daObjOCTHASHI_Delete,
336-
(process_method_func)daObjOCTHASHI_Execute,
337-
(process_method_func)daObjOCTHASHI_IsDelete,
338-
(process_method_func)daObjOCTHASHI_Draw,
339-
};
340-
341-
/* 80CA65EC-80CA661C -00001 0030+00 0/0 0/0 1/0 .data g_profile_OCTHASHI */
342-
extern actor_process_profile_definition g_profile_OCTHASHI = {
343-
fpcLy_CURRENT_e, // mLayerID
344-
3, // mListID
345-
fpcPi_CURRENT_e, // mListPrio
346-
PROC_OCTHASHI, // mProcName
347-
&g_fpcLf_Method.base, // sub_method
348-
sizeof(daObjOCTHASHI_c), // mSize
349-
0, // mSizeOther
350-
0, // mParameters
351-
&g_fopAc_Method.base, // sub_method
352-
465, // mPriority
353-
&l_daObjOCTHASHI_Method, // sub_method
354-
0x00040000, // mStatus
355-
fopAc_ACTOR_e, // mActorType
356-
fopAc_CULLBOX_CUSTOM_e, // cullType
357-
};
358-
359319
/* 80CA5B98-80CA5EE4 001058 034C+00 1/1 0/0 0/0 .text create__15daObjOCTHASHI_cFv */
360320
int daObjOCTHASHI_c::create() {
361321
fopAcM_SetupActor(this, daObjOCTHASHI_c);
@@ -397,8 +357,8 @@ int daObjOCTHASHI_c::create() {
397357

398358
/* 80CA6254-80CA625C 001714 0008+00 1/0 0/0 0/0 .text daObjOCTHASHI_IsDelete__FP15daObjOCTHASHI_c
399359
*/
400-
static bool daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0) {
401-
return true;
360+
static int daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0) {
361+
return 1;
402362
}
403363

404364
/* 80CA62A4-80CA62F8 001764 0054+00 1/0 0/0 0/0 .text Create__15daObjOCTHASHI_cFv */
@@ -437,4 +397,31 @@ int daObjOCTHASHI_c::Delete() {
437397
return 1;
438398
}
439399

400+
/* 80CA65CC-80CA65EC -00001 0020+00 1/0 0/0 0/0 .data l_daObjOCTHASHI_Method */
401+
static actor_method_class l_daObjOCTHASHI_Method = {
402+
(process_method_func)daObjOCTHASHI_Create,
403+
(process_method_func)daObjOCTHASHI_Delete,
404+
(process_method_func)daObjOCTHASHI_Execute,
405+
(process_method_func)daObjOCTHASHI_IsDelete,
406+
(process_method_func)daObjOCTHASHI_Draw,
407+
};
408+
409+
/* 80CA65EC-80CA661C -00001 0030+00 0/0 0/0 1/0 .data g_profile_OCTHASHI */
410+
extern actor_process_profile_definition g_profile_OCTHASHI = {
411+
fpcLy_CURRENT_e, // mLayerID
412+
3, // mListID
413+
fpcPi_CURRENT_e, // mListPrio
414+
PROC_OCTHASHI, // mProcName
415+
&g_fpcLf_Method.base, // sub_method
416+
sizeof(daObjOCTHASHI_c), // mSize
417+
0, // mSizeOther
418+
0, // mParameters
419+
&g_fopAc_Method.base, // sub_method
420+
465, // mPriority
421+
&l_daObjOCTHASHI_Method, // sub_method
422+
0x00040000, // mStatus
423+
fopAc_ACTOR_e, // mActorType
424+
fopAc_CULLBOX_CUSTOM_e, // cullType
425+
};
426+
440427
/* 80CA6550-80CA6550 0000D0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

0 commit comments

Comments
 (0)