summaryrefslogtreecommitdiff
path: root/src/battle_interface.c
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-05-21 15:47:07 -0400
committerGitHub <noreply@github.com>2017-05-21 15:47:07 -0400
commit009d4875fcc97e18dbbd74b5bd303dc5ccb81b1c (patch)
tree4c3d34e1115b487060218a9083dfd99dc7776f59 /src/battle_interface.c
parent9d4dfedb483ea13a16c309689877ed087c32b0e2 (diff)
parente6d8705d3152947c609339641cb0b792a36bdfdd (diff)
Merge pull request #301 from camthesaxman/decompile_party_menu
fix up party_menu.c and decompile some more functions
Diffstat (limited to 'src/battle_interface.c')
-rw-r--r--src/battle_interface.c32
1 files changed, 8 insertions, 24 deletions
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];