A few labels in party, start, option menus

This commit is contained in:
GriffinR
2021-03-21 00:54:24 -04:00
committed by huderlem
parent 9773b436d2
commit 4077c53338
3 changed files with 66 additions and 38 deletions

View File

@@ -170,7 +170,7 @@ static const struct MenuAction sStartMenuItems[] =
{gText_MenuBag, {.u8_void = StartMenuBattlePyramidBagCallback}}
};
static const struct BgTemplate sUnknown_085105A8[] =
static const struct BgTemplate sBgTemplates_LinkBattleSave[] =
{
{
.bg = 0,
@@ -183,13 +183,29 @@ static const struct BgTemplate sUnknown_085105A8[] =
}
};
static const struct WindowTemplate sUnknown_085105AC[] =
static const struct WindowTemplate sWindowTemplates_LinkBattleSave[] =
{
{0, 2, 0xF, 0x1A, 4, 0xF, 0x194},
{
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 26,
.height = 4,
.paletteNum = 15,
.baseBlock = 0x194
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sSaveInfoWindowTemplate = {0, 1, 1, 0xE, 0xA, 0xF, 8};
static const struct WindowTemplate sSaveInfoWindowTemplate = {
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 14,
.height = 10,
.paletteNum = 15,
.baseBlock = 8
};
// Local functions
static void BuildStartMenuActions(void);
@@ -211,13 +227,13 @@ static void CreateStartMenuTask(TaskFunc followupFunc);
static void InitSave(void);
static u8 RunSaveCallback(void);
static void ShowSaveMessage(const u8 *message, u8 (*saveCallback)(void));
static void sub_80A0014(void);
static void HideSaveMessageWindow(void);
static void HideSaveInfoWindow(void);
static void SaveStartTimer(void);
static bool8 SaveSuccesTimer(void);
static bool8 SaveErrorTimer(void);
static void InitBattlePyramidRetire(void);
static void sub_80A03D8(void);
static void VBlankCB_LinkBattleSave(void);
static bool32 InitSaveWindowAfterLinkBattle(u8 *par1);
static void CB2_SaveAfterLinkBattle(void);
static void ShowSaveInfoWindow(void);
@@ -887,7 +903,7 @@ static void SaveGameTask(u8 taskId)
EnableBothScriptContexts();
}
static void sub_80A0014(void)
static void HideSaveMessageWindow(void)
{
ClearDialogWindowAndFrame(0, TRUE);
}
@@ -982,7 +998,7 @@ static u8 SaveConfirmInputCallback(void)
case -1: // B Button
case 1: // No
HideSaveInfoWindow();
sub_80A0014();
HideSaveMessageWindow();
return SAVE_CANCELED;
}
@@ -1028,7 +1044,7 @@ static u8 SaveOverwriteInputCallback(void)
case -1: // B Button
case 1: // No
HideSaveInfoWindow();
sub_80A0014();
HideSaveMessageWindow();
return SAVE_CANCELED;
}
@@ -1146,14 +1162,14 @@ static u8 BattlePyramidRetireInputCallback(void)
return SAVE_CANCELED;
case -1: // B Button
case 1: // No
sub_80A0014();
HideSaveMessageWindow();
return SAVE_SUCCESS;
}
return SAVE_IN_PROGRESS;
}
static void sub_80A03D8(void)
static void VBlankCB_LinkBattleSave(void)
{
TransferPlttBuffer();
}
@@ -1167,7 +1183,7 @@ static bool32 InitSaveWindowAfterLinkBattle(u8 *state)
SetVBlankCallback(NULL);
ScanlineEffect_Stop();
DmaClear16(3, PLTT, PLTT_SIZE);
DmaFillLarge16(3, 0, (void *)(VRAM + 0x0), 0x18000, 0x1000);
DmaFillLarge16(3, 0, (void *)VRAM, VRAM_SIZE, 0x1000);
break;
case 1:
ResetSpriteData();
@@ -1177,15 +1193,15 @@ static bool32 InitSaveWindowAfterLinkBattle(u8 *state)
break;
case 2:
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, sUnknown_085105A8, ARRAY_COUNT(sUnknown_085105A8));
InitWindows(sUnknown_085105AC);
InitBgsFromTemplates(0, sBgTemplates_LinkBattleSave, ARRAY_COUNT(sBgTemplates_LinkBattleSave));
InitWindows(sWindowTemplates_LinkBattleSave);
LoadUserWindowBorderGfx_(0, 8, 224);
Menu_LoadStdPalAt(240);
break;
case 3:
ShowBg(0);
BlendPalettes(-1, 16, 0);
SetVBlankCallback(sub_80A03D8);
SetVBlankCallback(VBlankCB_LinkBattleSave);
EnableInterrupts(1);
break;
case 4: