summaryrefslogtreecommitdiff
path: root/src/start_menu.c
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-01-10 23:17:43 -0500
committerYamaArashi <YamaArashi@users.noreply.github.com>2017-01-10 20:17:43 -0800
commitf88eeb607409528dadbf841f2cb8e805d6e86deb (patch)
tree6b4f6411a0e02bff918cb924251b68a5038ae1f8 /src/start_menu.c
parent6b0268e0c0fb98014cb72f8a918a33c0645162d2 (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 'src/start_menu.c')
-rw-r--r--src/start_menu.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/start_menu.c b/src/start_menu.c
index 31ba31766..8ef3a9d2b 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -281,22 +281,15 @@ void CreateStartMenuTask(void (*func)(u8))
SetTaskFuncWithFollowupFunc(taskId, Task_StartMenu, func);
}
-struct MyTask {
- TaskFunc func;
- bool8 isActive;
- u8 prev;
- u8 next;
- u8 priority;
- s16 var1;
-};
-
void sub_80712B4(u8 taskId)
{
- switch(((struct MyTask *)&gTasks[taskId])->var1)
+ struct Task *task = &gTasks[taskId];
+
+ switch(task->data[0])
{
case 0:
gCallback_03004AE8 = StartMenu_InputProcessCallback;
- ((struct MyTask *)&gTasks[taskId])->var1++;
+ task->data[0]++;
break;
case 1:
if(gCallback_03004AE8() == 1)
@@ -554,7 +547,7 @@ static void Task_SaveDialog(u8 taskId)
static void sub_8071700(void)
{
- sub_80946C8(0, 0);
+ HandleCloseSaveWindow(0, 0);
}
static void HideSaveDialog(void)