diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-21 19:43:41 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-05-21 19:43:41 -0400 |
commit | 70b098f92d46c134388e02bd8c436649fe31e999 (patch) | |
tree | b5da9769e665b58922cf0653a54cc205420a26a0 /include | |
parent | cdd1aae79156e0f7eaf1d2fd0056ef2af62a7f0e (diff) |
Fix parameterization
Diffstat (limited to 'include')
-rw-r--r-- | include/font.h | 6 | ||||
-rw-r--r-- | include/list_menu.h | 8 | ||||
-rw-r--r-- | include/list_menu_cursor.h | 17 | ||||
-rw-r--r-- | include/text.h | 9 | ||||
-rw-r--r-- | include/text_02054590.h | 11 | ||||
-rw-r--r-- | include/window.h | 25 |
6 files changed, 57 insertions, 19 deletions
diff --git a/include/font.h b/include/font.h new file mode 100644 index 00000000..e5e64e88 --- /dev/null +++ b/include/font.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_FONT_H +#define POKEDIAMOND_FONT_H + +extern s32 GetFontAttribute(u8 fontId, s32 attr); + +#endif // POKEDIAMOND_FONT_H diff --git a/include/list_menu.h b/include/list_menu.h index 35fc44e6..4cc1d247 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -1,7 +1,7 @@ #ifndef POKEDIAMOND_LIST_MENU_H #define POKEDIAMOND_LIST_MENU_H -#include "text.h" +#include "list_menu_cursor.h" #define LIST_HEADER -3 #define LIST_CANCEL -2 @@ -13,12 +13,6 @@ struct ListMenu; -// TODO: Move to its own header, and fill it out -struct ListMenuCursor -{ - // ??? -}; - struct ListMenuItem { const u16 * text; diff --git a/include/list_menu_cursor.h b/include/list_menu_cursor.h new file mode 100644 index 00000000..355c63ec --- /dev/null +++ b/include/list_menu_cursor.h @@ -0,0 +1,17 @@ +#ifndef POKEDIAMOND_LIST_MENU_CURSOR_H +#define POKEDIAMOND_LIST_MENU_CURSOR_H + +#include "window.h" + +// TODO: Move to its own header, and fill it out +struct ListMenuCursor +{ + // ??? +}; + +extern struct ListMenuCursor * ListMenuCursorNew(u32 heap_id); +extern void ListMenuUpdateCursorObj(struct ListMenuCursor *, struct Window *, u8 x, u8 y); +extern void ListMenuCursorSetColor(struct ListMenuCursor *, u32); +extern void DestroyListMenuCursorObj(struct ListMenuCursor *); + +#endif // POKEDIAMOND_LIST_MENU_CURSOR_H diff --git a/include/text.h b/include/text.h index 1218a0b3..78bfb9d4 100644 --- a/include/text.h +++ b/include/text.h @@ -2,13 +2,8 @@ #define POKEDIAMOND_TEXT_H #include "global.h" - -// TODO: Move to its own header, and fill it out -struct Window -{ - u8 * unk_00; - u8 unk_04; -}; +#include "window.h" +#include "font.h" struct TextPrinterTemplate { diff --git a/include/text_02054590.h b/include/text_02054590.h index 725bd9b4..b1ee055a 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -3,15 +3,16 @@ #include "global.h" #include "options.h" +#include "window.h" void FUN_02054590(u32 param0, u32 param1); void FUN_020545B8(u32 param0, u32 param1, u32 param2); -void FUN_02054608(u32 *param0, struct Options *options); -void FUN_0205464C(u32 *param0); -u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options, u8 param3); -u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); +void FUN_02054608(struct Window *param0, struct Options *options); +void FUN_0205464C(struct Window *param0); +u16 FUN_02054658(struct Window * window, const u16 *str, struct Options *options, u8 param3); +u16 DrawFieldMessage(struct Window * window, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); u8 FUN_020546C8(u32 param0); void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3); -void FUN_02054744(u32 *param0, u32 param1, u32 param2); +void FUN_02054744(struct Window *param0, u32 param1, u32 param2); #endif //POKEDIAMOND_UNK_02054590_H diff --git a/include/window.h b/include/window.h new file mode 100644 index 00000000..ebe3338a --- /dev/null +++ b/include/window.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_WINDOW_H +#define POKEDIAMOND_WINDOW_H + +struct Window +{ + u8 * unk_00; + u8 unk_04; + u8 unk_05; + u8 unk_06; + u8 width; + u8 height; + u8 unk_9; + u16 unk_A_0:15; + u16 unk_A_15:1; + void * unk_C; +}; + +extern void FillWindowPixelBuffer(struct Window *, u32); +extern void CopyWindowToVram(struct Window *); +extern void FillWindowPixelRect(struct Window *, u32 fillValue, u16 x, u16 y, u16 width, u16 height); +extern void ScrollWindow(struct Window *, u8, u8, u8); +extern u16 GetWindowWidth(struct Window *); +extern u16 GetWindowHeight(struct Window *); + +#endif // POKEDIAMOND_WINDOW_H |