diff options
author | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-22 11:02:04 +0200 |
---|---|---|
committer | Rémi Calixte <remicalixte.rmc@gmail.com> | 2021-08-22 11:02:04 +0200 |
commit | 08c88720e7d4a5520262468f70e62b99429c10cb (patch) | |
tree | 801d501632871b3ce2d89ad82e3781f937d5b5a1 | |
parent | 99d4cb2b2addcd12e7775c7817c5ed7783cbe971 (diff) |
rename unk_0200CABC to render_window
-rw-r--r-- | arm9/arm9.lsf | 2 | ||||
-rw-r--r-- | arm9/src/communication_error.c | 2 | ||||
-rw-r--r-- | arm9/src/error_message_reset.c | 2 | ||||
-rw-r--r-- | arm9/src/render_window.c (renamed from arm9/src/unk_0200CABC.c) | 104 | ||||
-rw-r--r-- | arm9/src/save_data_read_error.c | 2 | ||||
-rw-r--r-- | arm9/src/save_data_write_error.c | 2 | ||||
-rw-r--r-- | arm9/src/scrcmd.c | 2 | ||||
-rw-r--r-- | arm9/src/text_02054590.c | 2 | ||||
-rw-r--r-- | arm9/src/wfc_user_info_warning.c | 2 | ||||
-rw-r--r-- | include/render_window.h (renamed from include/unk_0200CABC.h) | 69 |
10 files changed, 68 insertions, 121 deletions
diff --git a/arm9/arm9.lsf b/arm9/arm9.lsf index 179bf053..04756a55 100644 --- a/arm9/arm9.lsf +++ b/arm9/arm9.lsf @@ -31,7 +31,7 @@ Static arm9 Object unk_0200BA78.o Object unk_0200BB14.o Object unk_0200CA44.o - Object unk_0200CABC.o + Object render_window.o Object unk_0200E1D0.o Object unk_0200E850.o Object unk_0201137C.o diff --git a/arm9/src/communication_error.c b/arm9/src/communication_error.c index 3c1f5a06..848e3d0a 100644 --- a/arm9/src/communication_error.c +++ b/arm9/src/communication_error.c @@ -7,7 +7,7 @@ #include "msgdata/msg.naix" #include "text.h" #include "brightness.h" -#include "unk_0200CABC.h" +#include "render_window.h" extern void FUN_0200E394(BOOL set_brightness_on_bottom_screen); extern void FUN_0200E3A0(BOOL set_brightness_on_bottom_screen, s32); diff --git a/arm9/src/error_message_reset.c b/arm9/src/error_message_reset.c index 55a816e8..12af3c6f 100644 --- a/arm9/src/error_message_reset.c +++ b/arm9/src/error_message_reset.c @@ -7,7 +7,7 @@ #include "PAD_pad.h" #include "font.h" #include "brightness.h" -#include "unk_0200CABC.h" +#include "render_window.h" const struct WindowTemplate UNK_020FF49C = { diff --git a/arm9/src/unk_0200CABC.c b/arm9/src/render_window.c index f57469e1..7a682eb6 100644 --- a/arm9/src/unk_0200CABC.c +++ b/arm9/src/render_window.c @@ -1,5 +1,5 @@ #include "global.h" -#include "unk_0200CABC.h" +#include "render_window.h" #include "filesystem.h" #include "gf_gfx_loader.h" #include "graphic/field_board.naix" @@ -131,26 +131,18 @@ THUMB_FUNC void DrawFrame1(struct BgConfig *bgConfig, u16 fillValue) { FillBgTilemapRect(bgConfig, bgId, fillValue, (u8)(x - 1), (u8)(y - 1), 1, 1, paletteNum); - FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 1), x, (u8)(y - 1), width, 1, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 1), x, (u8)(y - 1), width, 1, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 2), (u8)(x + width), (u8)(y - 1), 1, 1, paletteNum); - FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 3), (u8)(x - 1), y, 1, height, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 3), (u8)(x - 1), y, 1, height, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 5), (u8)(x + width), y, 1, height, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 6), (u8)(x - 1), (u8)(y + height), 1, 1, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 7), x, (u8)(y + height), width, 1, paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 8), - (u8)(x + width), - (u8)(y + height), - 1, - 1, - paletteNum); + FillBgTilemapRect( + bgConfig, bgId, (u16)(fillValue + 8), (u8)(x + width), (u8)(y + height), 1, 1, paletteNum); } THUMB_FUNC void DrawFrameAndWindow1( @@ -228,30 +220,15 @@ THUMB_FUNC void DrawFrame2(struct BgConfig *bgConfig, FillBgTilemapRect(bgConfig, bgId, fillValue, (u8)(x - 2), (u8)(y - 1), 1, 1, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 1), (u8)(x - 1), (u8)(y - 1), 1, 1, paletteNum); - FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 2), x, (u8)(y - 1), width, 1, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 2), x, (u8)(y - 1), width, 1, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 3), (u8)(x + width), (u8)(y - 1), 1, 1, paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 4), - (u8)(x + width + 1), - (u8)(y - 1), - 1, - 1, - paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 5), - (u8)(x + width + 2), - (u8)(y - 1), - 1, - 1, - paletteNum); FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 6), (u8)(x - 2), y, 1, height, paletteNum); + bgConfig, bgId, (u16)(fillValue + 4), (u8)(x + width + 1), (u8)(y - 1), 1, 1, paletteNum); FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 7), (u8)(x - 1), y, 1, height, paletteNum); + bgConfig, bgId, (u16)(fillValue + 5), (u8)(x + width + 2), (u8)(y - 1), 1, 1, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 6), (u8)(x - 2), y, 1, height, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 7), (u8)(x - 1), y, 1, height, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 9), (u8)(x + width), y, 1, height, paletteNum); FillBgTilemapRect( @@ -264,14 +241,8 @@ THUMB_FUNC void DrawFrame2(struct BgConfig *bgConfig, bgConfig, bgId, (u16)(fillValue + 13), (u8)(x - 1), (u8)(y + height), 1, 1, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 14), x, (u8)(y + height), width, 1, paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 15), - (u8)(x + width), - (u8)(y + height), - 1, - 1, - paletteNum); + FillBgTilemapRect( + bgConfig, bgId, (u16)(fillValue + 15), (u8)(x + width), (u8)(y + height), 1, 1, paletteNum); FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 16), @@ -487,28 +458,13 @@ THUMB_FUNC void DrawFrame3(struct BgConfig *bgConfig, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 3), (u8)(x + width), (u8)(y - 1), 1, 1, paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 4), - (u8)(x + width + 1), - (u8)(y - 1), - 1, - 1, - paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 5), - (u8)(x + width + 2), - (u8)(y - 1), - 1, - 1, - paletteNum); - FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 6), (u8)(x - 9), y, 1, height, paletteNum); FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 7), (u8)(x - 8), y, 1, height, paletteNum); + bgConfig, bgId, (u16)(fillValue + 4), (u8)(x + width + 1), (u8)(y - 1), 1, 1, paletteNum); FillBgTilemapRect( - bgConfig, bgId, (u16)(fillValue + 8), (u8)(x - 1), y, 1, height, paletteNum); + bgConfig, bgId, (u16)(fillValue + 5), (u8)(x + width + 2), (u8)(y - 1), 1, 1, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 6), (u8)(x - 9), y, 1, height, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 7), (u8)(x - 8), y, 1, height, paletteNum); + FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 8), (u8)(x - 1), y, 1, height, paletteNum); FillBgTilemapRect( bgConfig, bgId, (u16)(fillValue + 9), (u8)(x + width), y, 1, height, paletteNum); FillBgTilemapRect( @@ -527,14 +483,8 @@ THUMB_FUNC void DrawFrame3(struct BgConfig *bgConfig, (u8)(width + 7), 1, paletteNum); - FillBgTilemapRect(bgConfig, - bgId, - (u16)(fillValue + 15), - (u8)(x + width), - (u8)(y + height), - 1, - 1, - paletteNum); + FillBgTilemapRect( + bgConfig, bgId, (u16)(fillValue + 15), (u8)(x + width), (u8)(y + height), 1, 1, paletteNum); FillBgTilemapRect(bgConfig, bgId, (u16)(fillValue + 16), @@ -579,7 +529,8 @@ THUMB_FUNC void DrawWindowCorner(struct Window *window, u16 fillValue, u8 palett } } -THUMB_FUNC void DrawFrameAndWindow3(struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4) +THUMB_FUNC void DrawFrameAndWindow3( + struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4) { u8 bg_id = GetWindowBgId(window); if (param4 <= 1) @@ -989,7 +940,8 @@ THUMB_FUNC void FUN_0200DEF4( FreeToHeap(res); } -THUMB_FUNC void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 paletteNum, u16 fillValue) +THUMB_FUNC void DrawFramed10x10Square( + struct UnkStruct_0200CABC_2 *param0, u8 paletteNum, u16 fillValue) { FillBgTilemapRect(param0->bgConfig, param0->bgId, @@ -1069,13 +1021,7 @@ THUMB_FUNC void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 pa THUMB_FUNC void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0) { - FillBgTilemapRect(param0->bgConfig, - param0->bgId, - 0, - (u8)(param0->x - 1), - (u8)(param0->y - 1), - 12, - 12, - 0); + FillBgTilemapRect( + param0->bgConfig, param0->bgId, 0, (u8)(param0->x - 1), (u8)(param0->y - 1), 12, 12, 0); ScheduleBgTilemapBufferTransfer(param0->bgConfig, param0->bgId); } diff --git a/arm9/src/save_data_read_error.c b/arm9/src/save_data_read_error.c index 616578f4..45a0c7bd 100644 --- a/arm9/src/save_data_read_error.c +++ b/arm9/src/save_data_read_error.c @@ -6,7 +6,7 @@ #include "msgdata/msg.naix" #include "save_data_read_error.h" #include "text.h" -#include "unk_0200CABC.h" +#include "render_window.h" extern void FUN_02002ED0(enum GFBgLayer layer, u32 base_addr, u32 heap_id); extern void FUN_0200E394(BOOL set_brightness_on_bottom_screen); diff --git a/arm9/src/save_data_write_error.c b/arm9/src/save_data_write_error.c index 2a8848c6..3f03fb4b 100644 --- a/arm9/src/save_data_write_error.c +++ b/arm9/src/save_data_write_error.c @@ -6,7 +6,7 @@ #include "msgdata/msg.naix" #include "save_data_write_error.h" #include "text.h" -#include "unk_0200CABC.h" +#include "render_window.h" extern void FUN_02002ED0(enum GFBgLayer layer, u32 base_addr, u32 heap_id); extern void FUN_0200E394(BOOL set_brightness_on_bottom_screen); diff --git a/arm9/src/scrcmd.c b/arm9/src/scrcmd.c index 68769c88..2d57f0b1 100644 --- a/arm9/src/scrcmd.c +++ b/arm9/src/scrcmd.c @@ -6,7 +6,7 @@ #include "player_data.h" #include "text.h" #include "bg_window.h" -#include "unk_0200CABC.h" +#include "render_window.h" #include "text_02054590.h" diff --git a/arm9/src/text_02054590.c b/arm9/src/text_02054590.c index e3276f25..03d01ae6 100644 --- a/arm9/src/text_02054590.c +++ b/arm9/src/text_02054590.c @@ -3,7 +3,7 @@ #include "bg_window.h" #include "font.h" #include "render_text.h" -#include "unk_0200CABC.h" +#include "render_window.h" extern void FUN_0201BD5C(void); diff --git a/arm9/src/wfc_user_info_warning.c b/arm9/src/wfc_user_info_warning.c index f16b4faa..e48262b0 100644 --- a/arm9/src/wfc_user_info_warning.c +++ b/arm9/src/wfc_user_info_warning.c @@ -11,7 +11,7 @@ #include "text.h" #include "wfc_user_info_warning.h" #include "brightness.h" -#include "unk_0200CABC.h" +#include "render_window.h" extern void FUN_02002ED0(enum GFBgLayer layer, u32 base_addr, u32 heap_id); extern void FUN_0200E394(BOOL set_brightness_on_bottom_screen); diff --git a/include/unk_0200CABC.h b/include/render_window.h index 1dfba21d..385c61ad 100644 --- a/include/unk_0200CABC.h +++ b/include/render_window.h @@ -46,12 +46,12 @@ void FUN_0200CB00( struct BgConfig *bg_config, u32 layer, u32 num_tiles, u32 param3, u8 param4, u32 heap_id); void DrawFrame1(struct BgConfig *bgConfig, u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); void DrawFrameAndWindow1(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); void ClearFrameAndWindow1(struct Window *window, BOOL copy_to_vram); s32 FUN_0200CD60(s32 param0); @@ -60,27 +60,27 @@ void FUN_0200CD68( struct BgConfig *param0, u32 param1, u32 param2, u32 param3, u8 param4, u32 param5); void DrawFrame2(struct BgConfig *bgConfig, u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); void DrawWindowFrame2(struct Window *window, u32 fill_value, u32 palette_num); void DrawFrameAndWindow2(struct Window *window, BOOL copy_to_vram, u16 fill_value, u8 palette_num); void ClearFrameAndWindow2(struct Window *window, BOOL param1); -void BlitRect4Bit(u8 *param0, - u16 param1, - u16 param2, - u16 param3, - u16 param4, - u8 *param5, - u16 param6, - u16 param7, - u16 param8, - u16 param9, - u16 param10, - u16 param11); +void BlitRect4Bit(u8 *srcPixels, + u16 srcX, + u16 srcY, + u16 srcWidth, + u16 srcHeight, + u8 *dstPixels, + u16 dstWidth, + u16 dstHeight, + u16 dstX, + u16 dstY, + u16 width, + u16 height); void FUN_0200D18C(struct Window *window, u16 fill_value); void FUN_0200D274( struct BgConfig *bg_config, u8 bg_id, u16 param2, u8 param3, u8 param4, u32 heap_id); @@ -95,15 +95,16 @@ void FUN_0200D378( struct BgConfig *bg_config, u8 bg_id, u16 numtiles, u8 param3, u16 param4, u32 heap_id); void DrawFrame3(struct BgConfig *bgConfig, u8 bgId, - u8 param2, - u8 param3, - u8 param4, - u8 param5, - u8 param6, - u16 param7); -void DrawWindowCorner(struct Window *window, u16 param1, u8 param2); -void DrawFrameAndWindow3(struct Window *window, BOOL param1, u16 param2, u8 param3, u8 param4); -void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL param2); + u8 x, + u8 y, + u8 width, + u8 height, + u8 paletteNum, + u16 fillValue); +void DrawWindowCorner(struct Window *window, u16 fillValue, u8 paletteNum); +void DrawFrameAndWindow3( + struct Window *window, BOOL copy_to_vram, u16 fillValue, u8 paletteNum, u8 param4); +void ClearFrameAndWindow3(struct Window *window, u8 param1, BOOL copy_to_vram); struct UnkStruct_0200CABC_1 *FUN_0200D858(struct Window *window, u32 param1); void FUN_0200D980(struct UnkStruct_0200CABC_1 *param0, u32 param1); void FUN_0200DB7C(u32 param0, void *param1); @@ -136,7 +137,7 @@ void FUN_0200DE30(struct UnkStruct_0200CABC_2 *param0, u8 param1, u8 param2); void FUN_0200DE80(struct UnkStruct_0200CABC_2 *param0, u16 param1, u8 param2); void FUN_0200DEC0(struct UnkStruct_0200CABC_2 *param0, struct Pokemon *param1); void FUN_0200DEF4(struct UnkStruct_0200CABC_2 *param0, struct SomeDrawPokemonStruct *param1); -void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 param1, u16 param2); +void DrawFramed10x10Square(struct UnkStruct_0200CABC_2 *param0, u8 paletteNum, u16 fillValue); void ClearFramed10x10Square(struct UnkStruct_0200CABC_2 *param0); #endif // POKEDIAMOND_UNK_0200CABC_H |