2018-03-28 00:33:08 +02:00
|
|
|
|
2017-09-05 13:01:24 +02:00
|
|
|
#ifndef GUARD_MENU_H
|
|
|
|
#define GUARD_MENU_H
|
|
|
|
|
2018-02-07 07:07:42 +01:00
|
|
|
#include "task.h"
|
2017-11-19 22:48:46 +01:00
|
|
|
#include "text.h"
|
2017-09-29 00:11:42 +02:00
|
|
|
#include "window.h"
|
2017-09-05 13:01:24 +02:00
|
|
|
|
2017-12-16 15:10:29 +01:00
|
|
|
#define MENU_NOTHING_CHOSEN -2
|
|
|
|
#define MENU_B_PRESSED -1
|
|
|
|
|
2017-09-05 13:01:24 +02:00
|
|
|
struct MenuAction
|
|
|
|
{
|
|
|
|
const u8 *text;
|
2017-10-23 00:55:07 +02:00
|
|
|
union {
|
|
|
|
void (*void_u8)(u8);
|
|
|
|
u8 (*u8_void)(void);
|
|
|
|
} func;
|
2017-09-05 13:01:24 +02:00
|
|
|
};
|
|
|
|
|
2018-02-12 01:22:06 +01:00
|
|
|
extern const u16 gUnknown_0860F074[];
|
|
|
|
|
2018-12-27 23:30:47 +01:00
|
|
|
void FreeAllOverworldWindowBuffers(void);
|
|
|
|
void InitStandardTextBoxWindows(void);
|
2018-02-07 07:07:42 +01:00
|
|
|
void sub_8197200(void);
|
2018-09-14 19:15:46 +02:00
|
|
|
u16 RunTextPrintersAndIsPrinter0Active(void);
|
2018-02-07 07:07:42 +01:00
|
|
|
void sub_81973A4(void);
|
2019-02-22 07:40:11 +01:00
|
|
|
void DrawDialogueFrame(u8, u8);
|
|
|
|
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
|
2018-11-06 17:44:48 +01: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-28 00:33:08 +02:00
|
|
|
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
2018-02-07 07:07:42 +01:00
|
|
|
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
2019-02-22 07:40:11 +01:00
|
|
|
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
|
2019-03-05 12:06:20 +01:00
|
|
|
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
2019-02-27 04:30:40 +01:00
|
|
|
void DisplayYesNoMenuDefaultYes(void);
|
2018-11-07 03:20:56 +01:00
|
|
|
u32 GetPlayerTextSpeed(void);
|
2018-11-06 18:30:21 +01:00
|
|
|
u8 GetPlayerTextSpeedDelay(void);
|
2019-04-01 00:59:52 +02:00
|
|
|
void Menu_LoadStdPalAt(u16 arg0);
|
2018-11-06 17:44:48 +01:00
|
|
|
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16));
|
2018-12-08 21:42:36 +01:00
|
|
|
void sub_8199DF0(u32 bg, u8 a1, int a2, int a3);
|
2018-09-03 22:55:55 +02:00
|
|
|
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
2019-02-22 07:40:11 +01:00
|
|
|
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
2017-09-29 00:11:42 +02:00
|
|
|
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
2019-02-22 07:40:11 +01:00
|
|
|
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
2017-10-23 00:55:07 +02:00
|
|
|
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
|
2018-01-28 00:46:32 +01:00
|
|
|
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
|
|
|
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
2018-12-16 21:10:01 +01:00
|
|
|
u8 Menu_GetCursorPos(void);
|
2018-11-05 21:45:54 +01:00
|
|
|
s8 Menu_ProcessInput(void);
|
|
|
|
s8 Menu_ProcessInputNoWrap(void);
|
2017-10-23 00:55:07 +02:00
|
|
|
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
2017-10-13 04:59:01 +02:00
|
|
|
void reset_temp_tile_data_buffers(void);
|
2018-12-15 23:58:47 +01:00
|
|
|
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
2017-10-13 04:59:01 +02:00
|
|
|
bool8 free_temp_tile_data_buffers_if_possible(void);
|
2018-10-13 23:23:33 +02:00
|
|
|
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
|
2017-10-22 05:23:03 +02:00
|
|
|
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
2018-12-15 23:58:47 +01:00
|
|
|
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
2018-11-05 21:45:54 +01:00
|
|
|
s8 Menu_ProcessInputNoWrapClearOnChoose(void);
|
2018-03-12 09:26:20 +01:00
|
|
|
s8 ProcessMenuInput_other(void);
|
2017-10-29 15:38:25 +01:00
|
|
|
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
|
|
|
void clear_scheduled_bg_copies_to_vram(void);
|
2018-09-08 23:38:30 +02:00
|
|
|
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
2019-02-22 07:40:11 +01:00
|
|
|
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
|
2017-12-16 15:10:29 +01:00
|
|
|
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
2019-02-22 07:40:11 +01:00
|
|
|
void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
2018-01-27 06:41:52 +01:00
|
|
|
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
2018-12-15 23:58:47 +01:00
|
|
|
void *malloc_and_decompress(const void *src, u32 *sizeOut);
|
2018-01-30 00:26:36 +01:00
|
|
|
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
|
2018-02-08 01:06:59 +01:00
|
|
|
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
2018-08-30 15:01:07 +02: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);
|
2019-04-02 15:06:44 +02:00
|
|
|
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos);
|
2018-02-09 03:00:28 +01:00
|
|
|
u8 sub_8199134(s8, s8);
|
2018-03-28 00:33:08 +02:00
|
|
|
u8 GetStartMenuWindowId(void);
|
2018-02-09 03:00:28 +01:00
|
|
|
void sub_819A2BC(u8, u8);
|
2018-12-16 21:10:01 +01:00
|
|
|
u8 Menu_MoveCursor(s8 cursorDelta);
|
|
|
|
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
2019-02-22 07:40:11 +01:00
|
|
|
void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
|
2018-03-28 00:33:08 +02:00
|
|
|
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 02:16:02 +02:00
|
|
|
void RemoveStartMenuWindow(void);
|
2019-02-27 04:30:40 +01:00
|
|
|
void DisplayYesNoMenuWithDefault(u8 initialCursorPos);
|
2018-03-28 00:33:08 +02:00
|
|
|
void sub_819A344(u8 a0, u8 *dest, u8 color);
|
2018-04-09 09:22:28 +02:00
|
|
|
void RemoveMapNamePopUpWindow(void);
|
|
|
|
u8 GetMapNamePopUpWindowId(void);
|
|
|
|
u8 AddMapNamePopUpWindow(void);
|
2018-11-06 17:44:48 +01: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 06:56:11 +02: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-10 01:01:39 +02:00
|
|
|
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
|
2018-10-13 19:41:10 +02:00
|
|
|
void sub_8197AE8(bool8 copyToVram);
|
2019-04-02 15:06:44 +02:00
|
|
|
void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs);
|
2018-11-05 21:45:54 +01:00
|
|
|
s8 Menu_ProcessInputGridLayout(void);
|
2018-12-10 08:38:23 +01: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-24 00:02:29 +01: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);
|
2019-03-27 15:44:49 +01:00
|
|
|
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed);
|
2019-03-27 18:16:10 +01:00
|
|
|
void sub_8198C78(void);
|
2019-03-30 03:22:51 +01:00
|
|
|
void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs);
|
2017-09-18 17:26:45 +02:00
|
|
|
|
2017-09-05 13:01:24 +02:00
|
|
|
#endif // GUARD_MENU_H
|