Z2Audio player debug work / fix actor method returns (#3140)

* Z2Audio player debug work

* fix actor method returns

* wii build fix
This commit is contained in:
TakaRikka
2026-03-30 02:10:42 -07:00
committed by GitHub
parent cb6ee4b21e
commit 5685fa58c6
30 changed files with 1508 additions and 746 deletions
+514 -509
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -189,8 +189,8 @@ int daE_OC_c::draw() {
return 1;
}
static void daE_OC_Draw(daE_OC_c* i_this) {
i_this->draw();
static int daE_OC_Draw(daE_OC_c* i_this) {
return i_this->draw();
}
daE_OC_c* E_OC_n::m_battle_oc;
@@ -2639,12 +2639,12 @@ int daE_OC_c::execute() {
return 1;
}
static void daE_OC_Execute(daE_OC_c* i_this) {
i_this->execute();
static int daE_OC_Execute(daE_OC_c* i_this) {
return i_this->execute();
}
static bool daE_OC_IsDelete(daE_OC_c* param_0) {
return true;
static int daE_OC_IsDelete(daE_OC_c* param_0) {
return 1;
}
int daE_OC_c::_delete() {
@@ -2662,9 +2662,9 @@ int daE_OC_c::_delete() {
return 1;
}
static void daE_OC_Delete(daE_OC_c* i_this) {
static int daE_OC_Delete(daE_OC_c* i_this) {
fopAcM_RegisterDeleteID(i_this, "E_OC");
i_this->_delete();
return i_this->_delete();
}
int daE_OC_c::CreateHeap() {
@@ -2833,8 +2833,8 @@ cPhs_Step daE_OC_c::create() {
return phase;
}
static void daE_OC_Create(daE_OC_c* i_this) {
i_this->create();
static int daE_OC_Create(daE_OC_c* i_this) {
return i_this->create();
}
static actor_method_class l_daE_OC_Method = {
+3 -3
View File
@@ -495,8 +495,8 @@ int daE_ZS_c::CreateHeap() {
return 1;
}
static void useHeapInit(fopAc_ac_c* i_this) {
static_cast<daE_ZS_c*>(i_this)->CreateHeap();
static int useHeapInit(fopAc_ac_c* i_this) {
return static_cast<daE_ZS_c*>(i_this)->CreateHeap();
}
int daE_ZS_c::create() {
@@ -504,7 +504,7 @@ int daE_ZS_c::create() {
int phase = dComIfG_resLoad(&mPhase, "E_ZS");
if (phase == cPhs_COMPLEATE_e) {
OS_REPORT("E_ZS PARAM %x\n", fopAcM_GetParam(this));
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)useHeapInit, 0xFC0)) {
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0xFC0)) {
return cPhs_ERROR_e;
}
+3 -3
View File
@@ -74,9 +74,9 @@ static char* l_bckFileNameTBL[] = {
static char* l_btpFileNameTBL[] = {"MYNA.btp"};
static void createHeapCallBack(fopAc_ac_c* i_this) {
static int createHeapCallBack(fopAc_ac_c* i_this) {
daMyna_c* a_this = static_cast<daMyna_c*>(i_this);
a_this->createHeap();
return a_this->createHeap();
}
static int jntNodeCallBack(J3DJoint* i_jnt, int param_1) {
@@ -339,7 +339,7 @@ int daMyna_c::create() {
return phase;
}
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)&createHeapCallBack, 0x21F0)) {
if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x21F0)) {
return cPhs_ERROR_e;
}
+6 -7
View File
@@ -194,14 +194,13 @@ int daNpc_solA_c::Execute() {
return execute();
}
void daNpc_solA_c::Draw() {
int daNpc_solA_c::Draw() {
if (mpMatAnm[0] != NULL) {
J3DModelData* mdlData_p = mpMorf[0]->getModel()->getModelData();
mdlData_p->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]);
}
draw(FALSE, FALSE, mpHIO->m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE,
FALSE);
return;
return draw(FALSE, FALSE, mpHIO->m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE, FALSE);
}
BOOL daNpc_solA_c::createHeapCallBack(fopAc_ac_c* a_this) {
@@ -481,12 +480,12 @@ static int daNpc_solA_Execute(void* param_0) {
return static_cast<daNpc_solA_c*>(param_0)->Execute();
}
static void daNpc_solA_Draw(void* param_0) {
static int daNpc_solA_Draw(void* param_0) {
return static_cast<daNpc_solA_c*>(param_0)->Draw();
}
static bool daNpc_solA_IsDelete(void* param_0) {
return true;
static int daNpc_solA_IsDelete(void* param_0) {
return 1;
}
static actor_method_class daNpc_solA_MethodTable = {
+8 -8
View File
@@ -356,21 +356,21 @@ int daObjYtaihou_c::Delete() {
return 1;
}
static void daObjYtaihou_create1st(daObjYtaihou_c* i_this) {
static int daObjYtaihou_create1st(daObjYtaihou_c* i_this) {
fopAcM_ct(i_this, daObjYtaihou_c);
i_this->create1st();
return i_this->create1st();
}
static void daObjYtaihou_MoveBGDelete(daObjYtaihou_c* i_this) {
i_this->MoveBGDelete();
static int daObjYtaihou_MoveBGDelete(daObjYtaihou_c* i_this) {
return i_this->MoveBGDelete();
}
static void daObjYtaihou_MoveBGExecute(daObjYtaihou_c* i_this) {
i_this->MoveBGExecute();
static int daObjYtaihou_MoveBGExecute(daObjYtaihou_c* i_this) {
return i_this->MoveBGExecute();
}
static void daObjYtaihou_MoveBGDraw(daObjYtaihou_c* i_this) {
i_this->Draw();
static int daObjYtaihou_MoveBGDraw(daObjYtaihou_c* i_this) {
return i_this->Draw();
}
static actor_method_class daObjYtaihou_METHODS = {
+2 -2
View File
@@ -310,9 +310,9 @@ int daObjFan_c::Delete() {
return 1;
}
static void daObjFan_create1st(daObjFan_c* param_0) {
static int daObjFan_create1st(daObjFan_c* param_0) {
fopAcM_ct(param_0, daObjFan_c);
param_0->create1st();
return param_0->create1st();
}
static int daObjFan_MoveBGDelete(daObjFan_c* param_0) {
+3 -3
View File
@@ -89,8 +89,8 @@ static void* s_boar_sub(void* i_actor, void* i_data) {
return NULL;
}
static void CheckCreateHeap(fopAc_ac_c* i_this) {
static_cast<daObjIBone_c*>(i_this)->CreateHeap();
static int CheckCreateHeap(fopAc_ac_c* i_this) {
return static_cast<daObjIBone_c*>(i_this)->CreateHeap();
}
void daObjIBone_c::initBaseMtx() {
@@ -150,7 +150,7 @@ int daObjIBone_c::create() {
int result = dComIfG_resLoad(&mPhase, l_arcName);
if (result == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)CheckCreateHeap, 0x860)) {
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x860)) {
return cPhs_ERROR_e;
} else if (!Create()) {
return cPhs_ERROR_e;
+9 -9
View File
@@ -198,24 +198,24 @@ void daObj_Stick_c::setMtx() {
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
static u32 daObj_Stick_Create(void* i_this) {
static int daObj_Stick_Create(void* i_this) {
return static_cast<daObj_Stick_c*>(i_this)->create();
}
static void daObj_Stick_Delete(void* param_0) {
static_cast<daObj_Stick_c*>(param_0)->Delete();
static int daObj_Stick_Delete(void* param_0) {
return static_cast<daObj_Stick_c*>(param_0)->Delete();
}
static void daObj_Stick_Execute(void* param_0) {
static_cast<daObj_Stick_c*>(param_0)->Execute();
static int daObj_Stick_Execute(void* param_0) {
return static_cast<daObj_Stick_c*>(param_0)->Execute();
}
static void daObj_Stick_Draw(void* param_0) {
static_cast<daObj_Stick_c*>(param_0)->Draw();
static int daObj_Stick_Draw(void* param_0) {
return static_cast<daObj_Stick_c*>(param_0)->Draw();
}
static bool daObj_Stick_IsDelete(void* param_0) {
return true;
static int daObj_Stick_IsDelete(void* param_0) {
return 1;
}
static actor_method_class daObj_Stick_MethodTable = {
+28 -48
View File
@@ -34,60 +34,40 @@ static s8* l_loadResPtrnList[3] = {
l_loadResPtrn0,
};
static u8 l_faceMotionAnmData[140] = {
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[5] = {
{-1, 0, 0, 30, 2, 1, 1},
{10, 0, 1, 30, 2, 1, 1},
{8, 2, 1, 32, 2, 1, 0},
{9, 0, 1, 33, 0, 1, 0},
{7, 0, 1, 31, 0, 1, 0},
};
static u8 l_motionAnmData[308] = {
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x01, 0x00, 0x00,
static daNpcT_motionAnmData_c l_motionAnmData[11] = {
{20, 2, 1, 27, 0, 1, 1, 0},
{17, 2, 1, 27, 0, 1, 1, 0},
{18, 2, 1, 27, 0, 1, 1, 0},
{21, 2, 1, 27, 0, 1, 1, 0},
{16, 2, 1, 27, 0, 1, 1, 0},
{15, 2, 1, 27, 0, 1, 1, 0},
{19, 0, 1, 27, 0, 1, 1, 0},
{13, 0, 1, 27, 0, 1, 1, 0},
{14, 2, 1, 27, 0, 1, 1, 0},
{12, 0, 1, 27, 0, 1, 1, 0},
{11, 0, 1, 27, 0, 1, 1, 0},
};
static u8 l_faceMotionSequenceData[80] = {
0x00, 0x01, 0xFF, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x02, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x03, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x04, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[20] = {
{1, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
{0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
{4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
};
static u8 l_motionSequenceData[160] = {
0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x01, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x02, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x05, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x06, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x07, 0xFF, 0x00, 0x00, 0x08, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x09, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x0A, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x03, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x04, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[40] = {
{0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
{2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
{6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, -1, 0}, {8, -1, 0}, {-1, 0, 0}, {-1, 0, 0},
{9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {10, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
{3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
};
const char* daPeru_c::mCutNameList[3] = {
+4 -4
View File
@@ -44,15 +44,15 @@ int daTagMagne_c::_delete() {
return 1;
}
static void daTagMagne_Delete(daTagMagne_c* i_this) {
static int daTagMagne_Delete(daTagMagne_c* i_this) {
int id = fopAcM_GetID(i_this);
i_this->_delete();
return i_this->_delete();
}
static void daTagMagne_Create(fopAc_ac_c* i_this) {
static int daTagMagne_Create(fopAc_ac_c* i_this) {
daTagMagne_c* magne = static_cast<daTagMagne_c*>(i_this);
int id = fopAcM_GetID(i_this);
magne->create();
return magne->create();
}
static actor_method_class l_daTagMagne_Method = {
+2 -2
View File
@@ -315,7 +315,7 @@ void dCsr_mng_c::bloObj_c::calcPaneObjNum(J2DPane* i_pane) {
}
JSUTreeIterator<J2DPane> iter = i_pane->getPaneTree()->getFirstChild();
while (iter != NULL) {
while (iter) {
calcPaneObjNum(*iter);
++iter;
}
@@ -331,7 +331,7 @@ void dCsr_mng_c::bloObj_c::createPaneObj(paneObj_c** i_panes, J2DPane* i_pane) {
}
JSUTreeIterator<J2DPane> iter = i_pane->getPaneTree()->getFirstChild();
while (iter != NULL) {
while (iter) {
createPaneObj(i_panes, *iter);
++iter;
}