diff --git a/graphics/pokenav/bg.bin b/graphics/pokenav/bg_dots.bin similarity index 100% rename from graphics/pokenav/bg.bin rename to graphics/pokenav/bg_dots.bin diff --git a/graphics/pokenav/bg.png b/graphics/pokenav/bg_dots.png similarity index 100% rename from graphics/pokenav/bg.png rename to graphics/pokenav/bg_dots.png diff --git a/graphics/pokenav/outline.png b/graphics/pokenav/device_outline.png similarity index 100% rename from graphics/pokenav/outline.png rename to graphics/pokenav/device_outline.png diff --git a/graphics/pokenav/outline_map.bin b/graphics/pokenav/device_outline_map.bin similarity index 100% rename from graphics/pokenav/outline_map.bin rename to graphics/pokenav/device_outline_map.bin diff --git a/include/pokenav.h b/include/pokenav.h index 34692236d..3fc01ede3 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -122,7 +122,7 @@ enum POKENAV_REGION_MAP, POKENAV_CONDITION_PARTY, POKENAV_CONDITION_SEARCH_RESULTS, - POKENAV_MENU_CONDITION_GRAPH_FROM_SEARCH, // opening condition graph from search list + POKENAV_CONDITION_GRAPH_FROM_SEARCH, // opening condition graph from search list POKENAV_RETURN_CONDITION_SEARCH, //return to search list from condition graph POKENAV_MATCH_CALL, POKENAV_RIBBONS_MON_LIST, diff --git a/src/pokenav.c b/src/pokenav.c index 12a13509b..9f9cf7dee 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -142,7 +142,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeSearchResultSubstruct1, .free2 = FreeSearchResultSubstruct2, }, - [POKENAV_MENU_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ConditionGraphFromSearch, .callback = GetPartyConditionCallback, diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index dc845ecab..c0e8c7d6d 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -107,12 +107,12 @@ const struct WindowTemplate sUnusedWindowTemplate2 = const LoopedTask sPartyConditionLoopedTaskFuncs[] = { - [PARTY_CONDITION_FUNC_NONE] = NULL, - [PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons, - [PARTY_CONDITION_FUNC_RETURN] = LoopedTask_ExitPartyConditionMenu, - [PARTY_CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition, - [PARTY_CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut, - [PARTY_CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow, + [PARTY_CONDITION_FUNC_NONE] = NULL, + [PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons, + [PARTY_CONDITION_FUNC_RETURN] = LoopedTask_ExitPartyConditionMenu, + [PARTY_CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition, + [PARTY_CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut, + [PARTY_CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow, [PARTY_CONDITION_FUNC_CLOSE_MARKINGS] = LoopedTask_CloseMonMarkingsWindow }; @@ -139,7 +139,7 @@ struct Pokenav7Struct u8 filler2[0x38ac - 0x2909]; }; -extern s8 GetMonMarkIndex(void); // This function's declaration here is different than its definition in pokenav_unk_6. u8/s8 +extern s8 GetMonMarkIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions_1.c u32 LoopedTask_OpenPartyConditionGraph(s32 state); u32 GetPartyConditionLoopedTaskActive(void); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index c93544c52..196484df7 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -29,7 +29,7 @@ struct PokenavSub7 s32 boxId; s32 monId; u32 conditionDataId; - u32 unk18; + u32 returnFromGraph; u32 isPartyCondition; struct PokenavSub18 *monList; }; @@ -45,7 +45,7 @@ struct PokenavSub8 static u32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr); static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr); -static u32 sub_81CF0B8(struct PokenavSub7 *structPtr); +static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr); static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr); static u32 GetConditionSearchLoopedTask(s32 state); static u32 BuildPartyMonSearchResults(s32 state); @@ -104,12 +104,12 @@ static const struct BgTemplate sConditionSearchResultBgTemplates[] = static const LoopedTask sSearchResultLoopTaskFuncs[] = { - [CONDITION_SEARCH_FUNC_NONE] = NULL, - [CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp, - [CONDITION_SEARCH_FUNC_MOVE_DOWN] = LoopedTask_MoveSearchListCursorDown, - [CONDITION_SEARCH_FUNC_PAGE_UP] = LoopedTask_MoveSearchListPageUp, - [CONDITION_SEARCH_FUNC_PAGE_DOWN] = LoopedTask_MoveSearchListPageDown, - [CONDITION_SEARCH_FUNC_EXIT] = LoopedTask_ExitConditionSearchMenu, + [CONDITION_SEARCH_FUNC_NONE] = NULL, + [CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp, + [CONDITION_SEARCH_FUNC_MOVE_DOWN] = LoopedTask_MoveSearchListCursorDown, + [CONDITION_SEARCH_FUNC_PAGE_UP] = LoopedTask_MoveSearchListPageUp, + [CONDITION_SEARCH_FUNC_PAGE_DOWN] = LoopedTask_MoveSearchListPageDown, + [CONDITION_SEARCH_FUNC_EXIT] = LoopedTask_ExitConditionSearchMenu, [CONDITION_SEARCH_FUNC_SELECT_MON] = LoopedTask_SelectSearchResult }; @@ -140,7 +140,7 @@ bool32 PokenavCallback_Init_ConditionSearch(void) structPtr->callback = HandleConditionSearchInput_WaitSetup; structPtr->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1); - structPtr->unk18 = 0; + structPtr->returnFromGraph = 0; structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; return TRUE; } @@ -154,7 +154,7 @@ bool32 PokenavCallback_Init_ReturnToMonSearchList(void) structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); structPtr->callback = HandleConditionSearchInput; - structPtr->unk18 = 1; + structPtr->returnFromGraph = 1; structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; return TRUE; } @@ -200,7 +200,7 @@ static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr) { structPtr->monList->currIndex = GetSelectedPokenavListIndex(); structPtr->isPartyCondition = 1; - structPtr->callback = sub_81CF0B8; + structPtr->callback = OpenConditionGraphFromSearchList; return CONDITION_SEARCH_FUNC_SELECT_MON; } return CONDITION_SEARCH_FUNC_NONE; @@ -211,15 +211,15 @@ static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr) return POKENAV_CONDITION_SEARCH_MENU; } -static u32 sub_81CF0B8(struct PokenavSub7 *structPtr) +static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr) { - return POKENAV_MENU_CONDITION_GRAPH_FROM_SEARCH; + return POKENAV_CONDITION_GRAPH_FROM_SEARCH; } static u32 sub_81CF0C0(void) { struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return structPtr->unk18; + return structPtr->returnFromGraph; } static struct PokenavMonList * GetSearchResultsMonDataList(void) @@ -339,7 +339,7 @@ static u32 sub_81CF278(s32 state) ptr->monList->monData[i].data = i + 1; } } - ptr->unk18 = 1; + ptr->returnFromGraph = 1; return LT_FINISH; } diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 63426199c..adcd889d3 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -152,22 +152,22 @@ const struct BgTemplate sMatchCallBgTemplates[3] = static const LoopedTask sMatchCallLoopTaskFuncs[] = { - [POKENAV_MC_FUNC_NONE] = NULL, - [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, - [POKENAV_MC_FUNC_UP] = MatchCallListCursorUp, - [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, - [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, - [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, + [POKENAV_MC_FUNC_NONE] = NULL, + [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, + [POKENAV_MC_FUNC_UP] = MatchCallListCursorUp, + [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, + [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, + [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, [POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor, - [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, - [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, - [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, - [POKENAV_MC_FUNC_10] = sub_81CB888, - [POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage, - [POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp, - [POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown, - [POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage, - [POKENAV_MC_FUNC_EXIT] = ExitMatchCall + [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, + [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, + [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, + [POKENAV_MC_FUNC_10] = sub_81CB888, + [POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage, + [POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp, + [POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown, + [POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage, + [POKENAV_MC_FUNC_EXIT] = ExitMatchCall }; static const struct WindowTemplate sMatchCallLocationWindowTemplate = diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index 0e819ecac..d37c897b5 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -81,14 +81,14 @@ static void InitMenuOptionGlow(void); static void Task_CurrentMenuOptionGlow(u8 taskId); static void SetMenuOptionGlow(void); -static const u16 sPokenavBgDotsPal[] = INCBIN_U16("graphics/pokenav/bg.gbapal"); -static const u32 sPokenavBgDotsTiles[] = INCBIN_U32("graphics/pokenav/bg.4bpp.lz"); +static const u16 sPokenavBgDotsPal[] = INCBIN_U16("graphics/pokenav/bg_dots.gbapal"); +static const u32 sPokenavBgDotsTiles[] = INCBIN_U32("graphics/pokenav/bg_dots.4bpp.lz"); static const u32 sPokenavBgDotsTilemap[] = INCBIN_U32("graphics/pokenav/bg.bin.lz"); -static const u16 sPokenavDeviceBgPal[] = INCBIN_U16("graphics/pokenav/outline.gbapal"); -static const u32 sPokenavDeviceBgTiles[] = INCBIN_U32("graphics/pokenav/outline.4bpp.lz"); -static const u32 sPokenavDeviceBgTilemap[] = INCBIN_U32("graphics/pokenav/outline_map.bin.lz"); -static const u16 gUnknown_08620104[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal"); -static const u32 gUnknown_08620124[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz"); +static const u16 sPokenavDeviceBgPal[] = INCBIN_U16("graphics/pokenav/device_outline.gbapal"); +static const u32 sPokenavDeviceBgTiles[] = INCBIN_U32("graphics/pokenav/device_outline.4bpp.lz"); +static const u32 sPokenavDeviceBgTilemap[] = INCBIN_U32("graphics/pokenav/device_outline_map.bin.lz"); +static const u16 sMatchCallBlueLightPal[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal"); +static const u32 sMatchCallBlueLightTiles[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz"); static const struct BgTemplate sPokenavMainMenuBgTemplates[] = { { @@ -118,7 +118,8 @@ static const struct BgTemplate sPokenavMainMenuBgTemplates[] = { } }; -static const LoopedTask sMenuHandlerLoopTaskFuncs[] = { +static const LoopedTask sMenuHandlerLoopTaskFuncs[] = +{ [POKENAV_MENU_FUNC_NONE] = NULL, [POKENAV_MENU_FUNC_MOVE_CURSOR] = LoopedTask_MoveMenuCursor, [POKENAV_MENU_FUNC_OPEN_CONDITION] = LoopedTask_OpenConditionMenu, @@ -138,7 +139,7 @@ static const struct CompressedSpriteSheet sPokenavOptionsSpriteSheets[] = .tag = 0x0003 }, { - .data = gUnknown_08620124, + .data = sMatchCallBlueLightTiles, .size = 0x0100, .tag = 0x0001 } @@ -151,7 +152,7 @@ static const struct SpritePalette sPokenavOptionsSpritePalettes[] = {gPokenavOptions_Pal + 0x20, 6}, {gPokenavOptions_Pal + 0x30, 7}, {gPokenavOptions_Pal + 0x40, 8}, - {gUnknown_08620104, 3}, + {sMatchCallBlueLightPal, 3}, {} }; diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index f33d90e51..203aa19e5 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -159,12 +159,12 @@ static const struct BgTemplate gUnknown_08624B98[] = static const LoopedTask sRibbonsSummaryMenuLoopTaskFuncs[] = { - [RIBBONS_SUMMARY_FUNC_NONE] = NULL, - [RIBBONS_SUMMARY_FUNC_MOVED_CURSOR] = LoopedTask_UpdateRibbonsSummaryInfo, - [RIBBONS_SUMMARY_FUNC_SELECT_RIBBON] = LoopedTask_ExpandSelectedRibbon, + [RIBBONS_SUMMARY_FUNC_NONE] = NULL, + [RIBBONS_SUMMARY_FUNC_MOVED_CURSOR] = LoopedTask_UpdateRibbonsSummaryInfo, + [RIBBONS_SUMMARY_FUNC_SELECT_RIBBON] = LoopedTask_ExpandSelectedRibbon, [RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE] = LoopedTask_MoveRibbonsCursorExpanded, - [RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL] = LoopedTask_ShrinkExpandedRibbon, - [RIBBONS_SUMMARY_FUNC_EXIT] = LoopedTask_ExitRibbonsSummaryMenu + [RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL] = LoopedTask_ShrinkExpandedRibbon, + [RIBBONS_SUMMARY_FUNC_EXIT] = LoopedTask_ExitRibbonsSummaryMenu }; // code