mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
align pokenav task funcs and update some pokenav menu bg gfx files
This commit is contained in:
parent
2b2be90a52
commit
f4909b4d96
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
@ -122,7 +122,7 @@ enum
|
|||||||
POKENAV_REGION_MAP,
|
POKENAV_REGION_MAP,
|
||||||
POKENAV_CONDITION_PARTY,
|
POKENAV_CONDITION_PARTY,
|
||||||
POKENAV_CONDITION_SEARCH_RESULTS,
|
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_RETURN_CONDITION_SEARCH, //return to search list from condition graph
|
||||||
POKENAV_MATCH_CALL,
|
POKENAV_MATCH_CALL,
|
||||||
POKENAV_RIBBONS_MON_LIST,
|
POKENAV_RIBBONS_MON_LIST,
|
||||||
|
@ -142,7 +142,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] =
|
|||||||
.free1 = FreeSearchResultSubstruct1,
|
.free1 = FreeSearchResultSubstruct1,
|
||||||
.free2 = FreeSearchResultSubstruct2,
|
.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,
|
.init = PokenavCallback_Init_ConditionGraphFromSearch,
|
||||||
.callback = GetPartyConditionCallback,
|
.callback = GetPartyConditionCallback,
|
||||||
|
@ -107,12 +107,12 @@ const struct WindowTemplate sUnusedWindowTemplate2 =
|
|||||||
|
|
||||||
const LoopedTask sPartyConditionLoopedTaskFuncs[] =
|
const LoopedTask sPartyConditionLoopedTaskFuncs[] =
|
||||||
{
|
{
|
||||||
[PARTY_CONDITION_FUNC_NONE] = NULL,
|
[PARTY_CONDITION_FUNC_NONE] = NULL,
|
||||||
[PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons,
|
[PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons,
|
||||||
[PARTY_CONDITION_FUNC_RETURN] = LoopedTask_ExitPartyConditionMenu,
|
[PARTY_CONDITION_FUNC_RETURN] = LoopedTask_ExitPartyConditionMenu,
|
||||||
[PARTY_CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition,
|
[PARTY_CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition,
|
||||||
[PARTY_CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut,
|
[PARTY_CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut,
|
||||||
[PARTY_CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow,
|
[PARTY_CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow,
|
||||||
[PARTY_CONDITION_FUNC_CLOSE_MARKINGS] = LoopedTask_CloseMonMarkingsWindow
|
[PARTY_CONDITION_FUNC_CLOSE_MARKINGS] = LoopedTask_CloseMonMarkingsWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ struct Pokenav7Struct
|
|||||||
u8 filler2[0x38ac - 0x2909];
|
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 LoopedTask_OpenPartyConditionGraph(s32 state);
|
||||||
u32 GetPartyConditionLoopedTaskActive(void);
|
u32 GetPartyConditionLoopedTaskActive(void);
|
||||||
|
@ -29,7 +29,7 @@ struct PokenavSub7
|
|||||||
s32 boxId;
|
s32 boxId;
|
||||||
s32 monId;
|
s32 monId;
|
||||||
u32 conditionDataId;
|
u32 conditionDataId;
|
||||||
u32 unk18;
|
u32 returnFromGraph;
|
||||||
u32 isPartyCondition;
|
u32 isPartyCondition;
|
||||||
struct PokenavSub18 *monList;
|
struct PokenavSub18 *monList;
|
||||||
};
|
};
|
||||||
@ -45,7 +45,7 @@ struct PokenavSub8
|
|||||||
|
|
||||||
static u32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr);
|
static u32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr);
|
||||||
static u32 HandleConditionSearchInput(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 ReturnToConditionSearchList(struct PokenavSub7 *structPtr);
|
||||||
static u32 GetConditionSearchLoopedTask(s32 state);
|
static u32 GetConditionSearchLoopedTask(s32 state);
|
||||||
static u32 BuildPartyMonSearchResults(s32 state);
|
static u32 BuildPartyMonSearchResults(s32 state);
|
||||||
@ -104,12 +104,12 @@ static const struct BgTemplate sConditionSearchResultBgTemplates[] =
|
|||||||
|
|
||||||
static const LoopedTask sSearchResultLoopTaskFuncs[] =
|
static const LoopedTask sSearchResultLoopTaskFuncs[] =
|
||||||
{
|
{
|
||||||
[CONDITION_SEARCH_FUNC_NONE] = NULL,
|
[CONDITION_SEARCH_FUNC_NONE] = NULL,
|
||||||
[CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp,
|
[CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp,
|
||||||
[CONDITION_SEARCH_FUNC_MOVE_DOWN] = LoopedTask_MoveSearchListCursorDown,
|
[CONDITION_SEARCH_FUNC_MOVE_DOWN] = LoopedTask_MoveSearchListCursorDown,
|
||||||
[CONDITION_SEARCH_FUNC_PAGE_UP] = LoopedTask_MoveSearchListPageUp,
|
[CONDITION_SEARCH_FUNC_PAGE_UP] = LoopedTask_MoveSearchListPageUp,
|
||||||
[CONDITION_SEARCH_FUNC_PAGE_DOWN] = LoopedTask_MoveSearchListPageDown,
|
[CONDITION_SEARCH_FUNC_PAGE_DOWN] = LoopedTask_MoveSearchListPageDown,
|
||||||
[CONDITION_SEARCH_FUNC_EXIT] = LoopedTask_ExitConditionSearchMenu,
|
[CONDITION_SEARCH_FUNC_EXIT] = LoopedTask_ExitConditionSearchMenu,
|
||||||
[CONDITION_SEARCH_FUNC_SELECT_MON] = LoopedTask_SelectSearchResult
|
[CONDITION_SEARCH_FUNC_SELECT_MON] = LoopedTask_SelectSearchResult
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ bool32 PokenavCallback_Init_ConditionSearch(void)
|
|||||||
|
|
||||||
structPtr->callback = HandleConditionSearchInput_WaitSetup;
|
structPtr->callback = HandleConditionSearchInput_WaitSetup;
|
||||||
structPtr->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1);
|
structPtr->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1);
|
||||||
structPtr->unk18 = 0;
|
structPtr->returnFromGraph = 0;
|
||||||
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ bool32 PokenavCallback_Init_ReturnToMonSearchList(void)
|
|||||||
|
|
||||||
structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||||
structPtr->callback = HandleConditionSearchInput;
|
structPtr->callback = HandleConditionSearchInput;
|
||||||
structPtr->unk18 = 1;
|
structPtr->returnFromGraph = 1;
|
||||||
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr)
|
|||||||
{
|
{
|
||||||
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
||||||
structPtr->isPartyCondition = 1;
|
structPtr->isPartyCondition = 1;
|
||||||
structPtr->callback = sub_81CF0B8;
|
structPtr->callback = OpenConditionGraphFromSearchList;
|
||||||
return CONDITION_SEARCH_FUNC_SELECT_MON;
|
return CONDITION_SEARCH_FUNC_SELECT_MON;
|
||||||
}
|
}
|
||||||
return CONDITION_SEARCH_FUNC_NONE;
|
return CONDITION_SEARCH_FUNC_NONE;
|
||||||
@ -211,15 +211,15 @@ static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr)
|
|||||||
return POKENAV_CONDITION_SEARCH_MENU;
|
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)
|
static u32 sub_81CF0C0(void)
|
||||||
{
|
{
|
||||||
struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||||
return structPtr->unk18;
|
return structPtr->returnFromGraph;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct PokenavMonList * GetSearchResultsMonDataList(void)
|
static struct PokenavMonList * GetSearchResultsMonDataList(void)
|
||||||
@ -339,7 +339,7 @@ static u32 sub_81CF278(s32 state)
|
|||||||
ptr->monList->monData[i].data = i + 1;
|
ptr->monList->monData[i].data = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr->unk18 = 1;
|
ptr->returnFromGraph = 1;
|
||||||
return LT_FINISH;
|
return LT_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,22 +152,22 @@ const struct BgTemplate sMatchCallBgTemplates[3] =
|
|||||||
|
|
||||||
static const LoopedTask sMatchCallLoopTaskFuncs[] =
|
static const LoopedTask sMatchCallLoopTaskFuncs[] =
|
||||||
{
|
{
|
||||||
[POKENAV_MC_FUNC_NONE] = NULL,
|
[POKENAV_MC_FUNC_NONE] = NULL,
|
||||||
[POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown,
|
[POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown,
|
||||||
[POKENAV_MC_FUNC_UP] = MatchCallListCursorUp,
|
[POKENAV_MC_FUNC_UP] = MatchCallListCursorUp,
|
||||||
[POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown,
|
[POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown,
|
||||||
[POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp,
|
[POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp,
|
||||||
[POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry,
|
[POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry,
|
||||||
[POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor,
|
[POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor,
|
||||||
[POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection,
|
[POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection,
|
||||||
[POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage,
|
[POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage,
|
||||||
[POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage,
|
[POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage,
|
||||||
[POKENAV_MC_FUNC_10] = sub_81CB888,
|
[POKENAV_MC_FUNC_10] = sub_81CB888,
|
||||||
[POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage,
|
[POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage,
|
||||||
[POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp,
|
[POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp,
|
||||||
[POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown,
|
[POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown,
|
||||||
[POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage,
|
[POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage,
|
||||||
[POKENAV_MC_FUNC_EXIT] = ExitMatchCall
|
[POKENAV_MC_FUNC_EXIT] = ExitMatchCall
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sMatchCallLocationWindowTemplate =
|
static const struct WindowTemplate sMatchCallLocationWindowTemplate =
|
||||||
|
@ -81,14 +81,14 @@ static void InitMenuOptionGlow(void);
|
|||||||
static void Task_CurrentMenuOptionGlow(u8 taskId);
|
static void Task_CurrentMenuOptionGlow(u8 taskId);
|
||||||
static void SetMenuOptionGlow(void);
|
static void SetMenuOptionGlow(void);
|
||||||
|
|
||||||
static const u16 sPokenavBgDotsPal[] = INCBIN_U16("graphics/pokenav/bg.gbapal");
|
static const u16 sPokenavBgDotsPal[] = INCBIN_U16("graphics/pokenav/bg_dots.gbapal");
|
||||||
static const u32 sPokenavBgDotsTiles[] = INCBIN_U32("graphics/pokenav/bg.4bpp.lz");
|
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 u32 sPokenavBgDotsTilemap[] = INCBIN_U32("graphics/pokenav/bg.bin.lz");
|
||||||
static const u16 sPokenavDeviceBgPal[] = INCBIN_U16("graphics/pokenav/outline.gbapal");
|
static const u16 sPokenavDeviceBgPal[] = INCBIN_U16("graphics/pokenav/device_outline.gbapal");
|
||||||
static const u32 sPokenavDeviceBgTiles[] = INCBIN_U32("graphics/pokenav/outline.4bpp.lz");
|
static const u32 sPokenavDeviceBgTiles[] = INCBIN_U32("graphics/pokenav/device_outline.4bpp.lz");
|
||||||
static const u32 sPokenavDeviceBgTilemap[] = INCBIN_U32("graphics/pokenav/outline_map.bin.lz");
|
static const u32 sPokenavDeviceBgTilemap[] = INCBIN_U32("graphics/pokenav/device_outline_map.bin.lz");
|
||||||
static const u16 gUnknown_08620104[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal");
|
static const u16 sMatchCallBlueLightPal[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal");
|
||||||
static const u32 gUnknown_08620124[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz");
|
static const u32 sMatchCallBlueLightTiles[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz");
|
||||||
|
|
||||||
static const struct BgTemplate sPokenavMainMenuBgTemplates[] = {
|
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_NONE] = NULL,
|
||||||
[POKENAV_MENU_FUNC_MOVE_CURSOR] = LoopedTask_MoveMenuCursor,
|
[POKENAV_MENU_FUNC_MOVE_CURSOR] = LoopedTask_MoveMenuCursor,
|
||||||
[POKENAV_MENU_FUNC_OPEN_CONDITION] = LoopedTask_OpenConditionMenu,
|
[POKENAV_MENU_FUNC_OPEN_CONDITION] = LoopedTask_OpenConditionMenu,
|
||||||
@ -138,7 +139,7 @@ static const struct CompressedSpriteSheet sPokenavOptionsSpriteSheets[] =
|
|||||||
.tag = 0x0003
|
.tag = 0x0003
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.data = gUnknown_08620124,
|
.data = sMatchCallBlueLightTiles,
|
||||||
.size = 0x0100,
|
.size = 0x0100,
|
||||||
.tag = 0x0001
|
.tag = 0x0001
|
||||||
}
|
}
|
||||||
@ -151,7 +152,7 @@ static const struct SpritePalette sPokenavOptionsSpritePalettes[] =
|
|||||||
{gPokenavOptions_Pal + 0x20, 6},
|
{gPokenavOptions_Pal + 0x20, 6},
|
||||||
{gPokenavOptions_Pal + 0x30, 7},
|
{gPokenavOptions_Pal + 0x30, 7},
|
||||||
{gPokenavOptions_Pal + 0x40, 8},
|
{gPokenavOptions_Pal + 0x40, 8},
|
||||||
{gUnknown_08620104, 3},
|
{sMatchCallBlueLightPal, 3},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,12 +159,12 @@ static const struct BgTemplate gUnknown_08624B98[] =
|
|||||||
|
|
||||||
static const LoopedTask sRibbonsSummaryMenuLoopTaskFuncs[] =
|
static const LoopedTask sRibbonsSummaryMenuLoopTaskFuncs[] =
|
||||||
{
|
{
|
||||||
[RIBBONS_SUMMARY_FUNC_NONE] = NULL,
|
[RIBBONS_SUMMARY_FUNC_NONE] = NULL,
|
||||||
[RIBBONS_SUMMARY_FUNC_MOVED_CURSOR] = LoopedTask_UpdateRibbonsSummaryInfo,
|
[RIBBONS_SUMMARY_FUNC_MOVED_CURSOR] = LoopedTask_UpdateRibbonsSummaryInfo,
|
||||||
[RIBBONS_SUMMARY_FUNC_SELECT_RIBBON] = LoopedTask_ExpandSelectedRibbon,
|
[RIBBONS_SUMMARY_FUNC_SELECT_RIBBON] = LoopedTask_ExpandSelectedRibbon,
|
||||||
[RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE] = LoopedTask_MoveRibbonsCursorExpanded,
|
[RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE] = LoopedTask_MoveRibbonsCursorExpanded,
|
||||||
[RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL] = LoopedTask_ShrinkExpandedRibbon,
|
[RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL] = LoopedTask_ShrinkExpandedRibbon,
|
||||||
[RIBBONS_SUMMARY_FUNC_EXIT] = LoopedTask_ExitRibbonsSummaryMenu
|
[RIBBONS_SUMMARY_FUNC_EXIT] = LoopedTask_ExitRibbonsSummaryMenu
|
||||||
};
|
};
|
||||||
|
|
||||||
// code
|
// code
|
||||||
|
Loading…
Reference in New Issue
Block a user