diff --git a/include/effect_shims.h b/include/effect_shims.h index 4682bd4ea0..95dfc84980 100644 --- a/include/effect_shims.h +++ b/include/effect_shims.h @@ -21,7 +21,7 @@ b32 shim_npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*); s32 shim_load_effect(s32 effectIndex); float shim_sqrtf(float value); void shim_mdl_draw_hidden_panel_surface(Gfx**, u16 treeIndex); -s32 shim_is_point_visible(f32, f32, f32, s32, f32*, f32*); +b32 shim_is_point_visible(f32, f32, f32, s32, f32*, f32*); void shim_guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale); void shim_transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outW); void shim_guPositionF(float mf[4][4], float r, float p, float h, float s, float x, float y, float z); diff --git a/include/enums.h b/include/enums.h index 46de96c472..2c187718f2 100644 --- a/include/enums.h +++ b/include/enums.h @@ -5236,75 +5236,75 @@ enum DictionaryIndex { DICTIONARY_SIZE, }; -enum WindowId { - WINDOW_ID_NONE = -1, - WINDOW_ID_0 = 0, - WINDOW_ID_1 = 1, - WINDOW_ID_2 = 2, - WINDOW_ID_3 = 3, - WINDOW_ID_4 = 4, - WINDOW_ID_5 = 5, - WINDOW_ID_6 = 6, - WINDOW_ID_7 = 7, - WINDOW_ID_8 = 8, // battle main? - WINDOW_ID_BATTLE_POPUP = 9, - WINDOW_ID_ITEM_INFO_NAME = 10, - WINDOW_ID_ITEM_INFO_DESC = 11, - WINDOW_ID_12 = 12, - WINDOW_ID_13 = 13, - WINDOW_ID_14 = 14, - WINDOW_ID_15 = 15, - WINDOW_ID_16 = 16, - WINDOW_ID_17 = 17, // brown box used for "Throw away an item" and certain popup titles - WINDOW_ID_18 = 18, - WINDOW_ID_19 = 19, - WINDOW_ID_CURRENCY_COUNTER = 20, - WINDOW_ID_21 = 21, - WINDOW_ID_PAUSE_MAIN = 22, - WINDOW_ID_PAUSE_DECRIPTION = 23, - WINDOW_ID_FILEMENU_CURSOR = 23, // same as previous - WINDOW_ID_PAUSE_TUTORIAL = 24, - WINDOW_ID_FILEMENU_COPYARROW = 24, // same as previous - WINDOW_ID_PAUSE_TAB_STATS = 25, - WINDOW_ID_PAUSE_TAB_BADGES = 26, - WINDOW_ID_PAUSE_TAB_ITEMS = 27, - WINDOW_ID_PAUSE_TAB_PARTY = 28, - WINDOW_ID_PAUSE_TAB_SPIRITS = 29, - WINDOW_ID_PAUSE_TAB_MAP = 30, - WINDOW_ID_PAUSE_STATS = 31, - WINDOW_ID_PAUSE_BADGES = 32, - WINDOW_ID_PAUSE_ITEMS = 33, - WINDOW_ID_PAUSE_PARTNERS = 34, - WINDOW_ID_PAUSE_PARTNERS_TITLE = 35, - WINDOW_ID_PAUSE_PARTNERS_MOVELIST = 36, - WINDOW_ID_PAUSE_PARTNERS_MOVELIST_TITLE = 37, - WINDOW_ID_PAUSE_PARTNERS_MOVELIST_FLOWER = 38, - WINDOW_ID_PAUSE_SPIRITS = 39, - WINDOW_ID_PAUSE_SPIRITS_TITLE = 40, - WINDOW_ID_PAUSE_MAP = 41, - WINDOW_ID_PAUSE_MAP_TITLE = 42, - WINDOW_ID_PAUSE_TAB_INVIS = 43, - WINDOW_ID_PAUSE_CURSOR = 44, - WINDOW_ID_FILEMENU_MAIN = 44, // same as previous - WINDOW_ID_FILEMENU_TITLE = 45, - WINDOW_ID_FILEMENU_YESNO_PROMPT = 46, - WINDOW_ID_FILEMENU_INFO = 47, - WINDOW_ID_FILEMENU_CREATEFILE_HEADER = 48, - WINDOW_ID_FILEMENU_KEYBOARD = 49, - WINDOW_ID_FILEMENU_YESNO_OPTIONS = 50, - WINDOW_ID_FILEMENU_STEREO = 51, - WINDOW_ID_FILEMENU_MONO = 52, - WINDOW_ID_FILEMENU_OPTION_LEFT = 53, - WINDOW_ID_FILEMENU_OPTION_CENTER = 54, - WINDOW_ID_FILEMENU_OPTION_RIGHT = 55, - WINDOW_ID_FILEMENU_FILE0_INFO = 56, - WINDOW_ID_FILEMENU_FILE1_INFO = 57, - WINDOW_ID_FILEMENU_FILE2_INFO = 58, - WINDOW_ID_FILEMENU_FILE3_INFO = 59, - WINDOW_ID_FILEMENU_FILE0_TITLE = 60, - WINDOW_ID_FILEMENU_FILE1_TITLE = 61, - WINDOW_ID_FILEMENU_FILE2_TITLE = 62, - WINDOW_ID_FILEMENU_FILE3_TITLE = 63, +enum WindowID { + WIN_NONE = -1, + WIN_UNUSED_0 = 0, + WIN_BTL_MOVES_MENU = 1, + WIN_BTL_MOVES_TITLE = 2, + WIN_BTL_MOVES_ICON = 3, + WIN_BTL_SPIRITS_TITLE = 4, + WIN_BTL_SPIRITS_ICON = 5, + WIN_BTL_STRATS_MENU = 6, + WIN_BTL_STRATS_TITLE = 7, + WIN_BTL_DESC_BOX = 8, // strats and level up menus + WIN_BTL_POPUP = 9, + WIN_SHOP_ITEM_NAME = 10, + WIN_SHOP_ITEM_DESC = 11, + WIN_PICKUP_HEADER = 12, + WIN_UNUSED_13 = 13, // unused + WIN_POPUP_CONTENT = 14, + WIN_POPUP_TITLE_A = 15, + WIN_POPUP_COST = 16, + WIN_POPUP_TITLE_B = 17, // brown box used for "Throw away an item" and certain popup titles + WIN_PARTNER_COST = 18, + WIN_POPUP_DESC = 19, + WIN_CURRENCY_COUNTER = 20, + WIN_POPUP_PROMPT = 21, + WIN_PAUSE_MAIN = 22, + WIN_PAUSE_DECRIPTION = 23, + WIN_FILES_CURSOR = 23, // same as previous + WIN_PAUSE_TUTORIAL = 24, + WIN_FILES_COPYARROW = 24, // same as previous + WIN_PAUSE_TAB_STATS = 25, + WIN_PAUSE_TAB_BADGES = 26, + WIN_PAUSE_TAB_ITEMS = 27, + WIN_PAUSE_TAB_PARTY = 28, + WIN_PAUSE_TAB_SPIRITS = 29, + WIN_PAUSE_TAB_MAP = 30, + WIN_PAUSE_STATS = 31, + WIN_PAUSE_BADGES = 32, + WIN_PAUSE_ITEMS = 33, + WIN_PAUSE_PARTNERS = 34, + WIN_PAUSE_PARTNERS_TITLE = 35, + WIN_PAUSE_PARTNERS_MOVELIST = 36, + WIN_PAUSE_PARTNERS_MOVELIST_TITLE = 37, + WIN_PAUSE_PARTNERS_MOVELIST_FLOWER = 38, + WIN_PAUSE_SPIRITS = 39, + WIN_PAUSE_SPIRITS_TITLE = 40, + WIN_PAUSE_MAP = 41, + WIN_PAUSE_MAP_TITLE = 42, + WIN_PAUSE_TAB_INVIS = 43, + WIN_PAUSE_CURSOR = 44, + WIN_FILES_MAIN = 44, // same as previous + WIN_FILES_TITLE = 45, + WIN_FILES_CONFIRM_PROMPT = 46, + WIN_FILES_MESSAGE = 47, + WIN_FILES_INPUT_FIELD = 48, + WIN_FILES_INPUT_KEYBOARD = 49, + WIN_FILES_CONFIRM_OPTIONS = 50, + WIN_FILES_STEREO = 51, + WIN_FILES_MONO = 52, + WIN_FILES_OPTION_LEFT = 53, + WIN_FILES_OPTION_CENTER = 54, + WIN_FILES_OPTION_RIGHT = 55, + WIN_FILES_SLOT1_BODY = 56, + WIN_FILES_SLOT2_BODY = 57, + WIN_FILES_SLOT3_BODY = 58, + WIN_FILES_SLOT4_BODY = 59, + WIN_FILES_SLOT1_TITLE = 60, + WIN_FILES_SLOT2_TITLE = 61, + WIN_FILES_SLOT3_TITLE = 62, + WIN_FILES_SLOT4_TITLE = 63, }; enum SimpleWindowUpdateId { @@ -5321,9 +5321,9 @@ enum SimpleWindowUpdateId { enum WindowGroupId { WINDOW_GROUP_ALL = 0, - WINDOW_GROUP_1 = 1, - WINDOW_GROUP_PAUSE_MENU = 2, - WINDOW_GROUP_FILE_MENU = 3, + WINDOW_GROUP_BATTLE = 1, + WINDOW_GROUP_PAUSE = 2, + WINDOW_GROUP_FILES = 3, }; enum RushFlags { diff --git a/include/functions.h b/include/functions.h index 047fd7b732..a2540c5eb2 100644 --- a/include/functions.h +++ b/include/functions.h @@ -806,7 +806,7 @@ void imgfx_update_cache(void); s32 imgfx_get_free_instances(s32); void free_worker(s32); -s32 ai_check_fwd_collisions(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5); +b32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW); void basic_ai_loiter_init(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory); void PatrolAI_LoiterInit(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory); @@ -831,7 +831,7 @@ void* load_asset_by_name(const char* assetName, u32* decompressedSize); Gfx* mdl_get_copied_gfx(s32 copyIndex); void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVertices, s32* numCopied); void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex); -s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY); +b32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY); void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z); void* mdl_get_next_texture_address(s32); s32 cancel_current_message(void); diff --git a/src/25AF0.c b/src/25AF0.c index a0bdb7ee2a..8b66031c54 100644 --- a/src/25AF0.c +++ b/src/25AF0.c @@ -19,7 +19,7 @@ void basic_ai_suspend(Evt* script) { } } -s32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW) { +b32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW) { f32 x1, y1, z1; f32 x2, y2, z2; f32 x3, y3, z3; @@ -41,7 +41,7 @@ s32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f3 npc->collisionHeight, npc->collisionDiameter); - if (fwdHit != 0) { + if (fwdHit) { fwdHitDist = dist2D(npc->pos.x, npc->pos.z, x1, z1); x2 = npc->pos.x; diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index 3a8d6d85c7..d5a458ed5f 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -161,16 +161,16 @@ void hide_popup_menu(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_hidden_window_update); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32) basic_hidden_window_update); break; } - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_HIDE); } else { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: @@ -184,27 +184,27 @@ void hide_popup_menu(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); break; } } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_COST, (s32) basic_hidden_window_update); + set_window_update(WIN_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - set_window_update(WINDOW_ID_18, (s32) basic_hidden_window_update); + set_window_update(WIN_PARTNER_COST, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_COST, (s32) basic_hidden_window_update); + set_window_update(WIN_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } gPopupState = POPUP_STATE_10; D_8010D644 = D_8010D692; @@ -263,24 +263,24 @@ void func_800F16CC(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, (s32) basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32) basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_1); - set_window_update(WINDOW_ID_19, (s32) basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_window_update); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, (s32) basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32) basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_2); - set_window_update(WINDOW_ID_19, (s32) basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_window_update); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, (s32) basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32) basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_1); break; } - set_window_update(WINDOW_ID_21, (s32) basic_window_update); + set_window_update(WIN_POPUP_PROMPT, (s32) basic_window_update); } else { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: @@ -292,31 +292,31 @@ void func_800F16CC(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); break; } } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - set_window_update(WINDOW_ID_16, (s32) basic_window_update); - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_window_update); + set_window_update(WIN_POPUP_COST, (s32) basic_window_update); + set_window_update(WIN_CURRENCY_COUNTER, (s32) basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - set_window_update(WINDOW_ID_18, (s32) basic_window_update); + set_window_update(WIN_PARTNER_COST, (s32) basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - set_window_update(WINDOW_ID_16, (s32) basic_window_update); + set_window_update(WIN_POPUP_COST, (s32) basic_window_update); } hud_element_set_tint(PopupMenu_EmptybarHID, 255, 255, 255); hud_element_set_tint(PopupMenu_EntryIconHID, 255, 255, 255); @@ -598,18 +598,18 @@ s32 popup_menu_update(void) { posX2 = (var_s5 - width2) / 2; gPopupMenu->unk_334 = (80 - msgWidth) / 2; } - set_window_properties(WINDOW_ID_14, posX, posY, var_s6, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, + set_window_properties(WIN_POPUP_CONTENT, posX, posY, var_s6, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); if (gPopupMenu->unk_338 == 0) { - set_window_properties(WINDOW_ID_15, posX2, -6, width2, 16, WINDOW_PRIORITY_21, - popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, 1); - set_window_update(WINDOW_ID_17, 2); + set_window_properties(WIN_POPUP_TITLE_A, posX2, -6, width2, 16, WINDOW_PRIORITY_21, + popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, 1); + set_window_update(WIN_POPUP_TITLE_B, 2); } else { - set_window_properties(WINDOW_ID_17, posX2, -6, width2, 16, WINDOW_PRIORITY_21, - popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, 2); - set_window_update(WINDOW_ID_17, 1); + set_window_properties(WIN_POPUP_TITLE_B, posX2, -6, width2, 16, WINDOW_PRIORITY_21, + popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, 2); + set_window_update(WIN_POPUP_TITLE_B, 1); } #elif VERSION_JP switch (gPopupMenu->popupType) { @@ -619,58 +619,58 @@ s32 popup_menu_update(void) { case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_properties(WINDOW_ID_14, posX, posY, 130, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 130, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_SWITCH_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 104, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 14, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 104, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 14, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_14, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 126, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 12, -6, 66, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 126, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 12, -6, 66, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_14, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 152, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 106, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_LETTER: - set_window_properties(WINDOW_ID_14, posX, posY, 120, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 24, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 120, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 24, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: - set_window_properties(WINDOW_ID_14, posX, posY, 108, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 84, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 108, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 84, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_POSTCARD: - set_window_properties(WINDOW_ID_14, posX, posY, 124, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 100, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 124, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 100, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_POST_OFFICE: - set_window_properties(WINDOW_ID_14, posX, posY, 96, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 10, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 96, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 10, -6, 72, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; } #else @@ -680,68 +680,68 @@ s32 popup_menu_update(void) { case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_USEKEY: - set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); if (gPopupMenu->dipMode == 0) { - set_window_properties(WINDOW_ID_15, 25, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_TITLE_A, 25, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); } else { - set_window_properties(WINDOW_ID_15, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); } - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_SWITCH_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 139, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 13, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 139, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 13, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_14, posX, posY, 162, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 17, -6, 96, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 162, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 17, -6, 96, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 146, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 12, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 146, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 12, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_14, posX, posY, 167, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 22, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 167, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 22, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_LETTER: - set_window_properties(WINDOW_ID_14, posX, posY, 170, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 32, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 170, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 32, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_TAKE_FROM_CHEST: - set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: - set_window_properties(WINDOW_ID_14, posX, posY, 128, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 12, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 128, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 12, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_POSTCARD: - set_window_properties(WINDOW_ID_14, posX, posY, 149, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_15, 6, -6, 139, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 149, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_A, 6, -6, 139, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_POST_OFFICE: - set_window_properties(WINDOW_ID_14, posX, posY, 131, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); - set_window_properties(WINDOW_ID_17, 10, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); - set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_POPUP_CONTENT, posX, posY, 131, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WIN_POPUP_TITLE_B, 10, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WIN_POPUP_CONTENT); + set_window_update(WIN_POPUP_TITLE_A, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_TITLE_B, WINDOW_UPDATE_SHOW); break; } #endif @@ -749,22 +749,22 @@ s32 popup_menu_update(void) { #if VERSION_JP switch (gPopupMenu->popupType) { case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_18, 84, -6, 40, 16, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + set_window_properties(WIN_PARTNER_COST, 84, -6, 40, 16, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WIN_POPUP_CONTENT); break; case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_16, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_COST, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WIN_POPUP_CONTENT); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_16, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_COST, 116, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WIN_POPUP_CONTENT); break; } #else switch (gPopupMenu->popupType) { case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_16, 126, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_COST, 126, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WIN_POPUP_CONTENT); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_16, 131, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); + set_window_properties(WIN_POPUP_COST, 131, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WIN_POPUP_CONTENT); break; } #endif @@ -772,7 +772,7 @@ s32 popup_menu_update(void) { if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { posX = PopupMenu_StarPieceCounterPosX; posY = PopupMenu_StarPieceCounterPosY; - set_window_properties(WINDOW_ID_CURRENCY_COUNTER, posX, posY, 64, 20, WINDOW_PRIORITY_21, func_800F4D28, NULL, -1); + set_window_properties(WIN_CURRENCY_COUNTER, posX, posY, 64, 20, WINDOW_PRIORITY_21, func_800F4D28, NULL, -1); } do { @@ -797,7 +797,7 @@ s32 popup_menu_update(void) { { posX = D_8010D680; posY = D_8010D682; - set_window_properties(WINDOW_ID_19, posX, posY, WINDOW_KEY_WIDTH, 32, WINDOW_PRIORITY_20, func_800F48F4, NULL, -1); + set_window_properties(WIN_POPUP_DESC, posX, posY, WINDOW_KEY_WIDTH, 32, WINDOW_PRIORITY_20, func_800F48F4, NULL, -1); } posX = D_8010D684; @@ -808,7 +808,7 @@ s32 popup_menu_update(void) { if (get_msg_lines(gPopupMenu->unk_33C) == 2) { height = 40; } - set_window_properties(WINDOW_ID_21, posX, posY, gPopupMenu->unk_340 + 144, height, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, gPopupMenu->unk_340 + 144, height, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); #else switch (gPopupMenu->popupType) { #if VERSION_JP @@ -825,24 +825,24 @@ s32 popup_menu_update(void) { case POPUP_MENU_POST_OFFICE: switch (gPopupMenu->dipMode) { case 0: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case 1: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case 2: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 152, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; } break; case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 136, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 136, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 136, 48, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 136, 48, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_21, D_8010D684, D_8010D686, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, D_8010D684, D_8010D686, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; #else case POPUP_MENU_USE_ITEM: @@ -850,26 +850,26 @@ s32 popup_menu_update(void) { case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_properties(WINDOW_ID_21, posX, posY, 144, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 144, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_THROW_AWAY_ITEM: case POPUP_MENU_POST_OFFICE: - set_window_properties(WINDOW_ID_21, posX, posY, 144, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 144, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: - set_window_properties(WINDOW_ID_21, posX, posY, 128, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 128, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_21, posX, posY, 136, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 136, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_READ_LETTER: - set_window_properties(WINDOW_ID_21, posX, posY, 112, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 112, 40, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_21, posX, posY, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, posX, posY, 120, 32, WINDOW_PRIORITY_20, func_800F4944, NULL, -1); break; #endif } @@ -886,18 +886,18 @@ s32 popup_menu_update(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); break; } } else { @@ -911,35 +911,35 @@ s32 popup_menu_update(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, (s32)basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32)basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_1); - set_window_update(WINDOW_ID_19, (s32)basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32)basic_window_update); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, (s32)basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32)basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_2); - set_window_update(WINDOW_ID_19, (s32)basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32)basic_window_update); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, (s32)basic_window_update); + set_window_update(WIN_POPUP_CONTENT, (s32)basic_window_update); sfx_play_sound(SOUND_OPEN_POPUP_1); break; } - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_SHOW); } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - set_window_update(WINDOW_ID_16, (s32)basic_window_update); - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update); + set_window_update(WIN_POPUP_COST, (s32)basic_window_update); + set_window_update(WIN_CURRENCY_COUNTER, (s32)basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - set_window_update(WINDOW_ID_18, (s32)basic_window_update); + set_window_update(WIN_PARTNER_COST, (s32)basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - set_window_update(WINDOW_ID_16, (s32)basic_window_update); + set_window_update(WIN_POPUP_COST, (s32)basic_window_update); } gPopupState = POPUP_STATE_CHOOSING; break; @@ -1156,18 +1156,18 @@ s32 popup_menu_update(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); break; } destroy_popup_menu(); @@ -1208,10 +1208,10 @@ s32 popup_menu_update(void) { gPopupMenu->result = POPUP_RESULT_INVALID; return 0; case POPUP_STATE_ALREADY_HAVE_PARTNER_SHOW: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); if (PopupNotBattle) { - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_HIDE); } #if VERSION_PAL width = get_msg_width(MSG_Menus_006B, 0) + 32; @@ -1220,12 +1220,12 @@ s32 popup_menu_update(void) { } else { posY = 72; } - set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), posY, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); + set_window_properties(WIN_BTL_POPUP, 160 - (width / 2), posY, width, 40, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); #else width = get_msg_width(MSG_Menus_006B, 0) + 23; - set_window_properties(WINDOW_ID_BATTLE_POPUP, 160 - (width / 2), 80, width, ALREADY_PARTNER_HEIGHT, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); + set_window_properties(WIN_BTL_POPUP, 160 - (width / 2), 80, width, ALREADY_PARTNER_HEIGHT, WINDOW_PRIORITY_20, popup_draw_already_have_partner, NULL, -1); #endif - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); D_8010D644 = 60; gPopupState = POPUP_STATE_ALREADY_HAVE_PARTNER_AWAIT; return 0; @@ -1237,11 +1237,11 @@ s32 popup_menu_update(void) { D_8010D644--; return 0; } - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); if (PopupNotBattle) { - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_SHOW); } gPopupState = POPUP_STATE_CHOOSING; gPopupMenu->result = POPUP_RESULT_CHOOSING; @@ -1279,18 +1279,18 @@ s32 popup_menu_update(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_HIDE); break; } @@ -1309,19 +1309,19 @@ s32 popup_menu_update(void) { height = 40; posY = 72; } - set_window_properties(WINDOW_ID_21, 160 - (width / 2), posY, width, height, WINDOW_PRIORITY_19, func_800F4C1C, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, 160 - (width / 2), posY, width, height, WINDOW_PRIORITY_19, func_800F4C1C, NULL, -1); #else width = get_msg_width(msgID, 0) + 23; - set_window_properties(WINDOW_ID_21, 160 - (width / 2), 76, width, 32, WINDOW_PRIORITY_19, func_800F4C1C, NULL, -1); + set_window_properties(WIN_POPUP_PROMPT, 160 - (width / 2), 76, width, 32, WINDOW_PRIORITY_19, func_800F4C1C, NULL, -1); #endif - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_SHOW); D_8010D6A0 = msg_get_printer_for_msg(MSG_Choice_001D, &D_8010D6A4); msg_printer_set_origin_pos(D_8010D6A0, 160, 144); gPopupState = POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE; break; case POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE: if (D_8010D6A4 == 1) { - set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE); + set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_HIDE); switch (D_8010D6A0->curOption) { case 0: gPopupState = POPUP_STATE_CANCEL_DIP_ACCEPT; @@ -1367,18 +1367,18 @@ s32 popup_menu_update(void) { case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_DESC, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: - set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW); + set_window_update(WIN_POPUP_CONTENT, WINDOW_UPDATE_SHOW); break; } D_8010D690 = MSG_PAL_STANDARD; diff --git a/src/battle/16C8E0.c b/src/battle/16C8E0.c index 854349ee52..678cc533d5 100644 --- a/src/battle/16C8E0.c +++ b/src/battle/16C8E0.c @@ -209,7 +209,7 @@ void initialize_battle(void) { create_worker_scene(NULL, btl_render_actors); btl_popup_messages_init(); create_action_command_ui_worker(); - set_windows_visible(WINDOW_GROUP_1); + set_windows_visible(WINDOW_GROUP_BATTLE); HPBarHID = hud_element_create(&HES_HPBar); hud_element_set_flags(HPBarHID, HUD_ELEMENT_FLAG_80); diff --git a/src/battle/btl_states_menus.c b/src/battle/btl_states_menus.c index 69a666dcde..fb6ceae0c2 100644 --- a/src/battle/btl_states_menus.c +++ b/src/battle/btl_states_menus.c @@ -955,17 +955,17 @@ void func_802A27D0(void) { void func_802A27E4(void) { s32 i; - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_HIDE); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_HIDE); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_HIDE); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); for (i = 0; i < BattleMenu_Moves_OptionCount; i++) { hud_element_free(BattleMenu_Moves_OptionIDs[i]); @@ -1004,17 +1004,17 @@ void func_802A2910(void) { } hud_element_set_script(BattleMenu_Moves_CursorID, &HES_AnimatedHandPointer); - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_TRANSPARENT); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_TRANSPARENT); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_TRANSPARENT); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleMenu_Moves_TextColor = MSG_PAL_STANDARD; D_802AD10F = 1; BattleMenu_Moves_TextAlpha = 255; @@ -1026,16 +1026,16 @@ void func_802A2AB8(void) { s32* moveOptionCostUnitIconIDs; s32 i; - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_TRANSPARENT); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_TRANSPARENT); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_TRANSPARENT); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); moveOptionIconIDs = BattleMenu_Moves_OptionIDs; @@ -1061,7 +1061,7 @@ void func_802A2AB8(void) { } void func_802A2C58(void) { - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1E; } @@ -1206,15 +1206,15 @@ s32 btl_submenu_moves_update(void) { moveX = 20; moveY = BattleMenu_Moves_PosY; set_window_properties(8, moveX, 186, 280, 32, WINDOW_PRIORITY_20, func_802A4494, NULL, -1); - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_SHOW); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_SHOW); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_SHOW); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); do { cond = FALSE; @@ -1324,15 +1324,15 @@ s32 btl_submenu_moves_update(void) { hud_element_set_script(BattleMenu_Moves_CursorID, &HES_HandPointer); BattleMenu_Moves_TextColor = MSG_PAL_0D; - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_DARKENED); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_DARKENED); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_DARKENED); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_DARKENED); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_DARKENED); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); if (!BattleMenu_UsingSpiritsSubmenu) { status_bar_stop_blinking_fp(); } else { @@ -1348,15 +1348,15 @@ s32 btl_submenu_moves_update(void) { } return 255; case BTL_SUBMENU_MOVES_STATE_UNK_A: - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_HIDE); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_HIDE); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_HIDE); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); if (!BattleMenu_UsingSpiritsSubmenu) { status_bar_stop_blinking_fp(); } else { @@ -1369,28 +1369,28 @@ s32 btl_submenu_moves_update(void) { battle_menu_moveOptionActive = battle_menu_moveCursorPos; return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1; case BTL_SUBMENU_MOVES_STATE_UNK_14: - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_SHOW); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_SHOW); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_SHOW); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1; battle_menu_moveOptionActive = battle_menu_moveCursorPos; return BattleMenu_Moves_OptionIndexMap[battle_menu_moveCursorPos] + 1; case BTL_SUBMENU_MOVES_STATE_UNK_1E: - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_9); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_9); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_9); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_9); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_9); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_NEGATIVE_ONE; break; case BTL_SUBMENU_MOVES_STATE_UNK_28: @@ -1398,15 +1398,15 @@ s32 btl_submenu_moves_update(void) { battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_29; return -1; case BTL_SUBMENU_MOVES_STATE_UNK_29: - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_HIDE); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_HIDE); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_HIDE); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); msgID = MSG_Menus_Battle_CantSelectNow; if (D_802AD258 == 0) { @@ -1420,7 +1420,7 @@ s32 btl_submenu_moves_update(void) { msgWidth = get_msg_width(msgID, 0) + 23; moveX = (SCREEN_WIDTH / 2) - (msgWidth / 2); set_window_properties(9, moveX, 80, msgWidth, D_802AB340[get_msg_lines(msgID) - 1], 20, func_802A4534, NULL, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); D_802AD10B = 60; battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_2A; return -1; @@ -1432,16 +1432,16 @@ s32 btl_submenu_moves_update(void) { D_802AD10B--; return -1; } - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_MOVES_MENU, WINDOW_UPDATE_SHOW); if (!BattleMenu_UsingSpiritsSubmenu) { - set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_3, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_MOVES_ICON, WINDOW_UPDATE_SHOW); } else { - set_window_update(WINDOW_ID_4, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_5, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_SPIRITS_ICON, WINDOW_UPDATE_SHOW); } - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1; break; } @@ -1775,9 +1775,9 @@ void func_802A4718(void) { void func_802A472C(void) { s32 i; - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); for (i = 0; i < D_802AD66C; i++) { hud_element_free(D_802AD628[i]); @@ -1799,9 +1799,9 @@ void func_802A47E0(void) { hud_element_set_tint(HID_GreenArrowUp, 255, 255, 255); hud_element_set_tint(HID_GreenArrowDown, 255, 255, 255); hud_element_set_script(D_802AD618, &HES_AnimatedHandPointer); - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); D_802AD614 = MSG_PAL_STANDARD; D_802AD60B = 1; D_802AD624 = 255; @@ -1811,9 +1811,9 @@ void func_802A47E0(void) { void func_802A48FC(void) { s32 i; - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); for (i = 0; i < D_802AD66C; i++) { hud_element_set_tint(D_802AD628[i], 255, 255, 255); @@ -1829,9 +1829,9 @@ void func_802A48FC(void) { } void func_802A4A10(void) { - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_TRANSPARENT); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_TRANSPARENT); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_UNK_30; } @@ -1871,14 +1871,14 @@ s32 btl_update_strats_menu(void) { D_802AD614 = MSG_PAL_STANDARD; x = D_802AD63C; y = D_802AD63E; - set_window_properties(WINDOW_ID_6, x, y, 144, (StratsMenuLines * 13) + 26, 0, btl_menu_strats_draw_content, NULL, -1); - set_window_properties(WINDOW_ID_7, x + 18, y - 6, 108, 16, 1, btl_menu_strats_show_title, NULL, -1); + set_window_properties(WIN_BTL_STRATS_MENU, x, y, 144, (StratsMenuLines * 13) + 26, 0, btl_menu_strats_draw_content, NULL, -1); + set_window_properties(WIN_BTL_STRATS_TITLE, x + 18, y - 6, 108, 16, 1, btl_menu_strats_show_title, NULL, -1); x = 20; y = 186; - set_window_properties(WINDOW_ID_8, x, y, 280, 32, WINDOW_PRIORITY_20, btl_menu_strats_show_desc, NULL, -1); - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_DESC_BOX, x, y, 280, 32, WINDOW_PRIORITY_20, btl_menu_strats_show_desc, NULL, -1); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_CHOOSE; return 0; case BTL_SUBMENU_STRATS_STATE_CHOOSE: @@ -1951,30 +1951,30 @@ s32 btl_update_strats_menu(void) { hud_element_set_tint(HID_GreenArrowDown, 160, 160, 160); hud_element_set_script(D_802AD618, &HES_HandPointer); D_802AD614 = MSG_PAL_0D; - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_DARKENED); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_DARKENED); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_DARKENED); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); return StratsMenuPos + 1; case BTL_SUBMENU_STRATS_STATE_CANCEL: return 255; case 10: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_UNK_11; return StratsMenuPos + 1; case 11: return StratsMenuPos + 1; case 20: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_CHOOSE; return StratsMenuPos + 1; case 30: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_SELECT; return 0; case BTL_SUBMENU_STRATS_STATE_ERROR_INIT: @@ -1982,9 +1982,9 @@ s32 btl_update_strats_menu(void) { BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_ERROR_SHOW; return -1; case BTL_SUBMENU_STRATS_STATE_ERROR_SHOW: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); switch (D_802AD610) { case 0: msgID = MSG_Menus_Battle_CantSwitch2; @@ -1997,8 +1997,8 @@ s32 btl_update_strats_menu(void) { break; } width = get_msg_width(msgID, 0) + 23; - set_window_properties(WINDOW_ID_BATTLE_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, btl_menu_strats_show_error, NULL, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, btl_menu_strats_show_error, NULL, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); D_802AD612 = 60; BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_ERROR_DONE; return -1; @@ -2010,10 +2010,10 @@ s32 btl_update_strats_menu(void) { D_802AD612--; return -1; } - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); BattleSubmenuStratsState = BTL_SUBMENU_STRATS_STATE_CHOOSE; return 0; } @@ -3592,11 +3592,11 @@ void btl_state_update_player_menu(void) { btl_main_menu_destroy(); break; case BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_7: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_HIDE); if (popup->result != POPUP_RESULT_INVALID) { - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_9); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_9); gBattleSubState = BTL_SUBSTATE_PLAYER_MENU_CHANGE_MEMBER_2; } break; @@ -4459,11 +4459,11 @@ void btl_state_update_partner_menu(void) { btl_main_menu_destroy(); break; case BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_7: - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_HIDE); if (popupMenu->result != POPUP_RESULT_INVALID) { - set_window_update(WINDOW_ID_6, WINDOW_UPDATE_9); - set_window_update(WINDOW_ID_7, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_STRATS_MENU, WINDOW_UPDATE_9); + set_window_update(WIN_BTL_STRATS_TITLE, WINDOW_UPDATE_9); gBattleSubState = BTL_SUBSTATE_PARTNER_MENU_CHANGE_PARTNER_2; } break; diff --git a/src/battle/level_up.c b/src/battle/level_up.c index 3d3566765e..0c2ec37508 100644 --- a/src/battle/level_up.c +++ b/src/battle/level_up.c @@ -989,13 +989,13 @@ void btl_state_update_celebration(void) { #if VERSION_JP x = 32; y = 186; - set_window_properties(WINDOW_ID_8, 32, 186, 242, 32, WINDOW_PRIORITY_20, draw_content_level_up_textbox, NULL, -1); + set_window_properties(WIN_BTL_DESC_BOX, 32, 186, 242, 32, WINDOW_PRIORITY_20, draw_content_level_up_textbox, NULL, -1); #else x = 20; y = 186; - set_window_properties(WINDOW_ID_8, 20, 186, 280, 32, WINDOW_PRIORITY_20, draw_content_level_up_textbox, NULL, -1); + set_window_properties(WIN_BTL_DESC_BOX, 20, 186, 280, 32, WINDOW_PRIORITY_20, draw_content_level_up_textbox, NULL, -1); #endif - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_SHOW); gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE; } break; @@ -1038,7 +1038,7 @@ void btl_state_update_celebration(void) { break; case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE: hud_element_free(LevelUpSpotlightID); - set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_DESC_BOX, WINDOW_UPDATE_HIDE); switch (battleStatus->curSubmenu) { case 0: @@ -1145,8 +1145,8 @@ void btl_state_update_celebration(void) { width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31; x = 160 - (width / 2); y = 80; - set_window_properties(WINDOW_ID_BATTLE_POPUP, x, y, width, 28, WINDOW_PRIORITY_10, draw_content_cant_increase_popup, NULL, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, x, y, width, 28, WINDOW_PRIORITY_10, draw_content_cant_increase_popup, NULL, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); CelebrateSubstateTime = 60; gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY; break; @@ -1158,7 +1158,7 @@ void btl_state_update_celebration(void) { CelebrateSubstateTime--; break; } - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE; break; case BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY: diff --git a/src/battle/popup_messages.c b/src/battle/popup_messages.c index af9e7e6f18..130082ddd3 100644 --- a/src/battle/popup_messages.c +++ b/src/battle/popup_messages.c @@ -913,7 +913,7 @@ void btl_update_message_popup(void* data) { case BTL_MSG_STATE_ACTION_TIP_DELAY: if (gBattleStatus.flags1 & BS_FLAGS1_10000) { gBattleStatus.flags1 &= ~BS_FLAGS1_4000; - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT); popup->duration = 0; popup->showMsgState = BTL_MSG_STATE_ACTION_TIP_DISPOSE; break; @@ -922,7 +922,7 @@ void btl_update_message_popup(void* data) { if (!(gBattleStatus.flags1 & BS_FLAGS1_4000) && (actionCommandMode != AC_MODE_TUTORIAL) ) { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW_TRANSPARENT); switch (popup->messageIndex) { case BTL_MSG_ACTION_TIP_MASH_BUTTON: hud_element_set_script(HID_BattleMessage1, &HES_MashAButton); @@ -1016,9 +1016,9 @@ void btl_update_message_popup(void* data) { } #if VERSION_JP - gWindows[WINDOW_ID_BATTLE_POPUP].pos.y = BattleMessage_CurBoxPosY; + gWindows[WIN_BTL_POPUP].pos.y = BattleMessage_CurBoxPosY; #else - gWindows[WINDOW_ID_BATTLE_POPUP].pos.y = BattleMessage_CurBoxPosY + BattleMessage_CurBoxOffsetY; + gWindows[WIN_BTL_POPUP].pos.y = BattleMessage_CurBoxPosY + BattleMessage_CurBoxOffsetY; #endif if (popup->duration == -1) { @@ -1167,7 +1167,7 @@ void btl_update_message_popup(void* data) { break; } if (shouldDisposeWindow) { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); bPopupMessage = NULL; free_popup(popup); } @@ -1672,8 +1672,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 28 + D_8028374C_1BA13C[popup->messageIndex][1]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_MERLEE_ATK_UP: @@ -1686,8 +1686,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 45 + D_8028374C_1BA13C[popup->messageIndex][1]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING: @@ -1724,11 +1724,11 @@ void btl_show_message_popup(void* data) { } BattleMessage_CurBoxPosY = posY; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); if (popup->messageIndex == BTL_MSG_ACTION_TIP_UNUSED_3) { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } else { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_DARKENED); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW_DARKENED); } } break; @@ -1745,8 +1745,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 40 + D_8028374C_1BA13C[popup->messageIndex][1]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_PLAYER_DAZED: @@ -1768,8 +1768,8 @@ void btl_show_message_popup(void* data) { height = 28 + D_8028374C_1BA13C[popup->messageIndex][1]; } - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_ENEMY_DAZED: @@ -1791,8 +1791,8 @@ void btl_show_message_popup(void* data) { height = 28 + D_8028374C_1BA13C[popup->messageIndex][1]; } - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CHARGE_HAMMER: @@ -1815,8 +1815,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 28 + D_8028374C_1BA13C[popup->messageIndex][1]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CANT_MOVE: @@ -1830,8 +1830,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 28 + D_8028374C_1BA13C[popup->messageIndex][1]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; } @@ -1893,8 +1893,8 @@ void btl_show_message_popup(void* data) { width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = BattleMessage_BoxSizesY[numLines]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_HAMMER_DISABLED_1: @@ -1910,8 +1910,8 @@ void btl_show_message_popup(void* data) { posX = 160 - (msgWidth / 2); width = msgWidth; height = 40; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CHARGE_HAMMER: @@ -1935,8 +1935,8 @@ void btl_show_message_popup(void* data) { width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = BattleMessage_BoxSizesY[numLines]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_CANT_MOVE: @@ -1951,8 +1951,8 @@ void btl_show_message_popup(void* data) { width = msgWidth; numLines = get_msg_lines(messageID) - 1; height = BattleMessage_BoxSizesY[numLines]; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; case BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING: @@ -1995,11 +1995,11 @@ void btl_show_message_popup(void* data) { BattleMessage_CurBoxOffsetY = BattleMessage_BoxOffsetsY[numLines]; posY = BattleMessage_CurBoxPosY + BattleMessage_CurBoxOffsetY; - set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); + set_window_properties(WIN_BTL_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1); if (popup->messageIndex == BTL_MSG_ACTION_TIP_UNUSED_3) { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } else { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_DARKENED); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW_DARKENED); } } break; diff --git a/src/filemenu/filemenu_common.c b/src/filemenu/filemenu_common.c index 558be82edf..b7d52554fb 100644 --- a/src/filemenu/filemenu_common.c +++ b/src/filemenu/filemenu_common.c @@ -106,7 +106,7 @@ f32 D_80249D70[15] = { 7.0f, 12.5f, 13.0f, 14.5f, 14.0f, 13.0f, 11.5f, 9.5f, 7.5 MenuWindowBP filemenu_common_windowBPs[3] = { { - .windowID = WINDOW_ID_FILEMENU_MAIN, + .windowID = WIN_FILES_MAIN, .pos = { .x = 16, .y = 24, @@ -122,7 +122,7 @@ MenuWindowBP filemenu_common_windowBPs[3] = { .style = { .customStyle = &filemenu_windowStyles[0] }, }, { - .windowID = WINDOW_ID_FILEMENU_COPYARROW, + .windowID = WIN_FILES_COPYARROW, .pos = { .x = 0, .y = 0, @@ -132,13 +132,13 @@ MenuWindowBP filemenu_common_windowBPs[3] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = filemenu_draw_contents_copy_arrow, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { WINDOW_UPDATE_SHOW } , .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[1] }, }, { - .windowID = WINDOW_ID_FILEMENU_CURSOR, + .windowID = WIN_FILES_CURSOR, .pos = { .x = 0, .y = 0, @@ -213,11 +213,11 @@ void filemenu_set_cursor_goal_pos(s32 windowID, s32 posX, s32 posY) { if (D_80249BB0) { s32 i; - for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { + for (i = WIN_FILES_MAIN; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; s8 parent = window->parent; - if ((parent == -1 || parent == WINDOW_ID_FILEMENU_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { + if ((parent == -1 || parent == WIN_FILES_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } @@ -268,11 +268,11 @@ void filemenu_update_cursor(void) { } } - for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { + for (i = WIN_FILES_MAIN; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; s8 parent = window->parent; - if ((parent == -1 || parent == WINDOW_ID_FILEMENU_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { + if ((parent == -1 || parent == WIN_FILES_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } @@ -308,8 +308,8 @@ void filemenu_update(void) { MenuPanel** menuIt; s32 i; - for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { - if ((gWindows[i].parent == -1 || gWindows[i].parent == WINDOW_ID_FILEMENU_MAIN) && + for (i = WIN_FILES_MAIN; i < ARRAY_COUNT(gWindows); i++) { + if ((gWindows[i].parent == -1 || gWindows[i].parent == WIN_FILES_MAIN) && (gWindows[i].flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; @@ -795,16 +795,16 @@ void filemenu_update_pal_80247f40( s32 var_v1; switch (windowIndex) { - case WINDOW_ID_FILEMENU_FILE0_INFO: + case WIN_FILES_SLOT1_BODY: var_a3 = 0; break; - case WINDOW_ID_FILEMENU_FILE1_INFO: + case WIN_FILES_SLOT2_BODY: var_a3 = 1; break; - case WINDOW_ID_FILEMENU_FILE2_INFO: + case WIN_FILES_SLOT3_BODY: var_a3 = 2; break; - case WINDOW_ID_FILEMENU_FILE3_INFO: + case WIN_FILES_SLOT4_BODY: var_a3 = 3; break; } @@ -842,16 +842,16 @@ void filemenu_selectlanguage_80248018( s32 var_v1; switch (windowIndex) { - case WINDOW_ID_FILEMENU_FILE0_INFO: + case WIN_FILES_SLOT1_BODY: var_a3 = 0; break; - case WINDOW_ID_FILEMENU_FILE1_INFO: + case WIN_FILES_SLOT2_BODY: var_a3 = 1; break; - case WINDOW_ID_FILEMENU_FILE2_INFO: + case WIN_FILES_SLOT3_BODY: var_a3 = 2; break; - case WINDOW_ID_FILEMENU_FILE3_INFO: + case WIN_FILES_SLOT4_BODY: var_a3 = 3; break; } @@ -1057,7 +1057,7 @@ void filemenu_init(s32 arg0) { (*panelIt)->fpInit((*panelIt)); } } - update_window_hierarchy(WINDOW_ID_PAUSE_DECRIPTION, 64); + update_window_hierarchy(WIN_PAUSE_DECRIPTION, 64); } else { filemenu_currentMenu = 4; filemenu_set_selected(filemenu_menus[4], 0, gCurrentLanguage); @@ -1070,7 +1070,7 @@ void filemenu_init(s32 arg0) { } } } - update_window_hierarchy(WINDOW_ID_PAUSE_DECRIPTION, 64); + update_window_hierarchy(WIN_PAUSE_DECRIPTION, 64); } #else menu = filemenu_menus[0]; @@ -1109,7 +1109,7 @@ void filemenu_init(s32 arg0) { (*panelIt)->fpInit((*panelIt)); } } - update_window_hierarchy(WINDOW_ID_PAUSE_DECRIPTION, 64); + update_window_hierarchy(WIN_PAUSE_DECRIPTION, 64); #endif } @@ -1131,12 +1131,12 @@ void filemenu_cleanup(void) { } } - for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { + for (i = WIN_FILES_MAIN; i < ARRAY_COUNT(gWindows); i++) { set_window_update(i, WINDOW_UPDATE_HIDE); } - set_window_update(WINDOW_ID_PAUSE_TUTORIAL, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_PAUSE_DECRIPTION, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_TUTORIAL, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_DECRIPTION, WINDOW_UPDATE_HIDE); func_80244BC4(); } diff --git a/src/filemenu/filemenu_createfile.c b/src/filemenu/filemenu_createfile.c index dfba79b941..45989df355 100644 --- a/src/filemenu/filemenu_createfile.c +++ b/src/filemenu/filemenu_createfile.c @@ -30,7 +30,7 @@ extern u8 D_filemenu_80250960[]; MenuWindowBP filemenu_createfile_windowBPs[] = { { - .windowID = WINDOW_ID_FILEMENU_CREATEFILE_HEADER, + .windowID = WIN_FILES_INPUT_FIELD, .unk_01 = 0, .pos = { .x = 68, .y = WINDOW_1_Y }, .width = 164, @@ -38,13 +38,13 @@ MenuWindowBP filemenu_createfile_windowBPs[] = { .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_draw_contents_file_create_header, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[21] } }, { - .windowID = WINDOW_ID_FILEMENU_KEYBOARD, + .windowID = WIN_FILES_INPUT_KEYBOARD, .unk_01 = 0, .pos = { .x = 12, .y = WINDOW_2_Y }, .width = 262, @@ -52,7 +52,7 @@ MenuWindowBP filemenu_createfile_windowBPs[] = { .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_draw_contents_choose_name, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[22] } @@ -190,7 +190,7 @@ void filemenu_draw_contents_choose_name( s32 flags; s32 color; s32 xNudge; - Window* window = &gWindows[WINDOW_ID_FILEMENU_KEYBOARD]; + Window* window = &gWindows[WIN_FILES_INPUT_KEYBOARD]; if ((window->flags & WINDOW_FLAG_INITIAL_ANIMATION) && window->fpUpdate.func == filemenu_update_change_layout) { changeLayoutOffset = window->updateCounter * 2; @@ -338,7 +338,7 @@ void filemenu_draw_contents_choose_name( D_8024A18C = -4; } D_8024A18C++; - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_KEYBOARD, + filemenu_set_cursor_goal_pos(WIN_FILES_INPUT_KEYBOARD, baseX + 2 + menu->col * 19, baseY + 13 + menu->row * FILEMENU_ROW_AMT); } @@ -359,13 +359,13 @@ void filemenu_choose_name_init(MenuPanel* menu) { setup_pause_menu_tab(filemenu_createfile_windowBPs, ARRAY_COUNT(filemenu_createfile_windowBPs)); - gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].pos.x = ((gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].width / 2; + gWindows[WIN_FILES_INPUT_FIELD].pos.x = ((gWindows[WIN_FILES_INPUT_FIELD].parent != -1) + ? (gWindows[gWindows[WIN_FILES_INPUT_FIELD].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_INPUT_FIELD].width / 2; - gWindows[WINDOW_ID_FILEMENU_KEYBOARD].pos.x = ((gWindows[WINDOW_ID_FILEMENU_KEYBOARD].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_KEYBOARD].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_KEYBOARD].width / 2; + gWindows[WIN_FILES_INPUT_KEYBOARD].pos.x = ((gWindows[WIN_FILES_INPUT_KEYBOARD].parent != -1) + ? (gWindows[gWindows[WIN_FILES_INPUT_KEYBOARD].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_INPUT_KEYBOARD].width / 2; menu->initialized = TRUE; } @@ -379,10 +379,10 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { #if VERSION_PAL s32 halfWidth; - gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].width = D_filemenu_80250958[gCurrentLanguage]; - halfWidth = gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].width / 2; - gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].pos.x = gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent != -1 ? - (gWindows[gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent].width / 2) - halfWidth : + gWindows[WIN_FILES_INPUT_FIELD].width = D_filemenu_80250958[gCurrentLanguage]; + halfWidth = gWindows[WIN_FILES_INPUT_FIELD].width / 2; + gWindows[WIN_FILES_INPUT_FIELD].pos.x = gWindows[WIN_FILES_INPUT_FIELD].parent != -1 ? + (gWindows[gWindows[WIN_FILES_INPUT_FIELD].parent].width / 2) - halfWidth : SCREEN_WIDTH / 2 - halfWidth; #endif @@ -460,7 +460,7 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { sfx_play_sound(SOUND_CREATE_FILE_CHANGE_CHARSET); menu->page = 1; filemenu_set_selected(menu, menu->col, menu->row); - set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_change_layout); + set_window_update(WIN_FILES_INPUT_KEYBOARD, (s32)filemenu_update_change_layout); } break; case 0xC8: @@ -468,7 +468,7 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { sfx_play_sound(SOUND_CREATE_FILE_CHANGE_CHARSET); menu->page = 0; filemenu_set_selected(menu, menu->col, menu->row); - set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_change_layout); + set_window_update(WIN_FILES_INPUT_KEYBOARD, (s32)filemenu_update_change_layout); } break; case 0xCA: @@ -483,28 +483,28 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { } sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32) filemenu_update_show_name_confirm); - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; - - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -70; + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32) filemenu_update_show_name_confirm); + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 121; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; + + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -70; #if VERSION_PAL - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = D_filemenu_80250960[gCurrentLanguage]; - halfWidth = gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1 - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - halfWidth + gWindows[WIN_FILES_CONFIRM_PROMPT].width = D_filemenu_80250960[gCurrentLanguage]; + halfWidth = gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 62; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1 + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) - halfWidth : SCREEN_WIDTH / 2 - halfWidth; #else - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 164; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 164; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 62; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; #endif filemenu_currentMenu = 1; @@ -537,19 +537,19 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { filemenu_filename_pos--; if (filemenu_filename_pos < 0) { filemenu_filename_pos = 0; - set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32) &filemenu_update_hidden_name_input); - set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32) &filemenu_update_hidden_name_input); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32) &filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_INPUT_FIELD, (s32) &filemenu_update_hidden_name_input); + set_window_update(WIN_FILES_INPUT_KEYBOARD, (s32) &filemenu_update_hidden_name_input); + set_window_update(WIN_FILES_TITLE, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_MONO, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32) &filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32) &filemenu_update_show_with_rotation); filemenu_currentMenu = 0; return; } @@ -572,30 +572,30 @@ void filemenu_choose_name_handle_input(MenuPanel* menu) { } sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32) filemenu_update_show_name_confirm); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32) filemenu_update_show_name_confirm); - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 121; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -70; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -70; #if VERSION_PAL - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = D_filemenu_80250960[gCurrentLanguage]; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62; - halfWidth = gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1 - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - halfWidth + gWindows[WIN_FILES_CONFIRM_PROMPT].width = D_filemenu_80250960[gCurrentLanguage]; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 62; + halfWidth = gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1 + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) - halfWidth : SCREEN_WIDTH / 2 - halfWidth; #else - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 164; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 62; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 164; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 62; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; #endif filemenu_currentMenu = 1; diff --git a/src/filemenu/filemenu_info.c b/src/filemenu/filemenu_info.c index ee91f45812..35de8f93aa 100644 --- a/src/filemenu/filemenu_info.c +++ b/src/filemenu/filemenu_info.c @@ -25,7 +25,7 @@ u8 filemenu_info_gridData[] = { MenuWindowBP filemenu_info_windowBPs[] = { { - .windowID = WINDOW_ID_FILEMENU_INFO, + .windowID = WIN_FILES_MESSAGE, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = 0, @@ -159,18 +159,18 @@ void filemenu_info_handle_input(MenuPanel* menu) { switch (menu->page) { case PAGE_1: menu->page = PAGE_0; - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 0, 2); break; case PAGE_4: menu->page = PAGE_0; - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 1, 2); break; #if !VERSION_PAL @@ -180,7 +180,7 @@ void filemenu_info_handle_input(MenuPanel* menu) { break; #endif } - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_HIDE); } } diff --git a/src/filemenu/filemenu_main.c b/src/filemenu/filemenu_main.c index b9938d139e..c7ace3e114 100644 --- a/src/filemenu/filemenu_main.c +++ b/src/filemenu/filemenu_main.c @@ -126,7 +126,7 @@ u8 filemenu_main_gridData[] = { MenuWindowBP filemenu_main_windowBPs[] = { { - .windowID = WINDOW_ID_FILEMENU_TITLE, + .windowID = WIN_FILES_TITLE, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = 0, @@ -134,13 +134,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_title, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_title }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[3] } }, { - .windowID = WINDOW_ID_FILEMENU_STEREO, + .windowID = WIN_FILES_STEREO, .unk_01 = 0, .pos = { .x = -2, .y = 6 }, .width = 68, @@ -148,13 +148,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_stereo, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_left }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[2] } }, { - .windowID = WINDOW_ID_FILEMENU_MONO, + .windowID = WIN_FILES_MONO, .unk_01 = 0, .pos = { .x = 221, .y = 6 }, .width = 68, @@ -162,13 +162,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_mono, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_right }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[2] } }, { - .windowID = WINDOW_ID_FILEMENU_OPTION_LEFT, + .windowID = WIN_FILES_OPTION_LEFT, .unk_01 = 0, .pos = { .x = 5, .y = 171 }, .width = 88, @@ -176,13 +176,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_left, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_bottom }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[4] } }, { - .windowID = WINDOW_ID_FILEMENU_OPTION_CENTER, + .windowID = WIN_FILES_OPTION_CENTER, .unk_01 = 0, .pos = { .x = 0, .y = 171 }, .width = 88, @@ -190,13 +190,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_center, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_bottom }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[5] } }, { - .windowID = WINDOW_ID_FILEMENU_OPTION_RIGHT, + .windowID = WIN_FILES_OPTION_RIGHT, .unk_01 = 0, .pos = { .x = 195, .y = 171 }, .width = 88, @@ -204,13 +204,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_right, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_bottom }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[6] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE2_INFO, + .windowID = WIN_FILES_SLOT3_BODY, .unk_01 = 0, .pos = { .x = 9, .y = 110 }, .width = 130, @@ -218,13 +218,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_2_info, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_left }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[9] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE2_TITLE, + .windowID = WIN_FILES_SLOT3_TITLE, .unk_01 = 0, .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, @@ -232,13 +232,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_2_title, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_FILE2_INFO, + .parentID = WIN_FILES_SLOT3_BODY, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[13] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE3_INFO, + .windowID = WIN_FILES_SLOT4_BODY, .unk_01 = 0, .pos = { .x = 149, .y = 110 }, .width = 130, @@ -246,13 +246,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_3_info, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_right }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[10] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE3_TITLE, + .windowID = WIN_FILES_SLOT4_TITLE, .unk_01 = 0, .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, @@ -260,13 +260,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_3_title, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_FILE3_INFO, + .parentID = WIN_FILES_SLOT4_BODY, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[14] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE0_INFO, + .windowID = WIN_FILES_SLOT1_BODY, .unk_01 = 0, .pos = { .x = 9, .y = 41 }, .width = 130 + OFFSET_WIDTH, @@ -274,13 +274,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_0_info, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_left }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[7] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE0_TITLE, + .windowID = WIN_FILES_SLOT1_TITLE, .unk_01 = 0, .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, @@ -288,13 +288,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_0_title, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_FILE0_INFO, + .parentID = WIN_FILES_SLOT1_BODY, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[11] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE1_INFO, + .windowID = WIN_FILES_SLOT2_BODY, .unk_01 = 0, .pos = { .x = 149, .y = 41 }, .width = 130, @@ -302,13 +302,13 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_1_info, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func = &filemenu_update_show_options_right }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[8] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE1_TITLE, + .windowID = WIN_FILES_SLOT2_TITLE, .unk_01 = 0, .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, @@ -316,7 +316,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_1_title, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_FILE1_INFO, + .parentID = WIN_FILES_SLOT2_BODY, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[12] } @@ -423,13 +423,13 @@ void filemenu_draw_contents_option_left( s32 offset = D_filemenu_802508E8[gCurrentLanguage]; if (menu->col == 0 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_LEFT, (baseX + offset) - 10, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_LEFT, (baseX + offset) - 10, baseY + 8); } filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_DELETE_FILE), baseX + offset + OFFSET_WIDTH, baseY + 2, 255, 0, 1); #else if (menu->page != 2) { if (menu->col == 0 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_LEFT, baseX, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_LEFT, baseX, baseY + 8); } filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_DELETE_FILE), baseX + 8 + OFFSET_WIDTH, baseY + 2, 255, 0, 1); } @@ -455,7 +455,7 @@ void filemenu_draw_contents_option_center( xOffset = D_filemenu_802508F4[gCurrentLanguage]; yOffset = 0; if (menu->col == 1 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_CENTER, baseX + xOffset - 10, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_CENTER, baseX + xOffset - 10, baseY + 8); } break; default: @@ -463,7 +463,7 @@ void filemenu_draw_contents_option_center( xOffset = D_filemenu_802508EC[gCurrentLanguage]; yOffset = 0; if (menu->col == 1 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_CENTER, baseX + xOffset - 10, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_CENTER, baseX + xOffset - 10, baseY + 8); } break; } @@ -490,7 +490,7 @@ void filemenu_draw_contents_option_center( xOffset = CENTER_CANCEL_X; yOffset = 0; if (menu->col == 1 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_CENTER, baseX + CENTER_CANCEL_X - 10, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_CENTER, baseX + CENTER_CANCEL_X - 10, baseY + 8); } break; default: @@ -498,7 +498,7 @@ void filemenu_draw_contents_option_center( xOffset = 14; yOffset = 0; if (menu->col == 1 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_CENTER, baseX + 4, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_CENTER, baseX + 4, baseY + 8); } break; } @@ -517,13 +517,13 @@ void filemenu_draw_contents_option_right( s32 offset = D_filemenu_802508F0[gCurrentLanguage]; if (menu->col == 2 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_RIGHT, baseX + offset - 10, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_RIGHT, baseX + offset - 10, baseY + 8); } filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_CANCEL), baseX + offset, baseY + 2, 255, 0, 1); #else if (menu->page != 2) { if (menu->col == 2 && menu->row == 2) { - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_OPTION_RIGHT, baseX + 8, baseY + 8); + filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_RIGHT, baseX + 8, baseY + 8); } filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_CANCEL), baseX + RIGHT_CANCEL_X, baseY + 2, 255, 0, 1); } @@ -760,28 +760,28 @@ void filemenu_main_init(MenuPanel* menu) { setup_pause_menu_tab(filemenu_main_windowBPs, ARRAY_COUNT(filemenu_main_windowBPs)); menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu); - gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; - gWindows[WINDOW_ID_FILEMENU_TITLE].width = 162; - gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; + gWindows[WIN_FILES_TITLE].pos.y = 1; + gWindows[WIN_FILES_TITLE].width = 162; + gWindows[WIN_FILES_TITLE].height = 25; - halfWidth = gWindows[WINDOW_ID_FILEMENU_TITLE].width / 2; + halfWidth = gWindows[WIN_FILES_TITLE].width / 2; - gWindows[WINDOW_ID_FILEMENU_TITLE].pos.x = gWindows[WINDOW_ID_FILEMENU_TITLE].parent != -1 - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_TITLE].parent].width / 2) - halfWidth + gWindows[WIN_FILES_TITLE].pos.x = gWindows[WIN_FILES_TITLE].parent != -1 + ? (gWindows[gWindows[WIN_FILES_TITLE].parent].width / 2) - halfWidth : SCREEN_WIDTH / 2 - halfWidth; tmp = 1; - halfWidth = gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].width / 2; + halfWidth = gWindows[WIN_FILES_OPTION_CENTER].width / 2; - gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].pos.x = gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent != -1 - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent].width / 2) - halfWidth + gWindows[WIN_FILES_OPTION_CENTER].pos.x = gWindows[WIN_FILES_OPTION_CENTER].parent != -1 + ? (gWindows[gWindows[WIN_FILES_OPTION_CENTER].parent].width / 2) - halfWidth : SCREEN_WIDTH / 2 - halfWidth; if (menu->page != 0) { - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_STEREO, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_MONO, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_OPTION_LEFT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_OPTION_RIGHT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_STEREO, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_MONO, WINDOW_UPDATE_HIDE); } menu->initialized = tmp; } @@ -807,38 +807,38 @@ void filemenu_main_init(MenuPanel* menu) { menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu); if (menu->page == 2) { - gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; - gWindows[WINDOW_ID_FILEMENU_TITLE].width = 211; - gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; + gWindows[WIN_FILES_TITLE].pos.y = 1; + gWindows[WIN_FILES_TITLE].width = 211; + gWindows[WIN_FILES_TITLE].height = 25; } else { - gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; - gWindows[WINDOW_ID_FILEMENU_TITLE].width = 162; - gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; + gWindows[WIN_FILES_TITLE].pos.y = 1; + gWindows[WIN_FILES_TITLE].width = 162; + gWindows[WIN_FILES_TITLE].height = 25; } - halfWidth = gWindows[WINDOW_ID_FILEMENU_TITLE].width / 2; - posXPtr = &gWindows[WINDOW_ID_FILEMENU_TITLE].pos.x; - if (gWindows[WINDOW_ID_FILEMENU_TITLE].parent != -1) { - x = (gWindows[gWindows[WINDOW_ID_FILEMENU_TITLE].parent].width / 2) - halfWidth; + halfWidth = gWindows[WIN_FILES_TITLE].width / 2; + posXPtr = &gWindows[WIN_FILES_TITLE].pos.x; + if (gWindows[WIN_FILES_TITLE].parent != -1) { + x = (gWindows[gWindows[WIN_FILES_TITLE].parent].width / 2) - halfWidth; } else { x = SCREEN_WIDTH / 2 - halfWidth; } *posXPtr = x; - halfWidth2 = gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].width / 2; - posXPtr = &gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].pos.x; - if (gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent != -1) { - x = (gWindows[gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent].width / 2) - halfWidth2; + halfWidth2 = gWindows[WIN_FILES_OPTION_CENTER].width / 2; + posXPtr = &gWindows[WIN_FILES_OPTION_CENTER].pos.x; + if (gWindows[WIN_FILES_OPTION_CENTER].parent != -1) { + x = (gWindows[gWindows[WIN_FILES_OPTION_CENTER].parent].width / 2) - halfWidth2; } else { x = SCREEN_WIDTH / 2 - halfWidth2; } *posXPtr = x; if (menu->page != 0) { - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_STEREO, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_FILEMENU_MONO, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_OPTION_LEFT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_OPTION_RIGHT, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_STEREO, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_MONO, WINDOW_UPDATE_HIDE); } menu->initialized = 1; } @@ -976,19 +976,19 @@ void filemenu_main_handle_input(MenuPanel* menu) { filemenu_filename[i] = 0xF7; } filemenu_filename_pos = 0; - set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32)filemenu_update_show_name_input); - set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_show_name_input); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_INPUT_FIELD, (s32)filemenu_update_show_name_input); + set_window_update(WIN_FILES_INPUT_KEYBOARD, (s32)filemenu_update_show_name_input); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_hidden_with_rotation); sfx_play_sound(SOUND_MENU_NEXT); filemenu_currentMenu = 3; temp_a0 = filemenu_menus[filemenu_currentMenu]; @@ -998,66 +998,66 @@ void filemenu_main_handle_input(MenuPanel* menu) { } if (menu->selected == 6) { - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_title); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_hidden_title); sfx_play_sound(SOUND_FILE_MENU_OUT); set_game_mode(GAME_MODE_END_FILE_SELECT); } else if (menu->selected == 4) { sfx_play_sound(SOUND_MENU_NEXT); menu->page = 1; filemenu_set_selected(menu, 1, 2); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); } else if (menu->selected == 5) { sfx_play_sound(SOUND_MENU_NEXT); menu->page = 3; filemenu_set_selected(menu, 1, 2); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); } else if (menu->selected < 4) { MenuPanel* temp_a0; sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_with_rotation); - set_window_update(menu->selected + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_select_file); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_hidden_with_rotation); + set_window_update(menu->selected + WIN_FILES_SLOT1_BODY, (s32)filemenu_update_select_file); sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_SHOW); - - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 143; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; - - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -29; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 192; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 25; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + set_window_update(WIN_FILES_CONFIRM_OPTIONS, WINDOW_UPDATE_SHOW); + + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 143; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; + + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -29; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 192; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 25; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; filemenu_currentMenu = 1; temp_a0 = filemenu_menus[filemenu_currentMenu]; @@ -1069,31 +1069,31 @@ void filemenu_main_handle_input(MenuPanel* menu) { if (menu->selected == 6) { sfx_play_sound(SOUND_MENU_NEXT); menu->page = 0; - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 0, 2); } else if (menu->selected < 4) { if (gSaveSlotHasData[menu->selected]) { MenuPanel* temp_a0; sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm); - - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; - - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -29; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 118; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 25; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_show_name_confirm); + + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 121; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; + + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -29; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 118; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 25; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; filemenu_currentMenu = 1; temp_a0 = filemenu_menus[filemenu_currentMenu]; @@ -1108,10 +1108,10 @@ void filemenu_main_handle_input(MenuPanel* menu) { if (menu->selected == 6) { sfx_play_sound(SOUND_MENU_NEXT); menu->page = 0; - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 0, 1); } else if (menu->selected < 4) { if (gSaveSlotHasData[menu->selected]) { @@ -1137,17 +1137,17 @@ void filemenu_main_handle_input(MenuPanel* menu) { sfx_play_sound(SOUND_MENU_NEXT); filemenu_currentMenu = 2; filemenu_menus[filemenu_currentMenu]->page = 2; - gWindows[WINDOW_ID_FILEMENU_INFO].width = 154; - gWindows[WINDOW_ID_FILEMENU_INFO].height = 39; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2) - : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2; - - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE); + gWindows[WIN_FILES_MESSAGE].width = 154; + gWindows[WIN_FILES_MESSAGE].height = 39; + gWindows[WIN_FILES_MESSAGE].pos.x = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_MESSAGE].width / 2; + gWindows[WIN_FILES_MESSAGE].pos.y = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].height / 2) + : SCREEN_HEIGHT / 2) - gWindows[WIN_FILES_MESSAGE].height / 2; + + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, WINDOW_UPDATE_HIDE); fio_load_game(filemenu_loadedFileIdx); gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx]; fio_save_game(filemenu_iterFileIdx); @@ -1156,20 +1156,20 @@ void filemenu_main_handle_input(MenuPanel* menu) { MenuPanel* temp_a0; sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm); - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 121; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; - - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -43; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 182; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 39; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_show_name_confirm); + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 121; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; + + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -43; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 182; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 39; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; filemenu_currentMenu = 1; temp_a0 = filemenu_menus[filemenu_currentMenu]; @@ -1188,29 +1188,29 @@ void filemenu_main_handle_input(MenuPanel* menu) { sfx_play_sound(SOUND_MENU_NEXT); filemenu_currentMenu = 2; filemenu_menus[filemenu_currentMenu]->page = 1; - set_window_update(WINDOW_ID_FILEMENU_MAIN, (s32)main_menu_window_update); - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_MAIN, (s32)main_menu_window_update); + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, WINDOW_UPDATE_HIDE); fio_save_game(menu->selected); gSaveSlotHasData[menu->selected] = TRUE; } else { MenuPanel* temp_a0; sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_show_name_confirm); - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.y = 127; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width = 69; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].height = 44; - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_OPTIONS].width / 2; - - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.y = -50; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width = 148; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].height = 38; - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].pos.x = ((gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_YESNO_PROMPT].width / 2; + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_show_name_confirm); + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.y = 127; + gWindows[WIN_FILES_CONFIRM_OPTIONS].width = 69; + gWindows[WIN_FILES_CONFIRM_OPTIONS].height = 44; + gWindows[WIN_FILES_CONFIRM_OPTIONS].pos.x = ((gWindows[WIN_FILES_CONFIRM_OPTIONS].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_OPTIONS].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_OPTIONS].width / 2; + + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.y = -50; + gWindows[WIN_FILES_CONFIRM_PROMPT].width = 148; + gWindows[WIN_FILES_CONFIRM_PROMPT].height = 38; + gWindows[WIN_FILES_CONFIRM_PROMPT].pos.x = ((gWindows[WIN_FILES_CONFIRM_PROMPT].parent != -1) + ? (gWindows[gWindows[WIN_FILES_CONFIRM_PROMPT].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_CONFIRM_PROMPT].width / 2; filemenu_currentMenu = 1; temp_a0 = filemenu_menus[filemenu_currentMenu]; @@ -1243,35 +1243,35 @@ void filemenu_main_handle_input(MenuPanel* menu) { switch (menu->page) { case 0: - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_hidden_options_left); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_hidden_options_right); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_hidden_title); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_hidden_options_bottom); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_hidden_options_left); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_hidden_options_right); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_hidden_title); sfx_play_sound(SOUND_FILE_MENU_OUT); set_game_mode(GAME_MODE_END_FILE_SELECT); break; case 1: menu->page = 0; filemenu_set_selected(menu, 0, 2); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); sfx_play_sound(SOUND_MENU_BACK); break; case 3: menu->page = 0; filemenu_set_selected(menu, 1, 2); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_options_left); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_options_right); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); sfx_play_sound(SOUND_MENU_BACK); break; case 4: @@ -1289,51 +1289,51 @@ void filemenu_main_handle_input(MenuPanel* menu) { #endif void filemenu_main_update(MenuPanel* menu) { - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[17]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[17]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[17]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[17]; + gWindowStyles[WIN_FILES_SLOT1_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT2_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT3_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT4_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT1_TITLE].customStyle = &filemenu_windowStyles[17]; + gWindowStyles[WIN_FILES_SLOT2_TITLE].customStyle = &filemenu_windowStyles[17]; + gWindowStyles[WIN_FILES_SLOT3_TITLE].customStyle = &filemenu_windowStyles[17]; + gWindowStyles[WIN_FILES_SLOT4_TITLE].customStyle = &filemenu_windowStyles[17]; switch (menu->selected) { case 0: - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT1_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT1_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 1: - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT2_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT2_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 2: - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT3_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT3_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 3: - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT4_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT4_TITLE].customStyle = &filemenu_windowStyles[18]; break; } if (filemenu_menus[0]->page == PAGE_4) { switch (filemenu_loadedFileIdx) { case 0: - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT1_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT1_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 1: - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT2_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT2_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 2: - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT3_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT3_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 3: - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18]; + gWindowStyles[WIN_FILES_SLOT4_BODY].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT4_TITLE].customStyle = &filemenu_windowStyles[18]; return; } } diff --git a/src/filemenu/filemenu_selectlanguage.c b/src/filemenu/filemenu_selectlanguage.c index 01734f654c..5ec65fe729 100644 --- a/src/filemenu/filemenu_selectlanguage.c +++ b/src/filemenu/filemenu_selectlanguage.c @@ -64,7 +64,7 @@ void filemenu_selectlanguage_update(MenuPanel*); MenuWindowBP D_filemenu_8024F1D8[] = { { - .windowID = WINDOW_ID_FILEMENU_TITLE, + .windowID = WIN_FILES_TITLE, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = 0, @@ -72,13 +72,13 @@ MenuWindowBP D_filemenu_8024F1D8[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_pal_8024d6a0, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func=&filemenu_update_show_title }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[3] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE2_INFO, + .windowID = WIN_FILES_SLOT3_BODY, .unk_01 = 0, .pos = { .x = 89, .y = 98 }, .width = 110, @@ -86,13 +86,13 @@ MenuWindowBP D_filemenu_8024F1D8[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_pal_8024DA50, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func=&filemenu_update_pal_80247f40 }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[9] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE3_INFO, + .windowID = WIN_FILES_SLOT4_BODY, .unk_01 = 0, .pos = { .x = 89, .y = 124 }, .width = 110, @@ -100,13 +100,13 @@ MenuWindowBP D_filemenu_8024F1D8[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_pal_8024DAA0, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func=&filemenu_update_pal_80247f40 }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[10] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE0_INFO, + .windowID = WIN_FILES_SLOT1_BODY, .unk_01 = 0, .pos = { .x = 89, .y = 46 }, .width = 110, @@ -114,13 +114,13 @@ MenuWindowBP D_filemenu_8024F1D8[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_pal_8024D9B0, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func=&filemenu_update_pal_80247f40 }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[7] } }, { - .windowID = WINDOW_ID_FILEMENU_FILE1_INFO, + .windowID = WIN_FILES_SLOT2_BODY, .unk_01 = 0, .pos = { .x = 89, .y = 72 }, .width = 110, @@ -128,7 +128,7 @@ MenuWindowBP D_filemenu_8024F1D8[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_pal_8024DA00, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_MAIN, + .parentID = WIN_FILES_MAIN, .fpUpdate = { .func=&filemenu_update_pal_80247f40 }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[8] } @@ -221,13 +221,13 @@ void filemenu_selectlanguage_init(MenuPanel* menu) { menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu); D_802517D4[0] = (s32) menu->row; - gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; - gWindows[WINDOW_ID_FILEMENU_TITLE].width = 192; - gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; + gWindows[WIN_FILES_TITLE].pos.y = 1; + gWindows[WIN_FILES_TITLE].width = 192; + gWindows[WIN_FILES_TITLE].height = 25; - posXPtr = &gWindows[WINDOW_ID_FILEMENU_TITLE].pos.x; - if (gWindows[WINDOW_ID_FILEMENU_TITLE].parent != -1) { - x = (gWindows[gWindows[WINDOW_ID_FILEMENU_TITLE].parent].width / 2) - (gWindows[WINDOW_ID_FILEMENU_TITLE].width / 2); + posXPtr = &gWindows[WIN_FILES_TITLE].pos.x; + if (gWindows[WIN_FILES_TITLE].parent != -1) { + x = (gWindows[gWindows[WIN_FILES_TITLE].parent].width / 2) - (gWindows[WIN_FILES_TITLE].width / 2); } else { x = 64; } @@ -319,11 +319,11 @@ void filemenu_selectlanguage_handle_input(MenuPanel* menu) { } if ((filemenu_pressedButtons & (BUTTON_A | BUTTON_START)) || (var_s1 != 0)) { - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32) &filemenu_selectlanguage_80248018); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32) &filemenu_selectlanguage_80248018); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32) &filemenu_selectlanguage_80248018); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32) &filemenu_selectlanguage_80248018); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32) filemenu_update_hidden_title); + set_window_update(WIN_FILES_SLOT1_BODY, (s32) &filemenu_selectlanguage_80248018); + set_window_update(WIN_FILES_SLOT2_BODY, (s32) &filemenu_selectlanguage_80248018); + set_window_update(WIN_FILES_SLOT3_BODY, (s32) &filemenu_selectlanguage_80248018); + set_window_update(WIN_FILES_SLOT4_BODY, (s32) &filemenu_selectlanguage_80248018); + set_window_update(WIN_FILES_TITLE, (s32) filemenu_update_hidden_title); if (var_s1 == 0) { sfx_play_sound(SOUND_PLANTS_BELL); } else { @@ -334,23 +334,23 @@ void filemenu_selectlanguage_handle_input(MenuPanel* menu) { } void filemenu_selectlanguage_update(MenuPanel* menu) { - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[15]; - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT1_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT2_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT3_BODY].customStyle = &filemenu_windowStyles[15]; + gWindowStyles[WIN_FILES_SLOT4_BODY].customStyle = &filemenu_windowStyles[15]; switch (menu->selected) { case 0: - gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT1_BODY].customStyle = &filemenu_windowStyles[16]; break; case 1: - gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT2_BODY].customStyle = &filemenu_windowStyles[16]; break; case 2: - gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT3_BODY].customStyle = &filemenu_windowStyles[16]; break; case 3: - gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16]; + gWindowStyles[WIN_FILES_SLOT4_BODY].customStyle = &filemenu_windowStyles[16]; break; } diff --git a/src/filemenu/filemenu_yesno.c b/src/filemenu/filemenu_yesno.c index 16e9deac88..828d2c9c5c 100644 --- a/src/filemenu/filemenu_yesno.c +++ b/src/filemenu/filemenu_yesno.c @@ -39,7 +39,7 @@ u8 filemenu_yesno_gridData[] = { MenuWindowBP filemenu_yesno_windowBPs[] = { { - .windowID = WINDOW_ID_FILEMENU_YESNO_OPTIONS, + .windowID = WIN_FILES_CONFIRM_OPTIONS, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = 0, @@ -53,7 +53,7 @@ MenuWindowBP filemenu_yesno_windowBPs[] = { .style = { .customStyle = &filemenu_windowStyles[19] } }, { - .windowID = WINDOW_ID_FILEMENU_YESNO_PROMPT, + .windowID = WIN_FILES_CONFIRM_PROMPT, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = 0, @@ -61,7 +61,7 @@ MenuWindowBP filemenu_yesno_windowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_yesno_draw_prompt_contents, .tab = NULL, - .parentID = WINDOW_ID_FILEMENU_YESNO_OPTIONS, + .parentID = WIN_FILES_CONFIRM_OPTIONS, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &filemenu_windowStyles[19] } @@ -143,7 +143,7 @@ void filemenu_yesno_draw_options_contents( cursorGoalXOffset = xOffset2 - 10; cursorGoalYOffset = yOffset2 + 8; } - filemenu_set_cursor_goal_pos(WINDOW_ID_FILEMENU_YESNO_OPTIONS, baseX + cursorGoalXOffset, baseY + cursorGoalYOffset); + filemenu_set_cursor_goal_pos(WIN_FILES_CONFIRM_OPTIONS, baseX + cursorGoalXOffset, baseY + cursorGoalYOffset); } } @@ -257,16 +257,16 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { case 0: filemenu_currentMenu = 2; filemenu_menus[filemenu_currentMenu]->page = 0; - gWindows[WINDOW_ID_FILEMENU_INFO].width = 182; - gWindows[WINDOW_ID_FILEMENU_INFO].height = 25; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2) - : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2; - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + gWindows[WIN_FILES_MESSAGE].width = 182; + gWindows[WIN_FILES_MESSAGE].height = 25; + gWindows[WIN_FILES_MESSAGE].pos.x = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_MESSAGE].width / 2; + gWindows[WIN_FILES_MESSAGE].pos.y = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].height / 2) + : SCREEN_HEIGHT / 2) - gWindows[WIN_FILES_MESSAGE].height / 2; + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); slot = filemenu_menus[0]->selected; for (i = 0; i < ARRAY_COUNT(gSaveSlotMetadata->filename); i++) { @@ -281,16 +281,16 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { case 3: filemenu_currentMenu = 2; filemenu_menus[filemenu_currentMenu]->page = 2; - gWindows[WINDOW_ID_FILEMENU_INFO].width = 154; - gWindows[WINDOW_ID_FILEMENU_INFO].height = 39; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2) - : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2; - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + gWindows[WIN_FILES_MESSAGE].width = 154; + gWindows[WIN_FILES_MESSAGE].height = 39; + gWindows[WIN_FILES_MESSAGE].pos.x = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_MESSAGE].width / 2; + gWindows[WIN_FILES_MESSAGE].pos.y = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].height / 2) + : SCREEN_HEIGHT / 2) - gWindows[WIN_FILES_MESSAGE].height / 2; + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); fio_load_game(filemenu_loadedFileIdx); gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx]; fio_save_game(filemenu_iterFileIdx); @@ -299,16 +299,16 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { case 1: filemenu_currentMenu = 2; filemenu_menus[filemenu_currentMenu]->page = 1; - gWindows[WINDOW_ID_FILEMENU_INFO].width = 153; - gWindows[WINDOW_ID_FILEMENU_INFO].height = 25; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2) - : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2; - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + gWindows[WIN_FILES_MESSAGE].width = 153; + gWindows[WIN_FILES_MESSAGE].height = 25; + gWindows[WIN_FILES_MESSAGE].pos.x = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_MESSAGE].width / 2; + gWindows[WIN_FILES_MESSAGE].pos.y = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].height / 2) + : SCREEN_HEIGHT / 2) - gWindows[WIN_FILES_MESSAGE].height / 2; + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); gSaveSlotMetadata[filemenu_menus[0]->selected] = gSaveSlotMetadata[gGameStatusPtr->saveSlot]; fio_save_game(filemenu_menus[0]->selected); gSaveSlotHasData[filemenu_menus[0]->selected] = TRUE; @@ -327,31 +327,31 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { } fio_save_game(slot2); gSaveSlotHasData[slot2] = TRUE; - set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32)filemenu_update_hidden_name_input); - set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_hidden_name_input); - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + set_window_update(WIN_FILES_INPUT_FIELD, (s32)filemenu_update_hidden_name_input); + set_window_update(WIN_FILES_INPUT_KEYBOARD, (s32)filemenu_update_hidden_name_input); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); filemenu_currentMenu = 2; filemenu_menus[2]->page = 3; - gWindows[WINDOW_ID_FILEMENU_INFO].width = 184; - gWindows[WINDOW_ID_FILEMENU_INFO].height = 25; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2) - : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2; - gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1) - ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2) - : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2; - set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW); + gWindows[WIN_FILES_MESSAGE].width = 184; + gWindows[WIN_FILES_MESSAGE].height = 25; + gWindows[WIN_FILES_MESSAGE].pos.x = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].width / 2) + : SCREEN_WIDTH / 2) - gWindows[WIN_FILES_MESSAGE].width / 2; + gWindows[WIN_FILES_MESSAGE].pos.y = ((gWindows[WIN_FILES_MESSAGE].parent != -1) + ? (gWindows[gWindows[WIN_FILES_MESSAGE].parent].height / 2) + : SCREEN_HEIGHT / 2) - gWindows[WIN_FILES_MESSAGE].height / 2; + set_window_update(WIN_FILES_MESSAGE, WINDOW_UPDATE_SHOW); break; case 4: slot3 = filemenu_menus[0]->selected; @@ -373,28 +373,28 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { case 1: case 3: filemenu_currentMenu = 0; - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); break; case 2: filemenu_currentMenu = 3; - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); break; case 4: filemenu_currentMenu = 0; slot4 = filemenu_menus[0]->selected; - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(slot4 + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(slot4 + WIN_FILES_SLOT1_BODY, (s32)filemenu_update_deselect_file); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, WINDOW_UPDATE_HIDE); break; } break; @@ -412,28 +412,28 @@ void filemenu_yesno_handle_input(MenuPanel* menu) { case 1: case 3: filemenu_currentMenu = 0; - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); break; case 2: filemenu_currentMenu = 3; - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, (s32)filemenu_update_hidden_name_confirm); break; case 4: filemenu_currentMenu = 0; slot = filemenu_menus[0]->selected; - set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation); - set_window_update(slot + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file); - set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE); + set_window_update(WIN_FILES_TITLE, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_STEREO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_MONO, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_CENTER, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_OPTION_LEFT, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT1_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT2_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT3_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(WIN_FILES_SLOT4_BODY, (s32)filemenu_update_show_with_rotation); + set_window_update(slot + WIN_FILES_SLOT1_BODY, (s32)filemenu_update_deselect_file); + set_window_update(WIN_FILES_CONFIRM_OPTIONS, WINDOW_UPDATE_HIDE); break; } } diff --git a/src/inventory.c b/src/inventory.c index 7ab6285c4a..3005395100 100644 --- a/src/inventory.c +++ b/src/inventory.c @@ -1189,7 +1189,7 @@ void update_coin_counter(void) { return; } - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_hidden_window_update); + set_window_update(WIN_CURRENCY_COUNTER, (s32)basic_hidden_window_update); statusBar->coinCountDisposeTime = 15; ShowingCoinCounter = FALSE; HidingCoinCounter = TRUE; @@ -1209,7 +1209,7 @@ void show_coin_counter(void) { // if a coin counter is already visible, dispose of previous counter and reset state if (ShowingCoinCounter || HidingCoinCounter) { - set_window_update(WINDOW_ID_CURRENCY_COUNTER, WINDOW_UPDATE_HIDE); + set_window_update(WIN_CURRENCY_COUNTER, WINDOW_UPDATE_HIDE); if (statusBar->iconIndex12 > -1) { hud_element_free(statusBar->coinCountTimesHID); hud_element_free(statusBar->coinCountIconHID); @@ -1222,8 +1222,8 @@ void show_coin_counter(void) { } if (statusBar->coinCounterHideDelay == 0) { - set_window_properties(WINDOW_ID_CURRENCY_COUNTER, 32, 164, 64, 20, WINDOW_PRIORITY_21, coin_counter_draw_content, 0, -1); - set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update); + set_window_properties(WIN_CURRENCY_COUNTER, 32, 164, 64, 20, WINDOW_PRIORITY_21, coin_counter_draw_content, 0, -1); + set_window_update(WIN_CURRENCY_COUNTER, (s32)basic_window_update); statusBar->coinCountTimesHID = hid = hud_element_create(&HES_MenuTimes); hud_element_set_flags(hid, HUD_ELEMENT_FLAG_80); hud_element_set_tint(hid, 255, 255, 255); diff --git a/src/item_entity.c b/src/item_entity.c index 16f58cfcc7..0b9a722ce5 100644 --- a/src/item_entity.c +++ b/src/item_entity.c @@ -2229,9 +2229,9 @@ void update_item_entity_pickup(ItemEntity* item) { } if (item->state == ITEM_PICKUP_STATE_SHOW_TOO_MANY) { func_801363A0(item); - set_window_update(WINDOW_ID_12, (s32) basic_window_update); - set_window_update(WINDOW_ID_17, (s32) basic_window_update); - set_window_update(WINDOW_ID_19, (s32) basic_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_window_update); + set_window_update(WIN_POPUP_TITLE_B, (s32) basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_window_update); } increment_status_bar_disabled(); ItemPickupStateDelay = 10; @@ -2290,9 +2290,9 @@ void update_item_entity_pickup(ItemEntity* item) { if (ItemPickupStateDelay == 6) { func_801363A0(item); - set_window_update(WINDOW_ID_12, (s32) basic_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_window_update); if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) { - set_window_update(WINDOW_ID_19, (s32) basic_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_window_update); } } @@ -2316,14 +2316,14 @@ void update_item_entity_pickup(ItemEntity* item) { if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) { ItemPickupGotOutline->data.gotItemOutline->timeLeft = 10; } - set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_DESC, (s32) basic_hidden_window_update); item->state = ITEM_PICKUP_STATE_HIDE_GOT_ITEM; } break; case ITEM_PICKUP_STATE_HIDE_GOT_ITEM: - if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) && - !(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION)) + if (!(gWindows[WIN_PICKUP_HEADER].flags & WINDOW_FLAG_INITIAL_ANIMATION) && + !(gWindows[WIN_POPUP_DESC].flags & WINDOW_FLAG_INITIAL_ANIMATION)) { item->state = ITEM_PICKUP_STATE_CHECK_TUTORIALS; } @@ -2402,16 +2402,16 @@ void update_item_entity_pickup(ItemEntity* item) { menu->numEntries = numEntries; menu->initialPos = 0; create_standard_popup_menu(menu); - set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_17, (s32) basic_hidden_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_hidden_window_update); + set_window_update(WIN_POPUP_TITLE_B, (s32) basic_hidden_window_update); ItemPickupStateDelay = 0; item->state = ITEM_PICKUP_STATE_HIDE_TOO_MANY; } break; case ITEM_PICKUP_STATE_HIDE_TOO_MANY: - if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) && - !(gWindows[WINDOW_ID_17].flags & WINDOW_FLAG_INITIAL_ANIMATION) && - !(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION)) + if (!(gWindows[WIN_PICKUP_HEADER].flags & WINDOW_FLAG_INITIAL_ANIMATION) && + !(gWindows[WIN_POPUP_TITLE_B].flags & WINDOW_FLAG_INITIAL_ANIMATION) && + !(gWindows[WIN_POPUP_DESC].flags & WINDOW_FLAG_INITIAL_ANIMATION)) { item->state = ITEM_PICKUP_STATE_AWAIT_THROW_AWAY; } @@ -2449,21 +2449,21 @@ void update_item_entity_pickup(ItemEntity* item) { } suggest_player_anim_always_forward(ANIM_MarioW1_Lift); func_801363A0(item); - set_window_update(WINDOW_ID_12, (s32) basic_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_window_update); ItemPickupStateDelay = 50; item->state = ITEM_PICKUP_STATE_SHOW_THREW_AWAY; } break; case ITEM_PICKUP_STATE_SHOW_THREW_AWAY: if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) { - set_window_update(WINDOW_ID_12, (s32) basic_hidden_window_update); + set_window_update(WIN_PICKUP_HEADER, (s32) basic_hidden_window_update); item->state = ITEM_PICKUP_STATE_HIDE_THREW_AWAY; } break; case ITEM_PICKUP_STATE_HIDE_THREW_AWAY: - if (!(gWindows[WINDOW_ID_12].flags & WINDOW_FLAG_INITIAL_ANIMATION) && - !(gWindows[WINDOW_ID_17].flags & WINDOW_FLAG_INITIAL_ANIMATION) && - !(gWindows[WINDOW_ID_19].flags & WINDOW_FLAG_INITIAL_ANIMATION)) + if (!(gWindows[WIN_PICKUP_HEADER].flags & WINDOW_FLAG_INITIAL_ANIMATION) && + !(gWindows[WIN_POPUP_TITLE_B].flags & WINDOW_FLAG_INITIAL_ANIMATION) && + !(gWindows[WIN_POPUP_DESC].flags & WINDOW_FLAG_INITIAL_ANIMATION)) { item->state = ITEM_PICKUP_STATE_THROW_AWAY_DONE; } @@ -2576,23 +2576,23 @@ void func_801363A0(ItemEntity* item) { && !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES) && item->itemID != ITEM_STAR_PIECE) ) { - set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, + set_window_properties(WIN_PICKUP_HEADER, posX, posY - 24 + offsetY, width, HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_WORLD_USABLE){ - set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, + set_window_properties(WIN_PICKUP_HEADER, posX, posY - 24 + offsetY, width, HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } else { - set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width, + set_window_properties(WIN_PICKUP_HEADER, posX, posY - 24 + offsetY, width, HT_VAR1, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); } if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) { posX = X_VAR1; - set_window_properties(WINDOW_ID_19, posX, 186, WD_VAR4, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1); + set_window_properties(WIN_POPUP_DESC, posX, 186, WD_VAR4, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1); } if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) { width = get_msg_width(MSG_Menus_0060, 0) + 24; posX = 160 - width / 2; - set_window_properties(WINDOW_ID_17, 160 - width / 2, 36, width, 40, WINDOW_PRIORITY_0, draw_content_cant_carry_more, item, -1); + set_window_properties(WIN_POPUP_TITLE_B, 160 - width / 2, 36, width, 40, WINDOW_PRIORITY_0, draw_content_cant_carry_more, item, -1); } break; case ITEM_PICKUP_STATE_AWAIT_THROW_AWAY: @@ -2603,7 +2603,7 @@ void func_801363A0(ItemEntity* item) { width = get_msg_width(MSG_Menus_005F, 0) + 54; #endif posX = 160 - width / 2; - set_window_properties(WINDOW_ID_12, 160 - width / 2, 76, width, 40, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); + set_window_properties(WIN_PICKUP_HEADER, 160 - width / 2, 76, width, 40, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1); break; } } diff --git a/src/model.c b/src/model.c index 3143c0a599..285112fc50 100644 --- a/src/model.c +++ b/src/model.c @@ -4392,7 +4392,7 @@ s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* sc // Every nonnegative value of `depthQueryID` must be unique within a frame, otherwise the result will corrupt the data // of the previous query that shared the same ID. // Occlusion visibility checks are always one frame out of date, as they reference the previous frame's depth buffer. -s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY) { +b32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY) { Camera* camera = &gCameras[gCurrentCameraID]; f32 outX; f32 outY; diff --git a/src/pause/pause_badges.c b/src/pause/pause_badges.c index ad306e0f5c..e79a3f3198 100644 --- a/src/pause/pause_badges.c +++ b/src/pause/pause_badges.c @@ -93,7 +93,7 @@ extern u8 D_PAL_80271B2C[]; MenuWindowBP gPauseBadgesWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_BADGES, + .windowID = WIN_PAUSE_BADGES, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -101,7 +101,7 @@ MenuWindowBP gPauseBadgesWindowBPs[] = { .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_badges_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_16 } @@ -784,9 +784,9 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width } if (gPauseBadgesCurrentScrollPos != gPauseBadgesTargetScrollPos) { - pause_set_cursor_pos_immediate(WINDOW_ID_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); + pause_set_cursor_pos_immediate(WIN_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); } else { - pause_set_cursor_pos(WINDOW_ID_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); + pause_set_cursor_pos(WIN_PAUSE_BADGES, baseX + 93 + cursorOffsetX, baseY + 23 + cursorOffsetY); } } } diff --git a/src/pause/pause_items.c b/src/pause/pause_items.c index 9e9584d2f3..ff7f687652 100644 --- a/src/pause/pause_items.c +++ b/src/pause/pause_items.c @@ -35,7 +35,7 @@ HudScript* gPauseItemsHudScripts[] = { }; MenuWindowBP gPauseItemsWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_ITEMS, + .windowID = WIN_PAUSE_ITEMS, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -43,7 +43,7 @@ MenuWindowBP gPauseItemsWindowBPs[] = { .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_items_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_19 } @@ -330,7 +330,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, if (gPauseMenuCurrentTab == 3) { if (gPauseItemsLevel == 0) { - pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 12, baseY + 26 + gPauseItemsCurrentTab * 32); + pause_set_cursor_pos(WIN_PAUSE_ITEMS, baseX + 12, baseY + 26 + gPauseItemsCurrentTab * 32); } else { selectedPosX = pause_items_get_pos_x(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols); selectedPosY = pause_items_get_pos_y(gPauseItemsCurrentPage, gPauseItemsSelectedIndex - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols); @@ -343,9 +343,9 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, } if (gPauseItemsCurrentScrollPos != gPauseItemsTargetScrollPos) { - pause_set_cursor_pos_immediate(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY); + pause_set_cursor_pos_immediate(WIN_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY); } else { - pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY); + pause_set_cursor_pos(WIN_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY); } } } diff --git a/src/pause/pause_main.c b/src/pause/pause_main.c index dfbc83f1f7..a564288cb3 100644 --- a/src/pause/pause_main.c +++ b/src/pause/pause_main.c @@ -132,7 +132,7 @@ Vp gPauseTutorialViewport = { s32 gPauseTutorialScrollPos = 0; MenuWindowBP gPauseCommonWindowsBPs[] = { { - .windowID = WINDOW_ID_PAUSE_MAIN, + .windowID = WIN_PAUSE_MAIN, .unk_01 = 0, .pos = { .x = 12, .y = 20 }, .width = 296, @@ -140,13 +140,13 @@ MenuWindowBP gPauseCommonWindowsBPs[] = { .priority = 0, .fpDrawContents = &pause_main_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_NONE, + .parentID = WIN_NONE, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = WINDOW_FLAG_40, .style = { .customStyle = &gPauseWS_0 } }, { - .windowID = WINDOW_ID_PAUSE_TUTORIAL, + .windowID = WIN_PAUSE_TUTORIAL, .unk_01 = 0, .pos = { .x = 0, .y = 138 }, .width = 296, @@ -154,13 +154,13 @@ MenuWindowBP gPauseCommonWindowsBPs[] = { .priority = 0, .fpDrawContents = &pause_tutorial_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_2 } }, { - .windowID = WINDOW_ID_PAUSE_DECRIPTION, + .windowID = WIN_PAUSE_DECRIPTION, .unk_01 = 0, .pos = { .x = 20, .y = 164 }, .width = 256, @@ -168,13 +168,13 @@ MenuWindowBP gPauseCommonWindowsBPs[] = { .priority = 0, .fpDrawContents = &pause_textbox_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = &basic_window_update }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_1 } }, { - .windowID = WINDOW_ID_PAUSE_CURSOR, + .windowID = WIN_PAUSE_CURSOR, .unk_01 = 0, .pos = { .x = 0, .y = 0 }, .width = SCREEN_WIDTH, @@ -182,7 +182,7 @@ MenuWindowBP gPauseCommonWindowsBPs[] = { .priority = 0, .fpDrawContents = &pause_draw_cursor, .tab = NULL, - .parentID = WINDOW_ID_NONE, + .parentID = WIN_NONE, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_0 } @@ -202,15 +202,15 @@ void pause_set_cursor_pos_immediate(s32 windowID, s32 posX, s32 posY) { if (D_8024EFB4 != 0) { s32 i; - for (i = WINDOW_ID_PAUSE_MAIN; i < WINDOW_ID_PAUSE_CURSOR; i++) { + for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) { Window* window = &gWindows[i]; s8 parent = window->parent; - if ((parent == WINDOW_ID_NONE || parent == WINDOW_ID_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { + if ((parent == WIN_NONE || parent == WIN_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } - if (i >= WINDOW_ID_PAUSE_CURSOR) { + if (i >= WIN_PAUSE_CURSOR) { D_8024EFB4 = 0; } } @@ -236,11 +236,11 @@ void pause_set_cursor_pos(s32 windowID, s32 posX, s32 posY) { if (D_8024EFB4 != 0) { s32 i; - for (i = WINDOW_ID_PAUSE_MAIN; i < WINDOW_ID_PAUSE_CURSOR; i++) { + for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) { Window* window = &gWindows[i]; s8 parent = window->parent; - if ((parent == -1 || parent == WINDOW_ID_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { + if ((parent == -1 || parent == WIN_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } @@ -645,26 +645,26 @@ void pause_init(void) { posX = 225; for (i = 6; i > 0; i--) { if (!gPausePanels[i]->initialized) { - set_window_update(WINDOW_ID_PAUSE_TUTORIAL + i, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_TUTORIAL + i, WINDOW_UPDATE_HIDE); } else { - gWindows[WINDOW_ID_PAUSE_TUTORIAL + i].pos.x = posX + 14; + gWindows[WIN_PAUSE_TUTORIAL + i].pos.x = posX + 14; posX -= 45; } } - pauseWindows = &gWindows[WINDOW_ID_PAUSE_TAB_STATS]; + pauseWindows = &gWindows[WIN_PAUSE_TAB_STATS]; x = pauseWindows[gPausePanels[0]->col].pos.x; - gWindows[WINDOW_ID_PAUSE_TAB_INVIS].pos.x = x + 6; + gWindows[WIN_PAUSE_TAB_INVIS].pos.x = x + 6; if (evt_get_variable(NULL, GF_Tutorial_Badges)) { for (i = 0; i < ARRAY_COUNT(gPauseTutorialSpriteAnims); i++) { gPauseTutorialSprites[i] = spr_load_npc_sprite(gPauseTutorialSpriteAnims[i][0], gPauseTutorialSpriteAnims[i]); } - set_window_update(WINDOW_ID_PAUSE_TUTORIAL, WINDOW_UPDATE_SHOW); + set_window_update(WIN_PAUSE_TUTORIAL, WINDOW_UPDATE_SHOW); sfx_play_sound(SOUND_MENU_SHOW_CHOICE); } - update_window_hierarchy(WINDOW_ID_PAUSE_CURSOR, 64); + update_window_hierarchy(WIN_PAUSE_CURSOR, 64); } void pause_tutorial_input(s32 *pressed, s32 *held) { @@ -820,10 +820,10 @@ void pause_cleanup(void) { } } - for (i = WINDOW_ID_PAUSE_MAIN; i < WINDOW_ID_PAUSE_CURSOR; i++) + for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) set_window_update(i, WINDOW_UPDATE_HIDE); - set_window_update(WINDOW_ID_PAUSE_CURSOR, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_CURSOR, WINDOW_UPDATE_HIDE); } s32 pause_get_total_equipped_bp_cost(void) { diff --git a/src/pause/pause_map.c b/src/pause/pause_map.c index 39c0cb4a12..cac9fa5bde 100644 --- a/src/pause/pause_map.c +++ b/src/pause/pause_map.c @@ -40,7 +40,7 @@ s32 D_8024FA34 = -1; s32 PauseMapArrowWobble[] = { 0, 2, 3, 3, 4, 4, 4, 4, 3, 2, 1, 0 }; MenuWindowBP PauseMapWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_MAP, + .windowID = WIN_PAUSE_MAP, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -48,13 +48,13 @@ MenuWindowBP PauseMapWindowBPs[] = { .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_map_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_26 } }, { - .windowID = WINDOW_ID_PAUSE_MAP_TITLE, + .windowID = WIN_PAUSE_MAP_TITLE, .unk_01 = 0, .pos = { .x = MAP_TITLE_X, .y = 124 }, .width = MAP_TITLE_WIDTH, @@ -62,7 +62,7 @@ MenuWindowBP PauseMapWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_map_draw_title, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAP, + .parentID = WIN_PAUSE_MAP, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_28 } @@ -242,7 +242,7 @@ void pause_map_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s currentTab = gPauseMenuCurrentTab; if (currentTab == 6) { - pause_set_cursor_pos(WINDOW_ID_PAUSE_MAP, mapULX + PauseMapTargetX - 8.0f, mapULY + PauseMapTargetY); + pause_set_cursor_pos(WIN_PAUSE_MAP, mapULX + PauseMapTargetX - 8.0f, mapULY + PauseMapTargetY); if (gPauseMenuCurrentTab == currentTab) { offset = PauseMapArrowWobble[gGameStatusPtr->frameCounter % 12]; diff --git a/src/pause/pause_partners.c b/src/pause/pause_partners.c index 3932d2add4..19e2a1930e 100644 --- a/src/pause/pause_partners.c +++ b/src/pause/pause_partners.c @@ -201,7 +201,7 @@ s32 gPausePartnersCurrentPortraitIndex = -1; s32 gPausePartnersNextPortraitIndex = -1; MenuWindowBP gPausePartnersWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_PARTNERS, + .windowID = WIN_PAUSE_PARTNERS, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -209,12 +209,12 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_partners_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_20 } }, { - .windowID = WINDOW_ID_PAUSE_PARTNERS_TITLE, + .windowID = WIN_PAUSE_PARTNERS_TITLE, .unk_01 = 0, .pos = { .x = 8, .y = 103 }, .width = 112, @@ -222,12 +222,12 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_title, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_PARTNERS, + .parentID = WIN_PAUSE_PARTNERS, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_22 } }, { - .windowID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST, + .windowID = WIN_PAUSE_PARTNERS_MOVELIST, .unk_01 = 0, .pos = { .x = 133, .y = 36 }, .width = 140, @@ -235,12 +235,12 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_PARTNERS, + .parentID = WIN_PAUSE_PARTNERS, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { -1 } }, { - .windowID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST_TITLE, + .windowID = WIN_PAUSE_PARTNERS_MOVELIST_TITLE, .unk_01 = 0, .pos = { .x = 12, .y = -6 }, .width = 80, @@ -248,12 +248,12 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist_title, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST, + .parentID = WIN_PAUSE_PARTNERS_MOVELIST, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { -1 } }, { - .windowID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST_FLOWER, + .windowID = WIN_PAUSE_PARTNERS_MOVELIST_FLOWER, .unk_01 = 0, .pos = { .x = 102, .y = -12 }, .width = 32, @@ -261,7 +261,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist_flower, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST, + .parentID = WIN_PAUSE_PARTNERS_MOVELIST, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { -1 } @@ -380,7 +380,7 @@ void pause_partners_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid currentTab = gPauseMenuCurrentTab; if (currentTab == 4) { if (gPausePartnersLevel == 0) { - pause_set_cursor_pos(WINDOW_ID_PAUSE_PARTNERS, baseX + 42, baseY + 88); + pause_set_cursor_pos(WIN_PAUSE_PARTNERS, baseX + 42, baseY + 88); } if (gPauseMenuCurrentTab == currentTab && gPausePartnersLevel == 0) { @@ -564,7 +564,7 @@ void pause_partners_draw_movelist(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid } if (gPauseMenuCurrentTab == 4 && gPausePartnersLevel == 1) { - pause_set_cursor_pos(WINDOW_ID_PAUSE_PARTNERS_MOVELIST, baseX - 2, baseY + 28 + gPausePartnersSelectedMove * 13); + pause_set_cursor_pos(WIN_PAUSE_PARTNERS_MOVELIST, baseX - 2, baseY + 28 + gPausePartnersSelectedMove * 13); } } @@ -599,7 +599,7 @@ void pause_partners_init(MenuPanel* panel) { } if (gPausePartnersNumPartners == 0) { - set_window_update(WINDOW_ID_PAUSE_PARTNERS, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_PARTNERS, WINDOW_UPDATE_HIDE); panel->initialized = FALSE; return; } @@ -619,11 +619,11 @@ void pause_partners_init(MenuPanel* panel) { setup_pause_menu_tab(gPausePartnersWindowBPs, ARRAY_COUNT(gPausePartnersWindowBPs)); #if VERSION_PAL - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST_TITLE].width = D_PAL_80271B50[gCurrentLanguage]; - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST_TITLE].pos.x = D_PAL_80271B4C[gCurrentLanguage]; - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST].width = D_PAL_80271B40[gCurrentLanguage]; - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST].pos.x = D_PAL_80271B3C[gCurrentLanguage]; - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST_FLOWER].pos.x = D_PAL_80271B48[gCurrentLanguage]; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST_TITLE].width = D_PAL_80271B50[gCurrentLanguage]; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST_TITLE].pos.x = D_PAL_80271B4C[gCurrentLanguage]; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST].width = D_PAL_80271B40[gCurrentLanguage]; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST].pos.x = D_PAL_80271B3C[gCurrentLanguage]; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST_FLOWER].pos.x = D_PAL_80271B48[gCurrentLanguage]; #endif gPausePartnersCurrentPartnerIdx = 0; @@ -695,7 +695,7 @@ void pause_partners_handle_input(MenuPanel* panel) { level = 2; } - gWindows[WINDOW_ID_PAUSE_PARTNERS_MOVELIST].height = level * 13 + 30; + gWindows[WIN_PAUSE_PARTNERS_MOVELIST].height = level * 13 + 30; if (gPausePartnersLevel == 1) { oldPos = gPausePartnersSelectedMove; @@ -730,7 +730,7 @@ void pause_partners_handle_input(MenuPanel* panel) { if ((gPausePressedButtons & BUTTON_A) && gPausePartnersLevel == 0) { gPausePartnersLevel = 1; sfx_play_sound(SOUND_MENU_NEXT); - set_window_update(WINDOW_ID_PAUSE_PARTNERS_MOVELIST, WINDOW_UPDATE_SHOW); + set_window_update(WIN_PAUSE_PARTNERS_MOVELIST, WINDOW_UPDATE_SHOW); return; } @@ -742,7 +742,7 @@ void pause_partners_handle_input(MenuPanel* panel) { } else { gPausePartnersLevel = 0; sfx_play_sound(SOUND_MENU_BACK); - set_window_update(WINDOW_ID_PAUSE_PARTNERS_MOVELIST, WINDOW_UPDATE_HIDE); + set_window_update(WIN_PAUSE_PARTNERS_MOVELIST, WINDOW_UPDATE_HIDE); return; } } diff --git a/src/pause/pause_spirits.c b/src/pause/pause_spirits.c index efb9c48ae3..8e044749fb 100644 --- a/src/pause/pause_spirits.c +++ b/src/pause/pause_spirits.c @@ -99,7 +99,7 @@ Vec2i gPauseSpiritsCursorPositions[] = { }; MenuWindowBP gPauseSpiritsWindowsBPs[] = { { - .windowID = WINDOW_ID_PAUSE_SPIRITS, + .windowID = WIN_PAUSE_SPIRITS, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -107,13 +107,13 @@ MenuWindowBP gPauseSpiritsWindowsBPs[] = { .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_spirits_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_23 } }, { - .windowID = WINDOW_ID_PAUSE_SPIRITS_TITLE, + .windowID = WIN_PAUSE_SPIRITS_TITLE, .unk_01 = 0, .pos = { .x = 86, .y = 124 }, .width = 120, @@ -121,7 +121,7 @@ MenuWindowBP gPauseSpiritsWindowsBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_spirits_draw_title, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_SPIRITS, + .parentID = WIN_PAUSE_SPIRITS, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_24 } @@ -239,7 +239,7 @@ void pause_spirits_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 widt draw_box(0, &gPauseWS_25, baseX + 7, baseY + 14, 0, 272, 126, opacity, darkening, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0, width, height, 0); if (gPauseMenuCurrentTab == 5) { - pause_set_cursor_pos(WINDOW_ID_PAUSE_SPIRITS, baseX + gPauseSpiritsCursorPositions[menu->selected].x, baseY + gPauseSpiritsCursorPositions[menu->selected].y); + pause_set_cursor_pos(WIN_PAUSE_SPIRITS, baseX + gPauseSpiritsCursorPositions[menu->selected].x, baseY + gPauseSpiritsCursorPositions[menu->selected].y); } } diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index beb7fcad24..9abbc33a76 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -131,7 +131,7 @@ s32 D_8024F46C[] = { -1, 1, 2, 4, 5, 7, 8 }; MenuWindowBP gStatsMenuWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_STATS, + .windowID = WIN_PAUSE_STATS, .unk_01 = 0, .pos = { .x = 3, .y = 16 }, .width = 289, @@ -139,7 +139,7 @@ MenuWindowBP gStatsMenuWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_stats_draw_contents, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_HIDE }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_12 } @@ -592,7 +592,7 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, if (gPauseMenuCurrentTab == 1) { StatsEntryData* entry = &gStatsMenuEntries[menu->selected]; - pause_set_cursor_pos(WINDOW_ID_PAUSE_STATS, baseX + entry->cursorX, baseY + entry->cursorY); + pause_set_cursor_pos(WIN_PAUSE_STATS, baseX + entry->cursorX, baseY + entry->cursorY); } } #endif diff --git a/src/pause/pause_tabs.c b/src/pause/pause_tabs.c index 4168048f8f..c7f5f067f6 100644 --- a/src/pause/pause_tabs.c +++ b/src/pause/pause_tabs.c @@ -69,11 +69,11 @@ HudScript* gPauseTabsHudScripts[][6] = { s8 gPauseTabsGridData[] = { 0, 1, 2, 3, 4, 5 }; u8 gPauseTabsPanelIDs[] = { 1, 2, 3, 4, 5, 6 }; -u8 gPauseTabsWindowIDs[] = { WINDOW_ID_PAUSE_TAB_STATS, WINDOW_ID_PAUSE_TAB_BADGES, WINDOW_ID_PAUSE_TAB_ITEMS, WINDOW_ID_PAUSE_TAB_PARTY, WINDOW_ID_PAUSE_TAB_SPIRITS, WINDOW_ID_PAUSE_TAB_MAP }; -u8 gPauseTabsPageWindowIDs[] = { WINDOW_ID_PAUSE_STATS, WINDOW_ID_PAUSE_BADGES, WINDOW_ID_PAUSE_ITEMS, WINDOW_ID_PAUSE_PARTNERS, WINDOW_ID_PAUSE_SPIRITS, WINDOW_ID_PAUSE_MAP }; +u8 gPauseTabsWindowIDs[] = { WIN_PAUSE_TAB_STATS, WIN_PAUSE_TAB_BADGES, WIN_PAUSE_TAB_ITEMS, WIN_PAUSE_TAB_PARTY, WIN_PAUSE_TAB_SPIRITS, WIN_PAUSE_TAB_MAP }; +u8 gPauseTabsPageWindowIDs[] = { WIN_PAUSE_STATS, WIN_PAUSE_BADGES, WIN_PAUSE_ITEMS, WIN_PAUSE_PARTNERS, WIN_PAUSE_SPIRITS, WIN_PAUSE_MAP }; MenuWindowBP gPauseTabsWindowBPs[] = { { - .windowID = WINDOW_ID_PAUSE_TAB_STATS, + .windowID = WIN_PAUSE_TAB_STATS, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -81,13 +81,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_64, .fpDrawContents = pause_tabs_draw_stats, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_3 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_BADGES, + .windowID = WIN_PAUSE_TAB_BADGES, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -95,13 +95,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_badges, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = pause_update_tab_default }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_4 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_ITEMS, + .windowID = WIN_PAUSE_TAB_ITEMS, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -109,13 +109,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_items, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = pause_update_tab_default }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_5 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_PARTY, + .windowID = WIN_PAUSE_TAB_PARTY, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -123,13 +123,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_party, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = pause_update_tab_default }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_6 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_SPIRITS, + .windowID = WIN_PAUSE_TAB_SPIRITS, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -137,13 +137,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_spirits, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = pause_update_tab_default }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_7 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_MAP, + .windowID = WIN_PAUSE_TAB_MAP, .unk_01 = 0, .pos = { .x = 0, .y = 7 }, .width = 43, @@ -151,13 +151,13 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_map, .tab = NULL, - .parentID = WINDOW_ID_PAUSE_MAIN, + .parentID = WIN_PAUSE_MAIN, .fpUpdate = { .func = pause_update_tab_default }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_8 } }, { - .windowID = WINDOW_ID_PAUSE_TAB_INVIS, + .windowID = WIN_PAUSE_TAB_INVIS, .unk_01 = 0, .pos = { .x = 8, .y = 8 }, .width = 16, @@ -165,7 +165,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .priority = WINDOW_PRIORITY_64, .fpDrawContents = pause_tabs_draw_invis, .tab = NULL, - .parentID = WINDOW_ID_NONE, + .parentID = WIN_NONE, .fpUpdate = { WINDOW_UPDATE_SHOW }, .extraFlags = 0, .style = { .customStyle = &gPauseWS_9 } @@ -213,7 +213,7 @@ void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 hud_element_set_render_pos(gPauseTabsHIDs[0], baseX + 22, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[0]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_STATS) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_STATS) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -231,7 +231,7 @@ void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s3 hud_element_set_render_pos(gPauseTabsHIDs[1], baseX + 22, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[1]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_BADGES) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_BADGES) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -249,7 +249,7 @@ void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 hud_element_set_render_pos(gPauseTabsHIDs[2], baseX + 22, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[2]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_ITEMS) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_ITEMS) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -267,7 +267,7 @@ void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 hud_element_set_render_pos(gPauseTabsHIDs[3], baseX + 22, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[3]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_PARTY) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_PARTY) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -285,7 +285,7 @@ void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s hud_element_set_render_pos(gPauseTabsHIDs[4], baseX + 22, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[4]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_SPIRITS) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_SPIRITS) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -303,7 +303,7 @@ void pause_tabs_draw_map(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 h hud_element_set_render_pos(gPauseTabsHIDs[5], baseX + 23, baseY + 7); hud_element_draw_without_clipping(gPauseTabsHIDs[5]); if (gPauseMenuCurrentTab == 0) { - if (gPauseTabsWindowIDs[menu->col] == WINDOW_ID_PAUSE_TAB_MAP) { + if (gPauseTabsWindowIDs[menu->col] == WIN_PAUSE_TAB_MAP) { pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX + TABS_CURSOR_OFFSET_X, baseY + 6); } } @@ -322,7 +322,7 @@ void pause_tabs_init(MenuPanel* tab) { } setup_pause_menu_tab(gPauseTabsWindowBPs, ARRAY_COUNT(gPauseTabsWindowBPs)); - gWindows[WINDOW_ID_PAUSE_TAB_INVIS].pos.y = 25; + gWindows[WIN_PAUSE_TAB_INVIS].pos.y = 25; gPauseTabsHorizScrollPos = 0; tab->initialized = TRUE; gPauseTabsPreviousTab = 5; @@ -358,10 +358,10 @@ void pause_tabs_handle_input(MenuPanel* tab) { replace_window_update(gPauseTabsWindowIDs[tab->col], 0x40, pause_update_tab_active); replace_window_update(gPauseTabsWindowIDs[gPauseTabsCurrentTab], 0x40, pause_update_tab_inactive); - pauseWindows = &gWindows[WINDOW_ID_PAUSE_TAB_STATS]; + pauseWindows = &gWindows[WIN_PAUSE_TAB_STATS]; x = pauseWindows[tab->col].pos.x; - gWindows[WINDOW_ID_PAUSE_TAB_INVIS].pos.x = x + 6; - gWindows[WINDOW_ID_PAUSE_TAB_INVIS].pos.y = 25; + gWindows[WIN_PAUSE_TAB_INVIS].pos.x = x + 6; + gWindows[WIN_PAUSE_TAB_INVIS].pos.y = 25; gPauseTabsPreviousTab = gPauseTabsCurrentTab; gPauseTabsCurrentTab = tab->col; sfx_play_sound(SOUND_MENU_CHANGE_TAB); diff --git a/src/state_file_select.c b/src/state_file_select.c index a9a199659f..57ca95beba 100644 --- a/src/state_file_select.c +++ b/src/state_file_select.c @@ -126,7 +126,7 @@ void state_step_language_select(void) { gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME; } else { gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME; - set_windows_visible(WINDOW_GROUP_FILE_MENU); + set_windows_visible(WINDOW_GROUP_FILES); D_800A0930 = 1; D_800A0931 = 3; } @@ -183,7 +183,7 @@ void state_step_file_select(void) { switch (D_800A0931) { case 1: - set_windows_visible(WINDOW_GROUP_FILE_MENU); + set_windows_visible(WINDOW_GROUP_FILES); D_800A0930 = temp; D_800A0931 = 2; break; @@ -388,7 +388,7 @@ void state_step_exit_file_select(void) { for (i = 44; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; - if (window->parent == WINDOW_ID_FILEMENU_MAIN || window->parent == -1) { + if (window->parent == WIN_FILES_MAIN || window->parent == -1) { flagSum += window->flags & WINDOW_FLAG_INITIAL_ANIMATION; } } diff --git a/src/111f0_len_860.c b/src/state_map_transitions.c similarity index 100% rename from src/111f0_len_860.c rename to src/state_map_transitions.c diff --git a/src/state_pause.c b/src/state_pause.c index ecddbc0336..d411184c64 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -49,7 +49,7 @@ void state_init_pause(void) { StepPauseAlpha = 0; disable_player_input(); set_time_freeze_mode(TIME_FREEZE_POPUP_MENU); - set_windows_visible(WINDOW_GROUP_PAUSE_MENU); + set_windows_visible(WINDOW_GROUP_PAUSE); } extern Addr D_80200000; diff --git a/src/status_icons.c b/src/status_icons.c index 0bf1904fc6..6064fcc68e 100644 --- a/src/status_icons.c +++ b/src/status_icons.c @@ -248,7 +248,7 @@ void update_merlee_message(void* data) { } if (closeMessage) { - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_HIDE); D_800A0F40 = 0; dispose_merlee_message(popup); } @@ -294,8 +294,8 @@ void draw_merlee_message(void* data) { width = get_msg_width(messageID, 0) + 23; xPos = 160 - (width / 2); height = 45; - set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; @@ -306,8 +306,8 @@ void draw_merlee_message(void* data) { width = get_msg_width(messageID, 0) + 23; xPos = 160 - (width / 2); height = 28; - set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } break; } @@ -322,8 +322,8 @@ void draw_merlee_message(void* data) { messageID = D_80078168[popup->messageIndex]; width = get_msg_width(messageID, 0) + 30; xPos = 160 - (width / 2); - set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, D_80078160[get_msg_lines(messageID) - 1], 0, draw_merlee_message_string, popup, -1); - set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); + set_window_properties(WIN_BTL_POPUP, xPos, 80, width, D_80078160[get_msg_lines(messageID) - 1], 0, draw_merlee_message_string, popup, -1); + set_window_update(WIN_BTL_POPUP, WINDOW_UPDATE_SHOW); } #endif } diff --git a/src/windows.c b/src/windows.c index 119e1221e9..19d37fc5db 100644 --- a/src/windows.c +++ b/src/windows.c @@ -126,10 +126,10 @@ u8 gWindowDisappearFlags[] = { DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, 0 }; WindowGroup gWindowGroups[] = { - { WINDOW_ID_0, WINDOW_ID_FILEMENU_FILE3_TITLE }, // all windows - { WINDOW_ID_8, WINDOW_ID_BATTLE_POPUP }, // battle ? - { WINDOW_ID_PAUSE_MAIN, WINDOW_ID_PAUSE_TAB_INVIS }, // pause menu - { WINDOW_ID_FILEMENU_MAIN, WINDOW_ID_FILEMENU_FILE3_TITLE } // file menu + { WIN_UNUSED_0, WIN_FILES_SLOT4_TITLE }, // all windows + { WIN_BTL_DESC_BOX, WIN_BTL_POPUP }, // battle ? + { WIN_PAUSE_MAIN, WIN_PAUSE_TAB_INVIS }, // pause menu + { WIN_FILES_MAIN, WIN_FILES_SLOT4_TITLE } // file menu }; void clear_windows(void) { @@ -375,7 +375,7 @@ void render_window_root(void) { gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); - render_windows(priorityArray, WINDOW_ID_NONE, 0, 0, 0, 255, 0, NULL); + render_windows(priorityArray, WIN_NONE, 0, 0, 0, 255, 0, NULL); } void set_window_properties(s32 windowID, s32 posX, s32 posY, s32 width, s32 height, u8 priority, void* fpDrawContents, void* drawContentsArg0, s8 parent) { diff --git a/src/world/area_kkj/kkj_19/main.c b/src/world/area_kkj/kkj_19/main.c index b3fd8bfc14..c2798debba 100644 --- a/src/world/area_kkj/kkj_19/main.c +++ b/src/world/area_kkj/kkj_19/main.c @@ -42,11 +42,11 @@ API_CALLABLE(N(TryOpenIngredientWindows)) { void N(worker_update_ingredient_windows)(void) { if (N(IngredientWindowsOpen)) { - set_window_update(WINDOW_ID_ITEM_INFO_NAME, (s32)basic_window_update); - set_window_update(WINDOW_ID_ITEM_INFO_DESC, (s32)basic_window_update); + set_window_update(WIN_SHOP_ITEM_NAME, (s32)basic_window_update); + set_window_update(WIN_SHOP_ITEM_DESC, (s32)basic_window_update); } else { - set_window_update(WINDOW_ID_ITEM_INFO_NAME, (s32)basic_hidden_window_update); - set_window_update(WINDOW_ID_ITEM_INFO_DESC, (s32)basic_hidden_window_update); + set_window_update(WIN_SHOP_ITEM_NAME, (s32)basic_hidden_window_update); + set_window_update(WIN_SHOP_ITEM_DESC, (s32)basic_hidden_window_update); } if (N(IngredientWindowsDismissTime) > 0) { @@ -111,7 +111,7 @@ WindowStyleCustom N(IngredientNameWS) = { MenuWindowBP N(IngredientWindows)[] = { { - .windowID = WINDOW_ID_ITEM_INFO_NAME, + .windowID = WIN_SHOP_ITEM_NAME, .pos = { 100, 66 }, .width = 120, .height = 28, @@ -124,7 +124,7 @@ MenuWindowBP N(IngredientWindows)[] = { .style = { .customStyle = &N(IngredientNameWS) }, }, { - .windowID = WINDOW_ID_ITEM_INFO_DESC, + .windowID = WIN_SHOP_ITEM_DESC, #if VERSION_JP .pos = { 39, 184 }, .width = 242, diff --git a/src/world/common/enemy/ai/ShyGuyPatrolAI.inc.c b/src/world/common/enemy/ai/ShyGuyPatrolAI.inc.c index 532db1d75a..62c1d1f642 100644 --- a/src/world/common/enemy/ai/ShyGuyPatrolAI.inc.c +++ b/src/world/common/enemy/ai/ShyGuyPatrolAI.inc.c @@ -18,7 +18,7 @@ void N(ShyGuyPatrolAI_15)(Evt* script, MobileAISettings* aiSettings, EnemyDetect Npc* npc = get_npc_unsafe((s32) enemy->npcID); f32 yaw = npc->yaw; - if (ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL) == 0) { + if (!ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL)) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } @@ -37,7 +37,7 @@ void N(ShyGuyPatrolAI_16)(Evt* script, MobileAISettings* aiSettings, EnemyDetect Npc* npc = get_npc_unsafe(enemy->npcID); f32 yaw = npc->yaw; - if (ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL) == 0) { + if (!ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL)) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } diff --git a/src/world/common/enemy/ai/ShyGuyWanderAI.inc.c b/src/world/common/enemy/ai/ShyGuyWanderAI.inc.c index 2e2cd958be..296572a7c0 100644 --- a/src/world/common/enemy/ai/ShyGuyWanderAI.inc.c +++ b/src/world/common/enemy/ai/ShyGuyWanderAI.inc.c @@ -16,7 +16,7 @@ void N(ShyGuyWanderAI_15)(Evt* script, MobileAISettings* aiSettings, EnemyDetect Npc* npc = get_npc_unsafe((s32) enemy->npcID); f32 yaw = npc->yaw; - if (ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL) == 0) { + if (!ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL)) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } @@ -35,7 +35,7 @@ void N(ShyGuyWanderAI_16)(Evt* script, MobileAISettings* aiSettings, EnemyDetect Npc* npc = get_npc_unsafe(enemy->npcID); f32 yaw = npc->yaw; - if (ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL) == 0) { + if (!ai_check_fwd_collisions(npc, npc->moveSpeed, &yaw, NULL, NULL, NULL)) { npc_move_heading(npc, npc->moveSpeed, npc->yaw); } diff --git a/src/world/script_api/shops.c b/src/world/script_api/shops.c index 80a5bbf092..711ee4da41 100644 --- a/src/world/script_api/shops.c +++ b/src/world/script_api/shops.c @@ -810,11 +810,11 @@ void draw_shop_items(void) { ShopItemEntity* shopItemEntities; if (shop->flags & SHOP_FLAG_SHOWING_ITEM_INFO) { - set_window_update(WINDOW_ID_ITEM_INFO_NAME, (s32) basic_window_update); - set_window_update(WINDOW_ID_ITEM_INFO_DESC, (s32) basic_window_update); + set_window_update(WIN_SHOP_ITEM_NAME, (s32) basic_window_update); + set_window_update(WIN_SHOP_ITEM_DESC, (s32) basic_window_update); } else { - set_window_update(WINDOW_ID_ITEM_INFO_NAME, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_ITEM_INFO_DESC, (s32) basic_hidden_window_update); + set_window_update(WIN_SHOP_ITEM_NAME, (s32) basic_hidden_window_update); + set_window_update(WIN_SHOP_ITEM_DESC, (s32) basic_hidden_window_update); } if (shop->flags & SHOP_FLAG_SHOWING_ITEM_INFO) { @@ -949,11 +949,11 @@ API_CALLABLE(MakeShop) { hud_element_set_flags(shop->costHID, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(shop->costHID, HUD_ELEMENT_FLAG_FILTER_TEX); get_worker(create_worker_frontUI(NULL, draw_shop_items)); - set_window_properties(WINDOW_ID_ITEM_INFO_NAME, 100, 66, 120, 28, WINDOW_PRIORITY_0, shop_draw_item_name, NULL, -1); + set_window_properties(WIN_SHOP_ITEM_NAME, 100, 66, 120, 28, WINDOW_PRIORITY_0, shop_draw_item_name, NULL, -1); #if VERSION_JP - set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 39, 184, 242, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); + set_window_properties(WIN_SHOP_ITEM_DESC, 39, 184, 242, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); #else - set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 32, 184, 256, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); + set_window_properties(WIN_SHOP_ITEM_DESC, 32, 184, 256, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); #endif gWindowStyles[10].defaultStyleID = WINDOW_STYLE_9; gWindowStyles[11].defaultStyleID = WINDOW_STYLE_3; diff --git a/src/surfaces.c b/src/world/surfaces.c similarity index 100% rename from src/surfaces.c rename to src/world/surfaces.c diff --git a/ver/ique/splat.yaml b/ver/ique/splat.yaml index 4da9c848eb..9c326f2fa9 100644 --- a/ver/ique/splat.yaml +++ b/ver/ique/splat.yaml @@ -74,7 +74,7 @@ segments: - [auto, c, state_pause] - [auto, c, state_file_select] - [auto, c, state_world] - - [auto, c, 111f0_len_860] + - [auto, c, state_map_transitions] - [auto, c, state_intro] - [auto, c, state_title_screen] - [auto, c, state_demo] @@ -349,7 +349,7 @@ segments: - [auto, c, world/actions] - [auto, c, world/partners] - [auto, c, global_hud_scripts] - - [auto, c, surfaces] + - [auto, c, world/surfaces] - [auto, c, status_star_shimmer] - [auto, c, 8a860_len_3f30] - [auto, c, draw_box] diff --git a/ver/jp/splat.yaml b/ver/jp/splat.yaml index ccae1df2f1..9e00cdd639 100644 --- a/ver/jp/splat.yaml +++ b/ver/jp/splat.yaml @@ -79,7 +79,7 @@ segments: - [auto, c, state_pause] - [auto, c, state_file_select] - [auto, c, state_world] - - [auto, c, 111f0_len_860] + - [auto, c, state_map_transitions] - [auto, c, state_intro] - [auto, c, state_title_screen] - [auto, c, state_demo] @@ -354,7 +354,7 @@ segments: - [auto, c, world/actions] # DUMMY ROM - [auto, c, world/partners] - [auto, c, global_hud_scripts] - - [auto, c, surfaces] + - [auto, c, world/surfaces] - [auto, c, status_star_shimmer] - [auto, c, 8a860_len_3f30] - [auto, c, draw_box] diff --git a/ver/pal/splat.yaml b/ver/pal/splat.yaml index 874c784b6d..993cd38a4f 100644 --- a/ver/pal/splat.yaml +++ b/ver/pal/splat.yaml @@ -52,7 +52,7 @@ segments: - [auto, c, world/actions] # DUMMY ROM - [auto, c, world/partners] - [auto, c, global_hud_scripts] - - [auto, c, surfaces] + - [auto, c, world/surfaces] - [auto, c, status_star_shimmer] - [auto, c, 8a860_len_3f30] - [auto, c, draw_box] diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 29183f2299..1aa710978c 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -123,7 +123,7 @@ segments: - [auto, c, state_pause] - [auto, c, state_file_select] - [auto, c, state_world] - - [auto, c, 111f0_len_860] # possibly still state_world + - [auto, c, state_map_transitions] # possibly still state_world - [auto, c, state_intro] - [auto, c, state_title_screen] - [auto, c, state_demo] @@ -396,7 +396,7 @@ segments: - [auto, c, world/actions] # DUMMY ROM - [auto, c, world/partners] - [auto, c, global_hud_scripts] - - [auto, c, surfaces] + - [auto, c, world/surfaces] - [auto, c, status_star_shimmer] - [auto, c, 8a860_len_3f30] - [auto, c, draw_box]