diff options
author | Marijn van der Werf <marijn.vanderwerf@gmail.com> | 2016-12-02 19:06:22 +0100 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2016-12-02 10:06:22 -0800 |
commit | 1f222c04ef1d10ff5a5c6bb98cd4380ecf2bba86 (patch) | |
tree | 573d6368233110b17292e498f49532c1c9244404 /src/battle_ai.c | |
parent | 4258e60771aa9fdabd678930eca534423bd371b8 (diff) |
[WIP] Extract all external function declarations to headers (#114)
* Extract other external function declarations
* Fix GBA compilation
* Revert `sub_803C434` to asm
Diffstat (limited to 'src/battle_ai.c')
-rw-r--r-- | src/battle_ai.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/battle_ai.c b/src/battle_ai.c index 945176b64..a2db200ac 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -1,5 +1,6 @@ #include "global.h" #include "battle.h" +#include "asm.h" #include "pokemon.h" #include "rng.h" @@ -13,11 +14,6 @@ all the way to at least 0x2016800, in addition to extremely hard functions that as it currently is until someone bothers to document this huge struct. */ -extern u8 sub_8015A98(u8, u8, u8); -extern u8 battle_side_get_owner(u8); -extern s16 battle_get_per_side_status(u8); -extern u8 b_first_side(u8, u8, u8); - extern u16 gUnknown_020239F8; extern u8 gUnknown_02024A60; extern u8 gUnknown_02024C07; @@ -1248,8 +1244,8 @@ void BattleAICmd_get_ability(void) if(battle_side_get_owner(var) == 0) { //register u8 unk asm("r1") = battle_get_per_side_status(var) & 1; - s32 unk = battle_get_per_side_status(var) & 1; - + u16 unk = battle_get_per_side_status(var) & 1; + if(unk_2016A00.unk20[unk] != 0) { ((struct UnknownStruct2 *)((u8 *)&unk_2016A00 - 512))->unk8 = unk_2016A00.unk20[unk]; |