diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-01-10 23:17:43 -0500 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2017-01-10 20:17:43 -0800 |
commit | f88eeb607409528dadbf841f2cb8e805d6e86deb (patch) | |
tree | 6b4f6411a0e02bff918cb924251b68a5038ae1f8 /include | |
parent | 6b0268e0c0fb98014cb72f8a918a33c0645162d2 (diff) |
more labels and finish decompiling battle_ai.c except for unk_24 (#184)
* labels for save_menu_util.c
* formatting, i suck at it
* fix sub_80712B4 to not use MyTask struct
* pls don't kill me
* current changes
* decompile BattleAICmd_if_damage_bonus
* formatting
* label thinking struct unk8
* decompile BattleAICMd_if_status_not_in_party
* decompile more battle_ai.c functions
* Began decompilation of a random file
* decompile BattleAICmd_if_can_faint and BattleAICmd_if_cant_faint
* decompile unk_3F and unk_40
* decompile if_move_effect and if_not_move_effect
* formatting, silly
* decompile if_last_move_did_damage and if_encored
* decompile unk_45 if_random_2 and unk_47
* decompile get_hold_effect and get_gender
* decompile is_first_turn and get_stockpile_count
* decompile unk_4C and get_item
* decompile unk_4E unk_4F and unk_50
* decompile get_protect_count and the remaining stub macros
* decompile call jump and unk_5A
* decompile if_level_cond
* decompile the last AI macros besides unk_24
* finish decompiling battle_ai.c except for unk_24
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 16 | ||||
-rw-r--r-- | include/pokemon.h | 4 | ||||
-rw-r--r-- | include/save_menu_util.h | 4 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/battle.h b/include/battle.h index d58b234e3..4f1bc70e1 100644 --- a/include/battle.h +++ b/include/battle.h @@ -38,7 +38,7 @@ struct AI_ThinkingStruct /* 0x2016800 */ /* 0x01 */ u8 moveConsidered; /* 0x02 */ u16 unk2; /* 0x04 */ s8 score[4]; // score? -/* 0x08 */ u32 unk8; +/* 0x08 */ u32 funcResult; /* 0x0C */ u32 aiFlags; /* 0x10 */ u8 unk10; /* 0x11 */ u8 aiLogicId; @@ -54,14 +54,22 @@ struct SmallBattleStruct1 u8 unk4; }; +struct SmallItemStruct +{ + u8 item[2][2]; +}; + struct BattleStruct /* 0x2000000 */ { u8 filler0[0x1601C]; struct SmallBattleStruct1 unk; - u8 filler1[0xAB]; // 0x2016020 + u8 filler1[0x68]; // 0x2016020 + u8 unk88; + u8 filler1_2[0x42]; /* 0x160CB */ u8 linkPlayerIndex; - u8 filler2[0x734]; - struct AI_ThinkingStruct ai; + struct SmallItemStruct item; + u8 filler2[0x730]; + struct AI_ThinkingStruct ai; /* 0x2016800 */ }; extern struct BattleStruct battle_2000000; diff --git a/include/pokemon.h b/include/pokemon.h index 10eb05757..3987bada6 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -370,8 +370,8 @@ struct BattleMove struct PokemonStorage { - u8 currentBox; - struct BoxPokemon boxes[14][30]; + /* 0x00 */ u8 currentBox; + /* 0x01 */ struct BoxPokemon boxes[14][30]; u8 boxNames[14][9]; u8 unkArray[14]; }; diff --git a/include/save_menu_util.h b/include/save_menu_util.h index 560a39d89..cf1d3f929 100644 --- a/include/save_menu_util.h +++ b/include/save_menu_util.h @@ -2,8 +2,8 @@ #define GUARD_SAVE_MENU_UTIL_H void HandleDrawSaveWindowInfo(s16 left, s16 top); -void sub_80946C8(u16 left, u16 top); -u8 sub_809473C(void); +void HandleCloseSaveWindow(u16 left, u16 top); +u8 IsResizeSaveWindowEnabled(void); void PrintSavePlayerName(s16 x, s16 y); void PrintSaveMapName(s16 x, s16 y); void PrintSaveBadges(s16 x, s16 y); |