process class inheritance vtable fix

This commit is contained in:
PJB3005
2026-03-01 14:34:07 +01:00
parent eaed93ac3a
commit eaff191b47
10 changed files with 53 additions and 12 deletions
+1 -1
View File
@@ -4857,7 +4857,7 @@ int daAlink_c::create() {
dComIfGp_setPlayer(0, this);
dComIfGp_setLinkPlayer(this);
fopAcM_setStageLayer(&base);
fopAcM_setStageLayer(&LEAFDRAW_BASE(this));
if (sceneMode == 7) {
current.pos = dComIfGs_getTurnRestartPos();
+1 -1
View File
@@ -350,7 +350,7 @@ int daGrass_c::create() {
}
m_myObj = this;
fopAcM_setStageLayer(&base);
fopAcM_setStageLayer(&LEAFDRAW_BASE(this));
return cPhs_COMPLEATE_e;
}
+1 -1
View File
@@ -119,7 +119,7 @@ static void* s_hitfish_sub(void* a, void* b) {
if (fopAc_IsActor(a)) {
mg_fish_class* fish = (mg_fish_class*)a;
if (fopAcM_GetName(fish) == PROC_MG_FISH && fish->mCurAction == ACTION_MG_FISH_MF_HIT) {
return &fish->actor.base;
return &LEAFDRAW_BASE(&fish->actor);
}
}
return NULL;
+1 -1
View File
@@ -278,7 +278,7 @@ void daObj_SMTile_c::touchPrtcls(f32 param_1) {
for (int i = 0; i < 21; i++) {
if ((field_0xa28[i] == 1) || (field_0xa28[i] == 2)) {
mParticleIds[i] =
dComIfGp_particle_set(mParticleIds[i], id[field_0xa28[i]], &field_0x788[i], 0, 0);
dComIfGp_particle_set(mParticleIds[i], ::id[field_0xa28[i]], &field_0x788[i], 0, 0);
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(mParticleIds[i]);
if (emitter != NULL) {
f32 dVar6 = mpHIO->m.field_0x4 - mParticleTimers[i];
+6
View File
@@ -171,3 +171,9 @@ int fpcBs_SubCreate(base_process_class* i_proc) {
return cPhs_ERROR_e;
}
}
#if !__MWERKS__
base_process_class::~base_process_class() {
// Nada. Only exists to ensure the base class has a vtable.
}
#endif
+4 -4
View File
@@ -42,7 +42,7 @@ int fpcLf_Delete(leafdraw_class* i_leaf) {
int ret = fpcMtd_Delete(&i_leaf->leaf_methods->base, i_leaf);
UNUSED(ret); // possible fakematch? this line fixes debug regalloc
if (ret == 1) {
i_leaf->base.subtype = 0;
LEAFDRAW_BASE(i_leaf).subtype = 0;
}
return ret;
}
@@ -50,10 +50,10 @@ int fpcLf_Delete(leafdraw_class* i_leaf) {
int g_fpcLf_type;
int fpcLf_Create(leafdraw_class* i_leaf) {
if (i_leaf->base.state.init_state == 0) {
leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)i_leaf->base.profile;
if (LEAFDRAW_BASE(i_leaf).state.init_state == 0) {
leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)LEAFDRAW_BASE(i_leaf).profile;
i_leaf->leaf_methods = pprofile->sub_method;
i_leaf->base.subtype = fpcBs_MakeOfType(&g_fpcLf_type);
LEAFDRAW_BASE(i_leaf).subtype = fpcBs_MakeOfType(&g_fpcLf_type);
fpcDwPi_Init(&i_leaf->draw_priority, pprofile->priority);
i_leaf->unk_0xBC = 0;
}