mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
evolution files review changes
This commit is contained in:
parent
51df918c04
commit
665734d689
@ -410,7 +410,7 @@ gUnknown_085B51E4:: @ 85B51E4
|
|||||||
gUnknown_085B5884:: @ 85B5884
|
gUnknown_085B5884:: @ 85B5884
|
||||||
.incbin "baserom.gba", 0x5b5884, 0x40
|
.incbin "baserom.gba", 0x5b5884, 0x40
|
||||||
|
|
||||||
gUnknown_085B58C4:: @ 85B58C4
|
gText_ShedinjaJapaneseName2:: @ 85B58C4
|
||||||
.incbin "baserom.gba", 0x5b58c4, 0x5
|
.incbin "baserom.gba", 0x5b58c4, 0x5
|
||||||
|
|
||||||
gUnknown_085B58C9:: @ 85B58C9
|
gUnknown_085B58C9:: @ 85B58C9
|
||||||
|
@ -85,7 +85,7 @@ static const struct SpriteTemplate sEvoSparkleSpriteTemplate =
|
|||||||
.callback = EvoSparkle_DummySpriteCb
|
.callback = EvoSparkle_DummySpriteCb
|
||||||
};
|
};
|
||||||
|
|
||||||
static const s16 sEvoSparkleMatricies[] =
|
static const s16 sEvoSparkleMatrices[] =
|
||||||
{
|
{
|
||||||
0x3C0, 0x380, 0x340, 0x300, 0x2C0, 0x280, 0x240, 0x200, 0x1C0,
|
0x3C0, 0x380, 0x340, 0x300, 0x2C0, 0x280, 0x240, 0x200, 0x1C0,
|
||||||
0x180, 0x140, 0x100, -4, 0x10, -3, 0x30, -2, 0x50,
|
0x180, 0x140, 0x100, -4, 0x10, -3, 0x30, -2, 0x50,
|
||||||
@ -102,7 +102,7 @@ static void SetEvoSparklesMatrices(void)
|
|||||||
u16 i;
|
u16 i;
|
||||||
for (i = 0; i < 12; i++)
|
for (i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
SetOamMatrix(20 + i, sEvoSparkleMatricies[i], 0, 0, sEvoSparkleMatricies[i]);
|
SetOamMatrix(20 + i, sEvoSparkleMatrices[i], 0, 0, sEvoSparkleMatrices[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ extern const u32 gUnknown_085B482C[];
|
|||||||
extern const u32 gUnknown_085B4D10[];
|
extern const u32 gUnknown_085B4D10[];
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
extern const u8 gUnknown_085B58C4[];
|
extern const u8 gText_ShedinjaJapaneseName2[];
|
||||||
extern const u8 gText_PkmnIsEvolving[];
|
extern const u8 gText_PkmnIsEvolving[];
|
||||||
extern const u8 gText_CongratsPkmnEvolved[];
|
extern const u8 gText_CongratsPkmnEvolved[];
|
||||||
extern const u8 gText_BattleYesNoChoice[];
|
extern const u8 gText_BattleYesNoChoice[];
|
||||||
@ -169,7 +169,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||||||
{
|
{
|
||||||
u8 name[20];
|
u8 name[20];
|
||||||
u16 currSpecies;
|
u16 currSpecies;
|
||||||
u32 TiD, PiD;
|
u32 trainerId, personality;
|
||||||
const struct CompressedSpritePalette* pokePal;
|
const struct CompressedSpritePalette* pokePal;
|
||||||
u8 ID;
|
u8 ID;
|
||||||
|
|
||||||
@ -216,12 +216,12 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||||||
|
|
||||||
// preEvo sprite
|
// preEvo sprite
|
||||||
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
|
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
TiD = GetMonData(mon, MON_DATA_OT_ID);
|
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||||
PiD = GetMonData(mon, MON_DATA_PERSONALITY);
|
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||||
DecompressPicFromTable_2(&gMonFrontPicTable[currSpecies],
|
DecompressPicFromTable_2(&gMonFrontPicTable[currSpecies],
|
||||||
gMonSpritesGfxPtr->sprites[1],
|
gMonSpritesGfxPtr->sprites[1],
|
||||||
currSpecies);
|
currSpecies);
|
||||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, TiD, PiD);
|
pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, trainerId, personality);
|
||||||
LoadCompressedPalette(pokePal->data, 0x110, 0x20);
|
LoadCompressedPalette(pokePal->data, 0x110, 0x20);
|
||||||
|
|
||||||
sub_806A068(currSpecies, 1);
|
sub_806A068(currSpecies, 1);
|
||||||
@ -236,7 +236,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||||||
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
|
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
|
||||||
gMonSpritesGfxPtr->sprites[3],
|
gMonSpritesGfxPtr->sprites[3],
|
||||||
speciesToEvolve);
|
speciesToEvolve);
|
||||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD);
|
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
|
||||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||||
|
|
||||||
sub_806A068(speciesToEvolve, 3);
|
sub_806A068(speciesToEvolve, 3);
|
||||||
@ -272,12 +272,12 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||||||
u8 ID;
|
u8 ID;
|
||||||
const struct CompressedSpritePalette* pokePal;
|
const struct CompressedSpritePalette* pokePal;
|
||||||
u16 postEvoSpecies;
|
u16 postEvoSpecies;
|
||||||
u32 TiD, PiD;
|
u32 trainerId, personality;
|
||||||
struct Pokemon* Mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskID].tPartyID];
|
struct Pokemon* Mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskID].tPartyID];
|
||||||
|
|
||||||
postEvoSpecies = gTasks[sEvoStructPtr->evoTaskID].tPostEvoSpecies;
|
postEvoSpecies = gTasks[sEvoStructPtr->evoTaskID].tPostEvoSpecies;
|
||||||
TiD = GetMonData(Mon, MON_DATA_OT_ID);
|
trainerId = GetMonData(Mon, MON_DATA_OT_ID);
|
||||||
PiD = GetMonData(Mon, MON_DATA_PERSONALITY);
|
personality = GetMonData(Mon, MON_DATA_PERSONALITY);
|
||||||
|
|
||||||
SetHBlankCallback(NULL);
|
SetHBlankCallback(NULL);
|
||||||
SetVBlankCallback(NULL);
|
SetVBlankCallback(NULL);
|
||||||
@ -313,7 +313,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||||||
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
||||||
gMonSpritesGfxPtr->sprites[3],
|
gMonSpritesGfxPtr->sprites[3],
|
||||||
postEvoSpecies);
|
postEvoSpecies);
|
||||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD);
|
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||||
|
|
||||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||||
|
|
||||||
@ -380,12 +380,12 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
const struct CompressedSpritePalette* pokePal;
|
const struct CompressedSpritePalette* pokePal;
|
||||||
u32 TiD = GetMonData(Mon, MON_DATA_OT_ID);
|
u32 trainerId = GetMonData(Mon, MON_DATA_OT_ID);
|
||||||
u32 PiD = GetMonData(Mon, MON_DATA_PERSONALITY);
|
u32 personality = GetMonData(Mon, MON_DATA_PERSONALITY);
|
||||||
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
||||||
gMonSpritesGfxPtr->sprites[3],
|
gMonSpritesGfxPtr->sprites[3],
|
||||||
postEvoSpecies);
|
postEvoSpecies);
|
||||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD);
|
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
|
|||||||
{
|
{
|
||||||
u8 name[20];
|
u8 name[20];
|
||||||
u16 currSpecies;
|
u16 currSpecies;
|
||||||
u32 TiD, PiD;
|
u32 trainerId, personality;
|
||||||
const struct CompressedSpritePalette* pokePal;
|
const struct CompressedSpritePalette* pokePal;
|
||||||
u8 ID;
|
u8 ID;
|
||||||
|
|
||||||
@ -440,8 +440,8 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
|
|||||||
|
|
||||||
// preEvo sprite
|
// preEvo sprite
|
||||||
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
|
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
PiD = GetMonData(mon, MON_DATA_PERSONALITY);
|
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||||
TiD = GetMonData(mon, MON_DATA_OT_ID);
|
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||||
|
|
||||||
sEvoStructPtr = AllocZeroed(sizeof(struct EvoInfo));
|
sEvoStructPtr = AllocZeroed(sizeof(struct EvoInfo));
|
||||||
sEvoStructPtr->preEvoSpriteID = preEvoSpriteID;
|
sEvoStructPtr->preEvoSpriteID = preEvoSpriteID;
|
||||||
@ -450,7 +450,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
|
|||||||
gMonSpritesGfxPtr->sprites[1],
|
gMonSpritesGfxPtr->sprites[1],
|
||||||
speciesToEvolve);
|
speciesToEvolve);
|
||||||
|
|
||||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD);
|
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
|
||||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||||
|
|
||||||
sub_806A068(speciesToEvolve, 1);
|
sub_806A068(speciesToEvolve, 1);
|
||||||
@ -511,8 +511,8 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
|||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
struct Pokemon* Shedinja = &gPlayerParty[gPlayerPartyCount];
|
struct Pokemon* Shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||||
const struct EvolutionData* EvoTable;
|
const struct EvolutionData* evoTable;
|
||||||
const struct EvolutionData* Evos;
|
const struct EvolutionData* evos;
|
||||||
|
|
||||||
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
||||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies].evolutions[1].targetSpecies));
|
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, (&gEvolutionTable[preEvoSpecies].evolutions[1].targetSpecies));
|
||||||
@ -534,15 +534,15 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
|||||||
CalculatePlayerPartyCount();
|
CalculatePlayerPartyCount();
|
||||||
|
|
||||||
// can't match it otherwise, ehh
|
// can't match it otherwise, ehh
|
||||||
EvoTable = gEvolutionTable;
|
evoTable = gEvolutionTable;
|
||||||
Evos = EvoTable + preEvoSpecies;
|
evos = EvoTable + preEvoSpecies;
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), FLAG_SET_SEEN);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), FLAG_SET_CAUGHT);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(evos->evolutions[1].targetSpecies), FLAG_SET_CAUGHT);
|
||||||
|
|
||||||
if (GetMonData(Shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
if (GetMonData(Shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
||||||
&& GetMonData(Shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
&& GetMonData(Shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
||||||
&& GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NINJASK)
|
&& GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NINJASK)
|
||||||
SetMonData(Shedinja, MON_DATA_NICKNAME, gUnknown_085B58C4);
|
SetMonData(Shedinja, MON_DATA_NICKNAME, gText_ShedinjaJapaneseName2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user