mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
TrainerMonCustomized -> TrainerMon
This commit is contained in:
parent
b86184a4f6
commit
e8487961c7
@ -35,7 +35,7 @@ struct MonCoords
|
|||||||
#define TRAINER_PARTY_EVS(hp, atk, def, speed, spatk, spdef) ((const u8[6]){hp,atk,def,spatk,spdef,speed})
|
#define TRAINER_PARTY_EVS(hp, atk, def, speed, spatk, spdef) ((const u8[6]){hp,atk,def,spatk,spdef,speed})
|
||||||
#define TRAINER_PARTY_NATURE(nature) (nature+1)
|
#define TRAINER_PARTY_NATURE(nature) (nature+1)
|
||||||
|
|
||||||
struct TrainerMonCustomized
|
struct TrainerMon
|
||||||
{
|
{
|
||||||
const u8 *nickname;
|
const u8 *nickname;
|
||||||
const u8 *ev;
|
const u8 *ev;
|
||||||
@ -57,7 +57,7 @@ struct TrainerMonCustomized
|
|||||||
struct Trainer
|
struct Trainer
|
||||||
{
|
{
|
||||||
/*0x00*/ u32 aiFlags;
|
/*0x00*/ u32 aiFlags;
|
||||||
/*0x04*/ const struct TrainerMonCustomized *party;
|
/*0x04*/ const struct TrainerMon *party;
|
||||||
/*0x08*/ u16 items[MAX_TRAINER_ITEMS];
|
/*0x08*/ u16 items[MAX_TRAINER_ITEMS];
|
||||||
/*0x10*/ u8 trainerClass;
|
/*0x10*/ u8 trainerClass;
|
||||||
/*0x11*/ u8 encounterMusic_gender; // last bit is gender
|
/*0x11*/ u8 encounterMusic_gender; // last bit is gender
|
||||||
|
@ -120,7 +120,7 @@ static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite);
|
|||||||
static void TrySpecialEvolution(void);
|
static void TrySpecialEvolution(void);
|
||||||
static u32 Crc32B (const u8 *data, u32 size);
|
static u32 Crc32B (const u8 *data, u32 size);
|
||||||
static u32 GeneratePartyHash(const struct Trainer *trainer, u32 i);
|
static u32 GeneratePartyHash(const struct Trainer *trainer, u32 i);
|
||||||
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry);
|
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
||||||
|
|
||||||
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
||||||
EWRAM_DATA u16 gBattle_BG0_Y = 0;
|
EWRAM_DATA u16 gBattle_BG0_Y = 0;
|
||||||
@ -1910,7 +1910,7 @@ u32 GeneratePersonalityForGender(u32 gender, u32 species)
|
|||||||
return speciesInfo->genderRatio / 2;
|
return speciesInfo->genderRatio / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMonCustomized *partyEntry)
|
static void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry)
|
||||||
{
|
{
|
||||||
bool32 noMoveSet = TRUE;
|
bool32 noMoveSet = TRUE;
|
||||||
u32 j;
|
u32 j;
|
||||||
@ -1962,7 +1962,7 @@ u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer
|
|||||||
for (i = 0; i < monsCount; i++)
|
for (i = 0; i < monsCount; i++)
|
||||||
{
|
{
|
||||||
u32 personalityHash = GeneratePartyHash(trainer, i);
|
u32 personalityHash = GeneratePartyHash(trainer, i);
|
||||||
const struct TrainerMonCustomized *partyData = trainer->party;
|
const struct TrainerMon *partyData = trainer->party;
|
||||||
u32 otIdType = OT_ID_RANDOM_NO_SHINY;
|
u32 otIdType = OT_ID_RANDOM_NO_SHINY;
|
||||||
u32 fixedOtId = 0;
|
u32 fixedOtId = 0;
|
||||||
|
|
||||||
|
@ -7337,7 +7337,7 @@ static u32 GetTrainerMoneyToGive(u16 trainerId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const struct TrainerMonCustomized *party = gTrainers[trainerId].party;
|
const struct TrainerMon *party = gTrainers[trainerId].party;
|
||||||
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl;
|
||||||
|
|
||||||
for (; gTrainerMoneyTable[i].classId != 0xFF; i++)
|
for (; gTrainerMoneyTable[i].classId != 0xFF; i++)
|
||||||
|
@ -758,7 +758,7 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons)
|
|||||||
u8 i;
|
u8 i;
|
||||||
u8 sum;
|
u8 sum;
|
||||||
u32 count = numMons;
|
u32 count = numMons;
|
||||||
const struct TrainerMonCustomized *party;
|
const struct TrainerMon *party;
|
||||||
|
|
||||||
if (gTrainers[opponentId].partySize < count)
|
if (gTrainers[opponentId].partySize < count)
|
||||||
count = gTrainers[opponentId].partySize;
|
count = gTrainers[opponentId].partySize;
|
||||||
|
@ -3049,7 +3049,7 @@ static void FillPartnerParty(u16 trainerId)
|
|||||||
|
|
||||||
for (i = 0; i < 3 && i < gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].partySize; i++)
|
for (i = 0; i < 3 && i < gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].partySize; i++)
|
||||||
{
|
{
|
||||||
const struct TrainerMonCustomized *partyData = gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].party;
|
const struct TrainerMon *partyData = gTrainers[trainerId - TRAINER_CUSTOM_PARTNER].party;
|
||||||
u32 otIdType = OT_ID_RANDOM_NO_SHINY;
|
u32 otIdType = OT_ID_RANDOM_NO_SHINY;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1789,7 +1789,7 @@ static void PopulateSpeciesFromTrainerLocation(int matchCallId, u8 *destStr)
|
|||||||
static void PopulateSpeciesFromTrainerParty(int matchCallId, u8 *destStr)
|
static void PopulateSpeciesFromTrainerParty(int matchCallId, u8 *destStr)
|
||||||
{
|
{
|
||||||
u16 trainerId;
|
u16 trainerId;
|
||||||
const struct TrainerMonCustomized *party;
|
const struct TrainerMon *party;
|
||||||
u8 monId;
|
u8 monId;
|
||||||
const u8 *speciesName;
|
const u8 *speciesName;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "constants/battle.h"
|
#include "constants/battle.h"
|
||||||
|
|
||||||
|
|
||||||
static const struct TrainerMonCustomized sTestParty1[] =
|
static const struct TrainerMon sTestParty1[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
.species = SPECIES_WOBBUFFET,
|
.species = SPECIES_WOBBUFFET,
|
||||||
|
Loading…
Reference in New Issue
Block a user