From 14c5c79f3e3f903e3e7b34b5c0c9bb3b90e7ab75 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 17 May 2017 17:40:04 -0500 Subject: fill holes in party_menu.c and add battle_interface.h header --- src/battle_interface.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'src/battle_interface.c') diff --git a/src/battle_interface.c b/src/battle_interface.c index 9938c4b54..ba3cba894 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -8,6 +8,7 @@ #include "songs.h" #include "battle.h" #include "palette.h" +#include "battle_interface.h" struct UnknownStruct5 { @@ -35,15 +36,6 @@ struct UnknownStruct7 u8 filler0[0x180]; }; -struct UnknownStruct9 -{ - s32 unk0; - u32 unk4; - u32 unk8; - u32 unkC_0:5; - u32 unk10; -}; - extern u8 ewram[]; #define ewram520 ((struct UnknownStruct7 *)(ewram + 0x00520)) #define ewram16088 (*(u8 *) (ewram + 0x16088)) @@ -109,9 +101,8 @@ extern void load_gfxc_health_bar(); static void sub_8043D5C(struct Sprite *); static const void *sub_8043CDC(u8); -void sub_8044210(u8, s16, u8); +static void sub_8044210(u8, s16, u8); static void draw_status_ailment_maybe(u8); -void sub_8045A5C(u8 a, struct Pokemon *pkmn, u8 c); extern void sub_8045180(struct Sprite *); static void sub_8045110(struct Sprite *); static void sub_8045048(struct Sprite *); @@ -119,12 +110,11 @@ static void sub_8044F70(u8 taskId); static void sub_8044E74(u8 taskId); static void sub_8044ECC(u8 taskId); static u8 sub_80457E8(u8, u8); -s32 sub_8045C78(u8, u8, u8, u8); static int sub_8045F58(s32, s32, int, int *, u8, u16); static u8 GetScaledExpFraction(int, int, int, u8); static void sub_8045D58(u8, u8); static u8 sub_804602C(int, int, int, int *, u8 *, u8); -static void sub_8046128(struct UnknownStruct9 *a, int *b, void *c); +static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, void *c); static int do_nothing(s16 unused1, s16 unused2, int unused3) { @@ -937,7 +927,7 @@ _0804420C: .4byte 0x04000008\n\ } #endif -void sub_8044210(u8 a, s16 b, u8 c) +static void sub_8044210(u8 a, s16 b, u8 c) { u8 str[0x14]; u8 *ptr; @@ -1377,15 +1367,9 @@ void sub_804454C(void) } } -struct UnknownStruct8 -{ - u16 unk0; - u32 unk4; -}; - // This function almost matches except for just two instructions around 0x08044B52 that are swapped. #ifdef NONMATCHING -u8 sub_8044804(u8 a, const struct UnknownStruct8 *b, u8 c, u8 d) +u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d) { u8 r7; s16 x; @@ -1594,7 +1578,7 @@ u8 sub_8044804(u8 a, const struct UnknownStruct8 *b, u8 c, u8 d) } #else __attribute__((naked)) -u8 sub_8044804(u8 a, const struct UnknownStruct8 *b, u8 c, u8 d) +u8 sub_8044804(u8 a, const struct BattleInterfaceStruct2 *b, u8 c, u8 d) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -3005,7 +2989,7 @@ static u8 sub_804602C(int a, int b, int c, int *d, u8 *e, u8 f) return r3; } -s16 sub_80460C8(struct UnknownStruct9 *a, int *b, void *c, int d) +s16 sub_80460C8(struct BattleInterfaceStruct1 *a, int *b, void *c, int d) { u16 r7; s16 r1; @@ -3020,7 +3004,7 @@ s16 sub_80460C8(struct UnknownStruct9 *a, int *b, void *c, int d) return r7; } -static void sub_8046128(struct UnknownStruct9 *a, int *b, void *c) +static void sub_8046128(struct BattleInterfaceStruct1 *a, int *b, void *c) { u8 sp8[6]; u16 sp10[6]; -- cgit v1.2.3