mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 13:31:03 +01:00
Start pokenav list ui doc
This commit is contained in:
parent
da5752fd0d
commit
3b91d8fdaf
@ -7,14 +7,14 @@
|
||||
|
||||
typedef u32 (*LoopedTask)(s32 state);
|
||||
|
||||
struct PokenavMonList
|
||||
struct PokenavMonListItem
|
||||
{
|
||||
u8 boxId;
|
||||
u8 monId;
|
||||
u16 data;
|
||||
};
|
||||
|
||||
struct PokenavMatchCallEntries
|
||||
struct PokenavMatchCallEntry
|
||||
{
|
||||
bool8 isSpecialTrainer;
|
||||
u8 mapSec;
|
||||
@ -24,8 +24,8 @@ struct PokenavMatchCallEntries
|
||||
struct PokenavListTemplate
|
||||
{
|
||||
union {
|
||||
struct PokenavMonList *monList;
|
||||
struct PokenavMatchCallEntries *matchCallEntries;
|
||||
struct PokenavMonListItem *monList;
|
||||
struct PokenavMatchCallEntry *matchCallEntries;
|
||||
} list;
|
||||
u16 count;
|
||||
u16 unk6;
|
||||
@ -37,17 +37,17 @@ struct PokenavListTemplate
|
||||
u8 fillValue;
|
||||
u8 fontId;
|
||||
union {
|
||||
void (*printMonFunc)(struct PokenavMonList *item, u8 *dest);
|
||||
void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1);
|
||||
void (*bufferMonItemFunc)(struct PokenavMonListItem *, u8 *);
|
||||
void (*bufferMatchCallItemFunc)(struct PokenavMatchCallEntry *, u8 *);
|
||||
} listFunc;
|
||||
void (*unk14)(u16 a0, u32 a1, u32 a2);
|
||||
};
|
||||
|
||||
struct PokenavSub18
|
||||
struct PokenavMonList
|
||||
{
|
||||
u16 listCount;
|
||||
u16 currIndex;
|
||||
struct PokenavMonList monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE];
|
||||
struct PokenavMonListItem monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE];
|
||||
};
|
||||
|
||||
// Return values of LoopedTask functions.
|
||||
@ -406,7 +406,7 @@ void FreeMatchCallSubstruct1(void);
|
||||
int sub_81CAE28(void);
|
||||
int GetNumberRegistered(void);
|
||||
int sub_81CAE48(void);
|
||||
struct PokenavMatchCallEntries *sub_81CAE94(void);
|
||||
struct PokenavMatchCallEntry *sub_81CAE94(void);
|
||||
u16 GetMatchCallMapSec(int);
|
||||
bool32 ShouldDrawRematchPokeballIcon(int index);
|
||||
void ClearRematchPokeballIcon(u16 windowId, u32 a1);
|
||||
@ -415,7 +415,7 @@ const u8 *GetMatchCallFlavorText(int index, int textType);
|
||||
const u8 *GetMatchCallMessageText(int index, u8 *arg1);
|
||||
u16 GetMatchCallOptionCursorPos(void);
|
||||
u16 GetMatchCallOptionId(int arg0);
|
||||
void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str);
|
||||
void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry * arg0, u8 *str);
|
||||
u8 GetMatchTableMapSectionId(int rematchIndex);
|
||||
int GetIndexDeltaOfNextCheckPageDown(int index);
|
||||
int GetIndexDeltaOfNextCheckPageUp(int index);
|
||||
|
@ -84,7 +84,7 @@ u32 GetConditionGraphMenuCallback(void)
|
||||
|
||||
static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *menu)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
u32 ret = ConditionGraphHandleDpadInput(menu);
|
||||
|
||||
if (ret == CONDITION_FUNC_NONE)
|
||||
@ -123,7 +123,7 @@ static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *menu)
|
||||
|
||||
static u32 OpenMarkingsMenu(struct Pokenav_ConditionMenu *menu)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr;
|
||||
struct PokenavMonList *monListPtr;
|
||||
u8 markings;
|
||||
u32 ret = CONDITION_FUNC_NONE, boxId, monId;
|
||||
|
||||
@ -166,7 +166,7 @@ void FreeConditionGraphMenuSubstruct1(void)
|
||||
|
||||
static u8 ConditionGraphHandleDpadInput(struct Pokenav_ConditionMenu *menu)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
u8 ret = CONDITION_FUNC_NONE;
|
||||
|
||||
if (JOY_HELD(DPAD_UP))
|
||||
@ -196,7 +196,7 @@ static u8 SwitchConditionSummaryIndex(u8 moveUp)
|
||||
u16 newLoadId;
|
||||
bool8 wasNotLastMon, isNotLastMon;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
newLoadId = (moveUp) ? menu->nextLoadIdUp : menu->nextLoadIdDown;
|
||||
ConditionGraph_SetNewPositions(&menu->graph, menu->graph.savedPositions[menu->loadId], menu->graph.savedPositions[newLoadId]);
|
||||
@ -236,7 +236,7 @@ bool32 LoadConditionGraphMenuGfx(void)
|
||||
{
|
||||
s32 var;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
switch (menu->state)
|
||||
{
|
||||
@ -337,7 +337,7 @@ static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 arg3)
|
||||
u16 boxId, monId, gender, species, level, lvlDigits;
|
||||
struct BoxPokemon *boxMon;
|
||||
u8 *txtPtr, *str_;
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
boxId = monListPtr->monData[listId].boxId;
|
||||
monId = monListPtr->monData[listId].monId;
|
||||
@ -427,7 +427,7 @@ static void CopyMonNameGenderLocation(s16 listId, u8 loadId)
|
||||
{
|
||||
u16 boxId, i;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
{
|
||||
@ -459,7 +459,7 @@ static void InitPartyConditionListParameters(void)
|
||||
{
|
||||
u16 i, count;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
struct PokenavMonList *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList));
|
||||
|
||||
menu->inSearchMode = FALSE;
|
||||
for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++)
|
||||
@ -492,7 +492,7 @@ static void GetMonConditionGraphData(s16 listId, u8 loadId)
|
||||
{
|
||||
u16 boxId, monId, i;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
{
|
||||
@ -524,7 +524,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId)
|
||||
u16 boxId, monId, species;
|
||||
u32 personality, tid;
|
||||
struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (listId == (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
return;
|
||||
@ -540,13 +540,13 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId)
|
||||
|
||||
u16 GetMonListCount(void)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->listCount;
|
||||
}
|
||||
|
||||
u16 GetConditionGraphCurrentListIndex(void)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->currIndex;
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ u8 *GetConditionMonLocationText(u8 loadId)
|
||||
|
||||
u16 GetConditionMonDataBuffer(void)
|
||||
{
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->monData[monListPtr->currIndex].data;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ struct Pokenav_SearchResults
|
||||
u32 conditionDataId;
|
||||
bool32 returnFromGraph;
|
||||
bool32 saveResultsList;
|
||||
struct PokenavSub18 *monList;
|
||||
struct PokenavMonList *monList;
|
||||
};
|
||||
|
||||
struct Pokenav_SearchResultsGfx
|
||||
@ -58,13 +58,13 @@ static u32 LoopedTask_MoveSearchListPageUp(s32);
|
||||
static u32 LoopedTask_MoveSearchListPageDown(s32);
|
||||
static u32 LoopedTask_ExitConditionSearchMenu(s32);
|
||||
static u32 LoopedTask_SelectSearchResult(s32);
|
||||
static void InsertMonListItem(struct Pokenav_SearchResults *, struct PokenavMonList *);
|
||||
static void InsertMonListItem(struct Pokenav_SearchResults *, struct PokenavMonListItem *);
|
||||
static bool32 GetSearchResultCurrentLoopedTaskActive(void);
|
||||
static u32 LoopedTask_OpenConditionSearchResults(s32);
|
||||
static void AddSearchResultListMenuWindow(struct Pokenav_SearchResultsGfx *);
|
||||
static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *);
|
||||
static void InitConditionSearchListMenuTemplate(void);
|
||||
static void PrintSearchMonListItem(struct PokenavMonList *, u8 *);
|
||||
static void BufferSearchMonListItem(struct PokenavMonListItem *, u8 *);
|
||||
|
||||
static const u32 sSearchMonDataIds[] = {MON_DATA_COOL, MON_DATA_BEAUTY, MON_DATA_CUTE, MON_DATA_SMART, MON_DATA_TOUGH};
|
||||
|
||||
@ -134,7 +134,7 @@ bool32 PokenavCallback_Init_ConditionSearch(void)
|
||||
if (menu == NULL)
|
||||
return FALSE;
|
||||
|
||||
menu->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
menu->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList));
|
||||
if (menu->monList == NULL)
|
||||
return FALSE;
|
||||
|
||||
@ -225,7 +225,7 @@ static u32 GetReturningFromGraph(void)
|
||||
return menu->returnFromGraph;
|
||||
}
|
||||
|
||||
static struct PokenavMonList * GetSearchResultsMonDataList(void)
|
||||
static struct PokenavMonListItem * GetSearchResultsMonDataList(void)
|
||||
{
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return menu->monList->monData;
|
||||
@ -259,7 +259,7 @@ static u32 GetConditionSearchLoopedTask(s32 state)
|
||||
static u32 BuildPartyMonSearchResults(s32 state)
|
||||
{
|
||||
s32 i;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavMonListItem item;
|
||||
struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
|
||||
menu->monList->listCount = 0;
|
||||
@ -295,7 +295,7 @@ static u32 BuildBoxMonSearchResults(s32 state)
|
||||
s32 boxId = menu->boxId;
|
||||
s32 monId = menu->monId;
|
||||
s32 boxCount = 0;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavMonListItem item;
|
||||
|
||||
while (boxId < TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@ -351,7 +351,7 @@ static u32 ConvertConditionsToListRanks(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void InsertMonListItem(struct Pokenav_SearchResults *menu, struct PokenavMonList *item)
|
||||
static void InsertMonListItem(struct Pokenav_SearchResults *menu, struct PokenavMonListItem *item)
|
||||
{
|
||||
u32 left = 0;
|
||||
u32 right = menu->monList->listCount;
|
||||
@ -682,12 +682,12 @@ static void InitConditionSearchListMenuTemplate(void)
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = FONT_NORMAL;
|
||||
template.listFunc.printMonFunc = PrintSearchMonListItem;
|
||||
template.listFunc.bufferMonItemFunc = BufferSearchMonListItem;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0);
|
||||
}
|
||||
|
||||
static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest)
|
||||
static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
|
@ -25,7 +25,7 @@ struct Pokenav3Struct
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 (*callback)(struct Pokenav3Struct*);
|
||||
struct PokenavMatchCallEntries matchCallEntries[MAX_REMATCH_ENTRIES - 1];
|
||||
struct PokenavMatchCallEntry matchCallEntries[MAX_REMATCH_ENTRIES - 1];
|
||||
};
|
||||
|
||||
static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *);
|
||||
@ -298,7 +298,7 @@ int unref_sub_81CAE6C(int arg0)
|
||||
return state->matchCallEntries[arg0].headerId;
|
||||
}
|
||||
|
||||
struct PokenavMatchCallEntries *sub_81CAE94(void)
|
||||
struct PokenavMatchCallEntry *sub_81CAE94(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->matchCallEntries;
|
||||
@ -394,7 +394,7 @@ u16 GetMatchCallOptionId(int optionId)
|
||||
return state->matchCallOptions[optionId];
|
||||
}
|
||||
|
||||
void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry, u8 *str)
|
||||
void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry *matchCallEntry, u8 *str)
|
||||
{
|
||||
const u8 *trainerName;
|
||||
const u8 *className;
|
||||
|
@ -880,7 +880,7 @@ static void InitMatchCallPokenavListMenuTemplate(void)
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 3;
|
||||
template.fontId = FONT_NARROW;
|
||||
template.listFunc.unk10_2 = BufferMatchCallNameAndDesc;
|
||||
template.listFunc.bufferMatchCallItemFunc = BufferMatchCallNameAndDesc;
|
||||
template.unk14 = TryDrawRematchPokeballIcon;
|
||||
sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2);
|
||||
CreateTask(Task_FlashPokeballIcons, 7);
|
||||
|
@ -49,7 +49,7 @@ struct PokenavSub17Substruct
|
||||
u32 loopedTaskId;
|
||||
s32 unk2C;
|
||||
u32 unk30;
|
||||
void (*unk34)(struct PokenavMatchCallEntries *, u8*);
|
||||
void (*unk34)(struct PokenavMatchCallEntry *, u8*);
|
||||
void (*unk38)(u16, u32, u32);
|
||||
struct Sprite *rightArrow;
|
||||
struct Sprite *upArrow;
|
||||
@ -57,7 +57,6 @@ struct PokenavSub17Substruct
|
||||
u8 unkTextBuffer[0x40];
|
||||
};
|
||||
|
||||
// Generally at index 0x11 (17)
|
||||
struct PokenavSub17
|
||||
{
|
||||
struct PokenavSub17Substruct list;
|
||||
@ -68,7 +67,7 @@ struct PokenavSub17
|
||||
};
|
||||
|
||||
void sub_81C82E4(struct PokenavSub17 *matchCall);
|
||||
bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3);
|
||||
static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3);
|
||||
void InitMatchCallWindowState(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1);
|
||||
void SpriteCB_MatchCallUpArrow(struct Sprite *sprite);
|
||||
void SpriteCB_MatchCallDownArrow(struct Sprite *sprite);
|
||||
@ -963,13 +962,13 @@ void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavLi
|
||||
}
|
||||
}
|
||||
|
||||
bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3)
|
||||
static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3)
|
||||
{
|
||||
struct WindowTemplate window;
|
||||
|
||||
dest->listWindow.bg = bgTemplate->bg;
|
||||
dest->listWindow.unk6 = a3;
|
||||
dest->unk34 = template->listFunc.unk10_2;
|
||||
dest->unk34 = template->listFunc.bufferMatchCallItemFunc;
|
||||
dest->unk38 = template->unk14;
|
||||
dest->listWindow.unk1 = template->fillValue;
|
||||
dest->listWindow.unk2 = template->item_X;
|
||||
|
@ -29,7 +29,7 @@ struct Pokenav_RibbonsMonList
|
||||
s32 monId;
|
||||
u32 changeBgs;
|
||||
u32 saveMonList;
|
||||
struct PokenavSub18 *monList;
|
||||
struct PokenavMonList *monList;
|
||||
};
|
||||
|
||||
struct Pokenav_RibbonsMonMenu
|
||||
@ -49,7 +49,7 @@ static u32 BuildPartyMonRibbonList(s32);
|
||||
static u32 InitBoxMonRibbonList(s32);
|
||||
static u32 BuildBoxMonRibbonList(s32);
|
||||
static u32 GetMonRibbonListLoopTaskFunc(s32);
|
||||
static void InsertMonListItem(struct Pokenav_RibbonsMonList *, struct PokenavMonList *);
|
||||
static void InsertMonListItem(struct Pokenav_RibbonsMonList *, struct PokenavMonListItem *);
|
||||
static u32 LoopedTask_OpenRibbonsMonList(s32);
|
||||
static bool32 GetRibbonsMonCurrentLoopedTaskActive(void);
|
||||
static u32 LoopedTask_RibbonsListMoveCursorUp(s32);
|
||||
@ -62,7 +62,7 @@ static void DrawListIndexNumber(s32, s32, s32);
|
||||
static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *);
|
||||
static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *);
|
||||
static void InitMonRibbonPokenavListMenuTemplate(void);
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonList *, u8 *);
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonListItem *, u8 *);
|
||||
|
||||
static const LoopedTask sMonRibbonListLoopTaskFuncs[] =
|
||||
{
|
||||
@ -129,7 +129,7 @@ bool32 PokenavCallback_Init_MonRibbonList(void)
|
||||
if (list == NULL)
|
||||
return FALSE;
|
||||
|
||||
list->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
list->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList));
|
||||
if (list->monList == NULL)
|
||||
return FALSE;
|
||||
|
||||
@ -214,7 +214,7 @@ static u32 UpdateMonListBgs(void)
|
||||
return list->changeBgs;
|
||||
}
|
||||
|
||||
static struct PokenavMonList *GetMonRibbonMonListData(void)
|
||||
static struct PokenavMonListItem *GetMonRibbonMonListData(void)
|
||||
{
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return list->monList->monData;
|
||||
@ -248,7 +248,7 @@ static u32 GetMonRibbonListLoopTaskFunc(s32 state)
|
||||
static u32 BuildPartyMonRibbonList(s32 state)
|
||||
{
|
||||
s32 i;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavMonListItem item;
|
||||
struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
|
||||
list->monList->listCount = 0;
|
||||
@ -288,7 +288,7 @@ static u32 BuildBoxMonRibbonList(s32 state)
|
||||
s32 boxId = list->boxId;
|
||||
s32 monId = list->monId;
|
||||
s32 boxCount = 0;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavMonListItem item;
|
||||
|
||||
while (boxId < TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@ -322,7 +322,7 @@ static u32 BuildBoxMonRibbonList(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct PokenavMonList *item)
|
||||
static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct PokenavMonListItem *item)
|
||||
{
|
||||
u32 left = 0;
|
||||
u32 right = list->monList->listCount;
|
||||
@ -690,19 +690,19 @@ static void InitMonRibbonPokenavListMenuTemplate(void)
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = FONT_NORMAL;
|
||||
template.listFunc.printMonFunc = BufferRibbonMonInfoText;
|
||||
template.listFunc.bufferMonItemFunc = BufferRibbonMonInfoText;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0);
|
||||
}
|
||||
|
||||
// Buffers the "Nickname gender/level" text for the ribbon mon list
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest)
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonListItem * item0, u8 * dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
u8 * s;
|
||||
const u8 * genderStr;
|
||||
struct PokenavMonList * item = item0;
|
||||
struct PokenavMonListItem * item = item0;
|
||||
|
||||
// Mon is in party
|
||||
if (item->boxId == TOTAL_BOXES_COUNT)
|
||||
|
@ -42,7 +42,7 @@ enum
|
||||
struct Pokenav_RibbonsSummaryList
|
||||
{
|
||||
u8 unused1[8];
|
||||
struct PokenavSub18 *monList;
|
||||
struct PokenavMonList *monList;
|
||||
u16 selectedPos;
|
||||
u16 normalRibbonLastRowStart;
|
||||
u16 numNormalRibbons;
|
||||
@ -378,8 +378,8 @@ static u32 GetRibbonsSummaryMonListCount(void)
|
||||
static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender)
|
||||
{
|
||||
struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = list->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
struct PokenavMonList *mons = list->monList;
|
||||
struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@ -403,8 +403,8 @@ static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender)
|
||||
static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *otId)
|
||||
{
|
||||
struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = list->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
struct PokenavMonList *mons = list->monList;
|
||||
struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@ -427,8 +427,8 @@ static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *ot
|
||||
static u32 GetCurrMonRibbonCount(void)
|
||||
{
|
||||
struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = list->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
struct PokenavMonList *mons = list->monList;
|
||||
struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
return GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBON_COUNT);
|
||||
@ -440,8 +440,8 @@ static void GetMonRibbons(struct Pokenav_RibbonsSummaryList *list)
|
||||
{
|
||||
u32 ribbonFlags;
|
||||
s32 i, j;
|
||||
struct PokenavSub18 *mons = list->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
struct PokenavMonList *mons = list->monList;
|
||||
struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
ribbonFlags = GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBONS);
|
||||
|
@ -73,7 +73,7 @@ struct UsePokeblockSession
|
||||
u8 natureText[34];
|
||||
};
|
||||
|
||||
// This struct is identical to PokenavMonList, the struct used for managing lists of pokemon in the pokenav
|
||||
// This struct is identical to PokenavMonListItem, the struct used for managing lists of pokemon in the pokenav
|
||||
// Given that this screen is essentially duplicated in the poknav, this struct was probably the same one with
|
||||
// a more general name/purpose
|
||||
// TODO: Once the pokenav conditions screens are documented, resolve the above
|
||||
|
Loading…
x
Reference in New Issue
Block a user