mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_meter2_info equivalent (#2514)
* d_meter2_info equivalent * Match daMP_Reader * d_a_e_fs equivalent
This commit is contained in:
@@ -129,7 +129,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
|
||||
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
|
||||
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
|
||||
s_AtCount__22@unnamed@d_a_e_fs_cpp@ = .bss:0x00000046; // type:object size:0x2 scope:global data:2byte
|
||||
lbl_190_bss_48 = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
hioInit = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
@3933 = .bss:0x0000004C; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000058; // type:object size:0x1C scope:global data:byte
|
||||
@4275 = .bss:0x00000074; // type:object size:0xC scope:local
|
||||
|
||||
@@ -128,7 +128,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
|
||||
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
|
||||
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
|
||||
s_AtCount__22@unnamed@d_a_e_fs_cpp@ = .bss:0x00000046; // type:object size:0x2 scope:global data:2byte
|
||||
lbl_190_bss_48 = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
hioInit = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
@3933 = .bss:0x0000004C; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000058; // type:object size:0x1C scope:global data:byte
|
||||
@4275 = .bss:0x00000074; // type:object size:0xC scope:local
|
||||
|
||||
@@ -128,7 +128,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
|
||||
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
|
||||
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
|
||||
s_AtCount__22@unnamed@d_a_e_fs_cpp@ = .bss:0x00000046; // type:object size:0x2 scope:global data:2byte
|
||||
lbl_190_bss_48 = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
hioInit = .bss:0x00000048; // type:object size:0x1 data:byte
|
||||
@3933 = .bss:0x0000004C; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000058; // type:object size:0x1C scope:global data:byte
|
||||
@4275 = .bss:0x00000074; // type:object size:0xC scope:local
|
||||
|
||||
+2
-2
@@ -653,7 +653,7 @@ config.libs = [
|
||||
Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_meter_map.cpp"),
|
||||
Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_meter_string.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "d/d_meter2_draw.cpp"),
|
||||
Object(NonMatching, "d/d_meter2_info.cpp"),
|
||||
Object(Equivalent, "d/d_meter2_info.cpp"),
|
||||
Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_meter2.cpp"),
|
||||
Object(MatchingFor("GZ2E01"), "d/d_msg_out_font.cpp"),
|
||||
Object(NonMatching, "d/d_msg_class.cpp"),
|
||||
@@ -1662,7 +1662,7 @@ config.libs = [
|
||||
ActorRel(Equivalent, "d_a_e_dt"), # weak func order
|
||||
ActorRel(NonMatching, "d_a_e_fb"),
|
||||
ActorRel(NonMatching, "d_a_e_fk"),
|
||||
ActorRel(NonMatching, "d_a_e_fs"),
|
||||
ActorRel(Equivalent, "d_a_e_fs"), # weak func order
|
||||
ActorRel(Equivalent, "d_a_e_fz"), # weak func order
|
||||
ActorRel(NonMatching, "d_a_e_gb"),
|
||||
ActorRel(NonMatching, "d_a_e_ge"),
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
* @details
|
||||
*
|
||||
*/
|
||||
class e_fs_class : public fopEn_enemy_c {
|
||||
class e_fs_class {
|
||||
public:
|
||||
/* 0x000 */ fopEn_enemy_c mEnemy;
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x5B4 */ u8 field_0x5b4;
|
||||
/* 0x5B5 */ u8 field_0x5b5;
|
||||
|
||||
+142
-142
File diff suppressed because it is too large
Load Diff
@@ -2693,14 +2693,18 @@ void daMP_ReadThreadCancel() {
|
||||
}
|
||||
|
||||
/* 80875A28-80875B0C 003348 00E4+00 1/1 0/0 0/0 .text daMP_Reader__FPv */
|
||||
// NONMATCHINIG - regalloc
|
||||
void daMP_Reader(void*) {
|
||||
s32 r28 = 0;
|
||||
s32 r30 = daMP_ActivePlayer.field_0xb8;
|
||||
s32 r29 = daMP_ActivePlayer.field_0xbc;
|
||||
daMP_THPReadBuffer* readBuf;
|
||||
int r30;
|
||||
int r29;
|
||||
int r28;
|
||||
int readBytes;
|
||||
r28 = 0;
|
||||
r30 = daMP_ActivePlayer.field_0xb8;
|
||||
r29 = daMP_ActivePlayer.field_0xbc;
|
||||
while (true) {
|
||||
daMP_THPReadBuffer* readBuf = daMP_PopFreeReadBuffer();
|
||||
int readBytes = DVDReadPrio(&daMP_ActivePlayer.mFileInfo, readBuf->m00, r29, r30, 2);
|
||||
readBuf = daMP_PopFreeReadBuffer();
|
||||
readBytes = DVDReadPrio(&daMP_ActivePlayer.mFileInfo, readBuf->m00, r29, r30, 2);
|
||||
if (readBytes != r29) {
|
||||
if (readBytes == -1) {
|
||||
daMP_ActivePlayer.field_0xa8 = -1;
|
||||
@@ -2983,12 +2987,18 @@ static f32 dummyLiteral() {
|
||||
|
||||
/* 8087667C-80876BA8 003F9C 052C+00 1/1 0/0 0/0 .text
|
||||
* daMP_THPGXYuv2RgbSetup__FPC16_GXRenderModeObj */
|
||||
// NONMATCHING - stack slightly too small
|
||||
static void daMP_THPGXYuv2RgbSetup(GXRenderModeObj const* param_0) {
|
||||
int width = param_0->fbWidth;
|
||||
int height = param_0->efbHeight;
|
||||
f32 var_f31 = 0.0f;
|
||||
Mtx sp50;
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
if (!mDoGph_gInf_c::isWide()) {
|
||||
var_f31 = ((u16)height - (width * 808.0f) / 608.0f) * 0.5f;
|
||||
}
|
||||
#endif
|
||||
|
||||
Mtx44 sp50;
|
||||
Mtx sp20;
|
||||
|
||||
GXSetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR);
|
||||
|
||||
+7
-12
@@ -396,7 +396,6 @@ void dMeter2Info_c::getString(u32 i_stringID, char* o_string, JMSMesgEntry_c* i_
|
||||
|
||||
/* 8021C370-8021C544 216CB0 01D4+00 0/0 1/1 0/0 .text
|
||||
* getStringKana__13dMeter2Info_cFUlPcP14JMSMesgEntry_c */
|
||||
// NONMATCHING - regalloc
|
||||
void dMeter2Info_c::getStringKana(u32 i_stringID, char* o_string, JMSMesgEntry_c* i_msgEntry) {
|
||||
strcpy(o_string, "");
|
||||
|
||||
@@ -416,11 +415,9 @@ void dMeter2Info_c::getStringKana(u32 i_stringID, char* o_string, JMSMesgEntry_c
|
||||
|
||||
char* string_ptr = NULL;
|
||||
for (u16 i = 0; i < bmg_inf->entry_num; i++) {
|
||||
u8* entry = ((u8*)bmg_inf + (i * sizeof(JMSMesgEntry_c)));
|
||||
|
||||
// check if i_stringID equals the message entry "Message ID"
|
||||
if (i_stringID == *(u16*)(entry + 0x14)) {
|
||||
string_ptr = (char*)(string_data + *(u32*)(entry + 0x10)); // use entry "String Offset" to get string pointer
|
||||
if (i_stringID == bmg_inf->entries[i].message_id) {
|
||||
string_ptr = (char*)(string_data + bmg_inf->entries[i].string_offset); // use entry "String Offset" to get string pointer
|
||||
|
||||
int var_r29 = 0;
|
||||
int sp14 = 0;
|
||||
@@ -456,7 +453,7 @@ void dMeter2Info_c::getStringKana(u32 i_stringID, char* o_string, JMSMesgEntry_c
|
||||
}
|
||||
|
||||
if (i_msgEntry != NULL) {
|
||||
memcpy(i_msgEntry, entry + 0x10, sizeof(JMSMesgEntry_c));
|
||||
memcpy(i_msgEntry, &bmg_inf->entries[i], sizeof(JMSMesgEntry_c));
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -470,7 +467,6 @@ void dMeter2Info_c::getStringKana(u32 i_stringID, char* o_string, JMSMesgEntry_c
|
||||
|
||||
/* 8021C544-8021C6A4 216E84 0160+00 0/0 32/32 1/1 .text
|
||||
* getStringKanji__13dMeter2Info_cFUlPcP14JMSMesgEntry_c */
|
||||
// NONMATCHING - couple wrong instructions
|
||||
void dMeter2Info_c::getStringKanji(u32 i_stringID, char* o_string, JMSMesgEntry_c* i_msgEntry) {
|
||||
strcpy(o_string, "");
|
||||
|
||||
@@ -491,8 +487,8 @@ void dMeter2Info_c::getStringKanji(u32 i_stringID, char* o_string, JMSMesgEntry_
|
||||
char* string_ptr = NULL;
|
||||
for (u16 i = 0; i < bmg_inf->entry_num; i++) {
|
||||
// check if i_stringID equals the message entry "Message ID"
|
||||
if (i_stringID == *(u16*)(((u8*)bmg_inf + (i * 0x14)) + 0x14)) {
|
||||
string_ptr = (char*)(string_data + *(u32*)(((u8*)bmg_inf + (i * 0x14)) + 0x10)); // use entry "String Offset" to get string pointer
|
||||
if (i_stringID == bmg_inf->entries[i].message_id) {
|
||||
string_ptr = (char*)(string_data + bmg_inf->entries[i].string_offset); // use entry "String Offset" to get string pointer
|
||||
|
||||
int var_r29 = 0;
|
||||
while (var_r29 < 0x200) {
|
||||
@@ -512,7 +508,7 @@ void dMeter2Info_c::getStringKanji(u32 i_stringID, char* o_string, JMSMesgEntry_
|
||||
}
|
||||
|
||||
if (i_msgEntry != NULL) {
|
||||
memcpy(i_msgEntry, ((u8*)bmg_inf + (i * 0x14)) + 0x10, 0x14);
|
||||
memcpy(i_msgEntry, &bmg_inf->entries[i], 0x14);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -1460,7 +1456,6 @@ const char* dMeter2Info_getPlusTextureName() {
|
||||
}
|
||||
|
||||
/* 8021E308-8021E4B0 218C48 01A8+00 0/0 3/3 0/0 .text dMeter2Info_getPixel__FffffffPC7ResTIMG */
|
||||
// NONMATCHING
|
||||
bool dMeter2Info_getPixel(f32 i_posX, f32 i_posY, f32 param_2, f32 param_3, f32 i_sizeX,
|
||||
f32 i_sizeY, ResTIMG const* i_resTimg) {
|
||||
f32 temp_f31 = i_posX - param_2;
|
||||
@@ -1478,7 +1473,7 @@ bool dMeter2Info_getPixel(f32 i_posX, f32 i_posY, f32 param_2, f32 param_3, f32
|
||||
|
||||
JUT_ASSERT(3065, s < i_resTimg->width && t < i_resTimg->height);
|
||||
|
||||
u32 sp1C = ((s & 7) + ((t & 0xFFFFFFFC) * ((timg_width + 7) & 0xFFFFFFF8))) + ((s & 0xFFFFFFF8) << 2) + ((t & 3) << 3);
|
||||
u32 sp1C = (t & ~3) * ((timg_width + 7) & ~7) + ((s & ~7) * 4 + (s & 7)) + (t & 3) * 8;
|
||||
u8* pixel = (u8*)((u32)i_resTimg + (i_resTimg->imageOffset + sp1C));
|
||||
|
||||
JUT_ASSERT(3074, *pixel < i_resTimg->numColors);
|
||||
|
||||
Reference in New Issue
Block a user