From 4be340d5a4a58f32d980438b0beddde60208333a Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 21 Jul 2024 15:19:33 -0400 Subject: [PATCH] Fixed types in sub_8087144 --- include/code_8086A3C.h | 11 +++++++++++ include/dungeon_util_1.h | 1 + src/code_8057824_1.c | 2 -- src/code_8086A3C.c | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 include/code_8086A3C.h diff --git a/include/code_8086A3C.h b/include/code_8086A3C.h new file mode 100644 index 000000000..81946f736 --- /dev/null +++ b/include/code_8086A3C.h @@ -0,0 +1,11 @@ +#ifndef GUARD_CODE_8086A3C_H +#define GUARD_CODE_8086A3C_H + +#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/include/dungeon_util_1.h b/include/dungeon_util_1.h index 73fd7edaa..a5b690c89 100644 --- a/include/dungeon_util_1.h +++ b/include/dungeon_util_1.h @@ -28,5 +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); #endif diff --git a/src/code_8057824_1.c b/src/code_8057824_1.c index acd9aeeca..c1fc97b52 100644 --- a/src/code_8057824_1.c +++ b/src/code_8057824_1.c @@ -416,8 +416,6 @@ extern u8 sub_8086AE4(s16); extern void sub_8072008(Entity *, Entity *, s16, u32, u32); extern void sub_8085374(); -extern void sub_8086A54(Entity *); - extern void sub_803F878(u32,s32); void SceneGroudonMovement(Entity * param_1); diff --git a/src/code_8086A3C.c b/src/code_8086A3C.c index 2f60f0116..c6e7fba0f 100644 --- a/src/code_8086A3C.c +++ b/src/code_8086A3C.c @@ -1,4 +1,6 @@ #include "global.h" +#include "code_8086A3C.h" + #include "code_803E46C.h" #include "code_803E668.h" #include "code_806CD90.h" @@ -26,9 +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(u8 *); -// TODO The parameters don't match the function definition in dungeon_util_1.h (struct_8085B80*, s16**, Entity**, s32). -extern void sub_8085B4C(u8 *, void *, Entity **, u32); +extern bool8 sub_8085B80(struct_8087144 *); extern const u8 gUnknown_810739C[]; extern const u8 gUnknown_81073D4[]; @@ -394,12 +394,12 @@ void sub_8087144(void) Entity *iVar2; Entity *iVar3; Entity *iVar4; - u8 auStack_10c [56]; - u8 puStack_60[56]; - u8 puStack_5c[56]; - u8 *puStack_64[3]; + s16 auStack_10c[28]; + s16 puStack_60[28]; + s16 puStack_5c[28]; + s16 *puStack_64[3]; Entity *pEStack_58[3]; - u8 auStack_4c [48]; + struct_8087144 auStack_4c; 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,puStack_64,pEStack_58,3); + sub_8085B4C(&auStack_4c.unk0,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;