mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 19:54:14 +01:00
Merge with master, fix conflicts
This commit is contained in:
commit
ad6093f5bc
@ -286,7 +286,7 @@ struct RentalMon
|
||||
u16 monId;
|
||||
u32 personality;
|
||||
u8 ivs;
|
||||
u8 abilityBit;
|
||||
u8 abilityNum;
|
||||
};
|
||||
|
||||
struct BattleDomeTrainer
|
||||
|
@ -33,7 +33,7 @@ struct Struct203CEC8
|
||||
u8 unk8_0:4;
|
||||
u8 mode:2;
|
||||
u8 unk8_2:2;
|
||||
s8 unk9;
|
||||
s8 slotId;
|
||||
s8 unkA;
|
||||
u8 unkB;
|
||||
u16 unkC;
|
||||
|
@ -295,7 +295,7 @@ struct BattlePokemon
|
||||
/*0x2E*/ u16 item;
|
||||
/*0x30*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x3B*/ u8 ppBonuses;
|
||||
/*0x3C*/ u8 otName[8];
|
||||
/*0x3C*/ u8 otName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x44*/ u32 experience;
|
||||
/*0x48*/ u32 personality;
|
||||
/*0x4C*/ u32 status1;
|
||||
@ -329,8 +329,7 @@ struct BaseStats
|
||||
/* 0x13 */ u8 growthRate;
|
||||
/* 0x14 */ u8 eggGroup1;
|
||||
/* 0x15 */ u8 eggGroup2;
|
||||
/* 0x16 */ u8 ability1;
|
||||
/* 0x17 */ u8 ability2;
|
||||
/* 0x16 */ u8 abilities[2];
|
||||
/* 0x18 */ u8 abilityHidden;
|
||||
/* 0x19 */ u8 safariZoneFleeRate;
|
||||
/* 0x1A */ u8 bodyColor : 7;
|
||||
@ -452,7 +451,7 @@ extern const u8 gPPUpGetMask[];
|
||||
extern const u8 gPPUpSetMask[];
|
||||
extern const u8 gPPUpAddMask[];
|
||||
extern const u8 gStatStageRatios[][2];
|
||||
extern const u16 gUnknown_08329D54[];
|
||||
extern const u16 gLinkPlayerFacilityClasses[];
|
||||
extern const struct SpriteTemplate gUnknown_08329D98[];
|
||||
extern const s8 gNatureStatTable[][5];
|
||||
|
||||
|
@ -23,6 +23,6 @@ void LoadMonIconPalette(u16 species);
|
||||
void sub_80D328C(struct Sprite *sprite);
|
||||
void sub_80D3014(struct Sprite *sprite);
|
||||
void sub_80D32C8(struct Sprite *sprite, u8 animNum);
|
||||
u8 sub_80D30A0(u16 species);
|
||||
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
|
||||
|
||||
#endif // GUARD_POKEMON_ICON_H
|
||||
|
@ -2091,45 +2091,45 @@ extern const u8 gDaycareText_DontLikeOther[];
|
||||
extern const u8 gDaycareText_PlayOther[];
|
||||
|
||||
// party menu
|
||||
extern const u8 gUnknown_085E9E43[];
|
||||
extern const u8 gUnknown_085EA010[];
|
||||
extern const u8 gUnknown_085EA02A[];
|
||||
extern const u8 gUnknown_085E9E55[];
|
||||
extern const u8 gUnknown_085E9E64[];
|
||||
extern const u8 gUnknown_085E9E79[];
|
||||
extern const u8 gUnknown_085E9E8F[];
|
||||
extern const u8 gUnknown_085E9EBC[];
|
||||
extern const u8 gUnknown_085E9ED4[];
|
||||
extern const u8 gUnknown_085E9EE9[];
|
||||
extern const u8 gUnknown_085E9FDB[];
|
||||
extern const u8 gUnknown_085EA046[];
|
||||
extern const u8 gUnknown_085EA05B[];
|
||||
extern const u8 gUnknown_085E9F01[];
|
||||
extern const u8 gUnknown_085E9F58[];
|
||||
extern const u8 gUnknown_085E9F6F[];
|
||||
extern const u8 gUnknown_085E9F81[];
|
||||
extern const u8 gUnknown_085E9F90[];
|
||||
extern const u8 gUnknown_085E9FA7[];
|
||||
extern const u8 gUnknown_085E9FC2[];
|
||||
extern const u8 gUnknown_085E9EA6[];
|
||||
extern const u8 gUnknown_085E9F16[];
|
||||
extern const u8 gUnknown_085E9F2A[];
|
||||
extern const u8 gUnknown_085E9F42[];
|
||||
extern const u8 gUnknown_085E9FF9[];
|
||||
extern const u8 gUnknown_085EA073[];
|
||||
extern const u8 gUnknown_085EA091[];
|
||||
extern const u8 gUnknown_085EA099[];
|
||||
extern const u8 gUnknown_085EA09E[];
|
||||
extern const u8 gUnknown_085EA0A4[];
|
||||
extern const u8 gUnknown_085EA0AB[];
|
||||
extern const u8 gUnknown_085EA0E7[];
|
||||
extern const u8 gUnknown_085EA0B1[];
|
||||
extern const u8 gUnknown_085EA0B6[];
|
||||
extern const u8 gUnknown_085EA0BF[];
|
||||
extern const u8 gUnknown_085EA0C5[];
|
||||
extern const u8 gUnknown_085EA0CF[];
|
||||
extern const u8 gUnknown_085EA0D7[];
|
||||
extern const u8 gUnknown_085EA0DC[];
|
||||
extern const u8 gText_ChoosePokemon[];
|
||||
extern const u8 gText_ChoosePokemonCancel[];
|
||||
extern const u8 gText_ChoosePokemonConfirm[];
|
||||
extern const u8 gText_MoveToWhere[];
|
||||
extern const u8 gText_TeachWhichPokemon[];
|
||||
extern const u8 gText_UseOnWhichPokemon[];
|
||||
extern const u8 gText_GiveToWhichPokemon[];
|
||||
extern const u8 gText_NothingToCut[];
|
||||
extern const u8 gText_CantSurfHere[];
|
||||
extern const u8 gText_AlreadySurfing[];
|
||||
extern const u8 gText_CurrentIsTooFast[];
|
||||
extern const u8 gText_EnjoyCycling[];
|
||||
extern const u8 gText_InUseAlready_PM[];
|
||||
extern const u8 gText_CantUseHere[];
|
||||
extern const u8 gText_NoPokemonForBattle[];
|
||||
extern const u8 gText_ChoosePokemon2[];
|
||||
extern const u8 gText_NotEnoughHp[];
|
||||
extern const u8 gText_PokemonAreNeeded[];
|
||||
extern const u8 gText_PokemonCantBeSame[];
|
||||
extern const u8 gText_NoIdenticalHoldItems[];
|
||||
extern const u8 gText_DoWhatWithPokemon[];
|
||||
extern const u8 gText_RestoreWhichMove[];
|
||||
extern const u8 gText_BoostPp[];
|
||||
extern const u8 gText_DoWhatWithItem[];
|
||||
extern const u8 gText_DoWhatWithMail[];
|
||||
extern const u8 gText_AlreadyHoldingOne[];
|
||||
extern const u8 gText_NoUse[];
|
||||
extern const u8 gText_Able[];
|
||||
extern const u8 gText_First_PM[];
|
||||
extern const u8 gText_Second_PM[];
|
||||
extern const u8 gText_Third_PM[];
|
||||
extern const u8 gText_Fourth[];
|
||||
extern const u8 gText_Able2[];
|
||||
extern const u8 gText_NotAble[];
|
||||
extern const u8 gText_Able3[];
|
||||
extern const u8 gText_NotAble2[];
|
||||
extern const u8 gText_Learned[];
|
||||
extern const u8 gText_Have[];
|
||||
extern const u8 gText_DontHave[];
|
||||
extern const u8 gText_Take[];
|
||||
extern const u8 gText_Mail[];
|
||||
extern const u8 gText_Take2[];
|
||||
|
@ -1364,24 +1364,24 @@ static void BattleAICmd_get_ability(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||
{
|
||||
// AI has no knowledge of opponent, so it guesses which ability.
|
||||
if (Random() & 1)
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
else
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2;
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1; // It's definitely ability 1.
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; // It's definitely ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1412,15 +1412,15 @@ static void BattleAICmd_check_ability(void)
|
||||
{
|
||||
ability = gBattleMons[battlerId].ability;
|
||||
}
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE)
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||
{
|
||||
u8 abilityDummyVariable = ability; // Needed to match.
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability1 != abilityDummyVariable
|
||||
&& gBaseStats[gBattleMons[battlerId].species].ability2 != abilityDummyVariable)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != abilityDummyVariable
|
||||
&& gBaseStats[gBattleMons[battlerId].species].abilities[1] != abilityDummyVariable)
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1429,12 +1429,12 @@ static void BattleAICmd_check_ability(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -198,9 +198,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].ability2;
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].ability1;
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
|
||||
if (absorbingTypeAbility == monAbility && Random() & 1)
|
||||
{
|
||||
@ -393,9 +393,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].ability2;
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].ability1;
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
|
||||
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility);
|
||||
if (moveFlags & flags)
|
||||
|
@ -2903,7 +2903,7 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int arg2)
|
||||
|
||||
defType1 = gBaseStats[targetSpecies].type1;
|
||||
defType2 = gBaseStats[targetSpecies].type2;
|
||||
defAbility = gBaseStats[targetSpecies].ability1;
|
||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
moveType = gBattleMoves[move].type;
|
||||
|
||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
@ -5447,9 +5447,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
|
||||
targetSpecies = gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[loserTournamentId][k]].species;
|
||||
if (var & 1)
|
||||
targetAbility = gBaseStats[targetSpecies].ability2;
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
||||
else
|
||||
targetAbility = gBaseStats[targetSpecies].ability1;
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
|
||||
var = AI_TypeCalc(moveIds[i * 4 + j], targetSpecies, targetAbility);
|
||||
if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE)
|
||||
|
@ -373,7 +373,7 @@ static void SetRentalsToOpponentParty(void)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
||||
}
|
||||
}
|
||||
@ -439,7 +439,7 @@ static void SetPlayerAndOpponentParties(void)
|
||||
SetMonMoveAvoidReturn(&gPlayerParty[i], gFacilityTrainerMons[monSetId].moves[k], k);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &friendship);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum);
|
||||
}
|
||||
}
|
||||
|
||||
@ -478,7 +478,7 @@ static void SetPlayerAndOpponentParties(void)
|
||||
for (k = 0; k < MAX_MON_MOVES; k++)
|
||||
SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monSetId].moves[k], k);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1742,7 +1742,7 @@ static void Select_CopyMonsToPlayerParty(void)
|
||||
gPlayerParty[i] = sFactorySelectScreen->mons[j].monData;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].monId = sFactorySelectScreen->mons[j].monSetId;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].ivs = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
break;
|
||||
}
|
||||
@ -2266,7 +2266,7 @@ static void CopySwappedMonData(void)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].monId = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].monId;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].ivs = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].ivs;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].personality = GetMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityBit = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityNum = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
}
|
||||
|
||||
static void Task_FromSwapScreenToSummaryScreen(u8 taskId)
|
||||
|
@ -1122,7 +1122,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
u8 headerId = GetBattlePikeWildMonHeaderId();
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
const struct PikeWildMon *const *const wildMons = sWildMons[lvlMode];
|
||||
u32 abilityBit;
|
||||
u32 abilityNum;
|
||||
s32 pikeMonId = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL);
|
||||
pikeMonId = SpeciesToPikeMonId(pikeMonId);
|
||||
|
||||
@ -1152,11 +1152,11 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].ability2)
|
||||
abilityBit = Random() % 2;
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
abilityNum = Random() % 2;
|
||||
else
|
||||
abilityBit = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &abilityBit);
|
||||
abilityNum = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &abilityNum);
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
SetMonMoveSlot(&gEnemyParty[0], wildMons[headerId][pikeMonId].moves[i], i);
|
||||
|
||||
|
@ -76,7 +76,7 @@ struct PyramidWildMon
|
||||
{
|
||||
u16 species;
|
||||
u8 lvl;
|
||||
u8 abilityBit;
|
||||
u8 abilityNum;
|
||||
u16 moves[4];
|
||||
};
|
||||
|
||||
@ -129,6 +129,8 @@ static bool8 TrySetPyramidEventObjectPositionInSquare(u8 arg0, u8 *floorLayoutOf
|
||||
static bool8 TrySetPyramidEventObjectPositionAtCoords(bool8 objType, u8 x, u8 y, u8 *floorLayoutOffsets, u8 squareId, u8 eventObjectId);
|
||||
|
||||
// Const rom data.
|
||||
#define ABILITY_RANDOM 2 // For wild mons data.
|
||||
|
||||
#include "data/battle_frontier/battle_pyramid_level_50_wild_mons.h"
|
||||
#include "data/battle_frontier/battle_pyramid_open_level_wild_mons.h"
|
||||
|
||||
@ -1401,15 +1403,15 @@ void GenerateBattlePyramidWildMon(void)
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[id].species].growthRate][lvl]);
|
||||
|
||||
switch (wildMons[id].abilityBit)
|
||||
switch (wildMons[id].abilityNum)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &wildMons[id].abilityBit);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &wildMons[id].abilityNum);
|
||||
break;
|
||||
case 2:
|
||||
case ABILITY_RANDOM:
|
||||
default:
|
||||
if (gBaseStats[wildMons[id].species].ability2)
|
||||
if (gBaseStats[wildMons[id].species].abilities[1])
|
||||
{
|
||||
i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
||||
|
@ -8622,7 +8622,7 @@ static void atkAE_healpartystatus(void)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
|
||||
u8 abilityBit = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
|
||||
u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
|
||||
|
||||
if (species != SPECIES_NONE && species != SPECIES_EGG)
|
||||
{
|
||||
@ -8635,7 +8635,7 @@ static void atkAE_healpartystatus(void)
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gActiveBattler]))
|
||||
ability = gBattleMons[gActiveBattler].ability;
|
||||
else
|
||||
ability = GetAbilityBySpecies(species, abilityBit);
|
||||
ability = GetAbilityBySpecies(species, abilityNum);
|
||||
|
||||
if (ability != ABILITY_SOUNDPROOF)
|
||||
toHeal |= (1 << i);
|
||||
@ -9845,9 +9845,9 @@ static void atkE5_pickup(void)
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].ability2;
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
@ -9868,9 +9868,9 @@ static void atkE5_pickup(void)
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].ability2;
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -32,7 +32,7 @@ bool8 SetUpFieldMove_SoftBoiled(void)
|
||||
void sub_8161560(u8 taskId)
|
||||
{
|
||||
gUnknown_0203CEC8.unkB = 0xA;
|
||||
gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.unk9;
|
||||
gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId;
|
||||
sub_81B0FCC(GetCursorSelectionMonId(), 0x1);
|
||||
display_pokemon_menu_message(0x5);
|
||||
gTasks[taskId].func = sub_81B1370;
|
||||
@ -42,7 +42,7 @@ void sub_81615A8(u8 taskId)
|
||||
{
|
||||
u16 hp;
|
||||
|
||||
u8 unk9 = gUnknown_0203CEC8.unk9;
|
||||
u8 slotId = gUnknown_0203CEC8.slotId;
|
||||
u8 pokemonIndex = gUnknown_0203CEC8.unkA;
|
||||
if(pokemonIndex > 6)
|
||||
{
|
||||
@ -53,20 +53,20 @@ void sub_81615A8(u8 taskId)
|
||||
}
|
||||
|
||||
hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP);
|
||||
if(hp == 0 || unk9 == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp)
|
||||
if(hp == 0 || slotId == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp)
|
||||
{
|
||||
sub_81617B8(taskId);
|
||||
return;
|
||||
}
|
||||
|
||||
PlaySE(SE_KAIFUKU);
|
||||
sub_81B1F18(taskId, unk9, -1, GetMonData(&gPlayerParty[unk9], MON_DATA_MAX_HP)/5, sub_816166C);
|
||||
sub_81B1F18(taskId, slotId, -1, GetMonData(&gPlayerParty[slotId], MON_DATA_MAX_HP)/5, sub_816166C);
|
||||
}
|
||||
|
||||
static void sub_816166C(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_KAIFUKU);
|
||||
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAX_HP)/5, sub_81616C0);
|
||||
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAX_HP)/5, sub_81616C0);
|
||||
}
|
||||
|
||||
static void sub_81616C0(u8 taskId)
|
||||
@ -83,8 +83,8 @@ static void sub_8161724(u8 taskId)
|
||||
if(sub_81B1BD4() == 1)
|
||||
return;
|
||||
gUnknown_0203CEC8.unkB = 0x0;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.unk9, 0);
|
||||
gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.slotId, 0);
|
||||
gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.unkA, 1);
|
||||
ClearStdWindowAndFrameToTransparent(0x6, FALSE);
|
||||
ClearWindowTilemap(0x6);
|
||||
|
854
src/party_menu.c
854
src/party_menu.c
File diff suppressed because it is too large
Load Diff
@ -2144,14 +2144,14 @@ static const u16 sDeoxysBaseStats[] =
|
||||
90, // Sp.Defense
|
||||
};
|
||||
|
||||
const u16 gUnknown_08329D54[] =
|
||||
const u16 gLinkPlayerFacilityClasses[] =
|
||||
{
|
||||
FACILITY_CLASS_COOLTRAINER_M, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER,
|
||||
FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_PSYCHIC_M, FACILITY_CLASS_BUG_CATCHER,
|
||||
FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST, FACILITY_CLASS_COOLTRAINER_F,
|
||||
FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_LASS,
|
||||
FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL, FACILITY_CLASS_POKEMON_BREEDER_F,
|
||||
FACILITY_CLASS_BEAUTY
|
||||
FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST,
|
||||
FACILITY_CLASS_COOLTRAINER_F, FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER,
|
||||
FACILITY_CLASS_LASS, FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL,
|
||||
FACILITY_CLASS_POKEMON_BREEDER_F, FACILITY_CLASS_BEAUTY
|
||||
};
|
||||
|
||||
static const u8 sHoldEffectToType[][2] =
|
||||
@ -2513,7 +2513,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].ability2)
|
||||
if (gBaseStats[species].abilities[1])
|
||||
{
|
||||
value = personality & 1;
|
||||
SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value);
|
||||
@ -2976,7 +2976,7 @@ u16 sub_8068B48(void)
|
||||
|
||||
arrId = gLinkPlayers[linkId].trainerId & 7;
|
||||
arrId |= gLinkPlayers[linkId].gender << 3;
|
||||
return FacilityClassToPicIndex(gUnknown_08329D54[arrId]);
|
||||
return FacilityClassToPicIndex(gLinkPlayerFacilityClasses[arrId]);
|
||||
}
|
||||
|
||||
u16 sub_8068BB0(void)
|
||||
@ -2991,7 +2991,7 @@ u16 sub_8068BB0(void)
|
||||
|
||||
arrId = gLinkPlayers[linkId].trainerId & 7;
|
||||
arrId |= gLinkPlayers[linkId].gender << 3;
|
||||
return gFacilityClassToTrainerClass[gUnknown_08329D54[arrId]];
|
||||
return gFacilityClassToTrainerClass[gLinkPlayerFacilityClasses[arrId]];
|
||||
}
|
||||
|
||||
void CreateObedientEnemyMon(void)
|
||||
@ -4704,9 +4704,9 @@ u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
||||
if (abilityNum == 2)
|
||||
gLastUsedAbility = gBaseStats[species].abilityHidden;
|
||||
else if (abilityNum == 1)
|
||||
gLastUsedAbility = gBaseStats[species].ability2;
|
||||
gLastUsedAbility = gBaseStats[species].abilities[1];
|
||||
else
|
||||
gLastUsedAbility = gBaseStats[species].ability1;
|
||||
gLastUsedAbility = gBaseStats[species].abilities[0];
|
||||
|
||||
return gLastUsedAbility;
|
||||
}
|
||||
|
@ -2100,7 +2100,7 @@ u8 GetValidMonIconPalIndex(u16 species)
|
||||
return gMonIconPaletteIndices[species];
|
||||
}
|
||||
|
||||
u8 sub_80D30A0(u16 species)
|
||||
u8 GetMonIconPaletteIndexFromSpecies(u16 species)
|
||||
{
|
||||
return gMonIconPaletteIndices[species];
|
||||
}
|
||||
|
@ -424,45 +424,45 @@ const u8 gText_PkmnGotOverInfatuation[] = _("{STR_VAR_1} got over its\ninfatuati
|
||||
const u8 gText_ThrowAwayItem[] = _("Throw away this\n{STR_VAR_1}?");
|
||||
const u8 gText_ItemThrownAway[] = _("The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}");
|
||||
const u8 gUnknown_085E9E2E[] = _("Teach which POKéMON?");
|
||||
const u8 gUnknown_085E9E43[] = _("Choose a POKéMON.");
|
||||
const u8 gUnknown_085E9E55[] = _("Move to where?");
|
||||
const u8 gUnknown_085E9E64[] = _("Teach which POKéMON?");
|
||||
const u8 gUnknown_085E9E79[] = _("Use on which POKéMON?");
|
||||
const u8 gUnknown_085E9E8F[] = _("Give to which POKéMON?");
|
||||
const u8 gUnknown_085E9EA6[] = _("Do what with this {PKMN}?");
|
||||
const u8 gUnknown_085E9EBC[] = _("There's nothing to CUT.");
|
||||
const u8 gUnknown_085E9ED4[] = _("You can't SURF here.");
|
||||
const u8 gUnknown_085E9EE9[] = _("You're already SURFING.");
|
||||
const u8 gUnknown_085E9F01[] = _("Can't use that here.");
|
||||
const u8 gUnknown_085E9F16[] = _("Restore which move?");
|
||||
const u8 gUnknown_085E9F2A[] = _("Boost PP of which move?");
|
||||
const u8 gUnknown_085E9F42[] = _("Do what with an item?");
|
||||
const u8 gUnknown_085E9F58[] = _("No POKéMON for battle!");
|
||||
const u8 gUnknown_085E9F6F[] = _("Choose a POKéMON.");
|
||||
const u8 gUnknown_085E9F81[] = _("Not enough HP…");
|
||||
const u8 gUnknown_085E9F90[] = _("{STR_VAR_1} POKéMON are needed.");
|
||||
const u8 gUnknown_085E9FA7[] = _("POKéMON can't be the same.");
|
||||
const u8 gUnknown_085E9FC2[] = _("No identical hold items.");
|
||||
const u8 gUnknown_085E9FDB[] = _("The current is much too fast!");
|
||||
const u8 gUnknown_085E9FF9[] = _("Do what with the MAIL?");
|
||||
const u8 gUnknown_085EA010[] = _("Choose POKéMON or CANCEL.");
|
||||
const u8 gUnknown_085EA02A[] = _("Choose POKéMON and confirm.");
|
||||
const u8 gUnknown_085EA046[] = _("Let's enjoy cycling!");
|
||||
const u8 gUnknown_085EA05B[] = _("This is in use already.");
|
||||
const u8 gUnknown_085EA073[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}.");
|
||||
const u8 gUnknown_085EA091[] = _("No use.");
|
||||
const u8 gUnknown_085EA099[] = _("ABLE");
|
||||
const u8 gUnknown_085EA09E[] = _("FIRST");
|
||||
const u8 gUnknown_085EA0A4[] = _("SECOND");
|
||||
const u8 gUnknown_085EA0AB[] = _("THIRD");
|
||||
const u8 gUnknown_085EA0B1[] = _("ABLE");
|
||||
const u8 gUnknown_085EA0B6[] = _("NOT ABLE");
|
||||
const u8 gUnknown_085EA0BF[] = _("ABLE!");
|
||||
const u8 gUnknown_085EA0C5[] = _("NOT ABLE!");
|
||||
const u8 gUnknown_085EA0CF[] = _("LEARNED");
|
||||
const u8 gUnknown_085EA0D7[] = _("HAVE");
|
||||
const u8 gUnknown_085EA0DC[] = _("DON'T HAVE");
|
||||
const u8 gUnknown_085EA0E7[] = _("FOURTH");
|
||||
const u8 gText_ChoosePokemon[] = _("Choose a POKéMON.");
|
||||
const u8 gText_MoveToWhere[] = _("Move to where?");
|
||||
const u8 gText_TeachWhichPokemon[] = _("Teach which POKéMON?");
|
||||
const u8 gText_UseOnWhichPokemon[] = _("Use on which POKéMON?");
|
||||
const u8 gText_GiveToWhichPokemon[] = _("Give to which POKéMON?");
|
||||
const u8 gText_DoWhatWithPokemon[] = _("Do what with this {PKMN}?");
|
||||
const u8 gText_NothingToCut[] = _("There's nothing to CUT.");
|
||||
const u8 gText_CantSurfHere[] = _("You can't SURF here.");
|
||||
const u8 gText_AlreadySurfing[] = _("You're already SURFING.");
|
||||
const u8 gText_CantUseHere[] = _("Can't use that here.");
|
||||
const u8 gText_RestoreWhichMove[] = _("Restore which move?");
|
||||
const u8 gText_BoostPp[] = _("Boost PP of which move?");
|
||||
const u8 gText_DoWhatWithItem[] = _("Do what with an item?");
|
||||
const u8 gText_NoPokemonForBattle[] = _("No POKéMON for battle!");
|
||||
const u8 gText_ChoosePokemon2[] = _("Choose a POKéMON.");
|
||||
const u8 gText_NotEnoughHp[] = _("Not enough HP…");
|
||||
const u8 gText_PokemonAreNeeded[] = _("{STR_VAR_1} POKéMON are needed.");
|
||||
const u8 gText_PokemonCantBeSame[] = _("POKéMON can't be the same.");
|
||||
const u8 gText_NoIdenticalHoldItems[] = _("No identical hold items.");
|
||||
const u8 gText_CurrentIsTooFast[] = _("The current is much too fast!");
|
||||
const u8 gText_DoWhatWithMail[] = _("Do what with the MAIL?");
|
||||
const u8 gText_ChoosePokemonCancel[] = _("Choose POKéMON or CANCEL.");
|
||||
const u8 gText_ChoosePokemonConfirm[] = _("Choose POKéMON and confirm.");
|
||||
const u8 gText_EnjoyCycling[] = _("Let's enjoy cycling!");
|
||||
const u8 gText_InUseAlready_PM[] = _("This is in use already.");
|
||||
const u8 gText_AlreadyHoldingOne[] = _("{STR_VAR_1} is already holding\none {STR_VAR_2}.");
|
||||
const u8 gText_NoUse[] = _("No use.");
|
||||
const u8 gText_Able[] = _("ABLE");
|
||||
const u8 gText_First_PM[] = _("FIRST");
|
||||
const u8 gText_Second_PM[] = _("SECOND");
|
||||
const u8 gText_Third_PM[] = _("THIRD");
|
||||
const u8 gText_Able2[] = _("ABLE");
|
||||
const u8 gText_NotAble[] = _("NOT ABLE");
|
||||
const u8 gText_Able3[] = _("ABLE!");
|
||||
const u8 gText_NotAble2[] = _("NOT ABLE!");
|
||||
const u8 gText_Learned[] = _("LEARNED");
|
||||
const u8 gText_Have[] = _("HAVE");
|
||||
const u8 gText_DontHave[] = _("DON'T HAVE");
|
||||
const u8 gText_Fourth[] = _("FOURTH");
|
||||
const u8 gText_PkmnCantParticipate[] = _("That POKéMON can't participate.{PAUSE_UNTIL_PRESS}");
|
||||
const u8 gText_CancelParticipation[] = _("Cancel participation?");
|
||||
const u8 gText_CancelBattle[] = _("Cancel the battle?");
|
||||
|
@ -106,7 +106,7 @@ static void sub_80C438C(u8);
|
||||
static void sub_80C4FF0(void);
|
||||
static void sub_80C4550(u16*);
|
||||
static void sub_80C45C0(u16*);
|
||||
static void sub_80C4630(void);
|
||||
static void TrainerCard_PrintStarsAndBadgesOnCard(void);
|
||||
static void PrintTimeOnCard(void);
|
||||
static void sub_80C4918(void);
|
||||
static bool8 sub_80C4940(void);
|
||||
@ -117,7 +117,7 @@ static bool8 HasAllFrontierSymbols(void);
|
||||
static u8 GetRubyTrainerStars(struct TrainerCard*);
|
||||
static u16 GetCaughtMonsCount(void);
|
||||
static void SetPlayerCardData(struct TrainerCard*, u8);
|
||||
static void sub_80C3020(struct TrainerCard*);
|
||||
static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard*);
|
||||
static u8 VersionToCardType(u8);
|
||||
static void SetDataFromTrainerCard(void);
|
||||
static void HandleGpuRegs(void);
|
||||
@ -141,7 +141,7 @@ static void PrintBerryCrushStringOnCard(void);
|
||||
static void PrintPokeblockStringOnCard(void);
|
||||
static void PrintUnionStringOnCard(void);
|
||||
static void PrintContestStringOnCard(void);
|
||||
static void sub_80C4140(void);
|
||||
static void TrainerCard_PrintPokemonIconsOnCard(void);
|
||||
static void PrintBattleFacilityStringOnCard(void);
|
||||
static void sub_80C42A4(void);
|
||||
static void PrintAllVariableNumsOnCardPage2(void);
|
||||
@ -179,17 +179,17 @@ static const u16 gEmeraldTrainerCard3Star_Pal[] = INCBIN_U16("graphics/trainer_c
|
||||
static const u16 gFireRedTrainerCard3Star_Pal[] = INCBIN_U16("graphics/trainer_card/three_stars_fr.gbapal");
|
||||
static const u16 gEmeraldTrainerCard4Star_Pal[] = INCBIN_U16("graphics/trainer_card/four_stars.gbapal");
|
||||
static const u16 gFireRedTrainerCard4Star_Pal[] = INCBIN_U16("graphics/trainer_card/four_stars_fr.gbapal");
|
||||
static const u16 gUnknown_0856F4AC[] = INCBIN_U16("graphics/trainer_card/female_bg.gbapal");
|
||||
static const u16 gUnknown_0856F4CC[] = INCBIN_U16("graphics/trainer_card/female_bg_fr.gbapal");
|
||||
static const u16 gUnknown_0856F4EC[] = INCBIN_U16("graphics/trainer_card/badges.gbapal");
|
||||
static const u16 gUnknown_0856F50C[] = INCBIN_U16("graphics/trainer_card/badges_fr.gbapal");
|
||||
static const u16 sEmeraldTrainerCardFemaleBackground_Pal[] = INCBIN_U16("graphics/trainer_card/female_bg.gbapal");
|
||||
static const u16 sFireRedTrainerCardFemaleBackground_Pal[] = INCBIN_U16("graphics/trainer_card/female_bg_fr.gbapal");
|
||||
static const u16 sEmeraldTrainerCardBadges_Pal[] = INCBIN_U16("graphics/trainer_card/badges.gbapal");
|
||||
static const u16 sFireRedTrainerCardBadges_Pal[] = INCBIN_U16("graphics/trainer_card/badges_fr.gbapal");
|
||||
static const u16 gUnknown_0856F52C[] = INCBIN_U16("graphics/trainer_card/gold.gbapal");
|
||||
static const u16 gUnknown_0856F54C[] = INCBIN_U16("graphics/trainer_card/stickers_fr1.gbapal");
|
||||
static const u16 gUnknown_0856F56C[] = INCBIN_U16("graphics/trainer_card/stickers_fr2.gbapal");
|
||||
static const u16 gUnknown_0856F58C[] = INCBIN_U16("graphics/trainer_card/stickers_fr3.gbapal");
|
||||
static const u16 gUnknown_0856F5AC[] = INCBIN_U16("graphics/trainer_card/stickers_fr4.gbapal");
|
||||
static const u32 gUnknown_0856F5CC[] = INCBIN_U32("graphics/trainer_card/badges.4bpp.lz");
|
||||
static const u32 gUnknown_0856F814[] = INCBIN_U32("graphics/trainer_card/badges_fr.4bpp.lz");
|
||||
static const u32 sEmeraldTrainerCardBadges_Tile[] = INCBIN_U32("graphics/trainer_card/badges.4bpp.lz");
|
||||
static const u32 sFireRedTrainerCardBadges_Tile[] = INCBIN_U32("graphics/trainer_card/badges_fr.4bpp.lz");
|
||||
|
||||
static const struct BgTemplate gUnknown_0856FAB4[4] =
|
||||
{
|
||||
@ -376,7 +376,7 @@ static void sub_80C2760(u8 taskId)
|
||||
sData->var_0++;
|
||||
break;
|
||||
case 6:
|
||||
sub_80C4630();
|
||||
TrainerCard_PrintStarsAndBadgesOnCard();
|
||||
sData->var_0++;
|
||||
break;
|
||||
case 7:
|
||||
@ -528,9 +528,9 @@ static bool8 LoadCardGfx(void)
|
||||
break;
|
||||
case 3:
|
||||
if (sData->cardType != CARD_TYPE_FRLG)
|
||||
LZ77UnCompWram(gUnknown_0856F5CC, sData->var_13A8);
|
||||
LZ77UnCompWram(sEmeraldTrainerCardBadges_Tile, sData->var_13A8);
|
||||
else
|
||||
LZ77UnCompWram(gUnknown_0856F814, sData->var_13A8);
|
||||
LZ77UnCompWram(sFireRedTrainerCardBadges_Tile, sData->var_13A8);
|
||||
break;
|
||||
case 4:
|
||||
if (sData->cardType != CARD_TYPE_FRLG)
|
||||
@ -722,7 +722,7 @@ static void SetPlayerCardData(struct TrainerCard *trainerCard, u8 cardType)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80C3020(struct TrainerCard *trainerCard)
|
||||
static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *trainerCard)
|
||||
{
|
||||
memset(trainerCard, 0, sizeof(struct TrainerCard));
|
||||
trainerCard->version = GAME_VERSION;
|
||||
@ -733,9 +733,9 @@ static void sub_80C3020(struct TrainerCard *trainerCard)
|
||||
trainerCard->stars++;
|
||||
|
||||
if (trainerCard->gender == FEMALE)
|
||||
trainerCard->var_4F = gUnknown_08329D54[(trainerCard->trainerId % 8) + 8];
|
||||
trainerCard->var_4F = gLinkPlayerFacilityClasses[(trainerCard->trainerId % 8) + 8];
|
||||
else
|
||||
trainerCard->var_4F = gUnknown_08329D54[trainerCard->trainerId % 8];
|
||||
trainerCard->var_4F = gLinkPlayerFacilityClasses[trainerCard->trainerId % 8];
|
||||
}
|
||||
|
||||
void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard)
|
||||
@ -749,9 +749,9 @@ void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard)
|
||||
trainerCard->stars++;
|
||||
|
||||
if (trainerCard->gender == FEMALE)
|
||||
trainerCard->var_4F = gUnknown_08329D54[(trainerCard->trainerId % 8) + 8];
|
||||
trainerCard->var_4F = gLinkPlayerFacilityClasses[(trainerCard->trainerId % 8) + 8];
|
||||
else
|
||||
trainerCard->var_4F = gUnknown_08329D54[trainerCard->trainerId % 8];
|
||||
trainerCard->var_4F = gLinkPlayerFacilityClasses[trainerCard->trainerId % 8];
|
||||
}
|
||||
|
||||
void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion)
|
||||
@ -938,7 +938,7 @@ static bool8 PrintStringsOnCardPage2(void)
|
||||
PrintContestStringOnCard();
|
||||
break;
|
||||
case 6:
|
||||
sub_80C4140();
|
||||
TrainerCard_PrintPokemonIconsOnCard();
|
||||
PrintBattleFacilityStringOnCard();
|
||||
break;
|
||||
case 7:
|
||||
@ -1300,7 +1300,7 @@ static void PrintBattleFacilityStringOnCard(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80C4140(void)
|
||||
static void TrainerCard_PrintPokemonIconsOnCard(void)
|
||||
{
|
||||
u8 i;
|
||||
u8 buffer[] = {0x05, 0x06, 0x07, 0x08, 0x09, 0x0a};
|
||||
@ -1312,7 +1312,7 @@ static void sub_80C4140(void)
|
||||
{
|
||||
if (sData->trainerCard.monSpecies[i])
|
||||
{
|
||||
u8 monSpecies = sub_80D30A0(sData->trainerCard.monSpecies[i]);
|
||||
u8 monSpecies = GetMonIconPaletteIndexFromSpecies(sData->trainerCard.monSpecies[i]);
|
||||
WriteSequenceToBgTilemapBuffer(3, 16 * i + 224, buffer2[i] + 3, 15, 4, 4, buffer[monSpecies], 1);
|
||||
}
|
||||
}
|
||||
@ -1392,16 +1392,16 @@ static u8 SetCardBgsAndPals(void)
|
||||
if (sData->cardType != CARD_TYPE_FRLG)
|
||||
{
|
||||
LoadPalette(gEmeraldTrainerCardStarPals[sData->trainerCard.stars], 0, 96);
|
||||
LoadPalette(gUnknown_0856F4EC, 48, 32);
|
||||
LoadPalette(sEmeraldTrainerCardBadges_Pal, 48, 32);
|
||||
if (sData->trainerCard.gender)
|
||||
LoadPalette(gUnknown_0856F4AC, 16, 32);
|
||||
LoadPalette(sEmeraldTrainerCardFemaleBackground_Pal, 16, 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadPalette(gFireRedTrainerCardStarPals[sData->trainerCard.stars], 0, 96);
|
||||
LoadPalette(gUnknown_0856F50C, 48, 32);
|
||||
LoadPalette(sFireRedTrainerCardBadges_Pal, 48, 32);
|
||||
if (sData->trainerCard.gender)
|
||||
LoadPalette(gUnknown_0856F4CC, 16, 32);
|
||||
LoadPalette(sFireRedTrainerCardFemaleBackground_Pal, 16, 32);
|
||||
}
|
||||
LoadPalette(gUnknown_0856F52C, 64, 32);
|
||||
break;
|
||||
@ -1458,7 +1458,7 @@ static void sub_80C45C0(u16* ptr)
|
||||
|
||||
static const u8 gUnknown_0856FB78[] = {7, 7};
|
||||
|
||||
static void sub_80C4630(void)
|
||||
static void TrainerCard_PrintStarsAndBadgesOnCard(void)
|
||||
{
|
||||
s16 i, x;
|
||||
u16 tileNum = 192;
|
||||
@ -1684,7 +1684,7 @@ static bool8 sub_80C4C1C(struct Task* task)
|
||||
sub_80C438C(2);
|
||||
sub_80C4550(sData->var_EF8);
|
||||
sub_80C45C0(sData->var_598);
|
||||
sub_80C4630();
|
||||
TrainerCard_PrintStarsAndBadgesOnCard();
|
||||
}
|
||||
sub_80C438C(1);
|
||||
sData->var_8 ^= 1;
|
||||
@ -1764,7 +1764,7 @@ void ShowPlayerTrainerCard(void (*callback)(void))
|
||||
sData->isLink = FALSE;
|
||||
|
||||
sData->language = GAME_LANGUAGE;
|
||||
sub_80C3020(&sData->trainerCard);
|
||||
TrainerCard_GenerateCardForLinkPlayer(&sData->trainerCard);
|
||||
SetMainCallback2(CB2_InitTrainerCard);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user