diff --git a/include/render_window.h b/include/render_window.h new file mode 100644 index 0000000000..a5b6378537 --- /dev/null +++ b/include/render_window.h @@ -0,0 +1,49 @@ +#ifndef POKEPLATINUM_RENDER_WINDOW_H +#define POKEPLATINUM_RENDER_WINDOW_H + +#include "constants/heap.h" + +#include "bg_window.h" +#include "pokemon.h" + +#define TEXT_WINDOW_SIZE 30 + +enum StandardWindowType { + STANDARD_WINDOW_SYSTEM = 0, + STANDARD_WINDOW_FIELD, + STANDARD_WINDOW_UNDERGROUND, +}; + +enum SignpostType { + SIGNPOST_CITY_MAP = 0, + SIGNPOST_ROUTE_MAP, + SIGNPOST_BUILDING_INFO, + SIGNPOST_FIELD_INFO, +}; + +void LoadStandardWindowTiles(BgConfig *bgConfig, u8 bgLayer, u16 offset, u8 standardWindowType, u32 heapID); +u32 GetStandardWindowPaletteNARCMember(void); +void LoadStandardWindowGraphics(BgConfig *bgConfig, u8 bgLayer, u16 tileOffset, u8 palOffset, u8 standardWindowType, u32 heapID); +void Window_DrawStandardFrame(Window *window, u8 skipTransfer, u16 tile, u8 palette); +void Window_EraseStandardFrame(Window *window, u8 skipTransfer); + +u32 GetMessageBoxTilesNARCMember(u32 messageBoxFrame); +u32 GetMessageBoxPaletteNARCMember(u32 messageBoxFrame); +void LoadMessageBoxGraphics(BgConfig *bgConfig, u8 bgLayer, u16 tileOffset, u8 palOffset, u8 messageBoxFrame, u32 heapID); +void Window_DrawMessageBox(Window *window, u32 tile, u32 palette); +void Window_DrawMessageBoxWithScrollCursor(Window *window, u8 skipTransfer, u16 tile, u8 palette); +void Window_EraseMessageBox(Window *window, u8 skipTransfer); +void ReplaceTransparentTiles(BgConfig *bgConfig, u8 bgLayer, u16 bgBaseTile, u8 withTile, u8 messageBoxFrame, u32 heapID); + +void LoadSignpostContentGraphics(BgConfig *bgConfig, u8 bgLayer, u16 baseTile, u8 palette, u8 signpostType, u16 signpostNARCMemberIdx, u32 heapID); +void Window_DrawSignpost(Window *window, u8 skipTransfer, u16 baseTile, u8 palette, u8 signpostType); +void Window_EraseSignpost(Window *window, u8 signpostType, u8 skipTransfer); + +void *Window_AddWaitDial(Window *window, u32 baseTile); +void DestroyWaitDial(void *taskData); +void DestroyWaitDialTaskOnly(void *taskData); + +u8 *DrawPokemonPreview(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 palette, u16 baseTile, u16 species, u8 gender, enum HeapId heapID); +u8 *DrawPokemonPreviewFromStruct(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 palette, u16 baseTile, Pokemon *mon, enum HeapId heapID); + +#endif // POKEPLATINUM_RENDER_WINDOW_H diff --git a/include/unk_0200DA60.h b/include/unk_0200DA60.h deleted file mode 100644 index 39d597a7a3..0000000000 --- a/include/unk_0200DA60.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef POKEPLATINUM_UNK_0200DA60_H -#define POKEPLATINUM_UNK_0200DA60_H - -#include "bg_window.h" -#include "pokemon.h" - -#define TEXT_WINDOW_SIZE 30 - -void Window_SetFrame(BgConfig *param0, u8 param1, u16 param2, u8 param3, u32 param4); -u32 Window_FramePalette(void); -void sub_0200DAA4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5); -void Window_Show(Window *param0, u8 param1, u16 param2, u8 param3); -void Window_Clear(Window *param0, u8 param1); -u32 sub_0200DD04(u32 param0); -u32 sub_0200DD08(u32 param0); -void sub_0200DD0C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5); -void sub_0200E010(Window *param0, u32 param1, u32 param2); -void sub_0200E060(Window *param0, u8 param1, u16 param2, u8 param3); -void sub_0200E084(Window *param0, u8 param1); -void sub_0200E218(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5); -void sub_0200E2A4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u16 param5, u32 param6); -void sub_0200E69C(Window *param0, u8 param1, u16 param2, u8 param3, u8 param4); -void sub_0200E744(Window *param0, u8 param1, u8 param2); -void *sub_0200E7FC(Window *param0, u32 param1); -void DeleteWaitDial(void *param0); -void sub_0200EBC8(void *param0); -u8 *sub_0200EBF0(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 param5, u16 param6, u8 param7, int param8); -u8 *sub_0200EC48(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 param5, Pokemon *param6, int param7); - -#endif // POKEPLATINUM_UNK_0200DA60_H diff --git a/platinum.us/filesys.sha1 b/platinum.us/filesys.sha1 index 50832afc61..745da05271 100644 --- a/platinum.us/filesys.sha1 +++ b/platinum.us/filesys.sha1 @@ -197,7 +197,7 @@ d5a8953a61b8589539ce7b139ab956a802adaa33 *res/prebuilt/graphic/dendou_pc.narc 2d1a354e31cdd1861bdd7aade661fb9e4dc0ae31 *res/prebuilt/graphic/ending.narc d91ceca1e3ef5e57061dabc690c0f1a1556dc624 *res/prebuilt/graphic/ev_pokeselect.narc 5c673be62fe6bddfa911e3be26762b7e47d60b41 *res/prebuilt/graphic/f_note_gra.narc -4941a639804c2b009836d1ab9b86a2ab0bb0c436 *res/prebuilt/graphic/field_board.narc +4941a639804c2b009836d1ab9b86a2ab0bb0c436 *res/graphics/signposts/field_board.narc 3a71f8eca65f2524f96c4bb8463800ae19a70a90 *res/prebuilt/graphic/field_encounteffect.narc e4ad5fcd9010114089a5ded83a077a75860d633a *res/prebuilt/graphic/fld_comact.narc 1122e901209b1047fbbacb1a47311c8bd529a647 *res/prebuilt/graphic/font.narc @@ -220,7 +220,7 @@ dd0663e46347230d1d1b9eb8b583cee9acc10f31 *res/prebuilt/graphic/pl_bag_gra.narc d397dbd087737151aa8bea242016c626afb55fa5 *res/prebuilt/graphic/pl_plist_gra.narc 883e6afb310f0ab02c26f2026cba1c76210bb3ac *res/prebuilt/graphic/pl_pst_gra.narc c16faeeeee494830c720d1f795a141cacfe49121 *res/prebuilt/graphic/pl_wifinote.narc -298fd1d0ab31efd35cb00b977f69eacbfb8a8da8 *res/prebuilt/graphic/pl_winframe.narc +298fd1d0ab31efd35cb00b977f69eacbfb8a8da8 *res/graphics/windows/pl_winframe.narc b9f77b38cc07a6754fc00a7c1830d86c88d45aa6 *res/prebuilt/graphic/plist_gra.narc e6a7fe0328d168e1b4d92919fe047d2fa12daf56 *res/prebuilt/graphic/pmsi.narc 7c6a50d69659697636849cedebb0143ed0cf146a *res/prebuilt/graphic/poketch.narc diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index a80c1240a9..670168f641 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -44,7 +44,7 @@ Static main Object main.nef.p/src_unk_0200C440.c.o Object main.nef.p/src_unk_0200C6E4.c.o Object main.nef.p/src_sys_task.c.o - Object main.nef.p/src_unk_0200DA60.c.o + Object main.nef.p/src_render_window.c.o Object main.nef.p/src_unk_0200F174.c.o Object main.nef.p/src_unk_0200F85C.c.o Object main.nef.p/src_unk_02012480.c.o diff --git a/platinum.us/rom.rsf b/platinum.us/rom.rsf index e24b8e6d71..e1d9d5f6e6 100644 --- a/platinum.us/rom.rsf +++ b/platinum.us/rom.rsf @@ -290,7 +290,13 @@ RomSpec File graphic/ending.narc File graphic/ev_pokeselect.narc File graphic/f_note_gra.narc - File graphic/field_board.narc + + Root /graphic + HostRoot res/graphics/signposts + File field_board.narc + + Root / + HostRoot res/prebuilt File graphic/field_encounteffect.narc File graphic/fld_comact.narc File graphic/font.narc @@ -319,7 +325,13 @@ RomSpec File graphic/pl_plist_gra.narc File graphic/pl_pst_gra.narc File graphic/pl_wifinote.narc - File graphic/pl_winframe.narc + + Root /graphic + HostRoot res/graphics/windows + File pl_winframe.narc + + Root / + HostRoot res/prebuilt File graphic/plist_gra.narc File graphic/pmsi.narc File graphic/poketch.narc diff --git a/res/graphics/meson.build b/res/graphics/meson.build new file mode 100644 index 0000000000..30fcbfc472 --- /dev/null +++ b/res/graphics/meson.build @@ -0,0 +1,2 @@ +subdir('signposts') +subdir('windows') diff --git a/res/graphics/signposts/city_map_canalave.png b/res/graphics/signposts/city_map_canalave.png new file mode 100644 index 0000000000..4277e483da Binary files /dev/null and b/res/graphics/signposts/city_map_canalave.png differ diff --git a/res/graphics/signposts/city_map_celestic.png b/res/graphics/signposts/city_map_celestic.png new file mode 100644 index 0000000000..9e8c4f7170 Binary files /dev/null and b/res/graphics/signposts/city_map_celestic.png differ diff --git a/res/graphics/signposts/city_map_empty.png b/res/graphics/signposts/city_map_empty.png new file mode 100644 index 0000000000..b673ab7685 Binary files /dev/null and b/res/graphics/signposts/city_map_empty.png differ diff --git a/res/graphics/signposts/city_map_eterna.png b/res/graphics/signposts/city_map_eterna.png new file mode 100644 index 0000000000..a30999c762 Binary files /dev/null and b/res/graphics/signposts/city_map_eterna.png differ diff --git a/res/graphics/signposts/city_map_fight_area.png b/res/graphics/signposts/city_map_fight_area.png new file mode 100644 index 0000000000..752757dc19 Binary files /dev/null and b/res/graphics/signposts/city_map_fight_area.png differ diff --git a/res/graphics/signposts/city_map_floaroma.png b/res/graphics/signposts/city_map_floaroma.png new file mode 100644 index 0000000000..0f6972eab0 Binary files /dev/null and b/res/graphics/signposts/city_map_floaroma.png differ diff --git a/res/graphics/signposts/city_map_hearthome.png b/res/graphics/signposts/city_map_hearthome.png new file mode 100644 index 0000000000..031e9c2fa3 Binary files /dev/null and b/res/graphics/signposts/city_map_hearthome.png differ diff --git a/res/graphics/signposts/city_map_jubilife.png b/res/graphics/signposts/city_map_jubilife.png new file mode 100644 index 0000000000..048703e614 Binary files /dev/null and b/res/graphics/signposts/city_map_jubilife.png differ diff --git a/res/graphics/signposts/city_map_oreburgh.png b/res/graphics/signposts/city_map_oreburgh.png new file mode 100644 index 0000000000..85a9539e08 Binary files /dev/null and b/res/graphics/signposts/city_map_oreburgh.png differ diff --git a/res/graphics/signposts/city_map_pastoria.png b/res/graphics/signposts/city_map_pastoria.png new file mode 100644 index 0000000000..e119ac731f Binary files /dev/null and b/res/graphics/signposts/city_map_pastoria.png differ diff --git a/res/graphics/signposts/city_map_pokemon_league.png b/res/graphics/signposts/city_map_pokemon_league.png new file mode 100644 index 0000000000..90cadf55bd Binary files /dev/null and b/res/graphics/signposts/city_map_pokemon_league.png differ diff --git a/res/graphics/signposts/city_map_resort_area.png b/res/graphics/signposts/city_map_resort_area.png new file mode 100644 index 0000000000..bcf9c7dadb Binary files /dev/null and b/res/graphics/signposts/city_map_resort_area.png differ diff --git a/res/graphics/signposts/city_map_sandgem.png b/res/graphics/signposts/city_map_sandgem.png new file mode 100644 index 0000000000..519a6d75ff Binary files /dev/null and b/res/graphics/signposts/city_map_sandgem.png differ diff --git a/res/graphics/signposts/city_map_snowpoint.png b/res/graphics/signposts/city_map_snowpoint.png new file mode 100644 index 0000000000..e432e354d6 Binary files /dev/null and b/res/graphics/signposts/city_map_snowpoint.png differ diff --git a/res/graphics/signposts/city_map_solaceon.png b/res/graphics/signposts/city_map_solaceon.png new file mode 100644 index 0000000000..2ac3406cc2 Binary files /dev/null and b/res/graphics/signposts/city_map_solaceon.png differ diff --git a/res/graphics/signposts/city_map_sunyshore.png b/res/graphics/signposts/city_map_sunyshore.png new file mode 100644 index 0000000000..2f75369ee7 Binary files /dev/null and b/res/graphics/signposts/city_map_sunyshore.png differ diff --git a/res/graphics/signposts/city_map_survival_area.png b/res/graphics/signposts/city_map_survival_area.png new file mode 100644 index 0000000000..2cbfb21d90 Binary files /dev/null and b/res/graphics/signposts/city_map_survival_area.png differ diff --git a/res/graphics/signposts/city_map_twinleaf.png b/res/graphics/signposts/city_map_twinleaf.png new file mode 100644 index 0000000000..7257a1972d Binary files /dev/null and b/res/graphics/signposts/city_map_twinleaf.png differ diff --git a/res/graphics/signposts/city_map_veilstone.png b/res/graphics/signposts/city_map_veilstone.png new file mode 100644 index 0000000000..99554fe896 Binary files /dev/null and b/res/graphics/signposts/city_map_veilstone.png differ diff --git a/res/graphics/signposts/field_board.order b/res/graphics/signposts/field_board.order new file mode 100644 index 0000000000..8bcdf7099b --- /dev/null +++ b/res/graphics/signposts/field_board.order @@ -0,0 +1,52 @@ +signpost_frame.NCGR +signpost.NCLR +route_map_00.NCGR +route_map_01.NCGR +route_map_02.NCGR +route_map_03.NCGR +route_map_04.NCGR +route_map_05.NCGR +route_map_06.NCGR +route_map_07.NCGR +route_map_08.NCGR +route_map_09.NCGR +route_map_10.NCGR +route_map_11.NCGR +route_map_12.NCGR +route_map_13.NCGR +route_map_14.NCGR +route_map_15.NCGR +route_map_16.NCGR +route_map_17.NCGR +route_map_18.NCGR +route_map_19.NCGR +route_map_20.NCGR +route_map_21.NCGR +route_map_22.NCGR +route_map_23.NCGR +route_map_24.NCGR +route_map_25.NCGR +route_map_26.NCGR +route_map_27.NCGR +route_map_28.NCGR +route_map_29.NCGR +route_map_30.NCGR +city_map_empty.NCGR +city_map_twinleaf.NCGR +city_map_sandgem.NCGR +city_map_floaroma.NCGR +city_map_solaceon.NCGR +city_map_celestic.NCGR +city_map_survival_area.NCGR +city_map_resort_area.NCGR +city_map_jubilife.NCGR +city_map_canalave.NCGR +city_map_oreburgh.NCGR +city_map_eterna.NCGR +city_map_hearthome.NCGR +city_map_pastoria.NCGR +city_map_veilstone.NCGR +city_map_sunyshore.NCGR +city_map_snowpoint.NCGR +city_map_pokemon_league.NCGR +city_map_fight_area.NCGR diff --git a/res/graphics/signposts/meson.build b/res/graphics/signposts/meson.build new file mode 100644 index 0000000000..49bf6e1825 --- /dev/null +++ b/res/graphics/signposts/meson.build @@ -0,0 +1,92 @@ +field_board_pngs = files( + 'signpost_frame.png', + 'route_map_00.png', + 'route_map_01.png', + 'route_map_02.png', + 'route_map_03.png', + 'route_map_04.png', + 'route_map_05.png', + 'route_map_06.png', + 'route_map_07.png', + 'route_map_08.png', + 'route_map_09.png', + 'route_map_10.png', + 'route_map_11.png', + 'route_map_12.png', + 'route_map_13.png', + 'route_map_14.png', + 'route_map_15.png', + 'route_map_16.png', + 'route_map_17.png', + 'route_map_18.png', + 'route_map_19.png', + 'route_map_20.png', + 'route_map_21.png', + 'route_map_22.png', + 'route_map_23.png', + 'route_map_24.png', + 'route_map_25.png', + 'route_map_26.png', + 'route_map_27.png', + 'route_map_28.png', + 'route_map_29.png', + 'route_map_30.png', + 'city_map_empty.png', + 'city_map_twinleaf.png', + 'city_map_sandgem.png', + 'city_map_floaroma.png', + 'city_map_solaceon.png', + 'city_map_celestic.png', + 'city_map_survival_area.png', + 'city_map_resort_area.png', + 'city_map_jubilife.png', + 'city_map_canalave.png', + 'city_map_oreburgh.png', + 'city_map_eterna.png', + 'city_map_hearthome.png', + 'city_map_pastoria.png', + 'city_map_veilstone.png', + 'city_map_sunyshore.png', + 'city_map_snowpoint.png', + 'city_map_pokemon_league.png', + 'city_map_fight_area.png', +) + +field_board_pals = files('signpost.pal') + +field_board_ncgrs = ncgr_gen.process(field_board_pngs, + extra_args: [ + '-sopc', + '-version101', + ] +) + +field_board_nclrs = nclr_gen.process(field_board_pals, + extra_args: [ + '-bitdepth', '4', + ] +) + +field_board_order = files('field_board.order') + +field_board_narc = custom_target('field_board.narc', + output: [ + 'field_board.narc', + 'field_board.naix', + ], + input: [ + field_board_ncgrs, + field_board_nclrs, + field_board_order, + ], + command: [ + knarc_exe, + '-d', '@PRIVATE_DIR@', + '-p', '@OUTPUT0@', + '--order', field_board_order, + '--naix', + ] +) + +nitrofs_files += field_board_narc[0] +naix_headers += field_board_narc[1] diff --git a/res/graphics/signposts/route_map_00.png b/res/graphics/signposts/route_map_00.png new file mode 100644 index 0000000000..b421947ef9 Binary files /dev/null and b/res/graphics/signposts/route_map_00.png differ diff --git a/res/graphics/signposts/route_map_01.png b/res/graphics/signposts/route_map_01.png new file mode 100644 index 0000000000..e24f75392f Binary files /dev/null and b/res/graphics/signposts/route_map_01.png differ diff --git a/res/graphics/signposts/route_map_02.png b/res/graphics/signposts/route_map_02.png new file mode 100644 index 0000000000..d6075bff66 Binary files /dev/null and b/res/graphics/signposts/route_map_02.png differ diff --git a/res/graphics/signposts/route_map_03.png b/res/graphics/signposts/route_map_03.png new file mode 100644 index 0000000000..46423a8089 Binary files /dev/null and b/res/graphics/signposts/route_map_03.png differ diff --git a/res/graphics/signposts/route_map_04.png b/res/graphics/signposts/route_map_04.png new file mode 100644 index 0000000000..59450a52e5 Binary files /dev/null and b/res/graphics/signposts/route_map_04.png differ diff --git a/res/graphics/signposts/route_map_05.png b/res/graphics/signposts/route_map_05.png new file mode 100644 index 0000000000..4ad6067a58 Binary files /dev/null and b/res/graphics/signposts/route_map_05.png differ diff --git a/res/graphics/signposts/route_map_06.png b/res/graphics/signposts/route_map_06.png new file mode 100644 index 0000000000..02b31be981 Binary files /dev/null and b/res/graphics/signposts/route_map_06.png differ diff --git a/res/graphics/signposts/route_map_07.png b/res/graphics/signposts/route_map_07.png new file mode 100644 index 0000000000..8c70ecec2d Binary files /dev/null and b/res/graphics/signposts/route_map_07.png differ diff --git a/res/graphics/signposts/route_map_08.png b/res/graphics/signposts/route_map_08.png new file mode 100644 index 0000000000..7a47e0d892 Binary files /dev/null and b/res/graphics/signposts/route_map_08.png differ diff --git a/res/graphics/signposts/route_map_09.png b/res/graphics/signposts/route_map_09.png new file mode 100644 index 0000000000..923203eb19 Binary files /dev/null and b/res/graphics/signposts/route_map_09.png differ diff --git a/res/graphics/signposts/route_map_10.png b/res/graphics/signposts/route_map_10.png new file mode 100644 index 0000000000..02c72ccf6b Binary files /dev/null and b/res/graphics/signposts/route_map_10.png differ diff --git a/res/graphics/signposts/route_map_11.png b/res/graphics/signposts/route_map_11.png new file mode 100644 index 0000000000..d6aae84f90 Binary files /dev/null and b/res/graphics/signposts/route_map_11.png differ diff --git a/res/graphics/signposts/route_map_12.png b/res/graphics/signposts/route_map_12.png new file mode 100644 index 0000000000..7b0f0129d4 Binary files /dev/null and b/res/graphics/signposts/route_map_12.png differ diff --git a/res/graphics/signposts/route_map_13.png b/res/graphics/signposts/route_map_13.png new file mode 100644 index 0000000000..2bcbc1a730 Binary files /dev/null and b/res/graphics/signposts/route_map_13.png differ diff --git a/res/graphics/signposts/route_map_14.png b/res/graphics/signposts/route_map_14.png new file mode 100644 index 0000000000..3396bc03aa Binary files /dev/null and b/res/graphics/signposts/route_map_14.png differ diff --git a/res/graphics/signposts/route_map_15.png b/res/graphics/signposts/route_map_15.png new file mode 100644 index 0000000000..aa4f3c9466 Binary files /dev/null and b/res/graphics/signposts/route_map_15.png differ diff --git a/res/graphics/signposts/route_map_16.png b/res/graphics/signposts/route_map_16.png new file mode 100644 index 0000000000..7bfd0734d6 Binary files /dev/null and b/res/graphics/signposts/route_map_16.png differ diff --git a/res/graphics/signposts/route_map_17.png b/res/graphics/signposts/route_map_17.png new file mode 100644 index 0000000000..91955d16b4 Binary files /dev/null and b/res/graphics/signposts/route_map_17.png differ diff --git a/res/graphics/signposts/route_map_18.png b/res/graphics/signposts/route_map_18.png new file mode 100644 index 0000000000..6ba5fe1195 Binary files /dev/null and b/res/graphics/signposts/route_map_18.png differ diff --git a/res/graphics/signposts/route_map_19.png b/res/graphics/signposts/route_map_19.png new file mode 100644 index 0000000000..941ed0bac4 Binary files /dev/null and b/res/graphics/signposts/route_map_19.png differ diff --git a/res/graphics/signposts/route_map_20.png b/res/graphics/signposts/route_map_20.png new file mode 100644 index 0000000000..34c3844a06 Binary files /dev/null and b/res/graphics/signposts/route_map_20.png differ diff --git a/res/graphics/signposts/route_map_21.png b/res/graphics/signposts/route_map_21.png new file mode 100644 index 0000000000..d1a75348af Binary files /dev/null and b/res/graphics/signposts/route_map_21.png differ diff --git a/res/graphics/signposts/route_map_22.png b/res/graphics/signposts/route_map_22.png new file mode 100644 index 0000000000..5ed45703d5 Binary files /dev/null and b/res/graphics/signposts/route_map_22.png differ diff --git a/res/graphics/signposts/route_map_23.png b/res/graphics/signposts/route_map_23.png new file mode 100644 index 0000000000..39a4e63989 Binary files /dev/null and b/res/graphics/signposts/route_map_23.png differ diff --git a/res/graphics/signposts/route_map_24.png b/res/graphics/signposts/route_map_24.png new file mode 100644 index 0000000000..b8459dc846 Binary files /dev/null and b/res/graphics/signposts/route_map_24.png differ diff --git a/res/graphics/signposts/route_map_25.png b/res/graphics/signposts/route_map_25.png new file mode 100644 index 0000000000..8241af4ed8 Binary files /dev/null and b/res/graphics/signposts/route_map_25.png differ diff --git a/res/graphics/signposts/route_map_26.png b/res/graphics/signposts/route_map_26.png new file mode 100644 index 0000000000..95fffec944 Binary files /dev/null and b/res/graphics/signposts/route_map_26.png differ diff --git a/res/graphics/signposts/route_map_27.png b/res/graphics/signposts/route_map_27.png new file mode 100644 index 0000000000..ccbccc5304 Binary files /dev/null and b/res/graphics/signposts/route_map_27.png differ diff --git a/res/graphics/signposts/route_map_28.png b/res/graphics/signposts/route_map_28.png new file mode 100644 index 0000000000..6617d4ce57 Binary files /dev/null and b/res/graphics/signposts/route_map_28.png differ diff --git a/res/graphics/signposts/route_map_29.png b/res/graphics/signposts/route_map_29.png new file mode 100644 index 0000000000..c75f740626 Binary files /dev/null and b/res/graphics/signposts/route_map_29.png differ diff --git a/res/graphics/signposts/route_map_30.png b/res/graphics/signposts/route_map_30.png new file mode 100644 index 0000000000..bd16848c89 Binary files /dev/null and b/res/graphics/signposts/route_map_30.png differ diff --git a/res/graphics/signposts/signpost.pal b/res/graphics/signposts/signpost.pal new file mode 100644 index 0000000000..26f965c0e0 --- /dev/null +++ b/res/graphics/signposts/signpost.pal @@ -0,0 +1,259 @@ +JASC-PAL +0100 +256 +156 213 139 +255 255 255 +222 205 164 +180 189 197 +139 148 156 +255 0 0 +8 0 255 +255 172 16 +156 115 82 +222 205 164 +0 0 0 +98 74 41 +123 98 49 +139 115 49 +156 123 57 +180 148 65 +156 213 139 +255 255 255 +164 222 180 +180 189 197 +139 148 156 +255 0 0 +8 0 255 +255 172 16 +156 115 82 +164 222 180 +0 0 0 +41 106 65 +49 131 74 +57 139 82 +65 156 82 +74 180 98 +156 213 139 +255 255 255 +205 205 205 +180 189 197 +139 148 156 +255 0 0 +8 0 255 +255 172 16 +156 115 82 +205 205 205 +0 0 0 +82 90 90 +98 115 115 +115 123 123 +131 139 139 +148 156 156 +156 213 139 +255 255 255 +180 197 222 +180 189 197 +139 148 156 +255 0 0 +8 0 255 +255 172 16 +156 115 82 +180 197 222 +0 0 0 +57 65 115 +74 82 139 +82 98 148 +90 106 164 +106 131 189 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/res/graphics/signposts/signpost_frame.png b/res/graphics/signposts/signpost_frame.png new file mode 100644 index 0000000000..d351056f2f Binary files /dev/null and b/res/graphics/signposts/signpost_frame.png differ diff --git a/res/graphics/windows/meson.build b/res/graphics/windows/meson.build new file mode 100644 index 0000000000..15ca2ae7ca --- /dev/null +++ b/res/graphics/windows/meson.build @@ -0,0 +1,92 @@ +pl_winframe_pal_pngs= files( + 'standard_system.png', + 'message_box_00.png', + 'message_box_01.png', + 'message_box_02.png', + 'message_box_03.png', + 'message_box_04.png', + 'message_box_05.png', + 'message_box_06.png', + 'message_box_07.png', + 'message_box_08.png', + 'message_box_09.png', + 'message_box_10.png', + 'message_box_12.png', + 'message_box_13.png', + 'message_box_14.png', + 'message_box_15.png', + 'message_box_16.png', + 'message_box_17.png', + 'message_box_18.png', + 'message_box_19.png', +) + +# Extra files added here either do not have a distinct palette of their +# own or have a special PAL file. +pl_winframe_sopc_v101_pngs = pl_winframe_pal_pngs +pl_winframe_sopc_v101_pngs += files( + 'standard_field.png', # no distinct palette + 'scroll_cursor.png', # no distinct palette + 'wait_dial.png', # no distinct palette + 'message_box_11.png', # has a special PAL file +) + +pl_winframe_v101_clobber_pngs = files('pokemon_preview.png') + +# Extra files added here have special handling requirements that disallow +# them from being lumped in with the other PNG -> NCLR conversions. +pl_winframe_pals = pl_winframe_pal_pngs +pl_winframe_pals += files( + 'standard_underground.pal', # is a distinct palette + 'pokemon_preview.png', # has no SOPC section + 'message_box_11.pal', # has multiple palettes, unlike the other message boxes +) + +pl_winframe_ncgrs_sopc_v101 = ncgr_gen.process(pl_winframe_sopc_v101_pngs, + extra_args: [ + '-sopc', + '-version101', + ], +) +pl_winframe_ncgrs_v101_clobber = ncgr_gen.process(pl_winframe_v101_clobber_pngs, + extra_args: [ + '-version101', + '-clobbersize', + ] +) +pl_winframe_nclrs = nclr_gen.process(pl_winframe_pals, + extra_args: [ + '-bitdepth', '4', + ] +) +pl_winframe_ncers = copy_gen.process(files('pokemon_preview_cell.NCER')) +# TODO: pending nitrogfx PR +# pl_winframe_ncers = ncer_gen.process(files('pokemon_preview_cell.json')) +pl_winframe_nanrs = nanr_gen.process(files('pokemon_preview_anim.json')) + +pl_winframe_order = files('pl_winframe.order') + +pl_winframe_narc = custom_target('pl_winframe.narc', + output: [ + 'pl_winframe.narc', + 'pl_winframe.naix', + ], + input: [ + pl_winframe_ncgrs_sopc_v101, + pl_winframe_ncgrs_v101_clobber, + pl_winframe_nclrs, + pl_winframe_ncers, + pl_winframe_nanrs, + pl_winframe_order, + ], + command: [ + knarc_exe, + '-d', '@PRIVATE_DIR@', + '-p', '@OUTPUT0@', + '--order', pl_winframe_order, + '--naix', + ] +) + +nitrofs_files += pl_winframe_narc[0] +naix_headers += pl_winframe_narc[1] diff --git a/res/graphics/windows/message_box_00.png b/res/graphics/windows/message_box_00.png new file mode 100644 index 0000000000..f7ede137b2 Binary files /dev/null and b/res/graphics/windows/message_box_00.png differ diff --git a/res/graphics/windows/message_box_01.png b/res/graphics/windows/message_box_01.png new file mode 100644 index 0000000000..992228e3e7 Binary files /dev/null and b/res/graphics/windows/message_box_01.png differ diff --git a/res/graphics/windows/message_box_02.png b/res/graphics/windows/message_box_02.png new file mode 100644 index 0000000000..160a2b9a51 Binary files /dev/null and b/res/graphics/windows/message_box_02.png differ diff --git a/res/graphics/windows/message_box_03.png b/res/graphics/windows/message_box_03.png new file mode 100644 index 0000000000..350c1e6fbd Binary files /dev/null and b/res/graphics/windows/message_box_03.png differ diff --git a/res/graphics/windows/message_box_04.png b/res/graphics/windows/message_box_04.png new file mode 100644 index 0000000000..48b9963a79 Binary files /dev/null and b/res/graphics/windows/message_box_04.png differ diff --git a/res/graphics/windows/message_box_05.png b/res/graphics/windows/message_box_05.png new file mode 100644 index 0000000000..ba3a0b1e81 Binary files /dev/null and b/res/graphics/windows/message_box_05.png differ diff --git a/res/graphics/windows/message_box_06.png b/res/graphics/windows/message_box_06.png new file mode 100644 index 0000000000..4bfbc8d9cb Binary files /dev/null and b/res/graphics/windows/message_box_06.png differ diff --git a/res/graphics/windows/message_box_07.png b/res/graphics/windows/message_box_07.png new file mode 100644 index 0000000000..aa809340de Binary files /dev/null and b/res/graphics/windows/message_box_07.png differ diff --git a/res/graphics/windows/message_box_08.png b/res/graphics/windows/message_box_08.png new file mode 100644 index 0000000000..22573c60d0 Binary files /dev/null and b/res/graphics/windows/message_box_08.png differ diff --git a/res/graphics/windows/message_box_09.png b/res/graphics/windows/message_box_09.png new file mode 100644 index 0000000000..537cb2fe42 Binary files /dev/null and b/res/graphics/windows/message_box_09.png differ diff --git a/res/graphics/windows/message_box_10.png b/res/graphics/windows/message_box_10.png new file mode 100644 index 0000000000..9e33ca318e Binary files /dev/null and b/res/graphics/windows/message_box_10.png differ diff --git a/res/graphics/windows/message_box_11.pal b/res/graphics/windows/message_box_11.pal new file mode 100644 index 0000000000..48fd09fd19 --- /dev/null +++ b/res/graphics/windows/message_box_11.pal @@ -0,0 +1,259 @@ +JASC-PAL +0100 +256 +156 213 139 +255 255 255 +32 32 32 +180 189 197 +139 148 156 +255 0 255 +255 0 255 +255 0 255 +255 0 255 +255 0 255 +0 0 0 +65 65 65 +82 82 82 +115 115 123 +255 0 255 +255 255 255 +156 213 139 +255 255 255 +82 90 90 +180 189 197 +139 148 156 +255 0 255 +255 0 255 +255 0 255 +255 0 255 +255 0 255 +0 0 0 +49 49 49 +16 16 16 +139 139 139 +139 139 139 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/res/graphics/windows/message_box_11.png b/res/graphics/windows/message_box_11.png new file mode 100644 index 0000000000..e641eba2c5 Binary files /dev/null and b/res/graphics/windows/message_box_11.png differ diff --git a/res/graphics/windows/message_box_12.png b/res/graphics/windows/message_box_12.png new file mode 100644 index 0000000000..87af1b8621 Binary files /dev/null and b/res/graphics/windows/message_box_12.png differ diff --git a/res/graphics/windows/message_box_13.png b/res/graphics/windows/message_box_13.png new file mode 100644 index 0000000000..b9b287b2ca Binary files /dev/null and b/res/graphics/windows/message_box_13.png differ diff --git a/res/graphics/windows/message_box_14.png b/res/graphics/windows/message_box_14.png new file mode 100644 index 0000000000..3e1b007bad Binary files /dev/null and b/res/graphics/windows/message_box_14.png differ diff --git a/res/graphics/windows/message_box_15.png b/res/graphics/windows/message_box_15.png new file mode 100644 index 0000000000..a20f11efa5 Binary files /dev/null and b/res/graphics/windows/message_box_15.png differ diff --git a/res/graphics/windows/message_box_16.png b/res/graphics/windows/message_box_16.png new file mode 100644 index 0000000000..30c8ec2179 Binary files /dev/null and b/res/graphics/windows/message_box_16.png differ diff --git a/res/graphics/windows/message_box_17.png b/res/graphics/windows/message_box_17.png new file mode 100644 index 0000000000..a8847977da Binary files /dev/null and b/res/graphics/windows/message_box_17.png differ diff --git a/res/graphics/windows/message_box_18.png b/res/graphics/windows/message_box_18.png new file mode 100644 index 0000000000..57bfce3d42 Binary files /dev/null and b/res/graphics/windows/message_box_18.png differ diff --git a/res/graphics/windows/message_box_19.png b/res/graphics/windows/message_box_19.png new file mode 100644 index 0000000000..3cf275a618 Binary files /dev/null and b/res/graphics/windows/message_box_19.png differ diff --git a/res/graphics/windows/pl_winframe.order b/res/graphics/windows/pl_winframe.order new file mode 100644 index 0000000000..4ca575c4eb --- /dev/null +++ b/res/graphics/windows/pl_winframe.order @@ -0,0 +1,50 @@ +standard_system.NCGR +standard_field.NCGR +message_box_00.NCGR +message_box_01.NCGR +message_box_02.NCGR +message_box_03.NCGR +message_box_04.NCGR +message_box_05.NCGR +message_box_06.NCGR +message_box_07.NCGR +message_box_08.NCGR +message_box_09.NCGR +message_box_10.NCGR +message_box_11.NCGR +message_box_12.NCGR +message_box_13.NCGR +message_box_14.NCGR +message_box_15.NCGR +message_box_16.NCGR +message_box_17.NCGR +message_box_18.NCGR +message_box_19.NCGR +scroll_cursor.NCGR +wait_dial.NCGR +standard_system.NCLR +message_box_00.NCLR +message_box_01.NCLR +message_box_02.NCLR +message_box_03.NCLR +message_box_04.NCLR +message_box_05.NCLR +message_box_06.NCLR +message_box_07.NCLR +message_box_08.NCLR +message_box_09.NCLR +message_box_10.NCLR +message_box_11.NCLR +message_box_12.NCLR +message_box_13.NCLR +message_box_14.NCLR +message_box_15.NCLR +message_box_16.NCLR +message_box_17.NCLR +message_box_18.NCLR +message_box_19.NCLR +standard_underground.NCLR +pokemon_preview_anim.NANR +pokemon_preview_cell.NCER +pokemon_preview.NCGR +pokemon_preview.NCLR diff --git a/res/graphics/windows/pokemon_preview.png b/res/graphics/windows/pokemon_preview.png new file mode 100644 index 0000000000..d178ce222c Binary files /dev/null and b/res/graphics/windows/pokemon_preview.png differ diff --git a/res/graphics/windows/pokemon_preview_anim.json b/res/graphics/windows/pokemon_preview_anim.json new file mode 100644 index 0000000000..7c376a506b --- /dev/null +++ b/res/graphics/windows/pokemon_preview_anim.json @@ -0,0 +1,54 @@ +{ + "labelEnabled": true, + "sequenceCount": 2, + "frameCount": 8, + "sequences": [{ + "frameCount": 1, + "loopStartFrame": 0, + "animationElement": 0, + "animationType": 1, + "playbackMode": 1, + "frameData": [{ + "frameDelay": 1, + "resultId": 0 + }] + }, { + "frameCount": 7, + "loopStartFrame": 0, + "animationElement": 0, + "animationType": 1, + "playbackMode": 1, + "frameData": [{ + "frameDelay": 1, + "resultId": 0 + }, { + "frameDelay": 8, + "resultId": 1 + }, { + "frameDelay": 32, + "resultId": 0 + }, { + "frameDelay": 4, + "resultId": 1 + }, { + "frameDelay": 4, + "resultId": 0 + }, { + "frameDelay": 4, + "resultId": 1 + }, { + "frameDelay": 1, + "resultId": 0 + }] + }], + "animationResults": [{ + "resultType": 0, + "index": 0 + }, { + "resultType": 0, + "index": 1 + }], + "resultCount": 2, + "labels": ["CellAnime0", "CellAnime1"], + "labelCount": 2 +} \ No newline at end of file diff --git a/res/graphics/windows/pokemon_preview_cell.NCER b/res/graphics/windows/pokemon_preview_cell.NCER new file mode 100644 index 0000000000..f19a763d23 Binary files /dev/null and b/res/graphics/windows/pokemon_preview_cell.NCER differ diff --git a/res/graphics/windows/scroll_cursor.png b/res/graphics/windows/scroll_cursor.png new file mode 100644 index 0000000000..105e21a4de Binary files /dev/null and b/res/graphics/windows/scroll_cursor.png differ diff --git a/res/graphics/windows/standard_field.png b/res/graphics/windows/standard_field.png new file mode 100644 index 0000000000..e62cd900f5 Binary files /dev/null and b/res/graphics/windows/standard_field.png differ diff --git a/res/graphics/windows/standard_system.png b/res/graphics/windows/standard_system.png new file mode 100644 index 0000000000..5d663ef354 Binary files /dev/null and b/res/graphics/windows/standard_system.png differ diff --git a/res/graphics/windows/standard_underground.pal b/res/graphics/windows/standard_underground.pal new file mode 100644 index 0000000000..f3a7c1c51f --- /dev/null +++ b/res/graphics/windows/standard_underground.pal @@ -0,0 +1,259 @@ +JASC-PAL +0100 +256 +0 197 0 +255 255 255 +172 189 197 +90 115 139 +49 74 98 +0 0 0 +213 172 74 +131 123 82 +49 74 98 +222 246 238 +131 106 74 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/res/graphics/windows/wait_dial.png b/res/graphics/windows/wait_dial.png new file mode 100644 index 0000000000..d2cfbb25f7 Binary files /dev/null and b/res/graphics/windows/wait_dial.png differ diff --git a/res/meson.build b/res/meson.build index 1a5279d430..b6c8cd9989 100644 --- a/res/meson.build +++ b/res/meson.build @@ -10,6 +10,11 @@ subdir('text') # must be listed first for GMM header targets # Common generator for "scripting" files, i.e. field and battle scripts relative_source_root = fs.relative_to(meson.project_source_root(), meson.project_build_root()) +copy_gen = generator(find_program('cp'), + arguments: [ '@INPUT@', '@OUTPUT@', ], + output: '@PLAINNAME@' +) + s_to_bin_gen = generator(make_script_bin_sh, arguments: [ '-i', relative_source_root / 'include', @@ -45,6 +50,16 @@ nclr_gen = generator(nitrogfx_exe, output: '@BASENAME@.NCLR', ) +ncer_gen = generator(nitrogfx_exe, + arguments: [ '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@', ], + output: '@BASENAME@.NCER' +) + +nanr_gen = generator(nitrogfx_exe, + arguments: [ '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@', ], + output: '@BASENAME@.NANR' +) + lz_gen = generator(nitrogfx_exe, arguments: [ '@INPUT@', '@OUTPUT@', '@EXTRA_ARGS@', ], output: '@PLAINNAME@.lz', @@ -53,6 +68,7 @@ lz_gen = generator(nitrogfx_exe, subdir('battle') subdir('field') subdir('fonts') +subdir('graphics') subdir('items') subdir('pokemon') subdir('sound') diff --git a/res/prebuilt/graphic/field_board.narc b/res/prebuilt/graphic/field_board.narc deleted file mode 100644 index b63405830b..0000000000 Binary files a/res/prebuilt/graphic/field_board.narc and /dev/null differ diff --git a/res/prebuilt/graphic/meson.build b/res/prebuilt/graphic/meson.build index 4f75d8593d..e2cfb54820 100644 --- a/res/prebuilt/graphic/meson.build +++ b/res/prebuilt/graphic/meson.build @@ -10,7 +10,6 @@ prebuilt_files = [ 'ending.narc', 'ev_pokeselect.narc', 'f_note_gra.narc', - 'field_board.narc', 'field_encounteffect.narc', 'fld_comact.narc', 'font.narc', @@ -32,7 +31,6 @@ prebuilt_files = [ 'pl_plist_gra.narc', 'pl_pst_gra.narc', 'pl_wifinote.narc', - 'pl_winframe.narc', 'plist_gra.narc', 'pmsi.narc', 'poketch.narc', diff --git a/res/prebuilt/graphic/pl_winframe.narc b/res/prebuilt/graphic/pl_winframe.narc deleted file mode 100644 index 7a3038fd42..0000000000 Binary files a/res/prebuilt/graphic/pl_winframe.narc and /dev/null differ diff --git a/src/battle/battle_display.c b/src/battle/battle_display.c index 4957a5812e..51f1d68c1c 100644 --- a/src/battle/battle_display.c +++ b/src/battle/battle_display.c @@ -132,6 +132,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" @@ -141,7 +142,6 @@ #include "unk_0200762C.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_020131EC.h" #include "unk_0201567C.h" #include "unk_02015F84.h" @@ -1356,7 +1356,7 @@ void ov16_0225E23C(BattleSystem *param0, BattlerData *param1) v1.tags = 0; BattleMessage_Print(param0, v0, &v1, NULL); - Battle_SetWaitDial(param0, sub_0200E7FC(BattleSystem_Window(param0, 0), 1)); + Battle_SetWaitDial(param0, Window_AddWaitDial(BattleSystem_Window(param0, 0), 1)); } ClearCommand(param0, param1->battler, 55); @@ -5017,7 +5017,7 @@ static void WaitForBattleMessagePrint(SysTask *task, void *data) BattleMessageWaitTask *waitTask = data; if (Battle_WaitDial(waitTask->battleSys)) { - DeleteWaitDial(Battle_WaitDial(waitTask->battleSys)); + DestroyWaitDial(Battle_WaitDial(waitTask->battleSys)); Battle_SetWaitDial(waitTask->battleSys, NULL); } diff --git a/src/battle/battle_script.c b/src/battle/battle_script.c index 4f1e613e57..27151a6732 100644 --- a/src/battle/battle_script.c +++ b/src/battle/battle_script.c @@ -62,6 +62,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_icon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -73,7 +74,6 @@ #include "unk_02006224.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_0201567C.h" @@ -10138,11 +10138,11 @@ static void BattleScript_GetExpTask(SysTask *task, void *inData) BattleSystem_SetGaugePriority(data->battleSys, 0 + 2); // gauge's default is 0 - Window_SetFrame(bgl, 2, 1, 0, HEAP_ID_BATTLE); - PaletteData_LoadBufferFromFileStart(paletteSys, NARC_INDEX_GRAPHIC__PL_WINFRAME, Window_FramePalette(), HEAP_ID_BATTLE, 0, 0x20, 8 * 0x10); + LoadStandardWindowTiles(bgl, 2, 1, 0, HEAP_ID_BATTLE); + PaletteData_LoadBufferFromFileStart(paletteSys, NARC_INDEX_GRAPHIC__PL_WINFRAME, GetStandardWindowPaletteNARCMember(), HEAP_ID_BATTLE, 0, 0x20, 8 * 0x10); Window_Add(bgl, window, 2, 0x11, 0x7, 14, 12, 11, (9 + 1)); Window_FillTilemap(window, 0xFF); - Window_Show(window, 0, 1, 8); + Window_DrawStandardFrame(window, 0, 1, 8); data->seqNum = SEQ_GET_EXP_LEVEL_UP_SUMMARY_PRINT_DIFF; break; @@ -10218,7 +10218,7 @@ static void BattleScript_GetExpTask(SysTask *task, void *inData) case SEQ_GET_EXP_LEVEL_UP_CLEAR: { Window *window = BattleSystem_Window(data->battleSys, 1); - Window_Clear(window, 0); + Window_EraseStandardFrame(window, 0); Window_Remove(window); G2_SetBG0Priority(1); diff --git a/src/battle/ov16_0223B140.c b/src/battle/ov16_0223B140.c index 0f4b1c5ea8..294999d696 100644 --- a/src/battle/ov16_0223B140.c +++ b/src/battle/ov16_0223B140.c @@ -57,6 +57,7 @@ #include "party.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -69,7 +70,6 @@ #include "unk_020093B4.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014000.h" #include "unk_0201567C.h" @@ -445,10 +445,10 @@ void ov16_0223B578(BattleSystem *param0) v1 = ov16_0223EDE0(param0); - sub_0200E218(param0->unk_04, 1, 1, 10, v1, 5); + ReplaceTransparentTiles(param0->unk_04, 1, 1, 10, v1, 5); Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5); PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); - PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v1), 5, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, GetMessageBoxPaletteNARCMember(v1), 5, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); Graphics_LoadTilemapToBgLayer(7, 2, param0->unk_04, 3, 0, 0, 1, 5); } @@ -470,7 +470,7 @@ void ov16_0223B578(BattleSystem *param0) Window_Add(param0->unk_04, param0->windows, 1, 0x2, 0x13, 27, 4, 0xb, (18 + 12) + 1); Window_FillTilemap(param0->windows, 0xff); - sub_0200E060(¶m0->windows[0], 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->windows[0], 0, 1, 10); ov16_0223DD4C(param0); } @@ -571,7 +571,7 @@ static void ov16_0223B790(OverlayManager *param0) Window_Add(v0->unk_04, &v0->windows[0], 1, 2, 0x13, 27, 4, 11, ((18 + 12) + 1)); Window_FillTilemap(&v0->windows[0], 0xff); - sub_0200E060(&v0->windows[0], 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(&v0->windows[0], 0, 1, 10); v0->unk_90 = sub_0200C6E4(5); @@ -930,10 +930,10 @@ static void ov16_0223C004(BattleSystem *param0, BgConfig *param1) v3 = ov16_0223EDE0(param0); - sub_0200E218(param1, 1, 1, 10, v3, 5); + ReplaceTransparentTiles(param1, 1, 1, 10, v3, 5); Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5); PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0); - PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v3), 5, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, GetMessageBoxPaletteNARCMember(v3), 5, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10); Graphics_LoadTilemapToBgLayer(7, 2, param1, 3, 0, 0, 1, 5); } @@ -1722,9 +1722,9 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) v4 = Options_Frame(param1->unk_108); - sub_0200E218(v0->unk_04, 1, 1, 10, v4, 5); + ReplaceTransparentTiles(v0->unk_04, 1, 1, 10, v4, 5); PaletteData_LoadBufferFromFileStart(v0->unk_0C, 14, 7, 5, 0, 0x20, 0xb * 0x10); - PaletteData_LoadBufferFromFileStart(v0->unk_0C, 38, sub_0200DD08(v4), 5, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(v0->unk_0C, 38, GetMessageBoxPaletteNARCMember(v4), 5, 0, 0x20, 10 * 0x10); PaletteData_FillBufferRange(v0->unk_0C, 0, 0, 0x0, 0, 256); } @@ -1732,7 +1732,7 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); Window_Add(v0->unk_04, v0->unk_08, 1, 2, 0x13, 27, 4, 11, ((18 + 12) + 1)); Window_FillTilemap(v0->unk_08, 0xff); - sub_0200E060(v0->unk_08, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(v0->unk_08, 0, 1, 10); { MessageLoader *v5; @@ -1751,7 +1751,7 @@ static void ov16_0223D10C(OverlayManager *param0, BattleParams *param1) SetMainCallback(ov16_0223CF1C, v0); PaletteData_StartFade(v0->unk_0C, (0x1 | 0x4), 0xffff, 0, 16, 0, 0x0); - v0->unk_1024 = sub_0200E7FC(v0->unk_08, 1); + v0->unk_1024 = Window_AddWaitDial(v0->unk_08, 1); ov16_0223DECC(); } @@ -1974,7 +1974,7 @@ static BOOL ov16_0223D354(OverlayManager *param0) case 33: if (PaletteData_GetSelectedBuffersMask(v0->unk_0C) == 0) { v1 = 1; - DeleteWaitDial(v0->unk_1024); + DestroyWaitDial(v0->unk_1024); sub_02036378(0); } break; diff --git a/src/battle/ov16_0226871C.c b/src/battle/ov16_0226871C.c index 11c8342d2d..4442b89ad3 100644 --- a/src/battle/ov16_0226871C.c +++ b/src/battle/ov16_0226871C.c @@ -46,6 +46,7 @@ #include "pokemon.h" #include "pokemon_icon.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -54,7 +55,6 @@ #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_02012744.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -4582,7 +4582,7 @@ void ov16_0226CEB0(UnkStruct_ov16_02268A14 *param0, int param1) GF_ASSERT(param0->unk_66B == 18); - sub_0200DAA4(v0, 5, 0x20, 1, 0, 5); + LoadStandardWindowGraphics(v0, 5, 0x20, 1, 0, 5); PaletteData_LoadBufferFromHardware(v1, 1, 1 * 16, 0x20); { diff --git a/src/choose_starter/choose_starter_app.c b/src/choose_starter/choose_starter_app.c index 917d264cff..7c454e251b 100644 --- a/src/choose_starter/choose_starter_app.c +++ b/src/choose_starter/choose_starter_app.c @@ -41,6 +41,7 @@ #include "overlay_manager.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "sys_task.h" @@ -52,7 +53,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015064.h" #include "unk_02017728.h" @@ -669,9 +669,9 @@ static void MakeMessageWindow(ChooseStarterApp *app, enum HeapId heapID) Window_Add(app->bgl, app->messageWindow, BG_LAYER_MAIN_1, TEXT_POS_X, TEXT_POS_Y, TEXT_COLUMNS, TEXT_ROWS, FRAME_PALETTE_INDEX, TEXT_WINDOW_SIZE + 1); Window_FillTilemap(app->messageWindow, 15); - sub_0200DD0C(app->bgl, BG_LAYER_MAIN_1, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX, app->messageFrame, heapID); + LoadMessageBoxGraphics(app->bgl, BG_LAYER_MAIN_1, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX, app->messageFrame, heapID); Graphics_LoadPalette(NARC_INDEX_GRAPHIC__EV_POKESELECT, 16, 0, FRAME_PALETTE_INDEX * 32, 32, heapID); - sub_0200E060(app->messageWindow, 0, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX); + Window_DrawMessageBoxWithScrollCursor(app->messageWindow, 0, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX); } static void ov78_021D13A0(ChooseStarterApp *param0) @@ -1296,7 +1296,7 @@ static u8 ov78_021D1FB4(Window *param0, int param1, int param2, int param3, Text Window_FillTilemap(param0, 15); v2 = Text_AddPrinterWithParamsAndColor(param0, FONT_MESSAGE, v1, 0, 0, param5, param4, NULL); - sub_0200E060(param0, 0, 512, 0); + Window_DrawMessageBoxWithScrollCursor(param0, 0, 512, 0); Strbuf_Free(v1); MessageLoader_Free(v0); @@ -1318,7 +1318,7 @@ static u8 ov78_021D201C(Window *param0, int param1, int param2, int param3, u32 Window_FillTilemap(param0, 15); v1 = Text_AddPrinterWithParamsAndColor(param0, FONT_MESSAGE, *param6, 0, 0, param5, param4, NULL); - sub_0200E060(param0, 0, 512, 0); + Window_DrawMessageBoxWithScrollCursor(param0, 0, 512, 0); MessageLoader_Free(v0); return v1; @@ -1340,7 +1340,7 @@ static void MakeConfirmationWindow(ChooseStarterApp *param0, int param1) param0->unk_B0.palette = 3; param0->unk_B0.baseTile = ((18 + 12) + 9 + 128); - sub_0200DAA4(param0->bgl, 1, (512 + (18 + 12) + 128), 1, 0, param1); + LoadStandardWindowGraphics(param0->bgl, 1, (512 + (18 + 12) + 128), 1, 0, param1); Font_LoadTextPalette(0, 3 * 32, param1); } diff --git a/src/error_message_reset.c b/src/error_message_reset.c index 351ee606ae..4fa8084444 100644 --- a/src/error_message_reset.c +++ b/src/error_message_reset.c @@ -13,11 +13,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_020366A0.h" @@ -132,7 +132,7 @@ void ErrorMessageReset_PrintErrorAndReset(void) SetAllGraphicsModes(&sErrorMessageBgModeSet); Bg_InitFromTemplate(bgConfig, 0, &sErrorMessageBgTemplate, 0); Bg_ClearTilemap(bgConfig, 0); - sub_0200DAA4(bgConfig, 0, (512 - 9), 2, 0, v5); + LoadStandardWindowGraphics(bgConfig, 0, (512 - 9), 2, 0, v5); Font_LoadTextPalette(0, 1 * (2 * 16), v5); Bg_ClearTilesRange(0, 32, 0, v5); Bg_MaskPalette(0, 0x6c21); @@ -145,7 +145,7 @@ void ErrorMessageReset_PrintErrorAndReset(void) Window_AddFromTemplate(bgConfig, &window, &sErrorMessageWindowTemplate); Window_FillRectWithColor(&window, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&window, 0, (512 - 9), 2); + Window_DrawStandardFrame(&window, 0, (512 - 9), 2); MessageLoader_GetStrbuf(errorMsgData, v4, errorString); Text_AddPrinterWithParams(&window, FONT_SYSTEM, errorString, 0, 0, TEXT_SPEED_INSTANT, NULL); Strbuf_Free(errorString); diff --git a/src/field_map_change.c b/src/field_map_change.c index 596175f9fd..f0bfadd028 100644 --- a/src/field_map_change.c +++ b/src/field_map_change.c @@ -41,6 +41,7 @@ #include "message.h" #include "player_avatar.h" #include "pokeradar.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "savedata_misc.h" @@ -51,7 +52,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02027F50.h" #include "unk_0202854C.h" @@ -1151,7 +1151,7 @@ BOOL FieldTask_MapChangeToUnderground(TaskManager *taskMan) case 1: if (FieldMessage_FinishedPrinting(mapChangeUndergroundData->unk_38) == 1) { Strbuf_Free(mapChangeUndergroundData->unk_34); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 11); mapChangeUndergroundData->unk_3C = Menu_MakeYesNoChoice(fieldSystem->unk_08, &Unk_020EC3A0, 1024 - (18 + 12) - 9, 11, 11); mapChangeUndergroundData->state = 2; } @@ -1159,12 +1159,12 @@ BOOL FieldTask_MapChangeToUnderground(TaskManager *taskMan) case 2: switch (Menu_ProcessInputAndHandleExit(mapChangeUndergroundData->unk_3C, 11)) { case 0: - sub_0200E084(&mapChangeUndergroundData->unk_24, 0); + Window_EraseMessageBox(&mapChangeUndergroundData->unk_24, 0); Window_Remove(&mapChangeUndergroundData->unk_24); mapChangeUndergroundData->state = 3; break; case 0xfffffffe: - sub_0200E084(&mapChangeUndergroundData->unk_24, 0); + Window_EraseMessageBox(&mapChangeUndergroundData->unk_24, 0); Window_Remove(&mapChangeUndergroundData->unk_24); mapChangeUndergroundData->state = 5; } diff --git a/src/field_menu.c b/src/field_menu.c index 52c018cbed..9579395e3b 100644 --- a/src/field_menu.c +++ b/src/field_menu.c @@ -55,6 +55,7 @@ #include "pokemon.h" #include "pokemon_summary_app.h" #include "poketch_data.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "script_manager.h" @@ -66,7 +67,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014A84.h" #include "unk_0202631C.h" @@ -493,7 +493,7 @@ static BOOL sub_0203AC44(TaskManager *taskMan) case FIELD_MENU_STATE_END: sub_0203B2EC(menu, fieldSystem); FieldMenu_Close(menu); - Window_Clear(&menu->unk_00, 1); + Window_EraseStandardFrame(&menu->unk_00, 1); Window_Remove(&menu->unk_00); sub_0203B200(taskMan); Bg_ScheduleTilemapTransfer(fieldSystem->unk_08, 3); @@ -528,8 +528,8 @@ static void sub_0203ADFC(TaskManager *taskMan) v5 = FieldMenu_MakeList(menu, menu->unk_30); Window_Add(fieldSystem->unk_08, &menu->unk_00, 3, 20, 1, 11, v5 * 3, 12, ((((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (11 * 22))); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 1, 11); - Window_Show(&menu->unk_00, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 1, 11); + Window_DrawStandardFrame(&menu->unk_00, 1, 1024 - (18 + 12) - 9, 11); v2 = MessageLoader_Init(0, 26, 367, 11); @@ -669,8 +669,8 @@ static void sub_0203B094(TaskManager *taskMan) } Window_Add(fieldSystem->unk_08, &menu->unk_10, 3, 1, 1, 12, 4, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4))); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 1, 11); - Window_Show(&menu->unk_10, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 1, 11); + Window_DrawStandardFrame(&menu->unk_10, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(&menu->unk_10, 15); v2 = MessageLoader_Init(0, 26, 367, 11); @@ -720,7 +720,7 @@ static void sub_0203B200(TaskManager *taskMan) return; } - Window_Clear(&menu->unk_10, 1); + Window_EraseStandardFrame(&menu->unk_10, 1); Window_Remove(&menu->unk_10); } @@ -1427,7 +1427,7 @@ static BOOL FieldMenu_SelectSave(TaskManager *taskMan) FieldMenu *menu = TaskManager_Environment(taskMan); FieldMenu_Close(menu); - Window_Clear(&menu->unk_00, 1); + Window_EraseStandardFrame(&menu->unk_00, 1); Bg_ScheduleTilemapTransfer(menu->unk_00.bgConfig, menu->unk_00.bgLayer); Window_Remove(&menu->unk_00); sub_0203B200(taskMan); @@ -1591,7 +1591,7 @@ static BOOL FieldMenu_SelectRetire(TaskManager *taskMan) menu = TaskManager_Environment(taskMan); FieldMenu_Close(menu); - Window_Clear(&menu->unk_00, 1); + Window_EraseStandardFrame(&menu->unk_00, 1); Bg_ScheduleTilemapTransfer(menu->unk_00.bgConfig, menu->unk_00.bgLayer); Window_Remove(&menu->unk_00); sub_0203B200(taskMan); diff --git a/src/menu.c b/src/menu.c index 6f2571425e..d818bf958a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -14,10 +14,10 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "string_list.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" static BOOL TryMovingCursorAndPlaySound(Menu *menu, u8 direction, u16 sound); static u8 TryMovingCursor(Menu *menu, u8 direction); @@ -377,7 +377,7 @@ Menu *Menu_MakeYesNoChoiceWithCursorAt(BgConfig *bgConfig, const WindowTemplate menuTemplate.loopAround = FALSE; Window_AddFromTemplate(bgConfig, menuTemplate.window, winTemplate); - Window_Show(menuTemplate.window, 1, borderTileStart, borderPalette); + Window_DrawStandardFrame(menuTemplate.window, 1, borderTileStart, borderPalette); return Menu_NewAndCopyToVRAM(&menuTemplate, 8, 0, cursorStart, heapID, PAD_BUTTON_B); } @@ -409,7 +409,7 @@ u32 Menu_ProcessExternalInputAndHandleExit(Menu *menu, u8 input, u32 heapID) void Menu_DestroyForExit(Menu *menu, u32 heapID) { - Window_Clear(menu->template.window, 0); + Window_EraseStandardFrame(menu->template.window, 0); Window_Remove(menu->template.window); Heap_FreeToHeapExplicit(heapID, menu->template.window); StringList_Free(menu->template.choices); diff --git a/src/meson.build b/src/meson.build index 003e23cf0b..e0c5f10351 100644 --- a/src/meson.build +++ b/src/meson.build @@ -40,7 +40,7 @@ pokeplatinum_c = files( 'unk_0200C440.c', 'unk_0200C6E4.c', 'sys_task.c', - 'unk_0200DA60.c', + 'render_window.c', 'unk_0200F174.c', 'unk_0200F85C.c', 'unk_02012480.c', diff --git a/src/overlay005/ov5_021DC018.c b/src/overlay005/ov5_021DC018.c index 7e8994caa1..e562765900 100644 --- a/src/overlay005/ov5_021DC018.c +++ b/src/overlay005/ov5_021DC018.c @@ -14,6 +14,7 @@ #include "list_menu.h" #include "menu.h" #include "message.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -23,7 +24,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202D05C.h" @@ -189,8 +189,8 @@ void ov5_021DC1AC(UnkStruct_ov5_021DC1A4 *param0) } Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_98, param0->unk_99, v0, param0->unk_9B * 2, 13, ((1 + (10 * 4)) + (10 * 2))); - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021DC33C(param0); @@ -304,7 +304,7 @@ void ov5_021DC424(UnkStruct_ov5_021DC1A4 *param0) Sound_PlayEffect(1500); Menu_Free(param0->unk_B8, NULL); - Window_Clear(param0->unk_AC.window, 0); + Window_EraseStandardFrame(param0->unk_AC.window, 0); Window_Remove(param0->unk_AC.window); for (v0 = 0; v0 < 28; v0++) { @@ -378,8 +378,8 @@ static void ov5_021DC530(UnkStruct_ov5_021DC1A4 *param0, u32 param1) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_98, param0->unk_99, param1, param0->unk_9B * 2, 13, ((1 + (10 * 4)) + (10 * 2))); } - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021DC7E4(param0); param0->unk_1BC = ListMenu_New((const ListMenuTemplate *)¶m0->unk_19C, 0, param0->unk_96, 4); @@ -408,8 +408,8 @@ void ov5_021DC600(UnkStruct_ov5_021DC1A4 *param0, u16 *param1, u16 *param2) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_98, param0->unk_99, v0, param0->unk_9B * 2, 13, ((1 + (10 * 4)) + (10 * 2))); } - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021DC7E4(param0); @@ -580,7 +580,7 @@ static void ov5_021DCA28(UnkStruct_ov5_021DC1A4 *param0) Sound_PlayEffect(1500); ListMenu_Free(param0->unk_1BC, NULL, NULL); - Window_Clear(param0->unk_19C.window, 0); + Window_EraseStandardFrame(param0->unk_19C.window, 0); Window_Remove(¶m0->unk_08); for (v0 = 0; v0 < 28; v0++) { @@ -639,8 +639,8 @@ void ov5_021DCB24(FieldSystem *fieldSystem, u8 param1, u8 param2, u16 *param3, S } Window_Add(v3->fieldSystem->unk_08, &v3->unk_08, 3, v3->unk_98, v3->unk_99, v1, 4, 13, ((1 + (10 * 4)) + (10 * 2)) + (16 * 10)); - sub_0200DAA4(v3->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(&v3->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(v3->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(&v3->unk_08, 1, 1024 - (18 + 12) - 9, 11); Window_FillRectWithColor(&v3->unk_08, 15, 0, 0, (v1 * 8), (4 * 8)); ov5_021DCC00(v3, 15, 0, 0); @@ -675,7 +675,7 @@ static void ov5_021DCC64(SysTask *param0, void *param1) v1 = (UnkStruct_ov5_021DC1A4 *)param1; if (*v1->unk_A0 == 0xffff) { - Window_Clear(v1->unk_AC.window, 0); + Window_EraseStandardFrame(v1->unk_AC.window, 0); Window_Remove(v1->unk_AC.window); for (v0 = 0; v0 < 28; v0++) { @@ -779,8 +779,8 @@ void ov5_021DCD94(UnkStruct_ov5_021DC1A4 *param0, u8 param1) } Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_98, param0->unk_99, (v0 * param1), v1 * 2, 13, ((1 + (10 * 4)) + (10 * 2))); - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021DCE64(param0, param1, v1); @@ -808,8 +808,8 @@ Window *ov5_021DCEB0(FieldSystem *fieldSystem, u8 param1, u8 param2) Window *v0 = Window_New(4, 1); Window_Add(fieldSystem->unk_08, v0, 3, param1, param2, 10, 4, 13, 1); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(v0, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(v0, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(v0, 15); { @@ -831,7 +831,7 @@ Window *ov5_021DCEB0(FieldSystem *fieldSystem, u8 param1, u8 param2) void ov5_021DCF58(Window *param0) { - Window_Clear(param0, 0); + Window_EraseStandardFrame(param0, 0); Windows_Delete(param0, 1); } @@ -870,8 +870,8 @@ Window *ov5_021DD020(FieldSystem *fieldSystem, u8 param1, u8 param2) Window *v0 = Window_New(4, 1); Window_Add(fieldSystem->unk_08, v0, 3, param1, param2, 10, 2, 13, (1 + (10 * 4))); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(v0, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(v0, 1, 1024 - (18 + 12) - 9, 11); ov5_021DD098(fieldSystem, v0); @@ -880,7 +880,7 @@ Window *ov5_021DD020(FieldSystem *fieldSystem, u8 param1, u8 param2) void ov5_021DD084(Window *param0) { - Window_Clear(param0, 0); + Window_EraseStandardFrame(param0, 0); Windows_Delete(param0, 1); } @@ -919,8 +919,8 @@ Window *ov5_021DD140(FieldSystem *fieldSystem, u8 param1, u8 param2) Window *v0 = Window_New(4, 1); Window_Add(fieldSystem->unk_08, v0, 3, param1, param2, 10, 2, 13, (1 + (10 * 4))); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(v0, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(v0, 1, 1024 - (18 + 12) - 9, 11); ov5_021DD1A4(fieldSystem, v0); @@ -964,8 +964,8 @@ UnkStruct_ov5_021DC1A4 *ov5_021DD250(FieldSystem *fieldSystem, u8 param1, u8 par v0 = ov5_021DC150(fieldSystem, param1, param2, 0, 0, param3, param4, NULL, NULL); Window_Add(v0->fieldSystem->unk_08, &v0->unk_08, 3, v0->unk_98, v0->unk_99, 10, 16, 13, ((1 + (10 * 4)) + (10 * 2))); - sub_0200DAA4(v0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(&v0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(v0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(&v0->unk_08, 1, 1024 - (18 + 12) - 9, 11); Window_FillRectWithColor(&v0->unk_08, 15, 0, 0, (10 * 8), (16 * 8)); ov5_021DCC00(v0, 273, 0, 0); @@ -994,7 +994,7 @@ void ov5_021DD3A8(UnkStruct_ov5_021DC1A4 *param0) { int v0; - Window_Clear(param0->unk_AC.window, 0); + Window_EraseStandardFrame(param0->unk_AC.window, 0); Window_Remove(param0->unk_AC.window); for (v0 = 0; v0 < 28; v0++) { diff --git a/src/overlay005/ov5_021E1D20.c b/src/overlay005/ov5_021E1D20.c index 2ec78da2f5..925c723e19 100644 --- a/src/overlay005/ov5_021E1D20.c +++ b/src/overlay005/ov5_021E1D20.c @@ -19,13 +19,13 @@ #include "message_util.h" #include "play_time.h" #include "player_avatar.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "trainer_info.h" -#include "unk_0200DA60.h" #include "unk_0202631C.h" #include "unk_020366A0.h" @@ -168,16 +168,16 @@ void ov5_021E1F04(UnkStruct_ov5_021E1FF4 *param0) param0->unk_10 = Heap_AllocFromHeap(param0->unk_04, sizeof(Window)); Window_Add(param0->unk_0C, param0->unk_10, param0->unk_08, 1, 1, param0->unk_2C, param0->unk_30, 13, 393); - sub_0200DAA4(param0->unk_0C, param0->unk_08, 985, 11, 0, param0->unk_04); + LoadStandardWindowGraphics(param0->unk_0C, param0->unk_08, 985, 11, 0, param0->unk_04); Window_FillTilemap(param0->unk_10, Font_GetAttribute(FONT_SYSTEM, FONTATTR_BG_COLOR)); ov5_021E1E20(param0); - Window_Show(param0->unk_10, 0, 985, 11); + Window_DrawStandardFrame(param0->unk_10, 0, 985, 11); } void ov5_021E1F7C(UnkStruct_ov5_021E1FF4 *param0) { - Window_Clear(param0->unk_10, 0); + Window_EraseStandardFrame(param0->unk_10, 0); Window_Remove(param0->unk_10); Heap_FreeToHeap(param0->unk_10); } diff --git a/src/overlay005/ov5_021EA874.c b/src/overlay005/ov5_021EA874.c index 723c18d60f..4e6054e363 100644 --- a/src/overlay005/ov5_021EA874.c +++ b/src/overlay005/ov5_021EA874.c @@ -18,6 +18,7 @@ #include "list_menu.h" #include "menu.h" #include "message.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -26,7 +27,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202ACE0.h" #include "unk_0203061C.h" #include "unk_0203909C.h" @@ -69,8 +69,8 @@ static BOOL ov5_021EA874(UnkStruct_ov5_021EAE78 *param0) param0->unk_8C = 0; - sub_0200DD0C(param0->fieldSystem->unk_08, 3, (512 - (18 + 12)), 10, Options_Frame(SaveData_Options(param0->unk_34)), 4); - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + LoadMessageBoxGraphics(param0->fieldSystem->unk_08, 3, (512 - (18 + 12)), 10, Options_Frame(SaveData_Options(param0->unk_34)), 4); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); param0->unk_48 = 1; return 0; @@ -261,7 +261,7 @@ static BOOL ov5_021EAB58(UnkStruct_ov5_021EAE78 *param0) param0->unk_00 = StringList_New(v2 + 1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_20, 3, 19, 1, 12, v3 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (10 * (v3 + 2) * 2)); - Window_Show(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v4; @@ -328,7 +328,7 @@ static BOOL ov5_021EAC44(UnkStruct_ov5_021EAE78 *param0) break; } - Window_Clear(¶m0->unk_20, 0); + Window_EraseStandardFrame(¶m0->unk_20, 0); Window_Remove(¶m0->unk_20); ListMenu_Free(param0->unk_04, NULL, NULL); StringList_Free(param0->unk_00); diff --git a/src/overlay005/ov5_021F08CC.c b/src/overlay005/ov5_021F08CC.c index 1beaf22697..8940f68c28 100644 --- a/src/overlay005/ov5_021F08CC.c +++ b/src/overlay005/ov5_021F08CC.c @@ -25,13 +25,13 @@ #include "party.h" #include "player_avatar.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0201D15C.h" #include "unk_020508D4.h" #include "unk_02050A74.h" @@ -542,7 +542,7 @@ static void ov5_021F0DE8(UnkStruct_ov5_021F0D6C *param0, u32 param1) static int ov5_021F0E24(UnkStruct_ov5_021F0D6C *param0) { if ((FieldMessage_FinishedPrinting(param0->unk_28) == 1) && (ov5_021F0D54() == 1)) { - sub_0200E084(¶m0->window, 0); + Window_EraseMessageBox(¶m0->window, 0); Window_Remove(¶m0->window); return 1; } diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index 37f7146fbd..8f96548304 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -32,6 +32,7 @@ #include "party.h" #include "player_avatar.h" #include "pokemon.h" +#include "render_window.h" #include "savedata_misc.h" #include "script_manager.h" #include "strbuf.h" @@ -41,7 +42,6 @@ #include "sys_task_manager.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" #include "unk_02020AEC.h" @@ -278,8 +278,8 @@ static void ov5_021F6768(UnkStruct_ov5_021F6704 *param0) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_208, param0->unk_209, 11, param0->unk_20B * 2, 13, 1); } - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021F68BC(param0); param0->unk_23C = ListMenu_New((const ListMenuTemplate *)¶m0->unk_21C, *param0->unk_214, *param0->unk_218, 4); @@ -417,7 +417,7 @@ static void ov5_021F6AD4(UnkStruct_ov5_021F6704 *param0) Sound_PlayEffect(1500); ListMenu_Free(param0->unk_23C, NULL, NULL); - Window_Clear(param0->unk_21C.window, 0); + Window_EraseStandardFrame(param0->unk_21C.window, 0); Window_Remove(¶m0->unk_08); for (v0 = 0; v0 < 120; v0++) { diff --git a/src/overlay005/ov5_021F77A8.c b/src/overlay005/ov5_021F77A8.c index 451f1af9c2..a9bc947929 100644 --- a/src/overlay005/ov5_021F77A8.c +++ b/src/overlay005/ov5_021F77A8.c @@ -21,6 +21,7 @@ #include "message.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "script_manager.h" #include "strbuf.h" #include "string_list.h" @@ -29,7 +30,6 @@ #include "sys_task_manager.h" #include "tutor_movesets.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202631C.h" #include "unk_02054884.h" @@ -476,8 +476,8 @@ static void ov5_021F7F34(UnkStruct_ov5_021F7ED8 *param0) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, param0->unk_C4, param0->unk_C5, 11, param0->unk_C7 * 2, 13, 1); } - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); ov5_021F8090(param0); param0->unk_F0 = ListMenu_New((const ListMenuTemplate *)¶m0->unk_D0, 0, param0->unk_C2, 4); @@ -600,7 +600,7 @@ static void ov5_021F8250(UnkStruct_ov5_021F7ED8 *param0) Sound_PlayEffect(1500); ListMenu_Free(param0->unk_F0, NULL, NULL); - Window_Clear(param0->unk_D0.window, 0); + Window_EraseStandardFrame(param0->unk_D0.window, 0); Window_Remove(¶m0->unk_08); for (v0 = 0; v0 < ((NELEMS(sTeachableMoves)) + 1); v0++) { diff --git a/src/overlay006/ov6_02247A0C.c b/src/overlay006/ov6_02247A0C.c index 0a7b02b65b..76005dd066 100644 --- a/src/overlay006/ov6_02247A0C.c +++ b/src/overlay006/ov6_02247A0C.c @@ -13,12 +13,12 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" #include "unk_0202F108.h" #include "unk_020508D4.h" @@ -142,8 +142,8 @@ void *ov6_02247A90(void *param0) v0->unk_14 = StringTemplate_Default(11); Window_Add(v1, &v0->unk_00, 3, 1, 3, 30, 17, 12, (1 + 10)); - sub_0200DAA4(v1, 3, 1, 11, 0, 11); - Window_Show(&v0->unk_00, 1, 1, 11); + LoadStandardWindowGraphics(v1, 3, 1, 11, 0, 11); + Window_DrawStandardFrame(&v0->unk_00, 1, 1, 11); Window_FillTilemap(&v0->unk_00, 15); v3 = Strbuf_Init(100, 11); @@ -199,7 +199,7 @@ void ov6_02247CC8(void *param0) { UnkStruct_ov6_02247A90 *v0 = param0; - Window_Clear(&v0->unk_00, 1); + Window_EraseStandardFrame(&v0->unk_00, 1); Window_ClearAndCopyToVRAM(&v0->unk_00); Window_Remove(&v0->unk_00); MessageLoader_Free(v0->unk_10); diff --git a/src/overlay007/communication_club.c b/src/overlay007/communication_club.c index 8c60a7877c..72a7b39d67 100644 --- a/src/overlay007/communication_club.c +++ b/src/overlay007/communication_club.c @@ -20,6 +20,7 @@ #include "menu.h" #include "message.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -29,7 +30,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_02033200.h" #include "unk_020363E8.h" #include "unk_020366A0.h" @@ -197,7 +197,7 @@ static void CommClubMan_CreateList(ListMenuTemplate param0, u8 param1, u8 param2 Window_Add(sCommClubMan->fieldSystem->unk_08, &sCommClubMan->unk_20, 3, param1, param2, param3, param4, 13, param5); } - Window_Show(&sCommClubMan->unk_20, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(&sCommClubMan->unk_20, 1, 1024 - (18 + 12) - 9, 11); ListMenuTemplate v0 = param0; v0.choices = sCommClubMan->unk_64; @@ -361,7 +361,7 @@ static void CommClubMan_PrintChooseJoinMsg(CommClubManager *param0) Window_Add(sCommClubMan->fieldSystem->unk_08, &sCommClubMan->unk_30, 3, 23, 2, 8, 4, 13, (1 + 20 * 5 * 2)); } - Window_Show(&sCommClubMan->unk_30, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(&sCommClubMan->unk_30, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(&sCommClubMan->unk_30, 15); Window_CopyToVRAM(&sCommClubMan->unk_30); @@ -692,7 +692,7 @@ static void ov7_0224A53C(CommClubManager *man) Window_Add(sCommClubMan->fieldSystem->unk_08, &sCommClubMan->unk_30, 3, 22, 2, 9, 4, 13, (1 + 17 * 6 * 2)); } - Window_Show(&sCommClubMan->unk_30, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(&sCommClubMan->unk_30, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(&sCommClubMan->unk_30, 15); Window_CopyToVRAM(&sCommClubMan->unk_30); @@ -1369,14 +1369,14 @@ static void ov7_0224AF84(SysTask *task, void *param1) static void CommClubMan_DestroyList(SysTask *task, CommClubManager *param1) { Window_FillTilemap(&sCommClubMan->msgWindow, 15); - Window_Clear(¶m1->unk_20, 0); + Window_EraseStandardFrame(¶m1->unk_20, 0); StringList_Free(param1->unk_64); ListMenu_Free(param1->unk_5C, NULL, NULL); Window_ClearAndCopyToVRAM(¶m1->unk_20); Window_Remove(¶m1->unk_20); if (param1->unk_97) { - Window_Clear(&sCommClubMan->unk_30, 0); + Window_EraseStandardFrame(&sCommClubMan->unk_30, 0); Window_ClearAndCopyToVRAM(&sCommClubMan->unk_30); Window_Remove(&sCommClubMan->unk_30); param1->unk_97 = 0; diff --git a/src/overlay007/ov7_0224B4E8.c b/src/overlay007/ov7_0224B4E8.c index 43709e35fe..2a51966586 100644 --- a/src/overlay007/ov7_0224B4E8.c +++ b/src/overlay007/ov7_0224B4E8.c @@ -17,13 +17,13 @@ #include "list_menu.h" #include "message.h" #include "party.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202602C.h" #include "unk_02026150.h" #include "unk_020508D4.h" @@ -102,7 +102,7 @@ static void ov7_0224B4E8(UnkStruct_ov7_0224B4E8 *param0, int param1) static void ov7_0224B558(UnkStruct_ov7_0224B4E8 *param0, BOOL param1) { if (param1) { - sub_0200E084(¶m0->unk_54, 0); + Window_EraseMessageBox(¶m0->unk_54, 0); Window_ClearAndCopyToVRAM(¶m0->unk_54); } @@ -132,7 +132,7 @@ static void ov7_0224B5A8(UnkStruct_ov7_0224B4E8 *param0) param0->unk_08 = StringList_New(v3 + 2, 4); Window_Add(param0->fieldSystem->unk_08, v1, 3, 1, 1, 16, (v3 + 2) * 2, 13, 1); - Window_Show(¶m0->unk_34, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_34, 1, 1024 - (18 + 12) - 9, 11); StringList_AddFromMessageBank(param0->unk_08, param0->unk_68, 123, 12); for (v4 = 0; v4 < v3; v4++) { @@ -161,7 +161,7 @@ static void ov7_0224B6AC(UnkStruct_ov7_0224B4E8 *param0) { if (param0->unk_00) { ListMenu_Free(param0->unk_00, NULL, NULL); - Window_Clear(¶m0->unk_34, 1); + Window_EraseStandardFrame(¶m0->unk_34, 1); Bg_ScheduleTilemapTransfer(param0->unk_34.bgConfig, param0->unk_34.bgLayer); Window_Remove(¶m0->unk_34); StringList_Free(param0->unk_08); @@ -225,7 +225,7 @@ static void ov7_0224B788(UnkStruct_ov7_0224B4E8 *param0) param0->unk_0C = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_44, 3, v5, v3, v4, v1 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - v4 * v1 * 2); - Window_Show(¶m0->unk_44, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_44, 1, 1024 - (18 + 12) - 9, 11); { int v7; @@ -277,7 +277,7 @@ static int ov7_0224B83C(UnkStruct_ov7_0224B4E8 *param0) if (param0->unk_04) { ListMenu_Free(param0->unk_04, NULL, NULL); - Window_Clear(¶m0->unk_44, 1); + Window_EraseStandardFrame(¶m0->unk_44, 1); Bg_ScheduleTilemapTransfer(param0->unk_44.bgConfig, param0->unk_44.bgLayer); Window_Remove(¶m0->unk_44); StringList_Free(param0->unk_0C); @@ -332,7 +332,7 @@ static void ov7_0224B8DC(UnkStruct_ov7_0224B4E8 *param0) v4 = ¶m0->unk_24; Window_Add(param0->fieldSystem->unk_08, v4, 3, 4, 2, 24, 19, 13, 1); - Window_Show(v4, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(v4, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(v4, 15); ov7_0224B57C(param0, param0->unk_78 - 1); @@ -416,7 +416,7 @@ static void ov7_0224B8DC(UnkStruct_ov7_0224B4E8 *param0) static void ov7_0224BBA0(UnkStruct_ov7_0224B4E8 *param0) { - Window_Clear(¶m0->unk_24, 1); + Window_EraseStandardFrame(¶m0->unk_24, 1); Bg_ScheduleTilemapTransfer(param0->unk_24.bgConfig, param0->unk_24.bgLayer); Window_Remove(¶m0->unk_24); } diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index 1a8bb2e411..1c7c34de5a 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -19,6 +19,7 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -29,7 +30,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200A328.h" -#include "unk_0200DA60.h" #include "unk_020298BC.h" #include "unk_0205D8CC.h" @@ -360,9 +360,9 @@ static void ov7_0224C338(UnkStruct_ov7_0224BEFC *param0) static void ov7_0224C35C(UnkStruct_ov7_0224BEFC *param0) { - sub_0200DD0C(param0->unk_14, 3, 1, 10, param0->unk_1B0, param0->unk_18); + LoadMessageBoxGraphics(param0->unk_14, 3, 1, 10, param0->unk_1B0, param0->unk_18); Font_LoadScreenIndicatorsPalette(0, 12 * 32, param0->unk_18); - sub_0200DAA4(param0->unk_14, 3, (1 + (18 + 12)), 11, 0, param0->unk_18); + LoadStandardWindowGraphics(param0->unk_14, 3, (1 + (18 + 12)), 11, 0, param0->unk_18); Font_LoadTextPalette(0, 13 * 32, param0->unk_18); Bg_ClearTilemap(param0->unk_14, 3); } @@ -394,7 +394,7 @@ static void ov7_0224C3EC(UnkStruct_ov7_0224C3EC *param0, BgConfig *param1, u32 p Window_Add(param1, param0->unk_04, 3, 2, 19, 27, 4, 12, ((1 + (18 + 12)) + 9)); Window_FillTilemap(param0->unk_04, 15); - sub_0200E060(param0->unk_04, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(param0->unk_04, 0, 1, 10); param0->unk_00 = 1; } @@ -548,7 +548,7 @@ static void ov7_0224C6DC(UnkStruct_ov7_0224C620 *param0, u32 param1, u32 param2, Text_AddPrinterWithParamsAndColor(param0->unk_04, FONT_SYSTEM, param0->unk_0C, 0, 16 * v0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); } - Window_Show(param0->unk_04, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param0->unk_04, 0, (1 + (18 + 12)), 11); } static void ov7_0224C768(UnkStruct_ov7_0224C768 *param0, BgConfig *param1, u32 param2, const UnkStruct_ov7_0224F1B4 *param3, u32 param4, MessageLoader *param5, void *param6, UnkFuncPtr_ov7_0224C768 param7, CellActorCollection *param8) @@ -622,7 +622,7 @@ static void ov7_0224C768(UnkStruct_ov7_0224C768 *param0, BgConfig *param1, u32 p param0->unk_08 = ListMenu_New(&v5, 0, 0, param2); - Window_Show(param0->unk_04, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param0->unk_04, 0, (1 + (18 + 12)), 11); for (v0 = 0; v0 < 4; v0++) { param0->unk_138[v0] = SpriteResourceCollection_New(1, v0, param2); @@ -702,7 +702,7 @@ static void ov7_0224CA0C(UnkStruct_ov7_0224C768 *param0) { param0->unk_134(param0->unk_130, param0->unk_12C); - Window_Show(param0->unk_04, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param0->unk_04, 0, (1 + (18 + 12)), 11); ov7_0224CB70(param0); } diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index 5c8c946af2..31c7d0e2ef 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -33,6 +33,7 @@ #include "message.h" #include "narc.h" #include "player_avatar.h" +#include "render_window.h" #include "save_player.h" #include "sprite_resource.h" #include "strbuf.h" @@ -44,7 +45,6 @@ #include "unk_0200A328.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202854C.h" #include "unk_0202C9F4.h" @@ -356,8 +356,8 @@ static void ov7_0224D040(UnkStruct_ov7_0224D008 *param0) v0.suppressCursor = FALSE; v0.loopAround = FALSE; - sub_0200DAA4(param0->unk_00, 3, 1024 - (18 + 12) - 9, 11, 0, 11); - Window_Show(¶m0->unk_08[0], 1, 1024 - (18 + 12) - 9, 11); + LoadStandardWindowGraphics(param0->unk_00, 3, 1024 - (18 + 12) - 9, 11, 0, 11); + Window_DrawStandardFrame(¶m0->unk_08[0], 1, 1024 - (18 + 12) - 9, 11); param0->unk_80 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 11, PAD_BUTTON_B); } @@ -381,7 +381,7 @@ static u8 ov7_0224D1EC(UnkStruct_ov7_0224D008 *param0) static void ov7_0224D21C(UnkStruct_ov7_0224D008 *param0) { - Window_Clear(¶m0->unk_08[0], 1); + Window_EraseStandardFrame(¶m0->unk_08[0], 1); Window_ClearAndCopyToVRAM(¶m0->unk_08[0]); Menu_Free(param0->unk_80, NULL); StringList_Free(param0->unk_84); @@ -397,7 +397,7 @@ static u8 ov7_0224D250(FieldSystem *fieldSystem, UnkStruct_ov7_0224D008 *param1) if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { void *v0; - sub_0200E084(¶m1->unk_08[1], 0); + Window_EraseMessageBox(¶m1->unk_08[1], 0); Window_Remove(¶m1->unk_08[1]); MessageLoader_Free(param1->unk_88); StringTemplate_Free(param1->unk_8C); @@ -468,7 +468,7 @@ static void ov7_0224D44C(UnkStruct_ov7_0224D008 *param0) { u32 v0; - Window_Clear(¶m0->unk_08[2], 1); + Window_EraseStandardFrame(¶m0->unk_08[2], 1); for (v0 = 0; v0 < 6; v0++) { Window_ClearAndCopyToVRAM(¶m0->unk_08[v0]); @@ -496,8 +496,8 @@ static void ov7_0224D474(UnkStruct_ov7_0224D008 *param0) Graphics_LoadPaletteFromOpenNARC(v0, 1, 0, 0, 32, 11); } - sub_0200DAA4(param0->unk_00, 3, (1 + (18 + 12)), 11, 0, 11); - sub_0200DD0C(param0->unk_00, 3, 1, 10, Options_Frame(param0->unk_278), 11); + LoadStandardWindowGraphics(param0->unk_00, 3, (1 + (18 + 12)), 11, 0, 11); + LoadMessageBoxGraphics(param0->unk_00, 3, 1, 10, Options_Frame(param0->unk_278), 11); NARC_dtor(v0); } @@ -769,7 +769,7 @@ static void ov7_0224DAF8(UnkStruct_ov7_0224D008 *param0, u8 param1) if (param0->unk_2A9 == 3) { if (param1 == 0) { Window_FillTilemap(¶m0->unk_08[2], 15); - Window_Show( + Window_DrawStandardFrame( ¶m0->unk_08[2], 1, (1 + (18 + 12)), 11); } else { Window_FillRectWithColor(¶m0->unk_08[2], 15, 0, 0, (9 * 8), 16); @@ -788,7 +788,7 @@ static void ov7_0224DAF8(UnkStruct_ov7_0224D008 *param0, u8 param1) } else { if (param1 == 0) { Window_FillTilemap(¶m0->unk_08[2], 15); - Window_Show(¶m0->unk_08[2], 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_08[2], 1, (1 + (18 + 12)), 11); v1 = MessageLoader_GetNewStrbuf(param0->unk_88, 18); @@ -854,7 +854,7 @@ static u8 ov7_0224DC84(UnkStruct_ov7_0224D008 *param0) Window_FillTilemap(¶m0->unk_08[5], 15); Window_ClearAndCopyToVRAM(¶m0->unk_08[1]); - sub_0200E060(¶m0->unk_08[5], 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08[5], 0, 1, 10); param0->unk_2AA = (u16)v0; param0->unk_2AC = 1; @@ -943,7 +943,7 @@ static void ov7_0224DED4(UnkStruct_ov7_0224D008 *param0) } Window_FillTilemap(¶m0->unk_08[4], 15); - Window_Show(¶m0->unk_08[4], 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_08[4], 1, (1 + (18 + 12)), 11); v0 = Strbuf_Init((12 * 2), 11); v1 = MessageLoader_GetNewStrbuf(param0->unk_88, 20); @@ -967,8 +967,8 @@ static u8 ov7_0224DFB0(UnkStruct_ov7_0224D008 *param0) if (gCoreSys.pressedKeys & PAD_BUTTON_A) { CellActor_SetDrawFlag(param0->unk_25C[0], 0); CellActor_SetDrawFlag(param0->unk_25C[1], 0); - Window_Clear(¶m0->unk_08[4], 1); - Window_Clear(¶m0->unk_08[3], 1); + Window_EraseStandardFrame(¶m0->unk_08[4], 1); + Window_EraseStandardFrame(¶m0->unk_08[3], 1); Window_FillTilemap(¶m0->unk_08[5], 15); Sound_PlayEffect(1500); @@ -976,9 +976,9 @@ static u8 ov7_0224DFB0(UnkStruct_ov7_0224D008 *param0) } if (gCoreSys.pressedKeys & PAD_BUTTON_B) { - Window_Clear(¶m0->unk_08[4], 1); - Window_Clear(¶m0->unk_08[3], 1); - sub_0200E084(¶m0->unk_08[5], 0); + Window_EraseStandardFrame(¶m0->unk_08[4], 1); + Window_EraseStandardFrame(¶m0->unk_08[3], 1); + Window_EraseMessageBox(¶m0->unk_08[5], 0); ov7_0224EB38(param0, 0); @@ -1074,7 +1074,7 @@ static void ov7_0224E28C(UnkStruct_ov7_0224D008 *param0, u8 param1) Window_FillTilemap(¶m0->unk_08[3], 15); if (param1 == 0) { - Window_Show(¶m0->unk_08[3], 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_08[3], 1, (1 + (18 + 12)), 11); } v0 = Strbuf_Init(24, 11); @@ -1160,7 +1160,7 @@ static u8 ov7_0224E3D8(UnkStruct_ov7_0224D008 *param0) Sound_PlayEffect(1604); return 9; case 0xfffffffe: - sub_0200E084(¶m0->unk_08[5], 0); + Window_EraseMessageBox(¶m0->unk_08[5], 0); ov7_0224EB38(param0, 0); CellActor_SetDrawFlag(param0->unk_25C[0], param0->unk_26C[0]); CellActor_SetDrawFlag(param0->unk_25C[1], param0->unk_26C[1]); @@ -1240,7 +1240,7 @@ static u8 ov7_0224E6B8(UnkStruct_ov7_0224D008 *param0) } } - sub_0200E084(¶m0->unk_08[5], 0); + Window_EraseMessageBox(¶m0->unk_08[5], 0); ov7_0224EB38(param0, 0); CellActor_SetDrawFlag(param0->unk_25C[0], param0->unk_26C[0]); CellActor_SetDrawFlag(param0->unk_25C[1], param0->unk_26C[1]); @@ -1260,7 +1260,7 @@ static u8 ov7_0224E7C8(UnkStruct_ov7_0224D008 *param0) } if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_08[5], 0); + Window_EraseMessageBox(¶m0->unk_08[5], 0); ov7_0224EB38(param0, 0); CellActor_SetDrawFlag(param0->unk_25C[0], param0->unk_26C[0]); CellActor_SetDrawFlag(param0->unk_25C[1], param0->unk_26C[1]); diff --git a/src/overlay008/ov8_02249960.c b/src/overlay008/ov8_02249960.c index 2f949c3ac9..2bd7f698ce 100644 --- a/src/overlay008/ov8_02249960.c +++ b/src/overlay008/ov8_02249960.c @@ -45,6 +45,7 @@ #include "map_object_move.h" #include "message.h" #include "player_avatar.h" +#include "render_window.h" #include "save_player.h" #include "savedata_misc.h" #include "script_manager.h" @@ -53,7 +54,6 @@ #include "sys_task_manager.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0201D15C.h" #include "unk_02027F50.h" #include "unk_020508D4.h" @@ -2845,7 +2845,7 @@ static BOOL ov8_0224B3D4(TaskManager *param0) sub_020057A4(1593, 0); MessageLoader_GetStrbuf(v2->unk_48, 12, v2->unk_4C); FieldMessage_AddWindow(fieldSystem->unk_08, v2->unk_44, 3); - sub_0200E084(v2->unk_44, 0); + Window_EraseMessageBox(v2->unk_44, 0); FieldMessage_DrawWindow(v2->unk_44, SaveData_Options(fieldSystem->saveData)); v2->unk_40 = FieldMessage_Print(v2->unk_44, v2->unk_4C, SaveData_Options(fieldSystem->saveData), 1); @@ -2863,7 +2863,7 @@ static BOOL ov8_0224B3D4(TaskManager *param0) int v10 = Player_GetZPos(fieldSystem->playerAvatar); ov8_0224B240(&v2->unk_1C, v9, v10); - sub_0200E084(v2->unk_44, 0); + Window_EraseMessageBox(v2->unk_44, 0); Window_Remove(v2->unk_44); v2->unk_04 = 0; v2->unk_00 = 5; diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index e560782002..693ffa02b2 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -44,6 +44,7 @@ #include "pokemon.h" #include "pokemon_icon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" @@ -54,7 +55,6 @@ #include "unk_0200679C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02014000.h" @@ -494,7 +494,7 @@ static void ov10_0221F930(UnkStruct_ov10_0221FB28 *param0) } Window_FillRectWithColor(¶m0->unk_B8C, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_B8C, 0, 1, 15); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_B8C, 0, 1, 15); param0->unk_BAC = Text_AddPrinterWithParams(¶m0->unk_B8C, FONT_MESSAGE, param0->unk_BA8, 0, 0, TEXT_SPEED_INSTANT, NULL); param0->unk_BB4 = Menu_MakeYesNoChoiceWithCursorAt(param0->unk_0C, &Unk_ov10_02222A68, (1 + (18 + 12)), 14, 1, param0->unk_00->unk_24); @@ -531,7 +531,7 @@ static void ov10_0221F930(UnkStruct_ov10_0221FB28 *param0) param0->unk_BB4 = NULL; } - sub_0200E084(¶m0->unk_B7C, 0); + Window_EraseMessageBox(¶m0->unk_B7C, 0); Bg_ScheduleTilemapTransfer(param0->unk_0C, 0); param0->unk_BB0 = 8; break; @@ -1051,7 +1051,7 @@ static u8 ov10_02220700(UnkStruct_ov10_0221FB28 *param0) } break; default: - sub_0200E084(¶m0->unk_B7C, 0); + Window_EraseMessageBox(¶m0->unk_B7C, 0); Bg_ScheduleTilemapTransfer(param0->unk_0C, 0); param0->unk_B76 = 0; param0->unk_B75 = 64 / 3; @@ -1448,9 +1448,9 @@ static void ov10_02220F1C(UnkStruct_ov10_0221FB28 *param0) GF_ASSERT(param0->unk_B9C == GX_BG0_AS_2D && param0->unk_00 != NULL && param0->unk_00->unk_00 != NULL && param0->unk_00->unk_00->unk_108 != NULL); v0 = Options_Frame(param0->unk_00->unk_00->unk_108); - sub_0200DD0C(param0->unk_0C, 0, 1, 15, v0, param0->unk_00->unk_24); + LoadMessageBoxGraphics(param0->unk_0C, 0, 1, 15, v0, param0->unk_00->unk_24); PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 15 * 16, 0x20 * 1); - sub_0200DAA4(param0->unk_0C, 0, (1 + (18 + 12)), 14, 0, param0->unk_00->unk_24); + LoadStandardWindowGraphics(param0->unk_0C, 0, (1 + (18 + 12)), 14, 0, param0->unk_00->unk_24); PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 14 * 16, 0x20 * 1); Font_LoadTextPalette(0, 13 * 0x20, param0->unk_00->unk_24); PaletteData_LoadBufferFromHardware(param0->unk_08, 0, 13 * 16, 0x20 * 1); @@ -2476,7 +2476,7 @@ static void ov10_022227A4(UnkStruct_ov10_0221F800 *param0) static void ov10_022229D4(UnkStruct_ov10_0221FB28 *param0) { Window_FillRectWithColor(¶m0->unk_B7C, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_B7C, 0, 1, 15); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_B7C, 0, 1, 15); } static BOOL ov10_02222A08(UnkStruct_ov10_0221FB28 *param0) @@ -2491,14 +2491,14 @@ static BOOL ov10_02222A08(UnkStruct_ov10_0221FB28 *param0) static void ov10_02222A28(UnkStruct_ov10_0221FB28 *param0) { if (param0->unk_BB8 == NULL) { - param0->unk_BB8 = sub_0200E7FC(¶m0->unk_B7C, 1); + param0->unk_BB8 = Window_AddWaitDial(¶m0->unk_B7C, 1); } } static void ov10_02222A48(UnkStruct_ov10_0221FB28 *param0) { if (param0->unk_BB8 != NULL) { - DeleteWaitDial(param0->unk_BB8); + DestroyWaitDial(param0->unk_BB8); param0->unk_BB8 = NULL; } } diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index fa0da990a7..bbb3f7f5cc 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -30,6 +30,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" @@ -39,7 +40,6 @@ #include "unk_0200679C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0208C098.h" #include "unk_02094EDC.h" @@ -836,7 +836,7 @@ static u8 ov13_0222081C(UnkStruct_ov13_022213F0 *param0) static u8 ov13_02220834(UnkStruct_ov13_022213F0 *param0) { - sub_0200E084(¶m0->unk_204C[1], 0); + Window_EraseMessageBox(¶m0->unk_204C[1], 0); return 2; } @@ -1157,8 +1157,8 @@ static void ov13_02220D4C(UnkStruct_ov13_022213F0 *param0) { int v4 = ov16_0223EDE0(param0->unk_00->unk_08); - Graphics_LoadTilesToBgLayer(38, sub_0200DD04(v4), param0->unk_1E0, 4, 1, 0, 0, param0->unk_00->unk_0C); - PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); + Graphics_LoadTilesToBgLayer(38, GetMessageBoxTilesNARCMember(v4), param0->unk_1E0, 4, 1, 0, 0, param0->unk_00->unk_0C); + PaletteData_LoadBufferFromFileStart(param0->unk_1E4, 38, GetMessageBoxPaletteNARCMember(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } { diff --git a/src/overlay013/ov13_02221A88.c b/src/overlay013/ov13_02221A88.c index 33061d95bf..ee17cba18e 100644 --- a/src/overlay013/ov13_02221A88.c +++ b/src/overlay013/ov13_02221A88.c @@ -19,11 +19,11 @@ #include "pokemon.h" #include "pokemon_summary_app.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0208C098.h" #include "unk_02094EDC.h" @@ -490,7 +490,7 @@ static void ov13_022221C8(UnkStruct_ov13_022213F0 *param0, u32 param1) { Strbuf *v0; - sub_0200E060(¶m0->unk_204C[0], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_204C[0], 1, 1, 14); Window_FillTilemap(¶m0->unk_204C[0], 15); v0 = MessageLoader_GetNewStrbuf(param0->unk_1FA4, param1); @@ -1538,7 +1538,7 @@ static void ov13_02223F7C(UnkStruct_ov13_022213F0 *param0) void ov13_022240E0(UnkStruct_ov13_022213F0 *param0) { - sub_0200E060(¶m0->unk_204C[1], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_204C[1], 1, 1, 14); Window_FillTilemap(¶m0->unk_204C[1], 15); ov13_02224108(param0); } diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 7dcfb8a0d5..216d2013bc 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -31,6 +31,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" @@ -40,7 +41,6 @@ #include "unk_0200679C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_020797C8.h" static void ov13_02226590(SysTask *param0, void *param1); @@ -501,7 +501,7 @@ static u8 ov13_02226C60(UnkStruct_ov13_02227244 *param0) static u8 ov13_02226C6C(UnkStruct_ov13_02227244 *param0) { - sub_0200E084(¶m0->unk_1C, 0); + Window_EraseMessageBox(¶m0->unk_1C, 0); return 3; } @@ -748,8 +748,8 @@ static void ov13_02226FC4(UnkStruct_ov13_02227244 *param0) { int v4 = ov16_0223EDE0(param0->unk_00->unk_00); - Graphics_LoadTilesToBgLayer(38, sub_0200DD04(v4), param0->unk_04, 4, 1024 - (18 + 12), 0, 0, param0->unk_00->unk_0C); - PaletteData_LoadBufferFromFileStart(param0->unk_08, 38, sub_0200DD08(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); + Graphics_LoadTilesToBgLayer(38, GetMessageBoxTilesNARCMember(v4), param0->unk_04, 4, 1024 - (18 + 12), 0, 0, param0->unk_00->unk_0C); + PaletteData_LoadBufferFromFileStart(param0->unk_08, 38, GetMessageBoxPaletteNARCMember(v4), param0->unk_00->unk_0C, 1, 0x20, 14 * 16); } } diff --git a/src/overlay013/ov13_02227288.c b/src/overlay013/ov13_02227288.c index 063029f2f1..e6fb68d539 100644 --- a/src/overlay013/ov13_02227288.c +++ b/src/overlay013/ov13_02227288.c @@ -11,10 +11,10 @@ #include "item.h" #include "message.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" static void ov13_022273CC(UnkStruct_ov13_02227244 *param0); static void ov13_02227888(UnkStruct_ov13_02227244 *param0); @@ -374,7 +374,7 @@ static void ov13_02227974(UnkStruct_ov13_02227244 *param0) void ov13_022279F4(UnkStruct_ov13_02227244 *param0) { - sub_0200E060(¶m0->unk_1C, 1, 1024 - (18 + 12), 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1C, 1, 1024 - (18 + 12), 14); Window_FillTilemap(¶m0->unk_1C, 15); ov13_02227A1C(param0); } diff --git a/src/overlay017/ov17_0223CB1C.c b/src/overlay017/ov17_0223CB1C.c index 1b6f8cc661..9bcaf4ed9c 100644 --- a/src/overlay017/ov17_0223CB1C.c +++ b/src/overlay017/ov17_0223CB1C.c @@ -28,6 +28,7 @@ #include "narc.h" #include "overlay_manager.h" #include "palette.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -37,7 +38,6 @@ #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014000.h" #include "unk_02017728.h" @@ -610,8 +610,8 @@ static void ov17_0223D4A8(UnkStruct_ov17_02247A48 *param0, NARC *param1) v0 = Options_Frame(param0->unk_00->unk_196C); - sub_0200DD0C(param0->unk_0C.unk_24, 1, 1, 15, v0, 22); - PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 38, sub_0200DD08(v0), 22, 0, 0x20, 14 * 16); + LoadMessageBoxGraphics(param0->unk_0C.unk_24, 1, 1, 15, v0, 22); + PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 38, GetMessageBoxPaletteNARCMember(v0), 22, 0, 0x20, 14 * 16); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 24, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 21, param0->unk_0C.unk_24, 2, 0, 0, 1, 22); PaletteData_LoadBufferFromFileStart(param0->unk_0C.unk_44, 45, 37, 22, 0, 0x20, 0xc * 16); diff --git a/src/overlay017/ov17_0223DAD0.c b/src/overlay017/ov17_0223DAD0.c index 8cc6cbd17b..3ad52bd914 100644 --- a/src/overlay017/ov17_0223DAD0.c +++ b/src/overlay017/ov17_0223DAD0.c @@ -36,6 +36,7 @@ #include "overlay_manager.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -45,7 +46,6 @@ #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02014000.h" @@ -798,8 +798,8 @@ static void ov17_0223E67C(UnkStruct_ov17_0224DF54 *param0, NARC *param1) PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 45, 36, 23, 0, 0x20, 13 * 16); v0 = Options_Frame(param0->unk_00->unk_196C); - sub_0200DD0C(param0->unk_14.unk_60, 1, 1, 15, v0, 23); - PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 38, sub_0200DD08(v0), 23, 0, 0x20, 14 * 16); + LoadMessageBoxGraphics(param0->unk_14.unk_60, 1, 1, 15, v0, 23); + PaletteData_LoadBufferFromFileStart(param0->unk_14.unk_90, 38, GetMessageBoxPaletteNARCMember(v0), 23, 0, 0x20, 14 * 16); ov17_0224C848(param0); { diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index ef56dddb03..1d26b23e2e 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -40,13 +40,13 @@ #include "heap.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "spl.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_020933F8.h" #include "unk_02094EDC.h" @@ -1193,7 +1193,7 @@ static void ov17_02248DA4(SysTask *param0, void *param1) switch (v0->unk_10) { case 0: if (v0->unk_17 != 0) { - sub_0200E060(&v0->unk_00->unk_0C.unk_28[0], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_00->unk_0C.unk_28[0], 1, 1, 14); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_0C.unk_24, 1); ov17_02247A08(v0->unk_00, v0->unk_17, &v0->unk_13); v0->unk_10++; @@ -1212,7 +1212,7 @@ static void ov17_02248DA4(SysTask *param0, void *param1) if (v0->unk_19 == 1) { v0->unk_10++; } else if (v0->unk_12 >= v0->unk_18) { - sub_0200E084(&v0->unk_00->unk_0C.unk_28[0], 1); + Window_EraseMessageBox(&v0->unk_00->unk_0C.unk_28[0], 1); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_0C.unk_24, 1); v0->unk_10++; } diff --git a/src/overlay017/ov17_0224A0FC.c b/src/overlay017/ov17_0224A0FC.c index 885a3a3ccd..0e1df667ba 100644 --- a/src/overlay017/ov17_0224A0FC.c +++ b/src/overlay017/ov17_0224A0FC.c @@ -44,6 +44,7 @@ #include "narc.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "spl.h" #include "strbuf.h" #include "string_template.h" @@ -52,7 +53,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_02012744.h" #include "unk_02014000.h" #include "unk_0201D15C.h" @@ -2104,7 +2104,7 @@ void ov17_0224C5A0(UnkStruct_ov17_0224DF54 *param0, u32 param1, const UnkStruct_ return; } - sub_0200E060(¶m0->unk_14.unk_64[1], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_14.unk_64[1], 1, 1, 14); Bg_ScheduleTilemapTransfer(param0->unk_14.unk_60, 1); v0 = Unk_ov17_0225470C[param1].unk_00; @@ -2123,7 +2123,7 @@ void ov17_0224C5A0(UnkStruct_ov17_0224DF54 *param0, u32 param1, const UnkStruct_ void ov17_0224C640(UnkStruct_ov17_0224DF54 *param0) { - sub_0200E084(¶m0->unk_14.unk_64[1], 1); + Window_EraseMessageBox(¶m0->unk_14.unk_64[1], 1); Bg_ScheduleTilemapTransfer(param0->unk_14.unk_60, 1); param0->unk_1B25 = 0; } diff --git a/src/overlay017/ov17_0224CFB8.c b/src/overlay017/ov17_0224CFB8.c index 59b7984c68..31836fe7cb 100644 --- a/src/overlay017/ov17_0224CFB8.c +++ b/src/overlay017/ov17_0224CFB8.c @@ -39,10 +39,10 @@ #include "heap.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_02094EDC.h" static int ov17_0224CFF8(UnkStruct_ov17_0224F30C *param0, void *param1, int param2, void *param3); @@ -1403,7 +1403,7 @@ static void ov17_0224E6C8(SysTask *param0, void *param1) switch (v0->unk_10) { case 0: if (v0->unk_1A != 0) { - sub_0200E060(&v0->unk_00->unk_14.unk_64[0], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_00->unk_14.unk_64[0], 1, 1, 14); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_14.unk_60, 1); ov17_0224C2CC(v0->unk_00, v0->unk_1A, &v0->unk_14); @@ -1423,7 +1423,7 @@ static void ov17_0224E6C8(SysTask *param0, void *param1) if (v0->unk_1C == 1) { v0->unk_10++; } else if (v0->unk_12 >= v0->unk_1B) { - sub_0200E084(&v0->unk_00->unk_14.unk_64[0], 1); + Window_EraseMessageBox(&v0->unk_00->unk_14.unk_64[0], 1); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_14.unk_60, 1); v0->unk_10++; } diff --git a/src/overlay017/ov17_02250744.c b/src/overlay017/ov17_02250744.c index 15fa78af12..49f869c956 100644 --- a/src/overlay017/ov17_02250744.c +++ b/src/overlay017/ov17_02250744.c @@ -25,6 +25,7 @@ #include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -33,7 +34,6 @@ #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0201D15C.h" #include "unk_020933F8.h" #include "unk_02094EDC.h" @@ -290,8 +290,8 @@ void ov17_022509AC(UnkStruct_ov17_0224FCA0 *param0) v0 = Options_Frame(param0->unk_00->unk_196C); - sub_0200DD0C(param0->unk_10.unk_20, 1, 1, 15, v0, 24); - PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); + LoadMessageBoxGraphics(param0->unk_10.unk_20, 1, 1, 15, v0, 24); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, GetMessageBoxPaletteNARCMember(v0), 24, 0, 0x20, 14 * 16); Bg_ClearTilemap(param0->unk_10.unk_20, 2); NARC_dtor(v1); } @@ -329,8 +329,8 @@ void ov17_02250B00(UnkStruct_ov17_0224FCA0 *param0) v0 = Options_Frame(param0->unk_00->unk_196C); - sub_0200DD0C(param0->unk_10.unk_20, 1, 1, 15, v0, 24); - PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, sub_0200DD08(v0), 24, 0, 0x20, 14 * 16); + LoadMessageBoxGraphics(param0->unk_10.unk_20, 1, 1, 15, v0, 24); + PaletteData_LoadBufferFromFileStart(param0->unk_10.unk_C0, 38, GetMessageBoxPaletteNARCMember(v0), 24, 0, 0x20, 14 * 16); { Strbuf *v2; diff --git a/src/overlay017/ov17_02251D6C.c b/src/overlay017/ov17_02251D6C.c index b07062c9b4..dc26cf9ba0 100644 --- a/src/overlay017/ov17_02251D6C.c +++ b/src/overlay017/ov17_02251D6C.c @@ -26,12 +26,12 @@ #include "bg_window.h" #include "heap.h" #include "pokemon.h" +#include "render_window.h" #include "sys_task.h" #include "sys_task_manager.h" #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" static int ov17_02251DAC(UnkStruct_ov17_0224F30C *param0, void *param1, int param2, void *param3); @@ -425,7 +425,7 @@ static void ov17_0225228C(SysTask *param0, void *param1) case 0: if (v0->unk_1A != 0) { if (v0->unk_1D == 0) { - sub_0200E060(&v0->unk_00->unk_10.unk_24[0], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_00->unk_10.unk_24[0], 1, 1, 14); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_10.unk_20, 1); } @@ -446,7 +446,7 @@ static void ov17_0225228C(SysTask *param0, void *param1) if (v0->unk_1C == 1) { v0->unk_10++; } else if (v0->unk_12 >= v0->unk_1B) { - sub_0200E084(&v0->unk_00->unk_10.unk_24[0], 1); + Window_EraseMessageBox(&v0->unk_00->unk_10.unk_24[0], 1); Bg_ScheduleTilemapTransfer(v0->unk_00->unk_10.unk_20, 1); v0->unk_10++; } @@ -518,7 +518,7 @@ static void ov17_022523AC(SysTask *param0, void *param1) ov17_02250CEC(v0->unk_00); - sub_0200E060(&v0->unk_00->unk_10.unk_24[0], 0, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_00->unk_10.unk_24[0], 0, 1, 14); Window_FillTilemap(&v0->unk_00->unk_10.unk_24[0], 0xff); Window_CopyToVRAM(&v0->unk_00->unk_10.unk_24[0]); diff --git a/src/overlay019/ov19_021DB2FC.c b/src/overlay019/ov19_021DB2FC.c index 5214dc6ebb..8c52e2b8bf 100644 --- a/src/overlay019/ov19_021DB2FC.c +++ b/src/overlay019/ov19_021DB2FC.c @@ -16,10 +16,10 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" static void ov19_021DB4B4(BgConfig *param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5); static void ov19_021DB638(UnkStruct_ov19_021DB6F0 *param0, Window *param1, u8 param2, u32 param3); @@ -100,7 +100,7 @@ void ov19_021DB3C4(UnkStruct_ov19_021DB6F0 *param0) Graphics_LoadTilesToBgLayer(38, 0, param0->unk_00, 1, 512, 0, 0, 10); Graphics_LoadPalette(38, 24, 0, 7 * 0x20, 0x20, 10); - sub_0200DD0C(param0->unk_00, 1, 521, 8, param0->unk_20, 10); + LoadMessageBoxGraphics(param0->unk_00, 1, 521, 8, param0->unk_20, 10); } void ov19_021DB448(UnkStruct_ov19_021DB6F0 *param0, u32 param1) diff --git a/src/overlay020/ov20_021D2EA4.c b/src/overlay020/ov20_021D2EA4.c index ca9937fecf..852a95aefb 100644 --- a/src/overlay020/ov20_021D2EA4.c +++ b/src/overlay020/ov20_021D2EA4.c @@ -19,10 +19,10 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" #include "unk_02014D38.h" typedef struct { @@ -146,8 +146,8 @@ void ov20_021D2F50(UnkStruct_ov20_021D30F8 *param0, NARC *param1) v1 += 9; Graphics_LoadPalette(38, 24, 0, 14 * 0x20, 0x20, 35); - sub_0200DD0C(v0, 0, v1, 15, ov20_021D2080(param0->unk_04), 35); - sub_0200E010(¶m0->unk_1C, v1, 15); + LoadMessageBoxGraphics(v0, 0, v1, 15, ov20_021D2080(param0->unk_04), 35); + Window_DrawMessageBox(¶m0->unk_1C, v1, 15); Window_PutToTilemap(¶m0->unk_0C); Window_PutToTilemap(¶m0->unk_1C); @@ -541,7 +541,7 @@ void ov20_021D3790(UnkStruct_ov20_021D30F8 *param0, int param1) MessageLoader_GetStrbuf(param0->unk_48, 10, param0->unk_4C); Text_AddPrinterWithParamsAndColor(¶m0->unk_2C, FONT_SYSTEM, param0->unk_4C, 14, 0 + 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 9), NULL); - Window_Show(¶m0->unk_2C, 0, param0->unk_60, 14); + Window_DrawStandardFrame(¶m0->unk_2C, 0, param0->unk_60, 14); ColoredArrow_Print(param0->unk_50, ¶m0->unk_2C, 0, 0 + (param1 * 16)); Window_CopyToVRAM(¶m0->unk_2C); @@ -555,6 +555,6 @@ void ov20_021D381C(UnkStruct_ov20_021D30F8 *param0, int param1) void ov20_021D384C(UnkStruct_ov20_021D30F8 *param0) { - Window_Clear(¶m0->unk_2C, 0); + Window_EraseStandardFrame(¶m0->unk_2C, 0); Window_ClearAndCopyToVRAM(¶m0->unk_2C); } diff --git a/src/overlay022/ov22_02255D44.c b/src/overlay022/ov22_02255D44.c index bff486031c..cf4dc7c4e9 100644 --- a/src/overlay022/ov22_02255D44.c +++ b/src/overlay022/ov22_02255D44.c @@ -60,6 +60,7 @@ #include "overlay_manager.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task_manager.h" @@ -70,7 +71,6 @@ #include "unk_0200679C.h" #include "unk_020093B4.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015920.h" #include "unk_02017728.h" @@ -1343,8 +1343,8 @@ static void ov22_022572A0(UnkStruct_ov22_02255D44 *param0, u32 param1, u8 param2 Font_LoadScreenIndicatorsPalette(0, 7 * 32, 14); Window_Add(param0->unk_00.unk_40, param0->unk_718, 3, param2, param3, param4, param5, 7, (0 + (29 * 4) + (18 + 12))); Window_FillTilemap(param0->unk_718, 15); - sub_0200DD0C(param0->unk_00.unk_40, 3, (0 + (29 * 4)), 8, v2, 14); - sub_0200E060(param0->unk_718, 0, (0 + (29 * 4)), 8); + LoadMessageBoxGraphics(param0->unk_00.unk_40, 3, (0 + (29 * 4)), 8, v2, 14); + Window_DrawMessageBoxWithScrollCursor(param0->unk_718, 0, (0 + (29 * 4)), 8); v0 = MessageLoader_Init(0, 26, 385, 13); v1 = MessageLoader_GetNewStrbuf(v0, param1); diff --git a/src/overlay022/ov22_0225A428.c b/src/overlay022/ov22_0225A428.c index 5683991f76..b326d9aeb9 100644 --- a/src/overlay022/ov22_0225A428.c +++ b/src/overlay022/ov22_0225A428.c @@ -21,6 +21,7 @@ #include "game_options.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "sys_task.h" @@ -28,7 +29,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200A328.h" -#include "unk_0200DA60.h" #include "unk_02095AF0.h" static void ov22_0225A6E0(UnkStruct_ov22_022597BC *param0, BgConfig *param1); @@ -85,7 +85,7 @@ void ov22_0225A428(UnkStruct_ov22_0225A428 *param0, UnkStruct_ov22_02256BAC *par Window_FillTilemap(param0->unk_134, 15); ov22_0225A860(param0->unk_134, 26, param1->unk_14, 6, 0, 0, TEXT_COLOR(1, 2, 15), TEXT_SPEED_NO_TRANSFER); ov22_0225A860(param0->unk_134, 26, param1->unk_14, param1->unk_18, 72, 0, TEXT_COLOR(1, 2, 15), TEXT_SPEED_NO_TRANSFER); - sub_0200E060(param0->unk_134, 0, 1, 1); + Window_DrawMessageBoxWithScrollCursor(param0->unk_134, 0, 1, 1); } param0->unk_30 = param1->unk_04; @@ -197,7 +197,7 @@ static void ov22_0225A718(BgConfig *param0, const Options *param1) { int v0 = Options_Frame(param1); - sub_0200DD0C(param0, 5, 1, 1, v0, 14); + LoadMessageBoxGraphics(param0, 5, 1, 1, v0, 14); Font_LoadScreenIndicatorsPalette(4, 2 * 32, 14); } @@ -210,7 +210,7 @@ static void ov22_0225A748(Window **param0, BgConfig *param1, int param2, int par Window_FillTilemap(*param0, 15); if (param7) { - sub_0200E060(*param0, 0, 1, 1); + Window_DrawMessageBoxWithScrollCursor(*param0, 0, 1, 1); } Window_CopyToVRAM(*param0); @@ -232,7 +232,7 @@ static s32 ov22_0225A7CC(Window *param0, int param1, int param2, int param3, int Window_FillTilemap(param0, 15); v0 = ov22_0225A860(param0, param1, param2, param3, param4, param5, TEXT_COLOR(1, 2, 15), param6); - sub_0200E060(param0, 0, 1, 1); + Window_DrawMessageBoxWithScrollCursor(param0, 0, 1, 1); return v0; } @@ -243,7 +243,7 @@ static s32 ov22_0225A814(Window *param0, int param1, int param2, int param3, int Window_FillTilemap(param0, 15); v0 = ov22_0225A8B4(param0, param1, param2, param3, param4, param5, TEXT_COLOR(1, 2, 15), param6, param7); - sub_0200E060(param0, 0, 1, 1); + Window_DrawMessageBoxWithScrollCursor(param0, 0, 1, 1); return v0; } diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index fdfbdc1c27..9933e120fe 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -39,6 +39,7 @@ #include "journal.h" #include "menu.h" #include "narc.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -53,7 +54,6 @@ #include "unk_0200A328.h" #include "unk_0200A784.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -1317,7 +1317,7 @@ static void ov23_0223EE80(UnkStruct_ov23_0223EE80 *param0) Bg_ClearTilemap(v1, 0); Bg_ClearTilemap(v1, 1); Bg_ClearTilemap(v1, 2); - sub_0200DD0C(v1, 3, (512 - (18 + 12)), 10, 0, 29); + LoadMessageBoxGraphics(v1, 3, (512 - (18 + 12)), 10, 0, 29); { NARC *v6; @@ -1590,7 +1590,7 @@ static void ov23_0223F118(SysTask *param0, void *param1) HBlankSystem_Start(v0->fieldSystem->unk_04->hBlankSystem); Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); - sub_0200DAA4(v0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); + LoadStandardWindowGraphics(v0->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); CommPlayerMan_Restart(); ov23_0224B460(); diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 95a976a199..7d365dd28b 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -37,6 +37,7 @@ #include "graphics.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -44,7 +45,6 @@ #include "sys_task.h" #include "sys_task_manager.h" #include "trainer_info.h" -#include "unk_0200DA60.h" #include "unk_0202854C.h" #include "unk_02030EE0.h" #include "unk_020366A0.h" @@ -143,9 +143,9 @@ static void CommManUnderground_Init(CommManUnderground *param0, FieldSystem *fie sCommManUnderground->unk_124 = ov23_02253D48(637, 33, fieldSystem->unk_08, v0, 0); sCommManUnderground->unk_128 = ov23_02253D48(630, 33, fieldSystem->unk_08, v0, 0); - sub_0200DD0C(sCommManUnderground->fieldSystem->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4); + LoadMessageBoxGraphics(sCommManUnderground->fieldSystem->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4); Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); - sub_0200DAA4(sCommManUnderground->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); + LoadStandardWindowGraphics(sCommManUnderground->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); for (v1 = 0; v1 < (7 + 1); v1++) { sCommManUnderground->unk_C2[v1] = 0xff; @@ -819,7 +819,7 @@ void ov23_02242CB4(void) ov23_022435A8(); ov23_0223E2F4(); sCommManUnderground->unk_14B = 0; - sub_0200DD0C(sCommManUnderground->fieldSystem->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4); + LoadMessageBoxGraphics(sCommManUnderground->fieldSystem->unk_08, 3, (1024 - (18 + 12)), 10, 0, 4); } } diff --git a/src/overlay023/ov23_02248F1C.c b/src/overlay023/ov23_02248F1C.c index b22a045f79..4b778bd618 100644 --- a/src/overlay023/ov23_02248F1C.c +++ b/src/overlay023/ov23_02248F1C.c @@ -18,6 +18,7 @@ #include "gx_layers.h" #include "narc.h" #include "player_avatar.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "sys_task_manager.h" @@ -25,7 +26,6 @@ #include "unk_0200679C.h" #include "unk_020093B4.h" #include "unk_0200A328.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0201D15C.h" #include "unk_0205D8CC.h" @@ -172,7 +172,7 @@ static void ov23_02248F1C(SysTask *param0, void *param1) } CellActorCollection_Delete(v0->unk_1BC); - sub_0200E084(&v0->unk_3F4, 0); + Window_EraseMessageBox(&v0->unk_3F4, 0); Window_Remove(&v0->unk_3F4); Bg_FreeTilemapBuffer(v1, 7); diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index 81399e50bd..6db72642a7 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -44,6 +44,7 @@ #include "menu.h" #include "message.h" #include "player_avatar.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_list.h" @@ -51,7 +52,6 @@ #include "sys_task_manager.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202854C.h" #include "unk_02030EE0.h" @@ -1031,7 +1031,7 @@ static Menu *ov23_0224BD90(BgConfig *param0, const WindowTemplate *param1, u16 p v0.lineSpacing = 0; Window_AddFromTemplate(param0, v0.window, param1); - Window_Show(v0.window, 1, param2, param3); + Window_DrawStandardFrame(v0.window, 1, param2, param3); return Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, param4, PAD_BUTTON_B); } @@ -1639,7 +1639,7 @@ static BOOL ov23_0224C790(TaskManager *param0) sub_020594FC(); Graphics_LoadPalette(50, 52, 0, 10 * 0x20, 4 * 0x20, 4); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); if (v1->unk_2D) { sub_020594EC(); diff --git a/src/overlay023/ov23_0224DC40.c b/src/overlay023/ov23_0224DC40.c index 1a9c800db5..c2f571f5c8 100644 --- a/src/overlay023/ov23_0224DC40.c +++ b/src/overlay023/ov23_0224DC40.c @@ -24,12 +24,12 @@ #include "list_menu.h" #include "menu.h" #include "message.h" +#include "render_window.h" #include "string_list.h" #include "sys_task.h" #include "sys_task_manager.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0201D15C.h" #include "unk_0202854C.h" #include "unk_020573FC.h" @@ -234,7 +234,7 @@ static void ov23_0224DD2C(UnkStruct_ov23_0224E280 *param0) param0->unk_1C = StringList_New(NELEMS(Unk_ov23_022568B4), 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_0C, 3, 1, 1, 10, NELEMS(Unk_ov23_022568B4) * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (10 * NELEMS(Unk_ov23_022568B4) * 2)); - Window_Show(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v1; @@ -295,7 +295,7 @@ static void ov23_0224DE3C(UnkStruct_ov23_0224E280 *param0) param0->unk_1C = StringList_New(4, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_0C, 3, 1, 1, 16, 4 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (16 * 4 * 2)); - Window_Show(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v1; @@ -383,7 +383,7 @@ static void ov23_0224DFA0(UnkStruct_ov23_0224E280 *param0) param0->unk_1C = StringList_New(4, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_0C, 3, 1, 1, 16, 4 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (16 * 4 * 2)); - Window_Show(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_0C, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v1; @@ -529,7 +529,7 @@ static BOOL ov23_0224E1E0(SysTask *param0, void *param1) static void ov23_0224E244(SysTask *param0, UnkStruct_ov23_0224E280 *param1) { if (param1->unk_1C) { - Window_Clear(¶m1->unk_0C, 1); + Window_EraseStandardFrame(¶m1->unk_0C, 1); ListMenu_Free(param1->unk_20, NULL, NULL); Window_ClearAndCopyToVRAM(¶m1->unk_0C); Window_Remove(¶m1->unk_0C); @@ -946,7 +946,7 @@ static void ov23_0224E9C4(SysTask *param0, UnkStruct_ov23_022577B0 *param1) static void ov23_0224EA08(SysTask *param0, UnkStruct_ov23_022577B0 *param1) { if (param1->unk_18) { - Window_Clear(¶m1->unk_08, 1); + Window_EraseStandardFrame(¶m1->unk_08, 1); ListMenu_Free(param1->unk_1C, NULL, NULL); Window_ClearAndCopyToVRAM(¶m1->unk_08); Window_Remove(¶m1->unk_08); @@ -977,7 +977,7 @@ static void ov23_0224EAA4(UnkStruct_ov23_022577B0 *param0) param0->unk_18 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, 1, 1, 16, v1 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (16 * v1 * 2)); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v2; int v3; diff --git a/src/overlay023/ov23_0224F294.c b/src/overlay023/ov23_0224F294.c index 12ae16278b..2ffcbfc201 100644 --- a/src/overlay023/ov23_0224F294.c +++ b/src/overlay023/ov23_0224F294.c @@ -44,6 +44,7 @@ #include "message.h" #include "narc.h" #include "player_avatar.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -54,7 +55,6 @@ #include "unk_02005474.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0202854C.h" #include "unk_0206A780.h" @@ -479,7 +479,7 @@ static void ov23_0224F7F4(UnkStruct_ov23_02250CD4 *param0) param0->unk_40 = StringList_New(NELEMS(Unk_ov23_02256924), 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 20, 1, 11, NELEMS(Unk_ov23_02256924) * 3, 13, (1024 - (18 + 12) - 9 - 11 * 22)); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v3; @@ -681,7 +681,7 @@ void ov23_0224FB7C(UnkStruct_ov23_02250CD4 *param0) } if (Window_IsInUse(¶m0->unk_10)) { - Window_Clear(¶m0->unk_10, 1); + Window_EraseStandardFrame(¶m0->unk_10, 1); Bg_ScheduleTilemapTransfer(param0->unk_10.bgConfig, param0->unk_10.bgLayer); Window_Remove(¶m0->unk_10); StringList_Free(param0->unk_40); @@ -736,7 +736,7 @@ static void ov23_0224FBFC(UnkStruct_ov23_02250CD4 *param0, int param1) param0->unk_44 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_20, 3, v5, v3, v4, v1 * 2, 13, (1024 - (18 + 12) - 9 - 11 * 22)); - Window_Show(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v7; @@ -771,7 +771,7 @@ static void ov23_0224FCF4(UnkStruct_ov23_02250CD4 *param0) } if (Window_IsInUse(¶m0->unk_20)) { - Window_Clear(¶m0->unk_20, 1); + Window_EraseStandardFrame(¶m0->unk_20, 1); Window_Remove(¶m0->unk_20); } } @@ -848,7 +848,7 @@ static void ov23_0224FE38(UnkStruct_ov23_02250CD4 *param0, UnkFuncPtr_ov23_02248 param0->unk_40 = StringList_New(v3 + 1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, (6 * 2), 13, ((1024 - (18 + 12) - 9 - 11 * 22) - 12 * (6 * 2))); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v5; @@ -1039,7 +1039,7 @@ static void ov23_0225021C(UnkStruct_ov23_02250CD4 *param0, UnkFuncPtr_ov23_02248 param0->unk_40 = StringList_New(v4 + 1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, (6 * 2), 13, ((1024 - (18 + 12) - 9 - 11 * 22) - 12 * (6 * 2))); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v6; @@ -1215,7 +1215,7 @@ static void ov23_022505EC(UnkStruct_ov23_02250CD4 *param0, UnkFuncPtr_ov23_02248 param0->unk_40 = StringList_New(v3 + 1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, (6 * 2), 13, ((1024 - (18 + 12) - 9 - 11 * 22) - 12 * (6 * 2))); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v5; @@ -1616,7 +1616,7 @@ static void ov23_02250D90(UnkStruct_ov23_02250CD4 *param0, UnkFuncPtr_ov23_02248 param0->unk_40 = StringList_New(v3 + 1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, (6 * 2), 13, ((1024 - (18 + 12) - 9 - 11 * 22) - 12 * (6 * 2))); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v5; diff --git a/src/overlay023/ov23_0225128C.c b/src/overlay023/ov23_0225128C.c index 5405c143d5..a8c218126d 100644 --- a/src/overlay023/ov23_0225128C.c +++ b/src/overlay023/ov23_0225128C.c @@ -36,6 +36,7 @@ #include "menu.h" #include "message.h" #include "player_avatar.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -44,7 +45,6 @@ #include "sys_task_manager.h" #include "unk_02005474.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202854C.h" #include "unk_02033200.h" @@ -356,7 +356,7 @@ static void ov23_022515D8(UnkStruct_ov23_02250CD4 *param0, int param1, int param param0->unk_40 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 17, 3, 14, v1 * 2, 13, 2); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v3; @@ -402,7 +402,7 @@ static void ov23_022516E8(UnkStruct_ov23_02250CD4 *param0, int param1, int param param0->unk_40 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 17, 3, 14, v1 * 2, 13, (2 + 14 * 16)); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v3; diff --git a/src/overlay023/ov23_022521F0.c b/src/overlay023/ov23_022521F0.c index dd42c41363..9424604a71 100644 --- a/src/overlay023/ov23_022521F0.c +++ b/src/overlay023/ov23_022521F0.c @@ -27,6 +27,7 @@ #include "map_object.h" #include "menu.h" #include "message.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_list.h" @@ -35,7 +36,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202631C.h" #include "unk_0202854C.h" #include "unk_020573FC.h" @@ -217,7 +217,7 @@ static void *ov23_022524B8(UnkStruct_ov23_02250CD4 *param0) param0->unk_40 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, v1 * 2, 13, ((((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - 12 * 6)); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { int v2, v3; @@ -399,7 +399,7 @@ static void ov23_02252A18(UnkStruct_ov23_02250CD4 *param0) param0->unk_40 = StringList_New(v1, 4); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_10, 3, 19, 3, 12, v1 * 2, 13, (((((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - 12 * 6) - 12 * 12)); - Window_Show(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_10, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v2; @@ -446,7 +446,7 @@ static void ov23_02252A18(UnkStruct_ov23_02250CD4 *param0) static void ov23_02252B90(UnkStruct_ov23_02250CD4 *param0, BOOL param1) { if (Window_IsInUse(¶m0->unk_20)) { - Window_Clear(¶m0->unk_20, 1); + Window_EraseStandardFrame(¶m0->unk_20, 1); Window_Remove(¶m0->unk_20); } @@ -547,7 +547,7 @@ static void ov23_02252D1C(UnkStruct_ov23_02250CD4 *param0) { if (!Window_IsInUse(¶m0->unk_20)) { Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_20, 3, 1, 12, 12, 4, 13, 1); - Window_Show(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_20, 1, 1024 - (18 + 12) - 9, 11); } Window_FillTilemap(¶m0->unk_20, 15); @@ -557,7 +557,7 @@ static void ov23_02252D1C(UnkStruct_ov23_02250CD4 *param0) void ov23_02252D74(UnkStruct_ov23_02250CD4 *param0, int param1) { Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_30, 3, 1, 1, 7, 4, 13, 51); - Window_Show(¶m0->unk_30, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_30, 1, 1024 - (18 + 12) - 9, 11); Window_FillTilemap(¶m0->unk_30, 15); Window_CopyToVRAM(¶m0->unk_30); @@ -570,7 +570,7 @@ void ov23_02252D74(UnkStruct_ov23_02250CD4 *param0, int param1) void ov23_02252DF4(UnkStruct_ov23_02250CD4 *param0) { if (Window_IsInUse(¶m0->unk_30)) { - Window_Clear(¶m0->unk_30, 1); + Window_EraseStandardFrame(¶m0->unk_30, 1); Window_Remove(¶m0->unk_30); } } @@ -578,7 +578,7 @@ void ov23_02252DF4(UnkStruct_ov23_02250CD4 *param0) void ov23_02252E18(UnkStruct_ov23_02250CD4 *param0) { if (Window_IsInUse(¶m0->unk_30)) { - Window_Clear(¶m0->unk_30, 0); + Window_EraseStandardFrame(¶m0->unk_30, 0); Window_Remove(¶m0->unk_30); } } diff --git a/src/overlay023/ov23_02253598.c b/src/overlay023/ov23_02253598.c index bad7586277..58e50103d2 100644 --- a/src/overlay023/ov23_02253598.c +++ b/src/overlay023/ov23_02253598.c @@ -22,6 +22,7 @@ #include "heap.h" #include "list_menu.h" #include "message.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_list.h" @@ -31,7 +32,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202854C.h" typedef int (*UnkFuncPtr_ov23_022576EC)(const SecretBaseRecord *); @@ -180,7 +180,7 @@ static void ov23_022537D4(SysTask *param0, void *param1) { UnkStruct_ov23_022537D4 *v0 = param1; - Window_Clear(&v0->unk_08, 0); + Window_EraseStandardFrame(&v0->unk_08, 0); Window_ClearAndCopyToVRAM(&v0->unk_08); Window_Remove(&v0->unk_08); @@ -222,7 +222,7 @@ void ov23_02253834(BgConfig *param0, TrainerInfo *param1, UnkFuncPtr_ov23_022538 v4->unk_04 = param3; Window_Add(param0, &v4->unk_08, 3, 4, 2, 24, 19, 13, 1); - Window_Show(&v4->unk_08, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(&v4->unk_08, 1, 1024 - (18 + 12) - 9, 11); v1 = MessageLoader_Init(0, 26, 640, 4); Window_FillTilemap(&v4->unk_08, 15); @@ -405,7 +405,7 @@ void *ov23_02253C64(BgConfig *param0, TrainerInfo *param1, UndergroundData *para v4->unk_04 = param4; Window_Add(param0, &v4->unk_08, 3, 4, 2, 24, 19, 13, 1); - Window_Show(&v4->unk_08, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(&v4->unk_08, 1, 1024 - (18 + 12) - 9, 11); v1 = MessageLoader_Init(0, 26, 639, 4); Window_FillTilemap(&v4->unk_08, 15); @@ -424,7 +424,7 @@ void ov23_02253D10(void *param0) { UnkStruct_ov23_022537D4 *v0 = param0; - Window_Clear(&v0->unk_08, 0); + Window_EraseStandardFrame(&v0->unk_08, 0); Window_ClearAndCopyToVRAM(&v0->unk_08); Window_Remove(&v0->unk_08); diff --git a/src/overlay023/ov23_02253D40.c b/src/overlay023/ov23_02253D40.c index 10ffbcf713..12931ebebe 100644 --- a/src/overlay023/ov23_02253D40.c +++ b/src/overlay023/ov23_02253D40.c @@ -11,13 +11,13 @@ #include "heap.h" #include "list_menu.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" #include "sys_task_manager.h" #include "text.h" #include "trainer_info.h" -#include "unk_0200DA60.h" typedef struct UnkStruct_ov23_02253E2C_t { Strbuf *unk_00; @@ -173,7 +173,7 @@ static int ov23_02253E90(UnkStruct_ov23_02253E2C *param0, BOOL param1, UnkStruct } Window_FillTilemap(¶m0->unk_08, 15); - sub_0200E060(¶m0->unk_08, 1, param0->unk_42, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08, 1, param0->unk_42, 10); if (param1) { param0->unk_20 = SysTask_Start(ov23_02253E40, param0, 100); @@ -233,15 +233,15 @@ static void ov23_02253FA4(UnkStruct_ov23_02253E2C *param0, int param1) switch (param1) { case 0: - sub_0200E084(¶m0->unk_08, 1); + Window_EraseMessageBox(¶m0->unk_08, 1); break; case 1: - sub_0200E084(¶m0->unk_08, 1); + Window_EraseMessageBox(¶m0->unk_08, 1); Window_ClearAndCopyToVRAM(¶m0->unk_08); Window_Remove(¶m0->unk_08); break; case 2: - sub_0200E084(¶m0->unk_08, 1); + Window_EraseMessageBox(¶m0->unk_08, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_08); Window_Remove(¶m0->unk_08); break; diff --git a/src/overlay023/ov23_022542CC.c b/src/overlay023/ov23_022542CC.c index 0f92badf61..036d5c9fb9 100644 --- a/src/overlay023/ov23_022542CC.c +++ b/src/overlay023/ov23_022542CC.c @@ -18,12 +18,12 @@ #include "heap.h" #include "list_menu.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202854C.h" #include "unk_0206A780.h" @@ -107,7 +107,7 @@ void ov23_022542D8(UnkStruct_ov23_022542D8 *param0, FieldSystem *fieldSystem, u1 param0->unk_34 = param3; param0->unk_40 = 0; - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); } void ov23_0225430C(UnkStruct_ov23_022542D8 *param0) @@ -165,8 +165,8 @@ static void ov23_0225437C(UnkStruct_ov23_022542D8 *param0) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_04, 3, 19, 3, 12, v4 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (v1)); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_14, 3, 1, 1, 7, (1 * 2), 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (v1 + v2)); - Window_Show(¶m0->unk_04, 1, 1024 - (18 + 12) - 9, 11); - Window_Show(¶m0->unk_14, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_04, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_14, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v5; @@ -245,9 +245,9 @@ static void ov23_0225451C(UnkStruct_ov23_022542D8 *param0) { ov23_02254044(ov23_022421CC()); - Window_Clear(¶m0->unk_14, 1); + Window_EraseStandardFrame(¶m0->unk_14, 1); ListMenu_Free(param0->unk_28, param0->unk_30, param0->unk_34); - Window_Clear(¶m0->unk_04, 1); + Window_EraseStandardFrame(¶m0->unk_04, 1); Bg_ScheduleTilemapTransfer(param0->unk_04.bgConfig, param0->unk_04.bgLayer); Window_Remove(¶m0->unk_04); Window_Remove(¶m0->unk_14); @@ -283,7 +283,7 @@ void ov23_02254594(UnkStruct_ov23_02254594 *param0, FieldSystem *fieldSystem, u1 param0->unk_38 = param2; param0->unk_3C = param3; - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 2, 4); } void ov23_022545C4(UnkStruct_ov23_02254594 *param0, const u8 param1, const u8 param2) @@ -405,8 +405,8 @@ static void ov23_022546E0(UnkStruct_ov23_02254594 *param0) Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_08, 3, 19, 3, 12, v5 * 2, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (v2)); Window_Add(param0->fieldSystem->unk_08, ¶m0->unk_18, 3, 1, 1, 8, (2 * 2), 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (v2 + v3)); - Window_Show(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); - Window_Show(¶m0->unk_18, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_08, 1, 1024 - (18 + 12) - 9, 11); + Window_DrawStandardFrame(¶m0->unk_18, 1, 1024 - (18 + 12) - 9, 11); { MessageLoader *v6; @@ -497,10 +497,10 @@ static void ov23_022546E0(UnkStruct_ov23_02254594 *param0) static void ov23_02254958(UnkStruct_ov23_02254594 *param0) { ov23_02254044(ov23_022421DC()); - Window_Clear(¶m0->unk_18, 1); + Window_EraseStandardFrame(¶m0->unk_18, 1); ov23_02248EF8(param0->unk_2C, param0->unk_38, param0->unk_3C); - Window_Clear(¶m0->unk_08, 1); + Window_EraseStandardFrame(¶m0->unk_08, 1); Bg_ScheduleTilemapTransfer(param0->unk_08.bgConfig, param0->unk_08.bgLayer); Window_Remove(¶m0->unk_08); Window_Remove(¶m0->unk_18); diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index 9b2da2ce3b..d33d3849f0 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -29,6 +29,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "string_template.h" @@ -40,7 +41,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015920.h" #include "unk_02017728.h" @@ -594,8 +594,8 @@ static void ov58_021D142C(UnkStruct_02095EAC *param0, NARC *param1) Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 4, v0, 2, 0, 32 * 24 * 2, 1, 39); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, v0, 5, 0, 32 * 8 * 0x20, 1, 39); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 5, 0, 32 * 24 * 2, 1, 39); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 39); - sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 39); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 39); + LoadStandardWindowGraphics(v0, 0, 1 + (18 + 12), 11, 0, 39); } static void ov58_021D1524(void) @@ -1047,7 +1047,7 @@ static int ov58_021D1E4C(UnkStruct_02095EAC *param0, int param1) ov58_021D2CB0(param0, 7); CommSys_SendData(126, &v1, sizeof(UnkStruct_02095FE4)); - sub_0200E084(¶m0->unk_33C, 1); + Window_EraseMessageBox(¶m0->unk_33C, 1); } ov58_021D2D10(param0); @@ -1056,7 +1056,7 @@ static int ov58_021D1E4C(UnkStruct_02095EAC *param0, int param1) case 2: ov58_021D2CB0(param0, 4); ov58_021D1CDC(param0->unk_2AC, 0); - sub_0200E084(¶m0->unk_33C, 1); + Window_EraseMessageBox(¶m0->unk_33C, 1); ov58_021D2D10(param0); Window_CopyToVRAM(¶m0->unk_32C); @@ -1204,7 +1204,7 @@ static int ov58_021D2180(UnkStruct_02095EAC *param0, int param1) case 2: ov58_021D2CB0(param0, 4); ov58_021D1CDC(param0->unk_2AC, 0); - sub_0200E084(¶m0->unk_33C, 1); + Window_EraseMessageBox(¶m0->unk_33C, 1); ov58_021D2D10(param0); if (CommSys_CurNetId() == 0) { @@ -1719,7 +1719,7 @@ static void ov58_021D2A98(UnkStruct_02095EAC *param0, int param1, int param2) Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_33C, 0xf0f); - sub_0200E060(¶m0->unk_33C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_33C, 0, 1, 10); if (param2 == 0) { param2 = 0; @@ -1747,7 +1747,7 @@ static int ov58_021D2B0C(int param0) static void ov58_021D2B2C(UnkStruct_02095EAC *param0) { - sub_0200E084(¶m0->unk_33C, 0); + Window_EraseMessageBox(¶m0->unk_33C, 0); } static void ov58_021D2B3C(UnkStruct_02095EAC *param0, int param1) diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index 9e290a7566..a63dedaabc 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -32,6 +32,7 @@ #include "message_util.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "string_template.h" @@ -44,7 +45,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -578,8 +578,8 @@ static void ov59_021D1388(UnkStruct_020961E8 *param0, NARC *param1) Graphics_LoadTilemapToBgLayer(12, 11, v0, 6, 0, 0, 1, 51); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 51); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 51); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 51); - sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 51); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_08->unk_08), 51); + LoadStandardWindowGraphics(v0, 0, 1 + (18 + 12), 11, 0, 51); } static void ov59_021D1474(void) @@ -1572,7 +1572,7 @@ static void ov59_021D2628(UnkStruct_020961E8 *param0, int param1, int param2) StringTemplate_Format(param0->unk_24, param0->unk_44, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_34C, 0xf0f); - sub_0200E060(¶m0->unk_34C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_34C, 0, 1, 10); if (param2 == 0) { param0->unk_4C = Text_AddPrinterWithParams(¶m0->unk_34C, FONT_MESSAGE, param0->unk_44, 0, 0, ov59_021D28D4(param0), NULL); @@ -1597,7 +1597,7 @@ static int ov59_021D26B8(int param0) static void ov59_021D26D8(UnkStruct_020961E8 *param0) { - sub_0200E084(¶m0->unk_34C, 0); + Window_EraseMessageBox(¶m0->unk_34C, 0); } static void ov59_021D26E8(UnkStruct_020961E8 *param0) diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index b8ec8f003a..fcf33abbd3 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -26,13 +26,13 @@ #include "narc.h" #include "overlay_manager.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -435,8 +435,8 @@ static void ov61_0222C3B0(UnkStruct_ov61_0222C664 *param0) Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 117); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 117); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 117); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(SaveData_Options(param0->unk_00->unk_00->unk_04)), 117); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 117); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(SaveData_Options(param0->unk_00->unk_00->unk_04)), 117); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 117); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 117); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 117); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 117); @@ -500,7 +500,7 @@ static void ov61_0222C794(UnkStruct_ov61_0222C664 *param0, int param1) MessageLoader_GetStrbuf(param0->unk_2C, param1, v0); StringTemplate_Format(param0->unk_20, param0->unk_3C, v0); Window_FillTilemap(¶m0->unk_64, 15); - Window_Show(¶m0->unk_64, 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_64, 1, (1 + (18 + 12)), 11); param0->unk_40 = Text_AddPrinterWithParams(¶m0->unk_64, FONT_MESSAGE, param0->unk_3C, 0, 0, TEXT_SPEED_INSTANT, NULL); param0->unk_40 = 0xff; @@ -519,7 +519,7 @@ static void ov61_0222C7F8(UnkStruct_ov61_0222C664 *param0, int param1, int param } StringTemplate_SetNumber(param0->unk_20, 0, param2, 5, 2, 1); - sub_0200E084(¶m0->unk_44, 1); + Window_EraseMessageBox(¶m0->unk_44, 1); ov61_0222C794(param0, v0); } @@ -536,14 +536,14 @@ static int ov61_0222C834(int param0) static void ov61_0222C850(UnkStruct_ov61_0222C664 *param0) { if (param0->unk_88 == NULL) { - param0->unk_88 = sub_0200E7FC(¶m0->unk_44, 1); + param0->unk_88 = Window_AddWaitDial(¶m0->unk_44, 1); } } static void ov61_0222C86C(UnkStruct_ov61_0222C664 *param0) { if (param0->unk_88 != NULL) { - DeleteWaitDial(param0->unk_88); + DestroyWaitDial(param0->unk_88); param0->unk_88 = NULL; } } @@ -568,7 +568,7 @@ static void ov61_0222C8B8(UnkStruct_ov61_0222C664 *param0, MessageLoader *param1 StringTemplate_Format(param0->unk_20, param0->unk_34, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_44, 0xf0f); - sub_0200E060(¶m0->unk_44, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_44, 0, 1, 10); param0->unk_40 = Text_AddPrinterWithParams(¶m0->unk_44, FONT_MESSAGE, param0->unk_34, 0, 0, param3, NULL); param0->unk_8C = 0; @@ -835,7 +835,7 @@ static int ov61_0222CC40(UnkStruct_ov61_0222C664 *param0) static int ov61_0222CC64(UnkStruct_ov61_0222C664 *param0) { if (gCoreSys.pressedKeys & PAD_BUTTON_A || gCoreSys.pressedKeys & PAD_BUTTON_B) { - Window_Clear(¶m0->unk_64, 0); + Window_EraseStandardFrame(¶m0->unk_64, 0); param0->unk_90 = 0; if (ov61_0222C928(-param0->unk_18, param0->unk_1C) == 1) { diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index fb08128282..efc4f0ddeb 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -38,6 +38,7 @@ #include "overlay_manager.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -50,7 +51,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_02017728.h" @@ -1047,8 +1047,8 @@ static void ov64_0222E620 (UnkStruct_ov64_0222E21C * param0, const UnkStruct_ov6 v0 = Options_Frame(SaveData_Options(param1->unk_00)); Font_LoadScreenIndicatorsPalette(0, 7 * 0x20, param2); - sub_0200DD0C(param0->unk_00, Unk_ov64_02232258[1], (1 + 9), 8, v0, param2); - sub_0200DAA4(param0->unk_00, Unk_ov64_02232258[1], 1, 9, 0, param2); + LoadMessageBoxGraphics(param0->unk_00, Unk_ov64_02232258[1], (1 + 9), 8, v0, param2); + LoadStandardWindowGraphics(param0->unk_00, Unk_ov64_02232258[1], 1, 9, 0, param2); Window_Init(¶m0->unk_220); Window_Add(param0->unk_00, ¶m0->unk_220, Unk_ov64_02232258[1], 1, 0, 24, 3, 7, ((1 + 9) + (18 + 12))); @@ -1680,7 +1680,7 @@ static void ov64_0222EFBC (UnkStruct_ov64_0222F038 * param0, UnkStruct_ov64_0222 param0->unk_30 = Text_AddPrinterWithParamsAndColor(¶m0->unk_1C, FONT_MESSAGE, param0->unk_38, 0, 0, param0->unk_34, TEXT_COLOR(1, 2, 0), NULL); - sub_0200E060(¶m0->unk_1C, 1, (1 + 9), 8); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1C, 1, (1 + 9), 8); Window_ScheduleCopyToVRAM(¶m0->unk_1C); Strbuf_Free(v0); } @@ -1696,7 +1696,7 @@ static BOOL ov64_0222F038 (const UnkStruct_ov64_0222F038 * param0) static void ov64_0222F050 (UnkStruct_ov64_0222F038 * param0) { - sub_0200E084(¶m0->unk_1C, 1); + Window_EraseMessageBox(¶m0->unk_1C, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_1C); } @@ -2418,7 +2418,7 @@ static void ov64_0222FA70 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222 v0.window = ¶m0->unk_E0; param0->unk_F8 = ListMenu_New(&v0, 0, 0, param3); - Window_Show(¶m0->unk_E0, 1, 1, 9); + Window_DrawStandardFrame(¶m0->unk_E0, 1, 1, 9); Window_ScheduleCopyToVRAM(¶m0->unk_E0); ov64_0222E880(param2, param1->unk_00, param1->unk_08.unk_04[v3], param3); @@ -2453,7 +2453,7 @@ static u32 ov64_0222FB24 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E ov64_0222FF18(param0); - Window_Clear(¶m0->unk_E0, 1); + Window_EraseStandardFrame(¶m0->unk_E0, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_E0); ListMenu_Free(param0->unk_F8, NULL, NULL); @@ -2575,7 +2575,7 @@ static void ov64_0222FE70 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222 param0->unk_D8 = Text_AddPrinterWithParamsAndColor(¶m0->unk_C4, FONT_MESSAGE, param0->unk_D4, 0, 0, param0->unk_DC, TEXT_COLOR(1, 2, 0), NULL); - sub_0200E060(¶m0->unk_C4, 1, (1 + 9), 8); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_C4, 1, (1 + 9), 8); Window_ScheduleCopyToVRAM(¶m0->unk_C4); Strbuf_Free(v0); } @@ -2591,7 +2591,7 @@ static BOOL ov64_0222FEFC (const UnkStruct_ov64_0222F0C4 * param0) static void ov64_0222FF18 (UnkStruct_ov64_0222F0C4 * param0) { - sub_0200E084(¶m0->unk_C4, 1); + Window_EraseMessageBox(¶m0->unk_C4, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_C4); Window_ScheduleCopyToVRAM(¶m0->unk_B4); } diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index b5ccc58c21..39e28eabe2 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -53,6 +53,7 @@ #include "poffin.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "rtc.h" #include "save_player.h" #include "savedata.h" @@ -68,7 +69,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02017728.h" @@ -1465,9 +1465,9 @@ static void ov65_0222ECA8 (UnkStruct_ov65_0222EBE0 * param0, NARC * param1) { int v1 = Options_Frame(SaveData_Options(param0->unk_160)); - sub_0200DD0C(v0, 2, (512 - (18 + 12)), 10, v1, 54); - sub_0200DAA4(v0, 2, ((512 - (18 + 12)) - 9), 11, 0, 54); - sub_0200DAA4(v0, 1, ((512 - (18 + 12)) - 9), 11, 0, 54); + LoadMessageBoxGraphics(v0, 2, (512 - (18 + 12)), 10, v1, 54); + LoadStandardWindowGraphics(v0, 2, ((512 - (18 + 12)) - 9), 11, 0, 54); + LoadStandardWindowGraphics(v0, 1, ((512 - (18 + 12)) - 9), 11, 0, 54); } } @@ -1516,7 +1516,7 @@ static void ov65_0222EE98 (UnkStruct_ov65_0222EBE0 * param0) int v0, v1; if (Window_IsInUse(¶m0->unk_350)) { - Window_Clear(¶m0->unk_350, 0); + Window_EraseStandardFrame(¶m0->unk_350, 0); Window_Remove(¶m0->unk_350); } @@ -1667,7 +1667,7 @@ static int ov65_0222F1A8 (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_04 = sub_0203871C(param0->unk_160, sizeof(UnkStruct_0207DFAC)); ov65_02232B58(param0, 23, 1); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); param0->unk_3A8 = 14; } else { param0->unk_3A8 = 34; @@ -1701,7 +1701,7 @@ static int ov65_0222F288 (UnkStruct_ov65_0222EBE0 * param0, int param1) if (v1 == 0xffffffff) { return param1; } else { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); if (v1 == 0) { @@ -1728,7 +1728,7 @@ static int ov65_0222F304 (UnkStruct_ov65_0222EBE0 * param0, int param1) Bg_SetPriority(2, 0); Bg_SetPriority(1, 1); Bg_SetPriority(0, 3); - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); if (v1 == 0) { @@ -1739,7 +1739,7 @@ static int ov65_0222F304 (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_04 = sub_0203871C(param0->unk_160, sizeof(UnkStruct_0207DFAC)); ov65_02232B58(param0, 23, 1); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); param0->unk_3C8 = 1; } else { param0->unk_3A8 = 34; @@ -1761,7 +1761,7 @@ static int ov65_0222F3DC (UnkStruct_ov65_0222EBE0 * param0, int param1) Bg_SetPriority(1, 1); Bg_SetPriority(3, 0); Bg_SetPriority(2, 0); - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); if (v1 == 0) { @@ -1769,7 +1769,7 @@ static int ov65_0222F3DC (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_04 = sub_0203871C(param0->unk_160, sizeof(UnkStruct_0207DFAC)); ov65_02232B58(param0, 23, 1); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); param0->unk_3C8 = 1; } else { param0->unk_3A8 = 34; @@ -1953,7 +1953,7 @@ static int ov65_0222F7AC (UnkStruct_ov65_0222EBE0 * param0, int param1) { if (gCoreSys.pressedKeys & (PAD_BUTTON_B | PAD_BUTTON_A)) { if (Window_IsInUse(¶m0->unk_360)) { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); } @@ -1984,7 +1984,7 @@ static int ov65_0222F808 (UnkStruct_ov65_0222EBE0 * param0, int param1) if (gCoreSys.pressedKeys & (PAD_BUTTON_B | PAD_BUTTON_A)) { if (Window_IsInUse(¶m0->unk_360)) { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); } @@ -2052,7 +2052,7 @@ static int ov65_0222F90C (UnkStruct_ov65_0222EBE0 * param0, int param1) } if (Window_IsInUse(¶m0->unk_350)) { - Window_Clear(¶m0->unk_350, 0); + Window_EraseStandardFrame(¶m0->unk_350, 0); Window_Remove(¶m0->unk_350); } @@ -2087,7 +2087,7 @@ static int ov65_0222F90C (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_04 = sub_0203871C(param0->unk_160, sizeof(UnkStruct_0207DFAC)); ov65_02232B58(param0, 23, 1); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); param0->unk_3A8 = 14; } @@ -2133,7 +2133,7 @@ asm static int ov65_0222FAA0 (UnkStruct_ov65_0222EBE0 * param0, int param1) lsl r1, r1, #2 add r0, r5, r1 sub r1, #0xea - bl sub_0200E7FC + bl Window_AddWaitDial mov r1, #0x62 lsl r1, r1, #2 str r0, [r5, r1] @@ -2281,7 +2281,7 @@ static int ov65_0222FCDC (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_3A8 = ov65_0222EBB8(); if (Window_IsInUse(¶m0->unk_360)) { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); } } @@ -2364,7 +2364,7 @@ static void ov65_0222FEEC (UnkStruct_ov65_0222EBE0 * param0) } if (Window_IsInUse(¶m0->unk_350)) { - Window_Clear(¶m0->unk_350, 0); + Window_EraseStandardFrame(¶m0->unk_350, 0); Window_Remove(¶m0->unk_350); } @@ -2372,7 +2372,7 @@ static void ov65_0222FEEC (UnkStruct_ov65_0222EBE0 * param0) Window_Add(param0->unk_15C, ¶m0->unk_350, 1, 1, 1, 28, 2, 13, (((512 - (18 + 12)) - 9) - (28 * 2))); Window_FillTilemap(¶m0->unk_350, 15); Window_ScheduleCopyToVRAM(¶m0->unk_350); - Window_Show(¶m0->unk_350, 0, ((512 - (18 + 12)) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_350, 0, ((512 - (18 + 12)) - 9), 11); } static int ov65_0222FFAC (UnkStruct_ov65_0222EBE0 * param0, int param1) @@ -3280,12 +3280,12 @@ static int ov65_02230E04 (UnkStruct_ov65_0222EBE0 * param0, int param1) } if (Window_IsInUse(¶m0->unk_380)) { - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); } Window_Add(param0->unk_15C, ¶m0->unk_380, 2, 16, 3, 15, v1 * 2, 13, ((((((512 - (18 + 12)) - 9) - 10) - (18 + 12 + 24)) - (27 * 4)) - (11 * 22)) - v1 * 2); - Window_Show(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); v2.choices = param0->unk_154; v2.window = ¶m0->unk_380; @@ -3311,7 +3311,7 @@ static int ov65_02230FBC (UnkStruct_ov65_0222EBE0 * param0, int param1) if (Text_IsPrinterActive(param0->unk_180) != 0) { if (0 != ov65_02230140(param0)) { param0->unk_3A8 = 19; - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, ¶m0->unk_3D4); StringList_Free(param0->unk_154); @@ -3355,7 +3355,7 @@ static int ov65_02230FBC (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232B58(param0, 103, 0); param0->unk_3A8 = 29; } else if ((v0 == 0) || (v0 == 1) || (v0 == 29)) { - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, ¶m0->unk_3D4); StringList_Free(param0->unk_154); @@ -3390,7 +3390,7 @@ static int ov65_02230FBC (UnkStruct_ov65_0222EBE0 * param0, int param1) break; } - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, ¶m0->unk_3D4); StringList_Free(param0->unk_154); @@ -3473,12 +3473,12 @@ static int ov65_0223128C (UnkStruct_ov65_0222EBE0 * param0, int param1) } if (Window_IsInUse(¶m0->unk_380)) { - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); } Window_Add(param0->unk_15C, ¶m0->unk_380, 2, 16, 9, 15, v1 * 2, 13, ((((((512 - (18 + 12)) - 9) - 10) - (18 + 12 + 24)) - (27 * 4)) - (11 * 22)) - v1 * 2); - Window_Show(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); v2.choices = param0->unk_154; v2.window = ¶m0->unk_380; @@ -3498,7 +3498,7 @@ static int ov65_02231440 (UnkStruct_ov65_0222EBE0 * param0, int param1) if (0 != ov65_02230140(param0)) { param0->unk_3A8 = 19; - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, ¶m0->unk_3D6[param0->unk_3DC]); StringList_Free(param0->unk_154); @@ -3545,7 +3545,7 @@ static int ov65_02231440 (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_0223500C(param0, v1); } - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, ¶m0->unk_3D6[param0->unk_3DC]); StringList_Free(param0->unk_154); @@ -3749,7 +3749,7 @@ static int ov65_022316F0 (UnkStruct_ov65_0222EBE0 * param0, int param1) } Window_Add(param0->unk_15C, ¶m0->unk_380, 2, 16, 11 + ((3 - v6) * 2), 15, v6 * 2, 13, ((((((512 - (18 + 12)) - 9) - 10) - (18 + 12 + 24)) - (27 * 4)) - (11 * 22))); - Window_Show(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_380, 1, ((512 - (18 + 12)) - 9), 11); v7.choices = param0->unk_154; v7.window = ¶m0->unk_380; @@ -3865,7 +3865,7 @@ static int ov65_02231A98 (UnkStruct_ov65_0222EBE0 * param0, int param1) v7 = ov65_0222E8D4(param0, v2); if (sub_020383E8()) { - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, NULL); StringList_Free(param0->unk_154); @@ -3994,7 +3994,7 @@ static int ov65_02231A98 (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232DC0(param0, v2 - 1); ov65_02232B58(param0, 17, 0); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); if (v1 != 1) { param0->unk_3A8 = 45; @@ -4029,7 +4029,7 @@ static int ov65_02231A98 (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232DFC(param0); } - Window_Clear(¶m0->unk_380, 0); + Window_EraseStandardFrame(¶m0->unk_380, 0); Window_Remove(¶m0->unk_380); ListMenu_Free(param0->unk_158, NULL, NULL); StringList_Free(param0->unk_154); @@ -4561,7 +4561,7 @@ static int ov65_0223278C (UnkStruct_ov65_0222EBE0 * param0, int param1) } else if (v1 == 0) { ov65_02232B58(param0, 138, 0); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); param0->unk_3E4 = 1; param0->unk_3A8 = 49; param0->unk_3BC = 30; @@ -4684,7 +4684,7 @@ static int ov65_0223294C (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232B58(param0, 17, 0); GF_ASSERT(param0->unk_188 == NULL); - param0->unk_188 = sub_0200E7FC(¶m0->unk_330, (512 - (18 + 12))); + param0->unk_188 = Window_AddWaitDial(¶m0->unk_330, (512 - (18 + 12))); if (v2 != 1) { param0->unk_3A8 = 45; @@ -4729,12 +4729,12 @@ static void ov65_02232B58 (UnkStruct_ov65_0222EBE0 * param0, int param1, BOOL pa ov65_02232F50(param0); if (Window_IsInUse(¶m0->unk_360)) { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); } if (Window_IsInUse(¶m0->unk_330)) { - sub_0200E084(¶m0->unk_330, 0); + Window_EraseMessageBox(¶m0->unk_330, 0); Window_Remove(¶m0->unk_330); } @@ -4755,7 +4755,7 @@ static void ov65_02232B58 (UnkStruct_ov65_0222EBE0 * param0, int param1, BOOL pa StringTemplate_Format(param0->unk_164, param0->unk_174, param0->unk_170); Window_FillTilemap(¶m0->unk_330, 15); - sub_0200E060(¶m0->unk_330, 1, (512 - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_330, 1, (512 - (18 + 12)), 10); RenderControlFlags_SetCanABSpeedUpPrint(1); RenderControlFlags_SetAutoScrollFlags(0); @@ -4769,12 +4769,12 @@ static void ov65_02232CA8 (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232F50(param0); if (Window_IsInUse(¶m0->unk_360)) { - sub_0200E084(¶m0->unk_360, 0); + Window_EraseMessageBox(¶m0->unk_360, 0); Window_Remove(¶m0->unk_360); } if (Window_IsInUse(¶m0->unk_330)) { - sub_0200E084(¶m0->unk_330, 0); + Window_EraseMessageBox(¶m0->unk_330, 0); Window_Remove(¶m0->unk_330); } @@ -4790,7 +4790,7 @@ static void ov65_02232CA8 (UnkStruct_ov65_0222EBE0 * param0, int param1) StringTemplate_Format(param0->unk_164, param0->unk_174, param0->unk_170); Window_FillTilemap(¶m0->unk_360, 15); - Window_Show(¶m0->unk_360, 1, ((512 - (18 + 12)) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_360, 1, ((512 - (18 + 12)) - 9), 11); param0->unk_180 = Text_AddPrinterWithParams(¶m0->unk_360, 1, param0->unk_174, 0, 0, 0xff, NULL); Window_ScheduleCopyToVRAM(¶m0->unk_360); @@ -4819,7 +4819,7 @@ static void ov65_02232DFC (UnkStruct_ov65_0222EBE0 * param0) } if (Window_IsInUse(¶m0->unk_330)) { - sub_0200E084(¶m0->unk_330, 0); + Window_EraseMessageBox(¶m0->unk_330, 0); Window_Remove(¶m0->unk_330); } } @@ -4891,12 +4891,12 @@ static BOOL ov65_02232F30 (UnkStruct_ov65_0222EBE0 * param0) static void ov65_02232F50 (UnkStruct_ov65_0222EBE0 * param0) { if (param0->unk_188) { - sub_0200EBC8(param0->unk_188); + DestroyWaitDialTaskOnly(param0->unk_188); param0->unk_188 = NULL; if (Window_IsInUse(¶m0->unk_330)) { - sub_0200E084(¶m0->unk_330, 0); + Window_EraseMessageBox(¶m0->unk_330, 0); Window_Remove(¶m0->unk_330); } } diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index 2229c18307..2cdaec0413 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -39,6 +39,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "save_player.h" #include "sprite_resource.h" #include "strbuf.h" @@ -49,7 +50,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -747,20 +747,20 @@ static void ov65_02236A28(UnkStruct_ov65_02236840 *param0, const UnkStruct_0207D v0 = Options_Frame(SaveData_Options(param1->unk_08)); - sub_0200DD0C(param0->unk_00, 1, 1, 2, v0, param2); - sub_0200DAA4(param0->unk_00, 1, (1 + (18 + 12)), 3, 0, param2); - sub_0200DAA4(param0->unk_00, 2, (0 + (24 * 2)), 4, 0, param2); + LoadMessageBoxGraphics(param0->unk_00, 1, 1, 2, v0, param2); + LoadStandardWindowGraphics(param0->unk_00, 1, (1 + (18 + 12)), 3, 0, param2); + LoadStandardWindowGraphics(param0->unk_00, 2, (0 + (24 * 2)), 4, 0, param2); Window_Add(param0->unk_00, ¶m0->unk_1F0, 1, 2, 19, 27, 4, 1, ((1 + (18 + 12)) + 9)); Window_FillTilemap(¶m0->unk_1F0, 15); - sub_0200E060(¶m0->unk_1F0, 1, 1, 2); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1F0, 1, 1, 2); Window_Add(param0->unk_00, ¶m0->unk_200, 1, 1, 1, 27, 2, 1, (((1 + (18 + 12)) + 9) + (27 * 4))); Window_FillTilemap(¶m0->unk_200, 15); - Window_Show(¶m0->unk_200, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(¶m0->unk_200, 1, (1 + (18 + 12)), 3); Window_Add(param0->unk_00, ¶m0->unk_210, 1, 2, 16, 28, 2, 1, ((((1 + (18 + 12)) + 9) + (27 * 4)) + (27 * 2))); Window_FillTilemap(¶m0->unk_210, 0); Window_Add(param0->unk_00, ¶m0->unk_220, 1, 1, 5, 20, 8, 1, (((((1 + (18 + 12)) + 9) + (27 * 4)) + (27 * 2)) + (28 * 2))); Window_FillTilemap(¶m0->unk_220, 15); - Window_Show(¶m0->unk_220, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(¶m0->unk_220, 1, (1 + (18 + 12)), 3); Window_Add(param0->unk_00, ¶m0->unk_230, 1, 23, 5, 7, 5, 1, ((((((1 + (18 + 12)) + 9) + (27 * 4)) + (27 * 2)) + (28 * 2)) + (20 * 8))); Window_FillTilemap(¶m0->unk_230, 15); } @@ -769,14 +769,14 @@ static void ov65_02236B90(UnkStruct_ov65_02236840 *param0, u32 param1) { ov65_02236F38(param0); - sub_0200E084(¶m0->unk_1F0, 0); + Window_EraseMessageBox(¶m0->unk_1F0, 0); Window_Remove(¶m0->unk_1F0); - Window_Clear(¶m0->unk_200, 0); + Window_EraseStandardFrame(¶m0->unk_200, 0); Window_Remove(¶m0->unk_200); Window_Remove(¶m0->unk_210); - Window_Clear(¶m0->unk_220, 0); + Window_EraseStandardFrame(¶m0->unk_220, 0); Window_Remove(¶m0->unk_220); - Window_Clear(¶m0->unk_230, 0); + Window_EraseStandardFrame(¶m0->unk_230, 0); Window_Remove(¶m0->unk_230); if (param0->unk_240 != NULL) { @@ -909,7 +909,7 @@ static void ov65_02236E50(UnkStruct_ov65_02236840 *param0, const UnkStruct_0207D v1 = Options_Frame(SaveData_Options(param1->unk_08)); - sub_0200DD0C(param0->unk_00, 1, 1, 2, v1, param4); + LoadMessageBoxGraphics(param0->unk_00, 1, 1, 2, v1, param4); param0->unk_15 = param3; } @@ -968,7 +968,7 @@ static void ov65_02236F70(UnkStruct_ov65_02236840 *param0, const UnkStruct_0207D Window_FillTilemap(¶m0->unk_230, 15); Text_AddPrinterWithParamsAndColor(¶m0->unk_230, FONT_SYSTEM, v1, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); - Window_Show(¶m0->unk_230, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(¶m0->unk_230, 1, (1 + (18 + 12)), 3); Window_ScheduleCopyToVRAM(¶m0->unk_230); Strbuf_Free(v0); @@ -977,7 +977,7 @@ static void ov65_02236F70(UnkStruct_ov65_02236840 *param0, const UnkStruct_0207D static void ov65_02237018(UnkStruct_ov65_02236840 *param0) { - Window_Clear(¶m0->unk_230, 1); + Window_EraseStandardFrame(¶m0->unk_230, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_230); } @@ -1493,7 +1493,7 @@ static void ov65_02237860(UnkStruct_ov65_022367A8 *param0, u32 param1) static void ov65_0223789C(UnkStruct_ov65_022367A8 *param0) { GF_ASSERT(param0->unk_30.unk_24C == NULL); - param0->unk_30.unk_24C = sub_0200E7FC(¶m0->unk_30.unk_1F0, 1); + param0->unk_30.unk_24C = Window_AddWaitDial(¶m0->unk_30.unk_1F0, 1); } static void ov65_022378C4(UnkStruct_ov65_022367A8 *param0, const UnkStruct_0207DE04 *param1, u32 param2) @@ -1504,12 +1504,12 @@ static void ov65_022378C4(UnkStruct_ov65_022367A8 *param0, const UnkStruct_0207D return; } - DeleteWaitDial(param0->unk_30.unk_24C); + DestroyWaitDial(param0->unk_30.unk_24C); param0->unk_30.unk_24C = NULL; v0 = Options_Frame(SaveData_Options(param1->unk_08)); - sub_0200DD0C(param0->unk_30.unk_00, 1, 1, 2, v0, param2); + LoadMessageBoxGraphics(param0->unk_30.unk_00, 1, 1, 2, v0, param2); } static void ov65_02237908(UnkStruct_ov65_022367A8 *param0, UnkStruct_ov65_02237908 *param1) diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index e3e9e603e5..6d6204ddd8 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -29,6 +29,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "rtc.h" #include "save_player.h" #include "savedata.h" @@ -36,7 +37,6 @@ #include "string_template.h" #include "text.h" #include "unk_020041CC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_020366A0.h" @@ -581,8 +581,8 @@ static void ov67_0225CE30(UnkStruct_ov67_0225D154 *param0, u32 param1) Font_LoadTextPalette(0, 12 * 32, param1); Font_LoadScreenIndicatorsPalette(0, 11 * 32, param1); - sub_0200DAA4(param0->unk_0C, Unk_ov67_0225D3F4[1], (1 + (18 + 12)), 14, 0, param1); - sub_0200DD0C(param0->unk_0C, Unk_ov67_0225D3F4[1], 1, 13, v2, param1); + LoadStandardWindowGraphics(param0->unk_0C, Unk_ov67_0225D3F4[1], (1 + (18 + 12)), 14, 0, param1); + LoadMessageBoxGraphics(param0->unk_0C, Unk_ov67_0225D3F4[1], 1, 13, v2, param1); } { @@ -650,9 +650,9 @@ static void ov67_0225D210(UnkStruct_ov67_0225D210 *param0, u32 param1) Text_AddPrinterWithParams(¶m0->unk_08, FONT_MESSAGE, param0->unk_18, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); if (param0->unk_20 == 0) { - Window_Show(¶m0->unk_08, 1, (1 + (18 + 12)), 14); + Window_DrawStandardFrame(¶m0->unk_08, 1, (1 + (18 + 12)), 14); } else { - sub_0200E060(¶m0->unk_08, 1, 1, 13); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08, 1, 1, 13); } Window_ScheduleCopyToVRAM(¶m0->unk_08); @@ -665,14 +665,14 @@ static void ov67_0225D294(UnkStruct_ov67_0225D210 *param0) } if (param0->unk_20 == 0) { - Window_Clear(¶m0->unk_08, 1); + Window_EraseStandardFrame(¶m0->unk_08, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_08); } else { if (param0->unk_24) { ov67_0225D310(param0); } - sub_0200E084(¶m0->unk_08, 1); + Window_EraseMessageBox(¶m0->unk_08, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_08); } } @@ -681,7 +681,7 @@ static void ov67_0225D2EC(UnkStruct_ov67_0225D210 *param0) { if (param0->unk_20 == 1) { GF_ASSERT(param0->unk_24 == NULL); - param0->unk_24 = sub_0200E7FC(¶m0->unk_08, 1); + param0->unk_24 = Window_AddWaitDial(¶m0->unk_08, 1); } } @@ -689,7 +689,7 @@ static void ov67_0225D310(UnkStruct_ov67_0225D210 *param0) { if (param0->unk_20 == 1) { GF_ASSERT(param0->unk_24 != NULL); - DeleteWaitDial(param0->unk_24); + DestroyWaitDial(param0->unk_24); param0->unk_24 = NULL; } } diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index 835c58302f..15160a9293 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -31,6 +31,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -42,7 +43,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -489,10 +489,10 @@ static void ov68_0225C9A0(UnkStruct_ov68_0225C91C *param0, Options *param1, u32 { u8 v1 = Options_Frame(param1); - sub_0200DD0C(param0->unk_00, 1, 1, 5, v1, param2); + LoadMessageBoxGraphics(param0->unk_00, 1, 1, 5, v1, param2); } - sub_0200DAA4(param0->unk_00, 1, (1 + (18 + 12)), 6, 0, param2); + LoadStandardWindowGraphics(param0->unk_00, 1, (1 + (18 + 12)), 6, 0, param2); { Graphics_LoadTilesToBgLayer(169, 2, param0->unk_00, 4, 0, 0, 0, param2); @@ -936,7 +936,7 @@ static void ov68_0225D1B4(UnkStruct_ov68_0225D128 *param0, const Strbuf *param1) Window_FillTilemap(¶m0->unk_08, 15); Strbuf_Copy(param0->unk_18, param1); param0->unk_00 = Text_AddPrinterWithParamsAndColor(¶m0->unk_08, FONT_MESSAGE, param0->unk_18, 0, 0, param0->unk_04, TEXT_COLOR(1, 2, 15), NULL); - sub_0200E060(¶m0->unk_08, 1, 1, 5); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08, 1, 1, 5); } static void ov68_0225D218(UnkStruct_ov68_0225D128 *param0, const Strbuf *param1) @@ -948,20 +948,20 @@ static void ov68_0225D218(UnkStruct_ov68_0225D128 *param0, const Strbuf *param1) Window_FillTilemap(¶m0->unk_08, 15); Strbuf_Copy(param0->unk_18, param1); Text_AddPrinterWithParamsAndColor(¶m0->unk_08, FONT_MESSAGE, param0->unk_18, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); - sub_0200E060(¶m0->unk_08, 1, 1, 5); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08, 1, 1, 5); Window_ScheduleCopyToVRAM(¶m0->unk_08); } static void ov68_0225D284(UnkStruct_ov68_0225D128 *param0) { GF_ASSERT(param0->unk_1C == NULL); - param0->unk_1C = sub_0200E7FC(¶m0->unk_08, 1); + param0->unk_1C = Window_AddWaitDial(¶m0->unk_08, 1); } static void ov68_0225D2A0(UnkStruct_ov68_0225D128 *param0) { if (param0->unk_1C != NULL) { - DeleteWaitDial(param0->unk_1C); + DestroyWaitDial(param0->unk_1C); param0->unk_1C = NULL; } } @@ -983,7 +983,7 @@ static void ov68_0225D2CC(UnkStruct_ov68_0225D128 *param0) ov68_0225D2A0(param0); - sub_0200E084(¶m0->unk_08, 1); + Window_EraseMessageBox(¶m0->unk_08, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_08); } diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 585a9aa062..d3b9715908 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -33,6 +33,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -45,7 +46,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015920.h" #include "unk_02017728.h" @@ -1437,14 +1437,14 @@ static void ov69_0225D3A4(UnkStruct_ov69_0225D35C *param0, Options *param1, u32 Font_LoadScreenIndicatorsPalette(0, 1 * 0x20, param2); Font_LoadScreenIndicatorsPalette(4, 11 * 0x20, param2); - sub_0200DAA4(param0->unk_00, 1, (1 + (18 + 12)), 0, 0, param2); - sub_0200DAA4(param0->unk_00, 1, (1 + (18 + 12)), 0, 0, param2); + LoadStandardWindowGraphics(param0->unk_00, 1, (1 + (18 + 12)), 0, 0, param2); + LoadStandardWindowGraphics(param0->unk_00, 1, (1 + (18 + 12)), 0, 0, param2); { u8 v1 = Options_Frame(param1); - sub_0200DD0C(param0->unk_00, 4, 10, 10, v1, param2); - sub_0200DD0C(param0->unk_00, 1, 1, 2, v1, param2); + LoadMessageBoxGraphics(param0->unk_00, 4, 10, 10, v1, param2); + LoadMessageBoxGraphics(param0->unk_00, 1, 1, 2, v1, param2); } Bg_MaskPalette(0, 0x72ca); @@ -1843,7 +1843,7 @@ static void ov69_0225DBB4(UnkStruct_ov69_0225DC48 *param0, UnkStruct_ov69_0225D3 Font_Free(FONT_SUBSCREEN); } - Window_Show(¶m0->unk_1C, 0, (1 + (18 + 12)), 0); + Window_DrawStandardFrame(¶m0->unk_1C, 0, (1 + (18 + 12)), 0); } static void ov69_0225DC48(UnkStruct_ov69_0225DC48 *param0) @@ -1926,14 +1926,14 @@ static int ov69_0225DD10(const UnkStruct_ov69_0225DC48 *param0, u32 param1) static void ov69_0225DD2C(UnkStruct_ov69_0225DC48 *param0) { - Window_Clear(¶m0->unk_1C, 1); + Window_EraseStandardFrame(¶m0->unk_1C, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_1C); } static void ov69_0225DD44(UnkStruct_ov69_0225DC48 *param0) { Window_ScheduleCopyToVRAM(¶m0->unk_1C); - Window_Show(¶m0->unk_1C, 0, (1 + (18 + 12)), 0); + Window_DrawStandardFrame(¶m0->unk_1C, 0, (1 + (18 + 12)), 0); } static void ov69_0225DD60(UnkStruct_ov69_0225DDC8 *param0, UnkStruct_ov69_0225D35C *param1, UnkStruct_ov69_0225EF54 *param2, SaveData *param3, u32 param4) @@ -1971,7 +1971,7 @@ static void ov69_0225DDC8(UnkStruct_ov69_0225DDC8 *param0) static void ov69_0225DDFC(UnkStruct_ov69_0225DDC8 *param0) { Window_FillTilemap(¶m0->unk_10, 15); - sub_0200E060(¶m0->unk_10, 1, 1, 2); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_10, 1, 1, 2); Window_ScheduleCopyToVRAM(¶m0->unk_10); param0->unk_04 = Text_AddPrinterWithParams(¶m0->unk_10, FONT_MESSAGE, param0->unk_0C, 0, 0, param0->unk_08, NULL); @@ -2006,7 +2006,7 @@ static u32 ov69_0225DE40(UnkStruct_ov69_0225DDC8 *param0) static void ov69_0225DEA0(UnkStruct_ov69_0225DDC8 *param0) { sub_02015A54(param0->unk_20); - sub_0200E084(¶m0->unk_10, 1); + Window_EraseMessageBox(¶m0->unk_10, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_10); } @@ -2033,7 +2033,7 @@ static void ov69_0225DEC0(UnkStruct_ov69_0225E084 *param0, UnkStruct_ov69_0225D3 v1 = ov69_0225EF74(param2, 0); Text_AddPrinterWithParams(¶m0->unk_1A8, FONT_MESSAGE, v1, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); - sub_0200E060(¶m0->unk_1A8, 0, 10, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1A8, 0, 10, 10); } ov69_0225E590(param0, param1, param3); @@ -2102,14 +2102,14 @@ static void ov69_0225E00C(UnkStruct_ov69_0225E084 *param0, UnkStruct_ov69_0225EF static void ov69_0225E084(UnkStruct_ov69_0225E084 *param0) { - sub_0200E084(¶m0->unk_1A8, 1); + Window_EraseMessageBox(¶m0->unk_1A8, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_1A8); } static void ov69_0225E0A0(UnkStruct_ov69_0225E084 *param0) { Window_ScheduleCopyToVRAM(¶m0->unk_1A8); - sub_0200E060(¶m0->unk_1A8, 1, 10, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1A8, 1, 10, 10); } static BOOL ov69_0225E0C0(UnkStruct_ov69_0225E084 *param0, const UnkStruct_ov69_0225E0C0 *param1) diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index 05a1788e7f..29e3002d8f 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -52,6 +52,7 @@ #include "overlay_manager.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -67,7 +68,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -1294,9 +1294,9 @@ static void ov70_0225E4EC(UnkStruct_ov70_0225E4EC *param0, SaveData *param1, u32 Font_LoadTextPalette(0, 5 * 32, param2); Font_LoadScreenIndicatorsPalette(0, 4 * 32, param2); - sub_0200DAA4(param0->unk_00, Unk_ov70_0226D5CC[0], ((1 + (18 + 12)) + ((18 + 12) + 24)), 3, 0, param2); - sub_0200DD0C(param0->unk_00, Unk_ov70_0226D5CC[0], 1, 1, v2, param2); - sub_0200E2A4(param0->unk_00, Unk_ov70_0226D5CC[0], (1 + (18 + 12)), 2, 3, 0, param2); + LoadStandardWindowGraphics(param0->unk_00, Unk_ov70_0226D5CC[0], ((1 + (18 + 12)) + ((18 + 12) + 24)), 3, 0, param2); + LoadMessageBoxGraphics(param0->unk_00, Unk_ov70_0226D5CC[0], 1, 1, v2, param2); + LoadSignpostContentGraphics(param0->unk_00, Unk_ov70_0226D5CC[0], (1 + (18 + 12)), 2, 3, 0, param2); Graphics_LoadPalette(186, 90, 0, 2 * 32, 32, param2); } @@ -1550,7 +1550,7 @@ static void ov70_0225EA44(UnkStruct_ov70_0225E9C8 *param0, const Strbuf *param1) param0->unk_10 = Text_AddPrinterWithParamsAndColor(¶m0->unk_00, FONT_MESSAGE, param0->unk_18, 0, 0, param0->unk_14, TEXT_COLOR(1, 2, 15), NULL); - sub_0200E060(¶m0->unk_00, 1, 1, 1); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_00, 1, 1, 1); } static void ov70_0225EAA4(UnkStruct_ov70_0225E9C8 *param0, const Strbuf *param1) @@ -1562,20 +1562,20 @@ static void ov70_0225EAA4(UnkStruct_ov70_0225E9C8 *param0, const Strbuf *param1) Window_FillTilemap(¶m0->unk_00, 15); Strbuf_Copy(param0->unk_18, param1); Text_AddPrinterWithParamsAndColor(¶m0->unk_00, FONT_MESSAGE, param0->unk_18, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); - sub_0200E060(¶m0->unk_00, 1, 1, 1); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_00, 1, 1, 1); Window_ScheduleCopyToVRAM(¶m0->unk_00); } static void ov70_0225EB08(UnkStruct_ov70_0225E9C8 *param0) { GF_ASSERT(param0->unk_1C == NULL); - param0->unk_1C = sub_0200E7FC(¶m0->unk_00, 1); + param0->unk_1C = Window_AddWaitDial(¶m0->unk_00, 1); } static void ov70_0225EB24(UnkStruct_ov70_0225E9C8 *param0) { if (param0->unk_1C != NULL) { - DeleteWaitDial(param0->unk_1C); + DestroyWaitDial(param0->unk_1C); param0->unk_1C = NULL; } } @@ -1583,7 +1583,7 @@ static void ov70_0225EB24(UnkStruct_ov70_0225E9C8 *param0) static void ov70_0225EB38(UnkStruct_ov70_0225E9C8 *param0) { if (param0->unk_1C != NULL) { - sub_0200EBC8(param0->unk_1C); + DestroyWaitDialTaskOnly(param0->unk_1C); param0->unk_1C = NULL; } } @@ -1614,7 +1614,7 @@ static void ov70_0225EB74(UnkStruct_ov70_0225E9C8 *param0) ov70_0225EB38(param0); - sub_0200E084(¶m0->unk_00, 1); + Window_EraseMessageBox(¶m0->unk_00, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_00); } @@ -1640,7 +1640,7 @@ static void ov70_0225EBC4(UnkStruct_ov70_0225E9C8 *param0, const Strbuf *param1) param0->unk_10 = Text_AddPrinterWithParams(¶m0->unk_00, FONT_MESSAGE, param0->unk_18, 0, 0, param0->unk_14, NULL); - sub_0200E69C(¶m0->unk_00, 1, (1 + (18 + 12)), 2, 3); + Window_DrawSignpost(¶m0->unk_00, 1, (1 + (18 + 12)), 2, 3); } static void ov70_0225EC20(UnkStruct_ov70_0225EC20 *param0, UnkStruct_ov70_0225E4EC *param1, u32 param2) @@ -1760,7 +1760,7 @@ static void ov70_0225EE30(UnkStruct_ov70_0225EC20 *param0, const ListMenuTemplat Window_Add(param2->unk_00, ¶m0->unk_20, Unk_ov70_0226D5CC[0], param6, param7, param8, param1->maxDisplay * 2, 5, ((((1 + (18 + 12)) + ((18 + 12) + 24)) + 9) + (27 * 4))); Window_FillTilemap(¶m0->unk_20, 15); - Window_Show(¶m0->unk_20, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); + Window_DrawStandardFrame(¶m0->unk_20, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); param0->unk_30 = ListMenu_New(¶m0->unk_00, param3, param4, param5); @@ -1802,7 +1802,7 @@ static void ov70_0225EF14(UnkStruct_ov70_0225EC20 *param0, u16 *param1, u16 *par param0->unk_30 = NULL; - Window_Clear(¶m0->unk_20, 1); + Window_EraseStandardFrame(¶m0->unk_20, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_20); Window_Remove(¶m0->unk_20); @@ -1863,7 +1863,7 @@ static void ov70_0225EFD8(UnkStruct_ov70_0225EFD4 *param0) static void ov70_0225EFE0(UnkStruct_ov70_0225EFD4 *param0, UnkStruct_ov70_0225E4EC *param1, u32 param2, u8 param3, u8 param4, u8 param5, u8 param6) { Window_Add(param1->unk_00, ¶m0->unk_00, Unk_ov70_0226D5CC[0], param3, param4, param5, param6, 5, ((((1 + (18 + 12)) + ((18 + 12) + 24)) + 9) + (27 * 4))); - Window_Show(¶m0->unk_00, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); + Window_DrawStandardFrame(¶m0->unk_00, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); Window_FillTilemap(¶m0->unk_00, 15); Window_ScheduleCopyToVRAM(¶m0->unk_00); } @@ -1871,7 +1871,7 @@ static void ov70_0225EFE0(UnkStruct_ov70_0225EFD4 *param0, UnkStruct_ov70_0225E4 static void ov70_0225F024(UnkStruct_ov70_0225EFD4 *param0) { if (Window_IsInUse(¶m0->unk_00) == 1) { - Window_Clear(¶m0->unk_00, 1); + Window_EraseStandardFrame(¶m0->unk_00, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_00); Window_Remove(¶m0->unk_00); } @@ -1927,7 +1927,7 @@ static void ov70_0225F144(UnkStruct_ov70_0225F114 *param0) static void ov70_0225F14C(UnkStruct_ov70_0225F114 *param0, const Strbuf *param1) { Text_AddPrinterWithParamsAndColor(¶m0->unk_00, FONT_SYSTEM, param1, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); - Window_Show(¶m0->unk_00, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); + Window_DrawStandardFrame(¶m0->unk_00, 1, ((1 + (18 + 12)) + ((18 + 12) + 24)), 3); Window_ScheduleCopyToVRAM(¶m0->unk_00); } diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index f8ac7d3d66..64f7153598 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -31,6 +31,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -43,7 +44,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02015920.h" @@ -451,8 +451,8 @@ static void ov72_0223DCA8(UnkStruct_ov72_0223DB98 *param0, NARC *param1) Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 5, v0, 2, 0, 32 * 24 * 2, 1, 39); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 4, v0, 5, 0, 32 * 8 * 0x20, 1, 39); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 6, v0, 5, 0, 32 * 24 * 2, 1, 39); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_0C), 39); - sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 39); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_0C), 39); + LoadStandardWindowGraphics(v0, 0, 1 + (18 + 12), 11, 0, 39); } static void ov72_0223DDA8(void) @@ -765,7 +765,7 @@ static int ov72_0223E488(UnkStruct_ov72_0223DB98 *param0, int param1) case 1: GameRecords_IncrementTrainerScore(param0->records, TRAINER_SCORE_EVENT_UNK_04); GameRecords_IncrementRecordValue(param0->records, RECORD_UNK_114); - sub_0200E084(¶m0->unk_338, 1); + Window_EraseMessageBox(¶m0->unk_338, 1); sub_02015A54(param0->unk_5D00); sub_0200F174(0, 0, 0, 0x0, 16, 1, 39); return 2; @@ -773,7 +773,7 @@ static int ov72_0223E488(UnkStruct_ov72_0223DB98 *param0, int param1) case 2: param0->unk_370 = 4; ov72_0223E3A8(param0->unk_2B4, 0); - sub_0200E084(¶m0->unk_338, 1); + Window_EraseMessageBox(¶m0->unk_338, 1); sub_02015A54(param0->unk_5D00); break; } @@ -792,14 +792,14 @@ static int ov72_0223E528(UnkStruct_ov72_0223DB98 *param0, int param1) case 1: param0->unk_370 = 1; - sub_0200E084(¶m0->unk_338, 1); + Window_EraseMessageBox(¶m0->unk_338, 1); sub_02015A54(param0->unk_5D00); Window_FillTilemap(¶m0->unk_328, 0x202); Window_CopyToVRAM(¶m0->unk_328); break; case 2: param0->unk_370 = 1; - sub_0200E084(¶m0->unk_338, 1); + Window_EraseMessageBox(¶m0->unk_338, 1); sub_02015A54(param0->unk_5D00); break; } @@ -1107,7 +1107,7 @@ static void ov72_0223E930(UnkStruct_ov72_0223DB98 *param0, int param1) StringTemplate_Format(param0->unk_10, param0->unk_34, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_338, 0xf0f); - sub_0200E060(¶m0->unk_338, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_338, 0, 1, 10); param0->unk_38 = Text_AddPrinterWithParams(¶m0->unk_338, FONT_MESSAGE, param0->unk_34, 0, 0, Options_TextFrameDelay(param0->unk_0C), NULL); } diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 2630407dd5..b85129a247 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -23,6 +23,7 @@ #include "palette.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "savedata_misc.h" @@ -36,7 +37,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_0201567C.h" @@ -359,8 +359,8 @@ static void ov73_021D1058(UnkStruct_ov73_021D1058 *param0) Bg_InitFromTemplate(param0->unk_18, 3, &v2, 0); Bg_ClearTilemap(param0->unk_18, 3); - sub_0200DD0C(param0->unk_18, 0, (0x400 - (18 + 12)), 4, 0, param0->unk_00); - sub_0200DAA4(param0->unk_18, 0, ((0x400 - (18 + 12)) - 9), 3, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_18, 0, (0x400 - (18 + 12)), 4, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_18, 0, ((0x400 - (18 + 12)) - 9), 3, 0, param0->unk_00); Font_LoadTextPalette(0, 5 * (2 * 16), param0->unk_00); Font_LoadScreenIndicatorsPalette(0, 6 * (2 * 16), param0->unk_00); } @@ -698,7 +698,7 @@ static BOOL ov73_021D1510(UnkStruct_ov73_021D1058 *param0, u32 param1, int param case 0: Window_AddFromTemplate(param0->unk_18, ¶m0->unk_1C, &Unk_ov72_021D37EC); Window_FillRectWithColor(¶m0->unk_1C, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_1C, 0, (0x400 - (18 + 12)), 4); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1C, 0, (0x400 - (18 + 12)), 4); RenderControlFlags_SetCanABSpeedUpPrint(1); RenderControlFlags_SetAutoScrollFlags(0); @@ -793,7 +793,7 @@ static BOOL ov73_021D1648(UnkStruct_ov73_021D1058 *param0, int param1, int param param0->unk_40 = ListMenu_New(&v1, 0, 0, param0->unk_00); - Window_Show(v1.window, 1, ((0x400 - (18 + 12)) - 9), 3); + Window_DrawStandardFrame(v1.window, 1, ((0x400 - (18 + 12)) - 9), 3); Window_CopyToVRAM(¶m0->unk_30); param0->unk_2C = 1; @@ -809,7 +809,7 @@ static BOOL ov73_021D1648(UnkStruct_ov73_021D1058 *param0, int param1, int param break; } - Window_Clear(¶m0->unk_30, 0); + Window_EraseStandardFrame(¶m0->unk_30, 0); Window_Remove(¶m0->unk_30); ListMenu_Free(param0->unk_40, NULL, NULL); StringList_Free(param0->unk_44); diff --git a/src/overlay074/ov74_021D0D80.c b/src/overlay074/ov74_021D0D80.c index 1658b42e4e..eeb73065a0 100644 --- a/src/overlay074/ov74_021D0D80.c +++ b/src/overlay074/ov74_021D0D80.c @@ -20,12 +20,12 @@ #include "narc.h" #include "overlay_manager.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -244,7 +244,7 @@ static void ov74_021D1118(void *param0) UnkStruct_ov74_021D0D80 *v0 = param0; if (v0->unk_10_21) { - sub_0200DD0C(v0->unk_14, 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15, v0->unk_5C[5].unk_02, v0->unk_00); + LoadMessageBoxGraphics(v0->unk_14, 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15, v0->unk_5C[5].unk_02, v0->unk_00); v0->unk_10_21 = 0; } @@ -498,8 +498,8 @@ static void ov74_021D14F4(UnkStruct_ov74_021D0D80 *param0) Window_Add(param0->unk_14, ¶m0->unk_2C[0], 1, 1, 0, 12, 2, 13, 10); Window_Add(param0->unk_14, ¶m0->unk_2C[1], 1, 1, 3, 30, 14, 13, (10 + 12 * 2)); Window_Add(param0->unk_14, ¶m0->unk_2C[2], 1, 2, 19, 27, 4, 12, ((10 + 12 * 2) + 30 * 14)); - sub_0200DAA4(param0->unk_14, 1, (((10 + 12 * 2) + 30 * 14) + 27 * 4), 14, 0, param0->unk_00); - sub_0200DD0C(param0->unk_14, 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15, param0->unk_18.unk_00_10, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_14, 1, (((10 + 12 * 2) + 30 * 14) + 27 * 4), 14, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_14, 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15, param0->unk_18.unk_00_10, param0->unk_00); Font_LoadTextPalette(0, 13 * 32, param0->unk_00); Font_LoadTextPalette(4, 13 * 32, param0->unk_00); @@ -513,16 +513,16 @@ static void ov74_021D14F4(UnkStruct_ov74_021D0D80 *param0) Window_ClearTilemap(&(param0->unk_2C[1])); Window_ClearTilemap(&(param0->unk_2C[0])); - Window_Show(¶m0->unk_2C[1], 1, (((10 + 12 * 2) + 30 * 14) + 27 * 4), 14); - sub_0200E060(¶m0->unk_2C[2], 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15); + Window_DrawStandardFrame(¶m0->unk_2C[1], 1, (((10 + 12 * 2) + 30 * 14) + 27 * 4), 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_2C[2], 1, ((((10 + 12 * 2) + 30 * 14) + 27 * 4) + 9), 15); } static void ov74_021D1624(UnkStruct_ov74_021D0D80 *param0) { u16 v0; - Window_Clear(&(param0->unk_2C[1]), 0); - sub_0200E084(&(param0->unk_2C[2]), 0); + Window_EraseStandardFrame(&(param0->unk_2C[1]), 0); + Window_EraseMessageBox(&(param0->unk_2C[2]), 0); for (v0 = 0; v0 < 3; v0++) { Window_ClearAndCopyToVRAM(&(param0->unk_2C[v0])); diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index 76f6726426..0bc97fe197 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -28,6 +28,7 @@ #include "palette.h" #include "pokemon_icon.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" @@ -35,7 +36,6 @@ #include "unk_02005474.h" #include "unk_0200A784.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014A84.h" #include "unk_02017728.h" @@ -265,7 +265,7 @@ static int ov75_021D0FA0(UnkStruct_ov75_021D1184 *param0) switch (param0->unk_08) { case 0: - sub_0200E060(¶m0->unk_44[5], 1, 1 + 9, UnkEnum_ov75_021D1598_06); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_44[5], 1, 1 + 9, UnkEnum_ov75_021D1598_06); Window_FillTilemap(&(param0->unk_44[5]), ((15 << 4) | 15)); v0 = Strbuf_Init((19 * 2 * 2), param0->unk_00); @@ -280,7 +280,7 @@ static int ov75_021D0FA0(UnkStruct_ov75_021D1184 *param0) return 0; } - sub_0200E084(¶m0->unk_44[5], 1); + Window_EraseMessageBox(¶m0->unk_44[5], 1); Window_ClearAndCopyToVRAM(&(param0->unk_44[5])); param0->unk_08 = 0; @@ -323,7 +323,7 @@ static int ov75_021D108C(UnkStruct_ov75_021D1184 *param0) case 0: param0->unk_13 = 1; - sub_0200E060(¶m0->unk_44[5], 1, 1 + 9, UnkEnum_ov75_021D1598_06); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_44[5], 1, 1 + 9, UnkEnum_ov75_021D1598_06); Window_FillTilemap(&(param0->unk_44[5]), ((15 << 4) | 15)); v1 = Strbuf_Init((19 * 2 * 2), param0->unk_00); @@ -351,7 +351,7 @@ static int ov75_021D108C(UnkStruct_ov75_021D1184 *param0) return 0; } - sub_0200E084(¶m0->unk_44[5], 1); + Window_EraseMessageBox(¶m0->unk_44[5], 1); Window_ClearAndCopyToVRAM(&(param0->unk_44[5])); param0->unk_08 = 0; @@ -705,8 +705,8 @@ static void ov75_021D1598(UnkStruct_ov75_021D1184 *param0) v8 = 0 + param0->unk_1C->unk_0F; v5 = NARC_ctor(NARC_INDEX_GRAPHIC__MAIL_GRA, param0->unk_00); - sub_0200DAA4(param0->unk_18, 0, 1, UnkEnum_ov75_021D1598_05, 0, param0->unk_00); - sub_0200DD0C(param0->unk_18, 0, 1 + 9, UnkEnum_ov75_021D1598_06, param0->unk_0A, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_18, 0, 1, UnkEnum_ov75_021D1598_05, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_18, 0, 1 + 9, UnkEnum_ov75_021D1598_06, param0->unk_0A, param0->unk_00); v1 = NARC_GetMemberSize(v5, v6); v2 = Heap_AllocFromHeapAtEnd(param0->unk_00, v1); diff --git a/src/overlay076/ov76_0223B870.c b/src/overlay076/ov76_0223B870.c index 089442b88b..fa4b59a658 100644 --- a/src/overlay076/ov76_0223B870.c +++ b/src/overlay076/ov76_0223B870.c @@ -34,6 +34,7 @@ #include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "sys_task.h" @@ -41,7 +42,6 @@ #include "text.h" #include "touch_screen.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02014000.h" @@ -518,7 +518,7 @@ void ov76_0223BF74(BgConfig *param0, Window *param1, int param2, UnkStruct_ov76_ v0.suppressCursor = FALSE; v0.loopAround = TRUE; - Window_Show(param1, 1, (1 + (18 + 12)), 13); + Window_DrawStandardFrame(param1, 1, (1 + (18 + 12)), 13); param3->unk_D4.unk_CC = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 53, PAD_BUTTON_B); } @@ -922,19 +922,19 @@ void ov76_0223C8BC(UnkStruct_ov76_0223DE00 *param0) void ov76_0223C8EC(BgConfig *param0, PaletteData *param1, int param2) { - sub_0200DD0C(param0, 1, 1, 15, param2, 53); - PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), 53, 0, 0x20, 12 * 16); - sub_0200DAA4(param0, 1, (1 + (18 + 12)), 13, 0, 53); - PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), 53, 0, 0x20, 13 * 16); + LoadMessageBoxGraphics(param0, 1, 1, 15, param2, 53); + PaletteData_LoadBufferFromFileStart(param1, 38, GetMessageBoxPaletteNARCMember(param2), 53, 0, 0x20, 12 * 16); + LoadStandardWindowGraphics(param0, 1, (1 + (18 + 12)), 13, 0, 53); + PaletteData_LoadBufferFromFileStart(param1, 38, GetStandardWindowPaletteNARCMember(), 53, 0, 0x20, 13 * 16); PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 0, 0x20, 14 * 16); } void ov76_0223C974(BgConfig *param0, PaletteData *param1, int param2) { - sub_0200DD0C(param0, 4, 1, 15, param2, 53); - PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), 53, 1, 0x20, 12 * 16); - sub_0200DAA4(param0, 4, (1 + (18 + 12)), 13, 0, 53); - PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), 53, 1, 0x20, 13 * 16); + LoadMessageBoxGraphics(param0, 4, 1, 15, param2, 53); + PaletteData_LoadBufferFromFileStart(param1, 38, GetMessageBoxPaletteNARCMember(param2), 53, 1, 0x20, 12 * 16); + LoadStandardWindowGraphics(param0, 4, (1 + (18 + 12)), 13, 0, 53); + PaletteData_LoadBufferFromFileStart(param1, 38, GetStandardWindowPaletteNARCMember(), 53, 1, 0x20, 13 * 16); PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 1, 0x20, 14 * 16); PaletteData_LoadBufferFromFileStart(param1, 14, 7, 53, 1, 0x20, 3 * 16); PaletteData_LoadBufferFromFileStart(param1, 91, 294, 53, 1, 0x20, 11 * 16); @@ -965,7 +965,7 @@ void ov76_0223CA98(BgConfig *param0, Window *param1, int param2, int param3, int { Window_Init(param1); Window_Add(param0, param1, param2, param3, param4, param5, param6, 14, param7); - sub_0200E060(param1, 1, 1, 12); + Window_DrawMessageBoxWithScrollCursor(param1, 1, 1, 12); Window_FillTilemap(param1, 15); Window_CopyToVRAM(param1); } diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index 72b2f4b243..fb64c011a0 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -33,6 +33,7 @@ #include "narc.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "string_list.h" #include "sys_task.h" #include "sys_task_manager.h" @@ -40,7 +41,6 @@ #include "unk_02005474.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02015920.h" @@ -185,7 +185,7 @@ static void ov76_0223D494(UnkStruct_ov76_0223DE00 *param0, int param1, int param static int ov76_0223D4C4(UnkStruct_ov76_0223DE00 *param0) { - Window_Clear(¶m0->unk_D4.unk_18[1], 1); + Window_EraseStandardFrame(¶m0->unk_D4.unk_18[1], 1); Window_ClearAndCopyToVRAM(¶m0->unk_D4.unk_18[1]); Menu_Free(param0->unk_D4.unk_CC, NULL); StringList_Free(param0->unk_D4.unk_C8); @@ -1051,7 +1051,7 @@ static BOOL ov76_0223DF94(UnkStruct_ov76_0223DE00 *param0) PaletteData_SetAutoTransparent(param0->unk_D4.unk_14, 1); sub_02015A54(param0->unk_D4.unk_150); sub_02015938(param0->unk_D4.unk_150); - sub_0200E084(¶m0->unk_D4.unk_18[2], 1); + Window_EraseMessageBox(¶m0->unk_D4.unk_18[2], 1); Window_ClearAndCopyToVRAM(¶m0->unk_D4.unk_18[2]); Window_Remove(¶m0->unk_D4.unk_18[2]); param0->unk_3DC++; diff --git a/src/overlay079/ov79_021D0D80.c b/src/overlay079/ov79_021D0D80.c index e5bef07580..001bfbc5fd 100644 --- a/src/overlay079/ov79_021D0D80.c +++ b/src/overlay079/ov79_021D0D80.c @@ -23,13 +23,13 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020158A8.h" #include "unk_02017728.h" @@ -363,7 +363,7 @@ static int ov79_021D116C(UnkStruct_ov79_021D0E1C *param0) return 0; case 0xfffffffe: Sound_PlayEffect(1500); - sub_0200E084(¶m0->unk_E8[2], 0); + Window_EraseMessageBox(¶m0->unk_E8[2], 0); param0->unk_18 = 1; return 0; } @@ -381,7 +381,7 @@ static int ov79_021D11C0(UnkStruct_ov79_021D0E1C *param0) return 0; } - sub_0200E084(¶m0->unk_E8[2], 1); + Window_EraseMessageBox(¶m0->unk_E8[2], 1); Window_ClearAndCopyToVRAM(¶m0->unk_E8[2]); param0->unk_20->unk_1C[param0->unk_1A].unk_04_val1_6 = 1; @@ -655,8 +655,8 @@ static void ov79_021D14A4(UnkStruct_ov79_021D0E1C *param0) { 0x4, 0xC, 0xD, 0x8, 0x3, 0xA, 0xB9 } }; - sub_0200DAA4(param0->unk_24, 1, 1 + 18 + 12, 15, 0, param0->unk_00); - sub_0200DD0C(param0->unk_24, 1, 1, 14, Options_Frame(param0->unk_20->unk_18), param0->unk_00); + LoadStandardWindowGraphics(param0->unk_24, 1, 1 + 18 + 12, 15, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_24, 1, 1, 14, Options_Frame(param0->unk_20->unk_18), param0->unk_00); Font_LoadTextPalette(0, 13 * 32, param0->unk_00); Font_LoadScreenIndicatorsPalette(0, 12 * 32, param0->unk_00); Font_LoadTextPalette(4, 13 * 32, param0->unk_00); diff --git a/src/overlay079/ov79_021D183C.c b/src/overlay079/ov79_021D183C.c index b1cc640630..4d2a79ca93 100644 --- a/src/overlay079/ov79_021D183C.c +++ b/src/overlay079/ov79_021D183C.c @@ -14,13 +14,13 @@ #include "list_menu.h" #include "menu.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_020158A8.h" #include "unk_02098FFC.h" @@ -83,7 +83,7 @@ static void ov79_021D1850(UnkStruct_ov79_021D0E1C *param0, Strbuf *param1, u8 pa u32 v0 = TEXT_COLOR(1, 2, 15); if (param3) { - sub_0200E060(¶m0->unk_E8[2], 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_E8[2], 1, 1, 14); } Window_FillRectWithColor(&(param0->unk_E8[2]), ((15 << 4) | 15), 0, 0, 27 * 8, 4 * 8); @@ -380,7 +380,7 @@ void ov79_021D1ED8(UnkStruct_ov79_021D0E1C *param0) param0->unk_A4.tmp = (void *)param0; param0->unk_A4.count = 3; - Window_Show(¶m0->unk_E8[3], 1, 1 + 18 + 12, 15); + Window_DrawStandardFrame(¶m0->unk_E8[3], 1, 1 + 18 + 12, 15); param0->unk_C8 = ListMenu_New(¶m0->unk_A4, 0, 0, param0->unk_00); } @@ -389,7 +389,7 @@ void ov79_021D1F60(UnkStruct_ov79_021D0E1C *param0) { u16 v0, v1; - Window_Clear(&(param0->unk_E8[3]), 0); + Window_EraseStandardFrame(&(param0->unk_E8[3]), 0); Window_ClearAndCopyToVRAM(¶m0->unk_E8[3]); ListMenu_Free(param0->unk_C8, &v1, &v0); diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index e71d95e1b4..0aa69f8225 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -29,6 +29,7 @@ #include "narc.h" #include "overlay_manager.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -38,7 +39,6 @@ #include "unk_0200762C.h" #include "unk_0200A784.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -475,7 +475,7 @@ static void ov79_021D270C(UnkStruct_ov79_021D2928 *param0) Window_AddFromTemplate(param0->unk_68, &(param0->unk_6C), &v0); Window_FillTilemap(¶m0->unk_6C, ((0 << 4) | 0)); - sub_0200DD0C(param0->unk_68, 1, 1, 14, param0->unk_10->unk_0B, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_68, 1, 1, 14, param0->unk_10->unk_0B, param0->unk_00); Font_LoadScreenIndicatorsPalette(0, 15 * 32, param0->unk_00); } @@ -732,7 +732,7 @@ static int ov79_021D2B84(UnkStruct_ov79_021D2928 *param0, UnkStruct_ov79_021D29B static int ov79_021D2B94(UnkStruct_ov79_021D2928 *param0) { - sub_0200E060(¶m0->unk_6C, 1, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_6C, 1, 1, 14); Window_FillTilemap(¶m0->unk_6C, ((15 << 4) | 15)); Strbuf_Clear(param0->unk_1C.unk_04); StringTemplate_SetStrbuf(param0->unk_1C.unk_00, 0, param0->unk_30.unk_0C, 2, 1, GAME_LANGUAGE); @@ -754,7 +754,7 @@ static int ov79_021D2C08(UnkStruct_ov79_021D2928 *param0) return 7; } - sub_0200E084(¶m0->unk_6C, 1); + Window_EraseMessageBox(¶m0->unk_6C, 1); Window_ClearAndCopyToVRAM(¶m0->unk_6C); return 8; diff --git a/src/overlay080/ov80_021D1458.c b/src/overlay080/ov80_021D1458.c index f0e703661f..3d54782d61 100644 --- a/src/overlay080/ov80_021D1458.c +++ b/src/overlay080/ov80_021D1458.c @@ -18,6 +18,7 @@ #include "font.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "sys_task.h" #include "sys_task_manager.h" @@ -25,7 +26,6 @@ #include "touch_screen.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02039C80.h" #include "unk_02071CFC.h" @@ -353,7 +353,7 @@ int ov80_021D1758(UnkStruct_ov80_021D2A08 *param0) ov80_021D1B5C(param0, &(v0->unk_28[3]), v2); Strbuf_Clear(param0->unk_88); ov80_021D1A58(param0, v3, v0->unk_18, v0->unk_1C); - sub_0200E2A4(param0->unk_28, 4, (((((1023 - (21 * 4)) - (28 * 4)) - (28 * 14)) - (10 * 2)) - 100), (15 - 1), v2->unk_04, v2->unk_06, param0->unk_04); + LoadSignpostContentGraphics(param0->unk_28, 4, (((((1023 - (21 * 4)) - (28 * 4)) - (28 * 14)) - (10 * 2)) - 100), (15 - 1), v2->unk_04, v2->unk_06, param0->unk_04); if ((v2->unk_04 == 0) || (v2->unk_04 == 1)) { v1 = &v0->unk_28[1]; @@ -364,7 +364,7 @@ int ov80_021D1758(UnkStruct_ov80_021D2A08 *param0) v0->unk_78 = v1; v0->unk_15_4 = v2->unk_04; - sub_0200E69C(v1, 1, (((((1023 - (21 * 4)) - (28 * 4)) - (28 * 14)) - (10 * 2)) - 100), (15 - 1), v2->unk_04); + Window_DrawSignpost(v1, 1, (((((1023 - (21 * 4)) - (28 * 4)) - (28 * 14)) - (10 * 2)) - 100), (15 - 1), v2->unk_04); Window_FillTilemap(v1, 15); Text_AddPrinterWithParams(v1, FONT_MESSAGE, param0->unk_88, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); Window_CopyToVRAM(v1); @@ -688,7 +688,7 @@ static void ov80_021D1D38(UnkStruct_ov80_021D2A08 *param0) Window_FillTilemap(v1, 0); Window_ClearAndCopyToVRAM(v1); - sub_0200E744(v1, v0->unk_15_4, 0); + Window_EraseSignpost(v1, v0->unk_15_4, 0); Bg_ScheduleTilemapTransfer(param0->unk_28, 4); } diff --git a/src/overlay083/ov83_0223D6A8.c b/src/overlay083/ov83_0223D6A8.c index 793c3c5b87..8867d138b5 100644 --- a/src/overlay083/ov83_0223D6A8.c +++ b/src/overlay083/ov83_0223D6A8.c @@ -44,6 +44,7 @@ #include "gx_layers.h" #include "heap.h" #include "narc.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "string_template.h" @@ -53,7 +54,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200A328.h" -#include "unk_0200DA60.h" #include "unk_02015064.h" #include "unk_02015920.h" #include "unk_0201D15C.h" @@ -568,7 +568,7 @@ void ov83_0223DF30(UnkStruct_ov83_0223E138 *param0, int param1) StringTemplate_Format(param0->unk_18->unk_04, param0->unk_18->unk_08, param0->unk_18->unk_10); Window_FillTilemap(param0->unk_08, 15); ov83_0223E21C(param0->unk_08, param0->unk_18->unk_08, 0, 0); - sub_0200E060(param0->unk_08, 0, 1, 0); + Window_DrawMessageBoxWithScrollCursor(param0->unk_08, 0, 1, 0); } void ov83_0223DF70(UnkStruct_ov83_0223E138 *param0) @@ -581,7 +581,7 @@ void ov83_0223DF84(UnkStruct_ov83_0223E138 *param0) { Window_FillTilemap(param0->unk_08, 15); ov83_0223E21C(param0->unk_08, param0->unk_18->unk_0C, 0, 0); - sub_0200E060(param0->unk_08, 0, 1, 0); + Window_DrawMessageBoxWithScrollCursor(param0->unk_08, 0, 1, 0); } void ov83_0223DFAC(UnkStruct_ov83_0223E138 *param0) @@ -631,9 +631,9 @@ static void ov83_0223E09C(UnkStruct_ov83_0223E138 *param0, u32 param1) Window_Add(param0->unk_04, param0->unk_0C, 4, 6, 13, 20, 8, 1, (18 + 12) + 1); Window_FillTilemap(param0->unk_08, 15); Window_FillTilemap(param0->unk_0C, 0); - sub_0200DD0C(param0->unk_04, 4, 1, 0, param0->unk_10, param1); + LoadMessageBoxGraphics(param0->unk_04, 4, 1, 0, param0->unk_10, param1); Font_LoadScreenIndicatorsPalette(4, 1 * 32, param1); - sub_0200E060(param0->unk_08, 1, 1, 0); + Window_DrawMessageBoxWithScrollCursor(param0->unk_08, 1, 1, 0); } static void ov83_0223E138(UnkStruct_ov83_0223E138 *param0) @@ -1058,9 +1058,9 @@ static void ov83_0223E77C(UnkStruct_ov83_0223E824 *param0, u32 param1) { 2, 2, 27, 5, 2, 40 } }; - sub_0200DD0C(param0->unk_04, 2, 1, 0, param0->unk_18, param1); + LoadMessageBoxGraphics(param0->unk_04, 2, 1, 0, param0->unk_18, param1); Font_LoadScreenIndicatorsPalette(0, 2 * 32, param1); - sub_0200DAA4(param0->unk_04, 2, (1 + (18 + 12)), 1, 0, param1); + LoadStandardWindowGraphics(param0->unk_04, 2, (1 + (18 + 12)), 1, 0, param1); Font_LoadTextPalette(0, 3 * 32, param1); for (v0 = 0; v0 < 4; v0++) { @@ -1154,13 +1154,13 @@ void ov83_0223E994(UnkStruct_ov83_0223E824 *param0) void ov83_0223E9BC(UnkStruct_ov83_0223E824 *param0) { ov83_0223E9D0(param0); - param0->unk_34 = sub_0200E7FC(param0->unk_08[3], 1); + param0->unk_34 = Window_AddWaitDial(param0->unk_08[3], 1); } void ov83_0223E9D0(UnkStruct_ov83_0223E824 *param0) { if (param0->unk_34 != NULL) { - DeleteWaitDial(param0->unk_34); + DestroyWaitDial(param0->unk_34); param0->unk_34 = NULL; } } @@ -1175,10 +1175,10 @@ static void ov83_0223E9E4(UnkStruct_ov83_0223E824 *param0) Text_AddPrinterWithParamsAndColor(param0->unk_08[1], FONT_SYSTEM, param0->unk_1C->unk_34, v0, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); } - Window_Show(param0->unk_08[1], 0, (1 + (18 + 12)), 1); + Window_DrawStandardFrame(param0->unk_08[1], 0, (1 + (18 + 12)), 1); Window_FillTilemap(param0->unk_08[2], 15); Text_AddPrinterWithParamsAndColor(param0->unk_08[2], FONT_SYSTEM, param0->unk_1C->unk_4C[6], 0, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); - Window_Show(param0->unk_08[2], 0, (1 + (18 + 12)), 1); + Window_DrawStandardFrame(param0->unk_08[2], 0, (1 + (18 + 12)), 1); Window_ScheduleCopyToVRAM(param0->unk_08[1]); Window_ScheduleCopyToVRAM(param0->unk_08[2]); } @@ -1279,7 +1279,7 @@ void ov83_0223EC8C(UnkStruct_ov83_0223E824 *param0, u32 param1) } Text_AddPrinterWithParamsAndColor(param0->unk_08[3], FONT_MESSAGE, v0, 0, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); - sub_0200E060(param0->unk_08[3], 0, 1, 0); + Window_DrawMessageBoxWithScrollCursor(param0->unk_08[3], 0, 1, 0); Window_ScheduleCopyToVRAM(param0->unk_08[3]); } diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index 35f2a6d633..522675def4 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -33,6 +33,7 @@ #include "narc.h" #include "overlay_manager.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -44,7 +45,6 @@ #include "unk_02005474.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -820,8 +820,8 @@ static void ov84_0223BC1C(UnkStruct_ov84_0223B5A0 *param0) Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 12, 0, 0, 0, 6); Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 22, 0, 16 * 13 * 2, 32, 6); Font_LoadScreenIndicatorsPalette(0, 11 * 32, 6); - sub_0200DAA4(param0->unk_00, 0, 1024 - 9, 14, 0, 6); - sub_0200DD0C(param0->unk_00, 0, 1024 - 9 - (18 + 12), 12, Options_Frame(param0->unk_D0), 6); + LoadStandardWindowGraphics(param0->unk_00, 0, 1024 - 9, 14, 0, 6); + LoadMessageBoxGraphics(param0->unk_00, 0, 1024 - 9 - (18 + 12), 12, Options_Frame(param0->unk_D0), 6); Graphics_LoadTilesToBgLayerFromOpenNARC(param0->unk_D4, 15, param0->unk_00, 5, 0, 0, 0, 6); Graphics_LoadPaletteFromOpenNARC(param0->unk_D4, 16, 4, 0, 0, 6); Graphics_LoadTilemapToBgLayerFromOpenNARC(param0->unk_D4, 17, param0->unk_00, 5, 0, 0, 0, 6); @@ -2110,7 +2110,7 @@ static int ov84_0223D858(UnkStruct_ov84_0223B5A0 *param0) if (v2 != 0) { sub_0207CD34(param0->unk_CC, param0->unk_3F8, param0->unk_C4->unk_66, v2, 6); Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); param0->unk_426 = ov84_022400A0(param0); return 12; @@ -2124,7 +2124,7 @@ static int ov84_0223D8EC(UnkStruct_ov84_0223B5A0 *param0) { if (Text_IsPrinterActive(param0->unk_426) == 0) { if ((gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || gCoreSys.touchPressed) { - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2152,7 +2152,7 @@ static int ov84_0223D94C(UnkStruct_ov84_0223B5A0 *param0) if (sub_0207CC10(param0->unk_C4->unk_00, param0->unk_3F8, param0->unk_C4->unk_66, 6) == 1) { Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); param0->unk_426 = ov84_022400A0(param0); return 12; } @@ -2189,7 +2189,7 @@ static int ov84_0223DA14(UnkStruct_ov84_0223B5A0 *param0) } } Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); param0->unk_426 = ov84_022400A0(param0); param0->unk_483 = 1; @@ -2248,7 +2248,7 @@ static int ov84_0223DA14(UnkStruct_ov84_0223B5A0 *param0) } } break; case 0xfffffffe: - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); ov84_0223D7E8(param0, 0); @@ -2321,7 +2321,7 @@ static int ov84_0223DDD0(UnkStruct_ov84_0223B5A0 *param0) switch (param0->unk_483) { case 0: Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); param0->unk_426 = ov84_022400A0(param0); param0->unk_483 = 1; break; @@ -2331,7 +2331,7 @@ static int ov84_0223DDD0(UnkStruct_ov84_0223B5A0 *param0) } if ((gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || gCoreSys.touchPressed) { - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); param0->unk_483 = 2; } @@ -2482,7 +2482,7 @@ static int ov84_0223E01C(UnkStruct_ov84_0223B5A0 *param0) } } break; case 0xfffffffe: - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); return 1; @@ -2509,7 +2509,7 @@ static int ov84_0223E18C(UnkStruct_ov84_0223B5A0 *param0) if (Text_IsPrinterActive(param0->unk_426) == 0) { if ((gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || gCoreSys.touchPressed) { param0->unk_479 = 0; - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2575,7 +2575,7 @@ static int ov84_0223E27C(UnkStruct_ov84_0223B5A0 *param0) Strbuf *v1; Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); StringTemplate_SetItemName(param0->unk_118, 0, param0->unk_C4->unk_66); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 46); @@ -2604,7 +2604,7 @@ static int ov84_0223E36C(UnkStruct_ov84_0223B5A0 *param0) { if (Text_IsPrinterActive(param0->unk_426) == 0) { if ((gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || gCoreSys.touchPressed) { - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2638,7 +2638,7 @@ static int ov84_0223E3BC(UnkStruct_ov84_0223B5A0 *param0) ov84_02240248(param0, 0); Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); StringTemplate_SetItemName(param0->unk_118, 0, param0->unk_C4->unk_66); ov84_02240B34(param0, 2); @@ -2705,7 +2705,7 @@ static int ov84_0223E5C4(UnkStruct_ov84_0223B5A0 *param0) Strbuf *v0; ov84_02240D3C(param0, 0); - Window_Clear(¶m0->unk_04[7], 1); + Window_EraseStandardFrame(¶m0->unk_04[7], 1); Window_FillTilemap(¶m0->unk_04[6], 15); v0 = MessageLoader_GetNewStrbuf(param0->unk_114, 76); StringTemplate_SetNumber(param0->unk_118, 0, param0->unk_488 * param0->unk_48C, 6, 0, 1); @@ -2735,7 +2735,7 @@ static int ov84_0223E5C4(UnkStruct_ov84_0223B5A0 *param0) Strbuf *v1; ov84_02240D3C(param0, 0); - Window_Clear(¶m0->unk_04[7], 1); + Window_EraseStandardFrame(¶m0->unk_04[7], 1); Window_FillTilemap(¶m0->unk_04[6], 15); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 76); @@ -2752,9 +2752,9 @@ static int ov84_0223E5C4(UnkStruct_ov84_0223B5A0 *param0) param0->unk_48C = 0; ov84_02240D3C(param0, 0); - Window_Clear(¶m0->unk_04[8], 1); - Window_Clear(¶m0->unk_04[7], 1); - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseStandardFrame(¶m0->unk_04[8], 1); + Window_EraseStandardFrame(¶m0->unk_04[7], 1); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); Sound_PlayEffect(1500); @@ -2819,8 +2819,8 @@ static int ov84_0223E7CC(UnkStruct_ov84_0223B5A0 *param0) } break; case 0xfffffffe: param0->unk_48C = 0; - Window_Clear(¶m0->unk_04[8], 1); - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseStandardFrame(¶m0->unk_04[8], 1); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2862,8 +2862,8 @@ static int ov84_0223E9B0(UnkStruct_ov84_0223B5A0 *param0) param0->unk_479 = 0; param0->unk_48C = 0; - Window_Clear(¶m0->unk_04[8], 1); - sub_0200E084(¶m0->unk_04[6], 0); + Window_EraseStandardFrame(¶m0->unk_04[8], 1); + Window_EraseMessageBox(¶m0->unk_04[6], 0); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2898,7 +2898,7 @@ static int ov84_0223EA18(UnkStruct_ov84_0223B5A0 *param0) if (Item_LoadParam(param0->unk_C4->unk_66, 6, 6) != 13) { sub_0207CD34(param0->unk_CC, param0->unk_3F8, param0->unk_C4->unk_66, -1, 6); Window_FillTilemap(¶m0->unk_04[6], 15); - sub_0200E060(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 0, 1024 - 9 - (18 + 12), 12); param0->unk_426 = ov84_022400A0(param0); return 12; diff --git a/src/overlay084/ov84_0223F040.c b/src/overlay084/ov84_0223F040.c index b52b32c6c3..5d736e220d 100644 --- a/src/overlay084/ov84_0223F040.c +++ b/src/overlay084/ov84_0223F040.c @@ -23,6 +23,7 @@ #include "narc.h" #include "poffin.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" @@ -30,7 +31,6 @@ #include "trainer_info.h" #include "unk_02005474.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" static void ov84_0223F9B0(UnkStruct_ov84_0223B5A0 *param0, u32 param1); static BOOL ov84_022400E0(TextPrinterTemplate *param0, u16 param1); @@ -442,7 +442,7 @@ void ov84_0223FB70(UnkStruct_ov84_0223B5A0 *param0, u8 *param1, u8 param2) Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); ov84_02240D5C(param0, param0->unk_C4->unk_66, 1); } else { - sub_0200E060(¶m0->unk_04[v5], 1, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[v5], 1, 1024 - 9 - (18 + 12), 12); Window_FillTilemap(¶m0->unk_04[v5], 15); v2 = MessageLoader_GetNewStrbuf(param0->unk_114, 42); @@ -457,7 +457,7 @@ void ov84_0223FB70(UnkStruct_ov84_0223B5A0 *param0, u8 *param1, u8 param2) Window_ScheduleCopyToVRAM(¶m0->unk_04[v5]); } - Window_Show(¶m0->unk_B4[0], 1, 1024 - 9, 14); + Window_DrawStandardFrame(¶m0->unk_B4[0], 1, 1024 - 9, 14); Window_ScheduleCopyToVRAM(¶m0->unk_B4[0]); } @@ -472,11 +472,11 @@ void ov84_0223FD84(UnkStruct_ov84_0223B5A0 *param0) } if (param0->unk_C4->unk_04[param0->unk_C4->unk_64].unk_08 != 3) { - sub_0200E084(¶m0->unk_04[v0], 1); + Window_EraseMessageBox(¶m0->unk_04[v0], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_04[v0]); } - Window_Clear(¶m0->unk_B4[0], 1); + Window_EraseStandardFrame(¶m0->unk_B4[0], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_B4[0]); Menu_Free(param0->unk_158, NULL); StringList_Free(param0->unk_154); @@ -513,9 +513,9 @@ void ov84_0223FE94(UnkStruct_ov84_0223B5A0 *param0) Strbuf *v2; u16 v3; - Window_Show(¶m0->unk_04[9], 1, 1024 - 9, 14); + Window_DrawStandardFrame(¶m0->unk_04[9], 1, 1024 - 9, 14); ov84_0223FF44(param0); - sub_0200E060(¶m0->unk_04[3], 1, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[3], 1, 1024 - 9 - (18 + 12), 12); Window_FillTilemap(¶m0->unk_04[3], 15); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 52); @@ -550,8 +550,8 @@ void ov84_0223FF44(UnkStruct_ov84_0223B5A0 *param0) void ov84_0223FFC0(UnkStruct_ov84_0223B5A0 *param0) { - sub_0200E084(¶m0->unk_04[3], 1); - Window_Clear(¶m0->unk_04[9], 1); + Window_EraseMessageBox(¶m0->unk_04[3], 1); + Window_EraseStandardFrame(¶m0->unk_04[9], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_04[3]); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_04[9]); Window_ScheduleCopyToVRAM(¶m0->unk_04[1]); @@ -563,7 +563,7 @@ void ov84_0223FFF0(UnkStruct_ov84_0223B5A0 *param0) Strbuf *v1; u16 v2; - sub_0200E060(¶m0->unk_04[6], 1, 1024 - 9 - (18 + 12), 12); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[6], 1, 1024 - 9 - (18 + 12), 12); Window_FillTilemap(¶m0->unk_04[6], 15); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 54); @@ -624,7 +624,7 @@ void ov84_02240148(UnkStruct_ov84_0223B5A0 *param0, u8 param1) v0 = ¶m0->unk_04[7]; if (param1 == 0) { - Window_Show(v0, 1, 1024 - 9, 14); + Window_DrawStandardFrame(v0, 1, 1024 - 9, 14); } Window_FillTilemap(v0, 15); @@ -658,7 +658,7 @@ void ov84_02240248(UnkStruct_ov84_0223B5A0 *param0, u8 param1) if (param1 == 0) { Window_FillTilemap(v0, 15); - Window_Show(v0, 1, 1024 - 9, 14); + Window_DrawStandardFrame(v0, 1, 1024 - 9, 14); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 78); @@ -688,7 +688,7 @@ void ov84_02240328(UnkStruct_ov84_0223B5A0 *param0) v0 = ¶m0->unk_04[10]; Window_FillTilemap(v0, 15); - Window_Show(v0, 1, 1024 - 9, 14); + Window_DrawStandardFrame(v0, 1, 1024 - 9, 14); v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 108); Text_AddPrinterWithParams(v0, FONT_SYSTEM, v1, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); diff --git a/src/overlay087/ov87_021D106C.c b/src/overlay087/ov87_021D106C.c index 412c6e5b59..e4895af384 100644 --- a/src/overlay087/ov87_021D106C.c +++ b/src/overlay087/ov87_021D106C.c @@ -21,6 +21,7 @@ #include "heap.h" #include "message.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" @@ -28,7 +29,6 @@ #include "unk_02006224.h" #include "unk_020093B4.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_02017728.h" @@ -312,9 +312,9 @@ static void ov87_021D139C(UnkStruct_ov87_021D106C *param0) v4 = ov87_021D14D4(param0, 1); ov87_021D1558(param0); - sub_0200DAA4(param0->unk_10, 1, v4, 2, 0, 61); - Window_Show(&(param0->unk_14[0]), 0, v4, 2); - Window_Show(&(param0->unk_14[1]), 0, v4, 2); + LoadStandardWindowGraphics(param0->unk_10, 1, v4, 2, 0, 61); + Window_DrawStandardFrame(&(param0->unk_14[0]), 0, v4, 2); + Window_DrawStandardFrame(&(param0->unk_14[1]), 0, v4, 2); Bg_CopyTilemapBufferToVRAM(param0->unk_10, 1); G2_SetBlendAlpha(GX_BLEND_PLANEMASK_NONE, GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG1, 8, 8); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index 706c5daeae..0816e62b11 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -46,6 +46,7 @@ #include "pokemon.h" #include "pokemon_icon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "rtc.h" #include "savedata.h" #include "sprite_resource.h" @@ -62,7 +63,6 @@ #include "unk_0200A328.h" #include "unk_0200A784.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_02017728.h" @@ -375,8 +375,8 @@ static void ov88_0223B3C0(UnkStruct_02095E80 *param0) ov88_0223B4F0(param0); ov88_0223B320(param0); - sub_0200DD0C(param0->unk_174, 0, (512 - (9 + (18 + 12))), 10, Options_Frame(param0->unk_08->unk_18), 26); - sub_0200DAA4(param0->unk_174, 0, (512 - 9), 11, 0, 26); + LoadMessageBoxGraphics(param0->unk_174, 0, (512 - (9 + (18 + 12))), 10, Options_Frame(param0->unk_08->unk_18), 26); + LoadStandardWindowGraphics(param0->unk_174, 0, (512 - 9), 11, 0, 26); ov88_0223ECBC(¶m0->unk_49C[21], 15, FONT_MESSAGE, param0->unk_184, param0->unk_178); @@ -735,7 +735,7 @@ static int ov88_0223B914(UnkStruct_02095E80 *param0) break; case 19: if (sub_0200AC1C(2)) { - sub_0200E084(¶m0->unk_49C[23], 0); + Window_EraseMessageBox(¶m0->unk_49C[23], 0); Bg_FillTilemapRect(param0->unk_174, 0, 0, 0, 0, 32, 24, 0); ov88_0223ECBC(¶m0->unk_49C[21], 15, FONT_MESSAGE, param0->unk_184, param0->unk_178); ResetUnlock(2); @@ -1891,7 +1891,7 @@ static int ov88_0223D5B8(UnkStruct_02095E80 *param0) break; } - Window_Clear(¶m0->unk_36DC, 0); + Window_EraseStandardFrame(¶m0->unk_36DC, 0); Window_Remove(¶m0->unk_36DC); ListMenu_Free(param0->unk_36D8, NULL, NULL); StringList_Free(param0->unk_36D4); @@ -2557,13 +2557,13 @@ static void ov88_0223E87C(CellActor *param0, int param1, int param2) static void ov88_0223E894(UnkStruct_02095E80 *param0) { - param0->unk_3700 = sub_0200E7FC(¶m0->unk_49C[23], (512 - (9 + (18 + 12)))); + param0->unk_3700 = Window_AddWaitDial(¶m0->unk_49C[23], (512 - (9 + (18 + 12)))); } static void ov88_0223E8B4(UnkStruct_02095E80 *param0) { if (param0->unk_3700 != NULL) { - DeleteWaitDial(param0->unk_3700); + DestroyWaitDial(param0->unk_3700); param0->unk_3700 = NULL; } } diff --git a/src/overlay088/ov88_0223E9C4.c b/src/overlay088/ov88_0223E9C4.c index 4720878119..ff4988ebc0 100644 --- a/src/overlay088/ov88_0223E9C4.c +++ b/src/overlay088/ov88_0223E9C4.c @@ -10,11 +10,11 @@ #include "menu.h" #include "message.h" #include "message_util.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" static void ov88_0223EE14(ListMenu *param0, u32 param1, u8 param2); @@ -59,8 +59,8 @@ void ov88_0223E9C4(BgConfig *param0, Window *param1, Options *param2) Window_Add(param0, ¶m1[6], 1, 26, 21, 5, 2, 8, ((1 + (10 * 2)) + (10 * 2))); Window_FillTilemap(¶m1[6], 0); - sub_0200DD0C(param0, 0, (512 - (9 + (18 + 12))), 10, Options_Frame(param2), 26); - sub_0200DAA4(param0, 0, (512 - 9), 11, 0, 26); + LoadMessageBoxGraphics(param0, 0, (512 - (9 + (18 + 12))), 10, Options_Frame(param2), 26); + LoadStandardWindowGraphics(param0, 0, (512 - 9), 11, 0, 26); Window_Add(param0, ¶m1[21], 0, 2, 21, 20, 2, 13, 1); Window_FillTilemap(¶m1[21], 0); @@ -132,9 +132,9 @@ int ov88_0223ECBC(Window *param0, int param1, int param2, MessageLoader *param3, v0 = MessageUtil_ExpandedStrbuf(param4, param3, param1, 26); if (param2 == 1) { - sub_0200E060(param0, 0, (512 - (9 + (18 + 12))), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 0, (512 - (9 + (18 + 12))), 10); } else { - Window_Show(param0, 0, (512 - 9), 11); + Window_DrawStandardFrame(param0, 0, (512 - 9), 11); } Window_FillTilemap(param0, 15); @@ -176,7 +176,7 @@ u32 ov88_0223ED2C(BgConfig *param0, Menu **param1, int *param2) void ov88_0223ED80(Window *param0) { - Window_Show(param0, 0, (512 - 9), 11); + Window_DrawStandardFrame(param0, 0, (512 - 9), 11); } static const ListMenuTemplate Unk_ov88_0223F150 = { @@ -208,7 +208,7 @@ ListMenu *ov88_0223ED94(StringList *param0, int param1, Window *param2, BgConfig int v2 = 5; Window_Add(param3, param2, 0, 19, 1, 12, v2 * 2, 13, (512 - (9 + (18 + 12))) - (10 * (v2 + 2) * 2)); - Window_Show(param2, 0, (512 - 9), 11); + Window_DrawStandardFrame(param2, 0, (512 - 9), 11); v1 = Unk_ov88_0223F150; v1.count = param1 + 1; diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index b950bc9c5c..451d5dca17 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -32,13 +32,13 @@ #include "pokemon.h" #include "pokemon_summary_app.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -602,8 +602,8 @@ static void ov91_021D10C8(UnkStruct_ov91_021D0ED8 *param0, NARC *param1) Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 11, param0->unk_04, 2, 0, 0, 0, 67); Graphics_LoadPaletteFromOpenNARC(param1, 12, 0, 0, 0, 67); Font_LoadScreenIndicatorsPalette(0, 14 * 32, 67); - sub_0200DAA4(param0->unk_04, 0, 1, 12, 0, 67); - sub_0200DD0C(param0->unk_04, 0, (1 + 9), 13, Options_Frame(param0->unk_00->unk_08), 67); + LoadStandardWindowGraphics(param0->unk_04, 0, 1, 12, 0, 67); + LoadMessageBoxGraphics(param0->unk_04, 0, (1 + 9), 13, Options_Frame(param0->unk_00->unk_08), 67); } static void ov91_021D1154(UnkStruct_ov91_021D0ED8 *param0) @@ -618,7 +618,7 @@ static void ov91_021D1154(UnkStruct_ov91_021D0ED8 *param0) ov91_021D1664(param0); Window_FillTilemap(¶m0->unk_08[12], 15); - sub_0200E060(¶m0->unk_08[12], 0, (1 + 9), 13); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_08[12], 0, (1 + 9), 13); } static void ov91_021D11A0(UnkStruct_ov91_021D0ED8 *param0) diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 7d555fa43f..d5f13a4a68 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -24,6 +24,7 @@ #include "narc.h" #include "overlay_manager.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -31,7 +32,6 @@ #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -569,7 +569,7 @@ int ov92_021D0EB8(OverlayManager *param0, int *param1) ov92_021D2334(v0); Window_FillRectWithColor(&v0->unk_B814, 15, 0, 0, 27 * 8, 4 * 8); - Window_Show(&v0->unk_B834, 0, ((512 - (18 + 12)) - 9), 7); + Window_DrawStandardFrame(&v0->unk_B834, 0, ((512 - (18 + 12)) - 9), 7); if (v0->unk_BB14 != 0) { ov92_021D1DEC(v0); @@ -586,7 +586,7 @@ int ov92_021D0EB8(OverlayManager *param0, int *param1) ov92_021D1700(v0); if ((gCoreSys.pressedKeys & PAD_BUTTON_B) || (v0->unk_BAF8 & PAD_BUTTON_B)) { - Window_Clear(&v0->unk_B834, 0); + Window_EraseStandardFrame(&v0->unk_B834, 0); Sound_PlayEffect(1501); Window_FillRectWithColor(&v0->unk_B814, 15, 0, 0, 27 * 8, 4 * 8); @@ -917,14 +917,14 @@ static void ov92_021D1888(UnkStruct_ov92_021D1B24 *param0, NARC *param1) Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 5, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); Graphics_LoadPaletteFromOpenNARC(param1, 6, 4, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, param0->unk_B810, 7, 0, 0, 0, param0->unk_00); - sub_0200DD0C(param0->unk_B810, 6, (512 - (18 + 12)), 6, Options_Frame(param0->unk_08), param0->unk_00); - sub_0200DAA4(param0->unk_B810, 6, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_B810, 6, (512 - (18 + 12)), 6, Options_Frame(param0->unk_08), param0->unk_00); + LoadStandardWindowGraphics(param0->unk_B810, 6, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); Font_LoadTextPalette(4, 4 * (2 * 16), param0->unk_00); Bg_ClearTilesRange(6, 32, 0, param0->unk_00); Bg_MaskPalette(6, 0x4753); Window_AddFromTemplate(param0->unk_B810, ¶m0->unk_B814, &Unk_ov92_021D2934); Window_FillRectWithColor(¶m0->unk_B814, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_B814, 0, (512 - (18 + 12)), 6); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_B814, 0, (512 - (18 + 12)), 6); param0->unk_B864 = 0; @@ -934,7 +934,7 @@ static void ov92_021D1888(UnkStruct_ov92_021D1B24 *param0, NARC *param1) Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 5, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); Graphics_LoadPaletteFromOpenNARC(param1, 6, 0, 0 * (2 * 16), (2 * 16) * 4, param0->unk_00); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, param0->unk_B810, 3, 0, 0, 0, param0->unk_00); - sub_0200DAA4(param0->unk_B810, 2, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_B810, 2, ((512 - (18 + 12)) - 9), 7, 0, param0->unk_00); Font_LoadTextPalette(0, 4 * (2 * 16), param0->unk_00); Bg_ClearTilesRange(2, 32, 0, param0->unk_00); Bg_MaskPalette(2, 0x0); @@ -1034,7 +1034,7 @@ static void ov92_021D1C4C(UnkStruct_ov92_021D1B24 *param0, Window *param1, const v0.cursorCallback = ov92_021D1C38; param0->unk_B854 = ListMenu_New(&v0, 0, 0, param0->unk_00); - Window_Show(v0.window, 1, ((512 - (18 + 12)) - 9), 7); + Window_DrawStandardFrame(v0.window, 1, ((512 - (18 + 12)) - 9), 7); Window_CopyToVRAM(param1); } @@ -1062,13 +1062,13 @@ static void ov92_021D1CF4(UnkStruct_ov92_021D1B24 *param0, Window *param1, const param0->unk_B854 = ListMenu_New(&v0, 0, 0, param0->unk_00); - Window_Show(v0.window, 1, ((512 - (18 + 12)) - 9), 7); + Window_DrawStandardFrame(v0.window, 1, ((512 - (18 + 12)) - 9), 7); Window_CopyToVRAM(param1); } static void ov92_021D1DB4(UnkStruct_ov92_021D1B24 *param0) { - Window_Clear(¶m0->unk_B824, 0); + Window_EraseStandardFrame(¶m0->unk_B824, 0); Window_Remove(¶m0->unk_B824); ListMenu_Free(param0->unk_B854, NULL, NULL); StringList_Free(param0->unk_B858); @@ -1081,7 +1081,7 @@ static void ov92_021D1DEC(UnkStruct_ov92_021D1B24 *param0) Window_AddFromTemplate(param0->unk_B810, ¶m0->unk_B844, &Unk_ov92_021D291C); Window_FillRectWithColor(¶m0->unk_B844, 15, 0, 0, 27 * 8, 6 * 8); - Window_Show(¶m0->unk_B844, 0, ((512 - (18 + 12)) - 9), 7); + Window_DrawStandardFrame(¶m0->unk_B844, 0, ((512 - (18 + 12)) - 9), 7); StringTemplate_SetCountryName(param0->unk_B870, 0, param0->unk_BB14); StringTemplate_SetCityName(param0->unk_B870, 1, param0->unk_BB14, param0->unk_BB18); @@ -1104,7 +1104,7 @@ static void ov92_021D1EBC(UnkStruct_ov92_021D1B24 *param0, int param1, int param Window_AddFromTemplate(param0->unk_B810, ¶m0->unk_B844, &Unk_ov92_021D291C); Window_FillRectWithColor(¶m0->unk_B844, 15, 0, 0, 27 * 8, 6 * 8); - Window_Show(¶m0->unk_B844, 0, ((512 - (18 + 12)) - 9), 7); + Window_DrawStandardFrame(¶m0->unk_B844, 0, ((512 - (18 + 12)) - 9), 7); ov92_021D27E8(param1, param2, v0, v1, param0->unk_00); @@ -1120,7 +1120,7 @@ static void ov92_021D1EBC(UnkStruct_ov92_021D1B24 *param0, int param1, int param static void ov92_021D1F74(UnkStruct_ov92_021D1B24 *param0) { - Window_Clear(¶m0->unk_B844, 0); + Window_EraseStandardFrame(¶m0->unk_B844, 0); Window_Remove(¶m0->unk_B844); } diff --git a/src/overlay094/ov94_0223BCB0.c b/src/overlay094/ov94_0223BCB0.c index 8b87b8c765..522a560de5 100644 --- a/src/overlay094/ov94_0223BCB0.c +++ b/src/overlay094/ov94_0223BCB0.c @@ -34,6 +34,7 @@ #include "narc.h" #include "overlay_manager.h" #include "pokemon_icon.h" +#include "render_window.h" #include "sprite_resource.h" #include "string_template.h" #include "trainer_info.h" @@ -41,7 +42,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -549,13 +549,13 @@ static void ov94_0223C598(UnkStruct_ov94_0223FD4C *param0) void ov94_0223C5D8(UnkStruct_ov94_0223FD4C *param0) { - param0->unk_10DC = sub_0200E7FC(¶m0->unk_F5C, 1); + param0->unk_10DC = Window_AddWaitDial(¶m0->unk_F5C, 1); } void ov94_0223C5F4(UnkStruct_ov94_0223FD4C *param0) { if (param0->unk_10DC != NULL) { - DeleteWaitDial(param0->unk_10DC); + DestroyWaitDial(param0->unk_10DC); param0->unk_10DC = NULL; } } diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index b4d7660bcc..2495a64291 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -19,12 +19,12 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "trainer_info.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020393C8.h" @@ -278,8 +278,8 @@ static void ov94_0223C888(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPaletteFromOpenNARC(v1, 4, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 14, v0, 1, 0, 16 * 6 * 0x20, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 30, v0, 1, 0, 32 * 24 * 2, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); @@ -524,12 +524,12 @@ static int ov94_0223CE7C(UnkStruct_ov94_0223FD4C *param0) if (v0 != 0xffffffff) { if (v0 == 0xfffffffe) { - sub_0200E084(¶m0->unk_109C, 1); + Window_EraseMessageBox(¶m0->unk_109C, 1); Window_ClearAndCopyToVRAM(¶m0->unk_109C); CellActor_SetAnimateFlag(param0->unk_E20, 1); param0->unk_2C = 5; } else { - sub_0200E084(¶m0->unk_109C, 1); + Window_EraseMessageBox(¶m0->unk_109C, 1); Window_ClearAndCopyToVRAM(¶m0->unk_109C); ov94_0223C4C0(param0, 0, 0); param0->unk_2C = 7; @@ -584,7 +584,7 @@ static void ov94_0223CF80(UnkStruct_ov94_0223FD4C *param0, int param1, int param MessageLoader_GetStrbuf(param0->unk_B90, param1, param0->unk_BAC); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); } @@ -595,7 +595,7 @@ static void ov94_0223CFD8(UnkStruct_ov94_0223FD4C *param0, int param1, int param MessageLoader_GetStrbuf(param0->unk_B90, param1, param0->unk_BAC); Window_FillTilemap(¶m0->unk_109C, 0xf0f); - sub_0200E060(¶m0->unk_109C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_109C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_109C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); } diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 02f05fd028..f9613c8541 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -28,12 +28,12 @@ #include "narc.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_020393C8.h" @@ -239,8 +239,8 @@ static void ov94_0223D2E8(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPaletteFromOpenNARC(v1, 7, 0, 0, 16 * 3 * 2, 62); Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 25, v0, 1, 0, 32 * 24 * 2, 1, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 15, v0, 5, 0, 32 * 21 * 0x40, 1, 62); @@ -386,7 +386,7 @@ static int ov94_0223D664(UnkStruct_ov94_0223FD4C *param0) if (v0 != 0xffffffff) { if (v0 == 0xfffffffe) { param0->unk_2C = 0; - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); } else { param0->unk_2C = 2; param0->unk_1110 = 1; @@ -418,7 +418,7 @@ static int ov94_0223D6B8(UnkStruct_ov94_0223FD4C *param0) v0.choices = param0->unk_10CC; v0.window = ¶m0->unk_F9C[0]; - Window_Show(¶m0->unk_F9C[0], 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_F9C[0], 0, (1 + (18 + 12)), 11); param0->unk_10D4 = Menu_NewAndCopyToVRAM(&v0, 9, 0, 0, 62, PAD_BUTTON_B); param0->unk_2C = 8; @@ -432,7 +432,7 @@ static int ov94_0223D754(UnkStruct_ov94_0223FD4C *param0) case 1: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); { Pokemon *v0 = (Pokemon *)param0->unk_12C.unk_00.unk_00; @@ -455,7 +455,7 @@ static int ov94_0223D754(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); param0->unk_2C = 2; @@ -498,7 +498,7 @@ static void ov94_0223D88C(UnkStruct_ov94_0223FD4C *param0, int param1, int param v0 = MessageLoader_GetNewStrbuf(param0->unk_B90, param1); StringTemplate_Format(param0->unk_B8C, param0->unk_BAC, v0); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); diff --git a/src/overlay094/ov94_0223DC04.c b/src/overlay094/ov94_0223DC04.c index 3ee50ea416..6fac66b9c8 100644 --- a/src/overlay094/ov94_0223DC04.c +++ b/src/overlay094/ov94_0223DC04.c @@ -23,11 +23,11 @@ #include "message.h" #include "message_util.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020393C8.h" @@ -207,8 +207,8 @@ static void ov94_0223DE04(UnkStruct_ov94_0223FD4C *param0) BgConfig *v0 = param0->unk_04; Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayer(104, 17, v0, 1, 0, 16 * 5 * 0x20, 1, 62); Graphics_LoadPalette(104, 7, 0, 0, 16 * 3 * 2, 62); } @@ -432,7 +432,7 @@ static void ov94_0223E300(UnkStruct_ov94_0223FD4C *param0, int param1, int param MessageLoader_GetStrbuf(param0->unk_B90, param1, param0->unk_BAC); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); } diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index efa99c0388..5569d2b7e5 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -28,11 +28,11 @@ #include "message.h" #include "narc.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202DA40.h" #include "unk_020366A0.h" @@ -276,8 +276,8 @@ static void ov94_0223E6B8(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPaletteFromOpenNARC(v1, 3, 0, 0, 16 * 3 * 2, 62); Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 13, v0, 1, 0, 16 * 5 * 0x20, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 26, v0, 1, 0, 32 * 24 * 2, 1, 62); NARC_dtor(v1); @@ -783,8 +783,8 @@ static int ov94_0223F190(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_06, ¶m0->unk_10E4->unk_04); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Window_Remove(¶m0->unk_F9C[1]); Sound_PlayEffect(1500); @@ -814,7 +814,7 @@ static int ov94_0223F2B0(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_0A, ¶m0->unk_10E4->unk_08); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[1], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[1], 0); Sound_PlayEffect(1500); param0->unk_2C = 4; ov94_02242AC4(¶m0->unk_111C, param0->unk_10E4->unk_06 + param0->unk_10E4->unk_04, param0->unk_10E4->unk_0A, param0->unk_10E4->unk_08); @@ -822,8 +822,8 @@ static int ov94_0223F2B0(UnkStruct_ov94_0223FD4C *param0) default: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_0A, ¶m0->unk_10E4->unk_08); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - Window_Clear(¶m0->unk_F9C[1], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[1], 0); Window_Remove(¶m0->unk_F9C[0]); Window_Remove(¶m0->unk_F9C[1]); @@ -875,8 +875,8 @@ static int ov94_0223F4B0(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); param0->unk_2C = 0; @@ -886,7 +886,7 @@ static int ov94_0223F4B0(UnkStruct_ov94_0223FD4C *param0) case 2: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); @@ -932,8 +932,8 @@ static int ov94_0223F638(UnkStruct_ov94_0223FD4C *param0) case 11: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); param0->unk_2C = 0; @@ -941,7 +941,7 @@ static int ov94_0223F638(UnkStruct_ov94_0223FD4C *param0) default: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); ov94_02242934(¶m0->unk_B7A, v0, 1); @@ -987,15 +987,15 @@ static int ov94_0223F7C0(UnkStruct_ov94_0223FD4C *param0) } else if ((v0 == 0xfffffffe) || (v0 == (Unk_ov94_02245FD4 + 1))) { ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); param0->unk_2C = 0; } else { ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); @@ -1077,7 +1077,7 @@ static void ov94_0223F9A4(UnkStruct_ov94_0223FD4C *param0, int param1, int param MessageLoader_GetStrbuf(param0->unk_B90, param1, param0->unk_BAC); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); } diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index e96588a680..b4a9cd3e1d 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -31,12 +31,12 @@ #include "party.h" #include "pokemon.h" #include "pokemon_icon.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020393C8.h" #include "unk_020797C8.h" @@ -297,8 +297,8 @@ static void ov94_0223FD4C(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPaletteFromOpenNARC(v1, 2, 0, 0, 16 * 3 * 2, 62); Graphics_LoadPaletteFromOpenNARC(v1, 5, 4, 0, 16 * 8 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 12, v0, 1, 0, 16 * 5 * 0x20, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 24, v0, 1, 0, 32 * 24 * 2, 1, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 29, v0, 2, 0, 32 * 24 * 2, 1, 62); @@ -692,7 +692,7 @@ static int ov94_022405DC(UnkStruct_ov94_0223FD4C *param0) v0.choices = param0->unk_10CC; v0.window = ¶m0->unk_F9C[0]; - Window_Show(¶m0->unk_F9C[0], 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_F9C[0], 1, (1 + (18 + 12)), 11); param0->unk_10D4 = Menu_NewAndCopyToVRAM(&v0, 9, 0, 0, 62, PAD_BUTTON_B); param0->unk_2C = 8; @@ -708,14 +708,14 @@ static int ov94_02240688(UnkStruct_ov94_0223FD4C *param0) case 1: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); param0->unk_2C = 2; ov94_0223C4C0(param0, 8, 5); break; case 2: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); v0 = ov94_022411DC(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112); @@ -754,8 +754,8 @@ static int ov94_02240688(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); param0->unk_2C = 1; break; } @@ -784,7 +784,7 @@ static int ov94_02240830(UnkStruct_ov94_0223FD4C *param0) v0.window = ¶m0->unk_F9C[0]; Window_FillTilemap(v0.window, 0xf0f); - Window_Show(¶m0->unk_F9C[0], 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_F9C[0], 1, (1 + (18 + 12)), 11); param0->unk_10D4 = Menu_NewAndCopyToVRAM(&v0, 9, 0, 0, 62, PAD_BUTTON_B); param0->unk_2C = 10; @@ -800,14 +800,14 @@ static int ov94_022408E8(UnkStruct_ov94_0223FD4C *param0) case 1: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); param0->unk_2C = 2; ov94_0223C4C0(param0, 8, 6); break; case 2: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); v0 = ov94_022411DC(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112); @@ -843,8 +843,8 @@ static int ov94_022408E8(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: Menu_Free(param0->unk_10D4, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); param0->unk_2C = 1; break; } @@ -912,7 +912,7 @@ static int ov94_02240B70(UnkStruct_ov94_0223FD4C *param0) if (v0 != 0xffffffff) { if (v0 == 0xfffffffe) { - sub_0200E084(¶m0->unk_109C, 0); + Window_EraseMessageBox(¶m0->unk_109C, 0); param0->unk_2C = 1; } else { ov94_02240BB0(param0); @@ -970,7 +970,7 @@ static int ov94_02240CA8(UnkStruct_ov94_0223FD4C *param0) if (v0 != 0xffffffff) { if (v0 == 0xfffffffe) { - sub_0200E084(¶m0->unk_109C, 0); + Window_EraseMessageBox(¶m0->unk_109C, 0); param0->unk_2C = 1; } else { param0->unk_114 = ov94_022411DC(param0->unk_00->unk_08, param0->unk_00->unk_0C, param0->unk_110, param0->unk_112); @@ -994,7 +994,7 @@ static int ov94_02240D08(UnkStruct_ov94_0223FD4C *param0) static int ov94_02240D28(UnkStruct_ov94_0223FD4C *param0) { if (Text_IsPrinterActive(param0->unk_BE0) == 0) { - sub_0200E084(¶m0->unk_109C, 0); + Window_EraseMessageBox(¶m0->unk_109C, 0); param0->unk_2C = param0->unk_30; } @@ -1016,7 +1016,7 @@ static void ov94_02240D58(UnkStruct_ov94_0223FD4C *param0, int param1, int param } Window_FillTilemap(v0, 0xf0f); - sub_0200E060(v0, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(v0, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(v0, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index aac5c45aaa..93ded0e5a2 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -33,13 +33,13 @@ #include "message_util.h" #include "narc.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202631C.h" #include "unk_0202C858.h" @@ -324,7 +324,7 @@ static void ov94_0224158C(UnkStruct_ov94_0223FD4C *param0, int param1, int param StringTemplate_Format(param0->unk_B8C, param0->unk_BAC, v0); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param2, NULL); @@ -454,8 +454,8 @@ static void ov94_0224170C(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPalette(104, 1, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayer(104, 11, v0, 1, 0, 16 * 5 * 0x20, 1, 62); Graphics_LoadTilemapToBgLayer(104, 23, v0, 1, 0, 32 * 24 * 2, 1, 62); } @@ -571,8 +571,8 @@ static int ov94_02241A58(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_06, ¶m0->unk_10E4->unk_04); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Window_Remove(¶m0->unk_F9C[1]); ov94_0223C4C0(param0, 5, 5); @@ -624,7 +624,7 @@ static int ov94_02241BAC(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_0A, ¶m0->unk_10E4->unk_08); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[1], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[1], 0); Window_Remove(¶m0->unk_F9C[0]); Window_Remove(¶m0->unk_F9C[1]); param0->unk_2C = 0; @@ -634,8 +634,8 @@ static int ov94_02241BAC(UnkStruct_ov94_0223FD4C *param0) default: ListMenu_Free(param0->unk_10D8, ¶m0->unk_10E4->unk_0A, ¶m0->unk_10E4->unk_08); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - Window_Clear(¶m0->unk_F9C[1], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[1], 0); Window_Remove(¶m0->unk_F9C[0]); Window_Remove(¶m0->unk_F9C[1]); param0->unk_B74.unk_00 = v0; @@ -686,8 +686,8 @@ static int ov94_02241DA0(UnkStruct_ov94_0223FD4C *param0) case 0xfffffffe: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); param0->unk_2C = 0; @@ -698,7 +698,7 @@ static int ov94_02241DA0(UnkStruct_ov94_0223FD4C *param0) case 2: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); param0->unk_B74.unk_02 = v0 + 1; @@ -741,8 +741,8 @@ static int ov94_02241F28(UnkStruct_ov94_0223FD4C *param0) case 12: ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); - sub_0200E084(¶m0->unk_F5C, 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); + Window_EraseMessageBox(¶m0->unk_F5C, 0); Window_Remove(¶m0->unk_F9C[0]); Sound_PlayEffect(1500); @@ -756,7 +756,7 @@ static int ov94_02241F28(UnkStruct_ov94_0223FD4C *param0) Sound_PlayEffect(1500); ListMenu_Free(param0->unk_10D8, NULL, NULL); StringList_Free(param0->unk_10CC); - Window_Clear(¶m0->unk_F9C[0], 0); + Window_EraseStandardFrame(¶m0->unk_F9C[0], 0); Window_Remove(¶m0->unk_F9C[0]); ov94_02242934(¶m0->unk_B74, v0, 0); param0->unk_2C = 13; @@ -1106,7 +1106,7 @@ ListMenu *ov94_022426A8(UnkStruct_ov94_0223FD4C *param0, StringList **param1, Wi v0.choices = *param1; v0.window = param2; - Window_Show(param2, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param2, 0, (1 + (18 + 12)), 11); return ListMenu_New(&v0, param0->unk_10E4->unk_06, param0->unk_10E4->unk_04, 62); } @@ -1182,7 +1182,7 @@ ListMenu *ov94_022427C0(UnkStruct_ov94_0223FD4C *param0, StringList **param1, Wi v0.choices = *param1; v0.window = param2; - Window_Show(param2, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param2, 0, (1 + (18 + 12)), 11); return ListMenu_New(&v0, param0->unk_111C.unk_04[v3], param0->unk_111C.unk_16[v3], 62); } @@ -1210,7 +1210,7 @@ ListMenu *ov94_02242840(StringList **param0, Window *param1, MessageLoader *para v0.choices = *param0; v0.window = param1; - Window_Show(param1, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param1, 0, (1 + (18 + 12)), 11); return ListMenu_New(&v0, 0, 0, 62); } @@ -1241,7 +1241,7 @@ ListMenu *ov94_022428B0(StringList **param0, Window *param1, MessageLoader *para v0.choices = *param0; v0.window = param1; - Window_Show(param1, 0, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param1, 0, (1 + (18 + 12)), 11); return ListMenu_New(&v0, 0, 0, 62); } @@ -1306,7 +1306,7 @@ ListMenu *ov94_022429B4(StringList **param0, Window *param1, MessageLoader *para v0.choices = *param0; v0.window = param1; - Window_Show(param1, 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(param1, 1, (1 + (18 + 12)), 11); return ListMenu_New(&v0, 0, 0, 62); } diff --git a/src/overlay094/ov94_02242AD0.c b/src/overlay094/ov94_02242AD0.c index bc48f4ebc7..a4c9591c38 100644 --- a/src/overlay094/ov94_02242AD0.c +++ b/src/overlay094/ov94_02242AD0.c @@ -33,11 +33,11 @@ #include "journal.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202CC64.h" #include "unk_0202DA40.h" @@ -328,8 +328,8 @@ static void ov94_02242CAC(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPalette(104, 0, 0, 0, 16 * 3 * 2, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); if (param0->unk_10F0 == 0) { Bg_ToggleLayer(4, 0); diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index 8d0466bf44..95ae3f34af 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -19,10 +19,10 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02025CB0.h" #include "unk_0202ACE0.h" @@ -276,8 +276,8 @@ static void ov94_02244B8C(UnkStruct_ov94_0223FD4C *param0) Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 62); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 62); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 62); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 62); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_24), 62); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 62); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 62); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 62); @@ -746,7 +746,7 @@ static int ov94_02245540(UnkStruct_ov94_0223FD4C *param0) static int ov94_02245564(UnkStruct_ov94_0223FD4C *param0) { if (gCoreSys.pressedKeys & PAD_BUTTON_A || gCoreSys.pressedKeys & PAD_BUTTON_B) { - Window_Clear(¶m0->unk_F8C, 0); + Window_EraseStandardFrame(¶m0->unk_F8C, 0); param0->unk_2C = 0; } @@ -904,7 +904,7 @@ void ov94_02245824(UnkStruct_ov94_0223FD4C *param0, MessageLoader *param1, int p StringTemplate_Format(param0->unk_B8C, param0->unk_BAC, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_F5C, 0xf0f); - sub_0200E060(¶m0->unk_F5C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_F5C, 0, 1, 10); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F5C, FONT_MESSAGE, param0->unk_BAC, 0, 0, param3, NULL); param0->unk_10E0 = 0; @@ -954,7 +954,7 @@ static void ov94_0224593C(UnkStruct_ov94_0223FD4C *param0, int param1) StringTemplate_Format(param0->unk_B8C, param0->unk_BDC, v0); Window_FillTilemap(¶m0->unk_F8C, 15); - Window_Show(¶m0->unk_F8C, 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_F8C, 1, (1 + (18 + 12)), 11); param0->unk_BE0 = Text_AddPrinterWithParams(¶m0->unk_F8C, FONT_MESSAGE, param0->unk_BDC, 0, 0, TEXT_SPEED_INSTANT, NULL); @@ -972,7 +972,7 @@ static void ov94_022459B4(UnkStruct_ov94_0223FD4C *param0, int param1, int param } StringTemplate_SetNumber(param0->unk_B8C, 0, param2, 5, 2, 1); - sub_0200E084(¶m0->unk_F5C, 1); + Window_EraseMessageBox(¶m0->unk_F5C, 1); ov94_0224593C(param0, v0); } diff --git a/src/overlay095/ov95_02247B6C.c b/src/overlay095/ov95_02247B6C.c index 7af2480ec1..a6135e663f 100644 --- a/src/overlay095/ov95_02247B6C.c +++ b/src/overlay095/ov95_02247B6C.c @@ -24,6 +24,7 @@ #include "message.h" #include "narc.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -31,7 +32,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200762C.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202419C.h" #include "unk_020393C8.h" @@ -256,7 +256,7 @@ static int ov95_02247CB4(UnkStruct_ov95_02247C6C *param0, int *param1) Bg_FillTilesRange(param0->unk_54, 1, 0x0, 1, 0); Bg_FillTilemapRect(param0->unk_54, 1, 0x0, 0, 0, 32, 32, 0); - sub_0200DD0C(param0->unk_54, 1, 109, 2, ov95_02247674(param0->unk_00), 58); + LoadMessageBoxGraphics(param0->unk_54, 1, 109, 2, ov95_02247674(param0->unk_00), 58); Window_Add(param0->unk_54, &(param0->unk_58), 1, 2, 19, 27, 4, 1, 1); Window_FillTilemap(&(param0->unk_58), 0xf); @@ -332,7 +332,7 @@ static int ov95_02247F04(UnkStruct_ov95_02247C6C *param0, int *param1) MessageLoader_GetStrbuf(v0, v2, param0->unk_68); StringTemplate_Format(v1, param0->unk_6C, param0->unk_68); Text_AddPrinterWithParams(&(param0->unk_58), FONT_MESSAGE, param0->unk_6C, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); - sub_0200E010(&(param0->unk_58), 109, 2); + Window_DrawMessageBox(&(param0->unk_58), 109, 2); Window_CopyToVRAM(&(param0->unk_58)); param0->unk_08 = 0; (*param1) = v3; @@ -367,7 +367,7 @@ static int ov95_02247F04(UnkStruct_ov95_02247C6C *param0, int *param1) break; case 3: if (++(param0->unk_08) > 60) { - sub_0200E084(&(param0->unk_58), 0); + Window_EraseMessageBox(&(param0->unk_58), 0); param0->unk_08 = 0; (*param1)++; } diff --git a/src/overlay095/ov95_0224B3D8.c b/src/overlay095/ov95_0224B3D8.c index 57d3abce28..58aae9c652 100644 --- a/src/overlay095/ov95_0224B3D8.c +++ b/src/overlay095/ov95_0224B3D8.c @@ -25,6 +25,7 @@ #include "message.h" #include "narc.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -32,7 +33,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200762C.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202419C.h" @@ -284,7 +284,7 @@ static int ov95_0224B520(UnkStruct_ov95_0224B4D4 *param0, int *param1) Bg_FillTilesRange(param0->unk_58, 1, 0x0, 1, 0); Bg_FillTilemapRect(param0->unk_58, 1, 0x0, 0, 0, 32, 32, 0); - sub_0200DD0C(param0->unk_58, 1, 109, 2, ov95_02247674(param0->unk_00), 58); + LoadMessageBoxGraphics(param0->unk_58, 1, 109, 2, ov95_02247674(param0->unk_00), 58); Window_Add(param0->unk_58, &(param0->unk_5C), 1, 2, 19, 27, 4, 1, 1); Window_FillTilemap(&(param0->unk_5C), 0xf); @@ -407,7 +407,7 @@ static int ov95_0224B81C(UnkStruct_ov95_0224B4D4 *param0, int *param1) StringTemplate_Format(v1, param0->unk_70, param0->unk_6C); Text_AddPrinterWithParams(&(param0->unk_5C), FONT_MESSAGE, param0->unk_70, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); - sub_0200E010(&(param0->unk_5C), 109, 2); + Window_DrawMessageBox(&(param0->unk_5C), 109, 2); Window_CopyToVRAM(&(param0->unk_5C)); sub_02006150(1156); @@ -432,7 +432,7 @@ static int ov95_0224B81C(UnkStruct_ov95_0224B4D4 *param0, int *param1) break; case 3: if (ov95_0224B990(param0, 60)) { - sub_0200E084(&(param0->unk_5C), 0); + Window_EraseMessageBox(&(param0->unk_5C), 0); param0->unk_08 = 0; (*param1)++; } diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index 1a95de97f5..54c16487df 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -26,12 +26,12 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02025CB0.h" #include "unk_0202D05C.h" @@ -355,8 +355,8 @@ static void ov96_0223BF40(UnkStruct_ov96_0223BF40 *param0) Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 68); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 68); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 68); - sub_0200DD0C(v0, 0, 1, 14, Options_Frame(param0->unk_00->unk_10), 68); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 68); + LoadMessageBoxGraphics(v0, 0, 1, 14, Options_Frame(param0->unk_00->unk_10), 68); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 68); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 68); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 68); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 68); @@ -869,7 +869,7 @@ static int ov96_0223C9F8(UnkStruct_ov96_0223BF40 *param0) static int ov96_0223CA28(UnkStruct_ov96_0223BF40 *param0) { - Window_Show(¶m0->unk_E58, 0, (1 + (18 + 12)), 14); + Window_DrawStandardFrame(¶m0->unk_E58, 0, (1 + (18 + 12)), 14); ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); ov96_0223D950(param0, 0, 1); Window_CopyToVRAM(¶m0->unk_E58); @@ -1134,7 +1134,7 @@ static int ov96_0223CF5C(UnkStruct_ov96_0223BF40 *param0) { param0->unk_90 = 1; - Window_Show(¶m0->unk_E48, 0, (1 + (18 + 12)), 14); + Window_DrawStandardFrame(¶m0->unk_E48, 0, (1 + (18 + 12)), 14); ov96_0223D90C(¶m0->unk_E48, param0->unk_BE8, param0->unk_90, 2); ov96_0223D950(param0, 1, 1); Window_CopyToVRAM(¶m0->unk_E48); @@ -1189,7 +1189,7 @@ static int ov96_0223D0B0(UnkStruct_ov96_0223BF40 *param0) { param0->unk_98 = 1; - Window_Show(¶m0->unk_E58, 0, (1 + (18 + 12)), 14); + Window_DrawStandardFrame(¶m0->unk_E58, 0, (1 + (18 + 12)), 14); ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); ov96_0223D950(param0, 0, 1); Window_CopyToVRAM(¶m0->unk_E58); @@ -1559,7 +1559,7 @@ static void ov96_0223D750(UnkStruct_ov96_0223BF40 *param0, MessageLoader *param1 StringTemplate_Format(param0->unk_BCC, param0->unk_BDC, v0); Window_FillTilemap(¶m0->unk_E38, 0xf0f); - sub_0200E060(¶m0->unk_E38, 0, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_E38, 0, 1, 14); param0->unk_BF0 = Text_AddPrinterWithParams(¶m0->unk_E38, FONT_MESSAGE, param0->unk_BDC, 0, 0, param3, NULL); @@ -1581,7 +1581,7 @@ static int ov96_0223D7B8(UnkStruct_ov96_0223BF40 *param0) static int ov96_0223D7E4(UnkStruct_ov96_0223BF40 *param0) { if (gCoreSys.pressedKeys & PAD_BUTTON_A || gCoreSys.pressedKeys & PAD_BUTTON_B) { - Window_Clear(¶m0->unk_E78, 0); + Window_EraseStandardFrame(¶m0->unk_E78, 0); param0->unk_1C = 0; } @@ -1592,7 +1592,7 @@ static void ov96_0223D814(UnkStruct_ov96_0223BF40 *param0, MessageLoader *param1 { MessageLoader_GetStrbuf(param1, param2, param0->unk_BDC); Window_FillTilemap(¶m0->unk_E38, 0xf0f); - sub_0200E060(¶m0->unk_E38, 0, 1, 14); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_E38, 0, 1, 14); param0->unk_BF0 = Text_AddPrinterWithParams(¶m0->unk_E38, FONT_MESSAGE, param0->unk_BDC, 0, 0, param3, NULL); } @@ -1650,14 +1650,14 @@ static void ov96_0223D950(UnkStruct_ov96_0223BF40 *param0, int param1, int param static void ov96_0223D978(UnkStruct_ov96_0223BF40 *param0) { if (param0->unk_F6C == NULL) { - param0->unk_F6C = sub_0200E7FC(¶m0->unk_E38, 1); + param0->unk_F6C = Window_AddWaitDial(¶m0->unk_E38, 1); } } static void ov96_0223D99C(UnkStruct_ov96_0223BF40 *param0) { if (param0->unk_F6C != NULL) { - DeleteWaitDial(param0->unk_F6C); + DestroyWaitDial(param0->unk_F6C); param0->unk_F6C = NULL; } } @@ -1669,7 +1669,7 @@ static void ov96_0223D9B8(UnkStruct_ov96_0223BF40 *param0, int param1) MessageLoader_GetStrbuf(param0->unk_BD8, param1, v0); StringTemplate_Format(param0->unk_BCC, param0->unk_BEC, v0); Window_FillTilemap(¶m0->unk_E78, 15); - Window_Show(¶m0->unk_E78, 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_E78, 1, (1 + (18 + 12)), 11); param0->unk_BF0 = Text_AddPrinterWithParams(¶m0->unk_E78, FONT_MESSAGE, param0->unk_BEC, 0, 0, TEXT_SPEED_INSTANT, NULL); @@ -1687,6 +1687,6 @@ static void ov96_0223DA34(UnkStruct_ov96_0223BF40 *param0, int param1, int param } StringTemplate_SetNumber(param0->unk_BCC, 0, param2, 5, 2, 1); - sub_0200E084(¶m0->unk_E38, 1); + Window_EraseMessageBox(¶m0->unk_E38, 1); ov96_0223D9B8(param0, v0); } diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index 530b72aa2d..5a18f9c558 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -27,6 +27,7 @@ #include "message_util.h" #include "overlay_manager.h" #include "play_time.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -37,7 +38,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -196,7 +196,7 @@ static BOOL ov97_0222AE64(UnkStruct_0222AE60 *param0) } else { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { Sound_PlayEffect(1500); - Window_Clear(¶m0->unk_158, 0); + Window_EraseStandardFrame(¶m0->unk_158, 0); Window_Remove(¶m0->unk_158); } @@ -334,7 +334,7 @@ static BOOL ov97_0222B07C(UnkStruct_0222AE60 *param0) return 1; case 16: - sub_0200DAA4(param0->unk_00, 1, 1, 2, 0, 81); + LoadStandardWindowGraphics(param0->unk_00, 1, 1, 2, 0, 81); Bg_ClearTilemap(param0->unk_00, 1); *((u16 *)HW_BG_PLTT + 33) = ((26 & 31) << 10 | (26 & 31) << 5 | (26 & 31)); param0->unk_12C = 17; @@ -468,8 +468,8 @@ static void ov97_0222B2EC(UnkStruct_0222AE60 *param0) *((u16 *)HW_BG_PLTT + 0) = ((0 & 31) << 10 | (0 & 31) << 5 | (0 & 31)); *((u16 *)HW_BG_PLTT + 31) = ((26 & 31) << 10 | (26 & 31) << 5 | (26 & 31)); - sub_0200DAA4(param0->unk_00, 0, 1, 2, 0, 81); - sub_0200DAA4(param0->unk_00, 0, (1 + 9), 3, 1, 81); + LoadStandardWindowGraphics(param0->unk_00, 0, 1, 2, 0, 81); + LoadStandardWindowGraphics(param0->unk_00, 0, (1 + 9), 3, 1, 81); *((u16 *)HW_BG_PLTT + 33) = ((26 & 31) << 10 | (26 & 31) << 5 | (26 & 31)); } @@ -604,7 +604,7 @@ static BOOL ov97_0222B5C0(void *param0, int param1, UnkStruct_ov97_02237808 *par ov97_0222B53C(param2->unk_10, v5, v4, v7, 18, 16 * 4); } - Window_Show(param2->unk_10, 0, param2->unk_38, param2->unk_3C); + Window_DrawStandardFrame(param2->unk_10, 0, param2->unk_38, param2->unk_3C); v6->unk_DC[param1] = Unk_ov97_0223E014[param1].unk_00; @@ -771,7 +771,7 @@ static BOOL ov97_0222B9BC(UnkStruct_0222AE60 *param0) if (param0->unk_DC[v2]) { Window_SetXPos(v1.unk_10, 3); Window_SetYPos(v1.unk_10, v3); - Window_Show(v1.unk_10, 0, v1.unk_38, v1.unk_3C); + Window_DrawStandardFrame(v1.unk_10, 0, v1.unk_38, v1.unk_3C); if (param0->unk_FC[v2]) { ov97_0222B4AC(param0, 26, v3, param0->unk_FC[v2]); @@ -807,10 +807,10 @@ static void ov97_0222BAD8(UnkStruct_0222AE60 *param0, int param1) } if (v0 == param1) { - Window_Show(¶m0->unk_5C[v0], 1, (1 + 9), 3); + Window_DrawStandardFrame(¶m0->unk_5C[v0], 1, (1 + 9), 3); Bg_ChangeTilemapRectPalette(param0->unk_00, 0, Window_GetXPos(¶m0->unk_5C[v0]), Window_GetYPos(¶m0->unk_5C[v0]), Window_GetWidth(¶m0->unk_5C[v0]), Window_GetHeight(¶m0->unk_5C[v0]), 0); } else { - Window_Show(¶m0->unk_5C[v0], 1, 1, 2); + Window_DrawStandardFrame(¶m0->unk_5C[v0], 1, 1, 2); Bg_ChangeTilemapRectPalette(param0->unk_00, 0, Window_GetXPos(¶m0->unk_5C[v0]), Window_GetYPos(¶m0->unk_5C[v0]), Window_GetWidth(¶m0->unk_5C[v0]), Window_GetHeight(¶m0->unk_5C[v0]), 1); } } diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 2948de2ead..18d0575c31 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -29,6 +29,7 @@ #include "message.h" #include "message_util.h" #include "overlay_manager.h" +#include "render_window.h" #include "rtc.h" #include "save_player.h" #include "savedata.h" @@ -39,7 +40,6 @@ #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0202631C.h" #include "unk_0202DAB4.h" #include "unk_02033200.h" @@ -542,11 +542,11 @@ static void ov97_0222C254(UnkStruct_ov97_0222C388 *param0) Text_ResetAllPrinters(); Font_LoadTextPalette(0, 0 * 32, param0->unk_00); - sub_0200DAA4(param0->unk_04, 0, 1, 1, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_04, 0, 1, 1, 0, param0->unk_00); v0 = Options_Frame(param0->unk_14); - sub_0200DD0C(param0->unk_04, 0, (1 + 9), 2, v0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_04, 0, (1 + 9), 2, v0, param0->unk_00); Graphics_LoadPalette(116, 0, 0, 16 * 2 * 8, 16 * 2, param0->unk_00); Graphics_LoadTilesToBgLayer(116, 1, param0->unk_04, 1, 0, 10 * 16 * 0x20, 1, param0->unk_00); Graphics_LoadTilemapToBgLayer(116, 2, param0->unk_04, 1, 0, 32 * 24 * 2, 1, param0->unk_00); @@ -576,7 +576,7 @@ static BOOL ov97_0222C404(UnkStruct_ov97_0222C388 *param0) return 1; } else { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - Window_Clear(¶m0->unk_18, 0); + Window_EraseStandardFrame(¶m0->unk_18, 0); Window_Remove(¶m0->unk_18); return 0; } @@ -900,7 +900,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) case UnkEnum_ov97_0222C6F8_02: ov97_02233120(); ov97_0222CAAC(param0, 1600); - param0->unk_34D8 = sub_0200E7FC(¶m0->unk_28, (1 + 9)); + param0->unk_34D8 = Window_AddWaitDial(¶m0->unk_28, (1 + 9)); *v3 = UnkEnum_ov97_0222C6F8_03; break; case UnkEnum_ov97_0222C6F8_03: @@ -933,7 +933,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) case UnkEnum_ov97_0222C6F8_29: ov97_0223795C(param0->unk_04, ¶m0->unk_48, 2, 19, 30); CellActor_SetDrawFlag(param0->unk_3170, 0); - DeleteWaitDial(param0->unk_34D8); + DestroyWaitDial(param0->unk_34D8); param0->unk_34D8 = NULL; Sound_PlayEffect(1500); param0->unk_160 = 1800; @@ -993,7 +993,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) case UnkEnum_ov97_0222C6F8_13: if (--param0->unk_160 == 0) { ov97_0223795C(param0->unk_04, ¶m0->unk_48, 2, 19, 72); - param0->unk_34D8 = sub_0200E7FC(¶m0->unk_28, (1 + 9)); + param0->unk_34D8 = Window_AddWaitDial(¶m0->unk_28, (1 + 9)); ov97_0222C974(param0); ov97_0223846C(param0->unk_08); *v3 = UnkEnum_ov97_0222C6F8_14; @@ -1064,7 +1064,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) ov97_0223795C(param0->unk_04, ¶m0->unk_48, 2, 19, 73); CellActor_SetDrawFlag(param0->unk_3170, 0); - DeleteWaitDial(param0->unk_34D8); + DestroyWaitDial(param0->unk_34D8); Sound_PlayEffect(1500); param0->unk_34D8 = NULL; @@ -1091,7 +1091,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) CellActor_SetDrawFlag(param0->unk_3170, 0); if (param0->unk_34D8) { - DeleteWaitDial(param0->unk_34D8); + DestroyWaitDial(param0->unk_34D8); } param0->unk_34D8 = NULL; @@ -1118,7 +1118,7 @@ int ov97_0222CB10(UnkStruct_ov97_0222C388 *param0) param0->unk_148 = 0; if (param0->unk_34D8) { - DeleteWaitDial(param0->unk_34D8); + DestroyWaitDial(param0->unk_34D8); } return 5; diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index de1f696c87..1b473351c8 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -36,6 +36,7 @@ #include "message_util.h" #include "overlay_manager.h" #include "pokemon.h" +#include "render_window.h" #include "rtc.h" #include "save_player.h" #include "savedata.h" @@ -51,7 +52,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200A328.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -211,11 +211,11 @@ static void ov97_0222D30C(UnkStruct_ov97_0222D04C *param0, int param1) { if (param1 == 1) { if (param0->unk_2A50 == NULL) { - param0->unk_2A50 = sub_0200E7FC(¶m0->unk_18, 1); + param0->unk_2A50 = Window_AddWaitDial(¶m0->unk_18, 1); } } else { if (param0->unk_2A50) { - DeleteWaitDial(param0->unk_2A50); + DestroyWaitDial(param0->unk_2A50); } param0->unk_2A50 = NULL; @@ -283,14 +283,14 @@ static void ov97_0222D40C(UnkStruct_ov97_0222D04C *param0, int param1) static void ov97_0222D444(Window *param0, u8 param1) { if (Window_IsInUse(param0) == 1) { - Window_Clear(param0, param1); + Window_EraseStandardFrame(param0, param1); } } static void ov97_0222D45C(Window *param0, u8 param1) { if (Window_IsInUse(param0) == 1) { - sub_0200E084(param0, param1); + Window_EraseMessageBox(param0, param1); } } @@ -481,7 +481,7 @@ static void ov97_0222D6F8(OverlayManager *param0, int param1) Window_Add(v2->unk_00, v1, 0, 23, 10, 6, 4, 0, (((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6) + 17 * 8)); } - Window_Show(v1, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v1, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E5A8, NELEMS(Unk_ov97_0223E5A8), v1, v0); } @@ -520,7 +520,7 @@ static int ov97_0222D798(OverlayManager *param0) Window_Add(v1->unk_00, v0, 0, 23, 10, 6, 4, 0, (((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6) + 17 * 8)); } - Window_Show(v0, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v0, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E598, NELEMS(Unk_ov97_0223E598), v0, 2); return 5; @@ -541,7 +541,7 @@ static int ov97_0222D814(OverlayManager *param0) Window_Add(v1->unk_00, v0, 0, 23, 10, 6, 4, 0, (((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6) + 17 * 8)); } - Window_Show(v0, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v0, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E568, NELEMS(Unk_ov97_0223E568), v0, 78); return 5; @@ -562,7 +562,7 @@ static int ov97_0222D884(OverlayManager *param0) Window_Add(v1->unk_00, v0, 0, 23, 10, 6, 4, 0, (((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6) + 17 * 8)); } - Window_Show(v0, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v0, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E578, NELEMS(Unk_ov97_0223E578), v0, 77); return 5; @@ -579,7 +579,7 @@ static void ov97_0222D8F4(OverlayManager *param0) Window_Add(v1->unk_00, v0, 0, 23, 10, 6, 4, 0, (((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6) + 17 * 8)); } - Window_Show(v0, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v0, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E588, NELEMS(Unk_ov97_0223E588), v0, 4); } @@ -680,7 +680,7 @@ static int ov97_0222DA84(OverlayManager *param0) Window_Add(v2->unk_00, v0, 0, 15, 9, 16, 8, 0, ((((1 + (18 + 12)) + 9) + 26 * 6) + 16 * 6)); } - Window_Show(v0, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v0, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, Unk_ov97_0223E5F0, 4, v0, 1); return 4; @@ -832,7 +832,7 @@ static void ov97_0222DDD0(OverlayManager *param0, int param1, u32 param2) Window_Add(v0->unk_00, v1, 0, 8, 7, 16, v4 * 2, 0, param1); } - Window_Show(v1, 1, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(v1, 1, (1 + (18 + 12)), 3); ov97_0222DD1C(param0, v2, v4, v1, param2); } @@ -858,7 +858,7 @@ static void ov97_0222DE78(OverlayManager *param0, Window *param1, u32 param2) Strbuf_Free(v0); } - sub_0200E060(param1, 0, 1, 2); + Window_DrawMessageBoxWithScrollCursor(param1, 0, 1, 2); MessageLoader_Free(v1->unk_10); StringTemplate_Free(v1->unk_0C); @@ -875,7 +875,7 @@ static void ov97_0222DF10(OverlayManager *param0, Window *param1, u16 *param2) Strbuf_CopyNumChars(v0, param2, 36); Window_FillTilemap(param1, Font_GetAttribute(FONT_SYSTEM, FONTATTR_BG_COLOR)); Text_AddPrinterWithParamsAndColor(param1, FONT_SYSTEM, v0, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); - Window_Show(param1, 0, (1 + (18 + 12)), 3); + Window_DrawStandardFrame(param1, 0, (1 + (18 + 12)), 3); Strbuf_Free(v0); } @@ -927,8 +927,8 @@ static BOOL ov97_0222DFD4(OverlayManager *param0, UnkStruct_ov97_0222D04C *param v0 = Options_Frame(param1->unk_08); - sub_0200DD0C(param1->unk_00, 0, 1, 2, v0, 86); - sub_0200DAA4(param1->unk_00, 0, (1 + (18 + 12)), 3, 1, 86); + LoadMessageBoxGraphics(param1->unk_00, 0, 1, 2, v0, 86); + LoadStandardWindowGraphics(param1->unk_00, 0, (1 + (18 + 12)), 3, 1, 86); *((u16 *)HW_BG_PLTT) = ((31 & 31) << 10 | (12 & 31) << 5 | (12 & 31)); diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index 943d507b13..bad8e22d1d 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -30,6 +30,7 @@ #include "message_util.h" #include "overlay_manager.h" #include "pokemon_icon.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -42,7 +43,6 @@ #include "trainer_info.h" #include "unk_02000C88.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202DAB4.h" #include "unk_02033200.h" @@ -276,14 +276,14 @@ static void ov97_022304AC(UnkStruct_ov97_02230868 *param0) static void ov97_02230500(Window *param0, u8 param1) { if (Window_IsInUse(param0) == 1) { - Window_Clear(param0, param1); + Window_EraseStandardFrame(param0, param1); } } static void ov97_02230518(Window *param0, u8 param1) { if (Window_IsInUse(param0) == 1) { - sub_0200E084(param0, param1); + Window_EraseMessageBox(param0, param1); } } @@ -379,7 +379,7 @@ static int ov97_02230778(OverlayManager *param0) ov97_02230868(v0); ov97_022305EC(&v0->unk_2C30, 63); - v0->unk_3E14 = sub_0200E7FC(&v0->unk_2C30, ((1 + 9) + 9)); + v0->unk_3E14 = Window_AddWaitDial(&v0->unk_2C30, ((1 + 9) + 9)); if (sub_0202DDA8(v0->unk_2C00, v0->unk_2C20) == 1) { sub_0202DC7C(v0->unk_2C00, v0->unk_2C20); @@ -388,7 +388,7 @@ static int ov97_02230778(OverlayManager *param0) } SaveData_Save(v0->unk_2C04); - DeleteWaitDial(v0->unk_3E14); + DestroyWaitDial(v0->unk_3E14); if (sub_0202DD88(v0->unk_2C00) == 0) { return 26; @@ -664,9 +664,9 @@ static int ov97_02230E04(UnkStruct_ov97_02230868 *param0, Window *param1, int pa } if (param1 == ¶m0->unk_2C30) { - sub_0200E060(param1, 0, ((1 + 9) + 9), 10); + Window_DrawMessageBoxWithScrollCursor(param1, 0, ((1 + 9) + 9), 10); } else { - Window_Show(param1, 0, (1 + 9), 14); + Window_DrawStandardFrame(param1, 0, (1 + 9), 14); } return param3 + v2->unk_0C * v2->unk_10; @@ -1013,7 +1013,7 @@ static void ov97_022314FC(UnkStruct_ov97_02230868 *param0, int param1, int *para param0->unk_2C94 = 1; *param2 = 21; ov97_02230E04(param0, ¶m0->unk_2C30, 17, 640); - param0->unk_3E14 = sub_0200E7FC(¶m0->unk_2C30, ((1 + 9) + 9)); + param0->unk_3E14 = Window_AddWaitDial(¶m0->unk_2C30, ((1 + 9) + 9)); } if (v0 == 2) { @@ -1054,9 +1054,9 @@ static int ov97_0223161C(OverlayManager *param0, int *param1) Text_ResetAllPrinters(); ov97_02230F98(v4, 0); Font_LoadTextPalette(0, 15 * 32, 87); - sub_0200DAA4(v4->unk_2A5C, 0, 1, 13, 0, 87); - sub_0200DAA4(v4->unk_2A5C, 0, (1 + 9), 14, 1, 87); - sub_0200DD0C(v4->unk_2A5C, 0, ((1 + 9) + 9), 10, v4->unk_2C0C, 87); + LoadStandardWindowGraphics(v4->unk_2A5C, 0, 1, 13, 0, 87); + LoadStandardWindowGraphics(v4->unk_2A5C, 0, (1 + 9), 14, 1, 87); + LoadMessageBoxGraphics(v4->unk_2A5C, 0, ((1 + 9) + 9), 10, v4->unk_2C0C, 87); ov97_02230C44(v4, 1, 0); ov97_02230C10(v4, 1, 3, param1); @@ -1129,8 +1129,8 @@ static int ov97_0223161C(OverlayManager *param0, int *param1) break; case 10: if (ov97_02231354(v4)) { - sub_0200E060(&v4->unk_2C30, 0, ((1 + 9) + 9), 10); - Window_Show(&v4->unk_2C40, 0, (1 + 9), 14); + Window_DrawMessageBoxWithScrollCursor(&v4->unk_2C30, 0, ((1 + 9) + 9), 10); + Window_DrawStandardFrame(&v4->unk_2C40, 0, (1 + 9), 14); GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); ov97_02231318(v4); *param1 = 5; @@ -1226,7 +1226,7 @@ static int ov97_0223161C(OverlayManager *param0, int *param1) if ((ov97_02231C84(v4) == 0) || (CommTiming_IsSyncState(0x93) == 1)) { ov97_022384F4(); ov97_02230E04(v4, &v4->unk_2C30, 17 + 1, 640); - DeleteWaitDial(v4->unk_3E14); + DestroyWaitDial(v4->unk_3E14); ov97_02231F1C(v4, param1, 25); } break; diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 75efc73c0d..be87e189e6 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -37,6 +37,7 @@ #include "pokemon.h" #include "pokemon_icon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -51,7 +52,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015920.h" #include "unk_02017728.h" @@ -482,9 +482,9 @@ static void ov97_02233DD0(UnkStruct_ov97_02234A2C *param0, UnkStruct_ov97_02233D if (param2 & 0x8) { if (param2 & 0x10) { - sub_0200E060(param1->unk_00, 0, (0x3F0 - (18 + 12)), 13); + Window_DrawMessageBoxWithScrollCursor(param1->unk_00, 0, (0x3F0 - (18 + 12)), 13); } else { - Window_Show(param1->unk_00, 0, 0x3F0, 14); + Window_DrawStandardFrame(param1->unk_00, 0, 0x3F0, 14); } } } @@ -1418,8 +1418,8 @@ static void ov97_02234E7C(UnkStruct_ov97_02234A2C *param0) static void ov97_02234ECC(UnkStruct_ov97_02234A2C *param0) { Font_LoadTextPalette(0, 14 * 32, 78); - sub_0200DAA4(param0->unk_20, 0, 0x3F0, 14, 0, 78); - sub_0200DD0C(param0->unk_20, 0, (0x3F0 - (18 + 12)), 13, param0->unk_1C, 78); + LoadStandardWindowGraphics(param0->unk_20, 0, 0x3F0, 14, 0, 78); + LoadMessageBoxGraphics(param0->unk_20, 0, (0x3F0 - (18 + 12)), 13, param0->unk_1C, 78); memset(¶m0->unk_490, 0, sizeof(UnkStruct_ov97_02233DAC)); @@ -1482,8 +1482,8 @@ static void ov97_02234F88(UnkStruct_ov97_02234A2C *param0) Bg_CopyTilemapBufferToVRAM(param0->unk_20, 2); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 0); Font_LoadTextPalette(0, 14 * 32, 78); - sub_0200DAA4(param0->unk_20, 0, 0x3F0, 14, 0, 78); - sub_0200DD0C(param0->unk_20, 0, (0x3F0 - (18 + 12)), 13, param0->unk_1C, 78); + LoadStandardWindowGraphics(param0->unk_20, 0, 0x3F0, 14, 0, 78); + LoadMessageBoxGraphics(param0->unk_20, 0, (0x3F0 - (18 + 12)), 13, param0->unk_1C, 78); ov97_02234ECC(param0); param0->unk_490.unk_34 = 10; @@ -1493,7 +1493,7 @@ static void ov97_02234F88(UnkStruct_ov97_02234A2C *param0) static void ov97_02235158(Window *param0) { if (param0->bgConfig) { - sub_0200E084(param0, 0); + Window_EraseMessageBox(param0, 0); Window_ClearAndCopyToVRAM(param0); Window_Remove(param0); } @@ -1933,7 +1933,7 @@ static int ov97_022356E8(OverlayManager *param0, int *param1) v3->unk_490.unk_44 = 0; v3->unk_490.unk_34 = 40; ov97_02233DD0(v3, &v3->unk_490, 0); - v3->unk_E8F0.unk_08 = sub_0200E7FC(&v3->unk_4FC, (0x3F0 - (18 + 12))); + v3->unk_E8F0.unk_08 = Window_AddWaitDial(&v3->unk_4FC, (0x3F0 - (18 + 12))); *param1 = 10; break; case 2: @@ -1944,7 +1944,7 @@ static int ov97_022356E8(OverlayManager *param0, int *param1) break; case 10: ov97_02233CE4(v3); - DeleteWaitDial(v3->unk_E8F0.unk_08); + DestroyWaitDial(v3->unk_E8F0.unk_08); v3->unk_04 = 7; *param1 = 11; break; @@ -2074,7 +2074,7 @@ static int ov97_022356E8(OverlayManager *param0, int *param1) ov97_02233DD0(v3, &v3->unk_490, 0); sub_02015A54(v3->unk_E8EC); v3->unk_E8F0.unk_00 = 0; - v3->unk_E8F0.unk_08 = sub_0200E7FC(&v3->unk_4FC, (0x3F0 - (18 + 12))); + v3->unk_E8F0.unk_08 = Window_AddWaitDial(&v3->unk_4FC, (0x3F0 - (18 + 12))); *param1 = 21; ResetLock(4); break; @@ -2092,7 +2092,7 @@ static int ov97_022356E8(OverlayManager *param0, int *param1) v2 = ov97_02233B8C(v3); if (v2 != 10) { - DeleteWaitDial(v3->unk_E8F0.unk_08); + DestroyWaitDial(v3->unk_E8F0.unk_08); Sound_PlayEffect(1563); if (v2 == 11) { diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 4c4d6f7829..b472cba433 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -29,6 +29,7 @@ #include "message_util.h" #include "overlay_manager.h" #include "pokemon.h" +#include "render_window.h" #include "savedata.h" #include "sprite_resource.h" #include "strbuf.h" @@ -38,7 +39,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_02017728.h" @@ -284,9 +284,9 @@ int ov97_0223795C(BgConfig *param0, UnkStruct_ov97_02237808 *param1, int param2, if (param1->unk_04 == 1) { if (param1->unk_00 == 0) { - Window_Show(param1->unk_10, 0, param1->unk_38, param1->unk_3C); + Window_DrawStandardFrame(param1->unk_10, 0, param1->unk_38, param1->unk_3C); } else { - sub_0200E060(param1->unk_10, 0, param1->unk_38, param1->unk_3C); + Window_DrawMessageBoxWithScrollCursor(param1->unk_10, 0, param1->unk_38, param1->unk_3C); } } diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index 9c197b09a9..dcc73bd60a 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -30,6 +30,7 @@ #include "narc.h" #include "overlay_manager.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -38,7 +39,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -626,9 +626,9 @@ static void ov98_02247704 (UnkStruct_ov98_02247704 * param0) Graphics_LoadPaletteFromOpenNARC(v1, 3, 4, 0, 0, 109); Font_LoadScreenIndicatorsPalette(0, 13 * 0x20, 109); Font_LoadScreenIndicatorsPalette(4, 13 * 0x20, 109); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_08), 109); - sub_0200DAA4(v0, 0, (1 + (18 + 12)), 11, 0, 109); - sub_0200DAA4(v0, 2, (1 + (18 + 12)), 11, 0, 109); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_00->unk_08), 109); + LoadStandardWindowGraphics(v0, 0, (1 + (18 + 12)), 11, 0, 109); + LoadStandardWindowGraphics(v0, 2, (1 + (18 + 12)), 11, 0, 109); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 2, v0, 1, 0, 0, 0, 109); Graphics_LoadTilemapToBgLayerFromOpenNARC(v1, 5, v0, 1, 0, 32 * 24 * 2, 0, 109); Graphics_LoadTilesToBgLayerFromOpenNARC(v1, 10, v0, 5, 0, 0, 0, 109); @@ -682,14 +682,14 @@ static void ov98_02247AE8 (UnkStruct_ov98_02247704 * param0, int param1, int par static void ov98_02247AF0 (UnkStruct_ov98_02247704 * param0) { if (param0->unk_8C == NULL) { - param0->unk_8C = sub_0200E7FC(¶m0->unk_48, 1); + param0->unk_8C = Window_AddWaitDial(¶m0->unk_48, 1); } } static void ov98_02247B0C (UnkStruct_ov98_02247704 * param0) { if (param0->unk_8C != NULL) { - DeleteWaitDial(param0->unk_8C); + DestroyWaitDial(param0->unk_8C); param0->unk_8C = NULL; } } @@ -753,8 +753,8 @@ static int ov98_02247B98 (UnkStruct_ov98_02247704 * param0) v2.choices = param0->unk_A0; param0->unk_A4 = ListMenu_New(&v2, 0, 0, 109); - Window_Show(¶m0->unk_78, 1, (1 + (18 + 12)), 11); - sub_0200E084(¶m0->unk_48, 1); + Window_DrawStandardFrame(¶m0->unk_78, 1, (1 + (18 + 12)), 11); + Window_EraseMessageBox(¶m0->unk_48, 1); Window_CopyToVRAM(¶m0->unk_78); } @@ -782,7 +782,7 @@ static int ov98_02247B98 (UnkStruct_ov98_02247704 * param0) default: StringList_Free(param0->unk_A0); ListMenu_Free(param0->unk_A4, NULL, NULL); - Window_Clear(¶m0->unk_78, 1); + Window_EraseStandardFrame(¶m0->unk_78, 1); Window_ClearAndCopyToVRAM(¶m0->unk_78); Window_Remove(¶m0->unk_78); param0->unk_08 = param0->unk_9C; @@ -1092,7 +1092,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) mov r1, #1 mov r2, #0x1f mov r3, #0xb - bl Window_Show + bl Window_DrawStandardFrame add r0, r5, #0 add r0, #0xc4 bl Window_CopyToVRAM @@ -1105,7 +1105,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) mov r1, #1 mov r2, #0x1f mov r3, #0xb - bl Window_Show + bl Window_DrawStandardFrame add r0, r5, #0 add r0, #0xd4 bl Window_CopyToVRAM @@ -1121,7 +1121,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) add r0, r5, #0 add r0, #0x48 mov r1, #1 - bl sub_0200E084 + bl Window_EraseMessageBox add r0, r5, #0 add r0, #0x48 bl Window_ClearAndCopyToVRAM @@ -1318,7 +1318,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) _02248614: add r0, #0xc4 mov r1, #0 - bl Window_Clear + bl Window_EraseStandardFrame add r0, r5, #0 add r0, #0xc4 bl Window_ClearAndCopyToVRAM @@ -1328,7 +1328,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) add r0, r5, #0 add r0, #0xd4 mov r1, #0 - bl Window_Clear + bl Window_EraseStandardFrame add r0, r5, #0 add r0, #0xd4 bl Window_ClearAndCopyToVRAM @@ -2194,7 +2194,7 @@ static int ov98_02249414 (UnkStruct_ov98_02247704 * param0) static int ov98_02249438 (UnkStruct_ov98_02247704 * param0) { if (gCoreSys.pressedKeys & PAD_BUTTON_A || gCoreSys.pressedKeys & PAD_BUTTON_B) { - Window_Clear(¶m0->unk_68, 0); + Window_EraseStandardFrame(¶m0->unk_68, 0); param0->unk_08 = 0; } @@ -2384,7 +2384,7 @@ static void ov98_02249714 (UnkStruct_ov98_02247704 * param0, MessageLoader * par StringTemplate_Format(param0->unk_20, param0->unk_38, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_48, 0xf0f); - sub_0200E060(¶m0->unk_48, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_48, 0, 1, 10); param0->unk_44 = Text_AddPrinterWithParams(¶m0->unk_48, FONT_MESSAGE, param0->unk_38, 0, 0, param3, NULL); param0->unk_90 = 0; @@ -2485,7 +2485,7 @@ static void ov98_02249900 (UnkStruct_ov98_02247704 * param0, int param1) StringTemplate_Format(param0->unk_20, param0->unk_40, v0); Window_FillTilemap(¶m0->unk_68, 15); - Window_Show(¶m0->unk_68, 1, (1 + (18 + 12)), 11); + Window_DrawStandardFrame(¶m0->unk_68, 1, (1 + (18 + 12)), 11); param0->unk_44 = Text_AddPrinterWithParams(¶m0->unk_68, FONT_MESSAGE, param0->unk_40, 0, 0, TEXT_SPEED_INSTANT, NULL); param0->unk_44 = 0xff; @@ -2505,7 +2505,7 @@ static void ov98_02249964 (UnkStruct_ov98_02247704 * param0, int param1, int par StringTemplate_SetNumber(param0->unk_20, 0, param2, 5, 2, 1); - sub_0200E084(¶m0->unk_48, 1); + Window_EraseMessageBox(¶m0->unk_48, 1); ov98_02249900(param0, v0); } diff --git a/src/overlay100/ov100_021D0D80.c b/src/overlay100/ov100_021D0D80.c index 3a59d68427..ae4cd059b6 100644 --- a/src/overlay100/ov100_021D0D80.c +++ b/src/overlay100/ov100_021D0D80.c @@ -25,9 +25,9 @@ #include "narc.h" #include "overlay_manager.h" #include "palette.h" +#include "render_window.h" #include "unk_020041CC.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -75,10 +75,10 @@ int ov100_021D0D80(OverlayManager *param0, int *param1) Window_FillTilemap(v1, 0xFF); Window_CopyToVRAM(v1); - sub_0200DD0C(v0->unk_0C.unk_0C, 1, 500, 15, v2, 111); - PaletteData_LoadBufferFromFileStart(v0->unk_0C.unk_10, 38, sub_0200DD08(v2), 111, 0, 0x20, 15 * 16); + LoadMessageBoxGraphics(v0->unk_0C.unk_0C, 1, 500, 15, v2, 111); + PaletteData_LoadBufferFromFileStart(v0->unk_0C.unk_10, 38, GetMessageBoxPaletteNARCMember(v2), 111, 0, 0x20, 15 * 16); PaletteData_LoadBufferFromFileStart(v0->unk_0C.unk_10, 14, 7, 111, 0, 0x20, 14 * 16); - sub_0200E060(v1, 0, 500, 15); + Window_DrawMessageBoxWithScrollCursor(v1, 0, 500, 15); ov100_021D4788(&v0->unk_0C); } @@ -144,7 +144,7 @@ int ov100_021D0F44(OverlayManager *param0, int *param1) SetMainCallback(NULL, NULL); DisableHBlank(); - sub_0200E084(&v0->unk_0C.unk_30, 1); + Window_EraseMessageBox(&v0->unk_0C.unk_30, 1); Window_ClearAndCopyToVRAM(&v0->unk_0C.unk_30); Window_Remove(&v0->unk_0C.unk_30); diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index 7856a5845b..218f8035f7 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -21,11 +21,11 @@ #include "message.h" #include "narc.h" #include "palette.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "trainer_info.h" -#include "unk_0200DA60.h" int ov100_021D46C8(UnkStruct_ov100_021D46C8 *param0, UnkStruct_020985E4 *param1, int param2) { @@ -56,7 +56,7 @@ int ov100_021D46C8(UnkStruct_ov100_021D46C8 *param0, UnkStruct_020985E4 *param1, v0 = Text_AddPrinterWithParams(¶m0->unk_30, FONT_MESSAGE, v3, 0, 0, v4, NULL); Window_CopyToVRAM(¶m0->unk_30); - sub_0200E060(¶m0->unk_30, 0, 500, 15); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_30, 0, 500, 15); Strbuf_Free(v2); Strbuf_Free(v3); @@ -67,7 +67,7 @@ int ov100_021D46C8(UnkStruct_ov100_021D46C8 *param0, UnkStruct_020985E4 *param1, void ov100_021D4788(UnkStruct_ov100_021D46C8 *param0) { - sub_0200E084(¶m0->unk_30, 1); + Window_EraseMessageBox(¶m0->unk_30, 1); Window_ClearAndCopyToVRAM(¶m0->unk_30); } diff --git a/src/overlay101/ov101_021D0D80.c b/src/overlay101/ov101_021D0D80.c index 07a78952db..9de39b1f72 100644 --- a/src/overlay101/ov101_021D0D80.c +++ b/src/overlay101/ov101_021D0D80.c @@ -25,6 +25,7 @@ #include "message.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -33,7 +34,6 @@ #include "unk_020041CC.h" #include "unk_02005474.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -430,8 +430,8 @@ void ov101_021D13C8(UnkStruct_ov101_021D13C8 *param0) int v0; UnkStruct_ov101_021D148C *v1 = ¶m0->unk_408; - sub_0200DAA4(param0->unk_43C, 0, 1, 15, 0, 79); - sub_0200DD0C(param0->unk_43C, 0, (1 + (18 + 12)), 14, param0->unk_4C4, 79); + LoadStandardWindowGraphics(param0->unk_43C, 0, 1, 15, 0, 79); + LoadMessageBoxGraphics(param0->unk_43C, 0, (1 + (18 + 12)), 14, param0->unk_4C4, 79); Font_LoadScreenIndicatorsPalette(0, 15 * 32, 79); v1->unk_00 = MessageLoader_Init(0, 26, 544, 79); @@ -463,7 +463,7 @@ void ov101_021D148C(UnkStruct_ov101_021D13C8 *param0, u32 param1) { UnkStruct_ov101_021D148C *v0 = ¶m0->unk_408; - sub_0200E060(&v0->unk_08[0], 1, (1 + (18 + 12)), 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_08[0], 1, (1 + (18 + 12)), 14); Window_FillTilemap(&v0->unk_08[0], 15); MessageLoader_GetStrbuf(v0->unk_00, param1, v0->unk_18); Text_AddPrinterWithParams(&v0->unk_08[0], FONT_MESSAGE, v0->unk_18, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); @@ -474,7 +474,7 @@ void ov101_021D14E4(UnkStruct_ov101_021D13C8 *param0) { UnkStruct_ov101_021D148C *v0 = ¶m0->unk_408; - sub_0200E084(&v0->unk_08[0], 1); + Window_EraseMessageBox(&v0->unk_08[0], 1); Window_FillTilemap(&v0->unk_08[0], 0); Window_ScheduleCopyToVRAM(&v0->unk_08[0]); } diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 6f9c85b393..9e39003cbf 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -73,6 +73,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -84,7 +85,6 @@ #include "unk_020041CC.h" #include "unk_0200A9DC.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014000.h" #include "unk_02017728.h" @@ -1774,7 +1774,7 @@ static BOOL ov104_02230CAC(UnkStruct_ov104_0222E930 *param0) { UnkStruct_ov104_022320B4 *v0 = param0->unk_00; - v0->unk_7C = sub_0200E7FC(&v0->unk_64, (1024 - (18 + 12))); + v0->unk_7C = Window_AddWaitDial(&v0->unk_64, (1024 - (18 + 12))); return 0; } @@ -1782,7 +1782,7 @@ static BOOL ov104_02230CC4(UnkStruct_ov104_0222E930 *param0) { UnkStruct_ov104_022320B4 *v0 = param0->unk_00; - DeleteWaitDial(v0->unk_7C); + DestroyWaitDial(v0->unk_7C); return 0; } diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index 67828b8abe..d53941fc1d 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -42,6 +42,7 @@ #include "pokemon.h" #include "pokemon_icon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_list.h" @@ -51,7 +52,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_020131EC.h" #include "unk_02014A84.h" @@ -167,7 +167,7 @@ static void ov104_02231FC4(UnkStruct_ov104_022320B4 *param0) Window_Add( v0->unk_00, ¶m0->unk_64, 1, 2, 19, 27, 4, 13, (((1024 - (18 + 12)) - 9) - (27 * 4))); Window_FillTilemap(¶m0->unk_64, 15); - sub_0200E060(¶m0->unk_64, 0, (1024 - (18 + 12)), 11); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_64, 0, (1024 - (18 + 12)), 11); param0->unk_5A = 1; } else { @@ -193,7 +193,7 @@ void ov104_02232088(UnkStruct_ov104_022320B4 *param0) { GF_ASSERT(param0->unk_5A == 1); - sub_0200E084(¶m0->unk_64, 0); + Window_EraseMessageBox(¶m0->unk_64, 0); Window_Remove(¶m0->unk_64); param0->unk_5A = 0; @@ -321,7 +321,7 @@ void ov104_022322B0(UnkStruct_ov104_02232B5C *param0) } Window_Add(v1->unk_00, ¶m0->unk_08, 1, param0->unk_98, param0->unk_99, v0, param0->unk_9B * 2, 14, 1); - Window_Show(¶m0->unk_08, 1, 985, 12); + Window_DrawStandardFrame(¶m0->unk_08, 1, 985, 12); ov104_02232454(param0); param0->unk_B0 = Menu_NewSimple(¶m0->unk_A4, param0->unk_96, param0->unk_00->unk_34); ov104_022325D8(param0); @@ -440,7 +440,7 @@ static void ov104_02232570(UnkStruct_ov104_02232B5C *param0) Sound_PlayEffect(1500); Menu_Free(param0->unk_B0, NULL); - Window_Clear(param0->unk_A4.window, 0); + Window_EraseStandardFrame(param0->unk_A4.window, 0); Window_Remove(param0->unk_A4.window); for (v0 = 0; v0 < 28; v0++) { @@ -507,7 +507,7 @@ void ov104_02232624(UnkStruct_ov104_02232B5C *param0) } Window_Add(v1->unk_00, ¶m0->unk_08, 1, param0->unk_98, param0->unk_99, v0, param0->unk_9B * 2, 14, 1); } - Window_Show(¶m0->unk_08, 1, 985, 12); + Window_DrawStandardFrame(¶m0->unk_08, 1, 985, 12); ov104_02232830(param0); param0->unk_1B4 = ListMenu_New((const ListMenuTemplate *)¶m0->unk_194, 0, param0->unk_96, param0->unk_00->unk_34); ov104_02232B2C(param0); @@ -680,7 +680,7 @@ static void ov104_02232A58(UnkStruct_ov104_02232B5C *param0, u8 param1) } ListMenu_Free(param0->unk_1B4, NULL, NULL); - Window_Clear(param0->unk_194.window, 0); + Window_EraseStandardFrame(param0->unk_194.window, 0); Window_Remove(¶m0->unk_08); for (v0 = 0; v0 < 28; v0++) { diff --git a/src/overlay104/ov104_022361B4.c b/src/overlay104/ov104_022361B4.c index 1a7b0f1b7f..507b93e759 100644 --- a/src/overlay104/ov104_022361B4.c +++ b/src/overlay104/ov104_022361B4.c @@ -31,13 +31,13 @@ #include "message.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "trainer_info.h" -#include "unk_0200DA60.h" #include "unk_020302D0.h" #include "unk_0203061C.h" #include "unk_0205DFC4.h" @@ -729,7 +729,7 @@ void ov104_02236FC0(UnkStruct_ov104_022320B4 *param0, UnkStruct_ov104_0223BA10 * static void ov104_022370C0(BgConfig *param0, Window *param1) { - Window_Show(param1, 1, ((1024 - (18 + 12)) - 9), 12); + Window_DrawStandardFrame(param1, 1, ((1024 - (18 + 12)) - 9), 12); Window_FillTilemap(param1, 15); return; @@ -743,7 +743,7 @@ void ov104_022370E0(UnkStruct_ov104_022320B4 *param0, UnkStruct_ov104_0223BA10 * if (ov104_0223BA14(param1->unk_10) == 0) { GF_ASSERT(param0->unk_A8 != NULL); v0 = param0->unk_A8; - Window_Clear(v0, 0); + Window_EraseStandardFrame(v0, 0); Windows_Delete(v0, 1); } else { GF_ASSERT(param0->unk_A8 != NULL); @@ -757,9 +757,9 @@ void ov104_022370E0(UnkStruct_ov104_022320B4 *param0, UnkStruct_ov104_0223BA10 * v1 = param0->unk_A8; } - Window_Clear(v0, 0); + Window_EraseStandardFrame(v0, 0); Windows_Delete(v0, 1); - Window_Clear(v1, 0); + Window_EraseStandardFrame(v1, 0); Windows_Delete(v1, 1); } diff --git a/src/overlay104/ov104_0223C2D4.c b/src/overlay104/ov104_0223C2D4.c index 24024d5d87..a07afb6a04 100644 --- a/src/overlay104/ov104_0223C2D4.c +++ b/src/overlay104/ov104_0223C2D4.c @@ -45,6 +45,7 @@ #include "narc.h" #include "palette.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "sys_task.h" #include "sys_task_manager.h" @@ -52,7 +53,6 @@ #include "unk_020041CC.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" #include "unk_0201E3D8.h" @@ -621,11 +621,11 @@ static void ov104_0223CB80(UnkStruct_ov104_0223C4CC *param0) v0 = sub_0209B970(param0->unk_08); - sub_0200DD0C(param0->unk_00, 1, (1024 - (18 + 12)), 11, Options_Frame(v0->unk_04), 94); + LoadMessageBoxGraphics(param0->unk_00, 1, (1024 - (18 + 12)), 11, Options_Frame(v0->unk_04), 94); PaletteData_LoadBufferFromHardware(param0->unk_04, 0, 11 * 16, 0x20); } - sub_0200DAA4(param0->unk_00, 1, ((1024 - (18 + 12)) - 9), 12, 0, 94); + LoadStandardWindowGraphics(param0->unk_00, 1, ((1024 - (18 + 12)) - 9), 12, 0, 94); PaletteData_LoadBufferFromHardware(param0->unk_04, 0, 12 * 16, 0x20); } diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 034d92fe10..691a47de5e 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -44,6 +44,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -55,7 +56,6 @@ #include "unk_0200762C.h" #include "unk_020093B4.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -1724,7 +1724,7 @@ static void ov105_02243D20(UnkStruct_ov105_02241FF4 *param0) sub_02007DC8(param0->unk_12C[0]); Window_FillTilemap(¶m0->unk_50[7], 15); - sub_0200E084(¶m0->unk_50[7], 1); + Window_EraseMessageBox(¶m0->unk_50[7], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_50[7]); param0->unk_11--; @@ -1856,7 +1856,7 @@ static BOOL ov105_0224400C(UnkStruct_ov105_02241FF4 *param0) Window_FillTilemap(¶m0->unk_50[0], 0); Window_ScheduleCopyToVRAM(¶m0->unk_50[0]); - sub_0200E084(¶m0->unk_50[5], 1); + Window_EraseMessageBox(¶m0->unk_50[5], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_50[5]); ov105_02246244(param0->unk_50); @@ -3330,7 +3330,7 @@ static void ov105_02245A64(UnkStruct_ov105_02241FF4 *param0) static void ov105_02245A98(Window *param0) { - Window_Clear(param0, 1); + Window_EraseStandardFrame(param0, 1); Window_ClearAndScheduleCopyToVRAM(param0); return; diff --git a/src/overlay105/ov105_02246214.c b/src/overlay105/ov105_02246214.c index 801f96e61a..d94f726b11 100644 --- a/src/overlay105/ov105_02246214.c +++ b/src/overlay105/ov105_02246214.c @@ -4,7 +4,7 @@ #include #include "bg_window.h" -#include "unk_0200DA60.h" +#include "render_window.h" void ov105_02246214(BgConfig *param0, Window *param1); void ov105_02246244(Window *param0); @@ -50,17 +50,17 @@ void ov105_02246244(Window *param0) void ov105_02246260(BgConfig *param0, Window *param1) { - sub_0200DAA4(param0, 1, (1024 - 9), 11, 0, 93); - Window_Show(param1, 1, (1024 - 9), 11); + LoadStandardWindowGraphics(param0, 1, (1024 - 9), 11, 0, 93); + Window_DrawStandardFrame(param1, 1, (1024 - 9), 11); return; } void ov105_0224628C(Window *param0, int param1) { - sub_0200DD0C(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 93); + LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 93); Window_FillTilemap(param0, 15); - sub_0200E060(param0, 1, ((1024 - 9) - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 1, ((1024 - 9) - (18 + 12)), 10); return; } diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 5356ab31d0..7aa0a48857 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -36,6 +36,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -47,7 +48,6 @@ #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -717,7 +717,7 @@ static BOOL ov106_022423AC(UnkStruct_ov106_02243118 *param0) case 0: ov106_02243200(param0); ov106_02243664(param0->unk_284, 1); - sub_0200E084(¶m0->unk_4C[0], 0); + Window_EraseMessageBox(¶m0->unk_4C[0], 0); param0->unk_08++; break; @@ -1617,7 +1617,7 @@ static void ov106_02243200(UnkStruct_ov106_02243118 *param0) if (param0->unk_0F == 1) { param0->unk_0F = 0; Menu_Free(param0->unk_98, NULL); - Window_Clear(param0->unk_8C.window, 0); + Window_EraseStandardFrame(param0->unk_8C.window, 0); } return; @@ -1669,7 +1669,7 @@ static void ov106_022432AC(UnkStruct_ov106_02243118 *param0) static void ov106_022432D4(UnkStruct_ov106_02243118 *param0) { ov106_02243664(param0->unk_284, 1); - sub_0200E084(¶m0->unk_4C[0], 0); + Window_EraseMessageBox(¶m0->unk_4C[0], 0); ov106_02242AC4(param0, ¶m0->unk_4C[2], 0, 0, 1, 2, 0, FONT_SYSTEM); return; diff --git a/src/overlay106/ov106_022436E0.c b/src/overlay106/ov106_022436E0.c index 9026a482eb..e8c6755755 100644 --- a/src/overlay106/ov106_022436E0.c +++ b/src/overlay106/ov106_022436E0.c @@ -4,7 +4,7 @@ #include #include "bg_window.h" -#include "unk_0200DA60.h" +#include "render_window.h" void ov106_022436E0(BgConfig *param0, Window *param1); void ov106_02243710(Window *param0); @@ -44,17 +44,17 @@ void ov106_02243710(Window *param0) void ov106_0224372C(BgConfig *param0, Window *param1) { - sub_0200DAA4(param0, 0, (1024 - 9), 11, 0, 98); - Window_Show(param1, 1, (1024 - 9), 11); + LoadStandardWindowGraphics(param0, 0, (1024 - 9), 11, 0, 98); + Window_DrawStandardFrame(param1, 1, (1024 - 9), 11); return; } void ov106_02243758(Window *param0, int param1) { - sub_0200DD0C(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 98); + LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 98); Window_FillTilemap(param0, 15); - sub_0200E060(param0, 0, ((1024 - 9) - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 0, ((1024 - 9) - (18 + 12)), 10); return; } diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index 5bd0f1c5e1..95d4e47ee0 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -40,6 +40,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -51,7 +52,6 @@ #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -3368,7 +3368,7 @@ static BOOL ov107_02245210 (Pokemon * param0) static void ov107_02245288 (Window * param0) { - sub_0200E084(param0, 1); + Window_EraseMessageBox(param0, 1); Window_ClearAndScheduleCopyToVRAM(param0); return; } @@ -3646,7 +3646,7 @@ static void ov107_02245618 (UnkStruct_ov107_02241D6C * param0) if (param0->unk_0E_4 == 1) { param0->unk_0E_4 = 0; Menu_Free(param0->unk_17C, NULL); - Window_Clear(param0->unk_170.window, 1); + Window_EraseStandardFrame(param0->unk_170.window, 1); Window_ClearAndScheduleCopyToVRAM(param0->unk_170.window); } @@ -3666,7 +3666,7 @@ static void ov107_02245660 (UnkStruct_ov107_02241D6C * param0) ov107_02249BAC(param0->unk_3EC, 0); ov107_02249BAC(param0->unk_434, 0); - Window_Clear(¶m0->unk_50[15], 1); + Window_EraseStandardFrame(¶m0->unk_50[15], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_50[15]); ov107_0224503C(param0, param0->unk_0D, 0); @@ -3701,7 +3701,7 @@ static void ov107_02245730 (UnkStruct_ov107_02241D6C * param0) param0->unk_0E_0 = 0; v0 = (Window *)ListMenu_GetAttribute(param0->unk_198, 18); - Window_Clear(v0, 1); + Window_EraseStandardFrame(v0, 1); Window_FillTilemap(v0, 0); Window_ClearAndScheduleCopyToVRAM(v0); diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index d3c1073e53..bbc40d4fc7 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -40,6 +40,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -51,7 +52,6 @@ #include "unk_020093B4.h" #include "unk_0200A784.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -2622,7 +2622,7 @@ static void ov107_0224883C (UnkStruct_ov107_02246170 * param0) static void ov107_02248860 (Window * param0) { - sub_0200E084(param0, 1); + Window_EraseMessageBox(param0, 1); Window_ClearAndScheduleCopyToVRAM(param0); return; @@ -2885,7 +2885,7 @@ static void ov107_02248BB4 (UnkStruct_ov107_02246170 * param0) if (param0->unk_0F_2 == 1) { param0->unk_0F_2 = 0; Menu_Free(param0->unk_11C, NULL); - Window_Clear(param0->unk_110.window, 1); + Window_EraseStandardFrame(param0->unk_110.window, 1); Window_ClearAndScheduleCopyToVRAM(param0->unk_110.window); } @@ -3368,7 +3368,7 @@ static void ov107_02249258 (UnkStruct_ov107_02246170 * param0) v0 = (Window *)ListMenu_GetAttribute(param0->unk_138, 18); - Window_Clear(v0, 1); + Window_EraseStandardFrame(v0, 1); Window_FillTilemap(v0, 0); Window_ClearAndScheduleCopyToVRAM(v0); StringList_Free(param0->unk_13C); diff --git a/src/overlay107/ov107_02249D14.c b/src/overlay107/ov107_02249D14.c index c3f92c9466..d392d2ef86 100644 --- a/src/overlay107/ov107_02249D14.c +++ b/src/overlay107/ov107_02249D14.c @@ -4,7 +4,7 @@ #include #include "bg_window.h" -#include "unk_0200DA60.h" +#include "render_window.h" typedef struct { const WindowTemplate *unk_00; @@ -85,17 +85,17 @@ void ov107_02249D5C(Window *param0, u8 param1) void ov107_02249D84(BgConfig *param0, Window *param1) { - sub_0200DAA4(param0, Window_GetBgLayer(param1), (1024 - 9), 11, 0, 100); - Window_Show(param1, 1, (1024 - 9), 11); + LoadStandardWindowGraphics(param0, Window_GetBgLayer(param1), (1024 - 9), 11, 0, 100); + Window_DrawStandardFrame(param1, 1, (1024 - 9), 11); return; } void ov107_02249DBC(Window *param0, int param1) { - sub_0200DD0C(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 100); + LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 100); Window_FillTilemap(param0, 15); - sub_0200E060(param0, 1, ((1024 - 9) - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 1, ((1024 - 9) - (18 + 12)), 10); Window_ScheduleCopyToVRAM(param0); return; diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index e6cbc9da2b..1a7950b2db 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -44,6 +44,7 @@ #include "palette.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -54,7 +55,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -1372,7 +1372,7 @@ static int ov109_021D1A6C(UnkStruct_ov109_021D0F70 *param0) if (CommTiming_IsSyncState(202)) { ov109_021D3B70(param0, param0->unk_28->unk_0C); sub_02038ED4(¶m0->unk_04); - param0->unk_DC8 = sub_0200E7FC(¶m0->unk_C9C.unk_0C[0], (1 + 9)); + param0->unk_DC8 = Window_AddWaitDial(¶m0->unk_C9C.unk_0C[0], (1 + 9)); param0->unk_00 = 45; } @@ -1386,7 +1386,7 @@ static int ov109_021D1AA8(UnkStruct_ov109_021D0F70 *param0) if (v0) { gCoreSys.inhibitReset = 0; - DeleteWaitDial(param0->unk_DC8); + DestroyWaitDial(param0->unk_DC8); param0->unk_00 = 48; } @@ -2019,9 +2019,9 @@ static void ov109_021D24F8(UnkStruct_ov109_021D0F70 *param0) int v0; UnkStruct_ov109_021D24F8 *v1 = ¶m0->unk_C9C; - sub_0200DAA4(param0->unk_D84, 1, 1, 15, 0, 95); - sub_0200DD0C(param0->unk_D84, 1, (1 + 9), 14, param0->unk_CC->unk_14.unk_04, 95); - PaletteData_LoadBufferFromFileStart(param0->unk_D9C, 38, sub_0200DD08(param0->unk_CC->unk_14.unk_04), 95, 0, 0x20, 14 * 16); + LoadStandardWindowGraphics(param0->unk_D84, 1, 1, 15, 0, 95); + LoadMessageBoxGraphics(param0->unk_D84, 1, (1 + 9), 14, param0->unk_CC->unk_14.unk_04, 95); + PaletteData_LoadBufferFromFileStart(param0->unk_D9C, 38, GetMessageBoxPaletteNARCMember(param0->unk_CC->unk_14.unk_04), 95, 0, 0x20, 14 * 16); PaletteData_LoadBufferFromFileStart(param0->unk_D9C, 14, 7, 95, 0, 0x20, 15 * 16); v1->unk_04 = MessageLoader_Init(0, 26, 376, 95); @@ -2067,7 +2067,7 @@ static void ov109_021D2634(UnkStruct_ov109_021D0F70 *param0, u32 param1) Window *v1 = &v0->unk_0C[0]; Window_FillTilemap(v1, 15); - sub_0200E060(v1, 1, (1 + 9), 14); + Window_DrawMessageBoxWithScrollCursor(v1, 1, (1 + 9), 14); Window_FillTilemap(v1, 15); MessageLoader_GetStrbuf(v0->unk_04, param1, v0->unk_6C); Text_AddPrinterWithParams(v1, FONT_MESSAGE, v0->unk_6C, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); @@ -2088,7 +2088,7 @@ static void ov109_021D268C(UnkStruct_ov109_021D0F70 *param0, u32 param1, const T MessageLoader_GetStrbuf(v1->unk_04, param1, v0); StringTemplate_Format(v1->unk_08, v1->unk_6C, v0); Strbuf_Free(v0); - sub_0200E060(v2, 1, (1 + 9), 14); + Window_DrawMessageBoxWithScrollCursor(v2, 1, (1 + 9), 14); Window_FillTilemap(v2, 15); Text_AddPrinterWithParams(v2, FONT_MESSAGE, v1->unk_6C, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); Window_ScheduleCopyToVRAM(v2); @@ -2107,7 +2107,7 @@ static void ov109_021D2714(UnkStruct_ov109_021D0F70 *param0, u32 param1, u32 par MessageLoader_GetStrbuf(v1->unk_04, param1, v0); StringTemplate_Format(v1->unk_08, v1->unk_6C, v0); Strbuf_Free(v0); - sub_0200E060(v2, 1, (1 + 9), 14); + Window_DrawMessageBoxWithScrollCursor(v2, 1, (1 + 9), 14); Window_FillTilemap(v2, 15); Text_AddPrinterWithParams(v2, FONT_MESSAGE, v1->unk_6C, 0, 0, TEXT_SPEED_NO_TRANSFER, NULL); Window_ScheduleCopyToVRAM(v2); @@ -2118,7 +2118,7 @@ static void ov109_021D2788(UnkStruct_ov109_021D0F70 *param0) UnkStruct_ov109_021D24F8 *v0 = ¶m0->unk_C9C; Window *v1 = &v0->unk_0C[0]; - sub_0200E084(v1, 1); + Window_EraseMessageBox(v1, 1); Window_FillTilemap(v1, 0); Window_ScheduleCopyToVRAM(v1); } @@ -2151,7 +2151,7 @@ static void ov109_021D2820(UnkStruct_ov109_021D0F70 *param0, Strbuf *param1, int { UnkStruct_ov109_021D24F8 *v0 = ¶m0->unk_C9C; Window *v1 = &v0->unk_1C[param2]; - Window_Show(v1, 1, 1, 14); + Window_DrawStandardFrame(v1, 1, 1, 14); Window_FillTilemap(v1, 15); Text_AddPrinterWithParamsAndColor(v1, FONT_SYSTEM, param1, Font_CalcCenterAlignment(FONT_SYSTEM, param1, 0, 8 * 8), 0, TEXT_SPEED_NO_TRANSFER, param3, NULL); Window_ScheduleCopyToVRAM(v1); @@ -2173,7 +2173,7 @@ static void ov109_021D28A0(UnkStruct_ov109_021D0F70 *param0, int param1) UnkStruct_ov109_021D24F8 *v0 = ¶m0->unk_C9C; Window *v1 = &v0->unk_1C[param1]; - sub_0200E084(v1, 1); + Window_EraseMessageBox(v1, 1); Window_FillTilemap(v1, 0); Window_ScheduleCopyToVRAM(v1); } diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 2b1bf23875..49c79f0230 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -31,6 +31,7 @@ #include "message_util.h" #include "narc.h" #include "overlay_manager.h" +#include "render_window.h" #include "savedata.h" #include "sprite_resource.h" #include "strbuf.h" @@ -44,7 +45,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201D15C.h" @@ -574,8 +574,8 @@ static void ov109_021D4300(UnkStruct_ov109_021D5140 *param0, NARC *param1) Graphics_LoadTilemapToBgLayer(12, 11, v0, 6, 0, 0, 1, 95); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 2, v0, 1, 0, 32 * 8 * 0x20, 1, 95); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 3, v0, 1, 0, 32 * 24 * 2, 1, 95); - sub_0200DD0C(v0, 0, 1, 10, Options_Frame(param0->unk_0C->unk_14.unk_10), 95); - sub_0200DAA4(v0, 0, 1 + (18 + 12), 11, 0, 95); + LoadMessageBoxGraphics(v0, 0, 1, 10, Options_Frame(param0->unk_0C->unk_14.unk_10), 95); + LoadStandardWindowGraphics(v0, 0, 1 + (18 + 12), 11, 0, 95); } static void ov109_021D43EC(void) @@ -1573,7 +1573,7 @@ static void ov109_021D55A8(UnkStruct_ov109_021D5140 *param0, int param1, int par StringTemplate_Format(param0->unk_34, param0->unk_54, v0); Strbuf_Free(v0); Window_FillTilemap(¶m0->unk_35C, 0xf0f); - sub_0200E060(¶m0->unk_35C, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_35C, 0, 1, 10); if (param2 == 0) { param0->unk_5C = Text_AddPrinterWithParams(¶m0->unk_35C, FONT_MESSAGE, param0->unk_54, 0, 0, ov109_021D5854(param0), NULL); @@ -1598,7 +1598,7 @@ static int ov109_021D5638(int param0) static void ov109_021D5658(UnkStruct_ov109_021D5140 *param0) { - sub_0200E084(¶m0->unk_35C, 0); + Window_EraseMessageBox(¶m0->unk_35C, 0); } static void ov109_021D5668(UnkStruct_ov109_021D5140 *param0) diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index 393ee36d27..06ecba8ea0 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -29,6 +29,7 @@ #include "narc.h" #include "overlay_manager.h" #include "palette.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -39,7 +40,6 @@ #include "unk_02005474.h" #include "unk_0200A784.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0201567C.h" #include "unk_02015920.h" @@ -529,7 +529,7 @@ static BOOL ov111_021D10B8(UnkStruct_ov111_021D0F7C *param0) param0->unk_0E++; TouchScreen_GetHoldState(&v0, &v1); - sub_0200E084(¶m0->unk_5C[15], 0); + Window_EraseMessageBox(¶m0->unk_5C[15], 0); GXLayers_EngineBToggleLayers((GX_PLANEMASK_BG0), 0); param0->unk_08 = 2; } @@ -889,14 +889,14 @@ static BOOL ov111_021D1508(UnkStruct_ov111_021D0F7C *param0) if (v2 == 1) { ov111_021D350C(param0->unk_3A0, 0); - Window_Clear(¶m0->unk_5C[0], 0); + Window_EraseStandardFrame(¶m0->unk_5C[0], 0); Window_ClearAndCopyToVRAM(¶m0->unk_5C[0]); ov111_021D2E20(param0); ov111_021D1FB4(param0); return 1; } else if (v2 == 2) { ov111_021D350C(param0->unk_3A0, 0); - Window_Clear(¶m0->unk_5C[0], 0); + Window_EraseStandardFrame(¶m0->unk_5C[0], 0); Window_ClearAndCopyToVRAM(¶m0->unk_5C[0]); ov111_021D1FB4(param0); param0->unk_08 = 11; @@ -907,14 +907,14 @@ static BOOL ov111_021D1508(UnkStruct_ov111_021D0F7C *param0) if (v2 == 1) { ov111_021D350C(param0->unk_3A0, 0); - Window_Clear(¶m0->unk_5C[0], 0); + Window_EraseStandardFrame(¶m0->unk_5C[0], 0); Window_ClearAndCopyToVRAM(¶m0->unk_5C[0]); ov111_021D2E18(param0); ov111_021D1FB4(param0); return 1; } else if (v2 == 2) { ov111_021D350C(param0->unk_3A0, 0); - Window_Clear(¶m0->unk_5C[0], 0); + Window_EraseStandardFrame(¶m0->unk_5C[0], 0); Window_ClearAndCopyToVRAM(¶m0->unk_5C[0]); ov111_021D1FB4(param0); param0->unk_08 = 11; @@ -997,7 +997,7 @@ static BOOL ov111_021D1A88(UnkStruct_ov111_021D0F7C *param0) param0->unk_0D--; if (param0->unk_0D == 0) { - sub_0200E084(¶m0->unk_5C[0], 0); + Window_EraseMessageBox(¶m0->unk_5C[0], 0); sub_0200F174(0, 0, 0, 0x0, 6, 1, 115); param0->unk_08++; } diff --git a/src/overlay111/ov111_021D3548.c b/src/overlay111/ov111_021D3548.c index c4e1301ad5..50152d1225 100644 --- a/src/overlay111/ov111_021D3548.c +++ b/src/overlay111/ov111_021D3548.c @@ -4,7 +4,7 @@ #include #include "bg_window.h" -#include "unk_0200DA60.h" +#include "render_window.h" static const WindowTemplate Unk_ov111_021D38B8[] = { { 0x2, 0x2, 0x1, 0x1B, 0x4, 0xC, 0x1 }, @@ -56,17 +56,17 @@ void ov111_021D3578(Window *param0) void ov111_021D3594(BgConfig *param0, Window *param1) { - sub_0200DAA4(param0, 2, (1024 - 9), 11, 0, 115); - Window_Show(param1, 1, (1024 - 9), 11); + LoadStandardWindowGraphics(param0, 2, (1024 - 9), 11, 0, 115); + Window_DrawStandardFrame(param1, 1, (1024 - 9), 11); return; } void ov111_021D35C0(Window *param0, int param1) { - sub_0200DD0C(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 115); + LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - 9) - (18 + 12)), 10, param1, 115); Window_FillTilemap(param0, 15); - sub_0200E060(param0, 0, ((1024 - 9) - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 0, ((1024 - 9) - (18 + 12)), 10); return; } diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 75798cf1e1..992da6e2b3 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -55,6 +55,7 @@ #include "party.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -65,7 +66,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02015920.h" @@ -506,7 +506,7 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) break; case 3: Window_FillTilemap(&v0->unk_B4, 0xf); - sub_0200E060(&v0->unk_B4, 0, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_B4, 0, 1, 14); MessageLoader_GetStrbuf(v0->unk_30, 2, v0->unk_C4); v0->unk_C8 = Text_AddPrinterWithParams(&v0->unk_B4, FONT_MESSAGE, v0->unk_C4, 0, 0, Options_TextFrameDelay(SaveData_Options(v0->unk_04)), NULL); (*param1)++; @@ -538,7 +538,7 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) case 1: sub_02015A54(v0->unk_24); v0->unk_28 = 0; - sub_0200E084(&v0->unk_B4, 0); + Window_EraseMessageBox(&v0->unk_B4, 0); v0->unk_168.unk_00 = 0; v0->unk_9BC = 3; *param1 = 9; @@ -546,7 +546,7 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) case 2: sub_02015A54(v0->unk_24); v0->unk_28 = 0; - sub_0200E084(&v0->unk_B4, 0); + Window_EraseMessageBox(&v0->unk_B4, 0); PaletteData_Blend(v0->unk_0C, 0, (0 * 16 + 9), 1, 0, 0x0); PaletteData_Blend(v0->unk_0C, 2, v0->unk_921 * 16, 16, 0, 0x0); *param1 = 2; @@ -556,7 +556,7 @@ int ov113_0225CA04(OverlayManager *param0, int *param1) break; case 6: Window_FillTilemap(&v0->unk_B4, 0xf); - sub_0200E060(&v0->unk_B4, 0, 1, 14); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_B4, 0, 1, 14); MessageLoader_GetStrbuf(v0->unk_30, 3, v0->unk_C4); v0->unk_C8 = Text_AddPrinterWithParams(&v0->unk_B4, FONT_MESSAGE, v0->unk_C4, 0, 0, Options_TextFrameDelay(SaveData_Options(v0->unk_04)), NULL); (*param1)++; @@ -911,8 +911,8 @@ static void ov113_0225D160(UnkStruct_ov113_0225DBCC *param0, NARC *param1) int v2; v2 = Options_Frame(SaveData_Options(param0->unk_04)); - PaletteData_LoadBufferFromFileStart(param0->unk_0C, 38, sub_0200DD08(v2), 118, 0, 0x20, 14 * 16); - sub_0200DD0C(param0->unk_08, 1, 1, 14, v2, 118); + PaletteData_LoadBufferFromFileStart(param0->unk_0C, 38, GetMessageBoxPaletteNARCMember(v2), 118, 0, 0x20, 14 * 16); + LoadMessageBoxGraphics(param0->unk_08, 1, 1, 14, v2, 118); PaletteData_LoadBufferFromFileStart(param0->unk_0C, 14, 6, 118, 0, 0x20, 13 * 16); if (param0->unk_00->unk_04 == 0) { diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index 261f9928d0..7e6cfaf1de 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -31,6 +31,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "sprite_resource.h" @@ -45,7 +46,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015920.h" #include "unk_02017728.h" @@ -1526,8 +1526,8 @@ static void ov114_0225D290(UnkStruct_ov114_0225D338 *param0, UnkStruct_ov114_022 u8 v3; sub_020959F4(1); - sub_0200DD0C(param1->unk_00, 2, 1, 13, v0, param4); - sub_0200DD0C(param1->unk_00, 4, 1, 13, v0, param4); + LoadMessageBoxGraphics(param1->unk_00, 2, 1, 13, v0, param4); + LoadMessageBoxGraphics(param1->unk_00, 4, 1, 13, v0, param4); for (v2 = 0; v2 < 2; v2++) { if (v2 == 0) { @@ -1579,7 +1579,7 @@ static void ov114_0225D368(UnkStruct_ov114_0225D338 *param0, UnkStruct_ov114_022 ov114_0225D474(param0, param3); Window_FillTilemap(¶m0->unk_00[param3], 15); param0->unk_20[param3] = ov114_0225D218(param1, param2, ¶m0->unk_00[param3], param0->unk_24[param3], TEXT_SPEED_FAST); - sub_0200E060(¶m0->unk_00[param3], 1, 1, 13); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_00[param3], 1, 1, 13); Window_ScheduleCopyToVRAM(¶m0->unk_00[param3]); } @@ -1591,7 +1591,7 @@ static void ov114_0225D400(UnkStruct_ov114_0225D338 *param0, u32 param1) Text_RemovePrinter(param0->unk_20[param1]); } - sub_0200E084(¶m0->unk_00[param1], 1); + Window_EraseMessageBox(¶m0->unk_00[param1], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_00[param1]); } @@ -1611,14 +1611,14 @@ static BOOL ov114_0225D43C(const UnkStruct_ov114_0225D338 *param0, u32 param1) static void ov114_0225D458(UnkStruct_ov114_0225D338 *param0, u32 param1) { if (param0->unk_2C[param1] == NULL) { - param0->unk_2C[param1] = sub_0200E7FC(¶m0->unk_00[param1], 1); + param0->unk_2C[param1] = Window_AddWaitDial(¶m0->unk_00[param1], 1); } } static void ov114_0225D474(UnkStruct_ov114_0225D338 *param0, u32 param1) { if (param0->unk_2C[param1]) { - sub_0200EBC8(param0->unk_2C[param1]); + DestroyWaitDialTaskOnly(param0->unk_2C[param1]); param0->unk_2C[param1] = NULL; } } diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index 3b74523485..23aadbe4aa 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -36,6 +36,7 @@ #include "heap.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "string_template.h" @@ -47,7 +48,6 @@ #include "unk_0200A328.h" #include "unk_0200A784.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_02012744.h" #include "unk_0201D15C.h" #include "unk_0201DBEC.h" @@ -1493,7 +1493,7 @@ static void ov115_02261A04(UnkStruct_ov115_022617E8 *param0, UnkStruct_ov115_022 static void ov115_02261A10(UnkStruct_ov115_022617E8 *param0, UnkStruct_ov115_02261ADC *param1) { - Window_Show(¶m0->unk_0C, 0, 1, 4); + Window_DrawStandardFrame(¶m0->unk_0C, 0, 1, 4); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG1, 1); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 1); ov114_0225CB8C(param1->unk_754); @@ -1514,7 +1514,7 @@ static BOOL ov115_02261A3C(UnkStruct_ov115_022617E8 *param0, UnkStruct_ov115_022 static void ov115_02261A54(UnkStruct_ov115_022617E8 *param0, UnkStruct_ov115_02261ADC *param1) { - Window_Clear(¶m0->unk_0C, 1); + Window_EraseStandardFrame(¶m0->unk_0C, 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_0C); GXLayers_EngineAToggleLayers(GX_PLANEMASK_BG2, 0); } @@ -3144,7 +3144,7 @@ static void ov115_0226376C(UnkStruct_ov115_02261ADC *param0, u32 param1) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 1); Font_LoadScreenIndicatorsPalette(0, 5 * 0x20, param1); - sub_0200DAA4(param0->unk_00, 1, 1, 4, 0, param1); + LoadStandardWindowGraphics(param0->unk_00, 1, 1, 4, 0, param1); } static void ov115_02263954(UnkStruct_ov115_02261ADC *param0) diff --git a/src/overlay116/ov116_02261870.c b/src/overlay116/ov116_02261870.c index 214745a87a..24800d2971 100644 --- a/src/overlay116/ov116_02261870.c +++ b/src/overlay116/ov116_02261870.c @@ -23,11 +23,11 @@ #include "message.h" #include "narc.h" #include "palette.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "trainer_info.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0202419C.h" static inline void inline_ov116_02261940(UnkStruct_ov116_0226501C *param0); @@ -408,14 +408,14 @@ void ov116_02261F70(UnkStruct_ov116_02262A8C *param0) MessageLoader_Free(v0); } - Window_Show(¶m0->unk_1FC8, 0, 180, 13); + Window_DrawStandardFrame(¶m0->unk_1FC8, 0, 180, 13); Window_CopyToVRAM(¶m0->unk_1FC8); } void ov116_02262004(UnkStruct_ov116_02262A8C *param0) { if (Window_IsInUse(¶m0->unk_1FC8) == 1) { - Window_Clear(¶m0->unk_1FC8, 1); + Window_EraseStandardFrame(¶m0->unk_1FC8, 1); Window_ClearAndCopyToVRAM(¶m0->unk_1FC8); Window_Remove(¶m0->unk_1FC8); } @@ -562,7 +562,7 @@ void ov116_02262264(UnkStruct_ov116_02262A8C *param0) } if (Window_IsInUse(¶m0->unk_1FD8[v1]) == 1) { - Window_Clear(¶m0->unk_1FD8[v1], 1); + Window_EraseStandardFrame(¶m0->unk_1FD8[v1], 1); Window_ClearAndCopyToVRAM(¶m0->unk_1FD8[v1]); Window_Remove(¶m0->unk_1FD8[v1]); } @@ -835,6 +835,6 @@ void ov116_022628B8(UnkStruct_ov116_0226139C *param0) Graphics_LoadTilemapToBgLayerFromOpenNARC(v6, 10, v2, 2, 0, 0, 0, 106); PaletteData_LoadBufferFromFileStart(v5, 164, 6, 106, 0, 0x20, 0); PaletteData_LoadBufferFromFileStart(v5, 14, 7, 106, 1, 0x20, 14 * 16); - PaletteData_LoadBufferFromFileStart(v5, 38, Window_FramePalette(), 106, 1, 0x20, 13 * 16); - sub_0200DAA4(v2, 7, 180, 13, 0, 106); + PaletteData_LoadBufferFromFileStart(v5, 38, GetStandardWindowPaletteNARCMember(), 106, 1, 0x20, 13 * 16); + LoadStandardWindowGraphics(v2, 7, 180, 13, 0, 106); } diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index f2136bbf9a..ca41b5d7e7 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -38,6 +38,7 @@ #include "overlay_manager.h" #include "palette.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -47,7 +48,6 @@ #include "unk_02005474.h" #include "unk_020093B4.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_02014000.h" @@ -828,7 +828,7 @@ static void ov117_02261368(UnkStruct_ov117_02261280 *param0) { Strbuf *v0; - Window_Show(¶m0->unk_30[4], 1, ((((((0x8000 - 0x2000) / 32) + (10 * 2)) + (10 * 2)) + (10 * 2)) + (10 * 2)), 6); + Window_DrawStandardFrame(¶m0->unk_30[4], 1, ((((((0x8000 - 0x2000) / 32) + (10 * 2)) + (10 * 2)) + (10 * 2)) + (10 * 2)), 6); v0 = MessageLoader_GetNewStrbuf(param0->unk_80, 3); Text_AddPrinterWithParamsAndColor(¶m0->unk_30[4], FONT_SYSTEM, v0, 0, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); @@ -1086,7 +1086,7 @@ static void ov117_02261AC8(UnkStruct_ov117_02261280 *param0, NARC *param1) ov117_02264AF0(param0); ov117_02264AB0(param0); - sub_0200DAA4(param0->unk_2C, 4, ((((((0x8000 - 0x2000) / 32) + (10 * 2)) + (10 * 2)) + (10 * 2)) + (10 * 2)), 6, 0, 110); + LoadStandardWindowGraphics(param0->unk_2C, 4, ((((((0x8000 - 0x2000) / 32) + (10 * 2)) + (10 * 2)) + (10 * 2)) + (10 * 2)), 6, 0, 110); PaletteData_LoadBufferFromHardware(param0->unk_8C, 1, 6 * 16, 0x20); PaletteData_FillBufferRange(param0->unk_8C, 1, 2, 0x0, 0, 1); } diff --git a/src/overlay119/ov119_021D0D80.c b/src/overlay119/ov119_021D0D80.c index 0d1077adb1..4369b410c1 100644 --- a/src/overlay119/ov119_021D0D80.c +++ b/src/overlay119/ov119_021D0D80.c @@ -31,6 +31,7 @@ #include "message.h" #include "palette.h" #include "pokemon.h" +#include "render_window.h" #include "spl.h" #include "strbuf.h" #include "string_list.h" @@ -38,7 +39,6 @@ #include "text.h" #include "unk_0200762C.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014000.h" #include "unk_0201DBEC.h" @@ -281,10 +281,10 @@ void ov119_021D1068(BgConfig *param0, PaletteData *param1, int param2) { int v0 = 71; - sub_0200DD0C(param0, 1, 20, 15, param2, v0); - PaletteData_LoadBufferFromFileStart(param1, 38, sub_0200DD08(param2), v0, 0, 0x20, 12 * 16); - sub_0200DAA4(param0, 1, (20 + (18 + 12)), 13, 0, v0); - PaletteData_LoadBufferFromFileStart(param1, 38, Window_FramePalette(), v0, 0, 0x20, 13 * 16); + LoadMessageBoxGraphics(param0, 1, 20, 15, param2, v0); + PaletteData_LoadBufferFromFileStart(param1, 38, GetMessageBoxPaletteNARCMember(param2), v0, 0, 0x20, 12 * 16); + LoadStandardWindowGraphics(param0, 1, (20 + (18 + 12)), 13, 0, v0); + PaletteData_LoadBufferFromFileStart(param1, 38, GetStandardWindowPaletteNARCMember(), v0, 0, 0x20, 13 * 16); PaletteData_LoadBufferFromFileStart(param1, 14, 7, v0, 0, 0x20, 14 * 16); } @@ -292,7 +292,7 @@ void ov119_021D10F0(BgConfig *param0, Window *param1, int param2, int param3, in { Window_Init(param1); Window_Add(param0, param1, param2, param3, param4, param5, param6, param8, param7); - sub_0200E060(param1, 1, 20, 12); + Window_DrawMessageBoxWithScrollCursor(param1, 1, 20, 12); Window_FillTilemap(param1, 15); Window_CopyToVRAM(param1); } @@ -359,13 +359,13 @@ void ov119_021D11E4(UnkStruct_ov119_021D0FD0 *param0, BgConfig *param1, Window * v0.suppressCursor = FALSE; v0.loopAround = TRUE; - Window_Show(param2, 1, (20 + (18 + 12)), 13); + Window_DrawStandardFrame(param2, 1, (20 + (18 + 12)), 13); param0->unk_04.unk_48 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 71, PAD_BUTTON_B); } void ov119_021D12CC(UnkStruct_ov119_021D0FD0 *param0) { - Window_Clear(¶m0->unk_04.unk_14[1], 1); + Window_EraseStandardFrame(¶m0->unk_04.unk_14[1], 1); Window_ClearAndCopyToVRAM(¶m0->unk_04.unk_14[1]); Window_Remove(¶m0->unk_04.unk_14[1]); Menu_Free(param0->unk_04.unk_48, NULL); diff --git a/src/pokemon_summary_app.c b/src/pokemon_summary_app.c index 124a08a36b..90e0d0a5af 100644 --- a/src/pokemon_summary_app.c +++ b/src/pokemon_summary_app.c @@ -24,6 +24,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "string_template.h" @@ -34,7 +35,6 @@ #include "unk_0200762C.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02015F84.h" #include "unk_02017728.h" @@ -929,7 +929,7 @@ static int sub_0208CF78(PokemonSummaryApp *param0) } Font_LoadScreenIndicatorsPalette(0, 14 * 32, 19); - sub_0200DD0C(param0->bgl, 1, (1024 - (18 + 12)), 13, Options_Frame(param0->data->options), 19); + LoadMessageBoxGraphics(param0->bgl, 1, (1024 - (18 + 12)), 13, Options_Frame(param0->data->options), 19); if (param0->subscreen == 0) { sub_02091610(param0, 0xfe); @@ -2157,7 +2157,7 @@ static int sub_0208E958(PokemonSummaryApp *param0) { if (param0->monData.sheen == 255) { Font_LoadScreenIndicatorsPalette(0, 14 * 32, 19); - sub_0200DD0C(param0->bgl, 1, (1024 - (18 + 12)), 13, Options_Frame(param0->data->options), 19); + LoadMessageBoxGraphics(param0->bgl, 1, (1024 - (18 + 12)), 13, Options_Frame(param0->data->options), 19); sub_02091610(param0, 0xff); param0->data->returnMode = 1; diff --git a/src/render_window.c b/src/render_window.c new file mode 100644 index 0000000000..2edfb5ecd7 --- /dev/null +++ b/src/render_window.c @@ -0,0 +1,1010 @@ +#include "render_window.h" + +#include +#include + +#include "constants/narc.h" + +#include "struct_defs/archived_sprite.h" +#include "struct_defs/sprite_template.h" +#include "struct_defs/struct_0200D0F4.h" +#include "struct_defs/struct_02013610.h" + +#include "graphics/signposts/field_board.naix" +#include "graphics/windows/pl_winframe.naix" +#include "overlay005/ov5_021D2F14.h" +#include "overlay005/struct_ov5_021D30A8.h" +#include "overlay104/struct_ov104_02241308.h" + +#include "bg_window.h" +#include "cell_actor.h" +#include "graphics.h" +#include "gx_layers.h" +#include "heap.h" +#include "narc.h" +#include "palette.h" +#include "pokemon.h" +#include "render_text.h" +#include "sprite_resource.h" +#include "sys_task.h" +#include "sys_task_manager.h" +#include "unk_0200679C.h" +#include "unk_0200762C.h" +#include "unk_0200A328.h" +#include "unk_0200C6E4.h" +#include "unk_020131EC.h" + +#define SIGNPOST_CONTENT_WIDTH_TILES 6 +#define SIGNPOST_CONTENT_HEIGHT_TILES 4 +#define SIGNPOST_BORDER_LEFT_SIZE 1 +#define SIGNPOST_BORDER_RIGHT_SIZE 2 +#define SIGNPOST_BORDER_Y_SIZE 1 +#define SIGNPOST_WIDTH_TILES (SIGNPOST_CONTENT_WIDTH_TILES + SIGNPOST_BORDER_LEFT_SIZE + SIGNPOST_BORDER_RIGHT_SIZE) +#define SIGNPOST_HEIGHT_TILES (SIGNPOST_CONTENT_HEIGHT_TILES + SIGNPOST_BORDER_Y_SIZE + SIGNPOST_BORDER_Y_SIZE) +#define SIGNPOST_WIDTH_SIZE (SIGNPOST_WIDTH_TILES * 2) +#define SIGNPOST_HEIGHT_SIZE (SIGNPOST_HEIGHT_TILES * 2) +#define SIGNPOST_SIZE (SIGNPOST_WIDTH_SIZE + SIGNPOST_HEIGHT_SIZE) + +#define WAIT_DIAL_FRAME_WIDTH_TILES 2 +#define WAIT_DIAL_FRAME_HEIGHT_TILES 2 +#define WAIT_DIAL_TILES_PER_FRAME (WAIT_DIAL_FRAME_WIDTH_TILES * WAIT_DIAL_FRAME_HEIGHT_TILES) +#define WAIT_DIAL_FRAME_SIZE (TILE_SIZE_4BPP * WAIT_DIAL_TILES_PER_FRAME) +#define WAIT_DIAL_FRAME_OFFSET(i) (WAIT_DIAL_FRAME_SIZE * i) +#define WAIT_DIAL_FRAME_COUNT 8 +#define WAIT_DIAL_WHOLE_SIZE (WAIT_DIAL_FRAME_SIZE * WAIT_DIAL_FRAME_COUNT) + +#define POKEMON_PREVIEW_RESOURCE_ID 89301 + +enum WaitDialDrawMode { + DIAL_DRAW_MODE_LOAD_ONLY = 0, + DIAL_DRAW_MODE_LOAD_AND_DRAW, + DIAL_DRAW_MODE_CLEAR, +}; + +enum WaitDialDeleteMode { + DIAL_DELETE_MODE_NONE = 0, + DIAL_DELETE_MODE_CLEAR, + DIAL_DELETE_MODE_DESTROY, +}; + +typedef struct WaitDial { + Window *window; + u8 pixels[WAIT_DIAL_WHOLE_SIZE]; + u8 messageBoxPixels[WAIT_DIAL_FRAME_SIZE]; + u16 messageBoxTile; + u8 counter; + u8 curFrame : 7; + u8 : 1; + u8 deleteMode : 2; + u8 : 6; +} WaitDial; + +typedef struct PokemonPreview { + UnkStruct_ov5_021D30A8 unk_00; + CellActorData *cellActorData; + BgConfig *bgConfig; + u8 bgLayer; + u8 x; + u8 y; + u8 state; +} PokemonPreview; + +static void DrawStandardWindowFrame(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 width, u8 height, u8 palette, u16 tile); +static void DrawMessageBoxFrame(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 width, u8 height, u8 palette, u16 tile); +static void BlitRectToBitmap(void *srcPixels, u16 srcX, u16 srcY, u16 srcWidth, u16 srcHeight, void *destPixels, u16 destWidth, u16 destHeight, u16 destX, u16 destY, u16 blitWidth, u16 blitHeight); +static void DrawMessageBoxScrollCursor(Window *window, u16 baseTile); +static void LoadSignpostContentTiles(BgConfig *bgConfig, u8 bgLayer, u16 offset, u8 param3, u16 narcMemberIdx, u32 heapID); +static void DrawSignpostTiles(Window *window, u16 tile, u8 palette); +static void DrawWaitDial(WaitDial *dial, u32 drawMode); +static void SysTask_TickWaitDial(SysTask *task, void *data); +static void SysTask_CleanupWaitDial(SysTask *task, void *data); +static void SysTask_HandlePokemonPreview(SysTask *task, void *data); +static PokemonPreview *CreatePokemonPreviewTask(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u32 heapID); +static void sub_0200ED50(PokemonPreview *preview, u32 heapID); +static void LoadPokemonPreviewResources(PokemonPreview *preview); +static void CreatePokemonPreviewSprite(PokemonPreview *preview, u8 x, u8 y); +static void LoadAndDrawPokemonPreviewSprite(UnkStruct_ov5_021D30A8 *param0, u16 species, u8 gender); +static void LoadAndDrawPokemonPreviewSpriteFromStruct(UnkStruct_ov5_021D30A8 *param0, Pokemon *mon); +static void DrawPokemonPreviewSprite(UnkStruct_ov5_021D30A8 *param0, ArchivedSprite *sprite); +static void DrawPokemonPreviewWindow(PokemonPreview *preview, u8 palette, u16 tile); +static void ErasePokemonPreviewWindow(PokemonPreview *preview); + +static const SpriteTemplate sPokemonPreviewSpriteTemplate = { + .x = 0, + .y = 0, + .z = 0, + .animIdx = 0, + .priority = 0, + .plttIdx = 0, + .vramType = NNS_G2D_VRAM_TYPE_2DMAIN, + .resources = { + POKEMON_PREVIEW_RESOURCE_ID, + POKEMON_PREVIEW_RESOURCE_ID, + POKEMON_PREVIEW_RESOURCE_ID, + POKEMON_PREVIEW_RESOURCE_ID, + NULL, + NULL, + }, + .bgPriority = 0, + .transferToVRAM = FALSE, +}; + +void LoadStandardWindowTiles(BgConfig *bgConfig, u8 bgLayer, u16 offset, u8 standardWindowType, u32 heapID) +{ + if (standardWindowType == STANDARD_WINDOW_SYSTEM) { + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__PL_WINFRAME, + standard_system_NCGR, + bgConfig, + bgLayer, + offset, + 0, + FALSE, + heapID); + } else { + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__PL_WINFRAME, + standard_field_NCGR, + bgConfig, + bgLayer, + offset, + 0, + FALSE, + heapID); + } +} + +u32 GetStandardWindowPaletteNARCMember() +{ + return standard_system_NCLR; +} + +void LoadStandardWindowGraphics(BgConfig *bgConfig, u8 bgLayer, u16 tileOffset, u8 palOffset, u8 standardWindowType, u32 heapID) +{ + u32 narcMemberIdx; + if (standardWindowType == STANDARD_WINDOW_SYSTEM) { + narcMemberIdx = standard_system_NCGR; + } else { + narcMemberIdx = standard_field_NCGR; + } + + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__PL_WINFRAME, + narcMemberIdx, + bgConfig, + bgLayer, + tileOffset, + 0, + FALSE, + heapID); + + if (standardWindowType == STANDARD_WINDOW_UNDERGROUND) { + narcMemberIdx = standard_underground_NCLR; + } else { + narcMemberIdx = standard_system_NCLR; + } + + if (bgLayer < BG_LAYER_SUB_0) { + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_WINFRAME, + narcMemberIdx, + PAL_LOAD_MAIN_BG, + palOffset * PALETTE_SIZE_BYTES, + PALETTE_SIZE_BYTES, + heapID); + } else { + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_WINFRAME, + narcMemberIdx, + PAL_LOAD_SUB_BG, + palOffset * PALETTE_SIZE_BYTES, + PALETTE_SIZE_BYTES, + heapID); + } +} + +static void DrawStandardWindowFrame(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 width, u8 height, u8 palette, u16 tile) +{ + // clang-format off + Bg_FillTilemapRect(bgConfig, bgLayer, tile, x - 1, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 1, x, y - 1, width, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 2, x + width, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 3, x - 1, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 5, x + width, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 6, x - 1, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 7, x, y + height, width, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 8, x + width, y + height, 1, 1, palette); + // clang-format on +} + +void Window_DrawStandardFrame(Window *window, u8 skipTransfer, u16 tile, u8 palette) +{ + DrawStandardWindowFrame(window->bgConfig, + Window_GetBgLayer(window), + Window_GetXPos(window), + Window_GetYPos(window), + Window_GetWidth(window), + Window_GetHeight(window), + palette, + tile); + + if (skipTransfer == FALSE) { + Window_CopyToVRAM(window); + } +} + +void Window_EraseStandardFrame(Window *window, u8 skipTransfer) +{ + Bg_FillTilemapRect(window->bgConfig, + Window_GetBgLayer(window), + 0, + Window_GetXPos(window) - 1, + Window_GetYPos(window) - 1, + Window_GetWidth(window) + 2, + Window_GetHeight(window) + 2, + 0); + + if (skipTransfer == FALSE) { + Window_ClearAndCopyToVRAM(window); + } +} + +u32 GetMessageBoxTilesNARCMember(u32 messageBoxFrame) +{ + return message_box_00_NCGR + messageBoxFrame; +} + +u32 GetMessageBoxPaletteNARCMember(u32 messageBoxFrame) +{ + return message_box_00_NCLR + messageBoxFrame; +} + +void LoadMessageBoxGraphics(BgConfig *bgConfig, u8 bgLayer, u16 tileOffset, u8 palOffset, u8 messageBoxFrame, u32 heapID) +{ + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__PL_WINFRAME, + GetMessageBoxTilesNARCMember(messageBoxFrame), + bgConfig, + bgLayer, + tileOffset, + 0, + FALSE, + heapID); + + if (bgLayer < BG_LAYER_SUB_0) { + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_WINFRAME, + GetMessageBoxPaletteNARCMember(messageBoxFrame), + PAL_LOAD_MAIN_BG, + palOffset * PALETTE_SIZE_BYTES, + PALETTE_SIZE_BYTES, + heapID); + } else { + Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_WINFRAME, + GetMessageBoxPaletteNARCMember(messageBoxFrame), + PAL_LOAD_SUB_BG, + palOffset * PALETTE_SIZE_BYTES, + PALETTE_SIZE_BYTES, + heapID); + } +} + +static void DrawMessageBoxFrame(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 width, u8 height, u8 palette, u16 tile) +{ + // clang-format off + Bg_FillTilemapRect(bgConfig, bgLayer, tile, x - 2, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 1, x - 1, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 2, x, y - 1, width, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 3, x + width, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 4, x + width + 1, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 5, x + width + 2, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 6, x - 2, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 7, x - 1, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 9, x + width, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 10, x + width + 1, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 11, x + width + 2, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 12, x - 2, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 13, x - 1, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 14, x, y + height, width, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 15, x + width, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 16, x + width + 1, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 17, x + width + 2, y + height, 1, 1, palette); + // clang-format on +} + +void Window_DrawMessageBox(Window *window, u32 tile, u32 palette) +{ + DrawMessageBoxFrame(window->bgConfig, + Window_GetBgLayer(window), + Window_GetXPos(window), + Window_GetYPos(window), + Window_GetWidth(window), + Window_GetHeight(window), + palette, + tile); +} + +void Window_DrawMessageBoxWithScrollCursor(Window *window, u8 skipTransfer, u16 tile, u8 palette) +{ + Window_DrawMessageBox(window, tile, palette); + + if (skipTransfer == FALSE) { + Window_CopyToVRAM(window); + } + + DrawMessageBoxScrollCursor(window, tile); +} + +void Window_EraseMessageBox(Window *window, u8 skipTransfer) +{ + Bg_FillTilemapRect(window->bgConfig, + Window_GetBgLayer(window), + 0, + Window_GetXPos(window) - 2, + Window_GetYPos(window) - 1, + Window_GetWidth(window) + 5, + Window_GetHeight(window) + 2, + 0); + + if (skipTransfer == FALSE) { + Window_ClearAndCopyToVRAM(window); + } +} + +static void BlitRectToBitmap(void *srcPixels, u16 srcX, u16 srcY, u16 srcWidth, u16 srcHeight, void *destPixels, u16 destWidth, u16 destHeight, u16 destX, u16 destY, u16 blitWidth, u16 blitHeight) +{ + Bitmap src, dest; + + src.pixels = (u8 *)srcPixels; + src.width = srcWidth; + src.height = srcHeight; + + dest.pixels = (u8 *)destPixels; + dest.width = destWidth; + dest.height = destHeight; + + Bitmap_BlitRect4bpp(&src, &dest, srcX, srcY, destX, destY, blitWidth, blitHeight, 0); +} + +#define SCROLL_CURSOR_TILES_PER_FRAME 4 +#define SCROLL_CURSOR_FRAME_COUNT 3 +#define SCROLL_CURSOR_TILE_OFFSET(i) (TILE_SIZE_4BPP * (i)) +#define SCROLL_CURSOR_FRAME_SIZE (SCROLL_CURSOR_TILE_OFFSET(SCROLL_CURSOR_TILES_PER_FRAME)) +#define SCROLL_CURSOR_GRAPHICS_SIZE (SCROLL_CURSOR_FRAME_SIZE * SCROLL_CURSOR_FRAME_COUNT) + +static void DrawMessageBoxScrollCursor(Window *window, u16 baseTile) +{ + // must forward-declare these to match + u8 *cursorTiles; + void *cursorCharPtr; + + u32 heapID = BgConfig_GetHeapID(window->bgConfig); + u8 bgLayer = Window_GetBgLayer(window); + u8 *cursorBlit = Heap_AllocFromHeap(heapID, SCROLL_CURSOR_GRAPHICS_SIZE); + u8 *bgGfx = Bg_GetCharPtr(bgLayer); + + NNSG2dCharacterData *cursorCharData; + cursorCharPtr = Graphics_GetCharData(NARC_INDEX_GRAPHIC__PL_WINFRAME, + scroll_cursor_NCGR, + FALSE, + &cursorCharData, + heapID); + cursorTiles = cursorCharData->pRawData; + + // Copy the window frame tiles into the blit window as a background + for (u8 i = 0; i < SCROLL_CURSOR_FRAME_COUNT; i++) { + u32 frameOffset = i * SCROLL_CURSOR_FRAME_SIZE; + + memcpy(&cursorBlit[frameOffset + SCROLL_CURSOR_TILE_OFFSET(0)], &bgGfx[(baseTile + 10) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&cursorBlit[frameOffset + SCROLL_CURSOR_TILE_OFFSET(1)], &bgGfx[(baseTile + 11) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&cursorBlit[frameOffset + SCROLL_CURSOR_TILE_OFFSET(2)], &bgGfx[(baseTile + 10) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&cursorBlit[frameOffset + SCROLL_CURSOR_TILE_OFFSET(3)], &bgGfx[(baseTile + 11) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + } + + BlitRectToBitmap(cursorTiles, + 4, + 0, + 12, + 16 * 3, + cursorBlit, + 12, + 16 * 3, + 1, + 0, + 12, + 16 * 3); + + Bg_LoadTiles(window->bgConfig, bgLayer, cursorBlit, SCROLL_CURSOR_GRAPHICS_SIZE, baseTile + 18); + TextPrinter_SetScrollArrowBaseTile(baseTile); + Heap_FreeToHeap(cursorCharPtr); + Heap_FreeToHeap(cursorBlit); +} + +void ReplaceTransparentTiles(BgConfig *bgConfig, u8 bgLayer, u16 bgBaseTile, u8 withTile, u8 messageBoxFrame, u32 heapID) +{ + void *tiles; + NNSG2dCharacterData *chars; + u8 *src; + u32 i; + u8 srcTop, srcBot; + + tiles = Graphics_GetCharData(NARC_INDEX_GRAPHIC__PL_WINFRAME, + GetMessageBoxTilesNARCMember(messageBoxFrame), + FALSE, + &chars, + heapID); + src = Heap_AllocFromHeap(heapID, TILE_SIZE_4BPP * 18); + memcpy(src, chars->pRawData, TILE_SIZE_4BPP * 18); + + for (i = 0; i < TILE_SIZE_4BPP * 18; i++) { + srcTop = src[i] >> 4; + srcBot = src[i] & 0xF; + + if (srcTop == 0) { + srcTop = withTile; + } + + if (srcBot == 0) { + srcBot = withTile; + } + + src[i] = (srcTop << 4) | srcBot; + } + + Bg_LoadTiles(bgConfig, bgLayer, src, TILE_SIZE_4BPP * 18, bgBaseTile); + Heap_FreeToHeap(tiles); + Heap_FreeToHeap(src); +} + +void LoadSignpostContentGraphics(BgConfig *bgConfig, u8 bgLayer, u16 baseTile, u8 palette, u8 signpostType, u16 signpostNARCMemberIdx, u32 heapID) +{ + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__FIELD_BOARD, + signpost_frame_NCGR, + bgConfig, + bgLayer, + baseTile, + SIGNPOST_SIZE * TILE_SIZE_4BPP, + FALSE, + heapID); + + void *signpostNclr = NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_GRAPHIC__FIELD_BOARD, signpost_NCLR, heapID); + + NNSG2dPaletteData *paletteData; + NNS_G2dGetUnpackedPaletteData(signpostNclr, &paletteData); + u16 *paletteBuf = paletteData->pRawData; + + Bg_LoadPalette(bgLayer, + paletteBuf + (signpostType * PALETTE_SIZE), + PALETTE_SIZE_BYTES, + palette * PALETTE_SIZE_BYTES); + Heap_FreeToHeapExplicit(heapID, signpostNclr); + + if (signpostType == SIGNPOST_CITY_MAP || signpostType == SIGNPOST_ROUTE_MAP) { + LoadSignpostContentTiles(bgConfig, + bgLayer, + baseTile + SIGNPOST_SIZE, + signpostType, + signpostNARCMemberIdx, + heapID); + } +} + +static void LoadSignpostContentTiles(BgConfig *bgConfig, u8 bgLayer, u16 offset, u8 signpostType, u16 narcMemberIdx, u32 heapID) +{ + if (signpostType == SIGNPOST_CITY_MAP) { + narcMemberIdx += city_map_empty_NCGR; + } else { + narcMemberIdx += route_map_00_NCGR; + } + + Graphics_LoadTilesToBgLayer(NARC_INDEX_GRAPHIC__FIELD_BOARD, + narcMemberIdx, + bgConfig, + bgLayer, + offset, + 24 * TILE_SIZE_4BPP, + FALSE, + heapID); +} + +static void DrawSignpostFrame(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 width, u8 height, u8 palette, u16 tile) +{ + // clang-format off + Bg_FillTilemapRect(bgConfig, bgLayer, tile, x - 9, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 1, x - 8, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 2, x - 7, y - 1, width + 7, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 3, x + width, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 4, x + width + 1, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 5, x + width + 2, y - 1, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 6, x - 9, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 7, x - 8, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 8, x - 1, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 9, x + width, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 10, x + width + 1, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 11, x + width + 2, y, 1, height, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 12, x - 9, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 13, x - 8, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 14, x - 7, y + height, width + 7, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 15, x + width, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 16, x + width + 1, y + height, 1, 1, palette); + Bg_FillTilemapRect(bgConfig, bgLayer, tile + 17, x + width + 2, y + height, 1, 1, palette); + // clang-format on +} + +static void DrawSignpostTiles(Window *window, u16 tile, u8 palette) +{ + u16 dy, dx; // must forward-declare to match + + u8 bgLayer = Window_GetBgLayer(window); + u16 x = Window_GetXPos(window) - 7; + u16 y = Window_GetYPos(window); + + for (dy = 0; dy < SIGNPOST_CONTENT_HEIGHT_TILES; dy++) { + for (dx = 0; dx < SIGNPOST_CONTENT_WIDTH_TILES; dx++) { + Bg_FillTilemapRect(window->bgConfig, bgLayer, tile + dy * SIGNPOST_CONTENT_WIDTH_TILES + dx, x + dx, y + dy, 1, 1, palette); + } + } +} + +void Window_DrawSignpost(Window *window, u8 skipTransfer, u16 baseTile, u8 palette, u8 signpostType) +{ + u8 bgLayer = Window_GetBgLayer(window); + + if (signpostType == SIGNPOST_CITY_MAP || signpostType == SIGNPOST_ROUTE_MAP) { + DrawSignpostFrame(window->bgConfig, + bgLayer, + Window_GetXPos(window), + Window_GetYPos(window), + Window_GetWidth(window), + Window_GetHeight(window), + palette, + baseTile); + DrawSignpostTiles(window, baseTile + SIGNPOST_SIZE, palette); + } else { + DrawMessageBoxFrame(window->bgConfig, + bgLayer, + Window_GetXPos(window), + Window_GetYPos(window), + Window_GetWidth(window), + Window_GetHeight(window), + palette, + baseTile); + } + + if (skipTransfer == FALSE) { + Window_CopyToVRAM(window); + } + + DrawMessageBoxScrollCursor(window, baseTile); +} + +void Window_EraseSignpost(Window *window, u8 signpostType, u8 skipTransfer) +{ + u8 bgLayer = Window_GetBgLayer(window); + + if (signpostType == SIGNPOST_CITY_MAP || signpostType == SIGNPOST_ROUTE_MAP) { + Bg_FillTilemapRect(window->bgConfig, + bgLayer, + 0, + Window_GetXPos(window) - 9, + Window_GetYPos(window) - 1, + Window_GetWidth(window) + 11, + Window_GetHeight(window) + 2, + 0); + } else { + Bg_FillTilemapRect(window->bgConfig, + bgLayer, + 0, + Window_GetXPos(window) - 2, + Window_GetYPos(window) - 1, + Window_GetWidth(window) + 5, + Window_GetHeight(window) + 2, + 0); + } + + if (skipTransfer == FALSE) { + Window_ClearAndCopyToVRAM(window); + } +} + +void *Window_AddWaitDial(Window *window, u32 baseTile) +{ + WaitDial *dial; + u32 heapID; + u8 *bgCharPtr; + u8 *dialTiles; + u8 *tmp; + void *dialTilesRaw; + u8 bgLayer; + u8 i; + NNSG2dCharacterData *dialCharData; + + heapID = BgConfig_GetHeapID(window->bgConfig); + bgLayer = Window_GetBgLayer(window); + bgCharPtr = Bg_GetCharPtr(bgLayer); + dial = Heap_AllocFromHeap(heapID, sizeof(WaitDial)); + + memcpy(dial->messageBoxPixels, &bgCharPtr[(baseTile + 18) * TILE_SIZE_4BPP], WAIT_DIAL_FRAME_SIZE); + + tmp = Heap_AllocFromHeap(heapID, WAIT_DIAL_FRAME_SIZE); + + memcpy(&tmp[TILE_SIZE_4BPP * 0], &bgCharPtr[(baseTile + 10) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&tmp[TILE_SIZE_4BPP * 1], &bgCharPtr[(baseTile + 11) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&tmp[TILE_SIZE_4BPP * 2], &bgCharPtr[(baseTile + 10) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + memcpy(&tmp[TILE_SIZE_4BPP * 3], &bgCharPtr[(baseTile + 11) * TILE_SIZE_4BPP], TILE_SIZE_4BPP); + + for (i = 0; i < WAIT_DIAL_FRAME_COUNT; i++) { + memcpy(dial->pixels + WAIT_DIAL_FRAME_OFFSET(i), tmp, WAIT_DIAL_FRAME_SIZE); + } + + Heap_FreeToHeap(tmp); + + dialTilesRaw = Graphics_GetCharData(NARC_INDEX_GRAPHIC__PL_WINFRAME, + wait_dial_NCGR, + FALSE, + &dialCharData, + heapID); + dialTiles = dialCharData->pRawData; + + BlitRectToBitmap(dialTiles, + 0, + 0, + WAIT_DIAL_FRAME_WIDTH_TILES * 8, + (WAIT_DIAL_FRAME_HEIGHT_TILES * 8) * WAIT_DIAL_FRAME_COUNT, + dial->pixels, + WAIT_DIAL_FRAME_WIDTH_TILES * 8, + (WAIT_DIAL_FRAME_HEIGHT_TILES * 8) * WAIT_DIAL_FRAME_COUNT, + 0, + 0, + WAIT_DIAL_FRAME_WIDTH_TILES * 8, + (WAIT_DIAL_FRAME_HEIGHT_TILES * 8) * WAIT_DIAL_FRAME_COUNT); + Heap_FreeToHeap(dialTilesRaw); + + dial->window = window; + dial->messageBoxTile = baseTile; + dial->counter = 0; + dial->curFrame = 0; + dial->deleteMode = 0; + + SysTask_ExecuteOnVBlank(SysTask_TickWaitDial, dial, 0); + DrawWaitDial(dial, DIAL_DRAW_MODE_LOAD_AND_DRAW); + + return dial; +} + +static void DrawWaitDial(WaitDial *dial, u32 drawMode) +{ + u8 bgLayer = Window_GetBgLayer(dial->window); + u8 x = Window_GetXPos(dial->window); + u8 y = Window_GetYPos(dial->window); + u8 width = Window_GetWidth(dial->window); + + if (drawMode == DIAL_DRAW_MODE_CLEAR) { + Bg_LoadTiles(dial->window->bgConfig, bgLayer, dial->messageBoxPixels, WAIT_DIAL_FRAME_SIZE, dial->messageBoxTile + 18); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 10, x + width + 1, y + 2, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 11, x + width + 2, y + 2, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 10, x + width + 1, y + 3, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 11, x + width + 2, y + 3, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_CopyTilemapBufferToVRAM(dial->window->bgConfig, bgLayer); + + return; + } + + Bg_LoadTiles(dial->window->bgConfig, bgLayer, &dial->pixels[WAIT_DIAL_FRAME_SIZE * dial->curFrame], WAIT_DIAL_FRAME_SIZE, dial->messageBoxTile + 18); + + if (drawMode == DIAL_DRAW_MODE_LOAD_ONLY) { + return; + } + + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 18, x + width + 1, y + 2, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 19, x + width + 2, y + 2, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 20, x + width + 1, y + 3, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_FillTilemapRect(dial->window->bgConfig, bgLayer, dial->messageBoxTile + 21, x + width + 2, y + 3, 1, 1, TILEMAP_FILL_VAL_KEEP_PALETTE); + Bg_CopyTilemapBufferToVRAM(dial->window->bgConfig, bgLayer); +} + +static void SysTask_TickWaitDial(SysTask *task, void *data) +{ + WaitDial *dial = data; + + if (dial->deleteMode != DIAL_DELETE_MODE_NONE) { + if (dial->deleteMode == DIAL_DELETE_MODE_CLEAR) { + DrawWaitDial(dial, DIAL_DRAW_MODE_CLEAR); + } + + SysTask_Done(task); + return; + } + + dial->counter++; + + if (dial->counter == 16) { + dial->counter = 0; + dial->curFrame = (dial->curFrame + 1) & 7; + DrawWaitDial(dial, DIAL_DRAW_MODE_LOAD_ONLY); + } +} + +static void SysTask_CleanupWaitDial(SysTask *task, void *data) +{ + Heap_FreeToHeap(data); + SysTask_Done(task); +} + +void DestroyWaitDial(void *taskData) +{ + WaitDial *dial = taskData; + + SysTask_ExecuteAfterVBlank(SysTask_CleanupWaitDial, dial, 0); + dial->deleteMode = DIAL_DELETE_MODE_CLEAR; +} + +void DestroyWaitDialTaskOnly(void *taskData) +{ + WaitDial *dial = taskData; + + SysTask_ExecuteAfterVBlank(SysTask_CleanupWaitDial, dial, 0); + dial->deleteMode = DIAL_DELETE_MODE_DESTROY; +} + +u8 *DrawPokemonPreview(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 palette, u16 baseTile, u16 species, u8 gender, enum HeapId heapID) +{ + PokemonPreview *preview = CreatePokemonPreviewTask(bgConfig, bgLayer, x, y, heapID); + + sub_0200ED50(preview, heapID); + LoadPokemonPreviewResources(preview); + CreatePokemonPreviewSprite(preview, x, y); + LoadAndDrawPokemonPreviewSprite(&preview->unk_00, species, gender); + DrawPokemonPreviewWindow(preview, palette, baseTile); + Bg_CopyTilemapBufferToVRAM(bgConfig, bgLayer); + + return &preview->state; +} + +u8 *DrawPokemonPreviewFromStruct(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u8 palette, u16 baseTile, Pokemon *mon, enum HeapId heapID) +{ + PokemonPreview *preview = CreatePokemonPreviewTask(bgConfig, bgLayer, x, y, heapID); + + sub_0200ED50(preview, heapID); + LoadPokemonPreviewResources(preview); + CreatePokemonPreviewSprite(preview, x, y); + LoadAndDrawPokemonPreviewSpriteFromStruct(&preview->unk_00, mon); + DrawPokemonPreviewWindow(preview, palette, baseTile); + Bg_CopyTilemapBufferToVRAM(bgConfig, bgLayer); + + return &preview->state; +} + +static void SysTask_HandlePokemonPreview(SysTask *task, void *data) +{ + PokemonPreview *preview = data; + + switch (preview->state) { + case 1: + ErasePokemonPreviewWindow(preview); + sub_0200D0F4(preview->cellActorData); + ov5_021D375C(&preview->unk_00); + SysTask_FinishAndFreeParam(task); + return; + + case 2: + preview->state = 3; + CellActor_SetAnim(preview->cellActorData->unk_00, 1); + break; + + case 3: + if (CellActor_GetAnimFrame(preview->cellActorData->unk_00) == 6) { + preview->state = 0; + } + break; + } + + CellActor_UpdateAnim(preview->cellActorData->unk_00, FX32_ONE); + CellActorCollection_Update(preview->unk_00.unk_00); +} + +static PokemonPreview *CreatePokemonPreviewTask(BgConfig *bgConfig, u8 bgLayer, u8 x, u8 y, u32 heapID) +{ + PokemonPreview *preview = SysTask_GetParam(SysTask_StartAndAllocateParam(SysTask_HandlePokemonPreview, sizeof(PokemonPreview), 0, heapID)); + + preview->state = 0; + preview->bgConfig = bgConfig; + preview->bgLayer = bgLayer; + preview->x = x; + preview->y = y; + + return preview; +} + +static void sub_0200ED50(PokemonPreview *preview, u32 heapID) +{ + UnkStruct_ov104_02241308 v0 = { 1, 1, 1, 1, 0, 0 }; + ov5_021D3190(&preview->unk_00, &v0, 1, heapID); +} + +static void LoadPokemonPreviewResources(PokemonPreview *preview) +{ + ov5_021D3270(&preview->unk_00, + NARC_INDEX_GRAPHIC__PL_WINFRAME, + pokemon_preview_NCLR, + FALSE, + 1, + NNS_G2D_VRAM_TYPE_2DMAIN, + POKEMON_PREVIEW_RESOURCE_ID); + ov5_021D3360(&preview->unk_00, + NARC_INDEX_GRAPHIC__PL_WINFRAME, + pokemon_preview_cell_NCER, + FALSE, + POKEMON_PREVIEW_RESOURCE_ID); + ov5_021D3388(&preview->unk_00, + NARC_INDEX_GRAPHIC__PL_WINFRAME, + pokemon_preview_anim_NANR, + FALSE, + POKEMON_PREVIEW_RESOURCE_ID); + ov5_021D33B0(&preview->unk_00, + NARC_INDEX_GRAPHIC__PL_WINFRAME, + pokemon_preview_NCGR, + FALSE, + NNS_G2D_VRAM_TYPE_2DMAIN, + POKEMON_PREVIEW_RESOURCE_ID); +} + +static void CreatePokemonPreviewSprite(PokemonPreview *preview, u8 x, u8 y) +{ + SpriteTemplate template = sPokemonPreviewSpriteTemplate; + template.x = (x + 5) * 8; + template.y = (y + 5) * 8; + + preview->cellActorData = ov5_021D3584(&preview->unk_00, &template); + + CellActorCollection_Update(preview->unk_00.unk_00); + GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, TRUE); +} + +static void LoadAndDrawPokemonPreviewSprite(UnkStruct_ov5_021D30A8 *param0, u16 species, u8 gender) +{ + void *buf = sub_0200762C(param0->unk_1C6); + + ArchivedSprite sprite; + BuildArchivedPokemonSprite(&sprite, species, gender, FACE_FRONT, FALSE, NULL, NULL); + DrawPokemonPreviewSprite(param0, &sprite); + sub_02007B6C(buf); +} + +static void LoadAndDrawPokemonPreviewSpriteFromStruct(UnkStruct_ov5_021D30A8 *param0, Pokemon *mon) +{ + void *buf = sub_0200762C(param0->unk_1C6); + + ArchivedSprite sprite; + Pokemon_BuildArchivedSprite(&sprite, mon, FACE_FRONT); + DrawPokemonPreviewSprite(param0, &sprite); + sub_02007B6C(buf); +} + +#define POKEMON_SPRITE_FRAME_WIDTH_TILES 10 +#define POKEMON_SPRITE_FRAME_HEIGHT_TILES 10 +#define POKEMON_SPRITE_FRAME_SIZE_TILES (POKEMON_SPRITE_FRAME_WIDTH_TILES * POKEMON_SPRITE_FRAME_HEIGHT_TILES) +#define POKEMON_SPRITE_FRAME_SIZE_BYTES (TILE_SIZE_4BPP * POKEMON_SPRITE_FRAME_SIZE_TILES) +#define POKEMON_SPRITE_WHOLE_SIZE_BYTES (POKEMON_SPRITE_FRAME_SIZE_BYTES * 2) + +static void DrawPokemonPreviewSprite(UnkStruct_ov5_021D30A8 *param0, ArchivedSprite *sprite) +{ + u8 *buf; + u32 offset; + SpriteResource *charResource, *plttResource; + NNSG2dImageProxy *imageProxy; + const NNSG2dImagePaletteProxy *paletteProxy; + + buf = Heap_AllocFromHeap(param0->unk_1C6, POKEMON_SPRITE_WHOLE_SIZE_BYTES); + + // frame 0 + UnkStruct_02013610 v6 = { 0, 0, 10, 10 }; + sub_020135F0(sprite->archive, sprite->character, param0->unk_1C6, &v6, buf); + + // frame 1 + UnkStruct_02013610 v7 = { 10, 0, 10, 10 }; + sub_020135F0(sprite->archive, sprite->character, param0->unk_1C6, &v7, buf + POKEMON_SPRITE_FRAME_SIZE_BYTES); + + charResource = SpriteResourceCollection_Find(param0->unk_194[SPRITE_RESOURCE_TILES], POKEMON_PREVIEW_RESOURCE_ID); + imageProxy = sub_0200A534(charResource); + offset = NNS_G2dGetImageLocation(imageProxy, NNS_G2D_VRAM_TYPE_2DMAIN); + + DC_FlushRange(buf, POKEMON_SPRITE_WHOLE_SIZE_BYTES); + GX_LoadOBJ(buf, offset, POKEMON_SPRITE_WHOLE_SIZE_BYTES); + + Heap_FreeToHeap(buf); + + buf = sub_02013660(sprite->archive, sprite->palette, param0->unk_1C6); + plttResource = SpriteResourceCollection_Find(param0->unk_194[SPRITE_RESOURCE_PALETTE], POKEMON_PREVIEW_RESOURCE_ID); + paletteProxy = sub_0200A72C(plttResource, imageProxy); + offset = NNS_G2dGetImagePaletteLocation(paletteProxy, NNS_G2D_VRAM_TYPE_2DMAIN); + + DC_FlushRange(buf, 32); + GX_LoadOBJPltt(buf, offset, 32); + + Heap_FreeToHeap(buf); +} + +static void DrawPokemonPreviewWindow(PokemonPreview *preview, u8 palette, u16 tile) +{ + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile, + preview->x - 1, + preview->y - 1, + 1, + 1, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 1, + preview->x, + preview->y - 1, + POKEMON_SPRITE_FRAME_WIDTH_TILES, + 1, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 2, + preview->x + POKEMON_SPRITE_FRAME_WIDTH_TILES, + preview->y - 1, + 1, + 1, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 4, + preview->x, + preview->y, + POKEMON_SPRITE_FRAME_WIDTH_TILES, + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 3, + preview->x - 1, + preview->y, + 1, + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 5, + preview->x + POKEMON_SPRITE_FRAME_WIDTH_TILES, + preview->y, + 1, + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 6, + preview->x - 1, + preview->y + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + 1, + 1, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 7, + preview->x, + preview->y + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + POKEMON_SPRITE_FRAME_WIDTH_TILES, + 1, + palette); + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + tile + 8, + preview->x + POKEMON_SPRITE_FRAME_WIDTH_TILES, + preview->y + POKEMON_SPRITE_FRAME_HEIGHT_TILES, + 1, + 1, + palette); + + Bg_ScheduleTilemapTransfer(preview->bgConfig, preview->bgLayer); +} + +static void ErasePokemonPreviewWindow(PokemonPreview *preview) +{ + Bg_FillTilemapRect(preview->bgConfig, + preview->bgLayer, + 0, + preview->x - 1, + preview->y - 1, + POKEMON_SPRITE_FRAME_WIDTH_TILES + 2, + POKEMON_SPRITE_FRAME_HEIGHT_TILES + 2, + 0); + Bg_ScheduleTilemapTransfer(preview->bgConfig, preview->bgLayer); +} diff --git a/src/scrcmd.c b/src/scrcmd.c index f7b58354b7..60f6d84fe7 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -119,6 +119,7 @@ #include "pokemon.h" #include "pokeradar.h" #include "poketch_data.h" +#include "render_window.h" #include "roaming_pokemon.h" #include "rtc.h" #include "save_player.h" @@ -132,7 +133,6 @@ #include "trainer_data.h" #include "trainer_info.h" #include "unk_020041CC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014D38.h" #include "unk_0201D15C.h" @@ -2369,7 +2369,7 @@ static BOOL ScrCmd_CloseMessage(ScriptContext *ctx) Window *window = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_WINDOW); u8 *v2 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_IS_MSG_BOX_OPEN); - sub_0200E084(window, 0); + Window_EraseMessageBox(window, 0); Window_Remove(window); *v2 = 0; @@ -2660,7 +2660,7 @@ static BOOL ScrCmd_03E(ScriptContext *ctx) Menu **v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_UI_CONTROL); u16 v2 = ScriptContext_ReadHalfWord(ctx); - sub_0200DAA4(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + LoadStandardWindowGraphics(fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); *v1 = Menu_MakeYesNoChoice(fieldSystem->unk_08, &Unk_020EAB84, 1024 - (18 + 12) - 9, 11, 4); ctx->data[0] = v2; @@ -2698,7 +2698,7 @@ static BOOL ScrCmd_18D(ScriptContext *ctx) Window *v1 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_WINDOW); v0 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_SAVING_ICON); - *v0 = sub_0200E7FC(v1, 1024 - (18 + 12)); + *v0 = Window_AddWaitDial(v1, 1024 - (18 + 12)); return 0; } @@ -2708,7 +2708,7 @@ static BOOL ScrCmd_18E(ScriptContext *ctx) void **v0; v0 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_SAVING_ICON); - DeleteWaitDial(*v0); + DestroyWaitDial(*v0); return 0; } @@ -4014,8 +4014,8 @@ static BOOL ScrCmd_208(ScriptContext *ctx) u16 v1 = ScriptContext_GetVar(ctx); u16 v2 = ScriptContext_GetVar(ctx); - sub_0200DAA4(ctx->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - *v0 = sub_0200EBF0(ctx->fieldSystem->unk_08, 3, 10, 5, 11, 1024 - (18 + 12) - 9, v1, v2, 4); + LoadStandardWindowGraphics(ctx->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + *v0 = DrawPokemonPreview(ctx->fieldSystem->unk_08, 3, 10, 5, 11, 1024 - (18 + 12) - 9, v1, v2, 4); sub_020451B4(ctx->fieldSystem, v1); return 0; @@ -4028,9 +4028,9 @@ static BOOL ScrCmd_28C(ScriptContext *ctx) u16 v2 = ScriptContext_GetVar(ctx); v0 = Party_GetPokemonBySlotIndex(Party_GetFromSavedata(ctx->fieldSystem->saveData), v2); - sub_0200DAA4(ctx->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); + LoadStandardWindowGraphics(ctx->fieldSystem->unk_08, 3, 1024 - (18 + 12) - 9, 11, 0, 4); - *v1 = sub_0200EC48(ctx->fieldSystem->unk_08, 3, 10, 5, 11, 1024 - (18 + 12) - 9, v0, 4); + *v1 = DrawPokemonPreviewFromStruct(ctx->fieldSystem->unk_08, 3, 10, 5, 11, 1024 - (18 + 12) - 9, v0, 4); sub_020451B4(ctx->fieldSystem, Pokemon_GetValue(v0, MON_DATA_SPECIES, NULL)); return 0; diff --git a/src/unk_0200DA60.c b/src/unk_0200DA60.c deleted file mode 100644 index dddc564919..0000000000 --- a/src/unk_0200DA60.c +++ /dev/null @@ -1,721 +0,0 @@ -#include "unk_0200DA60.h" - -#include -#include - -#include "struct_defs/archived_sprite.h" -#include "struct_defs/sprite_template.h" -#include "struct_defs/struct_0200D0F4.h" -#include "struct_defs/struct_02013610.h" - -#include "overlay005/ov5_021D2F14.h" -#include "overlay005/struct_ov5_021D30A8.h" -#include "overlay104/struct_ov104_02241308.h" - -#include "bg_window.h" -#include "cell_actor.h" -#include "graphics.h" -#include "gx_layers.h" -#include "heap.h" -#include "narc.h" -#include "pokemon.h" -#include "render_text.h" -#include "sprite_resource.h" -#include "sys_task.h" -#include "sys_task_manager.h" -#include "unk_0200679C.h" -#include "unk_0200762C.h" -#include "unk_0200A328.h" -#include "unk_0200C6E4.h" -#include "unk_020131EC.h" - -typedef struct { - Window *unk_00; - u8 unk_04[1024]; - u8 unk_404[128]; - u16 unk_484; - u8 unk_486; - u8 unk_487_0 : 7; - u8 : 1; - u8 unk_488_0 : 2; - u8 : 6; -} UnkStruct_0200E924; - -typedef struct { - UnkStruct_ov5_021D30A8 unk_00; - CellActorData *unk_1C8; - BgConfig *unk_1CC; - u8 unk_1D0; - u8 unk_1D1; - u8 unk_1D2; - u8 unk_1D3; -} UnkStruct_0200ED50; - -static void sub_0200E130(Window *param0, u16 param1); -static void sub_0200E31C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u16 param4, u32 param5); -static void sub_0200E924(UnkStruct_0200E924 *param0, u32 param1); -static void sub_0200EB20(SysTask *param0, void *param1); -static UnkStruct_0200ED50 *sub_0200ED14(BgConfig *param0, u8 param1, u8 param2, u8 param3, u32 param4); -static void sub_0200ED50(UnkStruct_0200ED50 *param0, u32 param1); -static void sub_0200ED7C(UnkStruct_0200ED50 *param0); -static void sub_0200EDD4(UnkStruct_0200ED50 *param0, u8 param1, u8 param2); -static void sub_0200EE98(UnkStruct_ov5_021D30A8 *param0, ArchivedSprite *param1); -static void sub_0200EE24(UnkStruct_ov5_021D30A8 *param0, u16 param1, u8 param2); -static void sub_0200EE64(UnkStruct_ov5_021D30A8 *param0, Pokemon *param1); -static void sub_0200EC9C(SysTask *param0, void *param1); -static void sub_0200EF7C(UnkStruct_0200ED50 *param0, u8 param1, u16 param2); -static void sub_0200F12C(UnkStruct_0200ED50 *param0); - -static const SpriteTemplate Unk_020E5040 = { - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - NNS_G2D_VRAM_TYPE_2DMAIN, - { 0x15CD5, 0x15CD5, 0x15CD5, 0x15CD5, 0x0, 0x0 }, - 0x0, - 0x0 -}; - -void Window_SetFrame(BgConfig *param0, u8 param1, u16 param2, u8 param3, u32 param4) -{ - if (param3 == 0) { - Graphics_LoadTilesToBgLayer(38, 0, param0, param1, param2, 0, 0, param4); - } else { - Graphics_LoadTilesToBgLayer(38, 1, param0, param1, param2, 0, 0, param4); - } -} - -u32 Window_FramePalette(void) -{ - return 24; -} - -void sub_0200DAA4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5) -{ - u32 v0; - - if (param4 == 0) { - v0 = 0; - } else { - v0 = 1; - } - - Graphics_LoadTilesToBgLayer(38, v0, param0, param1, param2, 0, 0, param5); - - if (param4 == 2) { - v0 = 45; - } else { - v0 = 24; - } - - if (param1 < 4) { - Graphics_LoadPalette(38, v0, 0, param3 * 0x20, 0x20, param5); - } else { - Graphics_LoadPalette(38, v0, 4, param3 * 0x20, 0x20, param5); - } -} - -static void sub_0200DB10(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u16 param7) -{ - Bg_FillTilemapRect(param0, param1, param7, param2 - 1, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 1, param2, param3 - 1, param4, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 2, param2 + param4, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 3, param2 - 1, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 5, param2 + param4, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 6, param2 - 1, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 7, param2, param3 + param5, param4, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 8, param2 + param4, param3 + param5, 1, 1, param6); -} - -void Window_Show(Window *param0, u8 param1, u16 param2, u8 param3) -{ - u8 v0 = Window_GetBgLayer(param0); - - sub_0200DB10(param0->bgConfig, v0, Window_GetXPos(param0), Window_GetYPos(param0), Window_GetWidth(param0), Window_GetHeight(param0), param3, param2); - - if (param1 == 0) { - Window_CopyToVRAM(param0); - } -} - -void Window_Clear(Window *param0, u8 param1) -{ - u8 v0 = Window_GetBgLayer(param0); - - Bg_FillTilemapRect(param0->bgConfig, v0, 0, Window_GetXPos(param0) - 1, Window_GetYPos(param0) - 1, Window_GetWidth(param0) + 2, Window_GetHeight(param0) + 2, 0); - - if (param1 == 0) { - Window_ClearAndCopyToVRAM(param0); - } -} - -u32 sub_0200DD04(u32 param0) -{ - return 2 + param0; -} - -u32 sub_0200DD08(u32 param0) -{ - return 25 + param0; -} - -void sub_0200DD0C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5) -{ - Graphics_LoadTilesToBgLayer(38, sub_0200DD04(param4), param0, param1, param2, 0, 0, param5); - - if (param1 < 4) { - Graphics_LoadPalette(38, sub_0200DD08(param4), 0, param3 * 0x20, 0x20, param5); - } else { - Graphics_LoadPalette(38, sub_0200DD08(param4), 4, param3 * 0x20, 0x20, param5); - } -} - -static void sub_0200DD7C(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u16 param7) -{ - Bg_FillTilemapRect(param0, param1, param7, param2 - 2, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 1, param2 - 1, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 2, param2, param3 - 1, param4, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 3, param2 + param4, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 4, param2 + param4 + 1, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 5, param2 + param4 + 2, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 6, param2 - 2, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 7, param2 - 1, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 9, param2 + param4, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 10, param2 + param4 + 1, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 11, param2 + param4 + 2, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 12, param2 - 2, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 13, param2 - 1, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 14, param2, param3 + param5, param4, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 15, param2 + param4, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 16, param2 + param4 + 1, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 17, param2 + param4 + 2, param3 + param5, 1, 1, param6); -} - -void sub_0200E010(Window *param0, u32 param1, u32 param2) -{ - sub_0200DD7C(param0->bgConfig, Window_GetBgLayer(param0), Window_GetXPos(param0), Window_GetYPos(param0), Window_GetWidth(param0), Window_GetHeight(param0), param2, param1); -} - -void sub_0200E060(Window *param0, u8 param1, u16 param2, u8 param3) -{ - sub_0200E010(param0, param2, param3); - - if (param1 == 0) { - Window_CopyToVRAM(param0); - } - - sub_0200E130(param0, param2); -} - -void sub_0200E084(Window *param0, u8 param1) -{ - u8 v0 = Window_GetBgLayer(param0); - - Bg_FillTilemapRect(param0->bgConfig, v0, 0, Window_GetXPos(param0) - 2, Window_GetYPos(param0) - 1, Window_GetWidth(param0) + 5, Window_GetHeight(param0) + 2, 0); - - if (param1 == 0) { - Window_ClearAndCopyToVRAM(param0); - } -} - -static void sub_0200E0EC(void *param0, u16 param1, u16 param2, u16 param3, u16 param4, void *param5, u16 param6, u16 param7, u16 param8, u16 param9, u16 param10, u16 param11) -{ - Bitmap v0; - Bitmap v1; - - v0.pixels = (u8 *)param0; - v0.width = param3; - v0.height = param4; - - v1.pixels = (u8 *)param5; - v1.width = param6; - v1.height = param7; - - Bitmap_BlitRect4bpp(&v0, &v1, param1, param2, param8, param9, param10, param11, 0); -} - -static void sub_0200E130(Window *param0, u16 param1) -{ - u32 v0; - u8 *v1; - u8 *v2; - u8 *v3; - void *v4; - u8 v5; - u8 v6; - - v0 = BgConfig_GetHeapID(param0->bgConfig); - v5 = Window_GetBgLayer(param0); - v1 = Heap_AllocFromHeap(v0, (0x20 * 4 * 3)); - v2 = Bg_GetCharPtr(v5); - - { - NNSG2dCharacterData *v7; - - v4 = Graphics_GetCharData(38, 22, 0, &v7, v0); - v3 = (u8 *)v7->pRawData; - } - - for (v6 = 0; v6 < 3; v6++) { - memcpy(&v1[v6 * 0x20 * 4 + 0x20 * 0], &v2[(param1 + 10) * 0x20], 0x20); - memcpy(&v1[v6 * 0x20 * 4 + 0x20 * 1], &v2[(param1 + 11) * 0x20], 0x20); - memcpy(&v1[v6 * 0x20 * 4 + 0x20 * 2], &v2[(param1 + 10) * 0x20], 0x20); - memcpy(&v1[v6 * 0x20 * 4 + 0x20 * 3], &v2[(param1 + 11) * 0x20], 0x20); - } - - sub_0200E0EC(v3, 4, 0, 12, 16 * 3, v1, 12, 16 * 3, 1, 0, 12, 16 * 3); - Bg_LoadTiles(param0->bgConfig, v5, v1, (0x20 * 4 * 3), param1 + 18); - TextPrinter_SetScrollArrowBaseTile(param1); - Heap_FreeToHeap(v4); - Heap_FreeToHeap(v1); -} - -void sub_0200E218(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u32 param5) -{ - void *v0; - NNSG2dCharacterData *v1; - u8 *v2; - u32 v3; - u8 v4, v5; - - v0 = Graphics_GetCharData(38, sub_0200DD04(param4), 0, &v1, param5); - v2 = Heap_AllocFromHeap(param5, 0x20 * 18); - - memcpy(v2, v1->pRawData, 0x20 * 18); - - for (v3 = 0; v3 < 0x20 * 18; v3++) { - v4 = v2[v3] >> 4; - v5 = v2[v3] & 0xf; - - if (v4 == 0) { - v4 = param3; - } - - if (v5 == 0) { - v5 = param3; - } - - v2[v3] = (v4 << 4) | v5; - } - - Bg_LoadTiles(param0, param1, v2, 0x20 * 18, param2); - Heap_FreeToHeap(v0); - Heap_FreeToHeap(v2); -} - -void sub_0200E2A4(BgConfig *param0, u8 param1, u16 param2, u8 param3, u8 param4, u16 param5, u32 param6) -{ - Graphics_LoadTilesToBgLayer( - 36, 0, param0, param1, param2, (18 + 12) * 0x20, 0, param6); - - { - NNSG2dPaletteData *v0; - void *v1; - u16 *v2; - - v1 = NARC_AllocAndReadWholeMemberByIndexPair(NARC_INDEX_GRAPHIC__FIELD_BOARD, 1, param6); - NNS_G2dGetUnpackedPaletteData(v1, &v0); - v2 = (u16 *)v0->pRawData; - - Bg_LoadPalette(param1, (void *)&v2[param4 * 16], 0x20, param3 * 0x20); - Heap_FreeToHeapExplicit(param6, v1); - } - - if ((param4 == 0) || (param4 == 1)) { - sub_0200E31C(param0, param1, param2 + (18 + 12), param4, param5, param6); - } -} - -static void sub_0200E31C(BgConfig *param0, u8 param1, u16 param2, u8 param3, u16 param4, u32 param5) -{ - if (param3 == 0) { - param4 += 33; - } else { - param4 += 2; - } - - Graphics_LoadTilesToBgLayer(36, param4, param0, param1, param2, 24 * 0x20, 0, param5); -} - -static void sub_0200E354(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u16 param7) -{ - Bg_FillTilemapRect(param0, param1, param7, param2 - 9, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 1, param2 - 8, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 2, param2 - 7, param3 - 1, param4 + 7, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 3, param2 + param4, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 4, param2 + param4 + 1, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 5, param2 + param4 + 2, param3 - 1, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 6, param2 - 9, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 7, param2 - 8, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 8, param2 - 1, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 9, param2 + param4, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 10, param2 + param4 + 1, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 11, param2 + param4 + 2, param3, 1, param5, param6); - Bg_FillTilemapRect(param0, param1, param7 + 12, param2 - 9, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 13, param2 - 8, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 14, param2 - 7, param3 + param5, param4 + 7, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 15, param2 + param4, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 16, param2 + param4 + 1, param3 + param5, 1, 1, param6); - Bg_FillTilemapRect(param0, param1, param7 + 17, param2 + param4 + 2, param3 + param5, 1, 1, param6); -} - -static void sub_0200E61C(Window *param0, u16 param1, u8 param2) -{ - u16 v0, v1; - u16 v2, v3; - u8 v4; - - v4 = Window_GetBgLayer(param0); - v2 = Window_GetXPos(param0) - 7; - v3 = Window_GetYPos(param0); - - for (v0 = 0; v0 < 4; v0++) { - for (v1 = 0; v1 < 6; v1++) { - Bg_FillTilemapRect(param0->bgConfig, v4, param1 + v0 * 6 + v1, v2 + v1, v3 + v0, 1, 1, param2); - } - } -} - -void sub_0200E69C(Window *param0, u8 param1, u16 param2, u8 param3, u8 param4) -{ - u8 v0 = Window_GetBgLayer(param0); - - if ((param4 == 0) || (param4 == 1)) { - sub_0200E354(param0->bgConfig, v0, Window_GetXPos(param0), Window_GetYPos(param0), Window_GetWidth(param0), Window_GetHeight(param0), param3, param2); - sub_0200E61C(param0, param2 + (18 + 12), param3); - } else { - sub_0200DD7C(param0->bgConfig, v0, Window_GetXPos(param0), Window_GetYPos(param0), Window_GetWidth(param0), Window_GetHeight(param0), param3, param2); - } - - if (param1 == 0) { - Window_CopyToVRAM(param0); - } - - sub_0200E130(param0, param2); -} - -void sub_0200E744(Window *param0, u8 param1, u8 param2) -{ - u8 v0 = Window_GetBgLayer(param0); - - if ((param1 == 0) || (param1 == 1)) { - Bg_FillTilemapRect(param0->bgConfig, v0, 0, Window_GetXPos(param0) - 9, Window_GetYPos(param0) - 1, Window_GetWidth(param0) + 11, Window_GetHeight(param0) + 2, 0); - } else { - Bg_FillTilemapRect(param0->bgConfig, v0, 0, Window_GetXPos(param0) - 2, Window_GetYPos(param0) - 1, Window_GetWidth(param0) + 5, Window_GetHeight(param0) + 2, 0); - } - - if (param2 == 0) { - Window_ClearAndCopyToVRAM(param0); - } -} - -void *sub_0200E7FC(Window *param0, u32 param1) -{ - UnkStruct_0200E924 *v0; - u32 v1; - u8 *v2; - u8 *v3; - u8 *v4; - void *v5; - u8 v6; - u8 v7; - - v1 = BgConfig_GetHeapID(param0->bgConfig); - v6 = Window_GetBgLayer(param0); - v2 = Bg_GetCharPtr(v6); - v0 = Heap_AllocFromHeap(v1, sizeof(UnkStruct_0200E924)); - - memcpy(v0->unk_404, &v2[(param1 + 18) * 0x20], 0x20 * 4); - - v4 = (u8 *)Heap_AllocFromHeap(v1, 0x20 * 4); - - memcpy(&v4[0x20 * 0], &v2[(param1 + 10) * 0x20], 0x20); - memcpy(&v4[0x20 * 1], &v2[(param1 + 11) * 0x20], 0x20); - memcpy(&v4[0x20 * 2], &v2[(param1 + 10) * 0x20], 0x20); - memcpy(&v4[0x20 * 3], &v2[(param1 + 11) * 0x20], 0x20); - - for (v7 = 0; v7 < 8; v7++) { - memcpy(&v0->unk_04[0x20 * 4 * v7], v4, 0x20 * 4); - } - - Heap_FreeToHeap(v4); - - { - NNSG2dCharacterData *v8; - - v5 = Graphics_GetCharData(38, 23, 0, &v8, v1); - v3 = (u8 *)v8->pRawData; - } - - sub_0200E0EC(v3, 0, 0, 16, 16 * 8, v0->unk_04, 16, 16 * 8, 0, 0, 16, 16 * 8); - Heap_FreeToHeap(v5); - - v0->unk_00 = param0; - v0->unk_484 = (u16)param1; - v0->unk_486 = 0; - v0->unk_487_0 = 0; - v0->unk_488_0 = 0; - - SysTask_ExecuteOnVBlank(sub_0200EB20, v0, 0); - sub_0200E924(v0, 1); - - return v0; -} - -static void sub_0200E924(UnkStruct_0200E924 *param0, u32 param1) -{ - u8 v0, v1, v2, v3; - - v0 = Window_GetBgLayer(param0->unk_00); - v1 = Window_GetXPos(param0->unk_00); - v2 = Window_GetYPos(param0->unk_00); - v3 = Window_GetWidth(param0->unk_00); - - if (param1 == 2) { - Bg_LoadTiles(param0->unk_00->bgConfig, v0, param0->unk_404, 0x20 * 4, param0->unk_484 + 18); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 10, v1 + v3 + 1, v2 + 2, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 11, v1 + v3 + 2, v2 + 2, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 10, v1 + v3 + 1, v2 + 3, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 11, v1 + v3 + 2, v2 + 3, 1, 1, 16); - Bg_CopyTilemapBufferToVRAM(param0->unk_00->bgConfig, v0); - - return; - } - - Bg_LoadTiles( - param0->unk_00->bgConfig, v0, ¶m0->unk_04[0x20 * 4 * param0->unk_487_0], 0x20 * 4, param0->unk_484 + 18); - - if (param1 == 0) { - return; - } - - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 18, v1 + v3 + 1, v2 + 2, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 19, v1 + v3 + 2, v2 + 2, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 20, v1 + v3 + 1, v2 + 3, 1, 1, 16); - Bg_FillTilemapRect(param0->unk_00->bgConfig, v0, param0->unk_484 + 21, v1 + v3 + 2, v2 + 3, 1, 1, 16); - Bg_CopyTilemapBufferToVRAM(param0->unk_00->bgConfig, v0); -} - -static void sub_0200EB20(SysTask *param0, void *param1) -{ - UnkStruct_0200E924 *v0 = param1; - - if (v0->unk_488_0 != 0) { - if (v0->unk_488_0 == 1) { - sub_0200E924(v0, 2); - } - - SysTask_Done(param0); - return; - } - - v0->unk_486++; - - if (v0->unk_486 == 16) { - v0->unk_486 = 0; - v0->unk_487_0 = (v0->unk_487_0 + 1) & 7; - sub_0200E924(v0, 0); - } -} - -static void sub_0200EB8C(SysTask *param0, void *param1) -{ - Heap_FreeToHeap(param1); - SysTask_Done(param0); -} - -void DeleteWaitDial(void *param0) -{ - UnkStruct_0200E924 *v0 = param0; - - SysTask_ExecuteAfterVBlank(sub_0200EB8C, v0, 0); - v0->unk_488_0 = 1; -} - -void sub_0200EBC8(void *param0) -{ - UnkStruct_0200E924 *v0 = param0; - - SysTask_ExecuteAfterVBlank(sub_0200EB8C, v0, 0); - v0->unk_488_0 = 2; -} - -u8 *sub_0200EBF0(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 param5, u16 param6, u8 param7, int param8) -{ - UnkStruct_0200ED50 *v0 = sub_0200ED14(param0, param1, param2, param3, param8); - - sub_0200ED50(v0, param8); - sub_0200ED7C(v0); - sub_0200EDD4(v0, param2, param3); - sub_0200EE24(&v0->unk_00, param6, param7); - sub_0200EF7C(v0, param4, param5); - Bg_CopyTilemapBufferToVRAM(param0, param1); - - return &v0->unk_1D3; -} - -u8 *sub_0200EC48(BgConfig *param0, u8 param1, u8 param2, u8 param3, u8 param4, u16 param5, Pokemon *param6, int param7) -{ - UnkStruct_0200ED50 *v0 = sub_0200ED14(param0, param1, param2, param3, param7); - - sub_0200ED50(v0, param7); - sub_0200ED7C(v0); - sub_0200EDD4(v0, param2, param3); - sub_0200EE64(&v0->unk_00, param6); - sub_0200EF7C(v0, param4, param5); - Bg_CopyTilemapBufferToVRAM(param0, param1); - - return &v0->unk_1D3; -} - -static void sub_0200EC9C(SysTask *param0, void *param1) -{ - UnkStruct_0200ED50 *v0 = param1; - - switch (v0->unk_1D3) { - case 1: - sub_0200F12C(v0); - sub_0200D0F4(v0->unk_1C8); - ov5_021D375C(&v0->unk_00); - SysTask_FinishAndFreeParam(param0); - return; - case 2: - v0->unk_1D3 = 3; - CellActor_SetAnim(v0->unk_1C8->unk_00, 1); - break; - case 3: - if (CellActor_GetAnimFrame(v0->unk_1C8->unk_00) == 6) { - v0->unk_1D3 = 0; - } - } - - CellActor_UpdateAnim(v0->unk_1C8->unk_00, FX32_ONE); - CellActorCollection_Update(v0->unk_00.unk_00); -} - -static UnkStruct_0200ED50 *sub_0200ED14(BgConfig *param0, u8 param1, u8 param2, u8 param3, u32 param4) -{ - UnkStruct_0200ED50 *v0 = SysTask_GetParam(SysTask_StartAndAllocateParam(sub_0200EC9C, sizeof(UnkStruct_0200ED50), 0, param4)); - - v0->unk_1D3 = 0; - v0->unk_1CC = param0; - v0->unk_1D0 = param1; - v0->unk_1D1 = param2; - v0->unk_1D2 = param3; - - return v0; -} - -static void sub_0200ED50(UnkStruct_0200ED50 *param0, u32 param1) -{ - UnkStruct_ov104_02241308 v0 = { 1, 1, 1, 1, 0, 0 }; - ov5_021D3190(¶m0->unk_00, &v0, 1, param1); -} - -static void sub_0200ED7C(UnkStruct_0200ED50 *param0) -{ - ov5_021D3270(¶m0->unk_00, 38, 49, 0, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 89301); - ov5_021D3360(¶m0->unk_00, 38, 47, 0, 89301); - ov5_021D3388(¶m0->unk_00, 38, 46, 0, 89301); - ov5_021D33B0(¶m0->unk_00, 38, 48, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 89301); -} - -static void sub_0200EDD4(UnkStruct_0200ED50 *param0, u8 param1, u8 param2) -{ - SpriteTemplate v0 = Unk_020E5040; - - v0.x = (param1 + 5) * 8; - v0.y = (param2 + 5) * 8; - - param0->unk_1C8 = ov5_021D3584(¶m0->unk_00, &v0); - - CellActorCollection_Update(param0->unk_00.unk_00); - GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 1); -} - -static void sub_0200EE24(UnkStruct_ov5_021D30A8 *param0, u16 param1, u8 param2) -{ - void *v0; - ArchivedSprite v1; - - v0 = sub_0200762C(param0->unk_1C6); - - BuildArchivedPokemonSprite(&v1, param1, param2, 2, 0, NULL, NULL); - sub_0200EE98(param0, &v1); - sub_02007B6C(v0); -} - -static void sub_0200EE64(UnkStruct_ov5_021D30A8 *param0, Pokemon *param1) -{ - void *v0; - ArchivedSprite v1; - - v0 = sub_0200762C(param0->unk_1C6); - - Pokemon_BuildArchivedSprite(&v1, param1, 2); - sub_0200EE98(param0, &v1); - sub_02007B6C(v0); -} - -static void sub_0200EE98(UnkStruct_ov5_021D30A8 *param0, ArchivedSprite *param1) -{ - u8 *v0; - u32 v1; - SpriteResource *v2; - NNSG2dImageProxy *v3; - SpriteResource *v4; - const NNSG2dImagePaletteProxy *v5; - - v0 = Heap_AllocFromHeap(param0->unk_1C6, ((32 * 10 * 10) * 2)); - - { - UnkStruct_02013610 v6 = { 0, 0, 10, 10 }; - sub_020135F0(param1->archive, param1->character, param0->unk_1C6, &v6, &v0[0]); - } - { - UnkStruct_02013610 v7 = { 10, 0, 10, 10 }; - sub_020135F0(param1->archive, param1->character, param0->unk_1C6, &v7, &v0[(32 * 10 * 10)]); - } - - v2 = SpriteResourceCollection_Find(param0->unk_194[0], 89301); - v3 = sub_0200A534(v2); - v1 = NNS_G2dGetImageLocation(v3, NNS_G2D_VRAM_TYPE_2DMAIN); - - DC_FlushRange(v0, ((32 * 10 * 10) * 2)); - GX_LoadOBJ(v0, v1, ((32 * 10 * 10) * 2)); - - Heap_FreeToHeap(v0); - - v0 = sub_02013660(param1->archive, param1->palette, param0->unk_1C6); - v4 = SpriteResourceCollection_Find(param0->unk_194[1], 89301); - v5 = sub_0200A72C(v4, v3); - v1 = NNS_G2dGetImagePaletteLocation(v5, NNS_G2D_VRAM_TYPE_2DMAIN); - - DC_FlushRange(v0, 32); - GX_LoadOBJPltt(v0, v1, 32); - - Heap_FreeToHeap(v0); -} - -static void sub_0200EF7C(UnkStruct_0200ED50 *param0, u8 param1, u16 param2) -{ - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2, param0->unk_1D1 - 1, param0->unk_1D2 - 1, 1, 1, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 1, param0->unk_1D1, param0->unk_1D2 - 1, 10, 1, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 2, param0->unk_1D1 + 10, param0->unk_1D2 - 1, 1, 1, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 4, param0->unk_1D1, param0->unk_1D2, 10, 10, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 3, param0->unk_1D1 - 1, param0->unk_1D2, 1, 10, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 5, param0->unk_1D1 + 10, param0->unk_1D2, 1, 10, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 6, param0->unk_1D1 - 1, param0->unk_1D2 + 10, 1, 1, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 7, param0->unk_1D1, param0->unk_1D2 + 10, 10, 1, param1); - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, param2 + 8, param0->unk_1D1 + 10, param0->unk_1D2 + 10, 1, 1, param1); - Bg_ScheduleTilemapTransfer(param0->unk_1CC, param0->unk_1D0); -} - -static void sub_0200F12C(UnkStruct_0200ED50 *param0) -{ - Bg_FillTilemapRect(param0->unk_1CC, param0->unk_1D0, 0, param0->unk_1D1 - 1, param0->unk_1D2 - 1, 12, 12, 0); - Bg_ScheduleTilemapTransfer(param0->unk_1CC, param0->unk_1D0); -} diff --git a/src/unk_02039814.c b/src/unk_02039814.c index e5441729ce..4bc43c07fc 100644 --- a/src/unk_02039814.c +++ b/src/unk_02039814.c @@ -11,11 +11,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -138,7 +138,7 @@ void sub_02039834(int param0, int param1, int param2) SetAllGraphicsModes(&Unk_020E5ED0); Bg_InitFromTemplate(v0, 0, &Unk_020E5EE0, 0); Bg_ClearTilemap(v0, 0); - sub_0200DAA4(v0, 0, (512 - 9), 2, 0, param0); + LoadStandardWindowGraphics(v0, 0, (512 - 9), 2, 0, param0); Font_LoadTextPalette(0, 1 * (2 * 16), param0); Bg_ClearTilesRange(0, 32, 0, param0); Bg_MaskPalette(0, 0x6c21); @@ -152,7 +152,7 @@ void sub_02039834(int param0, int param1, int param2) Window_AddFromTemplate(v0, &v1, &Unk_020E5EC8); Window_FillRectWithColor(&v1, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&v1, 0, (512 - 9), 2); + Window_DrawStandardFrame(&v1, 0, (512 - 9), 2); StringTemplate_SetNumber(v5, 0, param2, 5, 2, 1); MessageLoader_GetStrbuf(v2, v6, v4); diff --git a/src/unk_02039A64.c b/src/unk_02039A64.c index e5c55e5e7c..c2203744e3 100644 --- a/src/unk_02039A64.c +++ b/src/unk_02039A64.c @@ -9,11 +9,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -101,7 +101,7 @@ void sub_02039A64(int param0, int param1) SetAllGraphicsModes(&Unk_020E5F50); Bg_InitFromTemplate(v0, 0, &Unk_020E5F60, 0); Bg_ClearTilemap(v0, 0); - sub_0200DAA4(v0, 0, (512 - 9), 2, 0, param0); + LoadStandardWindowGraphics(v0, 0, (512 - 9), 2, 0, param0); Font_LoadTextPalette(0, 1 * (2 * 16), param0); Bg_ClearTilesRange(0, 32, 0, param0); Bg_MaskPalette(0, 0x6c21); @@ -113,7 +113,7 @@ void sub_02039A64(int param0, int param1) Text_ResetAllPrinters(); Window_AddFromTemplate(v0, &v1, &Unk_020E5F48); Window_FillRectWithColor(&v1, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&v1, 0, (512 - 9), 2); + Window_DrawStandardFrame(&v1, 0, (512 - 9), 2); MessageLoader_GetStrbuf(v2, v4, v3); Text_AddPrinterWithParams(&v1, FONT_SYSTEM, v3, 0, 0, TEXT_SPEED_INSTANT, NULL); Strbuf_Free(v3); diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index 9977429919..a0368cdc11 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -22,6 +22,7 @@ #include "message.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "save_player.h" #include "script_manager.h" #include "strbuf.h" @@ -29,7 +30,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0203A7D8.h" #include "unk_020508D4.h" @@ -165,7 +165,7 @@ static BOOL sub_020529C4(TaskManager *param0) } break; case 4: - sub_0200E084(&v0->unk_0C, 0); + Window_EraseMessageBox(&v0->unk_0C, 0); Window_Remove(&v0->unk_0C); StringTemplate_Free(v0->unk_20); MessageLoader_Free(v0->unk_1C); diff --git a/src/unk_02052C6C.c b/src/unk_02052C6C.c index 342891c02e..a44439d9fe 100644 --- a/src/unk_02052C6C.c +++ b/src/unk_02052C6C.c @@ -25,6 +25,7 @@ #include "message.h" #include "message_util.h" #include "party.h" +#include "render_window.h" #include "rtc.h" #include "save_player.h" #include "savedata.h" @@ -32,7 +33,6 @@ #include "string_template.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202631C.h" #include "unk_0202DF8C.h" @@ -277,7 +277,7 @@ static void sub_02052FA8(FieldSystem *fieldSystem, UnkStruct_0205300C *param1) FieldMessage_DrawWindow(¶m1->unk_1C, v0); param1->unk_34 = FieldMessage_Print(¶m1->unk_1C, param1->unk_2C, v0, 1); - param1->unk_30 = sub_0200E7FC(¶m1->unk_1C, 1024 - (18 + 12)); + param1->unk_30 = Window_AddWaitDial(¶m1->unk_1C, 1024 - (18 + 12)); } static BOOL sub_02052FFC(UnkStruct_0205300C *param0) @@ -288,7 +288,7 @@ static BOOL sub_02052FFC(UnkStruct_0205300C *param0) static void sub_0205300C(UnkStruct_0205300C *param0) { Strbuf_Free(param0->unk_2C); - DeleteWaitDial(param0->unk_30); + DestroyWaitDial(param0->unk_30); sub_0205D988(¶m0->unk_1C); } diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index 44ebb30c98..34e9e35c92 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -29,6 +29,7 @@ #include "player_avatar.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -36,7 +37,6 @@ #include "text.h" #include "trainer_info.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202602C.h" #include "unk_0202D778.h" @@ -605,7 +605,7 @@ static BOOL sub_0205A324(TaskManager *param0) break; case 44: if (CommTiming_IsSyncState(4)) { - sub_0200E084(&(v0->unk_14), 0); + Window_EraseMessageBox(&(v0->unk_14), 0); v0->unk_08(0, NULL); v0->unk_34 = 5; } @@ -633,7 +633,7 @@ static void sub_0205AAA0(UnkStruct_0205A0D8 *param0, BOOL param1) { if (Window_IsInUse(&(param0->unk_14))) { if (param1) { - sub_0200E084(¶m0->unk_14, 0); + Window_EraseMessageBox(¶m0->unk_14, 0); Window_ClearAndCopyToVRAM(¶m0->unk_14); } @@ -875,7 +875,7 @@ static void sub_0205ADF8(UnkStruct_0205A0D8 *param0, int param1) v3 = Pokemon_GetStructSize(); Window_Add(param0->fieldSystem->unk_08, v0, 3, 21, 9, 10, 8, 13, 10); - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1, 11, 0, 4); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1, 11, 0, 4); Window_FillTilemap(v0, 15); for (v1 = 0; v1 < 3; v1++) { @@ -892,7 +892,7 @@ static void sub_0205ADF8(UnkStruct_0205A0D8 *param0, int param1) Window_FillRectWithColor(v0, 15, 0, 0, 16, v0->height * 8); ColoredArrow_Print(param0->unk_78, ¶m0->unk_54, 0, param1 * 16); - Window_Show(¶m0->unk_54, 0, 1, 11); + Window_DrawStandardFrame(¶m0->unk_54, 0, 1, 11); param0->unk_81 = param1; param0->unk_80 = 3 + 1; @@ -907,7 +907,7 @@ static void sub_0205AF18(UnkStruct_0205A0D8 *param0, int param1) int v1; Window_Add(param0->fieldSystem->unk_08, v0, 3, 20, 11, 11, 6, 13, 90); - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 1, 11, 0, 4); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 1, 11, 0, 4); Window_FillTilemap(v0, 15); for (v1 = 0; v1 < 3; v1++) { @@ -922,7 +922,7 @@ static void sub_0205AF18(UnkStruct_0205A0D8 *param0, int param1) Window_FillRectWithColor(v0, 15, 0, 0, 16, v0->height * 8); ColoredArrow_Print(param0->unk_78, param0->unk_7C, 0, param1 * 16); - Window_Show(param0->unk_7C, 0, 1, 11); + Window_DrawStandardFrame(param0->unk_7C, 0, 1, 11); } static int sub_0205AFE4(UnkStruct_0205A0D8 *param0) @@ -966,7 +966,7 @@ static int sub_0205AFE4(UnkStruct_0205A0D8 *param0) static void sub_0205B0B4(UnkStruct_0205A0D8 *param0) { - Window_Clear(param0->unk_7C, 1); + Window_EraseStandardFrame(param0->unk_7C, 1); } void sub_0205B0C0(int param0, int param1, void *param2, void *param3) @@ -1033,7 +1033,7 @@ static BOOL sub_0205B140(TaskManager *param0) StringTemplate_Free(v1->unk_18); Strbuf_Free(v1->unk_00); Strbuf_Free(v1->unk_04); - sub_0200E084(&v1->unk_08, 0); + Window_EraseMessageBox(&v1->unk_08, 0); Window_Remove(&v1->unk_08); ov5_021D1744(0); v1->unk_28++; diff --git a/src/unk_0205D8CC.c b/src/unk_0205D8CC.c index 8f9adeb3c9..7e21f5e996 100644 --- a/src/unk_0205D8CC.c +++ b/src/unk_0205D8CC.c @@ -7,9 +7,9 @@ #include "font.h" #include "game_options.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" -#include "unk_0200DA60.h" void sub_0205D8CC(u32 param0, u32 param1) { @@ -32,9 +32,9 @@ void FieldMessage_AddWindow(BgConfig *param0, Window *param1, u32 param2) void FieldMessage_DrawWindow(Window *param0, const Options *param1) { - sub_0200DD0C(param0->bgConfig, Window_GetBgLayer(param0), 1024 - (18 + 12), 10, Options_Frame(param1), 4); + LoadMessageBoxGraphics(param0->bgConfig, Window_GetBgLayer(param0), 1024 - (18 + 12), 10, Options_Frame(param1), 4); sub_0205D988(param0); - sub_0200E060(param0, 0, 1024 - (18 + 12), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 0, 1024 - (18 + 12), 10); } void sub_0205D988(Window *param0) @@ -93,7 +93,7 @@ void sub_0205DA1C(BgConfig *param0, Window *param1, u16 param2, u16 param3) void sub_0205DA80(Window *param0, u16 param1, u16 param2) { - sub_0200E2A4(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)), 9, param1, param2, 4); + LoadSignpostContentGraphics(param0->bgConfig, Window_GetBgLayer(param0), ((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)), 9, param1, param2, 4); Window_FillTilemap(param0, 15); - sub_0200E69C(param0, 0, ((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)), 9, param1); + Window_DrawSignpost(param0, 0, ((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)), 9, param1); } diff --git a/src/unk_020683F4.c b/src/unk_020683F4.c index 88b14fcc51..40c4592077 100644 --- a/src/unk_020683F4.c +++ b/src/unk_020683F4.c @@ -40,10 +40,10 @@ #include "party.h" #include "player_avatar.h" #include "pokeradar.h" +#include "render_window.h" #include "save_player.h" #include "script_manager.h" #include "strbuf.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0202631C.h" #include "unk_02028124.h" @@ -963,7 +963,7 @@ static BOOL sub_02068F48(TaskManager *param0) case 1: if (FieldMessage_FinishedPrinting(v1->unk_14) == 1) { if (gCoreSys.pressedKeys & (PAD_KEY | PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(&v1->unk_00, 0); + Window_EraseMessageBox(&v1->unk_00, 0); v1->unk_16++; } } diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index b3dc7fa564..c82dc71ca5 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -25,6 +25,7 @@ #include "menu.h" #include "message.h" #include "narc.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -33,7 +34,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0202E840.h" #include "unk_020508D4.h" @@ -585,9 +585,9 @@ static void sub_0206FB38(UnkStruct_0206F7F8 *param0) Bg_SetPriority(0, 2); Bg_SetPriority(1, 1); - sub_0200DD0C(param0->unk_D0, 3, (1024 - (18 + 12)), 10, param0->unk_1C, param0->unk_00); - sub_0200DAA4(param0->unk_D0, 3, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); - sub_0200DAA4(param0->unk_D0, 1, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_D0, 3, (1024 - (18 + 12)), 10, param0->unk_1C, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_D0, 3, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_D0, 1, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); Font_LoadTextPalette(0, 13 * 32, param0->unk_00); Font_LoadScreenIndicatorsPalette(0, 12 * 32, param0->unk_00); Window_Add(param0->unk_D0, ¶m0->unk_E4, 3, 2, 19, 27, 4, 12, ((1024 - (18 + 12) - 9) - 27 * 4)); @@ -596,7 +596,7 @@ static void sub_0206FB38(UnkStruct_0206F7F8 *param0) static void sub_0206FC4C(UnkStruct_0206F7F8 *param0) { - sub_0200E084(¶m0->unk_E4, 1); + Window_EraseMessageBox(¶m0->unk_E4, 1); Window_ClearAndCopyToVRAM(¶m0->unk_E4); Window_Remove(¶m0->unk_E4); Bg_ClearTilesRange(1, 32 * (24 * (12 + 2) + 9 + 1), 0, param0->unk_00); @@ -702,8 +702,8 @@ static void sub_0206FDC0(UnkStruct_0206F7F8 *param0, u16 param1, u16 param2) param0->unk_A0.printCallback = NULL; param0->unk_C0 = ListMenu_New(&(param0->unk_A0), param1, param2, param0->unk_00); - Window_Show(¶m0->unk_D4, 0, (1024 - (18 + 12) - 9), 11); - sub_0200E060(¶m0->unk_E4, 1, (1024 - (18 + 12)), 10); + Window_DrawStandardFrame(¶m0->unk_D4, 0, (1024 - (18 + 12) - 9), 11); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_E4, 1, (1024 - (18 + 12)), 10); Window_FillTilemap(¶m0->unk_E4, ((15 << 4) | 15)); Text_AddPrinterWithParamsAndColor(¶m0->unk_E4, FONT_MESSAGE, param0->unk_2C.unk_10, 0, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); SpriteActor_EnableObject(param0->unk_2FC[0], 1); @@ -715,7 +715,7 @@ static void sub_0206FF10(UnkStruct_0206F7F8 *param0) ListMenu_Free(param0->unk_C0, &(param0->unk_22), &(param0->unk_24)); StringList_Free(param0->unk_C4); Window_ClearAndCopyToVRAM(&(param0->unk_D4)); - Window_Clear(&(param0->unk_D4), 0); + Window_EraseStandardFrame(&(param0->unk_D4), 0); Window_Remove(&(param0->unk_D4)); SpriteActor_EnableObject(param0->unk_2FC[0], 0); Bg_ScheduleTilemapTransfer(param0->unk_D0, 3); @@ -821,7 +821,7 @@ static void sub_02070050(UnkStruct_0206F7F8 *param0, BOOL param1) static void sub_020701DC(UnkStruct_0206F7F8 *param0, u16 param1) { Window_Add(param0->unk_D0, ¶m0->unk_D4, 1, 4, 1, 24, 12, 13, 1); - Window_Show(¶m0->unk_D4, 1, (1024 - (18 + 12) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_D4, 1, (1024 - (18 + 12) - 9), 11); sub_02070050(param0, 0); SpriteActor_EnableObject(param0->unk_2FC[1], 1); Window_Add(param0->unk_D0, ¶m0->unk_F4, 3, 8, 14, 8, 2, 13, ((((1024 - (18 + 12) - 9) - 27 * 4) - 6 * 4) - (8 * 2))); @@ -833,7 +833,7 @@ static void sub_020701DC(UnkStruct_0206F7F8 *param0, u16 param1) static void sub_02070288(UnkStruct_0206F7F8 *param0) { Window_ClearAndCopyToVRAM(¶m0->unk_D4); - Window_Clear(¶m0->unk_D4, 0); + Window_EraseStandardFrame(¶m0->unk_D4, 0); Window_Remove(¶m0->unk_D4); Window_ClearAndCopyToVRAM(¶m0->unk_F4); Window_Remove(¶m0->unk_F4); diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index db02a76f42..082785e63f 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -28,6 +28,7 @@ #include "party.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "save_player.h" #include "savedata.h" #include "strbuf.h" @@ -37,7 +38,6 @@ #include "sys_task_manager.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02028124.h" #include "unk_0203D1B8.h" @@ -726,9 +726,9 @@ static void sub_020729B4(UnkStruct_02072334 *param0) param0->unk_160 = ListMenu_New(&(param0->unk_140), param0->unk_13C, param0->unk_13E, param0->unk_00); - Window_Show(¶m0->unk_174, 0, (1024 - (18 + 12) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_174, 0, (1024 - (18 + 12) - 9), 11); Text_AddPrinterWithParamsAndColor(¶m0->unk_194, FONT_SYSTEM, param0->unk_110.unk_0C, 2, 0, TEXT_SPEED_INSTANT, TEXT_COLOR(1, 2, 15), NULL); - Window_Show(¶m0->unk_194, 0, (1024 - (18 + 12) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_194, 0, (1024 - (18 + 12) - 9), 11); Bg_ScheduleTilemapTransfer(param0->unk_170, 3); param0->unk_13B_0 = 0; @@ -808,7 +808,7 @@ static void sub_02072C98(UnkStruct_02072334 *param0, u8 param1, u8 param2) param0->unk_140.cursorCallback = sub_02072DA4; param0->unk_160 = ListMenu_New(&(param0->unk_140), param1, param2, param0->unk_00); - Window_Show(¶m0->unk_174, 0, (1024 - (18 + 12) - 9), 11); + Window_DrawStandardFrame(¶m0->unk_174, 0, (1024 - (18 + 12) - 9), 11); Bg_ScheduleTilemapTransfer(param0->unk_170, 3); param0->unk_13B_0 = 1; @@ -829,11 +829,11 @@ static void sub_02072DB8(UnkStruct_02072334 *param0) StringList_Free(param0->unk_164); Window_ClearAndCopyToVRAM(&(param0->unk_194)); - Window_Clear(&(param0->unk_194), 0); + Window_EraseStandardFrame(&(param0->unk_194), 0); Window_Remove(&(param0->unk_194)); Window_ClearAndCopyToVRAM(&(param0->unk_174)); - Window_Clear(&(param0->unk_174), 0); + Window_EraseStandardFrame(&(param0->unk_174), 0); Window_Remove(&(param0->unk_174)); param0->unk_13C = v0; @@ -852,7 +852,7 @@ static void sub_02072E4C(UnkStruct_02072334 *param0) u16 v0, v1; Window_ClearAndCopyToVRAM(&(param0->unk_174)); - Window_Clear(&(param0->unk_174), 0); + Window_EraseStandardFrame(&(param0->unk_174), 0); ListMenu_Free(param0->unk_160, &v0, &v1); StringList_Free(param0->unk_164); Window_Remove(&(param0->unk_174)); @@ -1048,8 +1048,8 @@ static void sub_020731F4(UnkStruct_02072334 *param0) { param0->unk_170 = sub_0203D170(param0->fieldSystem); - sub_0200DD0C(param0->unk_170, 3, (1024 - (18 + 12)), 10, param0->unk_14, param0->unk_00); - sub_0200DAA4(param0->unk_170, 3, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_170, 3, (1024 - (18 + 12)), 10, param0->unk_14, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_170, 3, (1024 - (18 + 12) - 9), 11, 0, param0->unk_00); Font_LoadTextPalette(0, 13 * 32, param0->unk_00); Font_LoadScreenIndicatorsPalette(0, 12 * 32, param0->unk_00); @@ -1072,7 +1072,7 @@ static void sub_020732C4(UnkStruct_02072334 *param0, int param1, u8 param2, u8 p Strbuf *v0; if (param4) { - sub_0200E060(¶m0->unk_184, 1, (1024 - (18 + 12)), 10); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_184, 1, (1024 - (18 + 12)), 10); } Window_FillRectWithColor(¶m0->unk_184, ((15 << 4) | 15), 0, 0, 27 * 8, 4 * 8); @@ -1096,7 +1096,7 @@ static void sub_020732C4(UnkStruct_02072334 *param0, int param1, u8 param2, u8 p static void sub_02073398(UnkStruct_02072334 *param0) { - sub_0200E084(¶m0->unk_184, 1); + Window_EraseMessageBox(¶m0->unk_184, 1); Window_ClearAndCopyToVRAM(¶m0->unk_184); } diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 168fc40be4..4f1d750873 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -36,6 +36,7 @@ #include "pokemon_summary_app.h" #include "poketch_data.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "sys_task.h" @@ -43,7 +44,6 @@ #include "text.h" #include "unk_02005474.h" #include "unk_0200762C.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_0201567C.h" #include "unk_02015F84.h" @@ -130,7 +130,7 @@ UnkStruct_0207AE68 *sub_0207AE68(Party *param0, Pokemon *param1, int param2, Opt sub_0207C1CC(v0, v0->unk_00); Window_Add(v0->unk_00, v0->unk_04, 1, 2, 0x13, 27, 4, 11, ((18 + 12) + 1)); Window_FillTilemap(v0->unk_04, 0xff); - sub_0200E060(v0->unk_04, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(v0->unk_04, 0, 1, 10); v0->unk_18 = sub_0200762C(param11); v0->unk_44 = sub_02015F84(param11, 1, 0); @@ -513,7 +513,7 @@ static void sub_0207B180(UnkStruct_0207AE68 *param0) if (OverlayManager_Exec(param0->unk_38)) { OverlayManager_Free(param0->unk_38); sub_0207C1CC(param0, param0->unk_00); - sub_0200E060(param0->unk_04, 0, 1, 10); + Window_DrawMessageBoxWithScrollCursor(param0->unk_04, 0, 1, 10); sub_02007DEC(param0->unk_1C[0], 6, 0); sub_02007DEC(param0->unk_1C[1], 6, 0); sub_020089A0(param0->unk_1C[0]); @@ -885,14 +885,14 @@ static void sub_0207C1CC(UnkStruct_0207AE68 *param0, BgConfig *param1) v4 = Options_Frame(param0->unk_2C); - sub_0200E218(param1, 1, 1, 10, v4, param0->unk_5C); + ReplaceTransparentTiles(param1, 1, 1, 10, v4, param0->unk_5C); Graphics_LoadTilesToBgLayer(v5, v6, param1, v9, 0, 0, 1, param0->unk_5C); Graphics_LoadTilemapToBgLayer(v5, v7, param1, v9, 0, 0, 1, param0->unk_5C); PaletteData_LoadBufferFromFileStart(param0->unk_14, v5, v8, param0->unk_5C, 0, 0x20 * 2, 0); - PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, sub_0200DD08(v4), param0->unk_5C, 0, 0x20, 10 * 0x10); + PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, GetMessageBoxPaletteNARCMember(v4), param0->unk_5C, 0, 0x20, 10 * 0x10); PaletteData_LoadBufferFromFileStart(param0->unk_14, 14, 7, param0->unk_5C, 0, 0x20, 0xb * 0x10); - Window_SetFrame(param0->unk_00, 2, 1, 0, param0->unk_5C); - PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, Window_FramePalette(), param0->unk_5C, 0, 0x20, 8 * 0x10); + LoadStandardWindowTiles(param0->unk_00, 2, 1, 0, param0->unk_5C); + PaletteData_LoadBufferFromFileStart(param0->unk_14, 38, GetStandardWindowPaletteNARCMember(), param0->unk_5C, 0, 0x20, 8 * 0x10); } { diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index 9bfd9fddca..a45cb8eea1 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -31,6 +31,7 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" @@ -40,7 +41,6 @@ #include "unk_02005474.h" #include "unk_0200C440.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" #include "unk_0201DBEC.h" @@ -554,8 +554,8 @@ static int sub_0207E634(GameWindowLayout *param0) case 0xffffffff: break; case 0xfffffffe: - sub_0200E084(¶m0->unk_04[33], 1); - Window_Clear(¶m0->unk_04[35], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); + Window_EraseStandardFrame(¶m0->unk_04[35], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_04[35]); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); @@ -926,8 +926,8 @@ static void sub_0207EB6C(GameWindowLayout *param0, NARC *param1) } Font_LoadScreenIndicatorsPalette(0, 13 * 32, 12); - sub_0200DAA4(param0->unk_00, 0, 1, 14, 0, 12); - sub_0200DD0C(param0->unk_00, 0, (1 + 9), 15, Options_Frame(param0->unk_5A4->unk_0C), 12); + LoadStandardWindowGraphics(param0->unk_00, 0, 1, 14, 0, 12); + LoadMessageBoxGraphics(param0->unk_00, 0, (1 + 9), 15, Options_Frame(param0->unk_5A4->unk_0C), 12); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 3, param0->unk_00, 4, 0, 0, 0, 12); Graphics_LoadPaletteFromOpenNARC(param1, 4, 4, 0x20, 0x20, 12); Graphics_LoadTilesToBgLayerFromOpenNARC(param1, 12, param0->unk_00, 5, 0, 0, 0, 12); @@ -1689,7 +1689,7 @@ static void sub_0207FFC8(GameWindowLayout *param0) u8 *v0; u8 v1; - sub_0200E084(¶m0->unk_04[32], 1); + Window_EraseMessageBox(¶m0->unk_04[32], 1); v0 = Heap_AllocFromHeap(12, 8); switch (param0->unk_5A4->unk_20) { @@ -2322,7 +2322,7 @@ static u8 HandleWindowInputEvent(GameWindowLayout *param0, int *param1) case 0xffffffff: break; case 0xfffffffe: - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); if ((param0->unk_5A4->unk_20 == 2) || (param0->unk_5A4->unk_20 == 17) || (param0->unk_5A4->unk_20 == 23) || (param0->unk_5A4->unk_20 == 22)) { @@ -2426,7 +2426,7 @@ static int ProcessWindowInput(GameWindowLayout *param0) case 1: if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { Sound_PlayEffect(1500); - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_0200D414(param0->unk_5B0[6], 0); sub_020826E0(param0, 36, 1); param0->unk_B14[1] = 0; @@ -2466,7 +2466,7 @@ static int ProcessWindowInput(GameWindowLayout *param0) case 4: if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { Sound_PlayEffect(1500); - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_0200D414(param0->unk_5B0[6], 0); sub_02083B88(param0); return 1; @@ -2684,7 +2684,7 @@ static int ProcessItemApplication(GameWindowLayout *param0) } } - sub_0200E060(v1, 1, (1 + 9), 15); + Window_DrawMessageBoxWithScrollCursor(v1, 1, (1 + 9), 15); Window_FillTilemap(v1, 15); sub_0208274C(param0); @@ -2743,7 +2743,7 @@ static int ProcessMessageResult(GameWindowLayout *param0) { if (Text_IsPrinterActive(param0->unk_B10) == 0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); LoadOverlay118(param0); return 13; } @@ -2828,7 +2828,7 @@ static int ProcessPokemonItemSwap(GameWindowLayout *param0) static int ResetWindowOnInput(GameWindowLayout *param0) { if (param0->unk_5A4->unk_20 == 10) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); param0->unk_5A4->unk_20 = 0; @@ -2870,7 +2870,7 @@ static int UpdatePokemonFormWithItem(GameWindowLayout *param0) StringTemplate_Format(param0->unk_6A0, param0->unk_6A4, param0->unk_6A8); } - sub_0200E060(v1, 1, (1 + 9), 15); + Window_DrawMessageBoxWithScrollCursor(v1, 1, (1 + 9), 15); Window_FillTilemap(v1, 15); sub_0208274C(param0); diff --git a/src/unk_020819DC.c b/src/unk_020819DC.c index f203b941da..8f63b71578 100644 --- a/src/unk_020819DC.c +++ b/src/unk_020819DC.c @@ -13,13 +13,13 @@ #include "party.h" #include "pokemon.h" #include "render_text.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0207E0B8.h" #include "unk_02083370.h" #include "unk_02084B70.h" @@ -225,7 +225,7 @@ void sub_02081CF4(GameWindowLayout *param0, const u8 *param1, u8 param2) v0.loopAround = FALSE; } - Window_Show(¶m0->unk_254[0], 1, 1, 14); + Window_DrawStandardFrame(¶m0->unk_254[0], 1, 1, 14); param0->unk_700 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 12, PAD_BUTTON_B); } @@ -568,7 +568,7 @@ void sub_020825B4(GameWindowLayout *param0, u8 param1) static void sub_02082680(GameWindowLayout *param0, Window *param1, u32 param2, u8 param3) { if (param3 == 1) { - sub_0200E060(param1, 1, (1 + 9), 15); + Window_DrawMessageBoxWithScrollCursor(param1, 1, (1 + 9), 15); } Window_FillTilemap(param1, 15); @@ -596,7 +596,7 @@ void sub_02082708(GameWindowLayout *param0, u32 param1, u8 param2) Window *v0 = ¶m0->unk_04[34]; if (param2 == 1) { - sub_0200E060(v0, 1, (1 + 9), 15); + Window_DrawMessageBoxWithScrollCursor(v0, 1, (1 + 9), 15); } Window_FillTilemap(v0, 15); @@ -750,7 +750,7 @@ void sub_020829DC(GameWindowLayout *param0) v3[5] = (u16)Pokemon_GetValue(v0, MON_DATA_SPEED, NULL); Window_Add(param0->unk_00, ¶m0->unk_254[0], 0, 1, 1, 14, 12, 0, 576); - Window_Show(¶m0->unk_254[0], 1, 1, 14); + Window_DrawStandardFrame(¶m0->unk_254[0], 1, 1, 14); Window_FillTilemap(¶m0->unk_254[0], 15); for (v2 = 0; v2 < 6; v2++) { @@ -799,6 +799,6 @@ void sub_02082B58(GameWindowLayout *param0) void sub_02082C10(GameWindowLayout *param0) { - Window_Clear(¶m0->unk_254[0], 0); + Window_EraseStandardFrame(¶m0->unk_254[0], 0); Window_Remove(¶m0->unk_254[0]); } diff --git a/src/unk_02083370.c b/src/unk_02083370.c index 04505d0ff1..52299974ee 100644 --- a/src/unk_02083370.c +++ b/src/unk_02083370.c @@ -22,12 +22,12 @@ #include "message.h" #include "party.h" #include "pokemon.h" +#include "render_window.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_0207070C.h" #include "unk_0207E0B8.h" #include "unk_020819DC.h" @@ -116,7 +116,7 @@ u32 sub_02083370(u8 param0) void sub_0208337C(GameWindowLayout *param0) { - Window_Clear(¶m0->unk_254[0], 1); + Window_EraseStandardFrame(¶m0->unk_254[0], 1); Window_ClearAndScheduleCopyToVRAM(¶m0->unk_254[0]); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); @@ -145,7 +145,7 @@ static void sub_020833BC(GameWindowLayout *param0, int *param1) v0.suppressCursor = FALSE; v0.loopAround = FALSE; - Window_Show(¶m0->unk_04[35], 1, 1, 14); + Window_DrawStandardFrame(¶m0->unk_04[35], 1, 1, 14); param0->unk_700 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 12, PAD_BUTTON_B); *param1 = 15; @@ -167,7 +167,7 @@ static void sub_020834B0(GameWindowLayout *param0, int *param1) int v2 = 17; FieldSystem *fieldSystem; - Window_Clear(¶m0->unk_04[35], 1); + Window_EraseStandardFrame(¶m0->unk_04[35], 1); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); @@ -207,7 +207,7 @@ static void sub_020834B0(GameWindowLayout *param0, int *param1) MessageLoader_GetStrbuf(param0->unk_69C, 83, param0->unk_6A4); } - sub_0200E060(¶m0->unk_04[34], 1, (1 + 9), 15); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_04[34], 1, (1 + 9), 15); Window_FillTilemap(¶m0->unk_04[34], 15); sub_0208274C(param0); @@ -218,7 +218,7 @@ int sub_02083658(GameWindowLayout *param0) { if (Text_IsPrinterActive(param0->unk_B10) == 0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); return 1; @@ -232,7 +232,7 @@ int sub_020836A8(GameWindowLayout *param0) { if (Text_IsPrinterActive(param0->unk_B10) == 0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); LoadOverlay118(param0); return 19; } @@ -273,7 +273,7 @@ static void sub_02083700(GameWindowLayout *param0, int *param1) v0.suppressCursor = FALSE; v0.loopAround = FALSE; - Window_Show(¶m0->unk_04[35], 1, 1, 14); + Window_DrawStandardFrame(¶m0->unk_04[35], 1, 1, 14); param0->unk_700 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 12, PAD_BUTTON_B); *param1 = 15; @@ -290,7 +290,7 @@ static void sub_020837C0(GameWindowLayout *param0, int *param1) static void sub_020837F4(GameWindowLayout *param0, int *param1) { - Window_Clear(¶m0->unk_04[35], 1); + Window_EraseStandardFrame(¶m0->unk_04[35], 1); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); sub_02082708(param0, 43, 1); @@ -367,7 +367,7 @@ static int sub_02083990(void *param0) { GameWindowLayout *v0 = param0; - sub_0200E084(&v0->unk_04[34], 1); + Window_EraseMessageBox(&v0->unk_04[34], 1); sub_020826E0(v0, 29, 1); sub_0200D414(v0->unk_5B0[6], 0); @@ -377,7 +377,7 @@ static int sub_02083990(void *param0) int sub_020839BC(GameWindowLayout *param0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); return 1; @@ -423,7 +423,7 @@ int sub_02083AA4(void *param0) { GameWindowLayout *v0 = param0; - sub_0200E084(&v0->unk_04[34], 1); + Window_EraseMessageBox(&v0->unk_04[34], 1); sub_020826E0(v0, 29, 1); sub_0200D414(v0->unk_5B0[6], 0); @@ -443,7 +443,7 @@ static void sub_02083AD0(GameWindowLayout *param0, int *param1) CellActor_SetAnim(param0->unk_5B0[7], sub_020805D0(param0->unk_5A4->unk_21, param0->unk_B0F_0) + 2); CellActor_SetDrawFlag(param0->unk_5B0[7], 1); sub_0207F8F8(param0, param0->unk_B0F_0); - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); sub_020826E0(param0, 30, 1); @@ -714,7 +714,7 @@ static void sub_020844B0(GameWindowLayout *param0, int *param1) { u8 v0; - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); for (v0 = 0; v0 < param0->unk_5A4->unk_32_4; v0++) { @@ -761,7 +761,7 @@ static void sub_020844B0(GameWindowLayout *param0, int *param1) int sub_020845A8(GameWindowLayout *param0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_020826E0(param0, 34, 1); sub_0200D414(param0->unk_5B0[6], 0); return 1; @@ -794,7 +794,7 @@ static void sub_020845E8(GameWindowLayout *param0, int *param1) sub_02082508(param0, v0); } - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -835,7 +835,7 @@ static void sub_0208472C(GameWindowLayout *param0, int *param1) static void sub_02084760(GameWindowLayout *param0, int *param1) { sub_0208337C(param0); - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); *param1 = sub_02084780(param0); } @@ -895,7 +895,7 @@ static void sub_02084808(GameWindowLayout *param0, int *param1) break; } - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); sub_02082708(param0, v2, 1); @@ -1001,7 +1001,7 @@ static void sub_020849FC(GameWindowLayout *param0, int *param1) static int sub_02084A18(GameWindowLayout *param0) { - sub_0200E084(¶m0->unk_04[33], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); sub_0208337C(param0); param0->unk_B14[0] = param0->unk_704[param0->unk_B11].unk_08 / 5; @@ -1032,7 +1032,7 @@ static int sub_02084A18(GameWindowLayout *param0) int sub_02084B34(GameWindowLayout *param0) { if (gCoreSys.pressedKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) { - sub_0200E084(¶m0->unk_04[34], 1); + Window_EraseMessageBox(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); return 1; diff --git a/src/unk_02084B70.c b/src/unk_02084B70.c index f17fc0bfa5..2b3c26ea85 100644 --- a/src/unk_02084B70.c +++ b/src/unk_02084B70.c @@ -20,12 +20,12 @@ #include "party.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "strbuf.h" #include "string_list.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0207E0B8.h" #include "unk_020819DC.h" #include "unk_02082C2C.h" @@ -638,7 +638,7 @@ int sub_02085804(GameWindowLayout *param0) param0->unk_B11 = sub_020857C0(param0, param0->unk_B11 + 1); if (param0->unk_B11 != 0xff) { - sub_0200E084(¶m0->unk_04[34], 0); + Window_EraseMessageBox(¶m0->unk_04[34], 0); sub_0207F8F8(param0, v3); param0->unk_B0E = 1; } else { @@ -1206,7 +1206,7 @@ void sub_020866A0(GameWindowLayout *param0, u8 param1) v0.loopAround = FALSE; } - Window_Show(¶m0->unk_04[36], 1, 1, 14); + Window_DrawStandardFrame(¶m0->unk_04[36], 1, 1, 14); param0->unk_700 = Menu_NewAndCopyToVRAM(&v0, 8, 0, 0, 12, PAD_BUTTON_B); } @@ -1218,15 +1218,15 @@ int sub_02086774(GameWindowLayout *param0) case 0xffffffff: break; case 0xfffffffe: - sub_0200E084(¶m0->unk_04[33], 1); - Window_Clear(¶m0->unk_04[36], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); + Window_EraseStandardFrame(¶m0->unk_04[36], 1); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); sub_020826E0(param0, 32, 1); return 4; default: - sub_0200E084(¶m0->unk_04[33], 1); - Window_Clear(¶m0->unk_04[36], 1); + Window_EraseMessageBox(¶m0->unk_04[33], 1); + Window_EraseStandardFrame(¶m0->unk_04[36], 1); Menu_Free(param0->unk_700, NULL); StringList_Free(param0->unk_6FC); @@ -1252,7 +1252,7 @@ int sub_02086774(GameWindowLayout *param0) void sub_020868B0(GameWindowLayout *param0) { - sub_0200E084(¶m0->unk_04[32], 1); + Window_EraseMessageBox(¶m0->unk_04[32], 1); if (param0->unk_704[param0->unk_B11].unk_0C == 0) { MessageLoader_GetStrbuf(param0->unk_69C, 127, param0->unk_6A4); diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index 0542eca49c..aa456eefe2 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -25,6 +25,7 @@ #include "overlay_manager.h" #include "pokemon.h" #include "pokemon_icon.h" +#include "render_window.h" #include "sprite_resource.h" #include "strbuf.h" #include "string_template.h" @@ -36,7 +37,6 @@ #include "unk_020093B4.h" #include "unk_0200A328.h" #include "unk_0200A784.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02012744.h" #include "unk_0201567C.h" @@ -981,7 +981,7 @@ static int sub_02086B64(OverlayManager *param0, int *param1) case 5: sub_02087544(v0, param0); Window_FillTilemap(&v0->unk_41C[9], 0xf0f); - sub_0200E060(&v0->unk_41C[9], 0, (32 * 8), 10); + Window_DrawMessageBoxWithScrollCursor(&v0->unk_41C[9], 0, (32 * 8), 10); v0->unk_4BC = Text_AddPrinterWithParams(&v0->unk_41C[9], FONT_MESSAGE, v0->unk_180, 0, 0, TEXT_SPEED_FAST, NULL); Window_CopyToVRAM(&v0->unk_41C[9]); v0->unk_4C0 = 6; @@ -1512,7 +1512,7 @@ static void sub_0208769C(UnkStruct_02087A10 *param0, NARC *param1) Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 6, v0, 1, 0, (32 * 14 * 2), 1, 18); Graphics_LoadTilemapToBgLayerFromOpenNARC(param1, 7, v0, 0, 0, (32 * 14 * 2), 1, 18); Font_LoadScreenIndicatorsPalette(0, 12 * 32, 18); - sub_0200DD0C(param0->unk_160, 4, (32 * 8), 10, Options_Frame(param0->unk_18), 18); + LoadMessageBoxGraphics(param0->unk_160, 4, (32 * 8), 10, Options_Frame(param0->unk_18), 18); Font_LoadScreenIndicatorsPalette(4, 12 * 32, 18); param0->unk_510 = Graphics_GetCharDataFromOpenNARC(param1, 16, 1, ¶m0->unk_514, 18); @@ -1804,7 +1804,7 @@ static void sub_02087D64(BgConfig *param0, Window *param1, int *param2, int para static void sub_02087F48(Window *param0, int param1, Strbuf *param2) { - sub_0200E060(param0, 0, (32 * 8), 10); + Window_DrawMessageBoxWithScrollCursor(param0, 0, (32 * 8), 10); Text_AddPrinterWithParams(param0, FONT_MESSAGE, param2, 0, 0, TEXT_SPEED_INSTANT, NULL); Window_CopyToVRAM(param0); } diff --git a/src/unk_0208A3F4.c b/src/unk_0208A3F4.c index 1643154a9b..3e400aa39c 100644 --- a/src/unk_0208A3F4.c +++ b/src/unk_0208A3F4.c @@ -24,10 +24,10 @@ #include "message.h" #include "narc.h" #include "palette.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_0200C6E4.h" -#include "unk_0200DA60.h" #include "unk_02012744.h" #include "unk_0201E86C.h" @@ -101,8 +101,8 @@ void sub_0208A490 (UnkStruct_02089688 * param0) { int v5 = Options_Frame(param0->unk_38C.unk_20); - sub_0200DD0C(v1, 4, 1, 10, v5, 101); - PaletteData_LoadBufferFromFileStart(v4, 38, sub_0200DD08(v5), 101, 1, 0x20, 11 * 16); + LoadMessageBoxGraphics(v1, 4, 1, 10, v5, 101); + PaletteData_LoadBufferFromFileStart(v4, 38, GetMessageBoxPaletteNARCMember(v5), 101, 1, 0x20, 11 * 16); PaletteData_LoadBufferFromFileStart(v4, 14, 7, 101, 1, 0x20, 12 * 16); } } @@ -748,7 +748,7 @@ void sub_0208B1C4(BgConfig *param0, Window *param1, int param2, int param3, int { Window_Init(param1); Window_Add(param0, param1, param2, param3, param4, param5, param6, 12, param7); - sub_0200E060(param1, 1, 1, 11); + Window_DrawMessageBoxWithScrollCursor(param1, 1, 1, 11); Window_FillTilemap(param1, 15); Window_CopyToVRAM(param1); sub_0208B230(param1, param8); diff --git a/src/unk_0208FCF8.c b/src/unk_0208FCF8.c index 70e9bb01c7..3035d6a75f 100644 --- a/src/unk_0208FCF8.c +++ b/src/unk_0208FCF8.c @@ -13,11 +13,11 @@ #include "move_table.h" #include "pokemon.h" #include "pokemon_summary_app.h" +#include "render_window.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_0200C440.h" -#include "unk_0200DA60.h" #include "unk_0207A274.h" #include "unk_0208EA44.h" #include "unk_020923C0.h" @@ -1013,7 +1013,7 @@ void sub_02091610(PokemonSummaryApp *param0, u8 param1) v0 = ¶m0->extraWindows[2]; - sub_0200E060(v0, 1, (1024 - (18 + 12)), 13); + Window_DrawMessageBoxWithScrollCursor(v0, 1, (1024 - (18 + 12)), 13); Window_FillTilemap(v0, 15); MessageLoader_GetStrbuf(param0->msgLoader, v1, param0->strbuf); Text_AddPrinterWithParamsAndColor(v0, FONT_MESSAGE, param0->strbuf, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 15), NULL); diff --git a/src/unk_02099DFC.c b/src/unk_02099DFC.c index b9fc2c1257..5bf29fac0e 100644 --- a/src/unk_02099DFC.c +++ b/src/unk_02099DFC.c @@ -12,13 +12,13 @@ #include "menu.h" #include "message.h" #include "overlay_manager.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" #include "unk_020041CC.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -215,8 +215,8 @@ static void sub_02099F80(UnkStruct_02099DFC *param0) Bg_ClearTilemap(param0->unk_14, 0); } - sub_0200DD0C(param0->unk_14, 0, (512 - (18 + 12)), 2, 0, param0->unk_00); - sub_0200DAA4(param0->unk_14, 0, 512 - (18 + 12) - 9, 3, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_14, 0, (512 - (18 + 12)), 2, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_14, 0, 512 - (18 + 12) - 9, 3, 0, param0->unk_00); Font_LoadTextPalette(0, 1 * (2 * 16), param0->unk_00); Bg_ClearTilesRange(0, 32, 0, param0->unk_00); Bg_MaskPalette(0, 0x6c21); @@ -295,13 +295,13 @@ static BOOL sub_0209A0F4(UnkStruct_02099DFC *param0) } break; case 4: if (sub_0209A200(param0, 2, 1, 0) == TRUE) { - param0->unk_34 = sub_0200E7FC(¶m0->unk_1C, 512 - (18 + 12)); + param0->unk_34 = Window_AddWaitDial(¶m0->unk_1C, 512 - (18 + 12)); param0->unk_04 = 5; } break; case 5: SaveData_Erase(param0->unk_30); - DeleteWaitDial(param0->unk_34); + DestroyWaitDial(param0->unk_34); param0->unk_04 = 6; break; case 6: @@ -320,7 +320,7 @@ static BOOL sub_0209A200(UnkStruct_02099DFC *param0, u32 param1, int param2, int switch (param0->unk_08) { case 0: Window_FillRectWithColor(¶m0->unk_1C, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_1C, 0, 512 - (18 + 12), 2); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_1C, 0, 512 - (18 + 12), 2); param0->unk_10 = Strbuf_Init(0x400, param0->unk_00); MessageLoader_GetStrbuf(param0->unk_18, param1, param0->unk_10); diff --git a/src/unk_0209A2C4.c b/src/unk_0209A2C4.c index 64c14f2d8c..63e60fafb1 100644 --- a/src/unk_0209A2C4.c +++ b/src/unk_0209A2C4.c @@ -12,11 +12,11 @@ #include "menu.h" #include "message.h" #include "overlay_manager.h" +#include "render_window.h" #include "savedata.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -182,8 +182,8 @@ static void sub_0209A3D0(UnkStruct_0209A3D0 *param0) Bg_InitFromTemplate(param0->unk_18, 0, &v2, 0); Bg_ClearTilemap(param0->unk_18, 0); } - sub_0200DD0C(param0->unk_18, 0, 512 - (18 + 12), 2, 0, param0->unk_00); - sub_0200DAA4(param0->unk_18, 0, (512 - (18 + 12)) - 9, 3, 0, param0->unk_00); + LoadMessageBoxGraphics(param0->unk_18, 0, 512 - (18 + 12), 2, 0, param0->unk_00); + LoadStandardWindowGraphics(param0->unk_18, 0, (512 - (18 + 12)) - 9, 3, 0, param0->unk_00); Font_LoadTextPalette(0, 1 * (2 * 16), param0->unk_00); Bg_ClearTilesRange(0, 32, 0, param0->unk_00); Bg_MaskPalette(0, 0); @@ -298,7 +298,7 @@ static BOOL sub_0209A688(UnkStruct_0209A3D0 *param0, u32 param1, int param2, int switch (param0->unk_0C) { case 0: Window_FillRectWithColor(¶m0->unk_20, 15, 0, 0, 27 * 8, 4 * 8); - sub_0200E060(¶m0->unk_20, 0, 512 - (18 + 12), 2); + Window_DrawMessageBoxWithScrollCursor(¶m0->unk_20, 0, 512 - (18 + 12), 2); param0->unk_14 = Strbuf_Init(0x400, param0->unk_00); MessageLoader_GetStrbuf(param0->unk_1C, param1, param0->unk_14); diff --git a/src/unk_0209A74C.c b/src/unk_0209A74C.c index b0ebb4b180..a949bb49d6 100644 --- a/src/unk_0209A74C.c +++ b/src/unk_0209A74C.c @@ -11,11 +11,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -98,7 +98,7 @@ void sub_0209A74C(int param0) SetAllGraphicsModes(&Unk_020F8ACC); Bg_InitFromTemplate(v0, 0, &Unk_020F8ADC, 0); Bg_ClearTilemap(v0, 0); - sub_0200DAA4(v0, 0, 512 - 9, 2, 0, param0); + LoadStandardWindowGraphics(v0, 0, 512 - 9, 2, 0, param0); Font_LoadTextPalette(0, 1 * (2 * 16), param0); Bg_ClearTilesRange(0, 32, 0, param0); Bg_MaskPalette(0, 27681); @@ -110,7 +110,7 @@ void sub_0209A74C(int param0) Text_ResetAllPrinters(); Window_AddFromTemplate(v0, &v1, &Unk_020F8AC4); Window_FillRectWithColor(&v1, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&v1, 0, 512 - 9, 2); + Window_DrawStandardFrame(&v1, 0, 512 - 9, 2); MessageLoader_GetStrbuf(v2, v4, v3); Text_AddPrinterWithParams(&v1, FONT_SYSTEM, v3, 0, 0, TEXT_SPEED_INSTANT, NULL); Strbuf_Free(v3); @@ -172,7 +172,7 @@ void sub_0209A8E0(int param0) SetAllGraphicsModes(&Unk_020F8ACC); Bg_InitFromTemplate(v0, 0, &Unk_020F8ADC, 0); Bg_ClearTilemap(v0, 0); - sub_0200DAA4(v0, 0, 512 - 9, 2, 0, param0); + LoadStandardWindowGraphics(v0, 0, 512 - 9, 2, 0, param0); Font_LoadTextPalette(0, 1 * (2 * 16), param0); Bg_ClearTilesRange(0, 32, 0, param0); Bg_MaskPalette(0, 0x6c21); @@ -184,7 +184,7 @@ void sub_0209A8E0(int param0) Text_ResetAllPrinters(); Window_AddFromTemplate(v0, &v1, &Unk_020F8AC4); Window_FillRectWithColor(&v1, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&v1, 0, (512 - 9), 2); + Window_DrawStandardFrame(&v1, 0, (512 - 9), 2); MessageLoader_GetStrbuf(v2, v4, v3); Text_AddPrinterWithParams(&v1, FONT_SYSTEM, v3, 0, 0, TEXT_SPEED_INSTANT, NULL); Strbuf_Free(v3); diff --git a/src/unk_0209AA74.c b/src/unk_0209AA74.c index c6b79ca03e..757f4bd158 100644 --- a/src/unk_0209AA74.c +++ b/src/unk_0209AA74.c @@ -11,11 +11,11 @@ #include "gx_layers.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "strbuf.h" #include "text.h" #include "unk_02000C88.h" #include "unk_0200A9DC.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02017728.h" @@ -108,7 +108,7 @@ void sub_0209AA74(int param0, int param1) SetAllGraphicsModes(&Unk_020F8B28); Bg_InitFromTemplate(v0, 0, &Unk_020F8B38, 0); Bg_ClearTilemap(v0, 0); - sub_0200DAA4(v0, 0, 512 - 9, 2, 0, param0); + LoadStandardWindowGraphics(v0, 0, 512 - 9, 2, 0, param0); Font_LoadTextPalette(0, 1 * (2 * 16), param0); Bg_ClearTilesRange(0, 32, 0, param0); Bg_MaskPalette(0, 0x6c21); @@ -120,7 +120,7 @@ void sub_0209AA74(int param0, int param1) Text_ResetAllPrinters(); Window_AddFromTemplate(v0, &v1, &Unk_020F8B20); Window_FillRectWithColor(&v1, 15, 0, 0, 26 * 8, 18 * 8); - Window_Show(&v1, 0, (512 - 9), 2); + Window_DrawStandardFrame(&v1, 0, (512 - 9), 2); MessageLoader_GetStrbuf(v2, v4, v3); Text_AddPrinterWithParams(&v1, FONT_SYSTEM, v3, 0, 0, TEXT_SPEED_INSTANT, NULL); Strbuf_Free(v3); diff --git a/src/unk_0209ACF4.c b/src/unk_0209ACF4.c index 90704cacae..419fe35463 100644 --- a/src/unk_0209ACF4.c +++ b/src/unk_0209ACF4.c @@ -15,12 +15,12 @@ #include "core_sys.h" #include "heap.h" #include "message.h" +#include "render_window.h" #include "save_player.h" #include "strbuf.h" #include "string_template.h" #include "text.h" #include "unk_02005474.h" -#include "unk_0200DA60.h" #include "unk_0200F174.h" #include "unk_02014A84.h" #include "unk_0202D05C.h" @@ -270,7 +270,7 @@ static void sub_0209B084(UnkStruct_0209AD84 *param0, int param1, BOOL param2) FieldMessage_DrawWindow(v0, SaveData_Options(param0->fieldSystem->saveData)); } else { sub_0205D988(v0); - sub_0200E060(v0, 0, 1024 - (18 + 12), 10); + Window_DrawMessageBoxWithScrollCursor(v0, 0, 1024 - (18 + 12), 10); } param0->unk_58 = FieldMessage_Print(v0, param0->unk_08, SaveData_Options(param0->fieldSystem->saveData), 1); @@ -286,7 +286,7 @@ static void sub_0209B110(UnkStruct_0209AD84 *param0) Window *v0 = &(param0->unk_18); if (Window_IsInUse(v0)) { - sub_0200E084(v0, 0); + Window_EraseMessageBox(v0, 0); } } @@ -297,7 +297,7 @@ static void sub_0209B12C(UnkStruct_0209AD84 *param0) if (Window_IsInUse(v0) == 0) { int v1; - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 155, 11, 0, 32); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 155, 11, 0, 32); Window_Add(param0->fieldSystem->unk_08, v0, 3, 1, 1, 13, 10, 13, 1); Window_FillTilemap(v0, 15); @@ -313,13 +313,13 @@ static void sub_0209B12C(UnkStruct_0209AD84 *param0) param0->unk_5C = 0; param0->unk_60 = 5; - Window_Show(v0, 0, 155, 11); + Window_DrawStandardFrame(v0, 0, 155, 11); } static void sub_0209B1CC(UnkStruct_0209AD84 *param0) { Window *v0 = &(param0->unk_28); - Window_Clear(v0, 1); + Window_EraseStandardFrame(v0, 1); } static void sub_0209B1D8(UnkStruct_0209AD84 *param0) @@ -329,7 +329,7 @@ static void sub_0209B1D8(UnkStruct_0209AD84 *param0) if (Window_IsInUse(v0) == 0) { int v1; - sub_0200DAA4(param0->fieldSystem->unk_08, 3, 155, 11, 0, 32); + LoadStandardWindowGraphics(param0->fieldSystem->unk_08, 3, 155, 11, 0, 32); Window_Add(param0->fieldSystem->unk_08, v0, 3, 25, 13, 6, 4, 13, 131); Window_FillTilemap(v0, 15); @@ -345,13 +345,13 @@ static void sub_0209B1D8(UnkStruct_0209AD84 *param0) param0->unk_5C = 0; param0->unk_60 = 2; - Window_Show(v0, 0, 155, 11); + Window_DrawStandardFrame(v0, 0, 155, 11); } static void sub_0209B27C(UnkStruct_0209AD84 *param0) { Window *v0 = &(param0->unk_38); - Window_Clear(v0, 1); + Window_EraseStandardFrame(v0, 1); } static int sub_0209B288(UnkStruct_0209AD84 *param0)