diff options
| author | Yanis002 <35189056+Yanis002@users.noreply.github.com> | 2025-02-12 20:20:34 +0100 |
|---|---|---|
| committer | Yanis002 <35189056+Yanis002@users.noreply.github.com> | 2025-02-12 20:20:34 +0100 |
| commit | 30bd3562ab974bc479d75d7dcf6f9cb9845ba724 (patch) | |
| tree | 7fafe7b8584521c8bd628dcafe55e573f2063fb0 /src/Main/Message | |
| parent | bfa8a9e376848ee20575fde62718c1a019e86f29 (diff) | |
format
Diffstat (limited to 'src/Main/Message')
| -rw-r--r-- | src/Main/Message/BMG.cpp | 58 | ||||
| -rw-r--r-- | src/Main/Message/BmgRelatedFunctions.cpp | 91 | ||||
| -rw-r--r-- | src/Main/Message/MessageManager.cpp | 133 | ||||
| -rw-r--r-- | src/Main/Message/func_0203c358.cpp | 28 | ||||
| -rw-r--r-- | src/Main/Message/func_0203c72c.cpp | 24 |
5 files changed, 160 insertions, 174 deletions
diff --git a/src/Main/Message/BMG.cpp b/src/Main/Message/BMG.cpp index 15fab32a..cb9deac8 100644 --- a/src/Main/Message/BMG.cpp +++ b/src/Main/Message/BMG.cpp @@ -3,15 +3,15 @@ extern "C" { } #include "Message/BMG.hpp" -char* func_0202ab38(u32* lang); -u32* func_0202d550(int, u32*, char* path, int, int, int); -void func_0202d590(BMGHeader*); +char *func_0202ab38(u32 *lang); +u32 *func_0202d550(int, u32 *, char *path, int, int, int); +void func_0202d590(BMGHeader *); extern u32 *data_027e0ce0[]; extern u32 data_027e05f4; // language -extern u32* data_ov002_0210016c; +extern u32 *data_ov002_0210016c; -static char* sBMGFileNames[BMG_FILE_INDEX_MAX] = { +static char *sBMGFileNames[BMG_FILE_INDEX_MAX] = { "system", // BMG_FILE_INDEX_SYSTEM "regular", // BMG_FILE_INDEX_REGULAR "battle", // BMG_FILE_INDEX_BATTLE @@ -50,26 +50,26 @@ static char* sBMGFileNames[BMG_FILE_INDEX_MAX] = { THUMB void BMGFileInfo::func_020371b4() { this->pHeader = NULL; - this->pINF1 = NULL; - this->pFLW1 = NULL; - this->pFLI1 = NULL; - this->pDAT1 = NULL; + this->pINF1 = NULL; + this->pFLW1 = NULL; + this->pFLI1 = NULL; + this->pDAT1 = NULL; this->mUnk_14 = NULL; this->mUnk_18 = 0; } // non-matching (equivalent) -THUMB u16 BMGFileInfo::func_020371c8(u32* pFile, s16 unk_18) { - SectionBase* pSection; +THUMB u16 BMGFileInfo::func_020371c8(u32 *pFile, s16 unk_18) { + SectionBase *pSection; u16 groupId; u32 i; - BMGHeader* pHeader = (BMGHeader*)pFile; + BMGHeader *pHeader = (BMGHeader *) pFile; - groupId = -1; + groupId = -1; this->mUnk_14 = pHeader; this->mUnk_18 = unk_18; this->pHeader = pHeader; - pSection = (SectionBase*)((u8*)pFile + sizeof(BMGHeader)); + pSection = (SectionBase *) ((u8 *) pFile + sizeof(BMGHeader)); for (i = 0; i < this->mUnk_14->numSections; i++) { switch (pSection->tag) { @@ -80,31 +80,27 @@ THUMB u16 BMGFileInfo::func_020371c8(u32* pFile, s16 unk_18) { // unused break; case BMG_TAG_INF1: - this->pINF1 = (SectionINF1*)pSection; - groupId = this->pINF1->groupId; + this->pINF1 = (SectionINF1 *) pSection; + groupId = this->pINF1->groupId; break; case BMG_TAG_DAT1: //! TODO: fake? - this->pDAT1 = (SectionDAT1*)(pSection + 1); - break; - case BMG_TAG_FLW1: - this->pFLW1 = (SectionFLW1*)pSection; - break; - case BMG_TAG_FLI1: - this->pFLI1 = (SectionFLI1*)pSection; + this->pDAT1 = (SectionDAT1 *) (pSection + 1); break; + case BMG_TAG_FLW1: this->pFLW1 = (SectionFLW1 *) pSection; break; + case BMG_TAG_FLI1: this->pFLI1 = (SectionFLI1 *) pSection; break; } - pSection = (SectionBase*)((u8*)pSection + pSection->size); + pSection = (SectionBase *) ((u8 *) pSection + pSection->size); } return groupId; } -ARM EntryINF1* BMGFileInfo::func_02037258(u16 param_2) { +ARM EntryINF1 *BMGFileInfo::func_02037258(u16 param_2) { if (this->pINF1 != NULL) { if (param_2 < this->pINF1->numEntries) { - return (EntryINF1*)((u32)&this->pINF1->entries + this->pINF1->entrySize * param_2); + return (EntryINF1 *) ((u32) & this->pINF1->entries + this->pINF1->entrySize * param_2); } return NULL; @@ -115,8 +111,8 @@ ARM EntryINF1* BMGFileInfo::func_02037258(u16 param_2) { // non-matching ARM u16 BMGFileInfo::func_0203728c(unk32 param_2) { - SectionFLI1* pFLI1; - EntryFLI1* entry; + SectionFLI1 *pFLI1; + EntryFLI1 *entry; u32 i; u16 j; @@ -151,7 +147,7 @@ ARM u16 BMGFileInfo::func_0203728c(unk32 param_2) { THUMB void BMGGroups::func_020372f0(BMGFileIndex eIndex, s16 unk_18) { char bmgPath[64]; BMGFileInfo bmgFile; - u32* pFile; + u32 *pFile; u16 groupId; // path to the bmg file for the current language (i.e.: "English/Message/battle.bmg") @@ -180,8 +176,8 @@ THUMB void BMGGroups::func_020372f0(BMGFileIndex eIndex, s16 unk_18) { bmgFile.func_020371b4(); // assign sections and set the file info in the groups entries - groupId = bmgFile.func_020371c8(pFile, unk_18); - this->entries[groupId] = bmgFile; + groupId = bmgFile.func_020371c8(pFile, unk_18); + this->entries[groupId] = bmgFile; this->entries[groupId].groupId = groupId; } diff --git a/src/Main/Message/BmgRelatedFunctions.cpp b/src/Main/Message/BmgRelatedFunctions.cpp index cc8da5b6..579d5fe9 100644 --- a/src/Main/Message/BmgRelatedFunctions.cpp +++ b/src/Main/Message/BmgRelatedFunctions.cpp @@ -5,64 +5,65 @@ extern "C" { #include "global.h" #include "types.h" -THUMB void func_0202d3bc(int param_1, unsigned int* param_2, char* path, int param_4, int param_5, bool param_6, int param_7, int param_8) { +THUMB void func_0202d3bc(int param_1, unsigned int *param_2, char *path, int param_4, int param_5, bool param_6, int param_7, + int param_8) { /* - bool bVar1; - dword dVar2; - int iVar3; - dword *pdVar4; - uint uVar5; - dword local_64; - astruct_3 aStack_60; - dword *pdStack_18; - - pdVar4 = (dword *)(uint)param_4; - *(char **)PTR_DWORD_0202d46c = path; - local_64 = DWORD_0202d470; - if (pdVar4 != (dword *)0x0) { - *pdVar4 = DWORD_0202d470; - } - pdStack_18 = pdVar4; - astruct_3(&aStack_60); - bVar1 = FUN_02041e7c(&aStack_60,path); - if (bVar1) { - uVar5 = aStack_60._40_4_ - aStack_60._36_4_; - if (uVar5 != 0) { - if (param_6) { - local_64 = FUN_0202d23c(&aStack_60,param_1,param_2,param_5,0,uVar5,pdVar4,param_7,param_8); - } - else { - if (param_7 == 0) { - dVar2 = FUN_0202d1c4(param_1,param_2,uVar5,param_5); + bool bVar1; + dword dVar2; + int iVar3; + dword *pdVar4; + uint uVar5; + dword local_64; + astruct_3 aStack_60; + dword *pdStack_18; + + pdVar4 = (dword *)(uint)param_4; + *(char **)PTR_DWORD_0202d46c = path; + local_64 = DWORD_0202d470; + if (pdVar4 != (dword *)0x0) { + *pdVar4 = DWORD_0202d470; + } + pdStack_18 = pdVar4; + astruct_3(&aStack_60); + bVar1 = FUN_02041e7c(&aStack_60,path); + if (bVar1) { + uVar5 = aStack_60._40_4_ - aStack_60._36_4_; + if (uVar5 != 0) { + if (param_6) { + local_64 = FUN_0202d23c(&aStack_60,param_1,param_2,param_5,0,uVar5,pdVar4,param_7,param_8); } else { - dVar2 = 0; - if (uVar5 <= param_8) { - dVar2 = param_7; + if (param_7 == 0) { + dVar2 = FUN_0202d1c4(param_1,param_2,uVar5,param_5); } - } - if (dVar2 != 0) { - iVar3 = astruct_3::FUN_02041fa4(&aStack_60,dVar2,uVar5); - if (iVar3 == -1) { - if (param_7 == 0) { - FUN_0202d21c(dVar2); + else { + dVar2 = 0; + if (uVar5 <= param_8) { + dVar2 = param_7; } } - else { - local_64 = dVar2; - if (pdVar4 != (dword *)0x0) { - *pdVar4 = uVar5; + if (dVar2 != 0) { + iVar3 = astruct_3::FUN_02041fa4(&aStack_60,dVar2,uVar5); + if (iVar3 == -1) { + if (param_7 == 0) { + FUN_0202d21c(dVar2); + } + } + else { + local_64 = dVar2; + if (pdVar4 != (dword *)0x0) { + *pdVar4 = uVar5; + } } } } } + astruct_3::FUN_02041ea8(&aStack_60); } - astruct_3::FUN_02041ea8(&aStack_60); - } - return local_64;*/ + return local_64;*/ } -THUMB void func_0202d550(int param_1, unsigned int* param_2, char* path, int param_4, int param_5, bool param_6) { +THUMB void func_0202d550(int param_1, unsigned int *param_2, char *path, int param_4, int param_5, bool param_6) { func_0202d3bc(param_1, param_2, path, param_4, param_5, param_6, 0, 0); } diff --git a/src/Main/Message/MessageManager.cpp b/src/Main/Message/MessageManager.cpp index f663ad59..a1a5da09 100644 --- a/src/Main/Message/MessageManager.cpp +++ b/src/Main/Message/MessageManager.cpp @@ -3,28 +3,29 @@ #include "Player/TouchControl.hpp" #include "System/SysNew.hpp" -extern ARM unk32 func_ov000_020d7f18(u32*, unk32); -extern ARM unk32 func_02037628(u8*); +extern ARM unk32 func_ov000_020d7f18(u32 *, unk32); +extern ARM unk32 func_02037628(u8 *); -extern u32* data_027e0ce0[]; +extern u32 *data_027e0ce0[]; extern u32 data_02056924[]; -extern UnkStruct_MsgProc_Base_unk_2C* data_02068e6c; -extern UnkStruct_MsgProc_Base_unk_2C* data_02068e8c; +extern UnkStruct_MsgProc_Base_unk_2C *data_02068e6c; +extern UnkStruct_MsgProc_Base_unk_2C *data_02068e8c; extern u16 data_02056918[]; extern ActorTypeId data_0205691c[]; struct UnkStruct_027e0ffc { - void func_ov000_020cec60(u16, Vec3p*, Actor*, unk32); + void func_ov000_020cec60(u16, Vec3p *, Actor *, unk32); }; -extern UnkStruct_027e0ffc* data_027e0ffc; +extern UnkStruct_027e0ffc *data_027e0ffc; extern u32 data_027e0618[]; // non-matching -ARM void UnkStruct_027E0C68::func_0203643c(u32 *param_1, UnkStruct_027E0C68* param_2, u32 param_3) { +ARM void UnkStruct_027E0C68::func_0203643c(u32 *param_1, UnkStruct_027E0C68 *param_2, u32 param_3) { BMGGroups *pBVar2 = param_2->pGroups; - *param_1 = ((u32)pBVar2->entries[param_3 >> 0x10].pDAT1 + (pBVar2->entries[param_3 >> 0x10].func_02037258(param_3 & 0xFFFF)->offset & ~1)); + *param_1 = ((u32) pBVar2->entries[param_3 >> 0x10].pDAT1 + + (pBVar2->entries[param_3 >> 0x10].func_02037258(param_3 & 0xFFFF)->offset & ~1)); } // non-matching @@ -47,11 +48,8 @@ THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32 this->pGroups->func_020372f0(BMG_FILE_INDEX_BATTLE, 2); this->pGroups->func_020372f0(BMG_FILE_INDEX_BATTLECOMMON, 2); break; - case 7: - this->pGroups->func_020372f0(BMG_FILE_INDEX_MAINSELECT, 2); - break; - default: - break; + case 7: this->pGroups->func_020372f0(BMG_FILE_INDEX_MAINSELECT, 2); break; + default: break; } for (s32 i = 0; i < ARRAY_LEN(this->mUnk_18); i++) { @@ -85,9 +83,7 @@ THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32 this->mUnk_28[i]->func_0203dc74(0x50, 0x60); this->mUnk_28[i]->mUnk_2c = &data_02068e6c; break; - case 2: - this->mUnk_28[i] = NULL; - break; + case 2: this->mUnk_28[i] = NULL; break; case 3: if (func_0202ab48() == 0) { this->mUnk_28[i] = new(data_027e0ce0[1], 4) MsgProc_Type2(); @@ -97,8 +93,7 @@ THUMB void UnkStruct_027E0C68::func_02036490(unk32 param_2, unk32 param_3, unk32 this->mUnk_28[i] = NULL; } break; - default: - break; + default: break; } if (this->mUnk_28[i] != NULL) { @@ -129,30 +124,30 @@ THUMB void UnkStruct_027E0C68::func_0203665c(void) { } // non-matching -ARM UnkStruct_020397f8* UnkStruct_027E0C68::func_020366c4(void) { +ARM UnkStruct_020397f8 *UnkStruct_027E0C68::func_020366c4(void) { if ((data_02056be4[data_027e077c.mUnk_0] & 1) && !(data_02056be4[data_027e077c.mUnk_0] & 2)) { - return (UnkStruct_020397f8*)this->mUnk_28[2]; + return (UnkStruct_020397f8 *) this->mUnk_28[2]; } - return (UnkStruct_020397f8*)this->mUnk_28[0]; + return (UnkStruct_020397f8 *) this->mUnk_28[0]; } // non-matching -ARM UnkStruct_020397f8* UnkStruct_027E0C68::func_02036700(void) { +ARM UnkStruct_020397f8 *UnkStruct_027E0C68::func_02036700(void) { if ((data_02056be4[data_027e077c.mUnk_0] & 1) && !(data_02056be4[data_027e077c.mUnk_0] & 2)) { - return (UnkStruct_020397f8*)this->mUnk_28[0]; + return (UnkStruct_020397f8 *) this->mUnk_28[0]; } - return (UnkStruct_020397f8*)this->mUnk_28[2]; + return (UnkStruct_020397f8 *) this->mUnk_28[2]; } -ARM UnkStruct_020386d8* UnkStruct_027E0C68::func_0203673c(void) { +ARM UnkStruct_020386d8 *UnkStruct_027E0C68::func_0203673c(void) { bool iVar1 = this->func_02036824(); bool iVar2 = this->func_02036850(); if (iVar1) { return this->mUnk_18[0]; - } + } if (iVar2) { return this->mUnk_18[1]; @@ -188,21 +183,19 @@ ARM bool UnkStruct_027E0C68::func_020367dc(int param_2) { } ARM bool UnkStruct_027E0C68::func_020367ec(void) { - return ((UnkStruct_020397f8*)this->mUnk_28[0])->mUnk_15c > 0; + return ((UnkStruct_020397f8 *) this->mUnk_28[0])->mUnk_15c > 0; } ARM bool UnkStruct_027E0C68::func_02036808(void) { - return ((UnkStruct_020397f8*)this->mUnk_28[2])->mUnk_15c > 0; + return ((UnkStruct_020397f8 *) this->mUnk_28[2])->mUnk_15c > 0; } ARM bool UnkStruct_027E0C68::func_02036824(void) { switch (data_027e077c.mUnk_0) { case 0x01: case 0x37: - case 0x3B: - return true; - default: - break; + case 0x3B: return true; + default: break; } return false; @@ -213,9 +206,9 @@ ARM bool UnkStruct_027E0C68::func_02036850(void) { return !(data_02056be4[data_027e077c.mUnk_0] & 2) && (data_02056be4[data_027e077c.mUnk_0] & 1); } -ARM void UnkStruct_027E0C68::func_02036888(UnkStruct_020386d8* param_2) { +ARM void UnkStruct_027E0C68::func_02036888(UnkStruct_020386d8 *param_2) { if ((param_2->mUnk_18 & ~0xFFFF) != (0x100 << 0x10)) { - UnkStruct_020397f8* iVar1 = this->func_020366c4(); + UnkStruct_020397f8 *iVar1 = this->func_020366c4(); if (iVar1->mUnk_15c <= 0) { param_2->vfunc_10(); @@ -225,7 +218,7 @@ ARM void UnkStruct_027E0C68::func_02036888(UnkStruct_020386d8* param_2) { } } -ARM bool UnkStruct_027E0C68::func_020368f4(UnkStruct_02037750* param_2) { +ARM bool UnkStruct_027E0C68::func_020368f4(UnkStruct_02037750 *param_2) { if (this->mUnk_20[1] != NULL) { return false; } @@ -236,11 +229,11 @@ ARM bool UnkStruct_027E0C68::func_020368f4(UnkStruct_02037750* param_2) { // non-matching ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 param_4) { - UnkStruct_020397f8* unk_28_0; - UnkStruct_020397f8* unk_28_2; + UnkStruct_020397f8 *unk_28_0; + UnkStruct_020397f8 *unk_28_2; UnkStruct_02038aa0 *pSVar4; ActorRef actorRef; - Actor* pActor; + Actor *pActor; bool iVar1; bool iVar2; s32 i; @@ -251,10 +244,10 @@ ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 p this->mUnk_40[1] = this->mUnk_40[0]; - unk_28_0 = (UnkStruct_020397f8*)this->mUnk_28[0]; + unk_28_0 = (UnkStruct_020397f8 *) this->mUnk_28[0]; if (unk_28_0 != NULL && unk_28_0->mUnk_15c > 0) { - unk_28_2 = (UnkStruct_020397f8*)this->mUnk_28[2]; + unk_28_2 = (UnkStruct_020397f8 *) this->mUnk_28[2]; if (unk_28_2 != NULL && unk_28_2->mUnk_15c > 0) { this->mUnk_40[0] = this->func_020366c4(); @@ -262,7 +255,7 @@ ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 p this->mUnk_40[0] = unk_28_2; } } else { - unk_28_2 = (UnkStruct_020397f8*)this->mUnk_28[2]; + unk_28_2 = (UnkStruct_020397f8 *) this->mUnk_28[2]; if (unk_28_2 != NULL && unk_28_2->mUnk_15c > 0) { this->mUnk_40[0] = unk_28_0; @@ -305,7 +298,7 @@ ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 p this->mUnk_04 = 1; //! TODO: fake? - pSVar4 = this->func_02037178((UnkSubClass1_02256FF8*)this->mUnk_18[0]); + pSVar4 = this->func_02037178((UnkSubClass1_02256FF8 *) this->mUnk_18[0]); if (data_027e0c54 != 0 && pSVar4 != NULL && pSVar4->mUnk_50 != ((data_02056be4[data_027e077c.mUnk_0] & 1) != 0)) { this->mUnk_04 = 0; @@ -331,7 +324,7 @@ ARM void UnkStruct_027E0C68::func_0203690c(unk32 param_2, unk32 param_3, unk32 p } ARM void UnkStruct_027E0C68::func_02036bbc(void) { - UnkStruct_02038aa0* pSVar3; + UnkStruct_02038aa0 *pSVar3; bool bVar2; bool bVar4; s32 i; @@ -366,7 +359,7 @@ ARM void UnkStruct_027E0C68::func_02036ca4(unk32 param_2) { s32 i; for (i = 0; i < ARRAY_LEN(this->mUnk_28); i++) { - UnkStruct_02038aa0* pSVar1 = this->mUnk_28[i]; + UnkStruct_02038aa0 *pSVar1 = this->mUnk_28[i]; if (pSVar1 != NULL) { pSVar1->vfunc_3C(param_2); @@ -374,7 +367,7 @@ ARM void UnkStruct_027E0C68::func_02036ca4(unk32 param_2) { } } -ARM bool UnkStruct_027E0C68::func_02036ce4(UnkStruct_020386d8* param_2, unk32 param_3) { +ARM bool UnkStruct_027E0C68::func_02036ce4(UnkStruct_020386d8 *param_2, unk32 param_3) { u32 uVar1; if (param_3 == 0) { @@ -391,7 +384,7 @@ ARM bool UnkStruct_027E0C68::func_02036ce4(UnkStruct_020386d8* param_2, unk32 pa return false; } -ARM bool UnkStruct_027E0C68::func_02036d30(UnkStruct_02037750* param_2) { +ARM bool UnkStruct_027E0C68::func_02036d30(UnkStruct_02037750 *param_2) { if (this->mUnk_20[0] != NULL && this->mUnk_20[0] != param_2) { return false; } @@ -400,7 +393,7 @@ ARM bool UnkStruct_027E0C68::func_02036d30(UnkStruct_02037750* param_2) { return true; } -ARM bool UnkStruct_027E0C68::func_02036d4c(UnkStruct_02037750* param_2) { +ARM bool UnkStruct_027E0C68::func_02036d4c(UnkStruct_02037750 *param_2) { if (this->mUnk_20[0] == param_2) { this->mUnk_20[0] = NULL; return true; @@ -420,7 +413,7 @@ ARM void UnkStruct_027E0C68::func_02036d6c(void) { } // non-matching -ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02036da8(u32 param_2, s16* param_3) { +ARM UnkStruct_02038aa0 *UnkStruct_027E0C68::func_02036da8(u32 param_2, s16 *param_3) { EntryINF1 *pEVar1; EntryINF1 *pEVar2; UnkStruct_02038aa0 *pSVar4; @@ -429,7 +422,7 @@ ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02036da8(u32 param_2, s16* para s16 iStack_38; int iStack_34; int iStack_30; - + pEVar1 = this->pGroups->entries[param_2 >> 0x10].func_02037258(param_2 & 0xFFFF); if (pEVar1 == NULL) { @@ -438,7 +431,7 @@ ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02036da8(u32 param_2, s16* para if ((data_02056be4[data_027e077c.mUnk_0] & 1) == 0) { pSVar4 = this->mUnk_28[4]; - func_02037628((u8*)&iStack_38); + func_02037628((u8 *) &iStack_38); // ??? bVar6 = (data_02056be4[data_027e077c.mUnk_0] & 1) == 0; @@ -454,10 +447,10 @@ ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02036da8(u32 param_2, s16* para // iStack_30 = param_3[2]; pBVar5 = this->pGroups; // pSVar4->vfunc_50(pEVar1, BMG_GET_MSG_ADDR(pBVar5, param_2), (s16*)&iStack_38, 1); - BMGFileInfo* entry = &(pBVar5)->entries[(param_2) >> 0x10]; - // pSVar4->vfunc_50(pEVar1, + BMGFileInfo *entry = &(pBVar5)->entries[(param_2) >> 0x10]; + // pSVar4->vfunc_50(pEVar1, // ((u32)entry->pDAT1 + (((entry.func_02037258((((param_2))) & 0xFFFF))->offset) & ~1)), - // // BMG_GET_MSG_ADDR(pBVar5, param_2), + // // BMG_GET_MSG_ADDR(pBVar5, param_2), // (s16*)&iStack_38, 1); data_ov000_020eec9c.func_ov000_020d77e4(0x1C); @@ -482,7 +475,7 @@ ARM void UnkStruct_027E0C68::func_02036edc(u32 param_2, u8 param_3) { auStack_28[21] = local_13; auStack_28[20] = param_3; - pSVar1 = this->func_02036f68(param_2, auStack_28); + pSVar1 = this->func_02036f68(param_2, auStack_28); if (pSVar1 != NULL) { if (this->mUnk_04 == 0) { @@ -492,13 +485,13 @@ ARM void UnkStruct_027E0C68::func_02036edc(u32 param_2, u8 param_3) { } // non-matching -ARM UnkStruct_020397f8* UnkStruct_027E0C68::func_02036f68(u32 param_2, u8* param_3) { +ARM UnkStruct_020397f8 *UnkStruct_027E0C68::func_02036f68(u32 param_2, u8 *param_3) { EntryINF1 *pEVar1; UnkStruct_02038aa0 *pSVar2; EntryINF1 *pEVar3; int iVar4; UnkStruct_020397f8 *pSVar5; - + pEVar1 = this->pGroups->entries[param_2 >> 0x10].func_02037258(param_2 & 0xffff); if (pEVar1 == NULL) { @@ -506,35 +499,36 @@ ARM UnkStruct_020397f8* UnkStruct_027E0C68::func_02036f68(u32 param_2, u8* param } if (param_3[21] != 0) { - pSVar5 = (UnkStruct_020397f8*)this->mUnk_28[2]; + pSVar5 = (UnkStruct_020397f8 *) this->mUnk_28[2]; pSVar2 = this->mUnk_28[3]; } else { - pSVar5 = (UnkStruct_020397f8*)this->mUnk_28[0]; + pSVar5 = (UnkStruct_020397f8 *) this->mUnk_28[0]; pSVar2 = this->mUnk_28[1]; } //! TODO: fake? - pSVar5->mUnk_164 = (UnkStruct_020397f8*)pSVar2; + pSVar5->mUnk_164 = (UnkStruct_020397f8 *) pSVar2; pSVar5->mUnk_418 = this->mUnk_28[5]; - pSVar5->vfunc_50(pEVar1, BMG_GET_MSG_ADDR(this->pGroups, param_2), (s32*)param_3, 0); + pSVar5->vfunc_50(pEVar1, BMG_GET_MSG_ADDR(this->pGroups, param_2), (s32 *) param_3, 0); if (data_ov000_020eec9c.func_ov000_020d7f18(0x19) == 0 && data_ov000_020eec9c.func_ov000_020d7f18(0x18) == 0 && data_ov000_020eec9c.func_ov000_020d7f18(0x34) == 0 && data_ov000_020eec9c.func_ov000_020d7f18(0x35) == 0 && data_ov000_020eec9c.func_ov000_020d7f18(0x1A) == 0 && data_ov000_020eec9c.func_ov000_020d7f18(0x1B) == 0 && - (param_3[12]) != 7) { + (param_3[12]) != 7) + { data_ov000_020eec9c.func_ov000_020d77e4(0x1C); } return pSVar5; } -ARM UnkStruct_020386d8* UnkStruct_027E0C68::func_020370d0(unk32 param_2, unk32 param_3) { +ARM UnkStruct_020386d8 *UnkStruct_027E0C68::func_020370d0(unk32 param_2, unk32 param_3) { return this->func_020370e8(param_2, -1, -1, param_3); } -ARM UnkStruct_020386d8* UnkStruct_027E0C68::func_020370e8(unk32 param_2, unk16 param_3, unk16 param_4, unk32 param_5) { - UnkStruct_020386d8* puVar2; +ARM UnkStruct_020386d8 *UnkStruct_027E0C68::func_020370e8(unk32 param_2, unk16 param_3, unk16 param_4, unk32 param_5) { + UnkStruct_020386d8 *puVar2; if (this->func_02036824()) { puVar2 = this->mUnk_18[0]; @@ -557,8 +551,8 @@ ARM UnkStruct_020386d8* UnkStruct_027E0C68::func_020370e8(unk32 param_2, unk16 p return NULL; } -ARM void UnkStruct_027E0C68::func_02037158(UnkSubClass1_02256FF8* param_2) { - UnkStruct_02038aa0* pSVar1; +ARM void UnkStruct_027E0C68::func_02037158(UnkSubClass1_02256FF8 *param_2) { + UnkStruct_02038aa0 *pSVar1; pSVar1 = this->func_02037178(param_2); @@ -567,7 +561,7 @@ ARM void UnkStruct_027E0C68::func_02037158(UnkSubClass1_02256FF8* param_2) { } } -ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02037178(UnkSubClass1_02256FF8* param_2) { +ARM UnkStruct_02038aa0 *UnkStruct_027E0C68::func_02037178(UnkSubClass1_02256FF8 *param_2) { s32 i; for (i = 0; i < ARRAY_LEN(this->mUnk_28); i++) { @@ -579,5 +573,4 @@ ARM UnkStruct_02038aa0* UnkStruct_027E0C68::func_02037178(UnkSubClass1_02256FF8* return NULL; } -ARM UnkStruct_027E0C68::~UnkStruct_027E0C68() { -} +ARM UnkStruct_027E0C68::~UnkStruct_027E0C68() {} diff --git a/src/Main/Message/func_0203c358.cpp b/src/Main/Message/func_0203c358.cpp index 329c08fd..ee80f15e 100644 --- a/src/Main/Message/func_0203c358.cpp +++ b/src/Main/Message/func_0203c358.cpp @@ -1,17 +1,16 @@ -#include "global.h" -#include "Message/MsgProc.hpp" -#include "Message/MessageManager.hpp" -#include "Save/AdventureFlags.hpp" #include "DTCM/UnkStruct_027e103c.hpp" -#include "Player/TouchControl.hpp" #include "Item/ItemManager.hpp" +#include "Message/MessageManager.hpp" +#include "Message/MsgProc.hpp" +#include "Player/TouchControl.hpp" +#include "Save/AdventureFlags.hpp" #include "System/SysNew.hpp" +#include "global.h" -extern "C" void func_0203fc78(unk32*, unk32*); +extern "C" void func_0203fc78(unk32 *, unk32 *); THUMB MsgProc_Type2::MsgProc_Type2(unk32 param_2, unk16 param_3, unk32 param_4) : - UnkStruct_02038aa0(0, 0) -{ + UnkStruct_02038aa0(0, 0) { this->mUnk_162 = 4; this->mUnk_164 = 1; this->mUnk_166 = 0; @@ -28,21 +27,21 @@ THUMB void MsgProc_Type2::func_0203c39c(unk32 param_2, unk32 param_3) { s16 uVar3; s32 iVar4; s32 local_20; - s32 local_1c [2]; - + s32 local_1c[2]; + this->func_02038b28(); uVar3 = 0; for (iVar4 = 0; iVar4 < 2; iVar4++) { local_1c[0] = 0xC0; - local_20 = 0x10; + local_20 = 0x10; if (iVar4 != 0) { func_0203fc78(local_1c, &local_20); } - uVar1 = this->func_0203d318((s32)(local_1c[0] + 7 + ((u32)(local_1c[0] + 7 >> 2) >> 0x1D)) >> 3, - (s32)(local_20 + 7 + ((u32)(local_20 + 7 >> 2) >> 0x1D)) >> 3); + uVar1 = this->func_0203d318((s32) (local_1c[0] + 7 + ((u32) (local_1c[0] + 7 >> 2) >> 0x1D)) >> 3, + (s32) (local_20 + 7 + ((u32) (local_20 + 7 >> 2) >> 0x1D)) >> 3); if (uVar3 < uVar1) { uVar3 = uVar1; @@ -74,5 +73,4 @@ ARM bool MsgProc_Type2::vfunc_14(unk32 param_2, unk32 param_3) { return this->UnkStruct_0203dae0::vfunc_14(param_2 + this->mUnk_162, param_3); } -ARM MsgProc_Type2::~MsgProc_Type2() { -} +ARM MsgProc_Type2::~MsgProc_Type2() {} diff --git a/src/Main/Message/func_0203c72c.cpp b/src/Main/Message/func_0203c72c.cpp index 9c5282f1..b61c35be 100644 --- a/src/Main/Message/func_0203c72c.cpp +++ b/src/Main/Message/func_0203c72c.cpp @@ -1,18 +1,17 @@ -#include "global.h" -#include "Message/MsgProc.hpp" -#include "Message/MessageManager.hpp" -#include "Save/AdventureFlags.hpp" #include "DTCM/UnkStruct_027e103c.hpp" -#include "Player/TouchControl.hpp" #include "Item/ItemManager.hpp" +#include "Message/MessageManager.hpp" +#include "Message/MsgProc.hpp" +#include "Player/TouchControl.hpp" +#include "Save/AdventureFlags.hpp" #include "System/SysNew.hpp" +#include "global.h" -extern "C" void func_0204f614(UnkClass_func_ov000_020d0644*, unk32, unk32, void*, void*); +extern "C" void func_0204f614(UnkClass_func_ov000_020d0644 *, unk32, unk32, void *, void *); // non-matching ARM MsgProc_Type3::MsgProc_Type3(unk32 param_2, unk16 param_3, unk32 param_4) : - UnkStruct_02038aa0(1, 0) -{ + UnkStruct_02038aa0(1, 0) { this->mUnk_162 = 1; this->mUnk_164 = 0x1A; this->mUnk_166 = 0xA6; @@ -23,7 +22,8 @@ ARM MsgProc_Type3::MsgProc_Type3(unk32 param_2, unk16 param_3, unk32 param_4) : this->mUnk_172 = -1; this->mUnk_174 = -1; - func_0204f614(this->mUnk_180, ARRAY_LEN(this->mUnk_180), sizeof(UnkClass_func_ov000_020d0644), UnkClass_func_ov000_020d0644::func_020d060c, this->func_0203c83c); + func_0204f614(this->mUnk_180, ARRAY_LEN(this->mUnk_180), sizeof(UnkClass_func_ov000_020d0644), + UnkClass_func_ov000_020d0644::func_020d060c, this->func_0203c83c); this->mUnk_180[0].func_ov000_020d0644(0x1E, 0, 0x8A, 0, 0); this->mUnk_180[1].func_ov000_020d0644(0x1E, 1, 0x8B, 0, 0); @@ -31,8 +31,6 @@ ARM MsgProc_Type3::MsgProc_Type3(unk32 param_2, unk16 param_3, unk32 param_4) : this->mUnk_180[3].func_ov000_020d0644(0x1E, 3, 0x8D, 0, 0); } -ARM void MsgProc_Type3::func_0203c83c(void) { -} +ARM void MsgProc_Type3::func_0203c83c(void) {} -ARM MsgProc_Type3::~MsgProc_Type3() { -} +ARM MsgProc_Type3::~MsgProc_Type3() {} |
