mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
115 lines
5.9 KiB
C
115 lines
5.9 KiB
C
#ifndef GUARD_MENU_H
|
|
#define GUARD_MENU_H
|
|
|
|
#include "task.h"
|
|
#include "text.h"
|
|
#include "window.h"
|
|
|
|
#define MENU_NOTHING_CHOSEN -2
|
|
#define MENU_B_PRESSED -1
|
|
|
|
enum
|
|
{
|
|
SAVE_MENU_NAME,
|
|
SAVE_MENU_CAUGHT,
|
|
SAVE_MENU_PLAY_TIME,
|
|
SAVE_MENU_LOCATION,
|
|
SAVE_MENU_BADGES,
|
|
};
|
|
|
|
struct MenuAction
|
|
{
|
|
const u8 *text;
|
|
union {
|
|
void (*void_u8)(u8);
|
|
u8 (*u8_void)(void);
|
|
} func;
|
|
};
|
|
|
|
extern const u16 gUnknown_0860F074[];
|
|
|
|
void FreeAllOverworldWindowBuffers(void);
|
|
void InitStandardTextBoxWindows(void);
|
|
void sub_8197200(void);
|
|
u16 RunTextPrintersAndIsPrinter0Active(void);
|
|
void LoadMessageBoxAndBorderGfx(void);
|
|
void DrawDialogueFrame(u8 windowId, bool8 copyToVram);
|
|
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
|
|
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
|
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
|
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
|
|
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
|
void DisplayYesNoMenuDefaultYes(void);
|
|
u32 GetPlayerTextSpeed(void);
|
|
u8 GetPlayerTextSpeedDelay(void);
|
|
void Menu_LoadStdPalAt(u16 arg0);
|
|
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16));
|
|
void sub_8199DF0(u32 bg, u8 a1, int a2, int a3);
|
|
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
|
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
|
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
|
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
|
void ScheduleBgCopyTilemapToVram(u8 bgNum);
|
|
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
|
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
|
|
u8 Menu_GetCursorPos(void);
|
|
s8 Menu_ProcessInput(void);
|
|
s8 Menu_ProcessInputNoWrap(void);
|
|
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
|
|
void ResetTempTileDataBuffers(void);
|
|
void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
|
bool8 FreeTempTileDataBuffersIfPossible(void);
|
|
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
|
|
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
|
|
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
|
|
s8 Menu_ProcessInputNoWrapClearOnChoose(void);
|
|
s8 ProcessMenuInput_other(void);
|
|
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
|
void clear_scheduled_bg_copies_to_vram(void);
|
|
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
|
|
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
|
|
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
|
void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
|
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
|
|
void *malloc_and_decompress(const void *src, u32 *sizeOut);
|
|
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
|
|
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
|
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 columns, u8 rows, u8 initialCursorPos);
|
|
u8 sub_8199134(s8, s8);
|
|
u8 GetStartMenuWindowId(void);
|
|
void ListMenuLoadStdPalAt(u8, u8);
|
|
u8 Menu_MoveCursor(s8 cursorDelta);
|
|
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
|
|
void 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);
|
|
void RemoveStartMenuWindow(void);
|
|
void DisplayYesNoMenuWithDefault(u8 initialCursorPos);
|
|
void BufferSaveMenuText(u8 textId, u8 *dest, u8 color);
|
|
void RemoveMapNamePopUpWindow(void);
|
|
u8 GetMapNamePopUpWindowId(void);
|
|
u8 AddMapNamePopUpWindow(void);
|
|
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing);
|
|
void SetBgTilemapPalette(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);
|
|
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
|
|
void sub_8197AE8(bool8 copyToVram);
|
|
void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs);
|
|
s8 Menu_ProcessInputGridLayout(void);
|
|
u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted);
|
|
s8 Menu_ProcessInputNoWrapAround_other(void);
|
|
void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height);
|
|
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);
|
|
void ResetBgPositions(void);
|
|
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed);
|
|
void sub_8198C78(void);
|
|
void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs);
|
|
|
|
#endif // GUARD_MENU_H
|