Minor work on octhashi/sekizoa I had lying around (#2314)

* Minor octhashi changes

* Minor work on sekizoa
This commit is contained in:
hatal175 2025-03-04 04:00:38 +02:00 committed by GitHub
parent 19e18654c9
commit 294d104bc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 255 additions and 1773 deletions

View File

@ -82,4 +82,4 @@ __vt__8cM3dGSph = .data:0x000000B0; // type:object size:0xC scope:global
__vt__8cM3dGCyl = .data:0x000000BC; // type:object size:0xC scope:global
__vt__8cM3dGAab = .data:0x000000C8; // type:object size:0xC scope:global
__vt__15daObjOCTHASHI_c = .data:0x000000D4; // type:object size:0x28 scope:global
lbl_584_bss_0 = .bss:0x00000000; // type:object size:0x1 scope:local data:byte
l_cyl_height_init = .bss:0x00000000; // type:object size:0x1 scope:local data:byte

View File

@ -1,8 +1,10 @@
#ifndef D_A_OBJ_OCTHASHI_H
#define D_A_OBJ_OCTHASHI_H
#include "SSystem/SComponent/c_phase.h"
#include "d/d_bg_s_movebg_actor.h"
#include "d/d_com_inf_game.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"
/**
* @ingroup actors-objects
@ -52,14 +54,15 @@ public:
/* 0x6e8 */ s16 field_0x6e8;
/* 0x6ec */ Z2Creature mSound;
private:
/* 0x77c */ u8 field_0x77c[4];
/* 0x780 */ J3DModel* mpModel[8];
/* 0x7a0 */ u8 field_0x7a0[0x7a4 - 0x7a0];
/* 0x7a4 */ request_of_phase_process_class mPhaseReq;
/* 0x7ac */ dCcD_Stts field_0x7ac[8];
/* 0x98c */ dCcD_Sph mColliders[8];
/* 0x077c */ u8 field_0x77c[4];
/* 0x0780 */ J3DModel* mpModel[8];
/* 0x07a0 */ u8 field_0x7a0[0x7a4 - 0x7a0];
/* 0x07a4 */ request_of_phase_process_class mPhaseReq;
/* 0x07ac */ dCcD_Stts field_0x7ac[8];
/* 0x098c */ dCcD_Sph mColliders[8];
/* 0x134c */ dCcD_Cyl mCyl;
/* 0x1488 */ u8 field_0x1488[0x14b0 - 0x1488];
/* 0x1488 */ dCcU_AtInfo field_0x1488;
/* 0x148C */ int field_0x148c;
};
STATIC_ASSERT(sizeof(daObjOCTHASHI_c) == 0x14b0);

View File

@ -13,6 +13,8 @@
*/
class daObj_Sekizoa_c : public daNpcT_c {
public:
typedef void (daObj_Sekizoa_c::*cutFunc)(int);
/* 80CCE34C */ ~daObj_Sekizoa_c();
/* 80CCE570 */ void create();
/* 80CCE8B0 */ void CreateHeap();
@ -48,14 +50,14 @@ public:
/* 80CD3F08 */ void wait(void*);
/* 80CD425C */ void puzzle(void*);
/* 80CD45B0 */ void talk(void*);
/* 80CD5A40 */ daObj_Sekizoa_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
daNpcT_evtData_c const*, char**);
/* 80CD5A40 */ daObj_Sekizoa_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, daNpcT_evtData_c const* param_7,
char** param_8) : daNpcT_c(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8){}
/* 80CD5B84 */ void chkGoal();
/* 80CD5B7C */ s32 getBackboneJointNo();
/* 80CD5B74 */ s32 getHeadJointNo();
/* 80CD5B7C */ s32 getBackboneJointNo() { return 1; }
/* 80CD5B74 */ s32 getHeadJointNo() { return 3; }
/* 80CCF358 */ void afterJntAnm(int);
/* 80CCF3E4 */ void setParam();
/* 80CCF6BC */ BOOL checkChangeEvt();
@ -124,8 +126,8 @@ public:
return type;
}
static void* mCutNameList[9];
static u8 mCutList[108];
static char* mCutNameList[9];
static cutFunc mCutList[9];
/* 0x0E40 */ u8 field_0xe40[0x10C8 - 0xE40];
/* 0x10C8 */ u8 field_0x10c8;
@ -136,4 +138,10 @@ public:
/* 0x1174 */ u8 field_0x1174[0x1180 - 0x1174];
};
struct daObj_Sekizoa_Param_c {
/* 80CD5C30 */ virtual ~daObj_Sekizoa_Param_c() {}
static u8 const m[156];
};
#endif /* D_A_OBJ_SEKIZOA_H */

View File

@ -5,18 +5,11 @@
#include "d/actor/d_a_obj_octhashi.h"
#include "d/d_cc_d.h"
#include "dol2asm.h"
#include "d/d_resorce.h"
#include "SSystem/SComponent/c_math.h"
#include "d/d_bg_w.h"
#include "d/d_cc_uty.h"
#include "Z2AudioLib/Z2Instances.h"
#include "d/d_com_inf_game.h"
//
// Declarations:
//
/* ############################################################################################## */
/* 80CA6480-80CA64C0 000000 0040+00 6/6 0/0 0/0 .rodata ccSphSrc$3655 */
const static dCcD_SrcSph ccSphSrc = {
{
@ -50,14 +43,14 @@ static dCcD_SrcCyl ccCylSrc = {
} // mCyl
};
static s8 lbl_584_bss_0 = 0;
static s8 l_cyl_height_init = 0;
/* 80CA4BB8-80CA4D98 000078 01E0+00 1/1 0/0 0/0 .text initCcCylinder__15daObjOCTHASHI_cFv
*/
void daObjOCTHASHI_c::initCcCylinder() {
if (lbl_584_bss_0 == 0) {
if (l_cyl_height_init == 0) {
ccCylSrc.mCyl.mHeight = (f32)(mPieceNum + 1) * 800.0f - 100.f;
lbl_584_bss_0 = 1;
l_cyl_height_init = 1;
}
for (int idx = 0; idx < mPieceNum; ++idx) {
field_0x7ac[idx].Init(200, 0xff, this);
@ -306,16 +299,10 @@ static int daObjOCTHASHI_Execute(daObjOCTHASHI_c* i_this) {
return i_this->MoveBGExecute();
}
// FIXME: Does this go here?
static bool daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0);
/* 80CA5AE0-80CA5B98 000FA0 00B8+00 1/0 0/0 0/0 .text CreateHeap__15daObjOCTHASHI_cFv */
int daObjOCTHASHI_c::CreateHeap() {
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName[0], "S_octhashi00.bmd");
if (modelData == NULL) {
// FIXME: For shield decomp matching, needs a JUT assert.
}
JUT_ASSERT(84, modelData != 0);
int idx = 0;
while (idx < mPieceNum) {
@ -329,33 +316,6 @@ int daObjOCTHASHI_c::CreateHeap() {
return 1;
}
/* 80CA65CC-80CA65EC -00001 0020+00 1/0 0/0 0/0 .data l_daObjOCTHASHI_Method */
static actor_method_class l_daObjOCTHASHI_Method = {
(process_method_func)daObjOCTHASHI_Create,
(process_method_func)daObjOCTHASHI_Delete,
(process_method_func)daObjOCTHASHI_Execute,
(process_method_func)daObjOCTHASHI_IsDelete,
(process_method_func)daObjOCTHASHI_Draw,
};
/* 80CA65EC-80CA661C -00001 0030+00 0/0 0/0 1/0 .data g_profile_OCTHASHI */
extern actor_process_profile_definition g_profile_OCTHASHI = {
fpcLy_CURRENT_e, // mLayerID
3, // mListID
fpcPi_CURRENT_e, // mListPrio
PROC_OCTHASHI, // mProcName
&g_fpcLf_Method.base, // sub_method
sizeof(daObjOCTHASHI_c), // mSize
0, // mSizeOther
0, // mParameters
&g_fopAc_Method.base, // sub_method
465, // mPriority
&l_daObjOCTHASHI_Method, // sub_method
0x00040000, // mStatus
fopAc_ACTOR_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
};
/* 80CA5B98-80CA5EE4 001058 034C+00 1/1 0/0 0/0 .text create__15daObjOCTHASHI_cFv */
int daObjOCTHASHI_c::create() {
fopAcM_SetupActor(this, daObjOCTHASHI_c);
@ -397,8 +357,8 @@ int daObjOCTHASHI_c::create() {
/* 80CA6254-80CA625C 001714 0008+00 1/0 0/0 0/0 .text daObjOCTHASHI_IsDelete__FP15daObjOCTHASHI_c
*/
static bool daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0) {
return true;
static int daObjOCTHASHI_IsDelete(daObjOCTHASHI_c* param_0) {
return 1;
}
/* 80CA62A4-80CA62F8 001764 0054+00 1/0 0/0 0/0 .text Create__15daObjOCTHASHI_cFv */
@ -437,4 +397,31 @@ int daObjOCTHASHI_c::Delete() {
return 1;
}
/* 80CA65CC-80CA65EC -00001 0020+00 1/0 0/0 0/0 .data l_daObjOCTHASHI_Method */
static actor_method_class l_daObjOCTHASHI_Method = {
(process_method_func)daObjOCTHASHI_Create,
(process_method_func)daObjOCTHASHI_Delete,
(process_method_func)daObjOCTHASHI_Execute,
(process_method_func)daObjOCTHASHI_IsDelete,
(process_method_func)daObjOCTHASHI_Draw,
};
/* 80CA65EC-80CA661C -00001 0030+00 0/0 0/0 1/0 .data g_profile_OCTHASHI */
extern actor_process_profile_definition g_profile_OCTHASHI = {
fpcLy_CURRENT_e, // mLayerID
3, // mListID
fpcPi_CURRENT_e, // mListPrio
PROC_OCTHASHI, // mProcName
&g_fpcLf_Method.base, // sub_method
sizeof(daObjOCTHASHI_c), // mSize
0, // mSizeOther
0, // mParameters
&g_fopAc_Method.base, // sub_method
465, // mPriority
&l_daObjOCTHASHI_Method, // sub_method
0x00040000, // mStatus
fopAc_ACTOR_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
};
/* 80CA6550-80CA6550 0000D0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

File diff suppressed because it is too large Load Diff