mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-02 17:48:21 -04:00
Fix most vtable issues (#2706)
This commit is contained in:
@@ -943,16 +943,13 @@ static void dummy_misc() {
|
||||
J2DPane* pane;
|
||||
J2DPicture* picture;
|
||||
J2DAnmBase* anmBase;
|
||||
J2DAnmColor* anmColor;
|
||||
delete anmBase;
|
||||
delete anmColor;
|
||||
picture->setBlack(JUtility::TColor(0, 0, 0, 0));
|
||||
picture->setWhite(JUtility::TColor(0, 0, 0, 0));
|
||||
pane->getTypeID();
|
||||
pane->makeMatrix(0.0f, 0.0f);
|
||||
pane->calcMtx();
|
||||
screen->clearAnmTransform();
|
||||
anmColor->searchUpdateMaterialID(screen);
|
||||
}
|
||||
|
||||
/* 80053CDC-80053CEC 04E61C 0010+00 0/0 2/2 0/0 .text init__8cM_rnd_cFiii */
|
||||
|
||||
@@ -2870,8 +2870,13 @@ void dFile_select_c::setSaveData() {
|
||||
/* 8018D0E4-8018D25C 187A24 0178+00 20/20 0/0 0/0 .text headerTxtSet__14dFile_select_cFUsUcUc */
|
||||
void dFile_select_c::headerTxtSet(u16 param_1, u8 param_2, u8 param_3) {
|
||||
static f32 fontsize[2] = {21.0f, 27.0f};
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
static f32 linespace[2] = {22.0f, 20.0f};
|
||||
static f32 charspace[2] = {2.0f, 3.0f};
|
||||
#else
|
||||
static f32 linespace[2] = {21.0f, 20.0f};
|
||||
static f32 charspace[2] = {0.0f, 0.0f};
|
||||
#endif
|
||||
|
||||
u8 uVar1 = field_0x021c ^ 1;
|
||||
if (param_3 != 0) {
|
||||
@@ -3322,7 +3327,7 @@ void dFile_select_c::MemCardStatCheck() {
|
||||
field_0x0280 = false;
|
||||
field_0x0284 = NULL;
|
||||
field_0x0273 = 2;
|
||||
field_0x0290 = &dFile_select_c::noFileSpaceDispInit;
|
||||
field_0x0290 = &dFile_select_c::noSaveSelDispInit;
|
||||
field_0x0274 = 3;
|
||||
break;
|
||||
case 8:
|
||||
@@ -3361,11 +3366,7 @@ void dFile_select_c::MemCardStatCheck() {
|
||||
field_0x0280 = false;
|
||||
field_0x0284 = NULL;
|
||||
field_0x0273 = 2;
|
||||
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
|
||||
field_0x0290 = &dFile_select_c::noFileSpaceDispInit;
|
||||
#else
|
||||
field_0x0290 = &dFile_select_c::noSaveSelDispInit;
|
||||
#endif
|
||||
field_0x0274 = 18;
|
||||
break;
|
||||
case 2:
|
||||
@@ -4358,6 +4359,3 @@ void dFile_select3D_c::toItem3Dpos(f32 param_0, f32 param_1, f32 param_2, cXyz*
|
||||
void dFile_select3D_c::calcViewMtx(Mtx param_0) {
|
||||
cMtx_lookAt(param_0, &cXyz(0.0f, 0.0f, -1000.0f), &cXyz::Zero, &cXyz(0.0f, 1.0f, 0.0f), 0);
|
||||
}
|
||||
|
||||
// Fakematch, should be defined in header but it gets put in the wrong TU
|
||||
void J2DAnmTransform::getTransform(u16, J3DTransformInfo*) const {}
|
||||
|
||||
@@ -61,26 +61,6 @@ static calibrationFunc calibration_process[] = {
|
||||
&dMenu_Option_c::calibration_close2_move,
|
||||
};
|
||||
|
||||
// Unclear why this is created
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
static u8 calibration_padding[0x24 /* padding */] = {
|
||||
/* padding */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#else
|
||||
static u8 calibration_padding[0x24 /* padding */] = {
|
||||
/* padding */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif
|
||||
#pragma pop
|
||||
|
||||
enum SelectType {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
SelectType0_JPN,
|
||||
|
||||
@@ -80,33 +80,6 @@ dMs_HIO_c::dMs_HIO_c() {
|
||||
field_0xf = 0;
|
||||
}
|
||||
|
||||
// Need 0x24 bytes of padding with no symbol between dDlst_MenuSaveExplain_c::__vtable and dMs_HIO_c::__vtable
|
||||
// This is likely caused by the vtable of an abstract base class getting put there and then stripped out.
|
||||
// Not sure which abstract base class could go there though, so we simulate it with some dummy classes for now.
|
||||
class dummy_abstract_class {
|
||||
public:
|
||||
virtual void virt_func_0() = 0;
|
||||
virtual void virt_func_1() = 0;
|
||||
virtual void virt_func_2() = 0;
|
||||
virtual void virt_func_3() = 0;
|
||||
virtual void virt_func_4() = 0;
|
||||
virtual void virt_func_5() = 0;
|
||||
virtual void virt_func_6() = 0;
|
||||
};
|
||||
class dummy_child_class : dummy_abstract_class {
|
||||
virtual void virt_func_0();
|
||||
virtual void virt_func_1();
|
||||
virtual void virt_func_2();
|
||||
virtual void virt_func_3();
|
||||
virtual void virt_func_4();
|
||||
virtual void virt_func_5();
|
||||
virtual void virt_func_6();
|
||||
};
|
||||
static dummy_child_class dummy() {
|
||||
dummy_child_class temp;
|
||||
return temp;
|
||||
}
|
||||
|
||||
/* 801EF6A0-801EF7AC 1E9FE0 010C+00 0/0 3/3 0/0 .text __ct__12dMenu_save_cFv */
|
||||
dMenu_save_c::dMenu_save_c() {
|
||||
mpScrnExplain = NULL;
|
||||
|
||||
@@ -1021,9 +1021,6 @@ void dMsgScrn3Select_c::selectTrans() {
|
||||
}
|
||||
}
|
||||
|
||||
// following data are unused so unsure how this data is properly setup
|
||||
static u32 unkdata[9] = {0};
|
||||
|
||||
/* 8023B870-8023B914 2361B0 00A4+00 7/7 0/0 0/0 .text selectAnimeTransform__17dMsgScrn3Select_cFi
|
||||
*/
|
||||
void dMsgScrn3Select_c::selectAnimeTransform(int i_sel) {
|
||||
|
||||
@@ -566,38 +566,3 @@ void dSelect_cursor_c::setBckAnimation(J2DAnmTransformKey* param_0) {
|
||||
void dSelect_cursor_c::moveCenter(J2DPane* i_pane, f32 i_x, f32 i_y) {
|
||||
i_pane->translate(i_x,i_y);
|
||||
}
|
||||
|
||||
// Need 0x30 bytes of padding with no symbol between btk2_name$3688 and dSelect_cursor_c::__vtable
|
||||
// This is likely caused by the vtables of abstract base classes (likely from dolzel.pch) getting
|
||||
// put there and then stripped out.
|
||||
// Not sure which abstract base classes could go there though, so we simulate it with some dummy
|
||||
// classes for now.
|
||||
class dummy_abstract_class {
|
||||
public:
|
||||
virtual void virt_func_0() = 0;
|
||||
virtual void virt_func_1() = 0;
|
||||
virtual void virt_func_2() = 0;
|
||||
virtual void virt_func_3() = 0;
|
||||
virtual void virt_func_4() = 0;
|
||||
virtual void virt_func_5() = 0;
|
||||
virtual void virt_func_6() = 0;
|
||||
virtual void virt_func_7() = 0;
|
||||
virtual void virt_func_8() = 0;
|
||||
virtual void virt_func_9() = 0;
|
||||
};
|
||||
class dummy_child_class : dummy_abstract_class {
|
||||
virtual void virt_func_0();
|
||||
virtual void virt_func_1();
|
||||
virtual void virt_func_2();
|
||||
virtual void virt_func_3();
|
||||
virtual void virt_func_4();
|
||||
virtual void virt_func_5();
|
||||
virtual void virt_func_6();
|
||||
virtual void virt_func_7();
|
||||
virtual void virt_func_8();
|
||||
virtual void virt_func_9();
|
||||
};
|
||||
static dummy_child_class dummy() {
|
||||
dummy_child_class temp;
|
||||
return temp;
|
||||
}
|
||||
|
||||
@@ -1615,13 +1615,10 @@ int dShopSystem_c::getFlowNodeNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
// fake, used to fix weak function order
|
||||
void dShopSystem_c::dummyWeakOrder() {
|
||||
static void dummy() {
|
||||
static const char* bck_str = ".bck";
|
||||
static const char* btp_str = ".btp";
|
||||
static const char* btk_str = ".btk";
|
||||
|
||||
getResName2(0);
|
||||
}
|
||||
|
||||
/* 8019AB1C-8019AB24 19545C 0008+00 0/0 0/0 8/8 .text setSellItemMax__13dShopSystem_cFUc
|
||||
|
||||
Reference in New Issue
Block a user