From b0fc9aace1d2e718d4d9f3b2b4a41d05b9b00fea Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Wed, 24 Jul 2024 21:19:20 -0400 Subject: [PATCH 1/2] Fixed types in sub_8087144 (again) --- include/code_8086A3C.h | 5 ----- src/code_8086A3C.c | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/code_8086A3C.h b/include/code_8086A3C.h index 81946f736..cd99eb26d 100644 --- a/include/code_8086A3C.h +++ b/include/code_8086A3C.h @@ -3,9 +3,4 @@ #include "dungeon_util_1.h" -typedef struct struct_8087144 { - struct_8085B80 unk0; - u8 fill16[32]; -} struct_8087144; - #endif // GUARD_CODE_8086A3C_H \ No newline at end of file diff --git a/src/code_8086A3C.c b/src/code_8086A3C.c index c6e7fba0f..6ee83abd5 100644 --- a/src/code_8086A3C.c +++ b/src/code_8086A3C.c @@ -28,7 +28,7 @@ extern void SkarmoryEntry(Entity *); extern void sub_8086A54(Entity *); extern void sub_8087144(); extern void sub_8072008(Entity *pokemon, Entity *r1, u32 r2, u8 r3, u32); -extern bool8 sub_8085B80(struct_8087144 *); +extern bool8 sub_8085B80(struct_8085B80 *); extern const u8 gUnknown_810739C[]; extern const u8 gUnknown_81073D4[]; @@ -399,7 +399,7 @@ void sub_8087144(void) s16 puStack_5c[28]; s16 *puStack_64[3]; Entity *pEStack_58[3]; - struct_8087144 auStack_4c; + struct_8085B80 auStack_4c[3]; iVar2 = GetEntityFromClientType(5); iVar3 = GetEntityFromClientType(6); @@ -417,12 +417,12 @@ void sub_8087144(void) sub_8086A54(iVar2); sub_8086A54(iVar3); sub_8086A54(iVar4); - sub_8085B4C(&auStack_4c.unk0,puStack_64,pEStack_58,3); + sub_8085B4C(auStack_4c,puStack_64,pEStack_58,3); iVar2->info->unk15F = 1; iVar3->info->unk15F = 1; iVar4->info->unk15F = 1; while( TRUE ) { - if (!sub_8085B80(&auStack_4c)) break; + if (!sub_8085B80(auStack_4c)) break; sub_803E46C(0x46); } iVar2->info->unk15F = 0; From 358b9f104db0c5db31b6741a9ae64b94a04ae771 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Wed, 24 Jul 2024 21:34:48 -0400 Subject: [PATCH 2/2] Changed sub_8085B4C parameters to arrays --- include/dungeon_util_1.h | 2 +- src/dungeon_util_1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dungeon_util_1.h b/include/dungeon_util_1.h index a5b690c89..c9ae2ca3a 100644 --- a/include/dungeon_util_1.h +++ b/include/dungeon_util_1.h @@ -28,6 +28,6 @@ void sub_8085930(s32 direction); void sub_80859F0(s32 direction); bool8 IsMovingClient(Entity *entity); void sub_8085B0C(Entity *pokemon); -void sub_8085B4C(struct_8085B80 *a0, s16 **a1, Entity **a2, s32 a3); +void sub_8085B4C(struct_8085B80 a0[], s16 *a1[], Entity *a2[], s32 a3); #endif diff --git a/src/dungeon_util_1.c b/src/dungeon_util_1.c index 6bf5d94b1..0e0843449 100644 --- a/src/dungeon_util_1.c +++ b/src/dungeon_util_1.c @@ -404,7 +404,7 @@ void sub_8085B0C(Entity *pokemon) } } -void sub_8085B4C(struct_8085B80 *a0, s16 **a1, Entity **a2, s32 a3) +void sub_8085B4C(struct_8085B80 a0[], s16 *a1[], Entity *a2[], s32 a3) { s32 i;