2018-03-27 22:33:08 +00:00
|
|
|
|
2017-09-05 11:01:24 +00:00
|
|
|
#ifndef GUARD_MENU_H
|
|
|
|
#define GUARD_MENU_H
|
|
|
|
|
2018-02-07 06:07:42 +00:00
|
|
|
#include "task.h"
|
2017-11-19 21:48:46 +00:00
|
|
|
#include "text.h"
|
2017-09-28 22:11:42 +00:00
|
|
|
#include "window.h"
|
2017-09-05 11:01:24 +00:00
|
|
|
|
2017-12-16 14:10:29 +00:00
|
|
|
#define MENU_NOTHING_CHOSEN -2
|
|
|
|
#define MENU_B_PRESSED -1
|
|
|
|
|
2017-09-05 11:01:24 +00:00
|
|
|
struct MenuAction
|
|
|
|
{
|
|
|
|
const u8 *text;
|
2017-10-22 22:55:07 +00:00
|
|
|
union {
|
|
|
|
void (*void_u8)(u8);
|
|
|
|
u8 (*u8_void)(void);
|
|
|
|
} func;
|
2017-09-05 11:01:24 +00:00
|
|
|
};
|
|
|
|
|
2018-02-12 00:22:06 +00:00
|
|
|
extern const u16 gUnknown_0860F074[];
|
|
|
|
|
2018-12-27 22:30:47 +00:00
|
|
|
void FreeAllOverworldWindowBuffers(void);
|
|
|
|
void InitStandardTextBoxWindows(void);
|
2018-02-07 06:07:42 +00:00
|
|
|
void sub_8197200(void);
|
2018-09-14 17:15:46 +00:00
|
|
|
u16 RunTextPrintersAndIsPrinter0Active(void);
|
2018-02-07 06:07:42 +00:00
|
|
|
void sub_81973A4(void);
|
|
|
|
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
|
|
|
void sub_819746C(u8 windowId, bool8 copyToVram);
|
2018-11-06 16:44:48 +00:00
|
|
|
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
2018-03-27 22:33:08 +00:00
|
|
|
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
2018-02-07 06:07:42 +00:00
|
|
|
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
2018-03-27 22:33:08 +00:00
|
|
|
void sub_8197434(u8 windowId, bool8 copyToVram);
|
2018-02-07 06:07:42 +00:00
|
|
|
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
2018-11-05 20:45:54 +00:00
|
|
|
void DisplayYesNoMenu(void);
|
2018-11-07 02:20:56 +00:00
|
|
|
u32 GetPlayerTextSpeed(void);
|
2018-11-06 17:30:21 +00:00
|
|
|
u8 GetPlayerTextSpeedDelay(void);
|
2018-02-07 06:07:42 +00:00
|
|
|
void sub_81978B0(u16 arg0);
|
2018-11-06 16:44:48 +00:00
|
|
|
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16));
|
2018-12-08 20:42:36 +00:00
|
|
|
void sub_8199DF0(u32 bg, u8 a1, int a2, int a3);
|
2018-09-03 20:55:55 +00:00
|
|
|
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
2017-09-28 22:11:42 +00:00
|
|
|
void sub_8198070(u8 windowId, bool8 copyToVram);
|
|
|
|
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
|
|
|
void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
2017-10-22 22:55:07 +00:00
|
|
|
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
|
2018-01-27 23:46:32 +00:00
|
|
|
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
|
|
|
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
2018-12-16 20:10:01 +00:00
|
|
|
u8 Menu_GetCursorPos(void);
|
2018-11-05 20:45:54 +00:00
|
|
|
s8 Menu_ProcessInput(void);
|
|
|
|
s8 Menu_ProcessInputNoWrap(void);
|
2017-10-22 22:55:07 +00:00
|
|
|
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
2017-10-13 02:59:01 +00:00
|
|
|
void reset_temp_tile_data_buffers(void);
|
2018-12-15 22:58:47 +00:00
|
|
|
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
2017-10-13 02:59:01 +00:00
|
|
|
bool8 free_temp_tile_data_buffers_if_possible(void);
|
2018-10-13 21:23:33 +00:00
|
|
|
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
|
2017-10-22 03:23:03 +00:00
|
|
|
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
2018-12-15 22:58:47 +00:00
|
|
|
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
2018-11-05 20:45:54 +00:00
|
|
|
s8 Menu_ProcessInputNoWrapClearOnChoose(void);
|
2018-03-12 08:26:20 +00:00
|
|
|
s8 ProcessMenuInput_other(void);
|
2017-10-29 14:38:25 +00:00
|
|
|
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
|
|
|
void clear_scheduled_bg_copies_to_vram(void);
|
2018-09-08 21:38:30 +00:00
|
|
|
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
2018-01-27 05:41:52 +00:00
|
|
|
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
|
2017-12-16 14:10:29 +00:00
|
|
|
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
|
|
|
void sub_8197DF8(u8 windowId, bool8 copyToVram);
|
2018-01-27 05:41:52 +00:00
|
|
|
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
2018-12-15 22:58:47 +00:00
|
|
|
void *malloc_and_decompress(const void *src, u32 *sizeOut);
|
2018-01-29 23:26:36 +00:00
|
|
|
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
|
2018-02-08 00:06:59 +00:00
|
|
|
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
2018-08-30 13:01:07 +00:00
|
|
|
void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8);
|
|
|
|
void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8);
|
|
|
|
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 horizontalCount, u8 verticalCount, u8 initialCursorPos);
|
2018-02-09 02:00:28 +00:00
|
|
|
u8 sub_8199134(s8, s8);
|
2018-03-27 22:33:08 +00:00
|
|
|
u8 GetStartMenuWindowId(void);
|
2018-02-09 02:00:28 +00:00
|
|
|
void sub_819A2BC(u8, u8);
|
2018-12-16 20:10:01 +00:00
|
|
|
u8 Menu_MoveCursor(s8 cursorDelta);
|
|
|
|
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
2018-03-27 22:33:08 +00:00
|
|
|
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
|
|
|
|
u8 sub_81979C4(u8 a1);
|
|
|
|
u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos);
|
|
|
|
void sub_819786C(u8 windowId, bool8 copyToVram);
|
|
|
|
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
|
2018-03-29 00:16:02 +00:00
|
|
|
void RemoveStartMenuWindow(void);
|
2018-03-27 22:33:08 +00:00
|
|
|
void sub_8197948(u8 initialCursorPos);
|
|
|
|
void sub_819A344(u8 a0, u8 *dest, u8 color);
|
2018-04-09 07:22:28 +00:00
|
|
|
void RemoveMapNamePopUpWindow(void);
|
|
|
|
u8 GetMapNamePopUpWindowId(void);
|
|
|
|
u8 AddMapNamePopUpWindow(void);
|
2018-11-06 16:44:48 +00:00
|
|
|
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing);
|
2018-08-15 04:56:11 +00:00
|
|
|
void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette);
|
|
|
|
void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP);
|
2018-09-09 23:01:39 +00:00
|
|
|
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
|
2018-10-13 17:41:10 +00:00
|
|
|
void sub_8197AE8(bool8 copyToVram);
|
2018-11-05 20:45:54 +00:00
|
|
|
void sub_81997AC(u8 windowId, u8 a4, u8 a6, u8 a7, const struct MenuAction *strs);
|
|
|
|
s8 Menu_ProcessInputGridLayout(void);
|
2018-12-10 07:38:23 +00:00
|
|
|
u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted);
|
|
|
|
s8 Menu_ProcessInputNoWrapAround_other(void);
|
|
|
|
void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height);
|
2018-12-23 23:02:29 +00:00
|
|
|
u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile);
|
|
|
|
void sub_8198314(void);
|
|
|
|
void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram);
|
2017-09-18 15:26:45 +00:00
|
|
|
|
2017-09-05 11:01:24 +00:00
|
|
|
#endif // GUARD_MENU_H
|