update .clang-format rules (#120)

This commit is contained in:
Yanis
2025-07-16 15:33:58 +02:00
committed by GitHub
parent ce9f96d932
commit 7a01af4783
25 changed files with 841 additions and 453 deletions
+3 -1
View File
@@ -41,7 +41,9 @@ ARM void ActorType::Unregister() {
ActorType **previous = NULL;
for (actorType = sActorTypeList.head; actorType != NULL; actorType = actorType->next) {
if (actorType == this) break;
if (actorType == this) {
break;
}
previous = current;
current = &actorType->next;
}
+6 -2
View File
@@ -87,8 +87,12 @@ THUMB u16 BMGFileInfo::func_020371c8(u32 *pFile, s16 unk_18) {
//! 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; 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);
+17 -10
View File
@@ -47,8 +47,11 @@ THUMB void MessageManager::func_02036490() {
this->pGroups->func_020372f0(BMG_FILE_INDEX_BATTLE, 2);
this->pGroups->func_020372f0(BMG_FILE_INDEX_BATTLECOMMON, 2);
break;
case GameModeId_Contact: this->pGroups->func_020372f0(BMG_FILE_INDEX_MAINSELECT, 2); break;
default: break;
case GameModeId_Contact:
this->pGroups->func_020372f0(BMG_FILE_INDEX_MAINSELECT, 2);
break;
default:
break;
}
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
@@ -66,8 +69,8 @@ THUMB void MessageManager::func_02036490() {
this->mUnk_18[0]->mUnk_39 = 0;
this->mUnk_18[1]->mUnk_39 = 1;
if (gGame.mModeId == GameModeId_Adventure || gGame.mModeId == GameModeId_FileSelect || gGame.mModeId == GameModeId_Battle)
{
if (gGame.mModeId == GameModeId_Adventure || gGame.mModeId == GameModeId_FileSelect ||
gGame.mModeId == GameModeId_Battle) {
for (s32 i = 0; i < ARRAY_LEN(this->mUnk_28); i++) {
switch (data_02056924[i + 1]) {
case 0:
@@ -83,7 +86,9 @@ THUMB void MessageManager::func_02036490() {
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();
@@ -93,7 +98,8 @@ THUMB void MessageManager::func_02036490() {
this->mUnk_28[i] = NULL;
}
break;
default: break;
default:
break;
}
if (this->mUnk_28[i] != NULL) {
@@ -194,8 +200,10 @@ ARM bool MessageManager::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;
@@ -515,8 +523,7 @@ ARM UnkStruct_020397f8 *MessageManager::func_02036f68(u32 param_2, u8 *param_3)
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);
}
+18 -9
View File
@@ -74,7 +74,8 @@ ARM unk32 UnkStruct_02037750::vfunc_28(s32 param1) {
if ((s32) uVar7 <= 0) {
switch (uVar7) {
case 0x0:
case 0x2f: break;
case 0x2f:
break;
case 0x7:
if (data_027e0d54[0xd] != 0) {
return -0x1;
@@ -117,12 +118,18 @@ ARM unk32 UnkStruct_02037750::vfunc_28(s32 param1) {
}
return uVar10;
case 0x4: return gAdventureFlags->Get(param1 + 0x4) != false;
case 0x5: return gActorManager->func_ov00_020c3b2c(NULL) != 0;
case 0x6: break;
case 0x8: return (((data_027e0cb4[(param1 + 0x4) >> 5]) & 1) << ((param1 + 0x4) & 0x1f)) == 0x0;
case 0x9: break;
case 0xa: break;
case 0x4:
return gAdventureFlags->Get(param1 + 0x4) != false;
case 0x5:
return gActorManager->func_ov00_020c3b2c(NULL) != 0;
case 0x6:
break;
case 0x8:
return (((data_027e0cb4[(param1 + 0x4) >> 5]) & 1) << ((param1 + 0x4) & 0x1f)) == 0x0;
case 0x9:
break;
case 0xa:
break;
case 0xb:
lVar2 = gRandom.mRandomValue * gRandom.mFactor;
uVar7 = lVar2;
@@ -143,8 +150,10 @@ ARM unk32 UnkStruct_02037750::vfunc_28(s32 param1) {
}
}
return (int) (char) uVar10;
case 0xd: return gItemManager->GetNumRupees() != 0;
case 0xe: return gItemManager->HasItem(param1 + 0x4) != 0;
case 0xd:
return gItemManager->GetNumRupees() != 0;
case 0xe:
return gItemManager->HasItem(param1 + 0x4) != 0;
default:
if (uVar7 == 0x2f) {
return gItemManager->HasItem((param1 + 0x4) + 0x60) != 0;
+17 -8
View File
@@ -57,8 +57,7 @@ ARM void UnkStruct_02038aa0::func_02038b74(void) {}
ARM bool UnkStruct_02038aa0::func_02038b78() {
if (data_027e0c54 == 0) {
if ((this->mUnk_50 != 0 && gMessageManager.func_02036850() != 0) ||
(this->mUnk_50 == 0 && gMessageManager.func_02036824() != 0))
{
(this->mUnk_50 == 0 && gMessageManager.func_02036824() != 0)) {
return true;
}
@@ -204,12 +203,22 @@ ARM void UnkStruct_02038aa0::vfunc_64() {}
ARM s32 UnkStruct_02038aa0::vfunc_68(unk32 param1) {
switch (param1) {
case 0: break;
case 1: this->mUnk_34 = 4; break;
case 2: this->mUnk_34 = 6; break;
case 3: this->mUnk_34 = 1; break;
case 4: this->mUnk_34 = 0; break;
default: break;
case 0:
break;
case 1:
this->mUnk_34 = 4;
break;
case 2:
this->mUnk_34 = 6;
break;
case 3:
this->mUnk_34 = 1;
break;
case 4:
this->mUnk_34 = 0;
break;
default:
break;
}
return ((this->mUnk_18 << 3) - this->func_020337d8(param1)) / 2;
+48 -23
View File
@@ -148,7 +148,9 @@ ARM void UnkStruct_020397f8::vfunc_2c() {
if (this->mUnk_15c == 1) {
if (this->mUnk_586 == ((data_02056be4[data_027e077c.mUnk_0] & 1) != 0)) {
switch (this->mUnk_150[1]) {
case 0: this->func_0203b0ec(1); break;
case 0:
this->func_0203b0ec(1);
break;
case 2:
case 3:
if (this->func_0203a3e0() != 0) {
@@ -362,8 +364,7 @@ ARM void UnkStruct_020397f8::vfunc_48() {
ARM void UnkStruct_020397f8::func_0203a35c() {
if ((this->mUnk_57c == 1 || this->mUnk_150[3] != 0) ||
(this->mUnk_128.mUnk_04 == NULL || this->mUnk_128.mUnk_04[0] == 0) != 0)
{
(this->mUnk_128.mUnk_04 == NULL || this->mUnk_128.mUnk_04[0] == 0) != 0) {
if (this->func_0203a3e0()) {
s16 mUnk_56e = this->mUnk_56e;
s16 mUnk_570 = this->mUnk_570;
@@ -427,7 +428,8 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
if (gTouchControl.mTouch == 0) {
switch (this->mUnk_150[1]) {
case 3:
case 4: break;
case 4:
break;
case 5:
if (data_027e103c->mUnk_20 == 3) {
this->func_0203b0ec(1);
@@ -438,7 +440,8 @@ ARM void UnkStruct_020397f8::vfunc_44(s32 touchLastX, s32 touchLastY) {
this->func_0203b0ec(1);
}
break;
case 7: break;
case 7:
break;
case 2:
//! TODO: fixme
// if (this->mUnk_164->mUnk_168.mUnk_06 <= 0) {
@@ -522,8 +525,7 @@ ARM void UnkStruct_020397f8::vfunc_50(EntryINF1 *param1, unk32 param2, s32 *para
}
if (gGame.mModeId == GameModeId_Adventure && data_027e0d38->func_ov000_02078b40() == 2 &&
func_ov003_020f3f94(data_ov009_0211f5b4) == 0)
{
func_ov003_020f3f94(data_ov009_0211f5b4) == 0) {
UnkStruct_020397f8 *pVar4 = (UnkStruct_020397f8 *) gMessageManager.mUnk_28[4];
if (pVar4 != NULL && pVar4->mUnk_15c > 0) {
@@ -740,14 +742,16 @@ ARM unk32 UnkStruct_020397f8::vfunc_1c(u16 *param1, UnkStruct_0203b264 *param2,
}
switch (this->mUnk_57a) {
case 0: return this->func_0203905c(param1, param2, param3, param4);
case 0:
return this->func_0203905c(param1, param2, param3, param4);
case 1:
UnknownMsgChoiceStruct *pChoiceData;
s32 i = this->func_0203a30c();
pChoiceData = &this->mUnk_428[this->mUnk_528[i]];
return this->mUnk_164->func_0203cb5c(
*param1, (((pChoiceData->mUnk_00->mUnk_0[3] << 0x10) | ((u16 *) pChoiceData->mUnk_00->mUnk_0)[2]) + ~0xFFFE));
default: break;
default:
break;
}
return 0;
@@ -767,16 +771,30 @@ ARM void UnkStruct_020397f8::vfunc_60(func_0203b410_param1 *param1, unk32 param2
if (this->func_02032fa4() == 0) {
switch (param1->mUnk_0c) {
case 0:
case 1: uVar6 = this->mUnk_580 != 0; break;
case 2: uVar6 = 2; break;
case 3: uVar6 = 3; break;
case 5: uVar6 = 4; break;
case 6: uVar6 = 5; break;
case 1:
uVar6 = this->mUnk_580 != 0;
break;
case 2:
uVar6 = 2;
break;
case 3:
uVar6 = 3;
break;
case 5:
uVar6 = 4;
break;
case 6:
uVar6 = 5;
break;
default:
// why???
switch (param1->mUnk_0c) {
case 4: uVar6 = 8; break;
case 7: uVar6 = 9; break;
case 4:
uVar6 = 8;
break;
case 7:
uVar6 = 9;
break;
default:
if (this->mUnk_580 != 0) {
uVar6 = 7;
@@ -825,8 +843,7 @@ ARM void UnkStruct_020397f8::vfunc_64(s16 *param1) {
unk32 uVar2;
if (this->mUnk_50 != 0 || data_027e0db0.mUnk_04 > 0 || func_0203c084() != 0 ||
(gAdventureFlags->Exists() && gAdventureFlags->func_ov00_02097738()))
{
(gAdventureFlags->Exists() && gAdventureFlags->func_ov00_02097738())) {
uVar2 = 0x16;
} else {
uVar2 = 0;
@@ -858,15 +875,23 @@ ARM void UnkStruct_020397f8::func_0203b764() {
this->func_02039440(data_02056a04[i * 0x18], data_02056a16[i]);
switch (this->mUnk_57b) {
case 1: this->mUnk_158.y -= 38; break;
case 1:
this->mUnk_158.y -= 38;
break;
case 2:
switch (this->pInfoEntry->mUnk_06) {
case 2: this->mUnk_158.y -= 111; break;
case 3: this->mUnk_158.y -= 98; break;
default: break;
case 2:
this->mUnk_158.y -= 111;
break;
case 3:
this->mUnk_158.y -= 98;
break;
default:
break;
}
break;
default: break;
default:
break;
}
}
+12 -5
View File
@@ -56,8 +56,10 @@ const u16 data_020562e2[] = {
THUMB bool UnkStruct_02063220::func_0202f3f0(unk32 param1) {
switch (param1) {
case 2:
case 3: return true;
default: break;
case 3:
return true;
default:
break;
}
return false;
@@ -67,9 +69,14 @@ THUMB unk32 UnkStruct_02063220::func_0202f400(unk32 param1) {
unk32 ret = 0;
switch (param1) {
case 2: ret = 1; break;
case 3: ret = 2; break;
default: break;
case 2:
ret = 1;
break;
case 3:
ret = 2;
break;
default:
break;
}
return ret;