From f88eeb607409528dadbf841f2cb8e805d6e86deb Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Tue, 10 Jan 2017 23:17:43 -0500 Subject: 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 --- src/scrcmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index d3d28f923..f41d57ffb 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -561,7 +561,7 @@ bool8 ScrCmd_darken(struct ScriptContext *ctx) return FALSE; } -bool8 sub_8066248(void) +bool8 IsPaletteNotActive(void) { if (!gPaletteFade.active) return TRUE; @@ -572,7 +572,7 @@ bool8 sub_8066248(void) bool8 ScrCmd_fadescreen(struct ScriptContext *ctx) { fade_screen(ScriptReadByte(ctx), 0); - SetupNativeScript(ctx, sub_8066248); + SetupNativeScript(ctx, IsPaletteNotActive); return TRUE; } @@ -581,7 +581,7 @@ bool8 ScrCmd_fadescreendelay(struct ScriptContext *ctx) u8 duration = ScriptReadByte(ctx); u8 delay = ScriptReadByte(ctx); fade_screen(duration, delay); - SetupNativeScript(ctx, sub_8066248); + SetupNativeScript(ctx, IsPaletteNotActive); return TRUE; } @@ -1170,7 +1170,7 @@ bool8 ScrCmd_closebutton(struct ScriptContext *ctx) return FALSE; } -bool8 sub_80670C0() +bool8 WaitForAorBPress(void) { if (gMain.newKeys & A_BUTTON) return TRUE; @@ -1181,7 +1181,7 @@ bool8 sub_80670C0() bool8 ScrCmd_waitbutton(struct ScriptContext *ctx) { - SetupNativeScript(ctx, sub_80670C0); + SetupNativeScript(ctx, WaitForAorBPress); return TRUE; } -- cgit v1.2.3 From c9722602cb47eb5b6ecbccddf13df5f286a8ef7b Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 17 Jan 2017 14:13:04 +0100 Subject: Sort includes --- src/scrcmd.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index f41d57ffb..a13a42e87 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1,28 +1,28 @@ #include "global.h" #include "asm.h" +#include "asm_fieldmap.h" #include "battle_setup.h" #include "berry.h" +#include "coins.h" +#include "decoration.h" +#include "event_data.h" +#include "field_effect.h" +#include "field_message_box.h" #include "field_player_avatar.h" #include "item.h" -#include "script.h" -#include "rng.h" -#include "palette.h" -#include "rtc.h" -#include "pokemon.h" -#include "asm_fieldmap.h" #include "main.h" +#include "map_obj_lock.h" #include "menu.h" #include "money.h" -#include "decoration.h" -#include "field_message_box.h" +#include "palette.h" +#include "pokemon.h" +#include "rng.h" +#include "rom4.h" +#include "rtc.h" +#include "script.h" #include "sound.h" #include "string_util.h" -#include "event_data.h" -#include "rom4.h" #include "weather.h" -#include "map_obj_lock.h" -#include "coins.h" -#include "field_effect.h" typedef u16 (*SpecialFunc)(void); typedef void (*NativeFunc)(void); -- cgit v1.2.3 From 6035511c139549a0291b6b3d43b9b080f792b2b6 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 18 Mar 2017 04:00:15 +0100 Subject: reorganize and add new headers for many files --- src/scrcmd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/scrcmd.c') diff --git a/src/scrcmd.c b/src/scrcmd.c index a13a42e87..b780cc6b4 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -9,6 +9,8 @@ #include "field_effect.h" #include "field_message_box.h" #include "field_player_avatar.h" +#include "field_map_obj_helpers.h" +#include "field_door.h" #include "item.h" #include "main.h" #include "map_obj_lock.h" @@ -23,6 +25,11 @@ #include "sound.h" #include "string_util.h" #include "weather.h" +#include "script_menu.h" +#include "script_pokemon_80F9.h" +#include "script_pokemon_80C4.h" +#include "clock.h" +#include "contest_painting.h" typedef u16 (*SpecialFunc)(void); typedef void (*NativeFunc)(void); -- cgit v1.2.3