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-07 07:07:42 +01:00
|
|
|
void sub_81971D0(void);
|
|
|
|
void sub_8197200(void);
|
2018-02-08 01:06:59 +01:00
|
|
|
u16 sub_8197224(void);
|
2018-02-07 07:07:42 +01:00
|
|
|
void sub_81973A4(void);
|
|
|
|
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
|
|
|
|
void sub_819746C(u8 windowId, bool8 copyToVram);
|
|
|
|
void NewMenuHelpers_DrawStdWindowFrame(u8, u8);
|
|
|
|
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
|
|
|
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
|
|
|
void sub_8197434(u8 a0, u8 a1);
|
|
|
|
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
|
|
|
void sub_8197930(void);
|
|
|
|
u8 GetPlayerTextSpeed(void);
|
|
|
|
void sub_81978B0(u16 arg0);
|
|
|
|
|
2018-02-07 03:37:54 +01:00
|
|
|
void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
2017-09-29 00:11:42 +02: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-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);
|
2017-10-23 00:55:07 +02:00
|
|
|
u8 GetMenuCursorPos(void);
|
|
|
|
s8 ProcessMenuInput(void);
|
2017-10-27 04:10:38 +02:00
|
|
|
s8 ProcessMenuInputNoWrapAround(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-01-30 00:26:36 +01:00
|
|
|
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, int size, u16 offset, u8 mode);
|
2017-10-13 04:59:01 +02:00
|
|
|
bool8 free_temp_tile_data_buffers_if_possible(void);
|
2018-01-27 06:41:52 +01:00
|
|
|
struct WindowTemplate sub_8198A50(u8, u8, u8, u8, u8, u8, u16);
|
2017-10-22 05:23:03 +02:00
|
|
|
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
2017-12-16 16:23:05 +01:00
|
|
|
s8 ProcessMenuInputNoWrap_(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-02-07 03:37:54 +01:00
|
|
|
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
2018-01-27 06:41:52 +01:00
|
|
|
void sub_8197B1C(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);
|
|
|
|
void sub_8197DF8(u8 windowId, bool8 copyToVram);
|
2018-01-27 06:41:52 +01:00
|
|
|
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
2018-01-30 00:26:36 +01:00
|
|
|
void *malloc_and_decompress(const void *src, int *sizeOut);
|
|
|
|
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);
|
2017-09-18 17:26:45 +02:00
|
|
|
|
2017-09-05 13:01:24 +02:00
|
|
|
#endif // GUARD_MENU_H
|