Merge pull request #1336 from GriffinRichards/giftribbons
Document some ribbon usage
@@ -1,5 +1,5 @@
|
|||||||
filler_03002F58
|
gUnusedWindowVar1
|
||||||
filler_03002F5C
|
gUnusedWindowVar2
|
||||||
gTransparentTileNumber
|
gTransparentTileNumber
|
||||||
filler_03002F64
|
gUnusedWindowVar3
|
||||||
gUnknown_03002F70
|
gWindowBgTilemapBuffers
|
||||||
|
|||||||
@@ -1736,7 +1736,7 @@ gTVTrainerFanClubText11:: @ 08286B4F
|
|||||||
.string "FANS: {STR_VAR_2}!\p"
|
.string "FANS: {STR_VAR_2}!\p"
|
||||||
.string "FANS: {STR_VAR_3}!$"
|
.string "FANS: {STR_VAR_3}!$"
|
||||||
|
|
||||||
gTVCutiesText00:: @ 08286D8F
|
TVSpotTheCuties_Text_Intro:: @ 08286D8F
|
||||||
.string "SPOT THE CUTIES!\n"
|
.string "SPOT THE CUTIES!\n"
|
||||||
.string "POKéMON IN RIBBONS!\p"
|
.string "POKéMON IN RIBBONS!\p"
|
||||||
.string "Hello, my sweet viewers!\p"
|
.string "Hello, my sweet viewers!\p"
|
||||||
@@ -1748,29 +1748,29 @@ gTVCutiesText00:: @ 08286D8F
|
|||||||
.string "Today's featured pretty POKéMON\n"
|
.string "Today's featured pretty POKéMON\n"
|
||||||
.string "is {STR_VAR_1}'s {STR_VAR_2}.$"
|
.string "is {STR_VAR_1}'s {STR_VAR_2}.$"
|
||||||
|
|
||||||
gTVCutiesText01:: @ 08286E9D
|
TVSpotTheCuties_Text_RibbonsLow:: @ 08286E9D
|
||||||
.string "The number of RIBBONS that\n"
|
.string "The number of RIBBONS that\n"
|
||||||
.string "{STR_VAR_2} wears is {STR_VAR_3}.\p"
|
.string "{STR_VAR_2} wears is {STR_VAR_3}.\p"
|
||||||
.string "It says a lot about how much\n"
|
.string "It says a lot about how much\n"
|
||||||
.string "{STR_VAR_1} adores the POKéMON.$"
|
.string "{STR_VAR_1} adores the POKéMON.$"
|
||||||
|
|
||||||
gTVCutiesText02:: @ 08286EFC
|
TVSpotTheCuties_Text_RibbonsMid:: @ 08286EFC
|
||||||
.string "{STR_VAR_2} wears an amazing\n"
|
.string "{STR_VAR_2} wears an amazing\n"
|
||||||
.string "{STR_VAR_3} RIBBONS!\p"
|
.string "{STR_VAR_3} RIBBONS!\p"
|
||||||
.string "It speaks volumes about {STR_VAR_1}'s\n"
|
.string "It speaks volumes about {STR_VAR_1}'s\n"
|
||||||
.string "commitment to the POKéMON!$"
|
.string "commitment to the POKéMON!$"
|
||||||
|
|
||||||
gTVCutiesText03:: @ 08286F54
|
TVSpotTheCuties_Text_RibbonsHigh:: @ 08286F54
|
||||||
.string "{STR_VAR_2} wears an incredible\n"
|
.string "{STR_VAR_2} wears an incredible\n"
|
||||||
.string "{STR_VAR_3} RIBBONS!\p"
|
.string "{STR_VAR_3} RIBBONS!\p"
|
||||||
.string "It shows you {STR_VAR_1}'s total\n"
|
.string "It shows you {STR_VAR_1}'s total\n"
|
||||||
.string "dedication as a collector!$"
|
.string "dedication as a collector!$"
|
||||||
|
|
||||||
gTVCutiesText04:: @ 08286FAA
|
TVSpotTheCuties_Text_RibbonIntro:: @ 08286FAA
|
||||||
.string "Let us take a closer look at the many\n"
|
.string "Let us take a closer look at the many\n"
|
||||||
.string "RIBBONS worn by {STR_VAR_2}.$"
|
.string "RIBBONS worn by {STR_VAR_2}.$"
|
||||||
|
|
||||||
gTVCutiesText05:: @ 08286FE4
|
TVSpotTheCuties_Text_RibbonChampion:: @ 08286FE4
|
||||||
.string "The CHAMPION RIBBON is especially\n"
|
.string "The CHAMPION RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it upon entering\n"
|
.string "{STR_VAR_2} received it upon entering\n"
|
||||||
@@ -1780,7 +1780,7 @@ gTVCutiesText05:: @ 08286FE4
|
|||||||
.string "{STR_VAR_2} and the CHAMP RIBBON!\n"
|
.string "{STR_VAR_2} and the CHAMP RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText06:: @ 082870A3
|
TVSpotTheCuties_Text_RibbonCool:: @ 082870A3
|
||||||
.string "The COOL RIBBON is especially\n"
|
.string "The COOL RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for winning\n"
|
.string "{STR_VAR_2} received it for winning\n"
|
||||||
@@ -1790,7 +1790,7 @@ gTVCutiesText06:: @ 082870A3
|
|||||||
.string "{STR_VAR_2} and the COOL RIBBON!\n"
|
.string "{STR_VAR_2} and the COOL RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText07:: @ 0828715A
|
TVSpotTheCuties_Text_RibbonBeauty:: @ 0828715A
|
||||||
.string "The BEAUTY RIBBON is especially\n"
|
.string "The BEAUTY RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for winning\n"
|
.string "{STR_VAR_2} received it for winning\n"
|
||||||
@@ -1800,7 +1800,7 @@ gTVCutiesText07:: @ 0828715A
|
|||||||
.string "{STR_VAR_2} and the BEAUTY RIBBON!\n"
|
.string "{STR_VAR_2} and the BEAUTY RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText08:: @ 08287215
|
TVSpotTheCuties_Text_RibbonCute:: @ 08287215
|
||||||
.string "The CUTE RIBBON is especially\n"
|
.string "The CUTE RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for winning\n"
|
.string "{STR_VAR_2} received it for winning\n"
|
||||||
@@ -1810,7 +1810,7 @@ gTVCutiesText08:: @ 08287215
|
|||||||
.string "{STR_VAR_2} and the CUTE RIBBON!\n"
|
.string "{STR_VAR_2} and the CUTE RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText09:: @ 082872CC
|
TVSpotTheCuties_Text_RibbonSmart:: @ 082872CC
|
||||||
.string "The SMART RIBBON is especially\n"
|
.string "The SMART RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for winning\n"
|
.string "{STR_VAR_2} received it for winning\n"
|
||||||
@@ -1820,7 +1820,7 @@ gTVCutiesText09:: @ 082872CC
|
|||||||
.string "{STR_VAR_2} and the SMART RIBBON!\n"
|
.string "{STR_VAR_2} and the SMART RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText10:: @ 08287387
|
TVSpotTheCuties_Text_RibbonTough:: @ 08287387
|
||||||
.string "The TOUGH RIBBON is especially\n"
|
.string "The TOUGH RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for winning\n"
|
.string "{STR_VAR_2} received it for winning\n"
|
||||||
@@ -1830,7 +1830,7 @@ gTVCutiesText10:: @ 08287387
|
|||||||
.string "{STR_VAR_2} and the TOUGH RIBBON!\n"
|
.string "{STR_VAR_2} and the TOUGH RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText11:: @ 08287442
|
TVSpotTheCuties_Text_RibbonWinning:: @ 08287442
|
||||||
.string "The WINNING RIBBON is especially\n"
|
.string "The WINNING RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for its feats\n"
|
.string "{STR_VAR_2} received it for its feats\n"
|
||||||
@@ -1840,7 +1840,7 @@ gTVCutiesText11:: @ 08287442
|
|||||||
.string "{STR_VAR_2} and the WINNING RIBBON!\n"
|
.string "{STR_VAR_2} and the WINNING RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText12:: @ 08287508
|
TVSpotTheCuties_Text_RibbonVictory:: @ 08287508
|
||||||
.string "The VICTORY RIBBON is especially\n"
|
.string "The VICTORY RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for its feats\n"
|
.string "{STR_VAR_2} received it for its feats\n"
|
||||||
@@ -1850,7 +1850,7 @@ gTVCutiesText12:: @ 08287508
|
|||||||
.string "{STR_VAR_2} and the VICTORY RIBBON!\n"
|
.string "{STR_VAR_2} and the VICTORY RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText13:: @ 082875D9
|
TVSpotTheCuties_Text_RibbonArtist:: @ 082875D9
|
||||||
.string "The ARTIST RIBBON is especially\n"
|
.string "The ARTIST RIBBON is especially\n"
|
||||||
.string "fetching.\p"
|
.string "fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for being\n"
|
.string "{STR_VAR_2} received it for being\n"
|
||||||
@@ -1860,7 +1860,7 @@ gTVCutiesText13:: @ 082875D9
|
|||||||
.string "{STR_VAR_2} and the ARTIST RIBBON!\n"
|
.string "{STR_VAR_2} and the ARTIST RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText14:: @ 082876A1
|
TVSpotTheCuties_Text_RibbonEffort:: @ 082876A1
|
||||||
.string "The Hard Worker RIBBON is\n"
|
.string "The Hard Worker RIBBON is\n"
|
||||||
.string "especially fetching.\p"
|
.string "especially fetching.\p"
|
||||||
.string "{STR_VAR_2} received it for being\n"
|
.string "{STR_VAR_2} received it for being\n"
|
||||||
@@ -1870,7 +1870,7 @@ gTVCutiesText14:: @ 082876A1
|
|||||||
.string "{STR_VAR_2} and the Hard Worker RIBBON!\n"
|
.string "{STR_VAR_2} and the Hard Worker RIBBON!\n"
|
||||||
.string "The combination is super effective!$"
|
.string "The combination is super effective!$"
|
||||||
|
|
||||||
gTVCutiesText15:: @ 08287779
|
TVSpotTheCuties_Text_Outro:: @ 08287779
|
||||||
.string "…Sigh…\p"
|
.string "…Sigh…\p"
|
||||||
.string "RIBBONS and POKéMON…\n"
|
.string "RIBBONS and POKéMON…\n"
|
||||||
.string "They go so wonderfully together!\p"
|
.string "They go so wonderfully together!\p"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ struct BgControl
|
|||||||
|
|
||||||
u8 unknown_2;
|
u8 unknown_2;
|
||||||
u8 unknown_3;
|
u8 unknown_3;
|
||||||
} configs[4];
|
} configs[NUM_BACKGROUNDS];
|
||||||
|
|
||||||
u16 bgVisibilityAndMode;
|
u16 bgVisibilityAndMode;
|
||||||
};
|
};
|
||||||
@@ -39,8 +39,8 @@ struct BgConfig2
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct BgControl sGpuBgConfigs;
|
static struct BgControl sGpuBgConfigs;
|
||||||
static struct BgConfig2 sGpuBgConfigs2[4];
|
static struct BgConfig2 sGpuBgConfigs2[NUM_BACKGROUNDS];
|
||||||
static u32 sDmaBusyBitfield[4];
|
static u32 sDmaBusyBitfield[NUM_BACKGROUNDS];
|
||||||
|
|
||||||
u32 gUnneededFireRedVariable;
|
u32 gUnneededFireRedVariable;
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ void ResetBgControlStructs(void)
|
|||||||
struct BgConfig zeroedConfig = sZeroedBgControlStruct;
|
struct BgConfig zeroedConfig = sZeroedBgControlStruct;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < NUM_BACKGROUNDS; i++)
|
||||||
{
|
{
|
||||||
bgConfigs[i] = zeroedConfig;
|
bgConfigs[i] = zeroedConfig;
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ static void SetBgAffineInternal(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispC
|
|||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (bg < 2 || bg > 3)
|
if (bg < 2 || bg >= NUM_BACKGROUNDS)
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
@@ -290,7 +290,7 @@ static void SetBgAffineInternal(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispC
|
|||||||
|
|
||||||
bool8 IsInvalidBg(u8 bg)
|
bool8 IsInvalidBg(u8 bg)
|
||||||
{
|
{
|
||||||
if (bg > 3)
|
if (bg >= NUM_BACKGROUNDS)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -306,7 +306,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable)
|
|||||||
int i;
|
int i;
|
||||||
ResetBgs();
|
ResetBgs();
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < NUM_BACKGROUNDS; i++)
|
||||||
{
|
{
|
||||||
sDmaBusyBitfield[i] = 0;
|
sDmaBusyBitfield[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -325,7 +325,7 @@ void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numT
|
|||||||
for (i = 0; i < numTemplates; i++)
|
for (i = 0; i < numTemplates; i++)
|
||||||
{
|
{
|
||||||
bg = templates[i].bg;
|
bg = templates[i].bg;
|
||||||
if (bg < 4)
|
if (bg < NUM_BACKGROUNDS)
|
||||||
{
|
{
|
||||||
SetBgControlAttributes(bg,
|
SetBgControlAttributes(bg,
|
||||||
templates[i].charBaseIndex,
|
templates[i].charBaseIndex,
|
||||||
@@ -351,7 +351,7 @@ void InitBgFromTemplate(const struct BgTemplate *template)
|
|||||||
{
|
{
|
||||||
u8 bg = template->bg;
|
u8 bg = template->bg;
|
||||||
|
|
||||||
if (bg < 4)
|
if (bg < NUM_BACKGROUNDS)
|
||||||
{
|
{
|
||||||
SetBgControlAttributes(bg,
|
SetBgControlAttributes(bg,
|
||||||
template->charBaseIndex,
|
template->charBaseIndex,
|
||||||
@@ -1239,7 +1239,7 @@ u32 GetBgType(u8 bg)
|
|||||||
|
|
||||||
bool32 IsInvalidBg32(u8 bg)
|
bool32 IsInvalidBg32(u8 bg)
|
||||||
{
|
{
|
||||||
if (bg > 3)
|
if (bg >= NUM_BACKGROUNDS)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
#include "bg.h"
|
#include "bg.h"
|
||||||
#include "blit.h"
|
#include "blit.h"
|
||||||
|
|
||||||
u32 filler_03002F58;
|
u32 gUnusedWindowVar1;
|
||||||
u32 filler_03002F5C;
|
u32 gUnusedWindowVar2;
|
||||||
// This global is set to 0 and never changed.
|
// This global is set to 0 and never changed.
|
||||||
u8 gTransparentTileNumber;
|
u8 gTransparentTileNumber;
|
||||||
u32 filler_03002F64;
|
u32 gUnusedWindowVar3;
|
||||||
void *gUnknown_03002F70[4];
|
void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS];
|
||||||
extern u32 gUnneededFireRedVariable;
|
extern u32 gUnneededFireRedVariable;
|
||||||
|
|
||||||
#define WINDOWS_MAX 32
|
#define WINDOWS_MAX 32
|
||||||
@@ -23,7 +23,7 @@ static u8 GetNumActiveWindowsOnBg8Bit(u8 bgId);
|
|||||||
|
|
||||||
static const struct WindowTemplate sDummyWindowTemplate = DUMMY_WIN_TEMPLATE;
|
static const struct WindowTemplate sDummyWindowTemplate = DUMMY_WIN_TEMPLATE;
|
||||||
|
|
||||||
static void nullsub_8(void)
|
static void DummyWindowBgTilemap(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,22 +38,22 @@ bool16 InitWindows(const struct WindowTemplate *templates)
|
|||||||
u8* allocatedTilemapBuffer;
|
u8* allocatedTilemapBuffer;
|
||||||
int allocatedBaseBlock;
|
int allocatedBaseBlock;
|
||||||
|
|
||||||
for (i = 0; i < 0x4; ++i)
|
for (i = 0; i < NUM_BACKGROUNDS; ++i)
|
||||||
{
|
{
|
||||||
bgTilemapBuffer = GetBgTilemapBuffer(i);
|
bgTilemapBuffer = GetBgTilemapBuffer(i);
|
||||||
if (bgTilemapBuffer != NULL)
|
if (bgTilemapBuffer != NULL)
|
||||||
gUnknown_03002F70[i] = nullsub_8;
|
gWindowBgTilemapBuffers[i] = DummyWindowBgTilemap;
|
||||||
else
|
else
|
||||||
gUnknown_03002F70[i] = bgTilemapBuffer;
|
gWindowBgTilemapBuffers[i] = bgTilemapBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 0x20; ++i)
|
for (i = 0; i < WINDOWS_MAX; ++i)
|
||||||
{
|
{
|
||||||
gWindows[i].window = sDummyWindowTemplate;
|
gWindows[i].window = sDummyWindowTemplate;
|
||||||
gWindows[i].tileData = NULL;
|
gWindows[i].tileData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, allocatedBaseBlock = 0, bgLayer = templates[i].bg; bgLayer != 0xFF && i < 0x20; ++i, bgLayer = templates[i].bg)
|
for (i = 0, allocatedBaseBlock = 0, bgLayer = templates[i].bg; bgLayer != 0xFF && i < WINDOWS_MAX; ++i, bgLayer = templates[i].bg)
|
||||||
{
|
{
|
||||||
if (gUnneededFireRedVariable == 1)
|
if (gUnneededFireRedVariable == 1)
|
||||||
{
|
{
|
||||||
@@ -62,7 +62,7 @@ bool16 InitWindows(const struct WindowTemplate *templates)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gUnknown_03002F70[bgLayer] == NULL)
|
if (gWindowBgTilemapBuffers[bgLayer] == NULL)
|
||||||
{
|
{
|
||||||
attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
||||||
|
|
||||||
@@ -79,19 +79,19 @@ bool16 InitWindows(const struct WindowTemplate *templates)
|
|||||||
for (j = 0; j < attrib; ++j)
|
for (j = 0; j < attrib; ++j)
|
||||||
allocatedTilemapBuffer[j] = 0;
|
allocatedTilemapBuffer[j] = 0;
|
||||||
|
|
||||||
gUnknown_03002F70[bgLayer] = allocatedTilemapBuffer;
|
gWindowBgTilemapBuffers[bgLayer] = allocatedTilemapBuffer;
|
||||||
SetBgTilemapBuffer(bgLayer, allocatedTilemapBuffer);
|
SetBgTilemapBuffer(bgLayer, allocatedTilemapBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allocatedTilemapBuffer = AllocZeroed((u16)(0x20 * (templates[i].width * templates[i].height)));
|
allocatedTilemapBuffer = AllocZeroed((u16)(32 * (templates[i].width * templates[i].height)));
|
||||||
|
|
||||||
if (allocatedTilemapBuffer == NULL)
|
if (allocatedTilemapBuffer == NULL)
|
||||||
{
|
{
|
||||||
if ((GetNumActiveWindowsOnBg(bgLayer) == 0) && (gUnknown_03002F70[bgLayer] != nullsub_8))
|
if ((GetNumActiveWindowsOnBg(bgLayer) == 0) && (gWindowBgTilemapBuffers[bgLayer] != DummyWindowBgTilemap))
|
||||||
{
|
{
|
||||||
Free(gUnknown_03002F70[bgLayer]);
|
Free(gWindowBgTilemapBuffers[bgLayer]);
|
||||||
gUnknown_03002F70[bgLayer] = allocatedTilemapBuffer;
|
gWindowBgTilemapBuffers[bgLayer] = allocatedTilemapBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -127,7 +127,7 @@ u16 AddWindow(const struct WindowTemplate *template)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (win == WINDOWS_MAX)
|
if (win == WINDOWS_MAX)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
|
|
||||||
bgLayer = template->bg;
|
bgLayer = template->bg;
|
||||||
allocatedBaseBlock = 0;
|
allocatedBaseBlock = 0;
|
||||||
@@ -137,10 +137,10 @@ u16 AddWindow(const struct WindowTemplate *template)
|
|||||||
allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0);
|
allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0);
|
||||||
|
|
||||||
if (allocatedBaseBlock == -1)
|
if (allocatedBaseBlock == -1)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gUnknown_03002F70[bgLayer] == NULL)
|
if (gWindowBgTilemapBuffers[bgLayer] == NULL)
|
||||||
{
|
{
|
||||||
attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
attrib = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
||||||
|
|
||||||
@@ -149,26 +149,26 @@ u16 AddWindow(const struct WindowTemplate *template)
|
|||||||
allocatedTilemapBuffer = AllocZeroed(attrib);
|
allocatedTilemapBuffer = AllocZeroed(attrib);
|
||||||
|
|
||||||
if (allocatedTilemapBuffer == NULL)
|
if (allocatedTilemapBuffer == NULL)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
|
|
||||||
for (i = 0; i < attrib; ++i)
|
for (i = 0; i < attrib; ++i)
|
||||||
allocatedTilemapBuffer[i] = 0;
|
allocatedTilemapBuffer[i] = 0;
|
||||||
|
|
||||||
gUnknown_03002F70[bgLayer] = allocatedTilemapBuffer;
|
gWindowBgTilemapBuffers[bgLayer] = allocatedTilemapBuffer;
|
||||||
SetBgTilemapBuffer(bgLayer, allocatedTilemapBuffer);
|
SetBgTilemapBuffer(bgLayer, allocatedTilemapBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allocatedTilemapBuffer = AllocZeroed((u16)(0x20 * (template->width * template->height)));
|
allocatedTilemapBuffer = AllocZeroed((u16)(32 * (template->width * template->height)));
|
||||||
|
|
||||||
if (allocatedTilemapBuffer == NULL)
|
if (allocatedTilemapBuffer == NULL)
|
||||||
{
|
{
|
||||||
if ((GetNumActiveWindowsOnBg(bgLayer) == 0) && (gUnknown_03002F70[bgLayer] != nullsub_8))
|
if ((GetNumActiveWindowsOnBg(bgLayer) == 0) && (gWindowBgTilemapBuffers[bgLayer] != DummyWindowBgTilemap))
|
||||||
{
|
{
|
||||||
Free(gUnknown_03002F70[bgLayer]);
|
Free(gWindowBgTilemapBuffers[bgLayer]);
|
||||||
gUnknown_03002F70[bgLayer] = allocatedTilemapBuffer;
|
gWindowBgTilemapBuffers[bgLayer] = allocatedTilemapBuffer;
|
||||||
}
|
}
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gWindows[win].tileData = allocatedTilemapBuffer;
|
gWindows[win].tileData = allocatedTilemapBuffer;
|
||||||
@@ -196,7 +196,7 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (win == WINDOWS_MAX)
|
if (win == WINDOWS_MAX)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
|
|
||||||
bgLayer = template->bg;
|
bgLayer = template->bg;
|
||||||
allocatedBaseBlock = 0;
|
allocatedBaseBlock = 0;
|
||||||
@@ -206,7 +206,7 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template)
|
|||||||
allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0);
|
allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0);
|
||||||
|
|
||||||
if (allocatedBaseBlock == -1)
|
if (allocatedBaseBlock == -1)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gWindows[win].window = *template;
|
gWindows[win].window = *template;
|
||||||
@@ -233,10 +233,10 @@ void RemoveWindow(u8 windowId)
|
|||||||
|
|
||||||
if (GetNumActiveWindowsOnBg(bgLayer) == 0)
|
if (GetNumActiveWindowsOnBg(bgLayer) == 0)
|
||||||
{
|
{
|
||||||
if (gUnknown_03002F70[bgLayer] != nullsub_8)
|
if (gWindowBgTilemapBuffers[bgLayer] != DummyWindowBgTilemap)
|
||||||
{
|
{
|
||||||
Free(gUnknown_03002F70[bgLayer]);
|
Free(gWindowBgTilemapBuffers[bgLayer]);
|
||||||
gUnknown_03002F70[bgLayer] = 0;
|
gWindowBgTilemapBuffers[bgLayer] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,16 +251,16 @@ void FreeAllWindowBuffers(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < NUM_BACKGROUNDS; ++i)
|
||||||
{
|
{
|
||||||
if (gUnknown_03002F70[i] != NULL && gUnknown_03002F70[i] != nullsub_8)
|
if (gWindowBgTilemapBuffers[i] != NULL && gWindowBgTilemapBuffers[i] != DummyWindowBgTilemap)
|
||||||
{
|
{
|
||||||
Free(gUnknown_03002F70[i]);
|
Free(gWindowBgTilemapBuffers[i]);
|
||||||
gUnknown_03002F70[i] = NULL;
|
gWindowBgTilemapBuffers[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 0x20; ++i)
|
for (i = 0; i < WINDOWS_MAX; ++i)
|
||||||
{
|
{
|
||||||
if (gWindows[i].tileData != NULL)
|
if (gWindows[i].tileData != NULL)
|
||||||
{
|
{
|
||||||
@@ -448,16 +448,16 @@ void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16
|
|||||||
void CopyToWindowPixelBuffer(u8 windowId, const void *src, u16 size, u16 tileOffset)
|
void CopyToWindowPixelBuffer(u8 windowId, const void *src, u16 size, u16 tileOffset)
|
||||||
{
|
{
|
||||||
if (size != 0)
|
if (size != 0)
|
||||||
CpuCopy16(src, gWindows[windowId].tileData + (0x20 * tileOffset), size);
|
CpuCopy16(src, gWindows[windowId].tileData + (32 * tileOffset), size);
|
||||||
else
|
else
|
||||||
LZ77UnCompWram(src, gWindows[windowId].tileData + (0x20 * tileOffset));
|
LZ77UnCompWram(src, gWindows[windowId].tileData + (32 * tileOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets all pixels within the window to the fillValue color.
|
// Sets all pixels within the window to the fillValue color.
|
||||||
void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
||||||
{
|
{
|
||||||
int fillSize = gWindows[windowId].window.width * gWindows[windowId].window.height;
|
int fillSize = gWindows[windowId].window.width * gWindows[windowId].window.height;
|
||||||
CpuFastFill8(fillValue, gWindows[windowId].tileData, 0x20 * fillSize);
|
CpuFastFill8(fillValue, gWindows[windowId].tileData, 32 * fillSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MOVE_TILES_DOWN(a) \
|
#define MOVE_TILES_DOWN(a) \
|
||||||
@@ -599,7 +599,7 @@ static u8 GetNumActiveWindowsOnBg(u8 bgId)
|
|||||||
return windowsNum;
|
return windowsNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_9(void)
|
static void DummyWindowBgTilemap8Bit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -610,15 +610,15 @@ u16 AddWindow8Bit(const struct WindowTemplate *template)
|
|||||||
u8* memAddress;
|
u8* memAddress;
|
||||||
u8 bgLayer;
|
u8 bgLayer;
|
||||||
|
|
||||||
for (windowId = 0; windowId < 32; windowId++)
|
for (windowId = 0; windowId < WINDOWS_MAX; windowId++)
|
||||||
{
|
{
|
||||||
if (gWindows[windowId].window.bg == 0xFF)
|
if (gWindows[windowId].window.bg == 0xFF)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (windowId == WINDOWS_MAX)
|
if (windowId == WINDOWS_MAX)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
bgLayer = template->bg;
|
bgLayer = template->bg;
|
||||||
if (gUnknown_03002F70[bgLayer] == 0)
|
if (gWindowBgTilemapBuffers[bgLayer] == NULL)
|
||||||
{
|
{
|
||||||
u16 attribute = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
u16 attribute = GetBgAttribute(bgLayer, BG_ATTR_METRIC);
|
||||||
if (attribute != 0xFFFF)
|
if (attribute != 0xFFFF)
|
||||||
@@ -626,22 +626,22 @@ u16 AddWindow8Bit(const struct WindowTemplate *template)
|
|||||||
s32 i;
|
s32 i;
|
||||||
memAddress = Alloc(attribute);
|
memAddress = Alloc(attribute);
|
||||||
if (memAddress == NULL)
|
if (memAddress == NULL)
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
for (i = 0; i < attribute; i++) // if we're going to zero out the memory anyway, why not call AllocZeroed?
|
for (i = 0; i < attribute; i++) // if we're going to zero out the memory anyway, why not call AllocZeroed?
|
||||||
memAddress[i] = 0;
|
memAddress[i] = 0;
|
||||||
gUnknown_03002F70[bgLayer] = memAddress;
|
gWindowBgTilemapBuffers[bgLayer] = memAddress;
|
||||||
SetBgTilemapBuffer(bgLayer, memAddress);
|
SetBgTilemapBuffer(bgLayer, memAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memAddress = Alloc((u16)(0x40 * (template->width * template->height)));
|
memAddress = Alloc((u16)(64 * (template->width * template->height)));
|
||||||
if (memAddress == NULL)
|
if (memAddress == NULL)
|
||||||
{
|
{
|
||||||
if (GetNumActiveWindowsOnBg8Bit(bgLayer) == 0 && gUnknown_03002F70[bgLayer] != nullsub_9)
|
if (GetNumActiveWindowsOnBg8Bit(bgLayer) == 0 && gWindowBgTilemapBuffers[bgLayer] != DummyWindowBgTilemap8Bit)
|
||||||
{
|
{
|
||||||
Free(gUnknown_03002F70[bgLayer]);
|
Free(gWindowBgTilemapBuffers[bgLayer]);
|
||||||
gUnknown_03002F70[bgLayer] = NULL;
|
gWindowBgTilemapBuffers[bgLayer] = NULL;
|
||||||
}
|
}
|
||||||
return 0xFF;
|
return WINDOW_NONE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -656,7 +656,7 @@ void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue)
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 size;
|
s32 size;
|
||||||
|
|
||||||
size = (u16)(0x40 * (gWindows[windowId].window.width * gWindows[windowId].window.height));
|
size = (u16)(64 * (gWindows[windowId].window.width * gWindows[windowId].window.height));
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
gWindows[windowId].tileData[i] = fillValue;
|
gWindows[windowId].tileData[i] = fillValue;
|
||||||
}
|
}
|
||||||
@@ -691,7 +691,7 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
|
|||||||
void CopyWindowToVram8Bit(u8 windowId, u8 mode)
|
void CopyWindowToVram8Bit(u8 windowId, u8 mode)
|
||||||
{
|
{
|
||||||
sWindowPtr = &gWindows[windowId];
|
sWindowPtr = &gWindows[windowId];
|
||||||
sWindowSize = 0x40 * (sWindowPtr->window.width * sWindowPtr->window.height);
|
sWindowSize = 64 * (sWindowPtr->window.width * sWindowPtr->window.height);
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ struct WindowTemplate
|
|||||||
0, \
|
0, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WINDOW_NONE 0xFF
|
||||||
|
|
||||||
struct Window
|
struct Window
|
||||||
{
|
{
|
||||||
struct WindowTemplate window;
|
struct WindowTemplate window;
|
||||||
@@ -70,9 +72,9 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
|
|||||||
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
|
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
|
||||||
|
|
||||||
extern struct Window gWindows[];
|
extern struct Window gWindows[];
|
||||||
extern void* gUnknown_03002F70[];
|
extern void* gWindowBgTilemapBuffers[];
|
||||||
extern u32 filler_03002F58;
|
extern u32 gUnusedWindowVar1;
|
||||||
extern u32 filler_03002F5C;
|
extern u32 gUnusedWindowVar2;
|
||||||
extern u32 filler_03002F64;
|
extern u32 gUnusedWindowVar3;
|
||||||
|
|
||||||
#endif // GUARD_WINDOW_H
|
#endif // GUARD_WINDOW_H
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 486 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 257 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
@@ -51,6 +51,7 @@
|
|||||||
#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used
|
#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used
|
||||||
#define NUM_CONTEST_WINNERS 13
|
#define NUM_CONTEST_WINNERS 13
|
||||||
#define UNION_ROOM_KB_ROW_COUNT 10
|
#define UNION_ROOM_KB_ROW_COUNT 10
|
||||||
|
#define GIFT_RIBBONS_COUNT 11
|
||||||
|
|
||||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
#define MON_DATA_NATIONAL_RIBBON 76
|
#define MON_DATA_NATIONAL_RIBBON 76
|
||||||
#define MON_DATA_EARTH_RIBBON 77
|
#define MON_DATA_EARTH_RIBBON 77
|
||||||
#define MON_DATA_WORLD_RIBBON 78
|
#define MON_DATA_WORLD_RIBBON 78
|
||||||
#define MON_DATA_FILLER 79
|
#define MON_DATA_UNUSED_RIBBONS 79
|
||||||
#define MON_DATA_EVENT_LEGAL 80
|
#define MON_DATA_EVENT_LEGAL 80
|
||||||
#define MON_DATA_KNOWN_MOVES 81
|
#define MON_DATA_KNOWN_MOVES 81
|
||||||
#define MON_DATA_RIBBON_COUNT 82
|
#define MON_DATA_RIBBON_COUNT 82
|
||||||
@@ -182,6 +182,55 @@
|
|||||||
#define MON_DATA_SPATK2 87
|
#define MON_DATA_SPATK2 87
|
||||||
#define MON_DATA_SPDEF2 88
|
#define MON_DATA_SPDEF2 88
|
||||||
|
|
||||||
|
// Ribbon IDs used by TV and Pokénav
|
||||||
|
#define CHAMPION_RIBBON 0
|
||||||
|
#define COOL_RIBBON_NORMAL 1
|
||||||
|
#define COOL_RIBBON_SUPER 2
|
||||||
|
#define COOL_RIBBON_HYPER 3
|
||||||
|
#define COOL_RIBBON_MASTER 4
|
||||||
|
#define BEAUTY_RIBBON_NORMAL 5
|
||||||
|
#define BEAUTY_RIBBON_SUPER 6
|
||||||
|
#define BEAUTY_RIBBON_HYPER 7
|
||||||
|
#define BEAUTY_RIBBON_MASTER 8
|
||||||
|
#define CUTE_RIBBON_NORMAL 9
|
||||||
|
#define CUTE_RIBBON_SUPER 10
|
||||||
|
#define CUTE_RIBBON_HYPER 11
|
||||||
|
#define CUTE_RIBBON_MASTER 12
|
||||||
|
#define SMART_RIBBON_NORMAL 13
|
||||||
|
#define SMART_RIBBON_SUPER 14
|
||||||
|
#define SMART_RIBBON_HYPER 15
|
||||||
|
#define SMART_RIBBON_MASTER 16
|
||||||
|
#define TOUGH_RIBBON_NORMAL 17
|
||||||
|
#define TOUGH_RIBBON_SUPER 18
|
||||||
|
#define TOUGH_RIBBON_HYPER 19
|
||||||
|
#define TOUGH_RIBBON_MASTER 20
|
||||||
|
#define WINNING_RIBBON 21
|
||||||
|
#define VICTORY_RIBBON 22
|
||||||
|
#define ARTIST_RIBBON 23
|
||||||
|
#define EFFORT_RIBBON 24
|
||||||
|
#define MARINE_RIBBON 25
|
||||||
|
#define LAND_RIBBON 26
|
||||||
|
#define SKY_RIBBON 27
|
||||||
|
#define COUNTRY_RIBBON 28
|
||||||
|
#define NATIONAL_RIBBON 29
|
||||||
|
#define EARTH_RIBBON 30
|
||||||
|
#define WORLD_RIBBON 31
|
||||||
|
|
||||||
|
#define FIRST_GIFT_RIBBON MARINE_RIBBON
|
||||||
|
#define LAST_GIFT_RIBBON WORLD_RIBBON
|
||||||
|
#define NUM_GIFT_RIBBONS (1 + LAST_GIFT_RIBBON - FIRST_GIFT_RIBBON)
|
||||||
|
|
||||||
|
// The above gift ribbons (Marine - World) are
|
||||||
|
// special distribution ribbons that correspond to
|
||||||
|
// 1 bit each in the Pokémon struct. Gen 4 hard-codes
|
||||||
|
// each of these to the given name. In Gen 3 they're
|
||||||
|
// used to get an index into giftRibbons in the save block,
|
||||||
|
// which can have a value 0-64 (0 is 'no ribbon') that
|
||||||
|
// corresponds to one of the special ribbons listed
|
||||||
|
// in gGiftRibbonDescriptionPointers. Most of these were
|
||||||
|
// never distributed
|
||||||
|
#define MAX_GIFT_RIBBON 64
|
||||||
|
|
||||||
#define MIN_LEVEL 1
|
#define MIN_LEVEL 1
|
||||||
#define MAX_LEVEL 100
|
#define MAX_LEVEL 100
|
||||||
|
|
||||||
|
|||||||
@@ -188,4 +188,22 @@
|
|||||||
#define CONTESTLIVE_FLAG_LAST_BOTH_ROUNDS (1 << 6)
|
#define CONTESTLIVE_FLAG_LAST_BOTH_ROUNDS (1 << 6)
|
||||||
#define CONTESTLIVE_FLAG_NO_APPEALS (1 << 7)
|
#define CONTESTLIVE_FLAG_NO_APPEALS (1 << 7)
|
||||||
|
|
||||||
|
// TV Show states for Spot the Cuties
|
||||||
|
#define SPOTCUTIES_STATE_INTRO 0
|
||||||
|
#define SPOTCUTIES_STATE_RIBBONS_LOW 1
|
||||||
|
#define SPOTCUTIES_STATE_RIBBONS_MID 2
|
||||||
|
#define SPOTCUTIES_STATE_RIBBONS_HIGH 3
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_INTRO 4
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_CHAMPION 5
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_COOL 6
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_BEAUTY 7
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_CUTE 8
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_SMART 9
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_TOUGH 10
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_WINNING 11
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_VICTORY 12
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_ARTIST 13
|
||||||
|
#define SPOTCUTIES_STATE_RIBBON_EFFORT 14
|
||||||
|
#define SPOTCUTIES_STATE_OUTRO 15
|
||||||
|
|
||||||
#endif //GUARD_CONSTANTS_TV_H
|
#endif //GUARD_CONSTANTS_TV_H
|
||||||
|
|||||||
@@ -196,22 +196,22 @@ extern const u8 gTVTrainerFanClubText08[];
|
|||||||
extern const u8 gTVTrainerFanClubText09[];
|
extern const u8 gTVTrainerFanClubText09[];
|
||||||
extern const u8 gTVTrainerFanClubText10[];
|
extern const u8 gTVTrainerFanClubText10[];
|
||||||
extern const u8 gTVTrainerFanClubText11[];
|
extern const u8 gTVTrainerFanClubText11[];
|
||||||
extern const u8 gTVCutiesText00[];
|
extern const u8 TVSpotTheCuties_Text_Intro[];
|
||||||
extern const u8 gTVCutiesText01[];
|
extern const u8 TVSpotTheCuties_Text_RibbonsLow[];
|
||||||
extern const u8 gTVCutiesText02[];
|
extern const u8 TVSpotTheCuties_Text_RibbonsMid[];
|
||||||
extern const u8 gTVCutiesText03[];
|
extern const u8 TVSpotTheCuties_Text_RibbonsHigh[];
|
||||||
extern const u8 gTVCutiesText04[];
|
extern const u8 TVSpotTheCuties_Text_RibbonIntro[];
|
||||||
extern const u8 gTVCutiesText05[];
|
extern const u8 TVSpotTheCuties_Text_RibbonChampion[];
|
||||||
extern const u8 gTVCutiesText06[];
|
extern const u8 TVSpotTheCuties_Text_RibbonCool[];
|
||||||
extern const u8 gTVCutiesText07[];
|
extern const u8 TVSpotTheCuties_Text_RibbonBeauty[];
|
||||||
extern const u8 gTVCutiesText08[];
|
extern const u8 TVSpotTheCuties_Text_RibbonCute[];
|
||||||
extern const u8 gTVCutiesText09[];
|
extern const u8 TVSpotTheCuties_Text_RibbonSmart[];
|
||||||
extern const u8 gTVCutiesText10[];
|
extern const u8 TVSpotTheCuties_Text_RibbonTough[];
|
||||||
extern const u8 gTVCutiesText11[];
|
extern const u8 TVSpotTheCuties_Text_RibbonWinning[];
|
||||||
extern const u8 gTVCutiesText12[];
|
extern const u8 TVSpotTheCuties_Text_RibbonVictory[];
|
||||||
extern const u8 gTVCutiesText13[];
|
extern const u8 TVSpotTheCuties_Text_RibbonArtist[];
|
||||||
extern const u8 gTVCutiesText14[];
|
extern const u8 TVSpotTheCuties_Text_RibbonEffort[];
|
||||||
extern const u8 gTVCutiesText15[];
|
extern const u8 TVSpotTheCuties_Text_Outro[];
|
||||||
extern const u8 gTVPokemonNewsBattleFrontierText00[];
|
extern const u8 gTVPokemonNewsBattleFrontierText00[];
|
||||||
extern const u8 gTVPokemonNewsBattleFrontierText01[];
|
extern const u8 gTVPokemonNewsBattleFrontierText01[];
|
||||||
extern const u8 gTVPokemonNewsBattleFrontierText02[];
|
extern const u8 gTVPokemonNewsBattleFrontierText02[];
|
||||||
|
|||||||
@@ -50,6 +50,8 @@
|
|||||||
#define BG_TILE_H_FLIP(n) (0x400 + (n))
|
#define BG_TILE_H_FLIP(n) (0x400 + (n))
|
||||||
#define BG_TILE_V_FLIP(n) (0x800 + (n))
|
#define BG_TILE_V_FLIP(n) (0x800 + (n))
|
||||||
|
|
||||||
|
#define NUM_BACKGROUNDS 4
|
||||||
|
|
||||||
// text-mode BG
|
// text-mode BG
|
||||||
#define OBJ_VRAM0 (VRAM + 0x10000)
|
#define OBJ_VRAM0 (VRAM + 0x10000)
|
||||||
#define OBJ_VRAM0_SIZE 0x8000
|
#define OBJ_VRAM0_SIZE 0x8000
|
||||||
|
|||||||
@@ -905,7 +905,7 @@ struct ExternalEventData
|
|||||||
u8 unknownExternalDataFields1[7]; // if actually used, may be broken up into different fields.
|
u8 unknownExternalDataFields1[7]; // if actually used, may be broken up into different fields.
|
||||||
u32 unknownExternalDataFields2:8;
|
u32 unknownExternalDataFields2:8;
|
||||||
u32 currentPokeCoupons:24; // PokéCoupons stored by Pokémon Colosseum and XD from Mt. Battle runs. Earned PokéCoupons are also added to totalEarnedPokeCoupons. Colosseum/XD caps this at 9,999,999, but will read up to 16,777,215.
|
u32 currentPokeCoupons:24; // PokéCoupons stored by Pokémon Colosseum and XD from Mt. Battle runs. Earned PokéCoupons are also added to totalEarnedPokeCoupons. Colosseum/XD caps this at 9,999,999, but will read up to 16,777,215.
|
||||||
u32 gotGoldPokeCouponTitleReward:1; // Master Ball from Jp Colosseum Bonus Disc; for reaching 30,000 totalEarnedPokeCoupons
|
u32 gotGoldPokeCouponTitleReward:1; // Master Ball from JP Colosseum Bonus Disc; for reaching 30,000 totalEarnedPokeCoupons
|
||||||
u32 gotSilverPokeCouponTitleReward:1; // Light Ball Pikachu from JP Colosseum Bonus Disc; for reaching 5000 totalEarnedPokeCoupons
|
u32 gotSilverPokeCouponTitleReward:1; // Light Ball Pikachu from JP Colosseum Bonus Disc; for reaching 5000 totalEarnedPokeCoupons
|
||||||
u32 gotBronzePokeCouponTitleReward:1; // PP Max from JP Colosseum Bonus Disc; for reaching 2500 totalEarnedPokeCoupons
|
u32 gotBronzePokeCouponTitleReward:1; // PP Max from JP Colosseum Bonus Disc; for reaching 2500 totalEarnedPokeCoupons
|
||||||
u32 receivedAgetoCelebi:1; // from JP Colosseum Bonus Disc
|
u32 receivedAgetoCelebi:1; // from JP Colosseum Bonus Disc
|
||||||
@@ -919,7 +919,7 @@ struct ExternalEventData
|
|||||||
struct ExternalEventFlags
|
struct ExternalEventFlags
|
||||||
{
|
{
|
||||||
u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
|
u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
|
||||||
u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1500 deposited)
|
u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1499 deposited)
|
||||||
u8 padding:5;
|
u8 padding:5;
|
||||||
u8 unknownFlag1;
|
u8 unknownFlag1;
|
||||||
u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
|
u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
|
||||||
@@ -1017,7 +1017,7 @@ struct SaveBlock1
|
|||||||
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
|
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
|
||||||
/*0x3030*/ struct DayCare daycare;
|
/*0x3030*/ struct DayCare daycare;
|
||||||
/*0x3150*/ struct LinkBattleRecords linkBattleRecords;
|
/*0x3150*/ struct LinkBattleRecords linkBattleRecords;
|
||||||
/*0x31A8*/ u8 giftRibbons[11];
|
/*0x31A8*/ u8 giftRibbons[GIFT_RIBBONS_COUNT];
|
||||||
/*0x31B3*/ struct ExternalEventData externalEventData;
|
/*0x31B3*/ struct ExternalEventData externalEventData;
|
||||||
/*0x31C7*/ struct ExternalEventFlags externalEventFlags;
|
/*0x31C7*/ struct ExternalEventFlags externalEventFlags;
|
||||||
/*0x31DC*/ struct Roamer roamer;
|
/*0x31DC*/ struct Roamer roamer;
|
||||||
|
|||||||
@@ -4033,9 +4033,9 @@ extern const u32 gPokenavLeftHeaderBeauty_Gfx[];
|
|||||||
extern const u32 gPokenavLeftHeaderCute_Gfx[];
|
extern const u32 gPokenavLeftHeaderCute_Gfx[];
|
||||||
extern const u32 gPokenavLeftHeaderSmart_Gfx[];
|
extern const u32 gPokenavLeftHeaderSmart_Gfx[];
|
||||||
extern const u32 gPokenavLeftHeaderTough_Gfx[];
|
extern const u32 gPokenavLeftHeaderTough_Gfx[];
|
||||||
extern const u16 gUnknown_08DDE010[];
|
extern const u16 gPokenavRibbonsSummaryBg_Pal[];
|
||||||
extern const u32 gUnknown_08DDE030[];
|
extern const u32 gPokenavRibbonsSummaryBg_Gfx[];
|
||||||
extern const u32 gUnknown_08DDE12C[];
|
extern const u32 gPokenavRibbonsSummaryBg_Tilemap[];
|
||||||
|
|
||||||
extern const u32 gPageInfoTilemap[];
|
extern const u32 gPageInfoTilemap[];
|
||||||
extern const u32 gUnknown_08D98CC8[];
|
extern const u32 gUnknown_08D98CC8[];
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ struct PokemonSubstruct3
|
|||||||
/* 0x0B */ u32 nationalRibbon:1;
|
/* 0x0B */ u32 nationalRibbon:1;
|
||||||
/* 0x0B */ u32 earthRibbon:1;
|
/* 0x0B */ u32 earthRibbon:1;
|
||||||
/* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
|
/* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
|
||||||
/* 0x0B */ u32 filler:4;
|
/* 0x0B */ u32 unusedRibbons:4; // discarded in Gen 4
|
||||||
/* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness.
|
/* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2765,7 +2765,11 @@ static void AwardBattleTowerRibbons(void)
|
|||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
u32 partyIndex;
|
u32 partyIndex;
|
||||||
|
#ifdef BUGFIX
|
||||||
|
struct RibbonCounter ribbons[MAX_FRONTIER_PARTY_SIZE];
|
||||||
|
#else
|
||||||
struct RibbonCounter ribbons[3]; // BUG: 4 Pokemon can receive ribbons in a double battle mode.
|
struct RibbonCounter ribbons[3]; // BUG: 4 Pokemon can receive ribbons in a double battle mode.
|
||||||
|
#endif
|
||||||
u8 ribbonType = 0;
|
u8 ribbonType = 0;
|
||||||
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||||
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _("for a loved POKéMON.")
|
|||||||
const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows");
|
const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows");
|
||||||
const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON.");
|
const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON.");
|
||||||
|
|
||||||
const u8 *const gGiftRibbonDescriptionPointers[][2] =
|
const u8 *const gGiftRibbonDescriptionPointers[MAX_GIFT_RIBBON][2] =
|
||||||
{
|
{
|
||||||
{gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
|
{gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||||
{gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion},
|
{gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||||
|
|||||||
@@ -20,29 +20,29 @@ const u8 gRibbonDescriptionPart2_Effort[] = _("being a hard worker.");
|
|||||||
|
|
||||||
const u8 *const gRibbonDescriptionPointers[][2] =
|
const u8 *const gRibbonDescriptionPointers[][2] =
|
||||||
{
|
{
|
||||||
{gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion},
|
[CHAMPION_RIBBON] = {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion},
|
||||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank},
|
[COOL_RIBBON_NORMAL] = {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank},
|
||||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank},
|
[COOL_RIBBON_SUPER] = {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank},
|
||||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank},
|
[COOL_RIBBON_HYPER] = {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank},
|
||||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank},
|
[COOL_RIBBON_MASTER] = {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank},
|
||||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank},
|
[BEAUTY_RIBBON_NORMAL] = {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank},
|
||||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank},
|
[BEAUTY_RIBBON_SUPER] = {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank},
|
||||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank},
|
[BEAUTY_RIBBON_HYPER] = {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank},
|
||||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank},
|
[BEAUTY_RIBBON_MASTER] = {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank},
|
||||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank},
|
[CUTE_RIBBON_NORMAL] = {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank},
|
||||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank},
|
[CUTE_RIBBON_SUPER] = {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank},
|
||||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank},
|
[CUTE_RIBBON_HYPER] = {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank},
|
||||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank},
|
[CUTE_RIBBON_MASTER] = {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank},
|
||||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank},
|
[SMART_RIBBON_NORMAL] = {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank},
|
||||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank},
|
[SMART_RIBBON_SUPER] = {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank},
|
||||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank},
|
[SMART_RIBBON_HYPER] = {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank},
|
||||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank},
|
[SMART_RIBBON_MASTER] = {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank},
|
||||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank},
|
[TOUGH_RIBBON_NORMAL] = {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank},
|
||||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank},
|
[TOUGH_RIBBON_SUPER] = {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank},
|
||||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank},
|
[TOUGH_RIBBON_HYPER] = {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank},
|
||||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank},
|
[TOUGH_RIBBON_MASTER] = {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank},
|
||||||
{gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning},
|
[WINNING_RIBBON] = {gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning},
|
||||||
{gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory},
|
[VICTORY_RIBBON] = {gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory},
|
||||||
{gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist},
|
[ARTIST_RIBBON] = {gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist},
|
||||||
{gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort},
|
[EFFORT_RIBBON] = {gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -553,20 +553,20 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
|||||||
const struct Evolution *evos2;
|
const struct Evolution *evos2;
|
||||||
|
|
||||||
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies][1].targetSpecies));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]);
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data);
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data);
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, &data);
|
||||||
|
|
||||||
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + CONTEST_CATEGORIES_COUNT; i++)
|
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + CONTEST_CATEGORIES_COUNT; i++)
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);
|
||||||
for (i = MON_DATA_CHAMPION_RIBBON; i <= MON_DATA_FILLER; i++)
|
for (i = MON_DATA_CHAMPION_RIBBON; i <= MON_DATA_UNUSED_RIBBONS; i++)
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], i, &data);
|
||||||
|
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_STATUS, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_STATUS, &data);
|
||||||
data = 0xFF;
|
data = 0xFF;
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MAIL, (&data));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MAIL, &data);
|
||||||
|
|
||||||
CalculateMonStats(&gPlayerParty[gPlayerPartyCount]);
|
CalculateMonStats(&gPlayerParty[gPlayerPartyCount]);
|
||||||
CalculatePlayerPartyCount();
|
CalculatePlayerPartyCount();
|
||||||
|
|||||||
@@ -1408,7 +1408,7 @@ void GiveLeadMonEffortRibbon(void)
|
|||||||
SetMonData(leadMon, MON_DATA_EFFORT_RIBBON, &ribbonSet);
|
SetMonData(leadMon, MON_DATA_EFFORT_RIBBON, &ribbonSet);
|
||||||
if (GetRibbonCount(leadMon) > NUM_CUTIES_RIBBONS)
|
if (GetRibbonCount(leadMon) > NUM_CUTIES_RIBBONS)
|
||||||
{
|
{
|
||||||
TryPutSpotTheCutiesOnAir(leadMon, 0x47);
|
TryPutSpotTheCutiesOnAir(leadMon, MON_DATA_EFFORT_RIBBON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1506,11 +1506,9 @@ const u16 gWallpaperPalettes_Ribbon[][16] =
|
|||||||
const u32 gWallpaperTiles_Ribbon[] = INCBIN_U32("graphics/pokemon_storage/ribbon.4bpp.lz");
|
const u32 gWallpaperTiles_Ribbon[] = INCBIN_U32("graphics/pokemon_storage/ribbon.4bpp.lz");
|
||||||
const u32 gWallpaperTilemap_Ribbon[] = INCBIN_U32("graphics/pokemon_storage/ribbon.bin.lz");
|
const u32 gWallpaperTilemap_Ribbon[] = INCBIN_U32("graphics/pokemon_storage/ribbon.bin.lz");
|
||||||
|
|
||||||
// pokenav
|
const u16 gPokenavRibbonsSummaryBg_Pal[] = INCBIN_U16("graphics/pokenav/ribbons/summary_bg.gbapal");
|
||||||
|
const u32 gPokenavRibbonsSummaryBg_Gfx[] = INCBIN_U32("graphics/pokenav/ribbons/summary_bg.4bpp.lz");
|
||||||
const u16 gUnknown_08DDE010[] = INCBIN_U16("graphics/pokenav/ribbons.gbapal");
|
const u32 gPokenavRibbonsSummaryBg_Tilemap[] = INCBIN_U32("graphics/pokenav/ribbons/summary_bg.bin.lz");
|
||||||
const u32 gUnknown_08DDE030[] = INCBIN_U32("graphics/pokenav/ribbons.4bpp.lz");
|
|
||||||
const u32 gUnknown_08DDE12C[] = INCBIN_U32("graphics/pokenav/ribbons.bin.lz");
|
|
||||||
|
|
||||||
const u16 gMonIconPalettes[][16] =
|
const u16 gMonIconPalettes[][16] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3928,8 +3928,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
|||||||
case MON_DATA_WORLD_RIBBON:
|
case MON_DATA_WORLD_RIBBON:
|
||||||
retVal = substruct3->worldRibbon;
|
retVal = substruct3->worldRibbon;
|
||||||
break;
|
break;
|
||||||
case MON_DATA_FILLER:
|
case MON_DATA_UNUSED_RIBBONS:
|
||||||
retVal = substruct3->filler;
|
retVal = substruct3->unusedRibbons;
|
||||||
break;
|
break;
|
||||||
case MON_DATA_EVENT_LEGAL:
|
case MON_DATA_EVENT_LEGAL:
|
||||||
retVal = substruct3->eventLegal;
|
retVal = substruct3->eventLegal;
|
||||||
@@ -4307,8 +4307,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
|||||||
case MON_DATA_WORLD_RIBBON:
|
case MON_DATA_WORLD_RIBBON:
|
||||||
SET8(substruct3->worldRibbon);
|
SET8(substruct3->worldRibbon);
|
||||||
break;
|
break;
|
||||||
case MON_DATA_FILLER:
|
case MON_DATA_UNUSED_RIBBONS:
|
||||||
SET8(substruct3->filler);
|
SET8(substruct3->unusedRibbons);
|
||||||
break;
|
break;
|
||||||
case MON_DATA_EVENT_LEGAL:
|
case MON_DATA_EVENT_LEGAL:
|
||||||
SET8(substruct3->eventLegal);
|
SET8(substruct3->eventLegal);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
#define POKE_ICON_BASE_PAL_TAG 56000
|
#define POKE_ICON_BASE_PAL_TAG 56000
|
||||||
|
|
||||||
|
#define INVALID_ICON_SPECIES SPECIES_OLD_UNOWN_J // Oddly specific, used when an icon should be a ?. Any of the 'old unown' would work
|
||||||
|
|
||||||
struct MonIconSpriteTemplate
|
struct MonIconSpriteTemplate
|
||||||
{
|
{
|
||||||
const struct OamData *oam;
|
const struct OamData *oam;
|
||||||
@@ -1086,7 +1088,7 @@ u16 GetIconSpecies(u16 species, u32 personality)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
result = 260;
|
result = INVALID_ICON_SPECIES;
|
||||||
else
|
else
|
||||||
result = species;
|
result = species;
|
||||||
}
|
}
|
||||||
@@ -1117,7 +1119,7 @@ u16 sub_80D2E84(u16 species)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (species > (SPECIES_UNOWN_B - 1))
|
if (species > (SPECIES_UNOWN_B - 1))
|
||||||
species = SPECIES_OLD_UNOWN_J; // That's an oddly specific species.
|
species = INVALID_ICON_SPECIES;
|
||||||
return GetIconSpecies(species, 0);
|
return GetIconSpecies(species, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1144,7 +1146,7 @@ void SafeLoadMonIconPalette(u16 species)
|
|||||||
{
|
{
|
||||||
u8 palIndex;
|
u8 palIndex;
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
species = 260;
|
species = INVALID_ICON_SPECIES;
|
||||||
palIndex = gMonIconPaletteIndices[species];
|
palIndex = gMonIconPaletteIndices[species];
|
||||||
if (IndexOfSpritePaletteTag(gMonIconPaletteTable[palIndex].tag) == 0xFF)
|
if (IndexOfSpritePaletteTag(gMonIconPaletteTable[palIndex].tag) == 0xFF)
|
||||||
LoadSpritePalette(&gMonIconPaletteTable[palIndex]);
|
LoadSpritePalette(&gMonIconPaletteTable[palIndex]);
|
||||||
@@ -1160,7 +1162,7 @@ void LoadMonIconPalette(u16 species)
|
|||||||
void FreeMonIconPalettes(void)
|
void FreeMonIconPalettes(void)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < ARRAY_COUNT(gMonIconPaletteTable); i++)
|
||||||
FreeSpritePaletteByTag(gMonIconPaletteTable[i].tag);
|
FreeSpritePaletteByTag(gMonIconPaletteTable[i].tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,7 +1171,7 @@ void SafeFreeMonIconPalette(u16 species)
|
|||||||
{
|
{
|
||||||
u8 palIndex;
|
u8 palIndex;
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
species = 260;
|
species = INVALID_ICON_SPECIES;
|
||||||
palIndex = gMonIconPaletteIndices[species];
|
palIndex = gMonIconPaletteIndices[species];
|
||||||
FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag);
|
FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag);
|
||||||
}
|
}
|
||||||
@@ -1216,7 +1218,7 @@ void sub_80D304C(u16 offset)
|
|||||||
u8 GetValidMonIconPalIndex(u16 species)
|
u8 GetValidMonIconPalIndex(u16 species)
|
||||||
{
|
{
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
species = 260;
|
species = INVALID_ICON_SPECIES;
|
||||||
return gMonIconPaletteIndices[species];
|
return gMonIconPaletteIndices[species];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1228,7 +1230,7 @@ u8 GetMonIconPaletteIndexFromSpecies(u16 species)
|
|||||||
const u16* GetValidMonIconPalettePtr(u16 species)
|
const u16* GetValidMonIconPalettePtr(u16 species)
|
||||||
{
|
{
|
||||||
if (species > NUM_SPECIES)
|
if (species > NUM_SPECIES)
|
||||||
species = 260;
|
species = INVALID_ICON_SPECIES;
|
||||||
return gMonIconPaletteTable[gMonIconPaletteIndices[species]].data;
|
return gMonIconPaletteTable[gMonIconPaletteIndices[species]].data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ static const struct UnknownStruct sBigMonSizeTable[] =
|
|||||||
{ 1700, 1, -26 },
|
{ 1700, 1, -26 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 sGiftRibbonsMonDataIds[] =
|
// - 4 for unused gift ribbon bits in MON_DATA_UNUSED_RIBBONS
|
||||||
|
static const u8 sGiftRibbonsMonDataIds[GIFT_RIBBONS_COUNT - 4] =
|
||||||
{
|
{
|
||||||
MON_DATA_MARINE_RIBBON, MON_DATA_LAND_RIBBON, MON_DATA_SKY_RIBBON,
|
MON_DATA_MARINE_RIBBON, MON_DATA_LAND_RIBBON, MON_DATA_SKY_RIBBON,
|
||||||
MON_DATA_COUNTRY_RIBBON, MON_DATA_NATIONAL_RIBBON, MON_DATA_EARTH_RIBBON,
|
MON_DATA_COUNTRY_RIBBON, MON_DATA_NATIONAL_RIBBON, MON_DATA_EARTH_RIBBON,
|
||||||
@@ -197,10 +198,10 @@ void GiveGiftRibbonToParty(u8 index, u8 ribbonId)
|
|||||||
s32 i;
|
s32 i;
|
||||||
bool32 gotRibbon = FALSE;
|
bool32 gotRibbon = FALSE;
|
||||||
u8 data = 1;
|
u8 data = 1;
|
||||||
u8 array[8];
|
u8 array[ARRAY_COUNT(sGiftRibbonsMonDataIds)];
|
||||||
memcpy(array, sGiftRibbonsMonDataIds, sizeof(sGiftRibbonsMonDataIds));
|
memcpy(array, sGiftRibbonsMonDataIds, sizeof(sGiftRibbonsMonDataIds));
|
||||||
|
|
||||||
if (index < 11 && ribbonId < 65)
|
if (index < GIFT_RIBBONS_COUNT && ribbonId <= MAX_GIFT_RIBBON)
|
||||||
{
|
{
|
||||||
gSaveBlock1Ptr->giftRibbons[index] = ribbonId;
|
gSaveBlock1Ptr->giftRibbons[index] = ribbonId;
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ struct PokenavSub10
|
|||||||
static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr);
|
static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr);
|
||||||
static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr);
|
static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr);
|
||||||
static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr);
|
static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr);
|
||||||
static u32 sub_81CFB10(struct PokenavSub9 *structPtr);
|
static u32 RibbonsMonMenu_ToSummaryScreen(struct PokenavSub9 *structPtr);
|
||||||
static u32 BuildPartyMonRibbonList(s32 state);
|
static u32 BuildPartyMonRibbonList(s32 state);
|
||||||
static u32 InitBoxMonRibbonList(s32 state);
|
static u32 InitBoxMonRibbonList(s32 state);
|
||||||
static u32 BuildBoxMonRibbonList(s32 state);
|
static u32 BuildBoxMonRibbonList(s32 state);
|
||||||
@@ -71,10 +71,10 @@ static const LoopedTask sMonRibbonListLoopTaskFuncs[] =
|
|||||||
BuildBoxMonRibbonList
|
BuildBoxMonRibbonList
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sMonRibbonListFramePal[] = INCBIN_U16("graphics/pokenav/ui_ribbons.gbapal");
|
static const u16 sMonRibbonListFramePal[] = INCBIN_U16("graphics/pokenav/ribbons/list_bg.gbapal");
|
||||||
static const u32 sMonRibbonListFrameTiles[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz");
|
static const u32 sMonRibbonListFrameTiles[] = INCBIN_U32("graphics/pokenav/ribbons/list_bg.4bpp.lz");
|
||||||
static const u32 sMonRibbonListFrameTilemap[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz");
|
static const u32 sMonRibbonListFrameTilemap[] = INCBIN_U32("graphics/pokenav/ribbons/list_bg.bin.lz");
|
||||||
static const u16 gUnknown_08623790[] = INCBIN_U16("graphics/pokenav/8623790.gbapal");
|
static const u16 sMonRibbonListUi_Pal[] = INCBIN_U16("graphics/pokenav/ribbons/list_ui.gbapal");
|
||||||
|
|
||||||
static const struct BgTemplate sMonRibbonListBgTemplates[] =
|
static const struct BgTemplate sMonRibbonListBgTemplates[] =
|
||||||
{
|
{
|
||||||
@@ -192,7 +192,7 @@ static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr)
|
|||||||
{
|
{
|
||||||
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
||||||
structPtr->saveMonList = 1;
|
structPtr->saveMonList = 1;
|
||||||
structPtr->callback = sub_81CFB10;
|
structPtr->callback = RibbonsMonMenu_ToSummaryScreen;
|
||||||
return RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY;
|
return RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY;
|
||||||
}
|
}
|
||||||
return RIBBONS_MON_LIST_FUNC_NONE;
|
return RIBBONS_MON_LIST_FUNC_NONE;
|
||||||
@@ -203,7 +203,7 @@ static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr)
|
|||||||
return POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS;
|
return POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 sub_81CFB10(struct PokenavSub9 *structPtr)
|
static u32 RibbonsMonMenu_ToSummaryScreen(struct PokenavSub9 *structPtr)
|
||||||
{
|
{
|
||||||
return POKENAV_RIBBONS_SUMMARY_SCREEN;
|
return POKENAV_RIBBONS_SUMMARY_SCREEN;
|
||||||
}
|
}
|
||||||
@@ -342,8 +342,8 @@ static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *it
|
|||||||
structPtr->monList->listCount++;
|
structPtr->monList->listCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//unused
|
// Unused
|
||||||
static bool32 Unused_PlayerHasRibbonsMon(void)
|
static bool32 PlayerHasRibbonsMon(void)
|
||||||
{
|
{
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
|
|
||||||
@@ -446,7 +446,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state)
|
|||||||
case 2:
|
case 2:
|
||||||
if (FreeTempTileDataBuffersIfPossible())
|
if (FreeTempTileDataBuffersIfPossible())
|
||||||
return LT_PAUSE;
|
return LT_PAUSE;
|
||||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623790, 0x20, 0x20);
|
CopyPaletteIntoBufferUnfaded(sMonRibbonListUi_Pal, 0x20, 0x20);
|
||||||
InitMonRibbonPokenavListMenuTemplate();
|
InitMonRibbonPokenavListMenuTemplate();
|
||||||
return LT_INC_AND_PAUSE;
|
return LT_INC_AND_PAUSE;
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ static EWRAM_DATA struct {
|
|||||||
/*0x007F*/ u8 unused_7F;
|
/*0x007F*/ u8 unused_7F;
|
||||||
/*0x0080*/ u16 linkData[20];
|
/*0x0080*/ u16 linkData[20];
|
||||||
/*0x00A8*/ u8 timer;
|
/*0x00A8*/ u8 timer;
|
||||||
/*0x00A9*/ u8 giftRibbons[11];
|
/*0x00A9*/ u8 giftRibbons[GIFT_RIBBONS_COUNT];
|
||||||
/*0x00B4*/ u8 filler_B4[0x8D0-0xB4];
|
/*0x00B4*/ u8 filler_B4[0x8D0-0xB4];
|
||||||
/*0x08D0*/ struct {
|
/*0x08D0*/ struct {
|
||||||
bool8 queued;
|
bool8 queued;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ static void sub_80EF120(u16 days);
|
|||||||
static void sub_80EDA48(u16 days);
|
static void sub_80EDA48(u16 days);
|
||||||
static void sub_80EEB98(u16 days);
|
static void sub_80EEB98(u16 days);
|
||||||
void PutFishingAdviceShowOnTheAir(void);
|
void PutFishingAdviceShowOnTheAir(void);
|
||||||
u8 TV_MonDataIdxToRibbon(u8 monDataIdx);
|
static u8 MonDataIdxToRibbon(u8 monDataIdx);
|
||||||
static void sub_80EEBF4(u8 actionIdx);
|
static void sub_80EEBF4(u8 actionIdx);
|
||||||
bool8 IsPriceDiscounted(u8 newsKind);
|
bool8 IsPriceDiscounted(u8 newsKind);
|
||||||
static void InterviewBefore_FanClubLetter(void);
|
static void InterviewBefore_FanClubLetter(void);
|
||||||
@@ -592,22 +592,22 @@ static const u8 *const sTVTrainerFanClubTextGroup[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u8 *const sTVCutiesTextGroup[] = {
|
static const u8 *const sTVCutiesTextGroup[] = {
|
||||||
gTVCutiesText00,
|
[SPOTCUTIES_STATE_INTRO] = TVSpotTheCuties_Text_Intro,
|
||||||
gTVCutiesText01,
|
[SPOTCUTIES_STATE_RIBBONS_LOW] = TVSpotTheCuties_Text_RibbonsLow,
|
||||||
gTVCutiesText02,
|
[SPOTCUTIES_STATE_RIBBONS_MID] = TVSpotTheCuties_Text_RibbonsMid,
|
||||||
gTVCutiesText03,
|
[SPOTCUTIES_STATE_RIBBONS_HIGH] = TVSpotTheCuties_Text_RibbonsHigh,
|
||||||
gTVCutiesText04,
|
[SPOTCUTIES_STATE_RIBBON_INTRO] = TVSpotTheCuties_Text_RibbonIntro,
|
||||||
gTVCutiesText05,
|
[SPOTCUTIES_STATE_RIBBON_CHAMPION] = TVSpotTheCuties_Text_RibbonChampion,
|
||||||
gTVCutiesText06,
|
[SPOTCUTIES_STATE_RIBBON_COOL] = TVSpotTheCuties_Text_RibbonCool,
|
||||||
gTVCutiesText07,
|
[SPOTCUTIES_STATE_RIBBON_BEAUTY] = TVSpotTheCuties_Text_RibbonBeauty,
|
||||||
gTVCutiesText08,
|
[SPOTCUTIES_STATE_RIBBON_CUTE] = TVSpotTheCuties_Text_RibbonCute,
|
||||||
gTVCutiesText09,
|
[SPOTCUTIES_STATE_RIBBON_SMART] = TVSpotTheCuties_Text_RibbonSmart,
|
||||||
gTVCutiesText10,
|
[SPOTCUTIES_STATE_RIBBON_TOUGH] = TVSpotTheCuties_Text_RibbonTough,
|
||||||
gTVCutiesText11,
|
[SPOTCUTIES_STATE_RIBBON_WINNING] = TVSpotTheCuties_Text_RibbonWinning,
|
||||||
gTVCutiesText12,
|
[SPOTCUTIES_STATE_RIBBON_VICTORY] = TVSpotTheCuties_Text_RibbonVictory,
|
||||||
gTVCutiesText13,
|
[SPOTCUTIES_STATE_RIBBON_ARTIST] = TVSpotTheCuties_Text_RibbonArtist,
|
||||||
gTVCutiesText14,
|
[SPOTCUTIES_STATE_RIBBON_EFFORT] = TVSpotTheCuties_Text_RibbonEffort,
|
||||||
gTVCutiesText15
|
[SPOTCUTIES_STATE_OUTRO] = TVSpotTheCuties_Text_Outro
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 *const sTVPokemonNewsBattleFrontierTextGroup[] = {
|
static const u8 *const sTVPokemonNewsBattleFrontierTextGroup[] = {
|
||||||
@@ -2369,7 +2369,7 @@ void TryPutSpotTheCutiesOnAir(struct Pokemon *pokemon, u8 ribbonMonDataIdx)
|
|||||||
GetMonData(pokemon, MON_DATA_NICKNAME, show->cuties.nickname);
|
GetMonData(pokemon, MON_DATA_NICKNAME, show->cuties.nickname);
|
||||||
StripExtCtrlCodes(show->cuties.nickname);
|
StripExtCtrlCodes(show->cuties.nickname);
|
||||||
show->cuties.nRibbons = GetRibbonCount(pokemon);
|
show->cuties.nRibbons = GetRibbonCount(pokemon);
|
||||||
show->cuties.selectedRibbon = TV_MonDataIdxToRibbon(ribbonMonDataIdx);
|
show->cuties.selectedRibbon = MonDataIdxToRibbon(ribbonMonDataIdx);
|
||||||
tv_store_id_3x(show);
|
tv_store_id_3x(show);
|
||||||
show->cuties.language = gGameLanguage;
|
show->cuties.language = gGameLanguage;
|
||||||
if (show->cuties.language == LANGUAGE_JAPANESE || GetMonData(pokemon, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE)
|
if (show->cuties.language == LANGUAGE_JAPANESE || GetMonData(pokemon, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE)
|
||||||
@@ -2408,26 +2408,26 @@ u8 GetRibbonCount(struct Pokemon *pokemon)
|
|||||||
return nRibbons;
|
return nRibbons;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 TV_MonDataIdxToRibbon(u8 monDataIdx)
|
static u8 MonDataIdxToRibbon(u8 monDataIdx)
|
||||||
{
|
{
|
||||||
if (monDataIdx == MON_DATA_CHAMPION_RIBBON) return 0;
|
if (monDataIdx == MON_DATA_CHAMPION_RIBBON) return CHAMPION_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_COOL_RIBBON) return 1;
|
if (monDataIdx == MON_DATA_COOL_RIBBON) return COOL_RIBBON_NORMAL;
|
||||||
if (monDataIdx == MON_DATA_BEAUTY_RIBBON) return 5;
|
if (monDataIdx == MON_DATA_BEAUTY_RIBBON) return BEAUTY_RIBBON_NORMAL;
|
||||||
if (monDataIdx == MON_DATA_CUTE_RIBBON) return 9;
|
if (monDataIdx == MON_DATA_CUTE_RIBBON) return CUTE_RIBBON_NORMAL;
|
||||||
if (monDataIdx == MON_DATA_SMART_RIBBON) return 13;
|
if (monDataIdx == MON_DATA_SMART_RIBBON) return SMART_RIBBON_NORMAL;
|
||||||
if (monDataIdx == MON_DATA_TOUGH_RIBBON) return 17;
|
if (monDataIdx == MON_DATA_TOUGH_RIBBON) return TOUGH_RIBBON_NORMAL;
|
||||||
if (monDataIdx == MON_DATA_WINNING_RIBBON) return 21;
|
if (monDataIdx == MON_DATA_WINNING_RIBBON) return WINNING_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_VICTORY_RIBBON) return 22;
|
if (monDataIdx == MON_DATA_VICTORY_RIBBON) return VICTORY_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_ARTIST_RIBBON) return 23;
|
if (monDataIdx == MON_DATA_ARTIST_RIBBON) return ARTIST_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_EFFORT_RIBBON) return 24;
|
if (monDataIdx == MON_DATA_EFFORT_RIBBON) return EFFORT_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_MARINE_RIBBON) return 25;
|
if (monDataIdx == MON_DATA_MARINE_RIBBON) return MARINE_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_LAND_RIBBON) return 26;
|
if (monDataIdx == MON_DATA_LAND_RIBBON) return LAND_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_SKY_RIBBON) return 27;
|
if (monDataIdx == MON_DATA_SKY_RIBBON) return SKY_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_COUNTRY_RIBBON) return 28;
|
if (monDataIdx == MON_DATA_COUNTRY_RIBBON) return COUNTRY_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_NATIONAL_RIBBON) return 29;
|
if (monDataIdx == MON_DATA_NATIONAL_RIBBON) return NATIONAL_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_EARTH_RIBBON) return 30;
|
if (monDataIdx == MON_DATA_EARTH_RIBBON) return EARTH_RIBBON;
|
||||||
if (monDataIdx == MON_DATA_WORLD_RIBBON) return 31;
|
if (monDataIdx == MON_DATA_WORLD_RIBBON) return WORLD_RIBBON;
|
||||||
return 0;
|
return CHAMPION_RIBBON;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrySetUpTrainerFanClubSpecial(void)
|
void TrySetUpTrainerFanClubSpecial(void)
|
||||||
@@ -6603,98 +6603,100 @@ static void DoTVShowSpotTheCuties(void)
|
|||||||
|
|
||||||
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
|
||||||
gSpecialVar_Result = FALSE;
|
gSpecialVar_Result = FALSE;
|
||||||
|
|
||||||
|
// For each state, in addition to the switch a message
|
||||||
|
// is printed from the table at the bottom
|
||||||
state = sTVShowState;
|
state = sTVShowState;
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case 0:
|
case SPOTCUTIES_STATE_INTRO:
|
||||||
TVShowConvertInternationalString(gStringVar1, show->cuties.playerName, show->cuties.language);
|
TVShowConvertInternationalString(gStringVar1, show->cuties.playerName, show->cuties.language);
|
||||||
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
||||||
|
|
||||||
|
// Comments following the intro depend on how many ribbons the pokemon has
|
||||||
if (show->cuties.nRibbons < 10)
|
if (show->cuties.nRibbons < 10)
|
||||||
{
|
sTVShowState = SPOTCUTIES_STATE_RIBBONS_LOW;
|
||||||
sTVShowState = 1;
|
|
||||||
}
|
|
||||||
else if (show->cuties.nRibbons < 20)
|
else if (show->cuties.nRibbons < 20)
|
||||||
{
|
sTVShowState = SPOTCUTIES_STATE_RIBBONS_MID;
|
||||||
sTVShowState = 2;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
sTVShowState = SPOTCUTIES_STATE_RIBBONS_HIGH;
|
||||||
sTVShowState = 3;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case SPOTCUTIES_STATE_RIBBONS_LOW:
|
||||||
case 2:
|
case SPOTCUTIES_STATE_RIBBONS_MID:
|
||||||
case 3:
|
case SPOTCUTIES_STATE_RIBBONS_HIGH:
|
||||||
TVShowConvertInternationalString(gStringVar1, show->cuties.playerName, show->cuties.language);
|
TVShowConvertInternationalString(gStringVar1, show->cuties.playerName, show->cuties.language);
|
||||||
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
||||||
TV_PrintIntToStringVar(2, show->cuties.nRibbons);
|
TV_PrintIntToStringVar(2, show->cuties.nRibbons);
|
||||||
sTVShowState = 4;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_INTRO;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case SPOTCUTIES_STATE_RIBBON_INTRO:
|
||||||
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
||||||
switch (show->cuties.selectedRibbon)
|
switch (show->cuties.selectedRibbon)
|
||||||
{
|
{
|
||||||
case 0:
|
case CHAMPION_RIBBON:
|
||||||
sTVShowState = 5;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_CHAMPION;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case COOL_RIBBON_NORMAL:
|
||||||
case 2:
|
case COOL_RIBBON_SUPER:
|
||||||
case 3:
|
case COOL_RIBBON_HYPER:
|
||||||
case 4:
|
case COOL_RIBBON_MASTER:
|
||||||
sTVShowState = 6;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_COOL;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case BEAUTY_RIBBON_NORMAL:
|
||||||
case 6:
|
case BEAUTY_RIBBON_SUPER:
|
||||||
case 7:
|
case BEAUTY_RIBBON_HYPER:
|
||||||
case 8:
|
case BEAUTY_RIBBON_MASTER:
|
||||||
sTVShowState = 7;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_BEAUTY;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case CUTE_RIBBON_NORMAL:
|
||||||
case 10:
|
case CUTE_RIBBON_SUPER:
|
||||||
case 11:
|
case CUTE_RIBBON_HYPER:
|
||||||
case 12:
|
case CUTE_RIBBON_MASTER:
|
||||||
sTVShowState = 8;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_CUTE;
|
||||||
break;
|
break;
|
||||||
case 13:
|
case SMART_RIBBON_NORMAL:
|
||||||
case 14:
|
case SMART_RIBBON_SUPER:
|
||||||
case 15:
|
case SMART_RIBBON_HYPER:
|
||||||
case 16:
|
case SMART_RIBBON_MASTER:
|
||||||
sTVShowState = 9;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_SMART;
|
||||||
break;
|
break;
|
||||||
case 17:
|
case TOUGH_RIBBON_NORMAL:
|
||||||
case 18:
|
case TOUGH_RIBBON_SUPER:
|
||||||
case 19:
|
case TOUGH_RIBBON_HYPER:
|
||||||
case 20:
|
case TOUGH_RIBBON_MASTER:
|
||||||
sTVShowState = 10;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_TOUGH;
|
||||||
break;
|
break;
|
||||||
case 21:
|
case WINNING_RIBBON:
|
||||||
sTVShowState = 11;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_WINNING;
|
||||||
break;
|
break;
|
||||||
case 22:
|
case VICTORY_RIBBON:
|
||||||
sTVShowState = 12;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_VICTORY;
|
||||||
break;
|
break;
|
||||||
case 23:
|
case ARTIST_RIBBON:
|
||||||
sTVShowState = 13;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_ARTIST;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case EFFORT_RIBBON:
|
||||||
sTVShowState = 14;
|
sTVShowState = SPOTCUTIES_STATE_RIBBON_EFFORT;
|
||||||
break;
|
break;
|
||||||
|
// No comment is made for any of the gift ribbons.
|
||||||
|
// If the show is created for a gift ribbon
|
||||||
|
// then this state will repeat indefinitely
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case SPOTCUTIES_STATE_RIBBON_CHAMPION:
|
||||||
case 6:
|
case SPOTCUTIES_STATE_RIBBON_COOL:
|
||||||
case 7:
|
case SPOTCUTIES_STATE_RIBBON_BEAUTY:
|
||||||
case 8:
|
case SPOTCUTIES_STATE_RIBBON_CUTE:
|
||||||
case 9:
|
case SPOTCUTIES_STATE_RIBBON_SMART:
|
||||||
case 10:
|
case SPOTCUTIES_STATE_RIBBON_TOUGH:
|
||||||
case 11:
|
case SPOTCUTIES_STATE_RIBBON_WINNING:
|
||||||
case 12:
|
case SPOTCUTIES_STATE_RIBBON_VICTORY:
|
||||||
case 13:
|
case SPOTCUTIES_STATE_RIBBON_ARTIST:
|
||||||
case 14:
|
case SPOTCUTIES_STATE_RIBBON_EFFORT:
|
||||||
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
TVShowConvertInternationalString(gStringVar2, show->cuties.nickname, show->cuties.pokemonNameLanguage);
|
||||||
sTVShowState = 15;
|
sTVShowState = SPOTCUTIES_STATE_OUTRO;
|
||||||
break;
|
break;
|
||||||
case 15:
|
case SPOTCUTIES_STATE_OUTRO:
|
||||||
TVShowDone();
|
TVShowDone();
|
||||||
}
|
}
|
||||||
ShowFieldMessage(sTVCutiesTextGroup[state]);
|
ShowFieldMessage(sTVCutiesTextGroup[state]);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ gUnneededFireRedVariable:
|
|||||||
gTransparentTileNumber:
|
gTransparentTileNumber:
|
||||||
.space 1
|
.space 1
|
||||||
.align 4
|
.align 4
|
||||||
gUnknown_03002F70:
|
gWindowBgTilemapBuffers:
|
||||||
.space 16
|
.space 16
|
||||||
@ ../gflib/text.o
|
@ ../gflib/text.o
|
||||||
.align 4
|
.align 4
|
||||||
|
|||||||