diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/GX_layers.h | 27 | ||||
-rw-r--r-- | include/error_message_reset.h | 24 | ||||
-rw-r--r-- | include/list_menu_cursor.h | 2 | ||||
-rw-r--r-- | include/script.h | 4 | ||||
-rw-r--r-- | include/script_buffers.h | 2 | ||||
-rw-r--r-- | include/text.h | 3 | ||||
-rw-r--r-- | include/text_02054590.h | 9 | ||||
-rw-r--r-- | include/unk_02016B94.h | 340 | ||||
-rw-r--r-- | include/window.h | 26 |
9 files changed, 376 insertions, 61 deletions
diff --git a/include/GX_layers.h b/include/GX_layers.h index d6afc743..3943d582 100644 --- a/include/GX_layers.h +++ b/include/GX_layers.h @@ -3,9 +3,6 @@ #include "global.h" -#include "GX_vramcnt.h" -#include "error_message_reset.h" -#include "gx.h" struct GX_LayerData { @@ -20,6 +17,30 @@ typedef enum { } GX_LayerToggle; +struct GraphicsBanks +{ + s32 bg; + s32 bgextpltt; + s32 subbg; + s32 subbgextpltt; + s32 obj; + s32 objextpltt; + s32 subobj; + s32 subobjextpltt; + s32 tex; + s32 texpltt; +}; + + +struct GraphicsModes { + u32 mode1; + u32 mode2; + u32 mode3; + u32 mode4; +}; + + + void GX_SetBanks(const struct GraphicsBanks *banks); void GX_DisableEngineALayers(); void GX_EngineAToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); diff --git a/include/error_message_reset.h b/include/error_message_reset.h index c3a3dd6a..01286ca9 100644 --- a/include/error_message_reset.h +++ b/include/error_message_reset.h @@ -9,30 +9,6 @@ #include "text.h" - -struct GraphicsBanks -{ - s32 bg; - s32 bgextpltt; - s32 subbg; - s32 subbgextpltt; - s32 obj; - s32 objextpltt; - s32 subobj; - s32 subobjextpltt; - s32 tex; - s32 texpltt; -}; - - -struct GraphicsModes { - u32 mode1; - u32 mode2; - u32 mode3; - u32 mode4; -}; - - void VBlankHandler(); void PrintErrorMessageAndReset(); diff --git a/include/list_menu_cursor.h b/include/list_menu_cursor.h index 355c63ec..e4a4b6b9 100644 --- a/include/list_menu_cursor.h +++ b/include/list_menu_cursor.h @@ -1,7 +1,7 @@ #ifndef POKEDIAMOND_LIST_MENU_CURSOR_H #define POKEDIAMOND_LIST_MENU_CURSOR_H -#include "window.h" +#include "unk_02016B94.h" // TODO: Move to its own header, and fill it out struct ListMenuCursor diff --git a/include/script.h b/include/script.h index cb41889d..01bba305 100644 --- a/include/script.h +++ b/include/script.h @@ -4,6 +4,8 @@ #include "global.h"
#include "msgdata.h"
#include "save_block_2.h"
+#include "unk_02016B94.h"
+
struct ScriptContext;
@@ -26,7 +28,7 @@ struct UnkStruct_02046444 struct UnkSavStruct80
{
u8 padding[0x8];
- u32 unk08;
+ struct UnkStruct_02016B94_2 *unk08;
struct SaveBlock2 *saveBlock2; //0xC
struct UnkStruct_0204639C *unk10;
u8 padding2[0x8];
diff --git a/include/script_buffers.h b/include/script_buffers.h index 51a02e43..9a742545 100644 --- a/include/script_buffers.h +++ b/include/script_buffers.h @@ -4,7 +4,7 @@ #include "pokemon.h" #include "pokemon_storage_system.h" #include "trainer_data.h" -#include "window.h" +#include "unk_02016B94.h" struct UnkStruct_0200AA80_sub_sub { diff --git a/include/text.h b/include/text.h index 514e8ba7..c9984d75 100644 --- a/include/text.h +++ b/include/text.h @@ -2,8 +2,9 @@ #define POKEDIAMOND_TEXT_H #include "global.h" -#include "window.h" #include "font.h" +#include "unk_02016B94.h" + #define CHAR_0 0x00A2 #define CHAR_1 0x00A3 diff --git a/include/text_02054590.h b/include/text_02054590.h index 32dca79a..77170e70 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -3,17 +3,18 @@ #include "global.h" #include "options.h" -#include "window.h" +#include "unk_02016B94.h" #include "string16.h" + void FUN_02054590(u32 param0, u32 param1); -void FUN_020545B8(u32 param0, u32 param1, u32 param2); +void FUN_020545B8(struct UnkStruct_02016B94_2 *param0, struct Window *param1, u32 param2); void FUN_02054608(struct Window *param0, struct Options *options); void FUN_0205464C(struct Window *param0); u16 FUN_02054658(struct Window * window, struct String *str, struct Options *options, u8 param3); u16 DrawFieldMessage(struct Window * window, struct String *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_020546E0(struct UnkStruct_02016B94_2 *param0, struct Window *param1, u32 param2, u32 param3); void FUN_02054744(struct Window *param0, u32 param1, u32 param2); -#endif //POKEDIAMOND_UNK_02054590_H +#endif // POKEDIAMOND_UNK_02054590_H diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h new file mode 100644 index 00000000..a13f1634 --- /dev/null +++ b/include/unk_02016B94.h @@ -0,0 +1,340 @@ +#ifndef POKEDIAMOND_UNK_02016B94_H +#define POKEDIAMOND_UNK_02016B94_H + +#include "global.h" +#include "GX_layers.h" +#include "MI_uncompress.h" +#include "OS_cache.h" +#include "gx.h" +#include "heap.h" +#include "math_util.h" + +#define reg_G2_BG2P (u32 *)0x4000020 +#define reg_G2_BG3P (u32 *)0x4000030 +#define reg_G2S_DB_BG2P (u32 *)0x4001020 +#define reg_G2S_DB_BG3P (u32 *)0x4001030 +struct UnkStruct_02016B94_1 +{ + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; + + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; + u8 unk14; + u8 unk15; + u8 unk16; + u8 unk17; // probably paddding + u32 unk18; +}; + +struct UnkStruct_02016B94_2 +{ + u32 unk00; + u16 unk04; + u16 unk06; + + struct UnkStruct_02016B94_2_sub + { + void *unk08; + u32 unk0c; + u32 unk10; + + fx32 unk14; + fx32 unk18; + + u8 unk1c; + u8 unk1d; + u8 unk1e; + u8 unk1f; + u16 unk20; + u16 unk22; // probably padding + fx32 unk24; + fx32 unk28; + fx32 unk2c; + fx32 unk30; + } unk08[8]; +}; + +struct UnkStruct_02016B94_3 +{ + void *unk00; + u16 unk04; + u16 unk06; +}; + +struct UnkStruct_02016B94_4 +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + u8 unk4; + u8 unk5; + u16 unk6; +}; + +struct Window +{ + struct UnkStruct_02016B94_2 *unk00; + u8 unk04; + u8 unk05; + u8 unk06; + u8 width; + u8 height; + u8 unk09; + u16 unk0a_0 : 15; + u16 unk0b_15 : 1; + void *unk0c; +}; + +struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id); +u32 FUN_02016BB8(u32 *param0); +void FUN_02016BBC(const struct GraphicsModes *modes); +void FUN_02016BF4(u32 *param0, u32 param1); +void FUN_02016C18( + struct UnkStruct_02016B94_2 *param0, u8 param1, struct UnkStruct_02016B94_1 *param2, u8 param3); +void FUN_020170F4(struct UnkStruct_02016B94_2 *param0, u8 param1, u32 param2, u8 param3); +u8 FUN_020177DC(u8 param0, u32 param1); +void FUN_02017850(u32 param0, u8 *param1, u8 *param2); +void FUN_020178A0(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_020178BC(u32 param0, u16 param1); +void FUN_0201797C(u32 param0, GX_LayerToggle toggle); +void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 val); +fx32 FUN_02017B48(struct UnkStruct_02016B94_2 *param0, u32 param1); +fx32 FUN_02017B54(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02017B60(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u32 param2, + fx32 param3, + struct Mtx22 *param4, + fx32 param5, + fx32 param6); +void FUN_02017B8C(struct UnkStruct_02016B94_2_sub *param0, u32 param1, fx32 val); +void FUN_02017BD0(struct UnkStruct_02016B94_2 *param0, + u32 param1, + struct Mtx22 *param2, + fx32 param3, + fx32 param4); +void FUN_02017C6C(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02017C98(const void *param0, void *param1, u32 param2); +void FUN_02017CD0(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02017CE8( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017D68(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017DFC(struct UnkStruct_02016B94_2 *param0, u32 param1, void *param2, u32 param3); +void FUN_02017E14( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E40( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E84(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017F18(u32 param0, u32 size, u32 offset, u32 heap_id); +void FUN_02017F48( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_02017FB4(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017FE4(u32 param0, u32 param1); +u16 FUN_02017FFC(u8 param0, u8 param1, u8 param2); +u16 FUN_02018068(u8 param0, u8 param1, u8 param2, u8 param3); +void FUN_02018148(struct UnkStruct_02016B94_2 *param0, + u32 param1, + void *param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); +void FUN_02018170(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + void *param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_020181EC(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + void *param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_02018268(struct UnkStruct_02016B94_2_sub *param0, + u8 param1, + u8 param2, + u8 param3, + u8 param4, + u16 *param5, + u8 param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_020183DC(struct UnkStruct_02016B94_2_sub *param0, + u8 param1, + u8 param2, + u8 param3, + u8 param4, + u8 *param5, + u8 param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_02018540(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u16 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u8 param7); +void FUN_02018590(struct UnkStruct_02016B94_2_sub *param0, + u16 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); +void FUN_02018640( + struct UnkStruct_02016B94_2_sub *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5); +void FUN_020186B4(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); +void FUN_02018744(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02018768(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); +void FUN_0201878C(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); +void *FUN_020187B0(u32 param0); +void FUN_02018808(u8 *param0, u32 param1, u8 (*param2)[2], u8 param3); +u8 (*FUN_02018848(u8 *param0, u32 param1, u8 param2, u32 heap_id))[2]; +void *FUN_0201886C(struct UnkStruct_02016B94_2 *param0, u32 param1); +u16 FUN_02018878(struct UnkStruct_02016B94_2 *param0, u32 param1); +u8 FUN_02018884(struct UnkStruct_02016B94_2 *param0, u32 param1); +void BlitBitmapRect4Bit(struct UnkStruct_02016B94_3 *param0, + struct UnkStruct_02016B94_3 *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8); +void BlitBitmapRect8Bit(struct UnkStruct_02016B94_3 *param0, + struct UnkStruct_02016B94_3 *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8); +void FUN_02018E88( + struct UnkStruct_02016B94_3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); +void FUN_02018F4C( + struct UnkStruct_02016B94_3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); +void *AllocWindows(u32 heap_id, s32 size); +void InitWindow(struct Window *param0); +BOOL FUN_02019048(struct Window *param0); +void FUN_02019064(struct UnkStruct_02016B94_2 *param0, + struct Window *param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u8 param7, + u16 param8); +void FUN_020190EC(struct UnkStruct_02016B94_2 *param0, + struct Window *param1, + u8 param2, + u8 param3, + u16 param4, + u8 param5); +void FUN_02019150(struct UnkStruct_02016B94_2 *param0, + struct Window *param1, + struct UnkStruct_02016B94_4 *param2); +void FUN_02019178(struct Window *param0); +void FUN_020191A4(struct Window *param0, int param1); +void CopyWindowToVram(struct Window *param0); +void FUN_02019220(struct Window *param0); +void FUN_02019270(struct Window *param0); +void FUN_0201928C(struct Window *param0, u8 param1, u8 param2); +void FUN_020192B8(struct Window *param0); +void FUN_020192D4(struct Window *param0); +void FUN_02019358(struct Window *param0); +void FUN_020193B4(struct Window *param0); +void FUN_02019444(struct Window *param0); +void FUN_0201949C(struct Window *window); +void FUN_020194C8(struct Window *window); +void FUN_020194E0(struct Window *window); +void FUN_0201951C(struct Window *window); +void FUN_02019548(struct Window *window); +void FUN_02019570(struct Window *window); +void FUN_0201958C(struct Window *window); +void FUN_020195A8(struct Window *window); +void FUN_020195D0(struct Window *window); +void FUN_020195E4(struct Window *window); +void FUN_0201960C(struct Window *window); +void FillWindowPixelBuffer(struct Window *window, u8 param1); +void BlitBitmapRectToWindow(struct Window *window, + const void *src, + u16 srcX, + u16 srcY, + u16 srcWidth, + u16 srcHeight, + u16 dstX, + u16 dstY, + u16 dstWidth, + u16 dstHeight); +void BlitBitmapRect(struct Window *window, + void *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8, + u16 param9, + u16 param10); +void FillWindowPixelRect(struct Window *window, u8 fillValue, u16 x, u16 y, u16 width, u16 height); +void FUN_0201974C( + struct Window *window, u32 *param1, u32 param2, u32 param3, u16 param4, u16 param5, u32 param6); +void ScrollWindow(struct Window *window, u32 param1, u8 param2, u8 param3); +void FUN_0201A8E8(struct Window *window, u32 param1, u8 param2, u8 param3); +void FUN_0201A9D4(struct Window *window, u32 param1, u8 param2, u8 param3); +u8 FUN_0201AB08(struct Window *window); +u8 GetWindowWidth(struct Window *window); +u8 GetWindowHeight(struct Window *window); +u8 FUN_0201AB14(struct Window *window); +u8 FUN_0201AB18(struct Window *window); +void FUN_0201AB1C(struct Window *window, u8 param1); +void FUN_0201AB20(struct Window *window, u8 param1); +void FUN_0201AB24(struct Window *window, u8 param1); +u32 FUN_0201AB28(struct Window *window, u32 heap_id, const char *path); +u32 FUN_0201AB44(struct Window *window, u32 heap_id, const char *path); +void FUN_0201AB60(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AB78(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AC68(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AEE4(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF08(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u16 param3); +void FUN_0201AF2C(struct UnkStruct_02016B94_2_sub *param0, u32 param1, u16 val); +void FUN_0201AF50(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF74(struct UnkStruct_02016B94_2_sub *param0, u32 param1, fx32 val); +u32 FUN_0201AFBC(struct UnkStruct_02016B94_2 *param0, u8 param1, u8 param2, u8 param3, u16 *param4); +void FUN_0201B118(struct UnkStruct_02016B94_2 *param0, u8 param1, u8 *param2); + +#endif // POKEDIAMOND_UNK_02016B94_H diff --git a/include/window.h b/include/window.h deleted file mode 100644 index ed3576fb..00000000 --- a/include/window.h +++ /dev/null @@ -1,26 +0,0 @@ -#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 *); -extern void BlitBitmapRectToWindow(struct Window * window, const void * src, u16 srcX, u16 srcY, u16 srcWidth, u16 srcHeight, u16 dstX, u16 dstY, u16 dstWidth, u16 dstHeight); - -#endif // POKEDIAMOND_WINDOW_H |