Clean up pokenav conditions doc
This commit is contained in:
@@ -255,14 +255,6 @@ enum
|
|||||||
CONDITION_FUNC_CLOSE_MARKINGS,
|
CONDITION_FUNC_CLOSE_MARKINGS,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CONDITION_MON_0,
|
|
||||||
CONDITION_MON_1,
|
|
||||||
CONDITION_MON_2,
|
|
||||||
NUM_CONDITION_MONS
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CONDITION_LOAD_MON_INFO,
|
CONDITION_LOAD_MON_INFO,
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ static void ConditionGraph_CalcRightHalf(struct ConditionGraph *graph)
|
|||||||
// Calculate Cute -> Tough line (includes left scanline because this crosses the halfway point)
|
// Calculate Cute -> Tough line (includes left scanline because this crosses the halfway point)
|
||||||
i = (graph->curPositions[GRAPH_CUTE].y <= graph->curPositions[GRAPH_SMART].y);
|
i = (graph->curPositions[GRAPH_CUTE].y <= graph->curPositions[GRAPH_SMART].y);
|
||||||
ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_CUTE], &graph->curPositions[GRAPH_SMART], i, graph->scanlineLeft[0]);
|
ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_CUTE], &graph->curPositions[GRAPH_SMART], i, graph->scanlineLeft[0]);
|
||||||
|
|
||||||
// Clear down to new top
|
// Clear down to new top
|
||||||
for (i = CONDITION_GRAPH_TOP_Y; i < y; i++)
|
for (i = CONDITION_GRAPH_TOP_Y; i < y; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+23
-21
@@ -13,20 +13,22 @@
|
|||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
|
|
||||||
|
#define CONDITION_MONS_LOADED 3
|
||||||
|
|
||||||
struct Pokenav_ConditionMenu
|
struct Pokenav_ConditionMenu
|
||||||
{
|
{
|
||||||
u32 monPal[NUM_CONDITION_MONS][0x20];
|
u32 monPal[CONDITION_MONS_LOADED][0x20];
|
||||||
u8 fill[0x180];
|
u8 fill[0x180];
|
||||||
u32 monPicGfx[NUM_CONDITION_MONS][MON_PIC_SIZE];
|
u32 monPicGfx[CONDITION_MONS_LOADED][MON_PIC_SIZE];
|
||||||
bool8 inSearchMode;
|
bool8 inSearchMode;
|
||||||
s16 toLoadListIndex;
|
s16 toLoadListIndex;
|
||||||
u32 (*callback)(struct Pokenav_ConditionMenu *);
|
u32 (*callback)(struct Pokenav_ConditionMenu *);
|
||||||
u8 fill2[0x18];
|
u8 fill2[0x18];
|
||||||
u8 locationText[NUM_CONDITION_MONS][24];
|
u8 locationText[CONDITION_MONS_LOADED][24];
|
||||||
u8 nameText[NUM_CONDITION_MONS][64];
|
u8 nameText[CONDITION_MONS_LOADED][64];
|
||||||
struct ConditionGraph graph;
|
struct ConditionGraph graph;
|
||||||
u8 numSparkles[NUM_CONDITION_MONS];
|
u8 numSparkles[CONDITION_MONS_LOADED];
|
||||||
u8 monMarks[NUM_CONDITION_MONS];
|
u8 monMarks[CONDITION_MONS_LOADED];
|
||||||
s8 loadId;
|
s8 loadId;
|
||||||
s8 nextLoadIdDown;
|
s8 nextLoadIdDown;
|
||||||
s8 nextLoadIdUp;
|
s8 nextLoadIdUp;
|
||||||
@@ -239,28 +241,28 @@ bool32 LoadConditionGraphMenuGfx(void)
|
|||||||
switch (menu->state)
|
switch (menu->state)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
CopyMonNameGenderLocation(monListPtr->currIndex, CONDITION_MON_0);
|
CopyMonNameGenderLocation(monListPtr->currIndex, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
GetMonConditionGraphData(monListPtr->currIndex, CONDITION_MON_0);
|
GetMonConditionGraphData(monListPtr->currIndex, 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ConditionGraphDrawMonPic(monListPtr->currIndex, CONDITION_MON_0);
|
ConditionGraphDrawMonPic(monListPtr->currIndex, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (monListPtr->listCount == 1)
|
if (monListPtr->listCount == 1)
|
||||||
{
|
{
|
||||||
menu->loadId = CONDITION_MON_0;
|
menu->loadId = 0;
|
||||||
menu->nextLoadIdDown = CONDITION_MON_0;
|
menu->nextLoadIdDown = 0;
|
||||||
menu->nextLoadIdUp = CONDITION_MON_0;
|
menu->nextLoadIdUp = 0;
|
||||||
menu->state = 0;
|
menu->state = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
menu->loadId = CONDITION_MON_0;
|
menu->loadId = 0;
|
||||||
menu->nextLoadIdDown = CONDITION_MON_1;
|
menu->nextLoadIdDown = 1;
|
||||||
menu->nextLoadIdUp = CONDITION_MON_2;
|
menu->nextLoadIdUp = 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// These were probably ternaries just like cases 7-9, but couldn't match it any other way.
|
// These were probably ternaries just like cases 7-9, but couldn't match it any other way.
|
||||||
@@ -268,28 +270,28 @@ bool32 LoadConditionGraphMenuGfx(void)
|
|||||||
var = monListPtr->currIndex + 1;
|
var = monListPtr->currIndex + 1;
|
||||||
if (var >= monListPtr->listCount)
|
if (var >= monListPtr->listCount)
|
||||||
var = 0;
|
var = 0;
|
||||||
CopyMonNameGenderLocation(var, CONDITION_MON_1);
|
CopyMonNameGenderLocation(var, 1);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
var = monListPtr->currIndex + 1;
|
var = monListPtr->currIndex + 1;
|
||||||
if (var >= monListPtr->listCount)
|
if (var >= monListPtr->listCount)
|
||||||
var = 0;
|
var = 0;
|
||||||
GetMonConditionGraphData(var, CONDITION_MON_1);
|
GetMonConditionGraphData(var, 1);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
var = monListPtr->currIndex + 1;
|
var = monListPtr->currIndex + 1;
|
||||||
if (var >= monListPtr->listCount)
|
if (var >= monListPtr->listCount)
|
||||||
var = 0;
|
var = 0;
|
||||||
ConditionGraphDrawMonPic(var, CONDITION_MON_1);
|
ConditionGraphDrawMonPic(var, 1);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2);
|
CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2);
|
GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2);
|
ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||||
menu->state = 0;
|
menu->state = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user