summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortustin2121 <tustin2121@gmail.com>2019-11-04 11:38:09 -0500
committerhuderlem <huderlem@gmail.com>2019-11-04 16:25:46 -0600
commitd4582cb874a2b1cf7b64cf172dadadec61722008 (patch)
treec1efe25ac4ac63a3f9dc88e6d13b791f6566f909 /src
parent2fe9d7a81f0630d397e46c4758c507bfafae5fa5 (diff)
Requested change from pkmn to mon
Diffstat (limited to 'src')
-rw-r--r--src/credits.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/credits.c b/src/credits.c
index 24d60d398..323146f1e 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -128,16 +128,16 @@ enum
TDE_TASK_A_ID = 2,
};
-#define NUM_PKMN_SLIDES 71
+#define NUM_MON_SLIDES 71
struct CreditsData
{
- u16 pkmnToShow[NUM_PKMN_SLIDES]; // List of Pokemon species ids that will show during the credits
+ u16 monToShow[NUM_MON_SLIDES]; // List of Pokemon species ids that will show during the credits
u16 imgCounter; //how many mon images have been shown
u16 nextImgPos; //if the next image spawns left/center/right
- u16 currShownPkmn; //index into pkmnToShow
- u16 numPkmnToShow; //number of pokemon to show, always NUM_PKMN_SLIDES after determine function
- u16 caughtPkmnIds[NATIONAL_DEX_COUNT]; //temporary location to hold a condensed array of all caught pokemon
- u16 numCaughtPkmn; //count of filled spaces in caughtPkmnIds
+ u16 currShownMon; //index into monToShow
+ u16 numMonToShow; //number of pokemon to show, always NUM_MON_SLIDES after determine function
+ u16 caughtMonIds[NATIONAL_DEX_COUNT]; //temporary location to hold a condensed array of all caught pokemon
+ u16 numCaughtMon; //count of filled spaces in caughtMonIds
u16 unk39C[7]; // unused padding?
};
@@ -1248,7 +1248,7 @@ void CB2_StartCreditsSequence(void)
sCreditsData->imgCounter = 0;
sCreditsData->nextImgPos = 0;
- sCreditsData->currShownPkmn = 0;
+ sCreditsData->currShownMon = 0;
gUnknown_0203BCE2 = taskIdA;
}
@@ -1689,17 +1689,17 @@ static void sub_81760FC(u8 taskIdD)
gTasks[taskIdD].data[TDD_STATE]++;
break;
case 2:
- if (sCreditsData->imgCounter == NUM_PKMN_SLIDES || gTasks[gTasks[taskIdD].data[TDD_TASK_A_ID]].func != Task_ProgressCreditTasks)
+ if (sCreditsData->imgCounter == NUM_MON_SLIDES || gTasks[gTasks[taskIdD].data[TDD_TASK_A_ID]].func != Task_ProgressCreditTasks)
break;
- r2 = MakeMonSprite(sCreditsData->pkmnToShow[sCreditsData->currShownPkmn], sMonSpritePos[sCreditsData->nextImgPos][0], sMonSpritePos[sCreditsData->nextImgPos][1], sCreditsData->nextImgPos);
- if (sCreditsData->currShownPkmn < sCreditsData->numPkmnToShow - 1)
+ r2 = MakeMonSprite(sCreditsData->monToShow[sCreditsData->currShownMon], sMonSpritePos[sCreditsData->nextImgPos][0], sMonSpritePos[sCreditsData->nextImgPos][1], sCreditsData->nextImgPos);
+ if (sCreditsData->currShownMon < sCreditsData->numMonToShow - 1)
{
- sCreditsData->currShownPkmn++;
+ sCreditsData->currShownMon++;
gSprites[r2].data[3] = 50;
}
else
{
- sCreditsData->currShownPkmn = 0;
+ sCreditsData->currShownMon = 0;
gSprites[r2].data[3] = 512;
}
sCreditsData->imgCounter++;
@@ -2306,73 +2306,73 @@ static void DeterminePokemonToShow(void)
{
if (GetSetPokedexFlag(dexNum, FLAG_GET_CAUGHT))
{
- sCreditsData->caughtPkmnIds[j] = dexNum;
+ sCreditsData->caughtMonIds[j] = dexNum;
j++;
}
}
// Fill the rest of the array with zeroes
for (dexNum = j; dexNum < NATIONAL_DEX_COUNT; dexNum++)
- sCreditsData->caughtPkmnIds[dexNum] = 0;
+ sCreditsData->caughtMonIds[dexNum] = 0;
- // Cap the number of pokemon we care about to NUM_PKMN_SLIDES, the max we show in the credits scene (-1 for the starter)
- sCreditsData->numCaughtPkmn = j;
- if (sCreditsData->numCaughtPkmn < NUM_PKMN_SLIDES)
- sCreditsData->numPkmnToShow = j;
+ // Cap the number of pokemon we care about to NUM_MON_SLIDES, the max we show in the credits scene (-1 for the starter)
+ sCreditsData->numCaughtMon = j;
+ if (sCreditsData->numCaughtMon < NUM_MON_SLIDES)
+ sCreditsData->numMonToShow = j;
else
- sCreditsData->numPkmnToShow = NUM_PKMN_SLIDES;
+ sCreditsData->numMonToShow = NUM_MON_SLIDES;
// Loop through our list of caught pokemon and select randomly from it to fill the images to show
j = 0;
do
{
// Select a random mon, insert into array
- page = Random() % sCreditsData->numCaughtPkmn;
- sCreditsData->pkmnToShow[j] = sCreditsData->caughtPkmnIds[page];
+ page = Random() % sCreditsData->numCaughtMon;
+ sCreditsData->monToShow[j] = sCreditsData->caughtMonIds[page];
// Remove the select mon from the array, and condense array entries
j++;
- sCreditsData->caughtPkmnIds[page] = 0;
- sCreditsData->numCaughtPkmn--;
- if (page != sCreditsData->numCaughtPkmn)
+ sCreditsData->caughtMonIds[page] = 0;
+ sCreditsData->numCaughtMon--;
+ if (page != sCreditsData->numCaughtMon)
{
// Instead of looping through and moving everything down, just take from the end. Order doesn't matter after all.
- sCreditsData->caughtPkmnIds[page] = sCreditsData->caughtPkmnIds[sCreditsData->numCaughtPkmn];
- sCreditsData->caughtPkmnIds[sCreditsData->numCaughtPkmn] = 0;
+ sCreditsData->caughtMonIds[page] = sCreditsData->caughtMonIds[sCreditsData->numCaughtMon];
+ sCreditsData->caughtMonIds[sCreditsData->numCaughtMon] = 0;
}
}
- while (sCreditsData->numCaughtPkmn != 0 && j < NUM_PKMN_SLIDES);
+ while (sCreditsData->numCaughtMon != 0 && j < NUM_MON_SLIDES);
// If we don't have enough pokemon in the dex to fill everything, copy the selected mon into the end of the array, so it loops
- if (sCreditsData->numPkmnToShow < NUM_PKMN_SLIDES)
+ if (sCreditsData->numMonToShow < NUM_MON_SLIDES)
{
- for (j = sCreditsData->numPkmnToShow, page = 0; j < NUM_PKMN_SLIDES; j++)
+ for (j = sCreditsData->numMonToShow, page = 0; j < NUM_MON_SLIDES; j++)
{
- sCreditsData->pkmnToShow[j] = sCreditsData->pkmnToShow[page];
+ sCreditsData->monToShow[j] = sCreditsData->monToShow[page];
page++;
- if (page == sCreditsData->numPkmnToShow)
+ if (page == sCreditsData->numMonToShow)
page = 0;
}
// Ensure the last pokemon is our starter
- sCreditsData->pkmnToShow[NUM_PKMN_SLIDES-1] = starter;
+ sCreditsData->monToShow[NUM_MON_SLIDES-1] = starter;
}
else
{
// Check to see if our starter has already appeared in this list, break if it has
- for (dexNum = 0; sCreditsData->pkmnToShow[dexNum] != starter && dexNum < NUM_PKMN_SLIDES; dexNum++);
+ for (dexNum = 0; sCreditsData->monToShow[dexNum] != starter && dexNum < NUM_MON_SLIDES; dexNum++);
// If it has, swap it with the last pokemon, to ensure our starter is the last image
- if (dexNum < sCreditsData->numPkmnToShow - 1)
+ if (dexNum < sCreditsData->numMonToShow - 1)
{
- sCreditsData->pkmnToShow[dexNum] = sCreditsData->pkmnToShow[NUM_PKMN_SLIDES-1];
- sCreditsData->pkmnToShow[NUM_PKMN_SLIDES-1] = starter;
+ sCreditsData->monToShow[dexNum] = sCreditsData->monToShow[NUM_MON_SLIDES-1];
+ sCreditsData->monToShow[NUM_MON_SLIDES-1] = starter;
}
else
{
// Ensure the last pokemon is our starter
- sCreditsData->pkmnToShow[NUM_PKMN_SLIDES-1] = starter;
+ sCreditsData->monToShow[NUM_MON_SLIDES-1] = starter;
}
}
- sCreditsData->numPkmnToShow = NUM_PKMN_SLIDES;
+ sCreditsData->numMonToShow = NUM_MON_SLIDES;
}