move some pokemon data to c

This commit is contained in:
DizzyEggg
2018-02-05 17:39:26 +01:00
parent eb6aed50e5
commit ae8e89a10d
65 changed files with 32297 additions and 20897 deletions

View File

@@ -113,7 +113,7 @@ static const u16 sUnknown_085B5884[] = INCBIN_U16("graphics/evolution_scene/tran
static const u8 Text_ShedinjaJapaneseName[] = _("ヌケニン");
static const u8 sUnknown_085B58C9[][4] =
static const u8 sUnknown_085B58C9[][4] =
{
{ 0x00, 0x0C, 0x01, 0x06 },
{ 0x0D, 0x24, 0x05, 0x02 },
@@ -575,16 +575,16 @@ static void CB2_TradeEvolutionSceneUpdate(void)
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
{
u32 data = 0;
if (gEvolutionTable[preEvoSpecies].evolutions[0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < 6)
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < 6)
{
s32 i;
struct Pokemon* Shedinja = &gPlayerParty[gPlayerPartyCount];
const struct EvolutionData* evoTable;
const struct EvolutionData* evos;
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
const struct Evolution *evos;
const struct Evolution *evos2;
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies].evolutions[1].targetSpecies));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies].evolutions[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_HELD_ITEM, (&data));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data));
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_10, (&data));
@@ -602,15 +602,16 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
CalculatePlayerPartyCount();
// can't match it otherwise, ehh
evoTable = gEvolutionTable;
evos = evoTable + preEvoSpecies;
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_SEEN);
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_CAUGHT);
evos2 = gEvolutionTable[0];
evos = evos2 + EVOS_PER_MON * preEvoSpecies;
if (GetMonData(Shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
&& GetMonData(Shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_SEEN);
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos[1].targetSpecies), FLAG_SET_CAUGHT);
if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
&& GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
&& GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NINJASK)
SetMonData(Shedinja, MON_DATA_NICKNAME, Text_ShedinjaJapaneseName);
SetMonData(shedinja, MON_DATA_NICKNAME, Text_ShedinjaJapaneseName);
}
}