Merge branch 'master' of https://github.com/pret/pokefirered into doc-ql

This commit is contained in:
GriffinR
2023-04-10 10:18:07 -04:00
372 changed files with 6942 additions and 8149 deletions
+8 -8
View File
@@ -1113,8 +1113,8 @@ static void Cmd_count_alive_pokemon(void)
{
if (i != battlerOnField1 && i != battlerOnField2
&& GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
{
AI_THINKING_STRUCT->funcResult++;
}
@@ -1165,25 +1165,25 @@ static void Cmd_get_ability(void)
return;
}
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
{
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
{
// AI has no knowledge of opponent, so it guesses which ability.
if (Random() % 2)
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0];
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
else
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1];
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1];
}
else
{
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0];
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
}
}
else
{
// 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_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1];
}
}
else
+19 -19
View File
@@ -54,8 +54,8 @@ static bool8 ShouldSwitchIfWonderGuard(void)
for (i = 0; i < PARTY_SIZE; ++i)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG
|| i == gBattlerPartyIndexes[gActiveBattler])
continue;
GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); // Unused return value.
@@ -120,8 +120,8 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
u8 monAbility;
if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
|| (i == gBattlerPartyIndexes[battlerIn1])
|| (i == gBattlerPartyIndexes[battlerIn2])
|| (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1))
@@ -129,9 +129,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
continue;
species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES);
if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE)
monAbility = gBaseStats[species].abilities[1];
monAbility = gSpeciesInfo[species].abilities[1];
else
monAbility = gBaseStats[species].abilities[0];
monAbility = gSpeciesInfo[species].abilities[0];
if (absorbingTypeAbility == monAbility && Random() & 1)
{
// we found a mon
@@ -265,8 +265,8 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
u8 monAbility;
if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
|| (i == gBattlerPartyIndexes[battlerIn1])
|| (i == gBattlerPartyIndexes[battlerIn2])
|| (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1))
@@ -274,9 +274,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
continue;
species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES);
if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE)
monAbility = gBaseStats[species].abilities[1];
monAbility = gSpeciesInfo[species].abilities[1];
else
monAbility = gBaseStats[species].abilities[0];
monAbility = gSpeciesInfo[species].abilities[0];
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility);
if (moveFlags & flags)
{
@@ -330,8 +330,8 @@ static bool8 ShouldSwitch(void)
for (i = 0; i < PARTY_SIZE; ++i)
{
if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
|| (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
|| (i == gBattlerPartyIndexes[battlerIn1])
|| (i == gBattlerPartyIndexes[battlerIn2])
|| (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1))
@@ -472,8 +472,8 @@ u8 GetMostSuitableMonToSwitchInto(void)
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn1)
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn2))
{
u8 type1 = gBaseStats[species].type1;
u8 type2 = gBaseStats[species].type2;
u8 type1 = gSpeciesInfo[species].types[0];
u8 type2 = gSpeciesInfo[species].types[1];
u8 typeDmg = 10;
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type1, type1, type2, &typeDmg);
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type2, type1, type2, &typeDmg);
@@ -551,9 +551,9 @@ static u8 GetAI_ItemType(u8 itemId, const u8 *itemEffect) // NOTE: should take u
return AI_ITEM_HEAL_HP;
else if (itemEffect[3] & ITEM3_STATUS_ALL)
return AI_ITEM_CURE_CONDITION;
else if (itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0)
else if (itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0)
return AI_ITEM_X_STAT;
else if (itemEffect[3] & ITEM3_MIST)
else if (itemEffect[3] & ITEM3_GUARD_SPEC)
return AI_ITEM_GUARD_SPECS;
else
return AI_ITEM_NOT_RECOGNIZABLE;
@@ -567,8 +567,8 @@ static bool8 ShouldUseItem(void)
for (i = 0; i < PARTY_SIZE; ++i)
if (GetMonData(&gEnemyParty[i], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
++validMons;
for (i = 0; i < MAX_TRAINER_ITEMS; ++i)
{
@@ -650,7 +650,7 @@ static bool8 ShouldUseItem(void)
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8;
if (itemEffects[2] & ITEM2_X_ACCURACY)
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20;
if (itemEffects[0] & ITEM0_HIGH_CRIT)
if (itemEffects[0] & ITEM0_DIRE_HIT)
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80;
shouldUse = TRUE;
break;
+1 -1
View File
@@ -706,7 +706,7 @@ const struct SpriteTemplate gSweetScentPetalSpriteTemplate =
.callback = AnimSweetScentPetal,
};
static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unk_83FF33C.gbapal"); //Unused
static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unused/unknown.gbapal");
static const union AnimCmd sPainSplitAnimCmds[] =
{
+1 -1
View File
@@ -177,7 +177,7 @@ const struct SpriteTemplate gFallingFeatherSpriteTemplate =
.callback = AnimFallingFeather,
};
static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unk_83E6C18.gbapal");
static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unused/flying.gbapal");
static const struct SpriteTemplate sUnusedBubbleThrowSpriteTemplate =
{
+2 -2
View File
@@ -53,8 +53,8 @@ static void AnimTask_WaterSport_Step(u8);
static void CreateWaterSportDroplet(struct Task *);
static void CreateWaterPulseRingBubbles(struct Sprite *, s32, s32);
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unk_83E44F4.4bpp");
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unk_83E4874.bin");
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water.4bpp");
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin");
static const union AnimCmd sAnim_RainDrop[] =
{
+4 -4
View File
@@ -470,7 +470,7 @@ static void Task_GiveExpToMon(u8 taskId)
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u32 currExp = GetMonData(mon, MON_DATA_EXP);
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= nextLvlExp)
{
@@ -512,11 +512,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u32 exp = GetMonData(mon, MON_DATA_EXP);
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
u32 expToNextLvl;
exp -= currLvlExp;
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
PlaySE(SE_EXP);
gTasks[taskId].func = Task_GiveExpWithExpBar;
@@ -548,7 +548,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= expOnNextLvl)
{
u8 savedActiveBattler;
+4 -4
View File
@@ -1031,7 +1031,7 @@ static void Task_GiveExpToMon(u8 taskId)
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u32 currExp = GetMonData(mon, MON_DATA_EXP);
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= nextLvlExp)
{
@@ -1073,11 +1073,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u32 exp = GetMonData(mon, MON_DATA_EXP);
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
u32 expToNextLvl;
exp -= currLvlExp;
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
PlaySE(SE_EXP);
gTasks[taskId].func = Task_GiveExpWithExpBar;
@@ -1109,7 +1109,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= expOnNextLvl)
{
u8 savedActiveBattler;
+4 -4
View File
@@ -451,7 +451,7 @@ static void Task_GiveExpToMon(u8 taskId)
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u32 currExp = GetMonData(mon, MON_DATA_EXP);
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= nextLvlExp)
{
@@ -493,11 +493,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
u8 level = GetMonData(mon, MON_DATA_LEVEL);
u16 species = GetMonData(mon, MON_DATA_SPECIES);
u32 exp = GetMonData(mon, MON_DATA_EXP);
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
u32 expToNextLvl;
exp -= currLvlExp;
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
PlaySE(SE_EXP);
gTasks[taskId].func = Task_GiveExpWithExpBar;
@@ -529,7 +529,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
if (currExp + gainedExp >= expOnNextLvl)
{
u8 savedActiveBattler;
+7 -7
View File
@@ -302,8 +302,8 @@ static void SetBattlePartyIds(void)
if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@@ -313,8 +313,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@@ -328,7 +328,7 @@ static void SetBattlePartyIds(void)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2.
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{
@@ -339,8 +339,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{
+2 -2
View File
@@ -1811,9 +1811,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
species = GetMonData(mon, MON_DATA_SPECIES);
level = GetMonData(mon, MON_DATA_LEVEL);
exp = GetMonData(mon, MON_DATA_EXP);
currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level];
currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
currExpBarValue = exp - currLevelExp;
maxExpBarValue = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLevelExp;
maxExpBarValue = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLevelExp;
SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles);
MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0);
}
+40 -40
View File
@@ -715,33 +715,33 @@ static void CB2_InitBattleInternal(void)
gBattleCommunication[MULTIUSE_STATE] = 0;
}
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
}
// For Vs Screen at link battle start
@@ -2277,8 +2277,8 @@ static void BattleStartClearSetData(void)
gBattleStruct->runTries = 0;
gBattleStruct->safariRockThrowCounter = 0;
gBattleStruct->safariBaitThrowCounter = 0;
*(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
*(&gBattleStruct->safariEscapeFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275;
*(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
*(&gBattleStruct->safariEscapeFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275;
if (gBattleStruct->safariEscapeFactor <= 1)
gBattleStruct->safariEscapeFactor = 2;
gBattleStruct->wildVictorySong = 0;
@@ -2508,8 +2508,8 @@ void FaintClearSetData(void)
*(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
}
gBattleResources->flags->flags[gActiveBattler] = 0;
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0];
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1];
}
static void BattleIntroGetMonsData(void)
@@ -2573,8 +2573,8 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
for (i = 0; i < sizeof(struct BattlePokemon); i++)
ptr[i] = gBattleBufferB[gActiveBattler][4 + i];
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0];
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1];
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
@@ -2651,8 +2651,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@@ -2669,8 +2669,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@@ -2695,8 +2695,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@@ -4337,7 +4337,7 @@ static void HandleAction_WatchesCarefully(void)
--gBattleStruct->safariRockThrowCounter;
if (gBattleStruct->safariRockThrowCounter == 0)
{
*(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275;
*(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275;
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MON_WATCHING;
}
else
+19 -19
View File
@@ -1514,7 +1514,7 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility)
{
s32 i = 0;
u8 flags = 0;
u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2;
u8 type1 = gSpeciesInfo[targetSpecies].types[0], type2 = gSpeciesInfo[targetSpecies].types[1];
u8 moveType;
if (move == MOVE_STRUGGLE)
@@ -3163,7 +3163,7 @@ static void Cmd_getexp(void)
viaExpShare++;
}
calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
if (viaExpShare) // at least one mon is getting exp via exp share
{
@@ -4480,8 +4480,8 @@ static void Cmd_switchindataupdate(void)
for (i = 0; i < sizeof(struct BattlePokemon); i++)
monData[i] = gBattleBufferB[gActiveBattler][4 + i];
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0];
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1];
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
// check knocked off item
@@ -5453,8 +5453,8 @@ static void Cmd_drawpartystatussummary(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatuses[i].hp = 0xFFFF;
hpStatuses[i].status = 0;
@@ -6168,7 +6168,7 @@ static void Cmd_various(void)
}
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
abilityNum = GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM);
status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS);
if (species != SPECIES_NONE
@@ -6188,7 +6188,7 @@ static void Cmd_various(void)
monToCheck = 0;
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG);
abilityNum = GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM);
status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS);
@@ -8041,7 +8041,7 @@ static void Cmd_healpartystatus(void)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG);
u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
if (species != SPECIES_NONE && species != SPECIES_EGG)
@@ -8587,8 +8587,8 @@ static void Cmd_trydobeatup(void)
for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++)
{
if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS))
break;
}
@@ -8598,10 +8598,10 @@ static void Cmd_trydobeatup(void)
gBattlescriptCurrInstr += 9;
gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
gBattleMoveDamage *= gBattleMoves[gCurrentMove].power;
gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2);
gBattleMoveDamage /= gBaseStats[gBattleMons[gBattlerTarget].species].baseDefense;
gBattleMoveDamage /= gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseDefense;
gBattleMoveDamage = (gBattleMoveDamage / 50) + 2;
if (gProtectStructs[gBattlerAttacker].helpingHand)
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
@@ -9104,9 +9104,9 @@ static void Cmd_assistattackselect(void)
{
if (monId == gBattlerPartyIndexes[gBattlerAttacker])
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
for (moveId = 0; moveId < MAX_MON_MOVES; moveId++)
@@ -9267,12 +9267,12 @@ static void Cmd_pickup(void)
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE)
ability = gBaseStats[species].abilities[1];
ability = gSpeciesInfo[species].abilities[1];
else
ability = gBaseStats[species].abilities[0];
ability = gSpeciesInfo[species].abilities[0];
if (ability == ABILITY_PICKUP && species != SPECIES_NONE && species != SPECIES_EGG && heldItem == ITEM_NONE && !(Random() % 10))
{
s32 random = Random() % 100;
@@ -9496,7 +9496,7 @@ static void Cmd_handleballthrow(void)
if (gLastUsedItem == ITEM_SAFARI_BALL)
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
else
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate;
if (gLastUsedItem > ITEM_SAFARI_BALL)
{
+1 -1
View File
@@ -545,7 +545,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons)
for (i = 0; i < PARTY_SIZE; ++i)
{
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0)
{
+1 -1
View File
@@ -796,7 +796,7 @@ void CheckPartyBattleTowerBanlist(void)
for (i = 0; i < PARTY_SIZE; i++)
{
species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
hp = GetMonData(&gPlayerParty[i], MON_DATA_HP);
+7 -7
View File
@@ -1560,8 +1560,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE);
@@ -1589,8 +1589,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& i != partyIdBattlerOn1 && i != partyIdBattlerOn2
&& i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId])
break;
@@ -3130,14 +3130,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
return targetBattler;
}
static bool32 IsMonEventLegal(u8 battlerId)
static bool32 IsBattlerModernFatefulEncounter(u8 battlerId)
{
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
return TRUE;
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS
&& GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW)
return TRUE;
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL);
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
}
u8 IsMonDisobedient(void)
@@ -3151,7 +3151,7 @@ u8 IsMonDisobedient(void)
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
return 0;
if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys
if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
{
if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName))
return 0;
+193 -184
View File
@@ -133,6 +133,11 @@ enum CreditsMap
CREDITS_MAP_ROUTE21_NORTH
};
enum {
GFXTAG_CHARACTER = 0x2000, // Player/Rival
GFXTAG_GROUND,
};
struct CreditsResources
{
u8 mainseqno;
@@ -160,9 +165,9 @@ struct CreditsScrcmd
struct CreditsTextHeader
{
const u8 * unk_0;
const u8 * unk_4;
bool8 unk_8;
const u8 * title;
const u8 * names;
bool8 unused;
};
struct CompressedGraphicsHeader
@@ -175,12 +180,12 @@ struct CompressedGraphicsHeader
struct CreditsTaskData
{
u8 spriteMoveCmd;
u8 playerSpriteId;
u16 playerTilesTag;
u16 field_04;
u8 characterSpriteId; // Player or rival
u16 characterTilesTag;
u16 characterPalTag;
u8 groundSpriteId;
u16 groundTilesTag;
u16 field_0A;
u16 groundPalTag;
};
static EWRAM_DATA struct CreditsResources * sCreditsMgr = NULL;
@@ -223,144 +228,148 @@ static const struct BgTemplate sBgTemplates_MonSceneOrTheEnd[] = {
static const struct WindowTemplate sWindowTemplates_Charizard[] = {
{
.bg = 0x00,
.tilemapLeft = 0x0b,
.tilemapTop = 0x06,
.width = 0x08,
.height = 0x08,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 6,
.width = 8,
.height = 8,
.paletteNum = 10,
.baseBlock = 0x0008
}, {
.bg = 0x00,
.tilemapLeft = 0x0a,
.tilemapTop = 0x05,
.width = 0x0a,
.height = 0x0a,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 5,
.width = 10,
.height = 10,
.paletteNum = 10,
.baseBlock = 0x0048
}, {
.bg = 0x00,
.tilemapLeft = 0x09,
.tilemapTop = 0x03,
.width = 0x0c,
.height = 0x0d,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 9,
.tilemapTop = 3,
.width = 12,
.height = 13,
.paletteNum = 10,
.baseBlock = 0x00ac
}, DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sWindowTemplates_Venusaur[] = {
{
.bg = 0x00,
.tilemapLeft = 0x0b,
.tilemapTop = 0x06,
.width = 0x08,
.height = 0x08,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 6,
.width = 8,
.height = 8,
.paletteNum = 10,
.baseBlock = 0x0008
}, {
.bg = 0x00,
.tilemapLeft = 0x0a,
.tilemapTop = 0x05,
.width = 0x0a,
.height = 0x0a,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 5,
.width = 10,
.height = 10,
.paletteNum = 10,
.baseBlock = 0x0048
}, {
.bg = 0x00,
.tilemapLeft = 0x09,
.tilemapTop = 0x05,
.width = 0x0c,
.height = 0x0a,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 9,
.tilemapTop = 5,
.width = 12,
.height = 10,
.paletteNum = 10,
.baseBlock = 0x00ac
}, DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sWindowTemplates_Blastoise[] = {
{
.bg = 0x00,
.tilemapLeft = 0x0b,
.tilemapTop = 0x06,
.width = 0x08,
.height = 0x08,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 6,
.width = 8,
.height = 8,
.paletteNum = 10,
.baseBlock = 0x0008
}, {
.bg = 0x00,
.tilemapLeft = 0x0a,
.tilemapTop = 0x05,
.width = 0x0a,
.height = 0x0a,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 5,
.width = 10,
.height = 10,
.paletteNum = 10,
.baseBlock = 0x0048
}, {
.bg = 0x00,
.tilemapLeft = 0x0a,
.tilemapTop = 0x04,
.width = 0x0a,
.height = 0x0c,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 4,
.width = 10,
.height = 12,
.paletteNum = 10,
.baseBlock = 0x00ac
}, DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sWindowTemplates_Pikachu[] = {
{
.bg = 0x00,
.tilemapLeft = 0x0b,
.tilemapTop = 0x06,
.width = 0x08,
.height = 0x08,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 11,
.tilemapTop = 6,
.width = 8,
.height = 8,
.paletteNum = 10,
.baseBlock = 0x0008
}, {
.bg = 0x00,
.tilemapLeft = 0x0a,
.tilemapTop = 0x05,
.width = 0x0a,
.height = 0x0a,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 10,
.tilemapTop = 5,
.width = 10,
.height = 10,
.paletteNum = 10,
.baseBlock = 0x0048
}, {
.bg = 0x00,
.tilemapLeft = 0x09,
.tilemapTop = 0x04,
.width = 0x0c,
.height = 0x0c,
.paletteNum = 0x0a,
.bg = 0,
.tilemapLeft = 9,
.tilemapTop = 4,
.width = 12,
.height = 12,
.paletteNum = 10,
.baseBlock = 0x00ac
}, DUMMY_WIN_TEMPLATE
};
static const u16 sPalette_OneBlackThenAllWhite[] = INCBIN_U16("graphics/credits/unk_840C630.gbapal");
static const u32 sAffineCircleGfx[] = INCBIN_U32("graphics/credits/unk_840C650.8bpp.lz");
static const u32 sAffineCircleMap[] = INCBIN_U32("graphics/credits/unk_840CA54.bin.lz");
static const u32 sWindow1Map_Charizard[] = INCBIN_U32("graphics/credits/unk_840CB8C.bin.lz");
static const u32 sWindow2Map_Charizard[] = INCBIN_U32("graphics/credits/unk_840D228.bin.lz");
static const u32 sUnusedTilemap[] = INCBIN_U32("graphics/credits/unk_840DC0C.bin.lz");
static const u32 sWindow1Map_Venusaur[] = INCBIN_U32("graphics/credits/unk_840E158.bin.lz");
static const u32 sWindow2Map_Venusaur[] = INCBIN_U32("graphics/credits/unk_840E904.bin.lz");
static const u32 sWindow1Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F240.bin.lz");
static const u32 sWindow2Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F944.bin.lz");
static const u32 sWindow1Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_8410198.bin.lz");
static const u32 sWindow2Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_84105B4.bin.lz");
static const u16 sCreditsMonCircle_Pal[] = INCBIN_U16("graphics/credits/white_circle.gbapal");
static const u32 sCreditsMonCircle_Tiles[] = INCBIN_U32("graphics/credits/white_circle.8bpp.lz");
static const u32 sCreditsMonCircle_Tilemap[] = INCBIN_U32("graphics/credits/white_circle.bin.lz");
static const u32 sCharizard1_Tiles[] = INCBIN_U32("graphics/credits/charizard_1.4bpp.lz");
static const u32 sCharizard2_Tiles[] = INCBIN_U32("graphics/credits/charizard_2.4bpp.lz");
static const u32 sVenusaurUnused_Tiles[] = INCBIN_U32("graphics/credits/venusaur_unused.4bpp.lz");
static const u32 sVenusaur1_Tiles[] = INCBIN_U32("graphics/credits/venusaur_1.4bpp.lz");
static const u32 sVenusaur2_Tiles[] = INCBIN_U32("graphics/credits/venusaur_2.4bpp.lz");
static const u32 sBlastoise1_Tiles[] = INCBIN_U32("graphics/credits/blastoise_1.4bpp.lz");
static const u32 sBlastoise2_Tiles[] = INCBIN_U32("graphics/credits/blastoise_2.4bpp.lz");
static const u32 sPikachu1_Tiles[] = INCBIN_U32("graphics/credits/pikachu_1.4bpp.lz");
static const u32 sPikachu2_Tiles[] = INCBIN_U32("graphics/credits/pikachu_2.4bpp.lz");
static const u32 sUnused = 0xF0;
static const u16 sTheEndGfxPal[] = INCBIN_U16("graphics/credits/unk_8410B20.gbapal");
static const u8 sTheEndGfxTiles[] = INCBIN_U8("graphics/credits/unk_8410B20.4bpp.lz");
static const u8 sTheEndGfxMap[] = INCBIN_U8("graphics/credits/unk_8410B20.bin.lz");
static const u16 sTheEnd_Pal[] = INCBIN_U16("graphics/credits/the_end.gbapal");
static const u8 sTheEnd_Tiles[] = INCBIN_U8("graphics/credits/the_end.4bpp.lz");
static const u8 sTheEnd_Tilemap[] = INCBIN_U8("graphics/credits/the_end.bin.lz");
static const struct CompressedGraphicsHeader sCopyrightOrTheEndGfxHeaders[] = {
{
.tiles = gCreditsAllRightsReservedGfxTiles,
.map = gCreditsAllRightsReservedGfxMap,
.palette = gCreditsAllRightsReservedGfxPal
.tiles = gCreditsCopyright_Tiles,
.map = gCreditsCopyright_Tilemap,
.palette = gCreditsCopyright_Pal
}, {
.tiles = sTheEndGfxTiles,
.map = sTheEndGfxMap,
.palette = sTheEndGfxPal
.tiles = sTheEnd_Tiles,
.map = sTheEnd_Tilemap,
.palette = sTheEnd_Pal
}
};
@@ -454,18 +463,18 @@ static const struct WindowTemplate sCreditsWindowTemplate = {
.baseBlock = 0x008
};
static const u16 sMalePlayerSpritePal[] = INCBIN_U16("graphics/credits/unk_8410E10.gbapal");
static const u32 sMalePlayerSpriteGfx[] = INCBIN_U32("graphics/credits/unk_8410E30.4bpp.lz");
static const u16 sFemalePlayerSpritePal[] = INCBIN_U16("graphics/credits/unk_8411BF8.gbapal");
static const u32 sFemalePlayerSpriteGfx[] = INCBIN_U32("graphics/credits/unk_8411C18.4bpp.lz");
static const u16 sRivalSpritePal[] = INCBIN_U16("graphics/credits/unk_84129A0.gbapal");
static const u32 sRivalSpriteGfx[] = INCBIN_U32("graphics/credits/unk_84129C0.4bpp.lz");
static const u16 sGroundSpritePal_Grass[] = INCBIN_U16("graphics/credits/unk_8413318.gbapal");
static const u32 sGroundSpriteGfx_Grass[] = INCBIN_U32("graphics/credits/unk_8413338.4bpp.lz");
static const u16 sGroundSpritePal_Dirt[] = INCBIN_U16("graphics/credits/unk_8413854.gbapal");
static const u32 sGroundSpriteGfx_Dirt[] = INCBIN_U32("graphics/credits/unk_8413874.4bpp.lz");
static const u16 sGroundSpritePal_City[] = INCBIN_U16("graphics/credits/unk_8413D98.gbapal");
static const u32 sGroundSpriteGfx_City[] = INCBIN_U32("graphics/credits/unk_8413DB8.4bpp.lz");
static const u16 sPlayerMale_Pal[] = INCBIN_U16("graphics/credits/player_male.gbapal");
static const u32 sPlayerMale_Tiles[] = INCBIN_U32("graphics/credits/player_male.4bpp.lz");
static const u16 sPlayerFemale_Pal[] = INCBIN_U16("graphics/credits/player_female.gbapal");
static const u32 sPlayerFemale_Tiles[] = INCBIN_U32("graphics/credits/player_female.4bpp.lz");
static const u16 sRival_Pal[] = INCBIN_U16("graphics/credits/rival.gbapal");
static const u32 sRival_Tiles[] = INCBIN_U32("graphics/credits/rival.4bpp.lz");
static const u16 sGround_Grass_Pal[] = INCBIN_U16("graphics/credits/ground_grass.gbapal");
static const u32 sGround_Grass_Tiles[] = INCBIN_U32("graphics/credits/ground_grass.4bpp.lz");
static const u16 sGround_Dirt_Pal[] = INCBIN_U16("graphics/credits/ground_dirt.gbapal");
static const u32 sGround_Dirt_Tiles[] = INCBIN_U32("graphics/credits/ground_dirt.4bpp.lz");
static const u16 sGround_City_Pal[] = INCBIN_U16("graphics/credits/ground_city.gbapal");
static const u32 sGround_City_Tiles[] = INCBIN_U32("graphics/credits/ground_city.4bpp.lz");
static const u16 sPlayerRivalSpriteParams[][3] = {
{ 0, 3, 1 },
@@ -703,7 +712,7 @@ void DoCredits(void)
{
sCreditsMgr = AllocZeroed(sizeof(*sCreditsMgr));
ResetTasks();
sCreditsMgr->taskId = 0xFF;
sCreditsMgr->taskId = TASK_NONE;
sCreditsMgr->unk_1D = 0;
ResetSpriteData();
SetMainCallback2(CB2_Credits);
@@ -790,8 +799,8 @@ static bool32 DoOverworldMapScrollScene(u8 whichMon)
if (!Overworld_DoScrollSceneForCredits(&sCreditsMgr->ovwldseqno, sOverworldMapScenes[sCreditsMgr->whichMon], QL_TINT_NONE))
return FALSE;
CreateCreditsWindow();
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
SetGpuReg(REG_OFFSET_WIN0V, 0x247C);
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH));
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(36, DISPLAY_HEIGHT - 36));
SwitchWin1OffWin0On();
InitBgDarkenEffect();
Menu_LoadStdPalAt(0xF0);
@@ -811,8 +820,8 @@ static s32 RollCredits(void)
{
case CREDITSSCENE_INIT_WIN0:
SwitchWin1OffWin0On();
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
SetGpuReg(REG_OFFSET_WIN0V, 0x4F51);
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH));
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(DISPLAY_HEIGHT / 2 - 1, DISPLAY_HEIGHT / 2 + 1));
sCreditsMgr->mainseqno = CREDITSSCENE_SETUP_DARKEN_EFFECT;
return 0;
case CREDITSSCENE_SETUP_DARKEN_EFFECT:
@@ -912,13 +921,13 @@ static s32 RollCredits(void)
case CREDITSSCENE_PRINT_ADDPRINTER1:
if (gPaletteFade.active)
return sCreditsMgr->canSpeedThrough;
win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; // unused
AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_0);
win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused;
AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].title);
sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_ADDPRINTER2;
return sCreditsMgr->canSpeedThrough;
case CREDITSSCENE_PRINT_ADDPRINTER2:
win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8;
AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_4);
win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused;
AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].names);
sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_DELAY;
return sCreditsMgr->canSpeedThrough;
case CREDITSSCENE_PRINT_DELAY:
@@ -1042,29 +1051,29 @@ static void LoadCreditsMonPic(u8 whichMon)
InitWindows(sWindowTemplates_Charizard);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
LoadMonPicInWindow(SPECIES_CHARIZARD, SHINY_ODDS, 0, TRUE, 10, 0);
CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Charizard, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Charizard, 0, 0);
CopyToWindowPixelBuffer(1, (const void *)sCharizard1_Tiles, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sCharizard2_Tiles, 0, 0);
break;
case CREDITSMON_VENUSAUR:
InitWindows(sWindowTemplates_Venusaur);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
LoadMonPicInWindow(SPECIES_VENUSAUR, SHINY_ODDS, 0, TRUE, 10, 0);
CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Venusaur, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Venusaur, 0, 0);
CopyToWindowPixelBuffer(1, (const void *)sVenusaur1_Tiles, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sVenusaur2_Tiles, 0, 0);
break;
case CREDITSMON_BLASTOISE:
InitWindows(sWindowTemplates_Blastoise);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
LoadMonPicInWindow(SPECIES_BLASTOISE, SHINY_ODDS, 0, TRUE, 10, 0);
CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Blastoise, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Blastoise, 0, 0);
CopyToWindowPixelBuffer(1, (const void *)sBlastoise1_Tiles, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sBlastoise2_Tiles, 0, 0);
break;
case CREDITSMON_PIKACHU:
InitWindows(sWindowTemplates_Pikachu);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
LoadMonPicInWindow(SPECIES_PIKACHU, SHINY_ODDS, 0, TRUE, 10, 0);
CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Pikachu, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Pikachu, 0, 0);
CopyToWindowPixelBuffer(1, (const void *)sPikachu1_Tiles, 0, 0);
CopyToWindowPixelBuffer(2, (const void *)sPikachu2_Tiles, 0, 0);
break;
}
CopyWindowToVram(0, COPYWIN_GFX);
@@ -1108,19 +1117,19 @@ static bool32 DoCreditsMonScene(void)
ResetBgsAndClearDma3BusyFlags(1);
InitBgsFromTemplates(1, sBgTemplates_MonSceneOrTheEnd, NELEMS(sBgTemplates_MonSceneOrTheEnd));
SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE));
ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0);
ChangeBgX(1, 0, 0);
ChangeBgY(1, 0, 0);
ChangeBgX(0, 0, BG_COORD_SET);
ChangeBgY(0, 0, BG_COORD_SET);
ChangeBgX(1, 0, BG_COORD_SET);
ChangeBgY(1, 0, BG_COORD_SET);
sCreditsMgr->creditsMonTimer = 0;
sCreditsMgr->unk_0E = 0;
SetBgAffine(2, 0x8000, 0x8000, 0x78, 0x50, sCreditsMgr->creditsMonTimer, sCreditsMgr->creditsMonTimer, 0);
DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxTiles, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleGfx, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxMap, 0x500, 0, 1);
DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleMap, 0x400, 0, 1);
LoadPalette(gCreditsMonBackdropPals[sCreditsMgr->whichMon], 0, 0x20);
LoadPalette(sPalette_OneBlackThenAllWhite, 0xF0, 0x20);
DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tiles, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tiles, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tilemap, 0x500, 0, 1);
DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tilemap, 0x400, 0, 1);
LoadPalette(gCreditsMonPokeball_Pals[sCreditsMgr->whichMon], 0, 0x20);
LoadPalette(sCreditsMonCircle_Pal, 0xF0, 0x20);
LoadCreditsMonPic(sCreditsMgr->whichMon);
SetVBlankCallback(VBlankCB);
EnableInterrupts(INTR_FLAG_VBLANK);
@@ -1236,8 +1245,8 @@ static bool32 DoCopyrightOrTheEndGfxScene(void)
ResetTasks();
ResetBgsAndClearDma3BusyFlags(1);
InitBgsFromTemplates(0, sBgTemplates_MonSceneOrTheEnd, 1);
ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0);
ChangeBgX(0, 0, BG_COORD_SET);
ChangeBgY(0, 0, BG_COORD_SET);
DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].tiles, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].map, 0x800, 0, 1);
LoadPalette(sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].palette, 0x00, 0x200);
@@ -1276,9 +1285,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId)
case 0:
break;
case 1:
if (gSprites[data->playerSpriteId].x != 0xD0)
if (gSprites[data->characterSpriteId].x != 0xD0)
{
gSprites[data->playerSpriteId].x--;
gSprites[data->characterSpriteId].x--;
gSprites[data->groundSpriteId].x--;
}
else
@@ -1289,9 +1298,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId)
case 2:
if (sCreditsMgr->unk_1D & 1)
{
if (gSprites[data->playerSpriteId].y != 0x50)
if (gSprites[data->characterSpriteId].y != 0x50)
{
gSprites[data->playerSpriteId].y--;
gSprites[data->characterSpriteId].y--;
gSprites[data->groundSpriteId].y--;
}
else
@@ -1303,7 +1312,7 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId)
case 3:
if (sCreditsMgr->mainseqno == 15)
{
gSprites[data->playerSpriteId].x--;
gSprites[data->characterSpriteId].x--;
gSprites[data->groundSpriteId].x--;
}
break;
@@ -1312,15 +1321,15 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId)
static void DestroyPlayerOrRivalSprite(void)
{
if (sCreditsMgr->taskId != 0xFF)
if (sCreditsMgr->taskId != TASK_NONE)
{
struct CreditsTaskData * data = (void *)gTasks[sCreditsMgr->taskId].data;
FreeSpriteTilesByTag(data->playerTilesTag);
DestroySprite(&gSprites[data->playerSpriteId]);
FreeSpriteTilesByTag(data->characterTilesTag);
DestroySprite(&gSprites[data->characterSpriteId]);
FreeSpriteTilesByTag(data->groundTilesTag);
DestroySprite(&gSprites[data->groundSpriteId]);
DestroyTask(sCreditsMgr->taskId);
sCreditsMgr->taskId = 0xFF;
sCreditsMgr->taskId = TASK_NONE;
}
}
@@ -1332,7 +1341,7 @@ static void LoadPlayerOrRivalSprite(u8 whichScene)
struct SpriteTemplate sprTemplate;
struct CompressedSpriteSheet sprSheet;
if (sCreditsMgr->taskId == 0xFF)
if (sCreditsMgr->taskId == TASK_NONE)
{
taskId = CreateTask(Task_MovePlayerAndGroundSprites, 0);
data = (void *)gTasks[taskId].data;
@@ -1341,97 +1350,97 @@ static void LoadPlayerOrRivalSprite(u8 whichScene)
{
default:
case 0:
x = 0xd0;
y = 0x50;
x = DISPLAY_WIDTH - 32;
y = DISPLAY_HEIGHT / 2;
break;
case 1:
x = 0x110;
y = 0x50;
x = DISPLAY_WIDTH + 32;
y = DISPLAY_HEIGHT / 2;
break;
case 2:
x = 0xd0;
y = 0xa0;
x = DISPLAY_WIDTH - 32;
y = DISPLAY_HEIGHT;
break;
}
data->spriteMoveCmd = sPlayerRivalSpriteParams[whichScene][2];
data->playerTilesTag = 0x2000;
data->field_04 = 0xFFFF;
data->characterTilesTag = GFXTAG_CHARACTER;
data->characterPalTag = TAG_NONE;
switch (sPlayerRivalSpriteParams[whichScene][0])
{
case 0:
// Player
if (gSaveBlock2Ptr->playerGender == MALE)
{
sprSheet.data = sMalePlayerSpriteGfx;
sprSheet.data = sPlayerMale_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->playerTilesTag;
sprSheet.tag = data->characterTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sMalePlayerSpritePal, 0x1F0, 0x20);
LoadPalette(sPlayerMale_Pal, 0x1F0, sizeof(sPlayerMale_Pal));
}
else
{
sprSheet.data = sFemalePlayerSpriteGfx;
sprSheet.data = sPlayerFemale_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->playerTilesTag;
sprSheet.tag = data->characterTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sFemalePlayerSpritePal, 0x1F0, 0x20);
LoadPalette(sPlayerFemale_Pal, 0x1F0, sizeof(sPlayerFemale_Pal));
}
break;
case 1:
// Rival
sprSheet.data = sRivalSpriteGfx;
sprSheet.data = sRival_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->playerTilesTag;
sprSheet.tag = data->characterTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sRivalSpritePal, 0x1F0, 0x20);
LoadPalette(sRival_Pal, 0x1F0, sizeof(sRival_Pal));
break;
}
sprTemplate = sPlayerOrRivalSpriteTemplate;
sprTemplate.tileTag = data->playerTilesTag;
data->playerSpriteId = CreateSprite(&sprTemplate, x, y, 0);
gSprites[data->playerSpriteId].oam.paletteNum = 0xF;
gSprites[data->playerSpriteId].subpriority = 0;
sprTemplate.tileTag = data->characterTilesTag;
data->characterSpriteId = CreateSprite(&sprTemplate, x, y, 0);
gSprites[data->characterSpriteId].oam.paletteNum = 15;
gSprites[data->characterSpriteId].subpriority = 0;
data->groundTilesTag = 0x2001;
data->field_0A = 0xFFFF;
data->groundTilesTag = GFXTAG_GROUND;
data->groundPalTag = TAG_NONE;
switch (sPlayerRivalSpriteParams[whichScene][1])
{
case 0:
sprSheet.data = sGroundSpriteGfx_Grass;
sprSheet.data = sGround_Grass_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->groundTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20);
LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal));
sprTemplate = sGroundSpriteTemplate_Running;
break;
case 1:
sprSheet.data = sGroundSpriteGfx_Grass;
sprSheet.data = sGround_Grass_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->groundTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20);
LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal));
sprTemplate = sGroundSpriteTemplate_Static;
break;
case 2:
sprSheet.data = sGroundSpriteGfx_Dirt;
sprSheet.data = sGround_Dirt_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->groundTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sGroundSpritePal_Dirt, 0x1E0, 0x20);
LoadPalette(sGround_Dirt_Pal, 0x1E0, sizeof(sGround_Dirt_Pal));
sprTemplate = sGroundSpriteTemplate_Running;
break;
case 3:
sprSheet.data = sGroundSpriteGfx_City;
sprSheet.data = sGround_City_Tiles;
sprSheet.size = 0x3000;
sprSheet.tag = data->groundTilesTag;
LoadCompressedSpriteSheet(&sprSheet);
LoadPalette(sGroundSpritePal_City, 0x1E0, 0x20);
LoadPalette(sGround_City_Pal, 0x1E0, sizeof(sGround_City_Pal));
sprTemplate = sGroundSpriteTemplate_Running;
break;
}
sprTemplate.tileTag = data->groundTilesTag;
data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 0x26, 0);
gSprites[data->groundSpriteId].oam.paletteNum = 0xE;
data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 38, 0);
gSprites[data->groundSpriteId].oam.paletteNum = 14;
gSprites[data->groundSpriteId].subpriority = 1;
}
}
+1 -1
View File
@@ -1658,7 +1658,7 @@ const u32 gMonShinyPalette_Hitmontop[] = INCBIN_U32("graphics/pokemon/hitmontop/
const u8 gMonIcon_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/icon.4bpp");
// This might be undefined memory garbage. Its all 00s except for 1 0F. Its also not referenced.
const u32 gUndefined_8DD1E90[] = INCBIN_U32("data/garbage_8DD2290.bin");
const u32 gUnusedGarbage[] = INCBIN_U32("graphics/pokemon/hitmontop/unused_garbage.bin");
const u8 gMonFootprint_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/footprint.1bpp");
+1 -1
View File
@@ -2948,7 +2948,7 @@
"english": "SOOTHE BELL",
"itemId": "ITEM_SOOTHE_BELL",
"price": 100,
"holdEffect": "HOLD_EFFECT_HAPPINESS_UP",
"holdEffect": "HOLD_EFFECT_FRIENDSHIP_UP",
"holdEffectParam": 0,
"description_english": "An item to be held by a POKéMON.\\nA bell with a comforting chime that\\nmakes the holder calm and friendly.",
"importance": 0,
+12 -46
View File
@@ -108,8 +108,8 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] =
},
};
static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin");
static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin");
static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin");
static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin");
static const u8 sFontColorTable[][3] =
{
@@ -549,48 +549,14 @@ static const struct WindowTemplate sFieldMoveDescriptionWindowTemplate =
.baseBlock = 0x373,
};
static const u8 sMainSlotTileNums[] =
{
24, 25, 25, 25, 25, 25, 25, 25, 25, 26,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
40, 59, 60, 58, 58, 58, 58, 58, 58, 61,
15, 16, 16, 16, 16, 16, 16, 16, 16, 17,
46, 47, 47, 47, 47, 47, 47, 47, 47, 48,
};
static const u8 sMainSlotTileNums_Egg[] =
{
24, 25, 25, 25, 25, 25, 25, 25, 25, 26,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
40, 41, 41, 41, 41, 41, 41, 41, 41, 42,
15, 16, 16, 16, 16, 16, 16, 16, 16, 17,
46, 47, 47, 47, 47, 47, 47, 47, 47, 48,
};
static const u8 sOtherSlotsTileNums[] =
{
43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45,
49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54,
55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57,
};
static const u8 sOtherSlotsTileNums_Egg[] =
{
43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45,
49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50,
55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57,
};
static const u8 sEmptySlotTileNums[] =
{
21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39,
};
// Plain tilemaps for party menu slots.
// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility.
// There is no empty version of the main slot because it shouldn't ever be empty.
static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin");
static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin");
static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin");
static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin");
static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin");
static const u8 sGenderPalOffsets[] = {11, 12};
@@ -695,8 +661,8 @@ static const u8 *const sFieldMoveDescriptionTable[] =
[FIELD_MOVE_SWEET_SCENT] = gText_LureWildPokemon,
};
static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp");
static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal");
static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp");
static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal");
static const struct OamData sOamData_HeldItem =
{
+135 -151
View File
@@ -1,6 +1,6 @@
static const u8 sItemEffect_Potion[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 20,
[6] = 20, // Amount of HP to recover
};
static const u8 sItemEffect_Antidote[6] = {
@@ -26,22 +26,22 @@ static const u8 sItemEffect_ParalyzeHeal[6] = {
static const u8 sItemEffect_FullRestore[7] = {
[3] = ITEM3_STATUS_ALL,
[4] = ITEM4_HEAL_HP,
[6] = -1,
[6] = ITEM6_HEAL_HP_FULL,
};
static const u8 sItemEffect_MaxPotion[7] = {
[4] = ITEM4_HEAL_HP,
[6] = -1,
[6] = ITEM6_HEAL_HP_FULL,
};
static const u8 sItemEffect_HyperPotion[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 200,
[6] = 200, // Amount of HP to recover
};
static const u8 sItemEffect_SuperPotion[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 50,
[6] = 50, // Amount of HP to recover
};
static const u8 sItemEffect_FullHeal[6] = {
@@ -50,87 +50,87 @@ static const u8 sItemEffect_FullHeal[6] = {
static const u8 sItemEffect_Revive[7] = {
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
[6] = -2,
[6] = ITEM6_HEAL_HP_HALF,
};
static const u8 sItemEffect_MaxRevive[7] = {
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
[6] = -1,
[6] = ITEM6_HEAL_HP_FULL,
};
static const u8 sItemEffect_FreshWater[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 50,
[6] = 50, // Amount of HP to recover
};
static const u8 sItemEffect_SodaPop[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 60,
[6] = 60, // Amount of HP to recover
};
static const u8 sItemEffect_Lemonade[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 80,
[6] = 80, // Amount of HP to recover
};
static const u8 sItemEffect_MoomooMilk[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 100,
[6] = 100, // Amount of HP to recover
};
static const u8 sItemEffect_EnergyPowder[10] = {
[4] = ITEM4_HEAL_HP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 50,
[7] = -5,
[8] = -5,
[9] = -10,
[6] = 50, // Amount of HP to recover
[7] = -5, // Friendship change, low
[8] = -5, // Friendship change, mid
[9] = -10, // Friendship change, high
};
static const u8 sItemEffect_EnergyRoot[10] = {
[4] = ITEM4_HEAL_HP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 200,
[7] = -10,
[8] = -10,
[9] = -15,
[6] = 200, // Amount of HP to recover
[7] = -10, // Friendship change, low
[8] = -10, // Friendship change, mid
[9] = -15, // Friendship change, high
};
static const u8 sItemEffect_HealPowder[9] = {
[3] = ITEM3_STATUS_ALL,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = -5,
[7] = -5,
[8] = -10,
[6] = -5, // Friendship change, low
[7] = -5, // Friendship change, mid
[8] = -10, // Friendship change, high
};
static const u8 sItemEffect_RevivalHerb[10] = {
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = -1,
[7] = -15,
[8] = -15,
[9] = -20,
[6] = ITEM6_HEAL_HP_FULL,
[7] = -15, // Friendship change, low
[8] = -15, // Friendship change, mid
[9] = -20, // Friendship change, high
};
static const u8 sItemEffect_Ether[7] = {
[4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL,
[6] = 10,
[6] = 10, // Amount of PP to recover
};
static const u8 sItemEffect_MaxEther[7] = {
[4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL,
[6] = 0x7F,
[6] = ITEM6_HEAL_PP_FULL,
};
static const u8 sItemEffect_Elixir[7] = {
[4] = ITEM4_HEAL_PP_ALL,
[6] = 10,
[6] = 10, // Amount of PP to recover
};
static const u8 sItemEffect_MaxElixir[7] = {
[4] = ITEM4_HEAL_PP_ALL,
[6] = 0x7F,
[6] = ITEM6_HEAL_PP_FULL,
};
static const u8 sItemEffect_LavaCookie[6] = {
@@ -151,137 +151,121 @@ static const u8 sItemEffect_RedFlute[6] = {
static const u8 sItemEffect_BerryJuice[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 20,
[6] = 20, // Amount of HP to recover
};
static const u8 sItemEffect_SacredAsh[7] = {
[0] = ITEM0_SACRED_ASH,
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
[6] = -1,
[6] = ITEM6_HEAL_HP_FULL,
};
#define VITAMIN_FRIENDSHIP_CHANGE(i) \
[(i) + 0] = 5, /* Friendship change, low */ \
[(i) + 1] = 3, /* Friendship change, mid */ \
[(i) + 2] = 2 /* Friendship change, high */
static const u8 sItemEffect_HPUp[10] = {
[4] = ITEM4_EV_HP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_Protein[10] = {
[4] = ITEM4_EV_ATK,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_Iron[10] = {
[5] = ITEM5_EV_DEF | ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_Carbos[10] = {
[5] = ITEM5_EV_SPEED | ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_Calcium[10] = {
[5] = ITEM5_EV_SPATK | ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_RareCandy[10] = {
[3] = ITEM3_LEVEL_UP,
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 0xFD,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_HEAL_HP_LVL_UP,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_PPUp[9] = {
[4] = ITEM4_PP_UP,
[5] = ITEM5_FRIENDSHIP_ALL,
[6] = 5,
[7] = 3,
[8] = 2,
VITAMIN_FRIENDSHIP_CHANGE(6),
};
static const u8 sItemEffect_Zinc[10] = {
[5] = ITEM5_EV_SPDEF | ITEM5_FRIENDSHIP_ALL,
[6] = 10,
[7] = 5,
[8] = 3,
[9] = 2,
[6] = ITEM6_ADD_EV,
VITAMIN_FRIENDSHIP_CHANGE(7),
};
static const u8 sItemEffect_PPMax[9] = {
[5] = ITEM5_PP_MAX | ITEM5_FRIENDSHIP_ALL,
[6] = 5,
[7] = 3,
[8] = 2,
VITAMIN_FRIENDSHIP_CHANGE(6),
};
#define STAT_BOOST_FRIENDSHIP_CHANGE \
[6] = 1, /* Friendship change, low */ \
[7] = 1 /* Friendship change, mid */
static const u8 sItemEffect_GuardSpec[8] = {
[3] = ITEM3_MIST,
[3] = ITEM3_GUARD_SPEC,
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE
};
static const u8 sItemEffect_DireHit[8] = {
[0] = 2 << 4,
[0] = 2 << 4, // ITEM0_DIRE_HIT
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE
};
static const u8 sItemEffect_XAttack[8] = {
[0] = 1,
[0] = 1, // ITEM0_X_ATTACK
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE
};
static const u8 sItemEffect_XDefend[8] = {
[1] = 1 << 4,
[1] = 1 << 4, /// ITEM1_X_DEFEND
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE,
};
static const u8 sItemEffect_XSpeed[8] = {
[1] = 1,
[1] = 1, // ITEM1_X_SPEED
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE,
};
static const u8 sItemEffect_XAccuracy[8] = {
[2] = 1 << 4,
[2] = 1 << 4, // ITEM2_X_ACCURACY
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE,
};
static const u8 sItemEffect_XSpecial[8] = {
[2] = 1,
[2] = 1, // ITEM2_X_SPATK
[5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID,
[6] = 1,
[7] = 1,
STAT_BOOST_FRIENDSHIP_CHANGE,
};
static const u8 sItemEffect_SunStone[6] = {
@@ -330,12 +314,12 @@ static const u8 sItemEffect_AspearBerry[6] = {
static const u8 sItemEffect_LeppaBerry[7] = {
[4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL,
[6] = 10,
[6] = 10, // Amount of PP to recover
};
static const u8 sItemEffect_OranBerry[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 10,
[6] = 10, // Amount of HP to recover
};
static const u8 sItemEffect_PersimBerry[6] = {
@@ -348,73 +332,73 @@ static const u8 sItemEffect_LumBerry[6] = {
static const u8 sItemEffect_SitrusBerry[7] = {
[4] = ITEM4_HEAL_HP,
[6] = 30,
[6] = 30, // Amount of HP to recover
};
const u8 *const gItemEffectTable[] =
{
[ITEM_POTION - ITEM_POTION] = sItemEffect_Potion,
[ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote,
[ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal,
[ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal,
[ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening,
[ITEM_POTION - ITEM_POTION] = sItemEffect_Potion,
[ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote,
[ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal,
[ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal,
[ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening,
[ITEM_PARALYZE_HEAL - ITEM_POTION] = sItemEffect_ParalyzeHeal,
[ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore,
[ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion,
[ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion,
[ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion,
[ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal,
[ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive,
[ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive,
[ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater,
[ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop,
[ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade,
[ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk,
[ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore,
[ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion,
[ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion,
[ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion,
[ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal,
[ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive,
[ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive,
[ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater,
[ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop,
[ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade,
[ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk,
[ITEM_ENERGY_POWDER - ITEM_POTION] = sItemEffect_EnergyPowder,
[ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot,
[ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder,
[ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb,
[ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether,
[ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther,
[ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir,
[ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir,
[ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie,
[ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute,
[ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute,
[ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute,
[ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice,
[ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh,
[ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp,
[ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein,
[ITEM_IRON - ITEM_POTION] = sItemEffect_Iron,
[ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos,
[ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium,
[ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy,
[ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp,
[ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc,
[ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax,
[ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec,
[ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit,
[ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack,
[ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend,
[ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed,
[ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy,
[ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial,
[ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone,
[ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone,
[ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone,
[ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot,
[ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder,
[ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb,
[ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether,
[ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther,
[ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir,
[ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir,
[ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie,
[ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute,
[ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute,
[ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute,
[ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice,
[ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh,
[ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp,
[ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein,
[ITEM_IRON - ITEM_POTION] = sItemEffect_Iron,
[ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos,
[ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium,
[ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy,
[ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp,
[ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc,
[ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax,
[ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec,
[ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit,
[ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack,
[ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend,
[ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed,
[ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy,
[ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial,
[ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone,
[ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone,
[ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone,
[ITEM_THUNDER_STONE - ITEM_POTION] = sItemEffect_ThunderStone,
[ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone,
[ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone,
[ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry,
[ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry,
[ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry,
[ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry,
[ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry,
[ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry,
[ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry,
[ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry,
[ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry,
[ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry,
[LAST_BERRY_INDEX - ITEM_POTION] = NULL,
[ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone,
[ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone,
[ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry,
[ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry,
[ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry,
[ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry,
[ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry,
[ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry,
[ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry,
[ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry,
[ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry,
[ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry,
[LAST_BERRY_INDEX - ITEM_POTION] = NULL,
};
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -24,8 +24,7 @@ static const u8 sSassyNatureName[] = _("SASSY");
static const u8 sCarefulNatureName[] = _("CAREFUL");
static const u8 sQuirkyNatureName[] = _("QUIRKY");
const u8 *const gNatureNamePointers[] =
{
const u8 *const gNatureNamePointers[NUM_NATURES] = {
[NATURE_HARDY] = sHardyNatureName,
[NATURE_LONELY] = sLonelyNatureName,
[NATURE_BRAVE] = sBraveNatureName,
+413 -413
View File
@@ -1,414 +1,414 @@
const u8 gSpeciesNames[][11] = {
_("??????????"),
_("BULBASAUR"),
_("IVYSAUR"),
_("VENUSAUR"),
_("CHARMANDER"),
_("CHARMELEON"),
_("CHARIZARD"),
_("SQUIRTLE"),
_("WARTORTLE"),
_("BLASTOISE"),
_("CATERPIE"),
_("METAPOD"),
_("BUTTERFREE"),
_("WEEDLE"),
_("KAKUNA"),
_("BEEDRILL"),
_("PIDGEY"),
_("PIDGEOTTO"),
_("PIDGEOT"),
_("RATTATA"),
_("RATICATE"),
_("SPEAROW"),
_("FEAROW"),
_("EKANS"),
_("ARBOK"),
_("PIKACHU"),
_("RAICHU"),
_("SANDSHREW"),
_("SANDSLASH"),
_("NIDORAN♀"),
_("NIDORINA"),
_("NIDOQUEEN"),
_("NIDORAN♂"),
_("NIDORINO"),
_("NIDOKING"),
_("CLEFAIRY"),
_("CLEFABLE"),
_("VULPIX"),
_("NINETALES"),
_("JIGGLYPUFF"),
_("WIGGLYTUFF"),
_("ZUBAT"),
_("GOLBAT"),
_("ODDISH"),
_("GLOOM"),
_("VILEPLUME"),
_("PARAS"),
_("PARASECT"),
_("VENONAT"),
_("VENOMOTH"),
_("DIGLETT"),
_("DUGTRIO"),
_("MEOWTH"),
_("PERSIAN"),
_("PSYDUCK"),
_("GOLDUCK"),
_("MANKEY"),
_("PRIMEAPE"),
_("GROWLITHE"),
_("ARCANINE"),
_("POLIWAG"),
_("POLIWHIRL"),
_("POLIWRATH"),
_("ABRA"),
_("KADABRA"),
_("ALAKAZAM"),
_("MACHOP"),
_("MACHOKE"),
_("MACHAMP"),
_("BELLSPROUT"),
_("WEEPINBELL"),
_("VICTREEBEL"),
_("TENTACOOL"),
_("TENTACRUEL"),
_("GEODUDE"),
_("GRAVELER"),
_("GOLEM"),
_("PONYTA"),
_("RAPIDASH"),
_("SLOWPOKE"),
_("SLOWBRO"),
_("MAGNEMITE"),
_("MAGNETON"),
_("FARFETCH'D"),
_("DODUO"),
_("DODRIO"),
_("SEEL"),
_("DEWGONG"),
_("GRIMER"),
_("MUK"),
_("SHELLDER"),
_("CLOYSTER"),
_("GASTLY"),
_("HAUNTER"),
_("GENGAR"),
_("ONIX"),
_("DROWZEE"),
_("HYPNO"),
_("KRABBY"),
_("KINGLER"),
_("VOLTORB"),
_("ELECTRODE"),
_("EXEGGCUTE"),
_("EXEGGUTOR"),
_("CUBONE"),
_("MAROWAK"),
_("HITMONLEE"),
_("HITMONCHAN"),
_("LICKITUNG"),
_("KOFFING"),
_("WEEZING"),
_("RHYHORN"),
_("RHYDON"),
_("CHANSEY"),
_("TANGELA"),
_("KANGASKHAN"),
_("HORSEA"),
_("SEADRA"),
_("GOLDEEN"),
_("SEAKING"),
_("STARYU"),
_("STARMIE"),
_("MR. MIME"),
_("SCYTHER"),
_("JYNX"),
_("ELECTABUZZ"),
_("MAGMAR"),
_("PINSIR"),
_("TAUROS"),
_("MAGIKARP"),
_("GYARADOS"),
_("LAPRAS"),
_("DITTO"),
_("EEVEE"),
_("VAPOREON"),
_("JOLTEON"),
_("FLAREON"),
_("PORYGON"),
_("OMANYTE"),
_("OMASTAR"),
_("KABUTO"),
_("KABUTOPS"),
_("AERODACTYL"),
_("SNORLAX"),
_("ARTICUNO"),
_("ZAPDOS"),
_("MOLTRES"),
_("DRATINI"),
_("DRAGONAIR"),
_("DRAGONITE"),
_("MEWTWO"),
_("MEW"),
_("CHIKORITA"),
_("BAYLEEF"),
_("MEGANIUM"),
_("CYNDAQUIL"),
_("QUILAVA"),
_("TYPHLOSION"),
_("TOTODILE"),
_("CROCONAW"),
_("FERALIGATR"),
_("SENTRET"),
_("FURRET"),
_("HOOTHOOT"),
_("NOCTOWL"),
_("LEDYBA"),
_("LEDIAN"),
_("SPINARAK"),
_("ARIADOS"),
_("CROBAT"),
_("CHINCHOU"),
_("LANTURN"),
_("PICHU"),
_("CLEFFA"),
_("IGGLYBUFF"),
_("TOGEPI"),
_("TOGETIC"),
_("NATU"),
_("XATU"),
_("MAREEP"),
_("FLAAFFY"),
_("AMPHAROS"),
_("BELLOSSOM"),
_("MARILL"),
_("AZUMARILL"),
_("SUDOWOODO"),
_("POLITOED"),
_("HOPPIP"),
_("SKIPLOOM"),
_("JUMPLUFF"),
_("AIPOM"),
_("SUNKERN"),
_("SUNFLORA"),
_("YANMA"),
_("WOOPER"),
_("QUAGSIRE"),
_("ESPEON"),
_("UMBREON"),
_("MURKROW"),
_("SLOWKING"),
_("MISDREAVUS"),
_("UNOWN"),
_("WOBBUFFET"),
_("GIRAFARIG"),
_("PINECO"),
_("FORRETRESS"),
_("DUNSPARCE"),
_("GLIGAR"),
_("STEELIX"),
_("SNUBBULL"),
_("GRANBULL"),
_("QWILFISH"),
_("SCIZOR"),
_("SHUCKLE"),
_("HERACROSS"),
_("SNEASEL"),
_("TEDDIURSA"),
_("URSARING"),
_("SLUGMA"),
_("MAGCARGO"),
_("SWINUB"),
_("PILOSWINE"),
_("CORSOLA"),
_("REMORAID"),
_("OCTILLERY"),
_("DELIBIRD"),
_("MANTINE"),
_("SKARMORY"),
_("HOUNDOUR"),
_("HOUNDOOM"),
_("KINGDRA"),
_("PHANPY"),
_("DONPHAN"),
_("PORYGON2"),
_("STANTLER"),
_("SMEARGLE"),
_("TYROGUE"),
_("HITMONTOP"),
_("SMOOCHUM"),
_("ELEKID"),
_("MAGBY"),
_("MILTANK"),
_("BLISSEY"),
_("RAIKOU"),
_("ENTEI"),
_("SUICUNE"),
_("LARVITAR"),
_("PUPITAR"),
_("TYRANITAR"),
_("LUGIA"),
_("HO-OH"),
_("CELEBI"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("?"),
_("TREECKO"),
_("GROVYLE"),
_("SCEPTILE"),
_("TORCHIC"),
_("COMBUSKEN"),
_("BLAZIKEN"),
_("MUDKIP"),
_("MARSHTOMP"),
_("SWAMPERT"),
_("POOCHYENA"),
_("MIGHTYENA"),
_("ZIGZAGOON"),
_("LINOONE"),
_("WURMPLE"),
_("SILCOON"),
_("BEAUTIFLY"),
_("CASCOON"),
_("DUSTOX"),
_("LOTAD"),
_("LOMBRE"),
_("LUDICOLO"),
_("SEEDOT"),
_("NUZLEAF"),
_("SHIFTRY"),
_("NINCADA"),
_("NINJASK"),
_("SHEDINJA"),
_("TAILLOW"),
_("SWELLOW"),
_("SHROOMISH"),
_("BRELOOM"),
_("SPINDA"),
_("WINGULL"),
_("PELIPPER"),
_("SURSKIT"),
_("MASQUERAIN"),
_("WAILMER"),
_("WAILORD"),
_("SKITTY"),
_("DELCATTY"),
_("KECLEON"),
_("BALTOY"),
_("CLAYDOL"),
_("NOSEPASS"),
_("TORKOAL"),
_("SABLEYE"),
_("BARBOACH"),
_("WHISCASH"),
_("LUVDISC"),
_("CORPHISH"),
_("CRAWDAUNT"),
_("FEEBAS"),
_("MILOTIC"),
_("CARVANHA"),
_("SHARPEDO"),
_("TRAPINCH"),
_("VIBRAVA"),
_("FLYGON"),
_("MAKUHITA"),
_("HARIYAMA"),
_("ELECTRIKE"),
_("MANECTRIC"),
_("NUMEL"),
_("CAMERUPT"),
_("SPHEAL"),
_("SEALEO"),
_("WALREIN"),
_("CACNEA"),
_("CACTURNE"),
_("SNORUNT"),
_("GLALIE"),
_("LUNATONE"),
_("SOLROCK"),
_("AZURILL"),
_("SPOINK"),
_("GRUMPIG"),
_("PLUSLE"),
_("MINUN"),
_("MAWILE"),
_("MEDITITE"),
_("MEDICHAM"),
_("SWABLU"),
_("ALTARIA"),
_("WYNAUT"),
_("DUSKULL"),
_("DUSCLOPS"),
_("ROSELIA"),
_("SLAKOTH"),
_("VIGOROTH"),
_("SLAKING"),
_("GULPIN"),
_("SWALOT"),
_("TROPIUS"),
_("WHISMUR"),
_("LOUDRED"),
_("EXPLOUD"),
_("CLAMPERL"),
_("HUNTAIL"),
_("GOREBYSS"),
_("ABSOL"),
_("SHUPPET"),
_("BANETTE"),
_("SEVIPER"),
_("ZANGOOSE"),
_("RELICANTH"),
_("ARON"),
_("LAIRON"),
_("AGGRON"),
_("CASTFORM"),
_("VOLBEAT"),
_("ILLUMISE"),
_("LILEEP"),
_("CRADILY"),
_("ANORITH"),
_("ARMALDO"),
_("RALTS"),
_("KIRLIA"),
_("GARDEVOIR"),
_("BAGON"),
_("SHELGON"),
_("SALAMENCE"),
_("BELDUM"),
_("METANG"),
_("METAGROSS"),
_("REGIROCK"),
_("REGICE"),
_("REGISTEEL"),
_("KYOGRE"),
_("GROUDON"),
_("RAYQUAZA"),
_("LATIAS"),
_("LATIOS"),
_("JIRACHI"),
_("DEOXYS"),
_("CHIMECHO")
const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = {
[SPECIES_NONE] = _("??????????"),
[SPECIES_BULBASAUR] = _("BULBASAUR"),
[SPECIES_IVYSAUR] = _("IVYSAUR"),
[SPECIES_VENUSAUR] = _("VENUSAUR"),
[SPECIES_CHARMANDER] = _("CHARMANDER"),
[SPECIES_CHARMELEON] = _("CHARMELEON"),
[SPECIES_CHARIZARD] = _("CHARIZARD"),
[SPECIES_SQUIRTLE] = _("SQUIRTLE"),
[SPECIES_WARTORTLE] = _("WARTORTLE"),
[SPECIES_BLASTOISE] = _("BLASTOISE"),
[SPECIES_CATERPIE] = _("CATERPIE"),
[SPECIES_METAPOD] = _("METAPOD"),
[SPECIES_BUTTERFREE] = _("BUTTERFREE"),
[SPECIES_WEEDLE] = _("WEEDLE"),
[SPECIES_KAKUNA] = _("KAKUNA"),
[SPECIES_BEEDRILL] = _("BEEDRILL"),
[SPECIES_PIDGEY] = _("PIDGEY"),
[SPECIES_PIDGEOTTO] = _("PIDGEOTTO"),
[SPECIES_PIDGEOT] = _("PIDGEOT"),
[SPECIES_RATTATA] = _("RATTATA"),
[SPECIES_RATICATE] = _("RATICATE"),
[SPECIES_SPEAROW] = _("SPEAROW"),
[SPECIES_FEAROW] = _("FEAROW"),
[SPECIES_EKANS] = _("EKANS"),
[SPECIES_ARBOK] = _("ARBOK"),
[SPECIES_PIKACHU] = _("PIKACHU"),
[SPECIES_RAICHU] = _("RAICHU"),
[SPECIES_SANDSHREW] = _("SANDSHREW"),
[SPECIES_SANDSLASH] = _("SANDSLASH"),
[SPECIES_NIDORAN_F] = _("NIDORAN♀"),
[SPECIES_NIDORINA] = _("NIDORINA"),
[SPECIES_NIDOQUEEN] = _("NIDOQUEEN"),
[SPECIES_NIDORAN_M] = _("NIDORAN♂"),
[SPECIES_NIDORINO] = _("NIDORINO"),
[SPECIES_NIDOKING] = _("NIDOKING"),
[SPECIES_CLEFAIRY] = _("CLEFAIRY"),
[SPECIES_CLEFABLE] = _("CLEFABLE"),
[SPECIES_VULPIX] = _("VULPIX"),
[SPECIES_NINETALES] = _("NINETALES"),
[SPECIES_JIGGLYPUFF] = _("JIGGLYPUFF"),
[SPECIES_WIGGLYTUFF] = _("WIGGLYTUFF"),
[SPECIES_ZUBAT] = _("ZUBAT"),
[SPECIES_GOLBAT] = _("GOLBAT"),
[SPECIES_ODDISH] = _("ODDISH"),
[SPECIES_GLOOM] = _("GLOOM"),
[SPECIES_VILEPLUME] = _("VILEPLUME"),
[SPECIES_PARAS] = _("PARAS"),
[SPECIES_PARASECT] = _("PARASECT"),
[SPECIES_VENONAT] = _("VENONAT"),
[SPECIES_VENOMOTH] = _("VENOMOTH"),
[SPECIES_DIGLETT] = _("DIGLETT"),
[SPECIES_DUGTRIO] = _("DUGTRIO"),
[SPECIES_MEOWTH] = _("MEOWTH"),
[SPECIES_PERSIAN] = _("PERSIAN"),
[SPECIES_PSYDUCK] = _("PSYDUCK"),
[SPECIES_GOLDUCK] = _("GOLDUCK"),
[SPECIES_MANKEY] = _("MANKEY"),
[SPECIES_PRIMEAPE] = _("PRIMEAPE"),
[SPECIES_GROWLITHE] = _("GROWLITHE"),
[SPECIES_ARCANINE] = _("ARCANINE"),
[SPECIES_POLIWAG] = _("POLIWAG"),
[SPECIES_POLIWHIRL] = _("POLIWHIRL"),
[SPECIES_POLIWRATH] = _("POLIWRATH"),
[SPECIES_ABRA] = _("ABRA"),
[SPECIES_KADABRA] = _("KADABRA"),
[SPECIES_ALAKAZAM] = _("ALAKAZAM"),
[SPECIES_MACHOP] = _("MACHOP"),
[SPECIES_MACHOKE] = _("MACHOKE"),
[SPECIES_MACHAMP] = _("MACHAMP"),
[SPECIES_BELLSPROUT] = _("BELLSPROUT"),
[SPECIES_WEEPINBELL] = _("WEEPINBELL"),
[SPECIES_VICTREEBEL] = _("VICTREEBEL"),
[SPECIES_TENTACOOL] = _("TENTACOOL"),
[SPECIES_TENTACRUEL] = _("TENTACRUEL"),
[SPECIES_GEODUDE] = _("GEODUDE"),
[SPECIES_GRAVELER] = _("GRAVELER"),
[SPECIES_GOLEM] = _("GOLEM"),
[SPECIES_PONYTA] = _("PONYTA"),
[SPECIES_RAPIDASH] = _("RAPIDASH"),
[SPECIES_SLOWPOKE] = _("SLOWPOKE"),
[SPECIES_SLOWBRO] = _("SLOWBRO"),
[SPECIES_MAGNEMITE] = _("MAGNEMITE"),
[SPECIES_MAGNETON] = _("MAGNETON"),
[SPECIES_FARFETCHD] = _("FARFETCH'D"),
[SPECIES_DODUO] = _("DODUO"),
[SPECIES_DODRIO] = _("DODRIO"),
[SPECIES_SEEL] = _("SEEL"),
[SPECIES_DEWGONG] = _("DEWGONG"),
[SPECIES_GRIMER] = _("GRIMER"),
[SPECIES_MUK] = _("MUK"),
[SPECIES_SHELLDER] = _("SHELLDER"),
[SPECIES_CLOYSTER] = _("CLOYSTER"),
[SPECIES_GASTLY] = _("GASTLY"),
[SPECIES_HAUNTER] = _("HAUNTER"),
[SPECIES_GENGAR] = _("GENGAR"),
[SPECIES_ONIX] = _("ONIX"),
[SPECIES_DROWZEE] = _("DROWZEE"),
[SPECIES_HYPNO] = _("HYPNO"),
[SPECIES_KRABBY] = _("KRABBY"),
[SPECIES_KINGLER] = _("KINGLER"),
[SPECIES_VOLTORB] = _("VOLTORB"),
[SPECIES_ELECTRODE] = _("ELECTRODE"),
[SPECIES_EXEGGCUTE] = _("EXEGGCUTE"),
[SPECIES_EXEGGUTOR] = _("EXEGGUTOR"),
[SPECIES_CUBONE] = _("CUBONE"),
[SPECIES_MAROWAK] = _("MAROWAK"),
[SPECIES_HITMONLEE] = _("HITMONLEE"),
[SPECIES_HITMONCHAN] = _("HITMONCHAN"),
[SPECIES_LICKITUNG] = _("LICKITUNG"),
[SPECIES_KOFFING] = _("KOFFING"),
[SPECIES_WEEZING] = _("WEEZING"),
[SPECIES_RHYHORN] = _("RHYHORN"),
[SPECIES_RHYDON] = _("RHYDON"),
[SPECIES_CHANSEY] = _("CHANSEY"),
[SPECIES_TANGELA] = _("TANGELA"),
[SPECIES_KANGASKHAN] = _("KANGASKHAN"),
[SPECIES_HORSEA] = _("HORSEA"),
[SPECIES_SEADRA] = _("SEADRA"),
[SPECIES_GOLDEEN] = _("GOLDEEN"),
[SPECIES_SEAKING] = _("SEAKING"),
[SPECIES_STARYU] = _("STARYU"),
[SPECIES_STARMIE] = _("STARMIE"),
[SPECIES_MR_MIME] = _("MR. MIME"),
[SPECIES_SCYTHER] = _("SCYTHER"),
[SPECIES_JYNX] = _("JYNX"),
[SPECIES_ELECTABUZZ] = _("ELECTABUZZ"),
[SPECIES_MAGMAR] = _("MAGMAR"),
[SPECIES_PINSIR] = _("PINSIR"),
[SPECIES_TAUROS] = _("TAUROS"),
[SPECIES_MAGIKARP] = _("MAGIKARP"),
[SPECIES_GYARADOS] = _("GYARADOS"),
[SPECIES_LAPRAS] = _("LAPRAS"),
[SPECIES_DITTO] = _("DITTO"),
[SPECIES_EEVEE] = _("EEVEE"),
[SPECIES_VAPOREON] = _("VAPOREON"),
[SPECIES_JOLTEON] = _("JOLTEON"),
[SPECIES_FLAREON] = _("FLAREON"),
[SPECIES_PORYGON] = _("PORYGON"),
[SPECIES_OMANYTE] = _("OMANYTE"),
[SPECIES_OMASTAR] = _("OMASTAR"),
[SPECIES_KABUTO] = _("KABUTO"),
[SPECIES_KABUTOPS] = _("KABUTOPS"),
[SPECIES_AERODACTYL] = _("AERODACTYL"),
[SPECIES_SNORLAX] = _("SNORLAX"),
[SPECIES_ARTICUNO] = _("ARTICUNO"),
[SPECIES_ZAPDOS] = _("ZAPDOS"),
[SPECIES_MOLTRES] = _("MOLTRES"),
[SPECIES_DRATINI] = _("DRATINI"),
[SPECIES_DRAGONAIR] = _("DRAGONAIR"),
[SPECIES_DRAGONITE] = _("DRAGONITE"),
[SPECIES_MEWTWO] = _("MEWTWO"),
[SPECIES_MEW] = _("MEW"),
[SPECIES_CHIKORITA] = _("CHIKORITA"),
[SPECIES_BAYLEEF] = _("BAYLEEF"),
[SPECIES_MEGANIUM] = _("MEGANIUM"),
[SPECIES_CYNDAQUIL] = _("CYNDAQUIL"),
[SPECIES_QUILAVA] = _("QUILAVA"),
[SPECIES_TYPHLOSION] = _("TYPHLOSION"),
[SPECIES_TOTODILE] = _("TOTODILE"),
[SPECIES_CROCONAW] = _("CROCONAW"),
[SPECIES_FERALIGATR] = _("FERALIGATR"),
[SPECIES_SENTRET] = _("SENTRET"),
[SPECIES_FURRET] = _("FURRET"),
[SPECIES_HOOTHOOT] = _("HOOTHOOT"),
[SPECIES_NOCTOWL] = _("NOCTOWL"),
[SPECIES_LEDYBA] = _("LEDYBA"),
[SPECIES_LEDIAN] = _("LEDIAN"),
[SPECIES_SPINARAK] = _("SPINARAK"),
[SPECIES_ARIADOS] = _("ARIADOS"),
[SPECIES_CROBAT] = _("CROBAT"),
[SPECIES_CHINCHOU] = _("CHINCHOU"),
[SPECIES_LANTURN] = _("LANTURN"),
[SPECIES_PICHU] = _("PICHU"),
[SPECIES_CLEFFA] = _("CLEFFA"),
[SPECIES_IGGLYBUFF] = _("IGGLYBUFF"),
[SPECIES_TOGEPI] = _("TOGEPI"),
[SPECIES_TOGETIC] = _("TOGETIC"),
[SPECIES_NATU] = _("NATU"),
[SPECIES_XATU] = _("XATU"),
[SPECIES_MAREEP] = _("MAREEP"),
[SPECIES_FLAAFFY] = _("FLAAFFY"),
[SPECIES_AMPHAROS] = _("AMPHAROS"),
[SPECIES_BELLOSSOM] = _("BELLOSSOM"),
[SPECIES_MARILL] = _("MARILL"),
[SPECIES_AZUMARILL] = _("AZUMARILL"),
[SPECIES_SUDOWOODO] = _("SUDOWOODO"),
[SPECIES_POLITOED] = _("POLITOED"),
[SPECIES_HOPPIP] = _("HOPPIP"),
[SPECIES_SKIPLOOM] = _("SKIPLOOM"),
[SPECIES_JUMPLUFF] = _("JUMPLUFF"),
[SPECIES_AIPOM] = _("AIPOM"),
[SPECIES_SUNKERN] = _("SUNKERN"),
[SPECIES_SUNFLORA] = _("SUNFLORA"),
[SPECIES_YANMA] = _("YANMA"),
[SPECIES_WOOPER] = _("WOOPER"),
[SPECIES_QUAGSIRE] = _("QUAGSIRE"),
[SPECIES_ESPEON] = _("ESPEON"),
[SPECIES_UMBREON] = _("UMBREON"),
[SPECIES_MURKROW] = _("MURKROW"),
[SPECIES_SLOWKING] = _("SLOWKING"),
[SPECIES_MISDREAVUS] = _("MISDREAVUS"),
[SPECIES_UNOWN] = _("UNOWN"),
[SPECIES_WOBBUFFET] = _("WOBBUFFET"),
[SPECIES_GIRAFARIG] = _("GIRAFARIG"),
[SPECIES_PINECO] = _("PINECO"),
[SPECIES_FORRETRESS] = _("FORRETRESS"),
[SPECIES_DUNSPARCE] = _("DUNSPARCE"),
[SPECIES_GLIGAR] = _("GLIGAR"),
[SPECIES_STEELIX] = _("STEELIX"),
[SPECIES_SNUBBULL] = _("SNUBBULL"),
[SPECIES_GRANBULL] = _("GRANBULL"),
[SPECIES_QWILFISH] = _("QWILFISH"),
[SPECIES_SCIZOR] = _("SCIZOR"),
[SPECIES_SHUCKLE] = _("SHUCKLE"),
[SPECIES_HERACROSS] = _("HERACROSS"),
[SPECIES_SNEASEL] = _("SNEASEL"),
[SPECIES_TEDDIURSA] = _("TEDDIURSA"),
[SPECIES_URSARING] = _("URSARING"),
[SPECIES_SLUGMA] = _("SLUGMA"),
[SPECIES_MAGCARGO] = _("MAGCARGO"),
[SPECIES_SWINUB] = _("SWINUB"),
[SPECIES_PILOSWINE] = _("PILOSWINE"),
[SPECIES_CORSOLA] = _("CORSOLA"),
[SPECIES_REMORAID] = _("REMORAID"),
[SPECIES_OCTILLERY] = _("OCTILLERY"),
[SPECIES_DELIBIRD] = _("DELIBIRD"),
[SPECIES_MANTINE] = _("MANTINE"),
[SPECIES_SKARMORY] = _("SKARMORY"),
[SPECIES_HOUNDOUR] = _("HOUNDOUR"),
[SPECIES_HOUNDOOM] = _("HOUNDOOM"),
[SPECIES_KINGDRA] = _("KINGDRA"),
[SPECIES_PHANPY] = _("PHANPY"),
[SPECIES_DONPHAN] = _("DONPHAN"),
[SPECIES_PORYGON2] = _("PORYGON2"),
[SPECIES_STANTLER] = _("STANTLER"),
[SPECIES_SMEARGLE] = _("SMEARGLE"),
[SPECIES_TYROGUE] = _("TYROGUE"),
[SPECIES_HITMONTOP] = _("HITMONTOP"),
[SPECIES_SMOOCHUM] = _("SMOOCHUM"),
[SPECIES_ELEKID] = _("ELEKID"),
[SPECIES_MAGBY] = _("MAGBY"),
[SPECIES_MILTANK] = _("MILTANK"),
[SPECIES_BLISSEY] = _("BLISSEY"),
[SPECIES_RAIKOU] = _("RAIKOU"),
[SPECIES_ENTEI] = _("ENTEI"),
[SPECIES_SUICUNE] = _("SUICUNE"),
[SPECIES_LARVITAR] = _("LARVITAR"),
[SPECIES_PUPITAR] = _("PUPITAR"),
[SPECIES_TYRANITAR] = _("TYRANITAR"),
[SPECIES_LUGIA] = _("LUGIA"),
[SPECIES_HO_OH] = _("HO-OH"),
[SPECIES_CELEBI] = _("CELEBI"),
[SPECIES_OLD_UNOWN_B] = _("?"),
[SPECIES_OLD_UNOWN_C] = _("?"),
[SPECIES_OLD_UNOWN_D] = _("?"),
[SPECIES_OLD_UNOWN_E] = _("?"),
[SPECIES_OLD_UNOWN_F] = _("?"),
[SPECIES_OLD_UNOWN_G] = _("?"),
[SPECIES_OLD_UNOWN_H] = _("?"),
[SPECIES_OLD_UNOWN_I] = _("?"),
[SPECIES_OLD_UNOWN_J] = _("?"),
[SPECIES_OLD_UNOWN_K] = _("?"),
[SPECIES_OLD_UNOWN_L] = _("?"),
[SPECIES_OLD_UNOWN_M] = _("?"),
[SPECIES_OLD_UNOWN_N] = _("?"),
[SPECIES_OLD_UNOWN_O] = _("?"),
[SPECIES_OLD_UNOWN_P] = _("?"),
[SPECIES_OLD_UNOWN_Q] = _("?"),
[SPECIES_OLD_UNOWN_R] = _("?"),
[SPECIES_OLD_UNOWN_S] = _("?"),
[SPECIES_OLD_UNOWN_T] = _("?"),
[SPECIES_OLD_UNOWN_U] = _("?"),
[SPECIES_OLD_UNOWN_V] = _("?"),
[SPECIES_OLD_UNOWN_W] = _("?"),
[SPECIES_OLD_UNOWN_X] = _("?"),
[SPECIES_OLD_UNOWN_Y] = _("?"),
[SPECIES_OLD_UNOWN_Z] = _("?"),
[SPECIES_TREECKO] = _("TREECKO"),
[SPECIES_GROVYLE] = _("GROVYLE"),
[SPECIES_SCEPTILE] = _("SCEPTILE"),
[SPECIES_TORCHIC] = _("TORCHIC"),
[SPECIES_COMBUSKEN] = _("COMBUSKEN"),
[SPECIES_BLAZIKEN] = _("BLAZIKEN"),
[SPECIES_MUDKIP] = _("MUDKIP"),
[SPECIES_MARSHTOMP] = _("MARSHTOMP"),
[SPECIES_SWAMPERT] = _("SWAMPERT"),
[SPECIES_POOCHYENA] = _("POOCHYENA"),
[SPECIES_MIGHTYENA] = _("MIGHTYENA"),
[SPECIES_ZIGZAGOON] = _("ZIGZAGOON"),
[SPECIES_LINOONE] = _("LINOONE"),
[SPECIES_WURMPLE] = _("WURMPLE"),
[SPECIES_SILCOON] = _("SILCOON"),
[SPECIES_BEAUTIFLY] = _("BEAUTIFLY"),
[SPECIES_CASCOON] = _("CASCOON"),
[SPECIES_DUSTOX] = _("DUSTOX"),
[SPECIES_LOTAD] = _("LOTAD"),
[SPECIES_LOMBRE] = _("LOMBRE"),
[SPECIES_LUDICOLO] = _("LUDICOLO"),
[SPECIES_SEEDOT] = _("SEEDOT"),
[SPECIES_NUZLEAF] = _("NUZLEAF"),
[SPECIES_SHIFTRY] = _("SHIFTRY"),
[SPECIES_NINCADA] = _("NINCADA"),
[SPECIES_NINJASK] = _("NINJASK"),
[SPECIES_SHEDINJA] = _("SHEDINJA"),
[SPECIES_TAILLOW] = _("TAILLOW"),
[SPECIES_SWELLOW] = _("SWELLOW"),
[SPECIES_SHROOMISH] = _("SHROOMISH"),
[SPECIES_BRELOOM] = _("BRELOOM"),
[SPECIES_SPINDA] = _("SPINDA"),
[SPECIES_WINGULL] = _("WINGULL"),
[SPECIES_PELIPPER] = _("PELIPPER"),
[SPECIES_SURSKIT] = _("SURSKIT"),
[SPECIES_MASQUERAIN] = _("MASQUERAIN"),
[SPECIES_WAILMER] = _("WAILMER"),
[SPECIES_WAILORD] = _("WAILORD"),
[SPECIES_SKITTY] = _("SKITTY"),
[SPECIES_DELCATTY] = _("DELCATTY"),
[SPECIES_KECLEON] = _("KECLEON"),
[SPECIES_BALTOY] = _("BALTOY"),
[SPECIES_CLAYDOL] = _("CLAYDOL"),
[SPECIES_NOSEPASS] = _("NOSEPASS"),
[SPECIES_TORKOAL] = _("TORKOAL"),
[SPECIES_SABLEYE] = _("SABLEYE"),
[SPECIES_BARBOACH] = _("BARBOACH"),
[SPECIES_WHISCASH] = _("WHISCASH"),
[SPECIES_LUVDISC] = _("LUVDISC"),
[SPECIES_CORPHISH] = _("CORPHISH"),
[SPECIES_CRAWDAUNT] = _("CRAWDAUNT"),
[SPECIES_FEEBAS] = _("FEEBAS"),
[SPECIES_MILOTIC] = _("MILOTIC"),
[SPECIES_CARVANHA] = _("CARVANHA"),
[SPECIES_SHARPEDO] = _("SHARPEDO"),
[SPECIES_TRAPINCH] = _("TRAPINCH"),
[SPECIES_VIBRAVA] = _("VIBRAVA"),
[SPECIES_FLYGON] = _("FLYGON"),
[SPECIES_MAKUHITA] = _("MAKUHITA"),
[SPECIES_HARIYAMA] = _("HARIYAMA"),
[SPECIES_ELECTRIKE] = _("ELECTRIKE"),
[SPECIES_MANECTRIC] = _("MANECTRIC"),
[SPECIES_NUMEL] = _("NUMEL"),
[SPECIES_CAMERUPT] = _("CAMERUPT"),
[SPECIES_SPHEAL] = _("SPHEAL"),
[SPECIES_SEALEO] = _("SEALEO"),
[SPECIES_WALREIN] = _("WALREIN"),
[SPECIES_CACNEA] = _("CACNEA"),
[SPECIES_CACTURNE] = _("CACTURNE"),
[SPECIES_SNORUNT] = _("SNORUNT"),
[SPECIES_GLALIE] = _("GLALIE"),
[SPECIES_LUNATONE] = _("LUNATONE"),
[SPECIES_SOLROCK] = _("SOLROCK"),
[SPECIES_AZURILL] = _("AZURILL"),
[SPECIES_SPOINK] = _("SPOINK"),
[SPECIES_GRUMPIG] = _("GRUMPIG"),
[SPECIES_PLUSLE] = _("PLUSLE"),
[SPECIES_MINUN] = _("MINUN"),
[SPECIES_MAWILE] = _("MAWILE"),
[SPECIES_MEDITITE] = _("MEDITITE"),
[SPECIES_MEDICHAM] = _("MEDICHAM"),
[SPECIES_SWABLU] = _("SWABLU"),
[SPECIES_ALTARIA] = _("ALTARIA"),
[SPECIES_WYNAUT] = _("WYNAUT"),
[SPECIES_DUSKULL] = _("DUSKULL"),
[SPECIES_DUSCLOPS] = _("DUSCLOPS"),
[SPECIES_ROSELIA] = _("ROSELIA"),
[SPECIES_SLAKOTH] = _("SLAKOTH"),
[SPECIES_VIGOROTH] = _("VIGOROTH"),
[SPECIES_SLAKING] = _("SLAKING"),
[SPECIES_GULPIN] = _("GULPIN"),
[SPECIES_SWALOT] = _("SWALOT"),
[SPECIES_TROPIUS] = _("TROPIUS"),
[SPECIES_WHISMUR] = _("WHISMUR"),
[SPECIES_LOUDRED] = _("LOUDRED"),
[SPECIES_EXPLOUD] = _("EXPLOUD"),
[SPECIES_CLAMPERL] = _("CLAMPERL"),
[SPECIES_HUNTAIL] = _("HUNTAIL"),
[SPECIES_GOREBYSS] = _("GOREBYSS"),
[SPECIES_ABSOL] = _("ABSOL"),
[SPECIES_SHUPPET] = _("SHUPPET"),
[SPECIES_BANETTE] = _("BANETTE"),
[SPECIES_SEVIPER] = _("SEVIPER"),
[SPECIES_ZANGOOSE] = _("ZANGOOSE"),
[SPECIES_RELICANTH] = _("RELICANTH"),
[SPECIES_ARON] = _("ARON"),
[SPECIES_LAIRON] = _("LAIRON"),
[SPECIES_AGGRON] = _("AGGRON"),
[SPECIES_CASTFORM] = _("CASTFORM"),
[SPECIES_VOLBEAT] = _("VOLBEAT"),
[SPECIES_ILLUMISE] = _("ILLUMISE"),
[SPECIES_LILEEP] = _("LILEEP"),
[SPECIES_CRADILY] = _("CRADILY"),
[SPECIES_ANORITH] = _("ANORITH"),
[SPECIES_ARMALDO] = _("ARMALDO"),
[SPECIES_RALTS] = _("RALTS"),
[SPECIES_KIRLIA] = _("KIRLIA"),
[SPECIES_GARDEVOIR] = _("GARDEVOIR"),
[SPECIES_BAGON] = _("BAGON"),
[SPECIES_SHELGON] = _("SHELGON"),
[SPECIES_SALAMENCE] = _("SALAMENCE"),
[SPECIES_BELDUM] = _("BELDUM"),
[SPECIES_METANG] = _("METANG"),
[SPECIES_METAGROSS] = _("METAGROSS"),
[SPECIES_REGIROCK] = _("REGIROCK"),
[SPECIES_REGICE] = _("REGICE"),
[SPECIES_REGISTEEL] = _("REGISTEEL"),
[SPECIES_KYOGRE] = _("KYOGRE"),
[SPECIES_GROUDON] = _("GROUDON"),
[SPECIES_RAYQUAZA] = _("RAYQUAZA"),
[SPECIES_LATIAS] = _("LATIAS"),
[SPECIES_LATIOS] = _("LATIOS"),
[SPECIES_JIRACHI] = _("JIRACHI"),
[SPECIES_DEOXYS] = _("DEOXYS"),
[SPECIES_CHIMECHO] = _("CHIMECHO"),
};
+13 -21
View File
@@ -1092,13 +1092,13 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
u8 metLocation;
u8 isEgg;
CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0);
CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
SetMonData(mon, MON_DATA_POKEBALL, &ball);
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles);
SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles);
SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel);
SetMonData(mon, MON_DATA_LANGUAGE, &language);
if (setHotSpringsLocation)
@@ -1119,13 +1119,13 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
u8 language;
personality = daycare->offspringPersonality | (Random() << 16);
CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0);
metLevel = 0;
ball = ITEM_POKE_BALL;
language = LANGUAGE_JAPANESE;
SetMonData(mon, MON_DATA_POKEBALL, &ball);
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles);
SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles);
SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel);
SetMonData(mon, MON_DATA_LANGUAGE, &language);
}
@@ -1284,8 +1284,8 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID);
personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY);
genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality);
eggGroups[i][0] = gBaseStats[species[i]].eggGroup1;
eggGroups[i][1] = gBaseStats[species[i]].eggGroup2;
eggGroups[i][0] = gSpeciesInfo[species[i]].eggGroups[0];
eggGroups[i][1] = gSpeciesInfo[species[i]].eggGroups[1];
}
// check unbreedable egg group
@@ -1594,42 +1594,34 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
{
u16 species;
u32 personality, pokerus;
u8 i, friendship, language, gameMet, markings, isEventLegal;
u16 moves[4];
u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter;
u16 moves[MAX_MON_MOVES];
u32 ivs[NUM_STATS];
species = GetMonData(egg, MON_DATA_SPECIES);
for (i = 0; i < 4; i++)
{
for (i = 0; i < MAX_MON_MOVES; i++)
moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i);
}
personality = GetMonData(egg, MON_DATA_PERSONALITY);
for (i = 0; i < NUM_STATS; i++)
{
ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i);
}
// language = GetMonData(egg, MON_DATA_LANGUAGE);
gameMet = GetMonData(egg, MON_DATA_MET_GAME);
markings = GetMonData(egg, MON_DATA_MARKINGS);
pokerus = GetMonData(egg, MON_DATA_POKERUS);
isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL);
isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER);
CreateMon(temp, species, EGG_HATCH_LEVEL, 32, TRUE, personality, 0, 0);
CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0);
for (i = 0; i < 4; i++)
{
for (i = 0; i < MAX_MON_MOVES; i++)
SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]);
}
for (i = 0; i < NUM_STATS; i++)
{
SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]);
}
language = GAME_LANGUAGE;
SetMonData(temp, MON_DATA_LANGUAGE, &language);
@@ -1639,7 +1631,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
friendship = 120;
SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship);
SetMonData(temp, MON_DATA_POKERUS, &pokerus);
SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal);
SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
*egg = *temp;
}
+1 -1
View File
@@ -2914,7 +2914,7 @@ void IsDodrioInParty(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO)
{
gSpecialVar_Result = TRUE;
return;
+20 -20
View File
@@ -67,9 +67,9 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *);
static void RemoveObjectEventInternal(struct ObjectEvent *);
static u16 GetObjectEventFlagIdByObjectEventId(u8);
static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *);
static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
static void GetObjectEventMovingCameraOffset(s16 *, s16 *);
static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8);
static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8);
static void LoadObjectEventPalette(u16);
static void RemoveObjectEventIfOutsideView(struct ObjectEvent *);
static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y);
@@ -84,13 +84,13 @@ static void ObjectCB_CameraObject(struct Sprite *);
static void CameraObject_0(struct Sprite *);
static void CameraObject_1(struct Sprite *);
static void CameraObject_2(struct Sprite *);
static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count);
static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count);
static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *);
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *, u8, s16, s16);
static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *, s16, s16);
static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *, s16, s16);
static void SetHideObstacleFlag(struct ObjectEventTemplate *);
static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *, u8, s16, s16);
static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *, s16, s16);
static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *, s16, s16);
static void SetHideObstacleFlag(const struct ObjectEventTemplate *);
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *);
static u8 MovementType_RaiseHandAndStop_Callback(struct ObjectEvent *, struct Sprite *);
@@ -1309,7 +1309,7 @@ static u8 GetObjectEventIdByLocalId(u8 localId)
return OBJECT_EVENTS_COUNT;
}
static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup)
static u8 InitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup)
{
struct ObjectEvent *objectEvent;
const struct MapHeader *mapHeader;
@@ -1388,7 +1388,7 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template,
return objectEventId;
}
static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y)
static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y)
{
if (isClone && !TemplateIsObstacleAndWithinView(template, x, y))
return FALSE;
@@ -1399,7 +1399,7 @@ static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *
return TRUE;
}
static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *template, s16 x, s16 y)
static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *template, s16 x, s16 y)
{
if (template->graphicsId == OBJ_EVENT_GFX_CUT_TREE || template->graphicsId == OBJ_EVENT_GFX_ROCK_SMASH_ROCK)
{
@@ -1422,7 +1422,7 @@ static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *templat
return TRUE;
}
static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *template, s16 unused1, s16 unused2)
static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *template, s16 unused1, s16 unused2)
{
if (IsMapTypeOutdoors(GetCurrentMapType()))
{
@@ -1459,7 +1459,7 @@ static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTem
return TRUE;
}
static void SetHideObstacleFlag(struct ObjectEventTemplate *template)
static void SetHideObstacleFlag(const struct ObjectEventTemplate *template)
{
if (template->flagId >= FLAG_TEMP_11 && template->flagId <= FLAG_TEMP_1F)
FlagSet(template->flagId);
@@ -1549,7 +1549,7 @@ void Unref_RemoveAllObjectEventsExceptPlayer(void)
}
}
static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
{
u8 spriteId;
u8 objectEventId;
@@ -1599,7 +1599,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl
return objectEventId;
}
static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
static u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY)
{
u8 objectEventId;
struct SpriteTemplate spriteTemplate;
@@ -1653,7 +1653,7 @@ int SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup)
{
struct ObjectEventTemplate *objectEventTemplate;
const struct ObjectEventTemplate *objectEventTemplate;
s16 cameraX, cameraY;
objectEventTemplate = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
@@ -1691,7 +1691,7 @@ static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphics
CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables);
}
static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables)
static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables)
{
CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->objUnion.normal.movementType, spriteTemplate, subspriteTables);
}
@@ -2516,7 +2516,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId)
static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
{
struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
const struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
#ifdef UBFIX
// BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers.
if (obj == NULL)
@@ -2571,9 +2571,9 @@ u8 GetObjectEventBerryTreeId(u8 objectEventId)
return gObjectEvents[objectEventId].trainerRange_berryTreeId;
}
static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
{
struct ObjectEventTemplate *templates;
const struct ObjectEventTemplate *templates;
const struct MapHeader *mapHeader;
u8 count;
@@ -2591,7 +2591,7 @@ static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 loca
return FindObjectEventTemplateByLocalId(localId, templates, count);
}
static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count)
static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count)
{
u8 i;
+2 -2
View File
@@ -29,8 +29,8 @@ static void EvoTask_ShrinkOrExpandEvoSprites(u8 taskId);
static void PreEvoInvisible_PostEvoVisible_KillTask(u8 taskId);
static void PreEvoVisible_PostEvoInvisible_KillTask(u8 taskId);
static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/misc/evolution_sprite_841EEA4.gbapal");
static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/misc/evolution_sprite_841EEA4.4bpp.lz");
static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/evolution_scene/sparkle.gbapal");
static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/evolution_scene/sparkle.4bpp.lz");
static const struct CompressedSpriteSheet sSpriteSheet_EvolutionSparkles[] = {
{ sEvolutionSparklesTileData, 0x20, 1001 },
+8 -8
View File
@@ -495,11 +495,11 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position
case 5:
case 6:
case BG_EVENT_HIDDEN_ITEM:
if (GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_UNDERFOOT) == TRUE)
if (GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_UNDERFOOT) == TRUE)
return NULL;
gSpecialVar_0x8005 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_ID);
gSpecialVar_0x8004 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_FLAG);
gSpecialVar_0x8006 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_QUANTITY);
gSpecialVar_0x8005 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_ITEM);
gSpecialVar_0x8004 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_FLAG);
gSpecialVar_0x8006 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_QUANTITY);
if (FlagGet(gSpecialVar_0x8004) == TRUE)
return NULL;
gSpecialVar_Facing = direction;
@@ -1008,7 +1008,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8
static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
{
s32 i;
struct WarpEvent *warpEvent = mapHeader->events->warps;
const struct WarpEvent *warpEvent = mapHeader->events->warps;
u8 warpCount = mapHeader->events->warpCount;
for (i = 0; i < warpCount; i++, warpEvent++)
@@ -1022,7 +1022,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e
return -1;
}
static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent)
static const u8 *TryRunCoordEventScript(const struct CoordEvent *coordEvent)
{
if (coordEvent != NULL)
{
@@ -1045,7 +1045,7 @@ static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent)
static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
{
s32 i;
struct CoordEvent *coordEvents = mapHeader->events->coordEvents;
const struct CoordEvent *coordEvents = mapHeader->events->coordEvents;
u8 coordEventCount = mapHeader->events->coordEventCount;
for (i = 0; i < coordEventCount; i++)
@@ -1101,7 +1101,7 @@ const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position)
static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
{
u8 i;
struct BgEvent *bgEvents = mapHeader->events->bgEvents;
const struct BgEvent *bgEvents = mapHeader->events->bgEvents;
u8 bgEventCount = mapHeader->events->bgEventCount;
for (i = 0; i < bgEventCount; i++)
+157 -124
View File
@@ -6,13 +6,20 @@
#include "constants/songs.h"
#include "constants/metatile_labels.h"
#define DOOR_SOUND_NORMAL 0
#define DOOR_SOUND_SLIDING 1
enum {
DOOR_SOUND_NORMAL,
DOOR_SOUND_SLIDING,
};
enum {
DOOR_SIZE_1x1,
DOOR_SIZE_1x2,
};
struct DoorAnimFrame
{
u8 duration;
u16 tile;
u16 tileOffset;
};
struct DoorGraphics
@@ -20,17 +27,17 @@ struct DoorGraphics
u16 metatileId;
u8 sound;
u8 size;
const u8 * tiles;
const u8 * palettes;
const u8 *tiles;
const u8 *paletteNums;
};
static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y);
static void LoadDoorFrameTiles(const u8 *a0);
static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3);
static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2);
static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data);
static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames);
static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y);
static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y);
static void CopyDoorTilesToVram(const u8 *tiles);
static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums);
static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums);
static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data);
static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames);
static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y);
static const u8 sDoorAnimTiles_General[] = INCBIN_U8("graphics/door_anims/general.4bpp");
static const u16 sDoorNullPalette1[16] = {};
@@ -173,35 +180,37 @@ static const u16 sDoorNullPalette63[16] = {};
static const u8 sDoorAnimTiles_TrainerTowerRoofElevator[] = INCBIN_U8("graphics/door_anims/trainer_tower_roof_elevator.4bpp");
static const u16 sDoorNullPalette64[16] = {};
#define CLOSED_DOOR_TILES_OFFSET 0xFFFF
static const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = {
{4, 0xFFFF},
{4, 0x0000},
{4, 0x0080},
{4, 0x0100},
{4, CLOSED_DOOR_TILES_OFFSET},
{4, 0 * TILE_SIZE_4BPP},
{4, 4 * TILE_SIZE_4BPP},
{4, 8 * TILE_SIZE_4BPP},
{}
};
static const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = {
{4, 0xFFFF},
{4, 0x0000},
{4, 0x0100},
{4, 0x0200},
{4, CLOSED_DOOR_TILES_OFFSET},
{4, 0 * TILE_SIZE_4BPP},
{4, 8 * TILE_SIZE_4BPP},
{4, 16 * TILE_SIZE_4BPP},
{}
};
static const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = {
{4, 0x0100},
{4, 0x0080},
{4, 0x0000},
{4, 0xFFFF},
{4, 8 * TILE_SIZE_4BPP},
{4, 4 * TILE_SIZE_4BPP},
{4, 0 * TILE_SIZE_4BPP},
{4, CLOSED_DOOR_TILES_OFFSET},
{}
};
static const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = {
{4, 0x0200},
{4, 0x0100},
{4, 0x0000},
{4, 0xFFFF},
{4, 16 * TILE_SIZE_4BPP},
{4, 8 * TILE_SIZE_4BPP},
{4, 0 * TILE_SIZE_4BPP},
{4, CLOSED_DOOR_TILES_OFFSET},
{}
};
@@ -239,64 +248,60 @@ static const u8 sDoorAnimPalettes_TrainerTowerLobbyElevator[] = {8, 8, 2, 2, 2,
static const u8 sDoorAnimPalettes_TrainerTowerRoofElevator[] = {11, 11, 2, 2, 2, 2, 2, 2};
static const struct DoorGraphics sDoorGraphics[] = {
{METATILE_General_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_General, sDoorAnimPalettes_General},
{METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle},
{METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble},
{METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet},
{METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab},
{METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian},
{METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter},
{METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron},
{METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo},
{METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean},
{METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender},
{METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion},
{METATILE_General_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_General, sDoorAnimPalettes_General},
{METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle},
{METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble},
{METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet},
{METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab},
{METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian},
{METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter},
{METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron},
{METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo},
{METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean},
{METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender},
{METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion},
/* Below was presumably intended for the door to the Pokemon Fan Club. The metatile is surrounded by metatiles for the fan club building.
Its animation tiles are similar to the Vermilion door above, and the building on the map uses that metatile instead. The unused tiles
have the pokeball above the door in view, but on the map the pokeball above the door is too high to be in view.
The metatile below was subsequently re-used for the warp to enter the SS Anne from the harbor, which has no door. */
{METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub},
{METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore},
{METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia},
{METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone},
{METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab},
{METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123},
{METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner},
{METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter},
{METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45},
{METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare},
{METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse},
{METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67},
{METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator},
{METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub},
{METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator},
{METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, 1, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne},
{METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator},
{METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter},
{METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator},
{METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator},
{METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub},
{METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore},
{METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia},
{METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone},
{METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab},
{METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123},
{METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner},
{METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter},
{METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45},
{METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare},
{METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse},
{METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67},
{METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator},
{METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub},
{METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator},
{METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x2, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne},
{METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator},
{METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter},
{METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator},
{METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator},
{}
};
static void UpdateDrawDoorFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y)
static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y)
{
if (frames->tile == 0xFFFF)
{
DrawDoorDefaultImage(gfx, x, y);
}
if (frames->tileOffset == CLOSED_DOOR_TILES_OFFSET)
DrawClosedDoorTiles(gfx, x, y);
else
{
LoadDoorFrameTiles(&gfx->tiles[frames->tile]);
SetDoorFramePalettes(gfx, x, y, gfx->palettes);
CopyDoorTilesToVram(&gfx->tiles[frames->tileOffset]);
DrawCurrentDoorAnimFrame(gfx, x, y, gfx->paletteNums);
}
}
static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y)
static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y)
{
if (gfx->size == 0)
{
if (gfx->size == DOOR_SIZE_1x1)
CurrentMapDrawMetatileAt(x, y);
}
else
{
CurrentMapDrawMetatileAt(x, y);
@@ -304,73 +309,91 @@ static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y)
}
}
static void LoadDoorFrameTiles(const u8 *a0)
// NOTE: The tiles of a door's animation must be copied to VRAM because they are
// not already part of any given tileset. This means that if there are any
// pre-existing tiles in this copied region that are visible when the door
// animation is played, they will be overwritten.
#define DOOR_TILE_START (NUM_TILES_TOTAL - 8)
static void CopyDoorTilesToVram(const u8 *tiles)
{
CpuFastCopy(a0, (void *)(BG_VRAM + 0x7F00), 0x100);
CpuFastCopy(tiles, (void *)(VRAM + TILE_OFFSET_4BPP(DOOR_TILE_START)), 8 * TILE_SIZE_4BPP);
}
static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3)
static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums)
{
u16 sp00[8];
if (gfx->size == 0)
{
BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3);
}
u16 tiles[8];
if (gfx->size == DOOR_SIZE_1x1)
BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums);
else
{
BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3);
DrawDoorMetatileAt(x, y - 1, sp00);
BufferDoorFrameTilesWithPalettes(sp00, 0x3FC, a3 + 4);
BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums);
DrawDoorMetatileAt(x, y - 1, tiles);
BuildDoorTiles(tiles, DOOR_TILE_START + 4, &paletteNums[4]);
}
DrawDoorMetatileAt(x, y, sp00);
DrawDoorMetatileAt(x, y, tiles);
}
static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2)
static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums)
{
int i;
u16 tile;
// Only the first 4 tiles of each metatile (bottom layer) actually use the door tiles
for (i = 0; i < 4; i++)
{
tile = *(a2++) << 12;
a0[i] = tile | (a1 + i);
tile = *(paletteNums++) << 12;
tiles[i] = tile | (tileNum + i);
}
// The remaining tiles (top layer) always use tile 0 (with the same palette)
for (; i < 8; i++)
{
tile = *(a2++) << 12;
a0[i] = tile;
tile = *(paletteNums++) << 12;
tiles[i] = tile;
}
}
#define tFramesHi data[0]
#define tFramesLo data[1]
#define tGfxHi data[2]
#define tGfxLo data[3]
#define tFrameId data[4]
#define tCounter data[5]
#define tX data[6]
#define tY data[7]
static void Task_AnimateDoor(u8 taskId)
{
s16 *data = (void *)gTasks[taskId].data;
const struct DoorAnimFrame * frames = (const void *)(((u16)data[0] << 16) | (u16)data[1]);
const struct DoorGraphics * gfx = (const void *)(((u16)data[2] << 16) | (u16)data[3]);
if (!PlayDoorAnimationFrame(gfx, frames, data))
s16 *data = gTasks[taskId].data;
const struct DoorAnimFrame *frames = (struct DoorAnimFrame *)((u16)tFramesHi << 16 | (u16)tFramesLo);
const struct DoorGraphics *gfx = (struct DoorGraphics *)((u16)tGfxHi << 16 | (u16)tGfxLo);
if (!AnimateDoorFrame(gfx, frames, data))
DestroyTask(taskId);
}
static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data)
static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data)
{
if (data[5] == 0)
if (tCounter == 0)
DrawDoor(gfx, &frames[tFrameId], tX, tY);
if (tCounter == frames[tFrameId].duration)
{
UpdateDrawDoorFrame(gfx, &frames[data[4]], data[6], data[7]);
}
if (data[5] == frames[data[4]].duration)
{
data[5] = 0;
data[4]++;
if (frames[data[4]].duration == 0)
tCounter = 0;
tFrameId++;
if (frames[tFrameId].duration == 0) // final frame has been reached
return FALSE;
else
return TRUE;
}
else
{
data[5]++;
}
tCounter++;
return TRUE;
}
static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * gfx, u16 id)
static const struct DoorGraphics *GetDoorGraphics(const struct DoorGraphics *gfx, u16 id)
{
while (gfx->tiles != NULL)
{
@@ -381,7 +404,7 @@ static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * g
return NULL;
}
static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y)
static s8 StartDoorAnimationTask(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y)
{
u8 taskId;
s16 *data;
@@ -391,53 +414,63 @@ static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct D
taskId = CreateTask(Task_AnimateDoor, 80);
data = gTasks[taskId].data;
data[6] = x;
data[7] = y;
data[1] = (uintptr_t)frames;
data[0] = (uintptr_t)frames >> 16;
data[3] = (uintptr_t)gfx;
data[2] = (uintptr_t)gfx >> 16;
tX = x;
tY = y;
tFramesLo = (uintptr_t)frames;
tFramesHi = (uintptr_t)frames >> 16;
tGfxLo = (uintptr_t)gfx;
tGfxHi = (uintptr_t)gfx >> 16;
return taskId;
}
static void DrawClosedDoor(const struct DoorGraphics * gfx, int x, int y)
#undef tFramesHi
#undef tFramesLo
#undef tGfxHi
#undef tGfxLo
#undef tFrameId
#undef tCounter
#undef tX
#undef tY
static void DrawClosedDoor(const struct DoorGraphics *gfx, int x, int y)
{
DrawDoorDefaultImage(gfx, x, y);
DrawClosedDoorTiles(gfx, x, y);
}
static void DrawOpenedDoor(const struct DoorGraphics * gfx, int x, int y)
static void DrawOpenedDoor(const struct DoorGraphics *gfx, int x, int y)
{
gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
if (gfx != NULL)
{
UpdateDrawDoorFrame(gfx, SeekToEndOfDoorAnim(gfx->size == 0 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge), x, y);
const struct DoorAnimFrame *frames = gfx->size == DOOR_SIZE_1x1 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge;
DrawDoor(gfx, GetLastDoorAnimFrame(frames), x, y);
}
}
static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames)
static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames)
{
while (frames->duration != 0)
frames++;
return frames - 1;
}
static s8 AnimateDoorOpenInternal(const struct DoorGraphics * gfx, int x, int y)
static s8 AnimateDoorOpenInternal(const struct DoorGraphics *gfx, int x, int y)
{
gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
if (gfx == NULL)
return -1;
else if (gfx->size == 0)
else if (gfx->size == DOOR_SIZE_1x1)
return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenSmall, x, y);
else
return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenLarge, x, y);
}
static s8 AnimateDoorCloseInternal(const struct DoorGraphics * gfx, int x, int y)
static s8 StartDoorCloseAnimation(const struct DoorGraphics *gfx, int x, int y)
{
gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
if (gfx == NULL)
return -1;
else if (gfx->size == 0)
else if (gfx->size == DOOR_SIZE_1x1)
return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseSmall, x, y);
else
return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseLarge, x, y);
@@ -459,7 +492,7 @@ s8 FieldAnimateDoorClose(int x, int y)
{
if (!MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y)))
return -1;
return AnimateDoorCloseInternal(sDoorGraphics, x, y);
return StartDoorCloseAnimation(sDoorGraphics, x, y);
}
s8 FieldAnimateDoorOpen(int x, int y)
@@ -482,7 +515,7 @@ u16 GetDoorSoundEffect(int x, int y)
return SE_SLIDING_DOOR;
}
static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y)
static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y)
{
gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
if (gfx == NULL)
+2 -2
View File
@@ -12,7 +12,7 @@
static bool32 IsMonValidSpecies(struct Pokemon *pokemon)
{
u16 species = GetMonData(pokemon, MON_DATA_SPECIES2);
u16 species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_NONE || species == SPECIES_EGG)
return FALSE;
return TRUE;
@@ -62,7 +62,7 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId)
{
FaintFromFieldPoison(tPartyId);
ShowFieldMessage(gText_PkmnFainted3);
data[0]++;
tState++;
return;
}
}
+49 -49
View File
@@ -199,7 +199,7 @@ bool8 PlayerHasGrassPokemonInParty(void)
)
{
species = GetMonData(pokemon, MON_DATA_SPECIES);
if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS)
if (gSpeciesInfo[species].types[0] == TYPE_GRASS || gSpeciesInfo[species].types[1] == TYPE_GRASS)
return TRUE;
}
}
@@ -423,7 +423,7 @@ bool8 IsStarterFirstStageInParty(void)
u8 i;
for (i = 0; i < partyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == species)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == species)
return TRUE;
}
return FALSE;
@@ -515,7 +515,7 @@ u8 GetLeadMonIndex(void)
for (i = 0; i < partyCount; i++)
{
pokemon = &gPlayerParty[i];
if (GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_NONE)
if (GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE)
return i;
}
return 0;
@@ -523,7 +523,7 @@ u8 GetLeadMonIndex(void)
u16 GetPartyMonSpecies(void)
{
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL);
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES_OR_EGG, NULL);
}
bool8 IsMonOTNameNotPlayers(void)
@@ -1718,7 +1718,7 @@ void UpdateTrainerCardPhotoIcons(void)
partyCount = CalculatePlayerPartyCount();
for (i = 0; i < partyCount; i++)
{
species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL);
species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL);
personality[i] = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL);
}
VarSet(VAR_TRAINER_CARD_MON_ICON_1, SpeciesToMailSpecies(species[0], personality[0]));
@@ -1752,15 +1752,15 @@ u16 StickerManGetBragFlags(void)
u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr)
{
if (attr == 0)
return hiddenItem & 0xFFFF;
else if (attr == 1)
return ((hiddenItem >> 16) & 0xFF) + 1000;
else if (attr == 2)
return (hiddenItem >> 24) & 0x7F;
else if (attr == 3)
return (hiddenItem >> 31) & 0x01;
else
if (attr == HIDDEN_ITEM_ITEM)
return GET_HIDDEN_ITEM_ITEM(hiddenItem);
else if (attr == HIDDEN_ITEM_FLAG)
return GET_HIDDEN_ITEM_FLAG(hiddenItem) + FLAG_HIDDEN_ITEMS_START;
else if (attr == HIDDEN_ITEM_QUANTITY)
return GET_HIDDEN_ITEM_QUANTITY(hiddenItem);
else if (attr == HIDDEN_ITEM_UNDERFOOT)
return GET_HIDDEN_ITEM_UNDERFOOT(hiddenItem);
else // Invalid
return 1;
}
@@ -1770,7 +1770,7 @@ bool8 DoesPlayerPartyContainSpecies(void)
u8 i;
for (i = 0; i < partyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004)
return TRUE;
}
return FALSE;
@@ -2079,30 +2079,30 @@ void DaisyMassageServices(void)
}
static const u16 sEliteFourLightingPalettes[][16] = {
INCBIN_U16("graphics/field_specials/unk_83F5F50.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F5F70.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F5F90.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F5FB0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F5FD0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F5FF0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6010.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6030.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6050.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6070.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6090.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F60B0.gbapal")
INCBIN_U16("graphics/field_specials/elite_four_lighting_0.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_1.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_2.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_3.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_4.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_5.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_6.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_7.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_8.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_9.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_10.gbapal"),
INCBIN_U16("graphics/field_specials/elite_four_lighting_11.gbapal")
};
static const u16 sChampionRoomLightingPalettes[][16] = {
INCBIN_U16("graphics/field_specials/unk_83F60D0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F60F0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6110.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6130.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6150.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6170.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6190.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F61B0.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F61D0.gbapal")
INCBIN_U16("graphics/field_specials/champion_room_lighting_0.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_1.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_2.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_3.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_4.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_5.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_6.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_7.gbapal"),
INCBIN_U16("graphics/field_specials/champion_room_lighting_8.gbapal")
};
static const u8 sEliteFourLightingTimers[] = {
@@ -2234,7 +2234,7 @@ bool8 CapeBrinkGetMoveToTeachLeadPokemon(void)
gSpecialVar_0x8007 = leadMonSlot;
for (i = 0; i < NELEMS(sCapeBrinkCompatibleSpecies); i++)
{
if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[i])
if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES_OR_EGG, NULL) == sCapeBrinkCompatibleSpecies[i])
{
tutorMonId = i;
break;
@@ -2321,17 +2321,17 @@ void CutMoveOpenDottedHoleDoor(void)
}
static const u16 sDeoxysObjectPals[][16] = {
INCBIN_U16("graphics/field_specials/unk_83F6206.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6226.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6246.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6266.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6286.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F62A6.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F62C6.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F62E6.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6306.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6326.gbapal"),
INCBIN_U16("graphics/field_specials/unk_83F6346.gbapal")
INCBIN_U16("graphics/field_specials/deoxys_rock_0.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_1.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_2.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_3.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_4.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_5.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_6.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_7.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_8.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_9.gbapal"),
INCBIN_U16("graphics/field_specials/deoxys_rock_10.gbapal")
};
static const u8 sDeoxysCoords[][2] = {
@@ -2502,7 +2502,7 @@ bool8 PlayerPartyContainsSpeciesWithPlayerID(void)
u8 i;
for (i = 0; i < playerCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004
&& GetPlayerTrainerId() == GetMonData(&gPlayerParty[i], MON_DATA_OT_ID, NULL))
return TRUE;
}
+15 -15
View File
@@ -24,15 +24,15 @@ EWRAM_DATA u8 gGlobalFieldTintMode = QL_TINT_NONE;
static const struct ConnectionFlags sDummyConnectionFlags = {};
static void InitMapLayoutData(struct MapHeader *);
static void InitBackupMapLayoutData(u16 *, u16, u16);
static void InitBackupMapLayoutData(const u16 *, u16, u16);
static void InitBackupMapLayoutConnections(struct MapHeader *);
static void FillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32);
static void FillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32);
static void FillWestConnection(struct MapHeader const *, struct MapHeader const *, s32);
static void FillEastConnection(struct MapHeader const *, struct MapHeader const *, s32);
static void LoadSavedMapView(void);
static struct MapConnection *GetIncomingConnection(u8, s32, s32);
static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, struct MapConnection *);
static const struct MapConnection *GetIncomingConnection(u8, s32, s32);
static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, const struct MapConnection *);
static bool8 IsCoordInIncomingConnectingMap(s32, s32, s32, s32);
static u32 GetAttributeByMetatileIdAndMapLayout(const struct MapLayout *, u16, u8);
@@ -82,7 +82,7 @@ static const u8 sMetatileAttrShifts[METATILE_ATTRIBUTE_COUNT] = {
[METATILE_ATTRIBUTE_7] = 31
};
const struct MapHeader * GetMapHeaderFromConnection(struct MapConnection * connection)
const struct MapHeader * GetMapHeaderFromConnection(const struct MapConnection * connection)
{
return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum);
}
@@ -112,7 +112,7 @@ static void InitMapLayoutData(struct MapHeader * mapHeader)
InitBackupMapLayoutConnections(mapHeader);
}
static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height)
static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height)
{
s32 y;
u16 *dest = VMap.map;
@@ -129,7 +129,7 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height)
static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader)
{
s32 count;
struct MapConnection *connection;
const struct MapConnection *connection;
s32 i;
gMapConnectionFlags = sDummyConnectionFlags;
@@ -173,7 +173,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader)
static void FillConnection(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x2, s32 y2, s32 width, s32 height)
{
s32 i;
u16 *src;
const u16 *src;
u16 *dest;
s32 mapWidth;
@@ -628,7 +628,7 @@ bool32 CanCameraMoveInDirection(s32 direction)
return TRUE;
}
static void SetPositionFromConnection(struct MapConnection *connection, int direction, s32 x, s32 y)
static void SetPositionFromConnection(const struct MapConnection *connection, int direction, s32 x, s32 y)
{
struct MapHeader const *mapHeader;
mapHeader = GetMapHeaderFromConnection(connection);
@@ -656,7 +656,7 @@ static void SetPositionFromConnection(struct MapConnection *connection, int dire
bool8 CameraMove(s32 x, s32 y)
{
s32 direction;
struct MapConnection *connection;
const struct MapConnection *connection;
s32 old_x, old_y;
gCamera.active = FALSE;
direction = GetPostCameraMoveMapBorderId(x, y);
@@ -683,10 +683,10 @@ bool8 CameraMove(s32 x, s32 y)
return gCamera.active;
}
struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y)
const struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y)
{
s32 count;
struct MapConnection *connection;
const struct MapConnection *connection;
const struct MapConnections *connections = gMapHeader.connections;
s32 i;
@@ -705,7 +705,7 @@ struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y)
}
static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, struct MapConnection *connection)
static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, const struct MapConnection *connection)
{
struct MapHeader const *mapHeader;
mapHeader = GetMapHeaderFromConnection(connection);
@@ -742,7 +742,7 @@ static bool32 IsCoordInConnectingMap(s32 coord, s32 max)
return FALSE;
}
static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y)
static s32 IsPosInConnectingMap(const struct MapConnection *connection, s32 x, s32 y)
{
struct MapHeader const *mapHeader;
mapHeader = GetMapHeaderFromConnection(connection);
@@ -758,10 +758,10 @@ static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y)
return FALSE;
}
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y)
const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y)
{
s32 count;
struct MapConnection *connection;
const struct MapConnection *connection;
s32 i;
u8 direction;
if (!gMapHeader.connections)
+94 -111
View File
@@ -69,8 +69,7 @@ const u32 gBattleAnimSpriteGfx_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpritePal_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/sprites/black_smoke.gbapal.lz");
const u32 gBattleAnimSpriteGfx_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.4bpp.lz");
const u32 gUnknownGfx_8D035A0[] = INCBIN_U32("graphics/unknown/unknown_D035A0.4bpp.lz");
const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.gbapal.lz");
const u32 gBattleAnimSpritePal_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.gbapal.lz");
const u32 gBattleAnimSpriteGfx_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.4bpp.lz");
@@ -128,9 +127,9 @@ const u32 gBattleAnimSpriteGfx_Lightning2[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpriteGfx_Lightning[] = INCBIN_U32("graphics/battle_anims/sprites/lightning.4bpp.lz");
const u32 gUnknownGfx_D06D80[] = INCBIN_U32("graphics/unknown/unknown_D06D80.4bpp.lz");
const u32 gUnknownPal_D06DC4[] = INCBIN_U32("graphics/unknown/unknown_D06D80.gbapal.lz");
const u32 gUnknownPal_D06DD8[] = INCBIN_U32("graphics/unknown/unknown_D06D80_2.gbapal.lz");
const u32 gBattleAnimSpriteGfx_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.4bpp.lz");
const u32 gBattleAnimSpritePal_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.gbapal.lz");
const u32 gBattleAnimSpritePal_SpinningBall2[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball_2.gbapal.lz");
// old battle interface data, unused
const u32 gOldBattleInterfaceGfx[] = INCBIN_U32("graphics/unused/obi1.4bpp.lz");
@@ -148,7 +147,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s
const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz");
const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz");
const u32 gPartyMenuHpBar_Gfx[] = INCBIN_U32("graphics/interface/party_menu_hpbar.4bpp.lz");
const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/interface/hpbar_unused.4bpp.lz");
const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz");
@@ -253,12 +252,13 @@ const u32 gBattleAnimSpritePal_Bell2[] = INCBIN_U32("graphics/battle_anims/sprit
const u32 gBattleAnimSpriteGfx_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.4bpp.lz");
const u32 gBattleAnimSpritePal_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.gbapal.lz");
const u16 gUnknown_D0CA04[] = INCBIN_U16("graphics/unknown/unknown_D0CA04.bin");
const u16 gUnknown_D0CA28[] = INCBIN_U16("graphics/unknown/unknown_D0CA28.bin");
const u16 gUnknown_D0CA4C[] = INCBIN_U16("graphics/unknown/unknown_D0CA4C.bin");
const u32 gUnusedGfx8bpp_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.8bpp.lz");
const u16 gUnknown_D0CAC8[] = INCBIN_U16("graphics/unknown/unknown_D0CAC8.bin");
const u32 gUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.bin.lz");
const u16 gBattleAnimUnused_Unknown1[] = INCBIN_U16("graphics/battle_anims/unused/unknown_1.bin");
const u16 gBattleAnimUnused_Unknown2[] = INCBIN_U16("graphics/battle_anims/unused/unknown_2.bin");
const u16 gBattleAnimUnused_Unknown3[] = INCBIN_U16("graphics/battle_anims/unused/unknown_3.bin");
const u32 gBattleAnimUnusedGfx_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.8bpp.lz");
const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2.gbapal.lz");
const u32 gBattleAnimUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.bin.lz");
const u32 gBattleAnimSpriteGfx_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.4bpp.lz");
const u32 gBattleAnimSpritePal_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.gbapal.lz");
@@ -274,7 +274,7 @@ const u32 gBattleAnimSpritePal_RedTube[] = INCBIN_U32("graphics/battle_anims/spr
const u32 gBattleAnimSpritePal_Amnesia[] = INCBIN_U32("graphics/battle_anims/sprites/amnesia.gbapal.lz");
const u32 gBattleAnimSpritePal_String2[] = INCBIN_U32("graphics/battle_anims/sprites/string_2.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_D0CD0C[] = INCBIN_U32("graphics/unknown/unknown_D0CD0C.bin.lz");
const u32 gBattleAnimUnused_Unknown4[] = INCBIN_U32("graphics/battle_anims/unused/unknown_4.bin.lz");
const u32 gBattleAnimSpritePal_Pencil2[] = INCBIN_U32("graphics/battle_anims/sprites/pencil_2.gbapal.lz");
const u32 gBattleAnimSpritePal_Petal[] = INCBIN_U32("graphics/battle_anims/sprites/petal.gbapal.lz");
@@ -413,50 +413,41 @@ const u32 gBattleAnimSpritePal_BlueFlames[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleAnimSpriteGfx_BlueFlames2[] = INCBIN_U32("graphics/battle_anims/sprites/blue_flames_2.4bpp.lz");
// Contest
// Contest (unused)
const u32 gUnusedGfx_OldContest[] = INCBIN_U32("graphics/unused/old_contest.4bpp.lz");
const u32 gUnusedPal_OldContest[] = INCBIN_U32("graphics/unused/old_contest.gbapal.lz");
const u32 gUnusedTilemap_OldContest[] = INCBIN_U32("graphics/unused/old_contest.bin.lz");
const u32 gJpContest_Gfx1[] = INCBIN_U32("graphics/contest/japanese/composite_1.4bpp.lz");
const u32 gJpContest_Pal[] = INCBIN_U32("graphics/contest/japanese/palette.gbapal.lz");
const u32 gJpContest_Bg_Tilemap[] = INCBIN_U32("graphics/contest/japanese/bg.bin.lz");
const u32 gJpContest_Windows_Tilemap[] = INCBIN_U32("graphics/contest/japanese/windows.bin.lz");
const u32 gJpContest_Numbers_Gfx[] = INCBIN_U32("graphics/contest/japanese/numbers.4bpp.lz");
const u32 gJpContest_Numbers_Pal[] = INCBIN_U32("graphics/contest/japanese/numbers.gbapal.lz");
const u32 gJpContest_Gfx2[] = INCBIN_U32("graphics/contest/japanese/composite_2.4bpp.lz");
const u32 gFile_graphics_unknown_unknown_D15BE8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D15BE8.bin.lz");
const u32 gContest_Interface_Pal[] = INCBIN_U32("graphics/contest/interface.gbapal.lz");
const u32 gContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/audience.bin.lz");
const u32 gContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/interface.bin.lz");
const u32 gFile_graphics_unused_numbers_sheet[] = INCBIN_U32("graphics/unused/numbers.4bpp.lz"); // From ruby
const u32 gFile_graphics_unused_numbers_palette[] = INCBIN_U32("graphics/unused/numbers.gbapal.lz"); // From ruby
const u32 gJpContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/japanese/interface.bin.lz");
const u32 gJpContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/japanese/audience.bin.lz");
const u32 gUnusedGfx_OldContest2[] = INCBIN_U32("graphics/unused/old_contest_2.4bpp.lz");
const u32 gOldContestPalette[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz");
const u32 gOldContestGfx[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz");
const u32 gContest_Curtain_Tilemap[] = INCBIN_U32("graphics/contest/curtain.bin.lz");
const u32 gContest_Interface_Gfx[] = INCBIN_U32("graphics/contest/interface.4bpp.lz");
const u32 gContest_Audience_Gfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz");
const u32 gContest_Faces_Gfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz");
const u32 gContest_JudgeSymbols_Gfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz");
const u32 gContest_JudgeSymbols_Pal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz");
const u8 gContest_SliderHeart_Gfx[] = INCBIN_U8("graphics/contest/slider_heart.4bpp");
const u32 gFile_graphics_unknown_unknown_D172A8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D172A8.bin.lz");
const u32 gJpContest_Voltage_Gfx[] = INCBIN_U32("graphics/contest/japanese/voltage.4bpp.lz");
const u32 gJpContest_Voltage_Pal[] = INCBIN_U32("graphics/contest/japanese/voltage.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_D17548_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17548.bin.lz");
const u32 gJpContestResults_Gfx[] = INCBIN_U32("graphics/contest/japanese/results.4bpp.lz");
const u32 gFile_graphics_unknown_unknown_D17654_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17654.bin.lz");
const u32 gContestResults_WinnerBanner_Tilemap[] = INCBIN_U32("graphics/contest/results_winner_banner.bin.lz");
const u32 gContestResults_Interface_Tilemap[] = INCBIN_U32("graphics/contest/results_interface.bin.lz");
const u32 gContestResults_Bg_Tilemap[] = INCBIN_U32("graphics/contest/results_bg.bin.lz");
const u32 gContestResults_Pal[] = INCBIN_U32("graphics/contest/results.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_D17AB8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17AB8.bin.lz");
const u32 gContestMiscGfx[] = INCBIN_U32("graphics/contest/misc.4bpp.lz");
const u32 gContestAudienceGfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz");
const u32 gContestFacesSheetGfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz");
const u32 gContestJudgeSymbolsGfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz");
const u32 gContestJudgeSymbolsPal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz");
const u8 gContestHeartGfx[] = INCBIN_U8("graphics/contest/heart.4bpp");
const u32 gFile_graphics_unknown_unknown_D196E4_sheet[] = INCBIN_U32("graphics/unknown/unknown_D196E4.4bpp.lz");
const u32 gFile_graphics_unknown_unknown_D196E4_palette[] = INCBIN_U32("graphics/unknown/unknown_D196E4.gbapal.lz");
const u32 gContestMisc2Gfx[] = INCBIN_U32("graphics/contest/misc_2.4bpp.lz");
const u32 gContestMiscTilemap1[] = INCBIN_U32("graphics/contest/misc_2_tilemap_1.bin.lz");
const u32 gContestMiscTilemap2[] = INCBIN_U32("graphics/contest/misc_2_tilemap_2.bin.lz");
const u32 gContestMiscTilemap3[] = INCBIN_U32("graphics/contest/misc_2_tilemap_3.bin.lz");
const u32 gContestMiscPal[] = INCBIN_U32("graphics/contest/misc.gbapal.lz");
const u32 gBattleAnimSpriteGfx_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.4bpp.lz");
const u32 gBattleAnimSpritePal_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.gbapal.lz");
@@ -532,9 +523,9 @@ const u32 gBattleAnimSpritePal_RazorLeaf[] = INCBIN_U32("graphics/battle_anims/s
const u32 gBattleAnimSpriteGfx_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.4bpp.lz");
const u32 gBattleAnimSpritePal_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_D1BE74_sheet[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.4bpp.lz");
const u32 gFile_graphics_unknown_unknown_D1BE74_palette[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_D1BE74_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.bin.lz");
const u32 gBattleAnimUnusedGfx_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.4bpp.lz");
const u32 gBattleAnimUnusedPal_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.gbapal.lz");
const u32 gBattleAnimUnusedTilemap_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.bin.lz");
const u32 gBattleAnimSpriteGfx_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.4bpp.lz");
const u32 gBattleAnimSpritePal_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.gbapal.lz");
@@ -892,8 +883,8 @@ const u32 gBattleAnimSpriteGfx_TagHand[] = INCBIN_U32("graphics/battle_anims/spr
const u32 gBattleAnimSpriteGfx_NoiseLine[] = INCBIN_U32("graphics/battle_anims/sprites/noise_line.4bpp.lz");
const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.4bpp.lz");
const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.bin.lz");
const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.4bpp.lz");
const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.bin.lz");
const u32 gBattleAnimSpriteGfx_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.4bpp.lz");
const u32 gBattleAnimSpritePal_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.gbapal.lz");
@@ -1011,8 +1002,7 @@ const u32 gBattleAnimBgTilemap_Ghost[] = INCBIN_U32("graphics/battle_anims/backg
const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/sprites/whip_hit.gbapal.lz");
const u32 gBattleAnimBgPalette_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz");
const u32 gFile_graphics_unknown_unknown_E7CFB0_tilemap[] = INCBIN_U32("graphics/unknown/unknown_E7CFB0.bin.lz");
const u32 gBattleAnimBgTilemap_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused
const u32 gFile_graphics_berry_blender_center_sheet[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
@@ -1074,22 +1064,20 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri
const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz");
const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz");
const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_misc.4bpp.lz");
const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_misc.gbapal.lz");
const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_misc.bin.lz");
const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/party_menu/bg.4bpp.lz");
const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/party_menu/bg.gbapal.lz");
const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/party_menu/bg.bin.lz");
const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz");
const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused
const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/interface/party_menu_pokeball.gbapal.lz");
const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball.4bpp.lz");
const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball_small.4bpp.lz"); //unused
const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gbapal.lz");
const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz");
const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz");
const u32 gUnknown_8E830CC[] = INCBIN_U32("graphics/item_menu/bag_tiles.4bpp.lz");
const u32 gUnknown_8E832C0[] = INCBIN_U32("graphics/item_menu/bag_tilemap1.bin.lz"); // bag menu
const u32 gUnknown_8E83444[] = INCBIN_U32("graphics/item_menu/bag_tilemap2.bin.lz"); // PC deposit items
const u32 gBagBg_Gfx[] = INCBIN_U32("graphics/item_menu/bg.4bpp.lz");
const u32 gBagBg_Tilemap[] = INCBIN_U32("graphics/item_menu/bg.bin.lz");
const u32 gBagBg_ItemPC_Tilemap[] = INCBIN_U32("graphics/item_menu/bg_item_pc.bin.lz");
const u32 gBagBgPalette[] = INCBIN_U32("graphics/item_menu/bag_pal1.gbapal.lz"); // palette 1 (Boy + misc Pal)
const u32 gBagBgPalette_FemaleOverride[] = INCBIN_U32("graphics/item_menu/bag_pal2.gbapal.lz"); // palette 2 (Girl)
@@ -1125,14 +1113,13 @@ const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/shop_menu/shop_tilemap.
const u32 gBuyMenuFrame_TmHmTilemap[] = INCBIN_U32("graphics/shop_menu/shop_tm_hm_tilemap.bin.lz");
const u32 gBuyMenuFrame_Pal[] = INCBIN_U32("graphics/shop_menu/shop_menu.gbapal.lz");
const u32 gUnknown_8E861A8[] = INCBIN_U32("graphics/unknown/unknown_E861A8.bin.lz");
const u8 gTeachyTv_Border_Gfx[] = INCBIN_U8("graphics/teachy_tv/border.4bpp.lz"); // Unused
const u8 gTeachyTv_Gfx[] = INCBIN_U8("graphics/teachy_tv/tiles.4bpp.lz");
const u8 gTeachyTvScreen_Tilemap[] = INCBIN_U8("graphics/teachy_tv/screen.bin.lz");
const u8 gTeachyTvTitle_Tilemap[] = INCBIN_U8("graphics/teachy_tv/title.bin.lz");
const u32 gTeachyTv_Pal[] = INCBIN_U32("graphics/teachy_tv/tiles.gbapal.lz");
const u32 gUnknown_8E87010[] = INCBIN_U32("graphics/unknown/unknown_E87010.gbapal.lz");
const u32 gUnusedGrayPalette[] = INCBIN_U32("graphics/unused/gray_palette.gbapal.lz");
#include "data/graphics/items.h"
@@ -1154,9 +1141,9 @@ const u16 gFireRedMenuElements1_Pal[] = INCBIN_U16("graphics/interface/dex_caugh
const u16 gFireRedMenuElements2_Pal[] = INCBIN_U16("graphics/interface/pokemon_types.gbapal");
const u8 gFireRedMenuElements_Gfx[] = INCBIN_U8("graphics/interface/dex_caught_pokeball_and_pokemon_types.4bpp");
const u16 gUnknown_8E97DDC[] = INCBIN_U16("graphics/interface/learn_move.gbapal");
const u32 gUnknown_8E97DFC[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz");
const u32 gUnknown_8E97EC4[] = INCBIN_U32("graphics/interface/learn_move.bin.lz");
const u16 gMoveRelearner_Pal[] = INCBIN_U16("graphics/interface/learn_move.gbapal");
const u32 gMoveRelearner_Gfx[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz");
const u32 gMoveRelearner_Tilemap[] = INCBIN_U32("graphics/interface/learn_move.bin.lz");
const u16 gNamingScreenKeyboard_Pal[] = INCBIN_U16("graphics/naming_screen/keyboard.gbapal");
const u16 gNamingScreenRival_Pal[] = INCBIN_U16("graphics/naming_screen/rival.gbapal");
@@ -1204,26 +1191,22 @@ const u16 gEasyChatButtonWindow_Pal[] = INCBIN_U16("graphics/easy_chat/button_wi
const u32 gEasyChatButtonWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/button_window.4bpp.lz");
const u32 gEasyChatMode_Gfx[] = INCBIN_U32("graphics/easy_chat/mode.4bpp.lz");
const u32 gPokeSumBgTiles[] = INCBIN_U32("graphics/interface/trainer_memo.4bpp.lz");
const u32 gTrainerMemoPal1[] = INCBIN_U32("graphics/interface/trainer_memo_pal1.gbapal");
const u32 gUnknown_8E9B3B0[] = INCBIN_U32("graphics/interface/trainer_memo_pal2.gbapal");
const u32 gUnknown_8E9B3D0[] = INCBIN_U32("graphics/interface/trainer_memo_pal3.gbapal");
const u32 gSummaryScreen_Bg_Gfx[] = INCBIN_U32("graphics/summary_screen/bg.4bpp.lz");
const u32 gSummaryScreen_Bg_Pal[] = INCBIN_U32("graphics/summary_screen/bg.gbapal");
const u32 gSummaryScreen_ExpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/exp_bar.4bpp.lz");
const u32 gSummaryScreen_HpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/hp_bar.4bpp.lz");
const u16 gSummaryScreen_HpExpBar_Pal[] = INCBIN_U16("graphics/summary_screen/exp_bar.gbapal"); // hp bar uses this too
const u32 gSummaryScreen_PageInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz");
const u32 gSummaryScreen_PageSkills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz");
const u32 gSummaryScreen_PageMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves.bin.lz");
const u32 gSummaryScreen_PageMovesInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves_info.bin.lz");
const u32 gSummaryScreen_PageEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_egg.bin.lz");
const u32 gPokeSummary_ExpBarTiles[] = INCBIN_U32("graphics/interface/summary_exp_bar.4bpp.lz");
const u32 gPokeSummary_HpBarTiles[] = INCBIN_U32("graphics/interface/summary_hp_bar.4bpp.lz");
const u16 gPokeSummary_ExpBarPals[] = INCBIN_U16("graphics/interface/summary_exp_bar.gbapal"); // hp bar uses this too
const u32 gBgTilemap_TrainerMemo_Details[] = INCBIN_U32("graphics/interface/trainer_memo.bin.lz");
const u32 gBgTilemap_TrainerMemo_Stats[] = INCBIN_U32("graphics/interface/trainer_memo_2.bin.lz");
const u32 gBgTilemap_PokeSum_MovesListForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_3.bin.lz");
const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_4.bin.lz");
const u32 gBgTilemap_TrainerMemo_Egg[] = INCBIN_U32("graphics/interface/trainer_memo_5.bin.lz");
const u16 gUnknown_8E9BD08[] = INCBIN_U16("graphics/unknown/unknown_E9BD08.gbapal");
const u16 gUnusedRedPalette[] = INCBIN_U16("graphics/unused/red_palette.gbapal");
const u32 gEasyChatRectangleCursor_Gfx[] = INCBIN_U32("graphics/easy_chat/rectangle_cursor.4bpp.lz");
const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/status_ailment_icons.gbapal");
const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/status_ailment_icons.4bpp.lz");
const u16 gSummaryScreen_StatusAilmentIcon_Pal[] = INCBIN_U16("graphics/summary_screen/status_ailment_icons.gbapal");
const u32 gSummaryScreen_StatusAilmentIcon_Gfx[] = INCBIN_U32("graphics/summary_screen/status_ailment_icons.4bpp.lz");
const u16 gDexScreen_TopMenuIconPals_AtoZ[] = INCBIN_U16("graphics/pokedex/cat_icon_abc.gbapal");
const u32 gDexScreen_TopMenuIconTiles_AtoZ[] = INCBIN_U32("graphics/pokedex/cat_icon_abc.4bpp.lz");
@@ -1249,10 +1232,10 @@ const u16 gFameCheckerBgTiles[] = INCBIN_U16("graphics/fame_checker/bg.4bpp");
const u16 gFameCheckerBg3Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap3.bin");
const u16 gFameCheckerBg2Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap2.bin");
const u16 gLinkMiscMenu_Pal[] = INCBIN_U16("graphics/interface/union_room_chat.gbapal");
const u32 gLinkMiscMenu_Gfx[] = INCBIN_U32("graphics/interface/union_room_chat.4bpp.lz");
const u32 gLinkMiscMenu_Tilemap[] = INCBIN_U32("graphics/interface/union_room_chat.bin.lz");
const u32 gUnionRoomChatIcons[] = INCBIN_U32("graphics/interface/union_room_chat_icons.4bpp.lz");
const u16 gUnionRoomChat_Bg_Pal[] = INCBIN_U16("graphics/union_room_chat/bg.gbapal");
const u32 gUnionRoomChat_Bg_Gfx[] = INCBIN_U32("graphics/union_room_chat/bg.4bpp.lz");
const u32 gUnionRoomChat_Bg_Tilemap[] = INCBIN_U32("graphics/union_room_chat/bg.bin.lz");
const u32 gUnionRoomChat_Icons_Gfx[] = INCBIN_U32("graphics/union_room_chat/icons.4bpp.lz");
const u16 gTilesetPalettes_General[][16] =
{
@@ -1339,20 +1322,20 @@ const u16 gTilesetPalettes_DepartmentStore[][16] =
const u32 gTilesetTiles_DepartmentStore[] = INCBIN_U32("data/tilesets/secondary/department_store/tiles.4bpp.lz");
const u16 gUnionRoomChatPanelBgPal_7[] = INCBIN_U16("graphics/interface/union_room_chat_panel.gbapal");
const u32 gUnionRoomChatPanelBgTiles[] = INCBIN_U32("graphics/interface/union_room_chat_panel.4bpp.lz");
const u32 gUnionRoomChatPanelBgMap[] = INCBIN_U32("graphics/interface/union_room_chat_panel.bin.lz");
const u16 gUnionRoomChat_Panel_Pal[] = INCBIN_U16("graphics/union_room_chat/panel.gbapal");
const u32 gUnionRoomChat_Panel_Gfx[] = INCBIN_U32("graphics/union_room_chat/panel.4bpp.lz");
const u32 gUnionRoomChat_Panel_Tilemap[] = INCBIN_U32("graphics/union_room_chat/panel.bin.lz");
const u16 gCreditsMonBackdropPals[][16] =
const u16 gCreditsMonPokeball_Pals[][16] =
{
INCBIN_U16("graphics/credits/charizard.gbapal"),
INCBIN_U16("graphics/credits/venusaur.gbapal"),
INCBIN_U16("graphics/credits/blastoise.gbapal"),
INCBIN_U16("graphics/credits/pikachu.gbapal"),
INCBIN_U16("graphics/credits/pokeball_charizard.gbapal"),
INCBIN_U16("graphics/credits/pokeball_venusaur.gbapal"),
INCBIN_U16("graphics/credits/pokeball_blastoise.gbapal"),
INCBIN_U16("graphics/credits/pokeball_pikachu.gbapal"),
};
const u32 gCreditsPokeballBgGfxTiles[] = INCBIN_U32("graphics/credits/unk_8EAAB98.4bpp.lz");
const u32 gCreditsPokeballBgGfxMap[] = INCBIN_U32("graphics/credits/unk_8EAB30C.bin.lz");
const u32 gCreditsMonPokeball_Tiles[] = INCBIN_U32("graphics/credits/pokeball.4bpp.lz");
const u32 gCreditsMonPokeball_Tilemap[] = INCBIN_U32("graphics/credits/pokeball.bin.lz");
#ifdef FIRERED
const u16 gGraphics_TitleScreen_GameTitleLogoPals[] = INCBIN_U16("graphics/title_screen/firered/game_title_logo.gbapal");
@@ -1382,15 +1365,15 @@ const u16 gTitleScreen_Slash_Pal[] = INCBIN_U16("graphics/title_screen/leafgreen
const u32 gTitleScreen_BlankSprite_Tiles[] = INCBIN_U32("graphics/title_screen/blank_sprite.4bpp.lz");
const u16 gCreditsAllRightsReservedGfxPal[] = INCBIN_U16("graphics/credits/unk_8EAE548.gbapal");
const u8 gCreditsAllRightsReservedGfxTiles[] = INCBIN_U8("graphics/credits/unk_8EAE548.4bpp.lz");
const u8 gCreditsAllRightsReservedGfxMap[] = INCBIN_U8("graphics/credits/unk_8EAE548.bin.lz");
const u16 gCreditsCopyright_Pal[] = INCBIN_U16("graphics/credits/copyright.gbapal");
const u8 gCreditsCopyright_Tiles[] = INCBIN_U8("graphics/credits/copyright.4bpp.lz");
const u8 gCreditsCopyright_Tilemap[] = INCBIN_U8("graphics/credits/copyright.bin.lz");
const u32 gUnknown_8EAEA00[] = INCBIN_U32("graphics/link/gba.gbapal");
const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/link/gba_pal2.gbapal");
const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/link/gba.4bpp");
const u32 gTradeGba_Pal[] = INCBIN_U32("graphics/trade/gba.gbapal");
const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/trade/gba_pal2.gbapal");
const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/trade/gba.4bpp");
const u16 gUnknown_8EAFE80[] = INCBIN_U16("graphics/interface/blank2.gbapal");
const u16 sEmptyPal[16] = {0};
const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal");
const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz");
+1 -1
View File
@@ -390,7 +390,7 @@ static void Task_Hof_InitMonData(u8 taskId)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE)
{
sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
sHofMonPtr[0].mon[i].tid = GetMonData(&gPlayerParty[i], MON_DATA_OT_ID);
sHofMonPtr[0].mon[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
sHofMonPtr[0].mon[i].lvl = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
+90 -3
View File
@@ -2,6 +2,8 @@
#include <stdio.h>
#include "config.h"
#include "gba/gba.h"
#include "malloc.h"
#include "mini_printf.h"
#define AGB_PRINT_FLUSH_ADDR 0x9FE209D
#define AGB_PRINT_STRUCT_ADDR 0x9FE20F8
@@ -14,6 +16,11 @@
#define NOCASHGBAPRINTADDR1 0x4FFFA10 // automatically adds a newline after the string has finished
#define NOCASHGBAPRINTADDR2 0x4FFFA14 // does not automatically add the newline. by default, NOCASHGBAPRINTADDR2 is used. this is used to keep strings consistent between no$gba and VBA-RR, but a user can choose to forgo this.
// hardware extensions for LOG_HANDLER_MGBA_PRINT
#define REG_DEBUG_ENABLE ((vu16*) (0x4FFF780)) // handshake: (w)[0xC0DE] -> (r)[0x1DEA]
#define REG_DEBUG_FLAGS ((vu16*) (0x4FFF700))
#define REG_DEBUG_STRING ((char*) (0x4FFF600))
struct AGBPrintStruct
{
u16 m_nRequest;
@@ -26,6 +33,8 @@ typedef void (*LPFN_PRINT_FLUSH)(void);
#ifndef NDEBUG
// AGBPrint print functions
#if (LOG_HANDLER == LOG_HANDLER_AGB_PRINT)
void AGBPrintFlush1Block(void);
void AGBPrintInit(void)
@@ -87,7 +96,15 @@ void AGBPrintf(const char *pBuf, ...)
char bufPrint[0x100];
va_list vArgv;
va_start(vArgv, pBuf);
#if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF)
vsprintf(bufPrint, pBuf, vArgv);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF)
mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC)
vsnprintf(bufPrint, 0x100, pBuf, vArgv);
#else
#error "unspecified pretty printing handler."
#endif
va_end(vArgv);
AGBPrint(bufPrint);
}
@@ -155,9 +172,10 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
AGBPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s] \n", pFile, nLine, pExpression);
}
}
#endif
// no$gba print functions, uncomment to use
/*
// no$gba print functions
#if (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
void NoCashGBAPrint(const char *pBuf)
{
*(volatile u32 *)NOCASHGBAPRINTADDR2 = (u32)pBuf;
@@ -168,10 +186,79 @@ void NoCashGBAPrintf(const char *pBuf, ...)
char bufPrint[0x100];
va_list vArgv;
va_start(vArgv, pBuf);
#if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF)
vsprintf(bufPrint, pBuf, vArgv);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF)
mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC)
vsnprintf(bufPrint, 0x100, pBuf, vArgv);
#else
#error "unspecified pretty printing handler."
#endif
va_end(vArgv);
NoCashGBAPrint(bufPrint);
}
*/
void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram)
{
if (nStopProgram)
{
NoCashGBAPrintf("ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression);
asm(".hword 0xEFFF");
}
else
{
NoCashGBAPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression);
}
}
#endif
// mgba print functions
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
#define MGBA_REG_DEBUG_MAX (256)
bool32 MgbaOpen(void)
{
*REG_DEBUG_ENABLE = 0xC0DE;
return *REG_DEBUG_ENABLE == 0x1DEA;
}
void MgbaClose(void)
{
*REG_DEBUG_ENABLE = 0;
}
void MgbaPrintf(s32 level, const char* ptr, ...)
{
va_list args;
level &= 0x7;
va_start(args, ptr);
#if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF)
vsprintf(REG_DEBUG_STRING, ptr, args);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF)
mini_vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args);
#elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC)
vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args);
#else
#error "unspecified pretty printing handler."
#endif
va_end(args);
*REG_DEBUG_FLAGS = level | 0x100;
}
void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram)
{
if (nStopProgram)
{
MgbaPrintf(MGBA_LOG_ERROR, "ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression);
asm(".hword 0xEFFF");
}
else
{
MgbaPrintf(MGBA_LOG_WARN, "WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression);
}
}
#endif
#endif
+3 -3
View File
@@ -563,16 +563,16 @@ static bool8 DoLoadBagGraphics(void)
{
case 0:
ResetTempTileDataBuffers();
DecompressAndCopyTileDataToVram(1, gUnknown_8E830CC, 0, 0, 0);
DecompressAndCopyTileDataToVram(1, gBagBg_Gfx, 0, 0, 0);
sBagMenuDisplay->data[0]++;
break;
case 1:
if (FreeTempTileDataBuffersIfPossible() != TRUE)
{
if (gBagMenuState.location != ITEMMENULOCATION_ITEMPC)
LZDecompressWram(gUnknown_8E832C0, sBagBgTilemapBuffer);
LZDecompressWram(gBagBg_Tilemap, sBagBgTilemapBuffer);
else
LZDecompressWram(gUnknown_8E83444, sBagBgTilemapBuffer);
LZDecompressWram(gBagBg_ItemPC_Tilemap, sBagBgTilemapBuffer);
sBagMenuDisplay->data[0]++;
}
break;
+1 -1
View File
@@ -917,7 +917,7 @@ void ItemUse_SetQuestLogEvent(u8 eventId, struct Pokemon *pokemon, u16 itemId, u
data->itemId = itemId;
data->itemParam = param;
if (pokemon != NULL)
data->species = GetMonData(pokemon, MON_DATA_SPECIES2);
data->species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG);
else
data->species = 0xFFFF;
SetQuestLogEvent(eventId, (void *)data);
+5 -5
View File
@@ -242,8 +242,8 @@ static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem)
{
s16 *data = gTasks[taskId].data;
gSpecialVar_0x8004 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_FLAG);
gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ID);
gSpecialVar_0x8006 = 1;
gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ITEM);
gSpecialVar_0x8006 = 1; // Quantity. The 'HIDDEN_ITEM_QUANTITY' data is ignored for underfoot items
TV_PrintIntToStringVar(0, gSpecialVar_0x8005);
tHiddenItemFound = TRUE;
tItemX = 0;
@@ -287,7 +287,7 @@ static void SetNormalHiddenItem(u8 taskId)
static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y)
{
u8 bgEventCount = events->bgEventCount;
struct BgEvent * bgEvents = events->bgEvents;
const struct BgEvent * bgEvents = events->bgEvents;
u16 eventFlag;
int i;
@@ -309,7 +309,7 @@ static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y)
return FALSE;
}
static bool8 HiddenItemInConnectedMapAtPos(struct MapConnection * connection, s32 x, s32 y)
static bool8 HiddenItemInConnectedMapAtPos(const struct MapConnection * connection, s32 x, s32 y)
{
const struct MapHeader * mapHeader;
u16 localX, localY;
@@ -372,7 +372,7 @@ static void FindHiddenItemsInConnectedMaps(u8 taskId)
|| var2 > curY
|| curY >= height)
{
struct MapConnection * conn = GetMapConnectionAtPos(curX, curY);
const struct MapConnection * conn = GetMapConnectionAtPos(curX, curY);
if (conn != NULL && HiddenItemInConnectedMapAtPos(conn, curX, curY) == TRUE)
RegisterHiddenItemRelativeCoordsIfCloser(taskId, curX - x, curY - y);
}
+3 -3
View File
@@ -400,9 +400,9 @@ static void MoveRelearnerLoadBgGfx(void)
SetBgTilemapBuffer(1, sMoveRelearner->bg1TilemapBuffer);
LoadUserWindowGfx(0, 1, 0xE0);
ListMenuLoadStdPalAt(0xD0, 1);
LoadPalette(gUnknown_8E97DDC, 0x00, 0x20);
DecompressAndLoadBgGfxUsingHeap(1, gUnknown_8E97DFC, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnknown_8E97EC4, 0, 0);
LoadPalette(gMoveRelearner_Pal, 0x00, 0x20);
DecompressAndLoadBgGfxUsingHeap(1, gMoveRelearner_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(1, gMoveRelearner_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
+1
View File
@@ -3,6 +3,7 @@
#include "gba/flash_internal.h"
#include "load_save.h"
#include "pokemon.h"
#include "pokemon_storage_system.h"
#include "random.h"
#include "item.h"
#include "save_location.h"
+6 -3
View File
@@ -70,12 +70,9 @@ u8 gPcmDmaCounter;
// These variables are not defined in RS or Emerald, and are never read.
// They were likely used to debug the audio engine and VCount interrupt.
// Define NDEBUG in include/config.h to remove these variables.
#ifndef NDEBUG
u8 sVcountAfterSound;
u8 sVcountAtIntr;
u8 sVcountBeforeSound;
#endif
static IntrFunc * const sTimerIntrFunc = gIntrTable + 0x7;
@@ -146,7 +143,13 @@ void AgbMain()
SetNotInSaveFailedScreen();
#ifndef NDEBUG
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
(void) MgbaOpen();
#elif (LOG_HANDLER == LOG_HANDLER_AGB_PRINT)
AGBPrintInit();
#endif
#endif
#if REVISION == 1
if (gFlashMemoryPresent != TRUE)
+4 -4
View File
@@ -120,8 +120,8 @@ static const struct WindowTemplate sWindowTemplate[] = {
[MAIN_MENU_WINDOW_COUNT] = DUMMY_WIN_TEMPLATE
};
static const u16 sBgPal00[] = INCBIN_U16("graphics/main_menu/unk_8234648.gbapal");
static const u16 sBgPal15[] = INCBIN_U16("graphics/main_menu/unk_8234668.gbapal");
static const u16 sBg_Pal[] = INCBIN_U16("graphics/main_menu/bg.gbapal");
static const u16 sTextbox_Pal[] = INCBIN_U16("graphics/main_menu/textbox.gbapal");
static const u8 sTextColor1[] = { 10, 11, 12 };
@@ -196,8 +196,8 @@ static bool32 MainMenuGpuInit(u8 a0)
ChangeBgY(2, 0, 0);
InitWindows(sWindowTemplate);
DeactivateAllTextPrinters();
LoadPalette(sBgPal00, 0x00, 0x20);
LoadPalette(sBgPal15, 0xF0, 0x20);
LoadPalette(sBg_Pal, 0x00, 0x20);
LoadPalette(sTextbox_Pal, 0xF0, 0x20);
SetGpuReg(REG_OFFSET_WIN0H, 0);
SetGpuReg(REG_OFFSET_WIN0V, 0);
SetGpuReg(REG_OFFSET_WININ, 0);
+355
View File
@@ -0,0 +1,355 @@
/*
* The Minimal snprintf() implementation
*
* Copyright (c) 2013,2014 Michal Ludvig <michal@logix.cz>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the auhor nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* mini-printf courtesy of https://github.com/mludvig/mini-printf
* stripped to reduce file size for agb needs
*/
#include "mini_printf.h"
#include "gba/types.h"
#include "gba/defines.h"
#include "config.h"
#include "characters.h"
#include "string_util.h"
#ifndef NDEBUG
#if (PRETTY_PRINT_HANDLER != PRETTY_PRINT_OFF)
struct mini_buff
{
char *buffer, *pbuffer;
u32 buffer_len;
};
static inline char mini_pchar_decode(char encoded)
{
char ret = '?';
if (encoded >= CHAR_a && encoded <= CHAR_z)
ret = encoded-(CHAR_a-'a'); // lower-case characters
else if (encoded >= CHAR_A && encoded <= CHAR_Z)
ret = encoded-(CHAR_A-'A'); // upper-case characters
else if (encoded >= CHAR_0 && encoded <= CHAR_9)
ret = encoded-(CHAR_0-'0'); // numbers
else if (encoded == CHAR_SPACE)
ret = ' '; // space
else if (encoded == CHAR_EXCL_MARK)
ret = '!'; // exclamation point
else if (encoded == CHAR_QUESTION_MARK)
ret = '?'; // question mark
else if (encoded == CHAR_PERIOD)
ret = '.'; // period
else if (encoded == CHAR_DBL_QUOTE_LEFT || encoded == CHAR_DBL_QUOTE_RIGHT)
ret = '"'; // double quote
else if (encoded == CHAR_SGL_QUOTE_LEFT || encoded == CHAR_SGL_QUOTE_RIGHT)
ret = '\''; // single quote
else if (encoded == CHAR_CURRENCY)
ret = '$'; // currency mark (pokemonies in game, dollar sign in logs)
else if (encoded == CHAR_COMMA)
ret = ','; // comma
else if (encoded == CHAR_MULT_SIGN)
ret = '#'; // pound, hashtag, octothorpe, whatever
else if (encoded == CHAR_SLASH)
ret = '/'; // slash
else if (encoded == CHAR_LESS_THAN)
ret = '<'; // less than sign
else if (encoded == CHAR_GREATER_THAN)
ret = '>'; // greater than sign
else if (encoded == CHAR_PERCENT)
ret = '%'; // percentage
else if (encoded == CHAR_LEFT_PAREN)
ret = '('; // opening parentheses
else if (encoded == CHAR_RIGHT_PAREN)
ret = ')'; // closing parentheses
return ret;
}
static s32 _putsAscii(char *s, s32 len, void *buf)
{
char *p0;
s32 i;
struct mini_buff *b;
if (!buf)
return len;
b = buf;
p0 = b->buffer;
/* Copy to buffer */
for (i = 0; i < len; i++) {
if(b->pbuffer == b->buffer + b->buffer_len - 1) {
break;
}
*(b->pbuffer ++) = s[i];
}
*(b->pbuffer) = 0;
return b->pbuffer - p0;
}
static s32 _putsEncoded(char *s, s32 len, void *buf)
{
char *p0;
s32 i;
struct mini_buff *b;
if (!buf)
return len;
b = buf;
p0 = b->buffer;
/* Copy to buffer */
for (i = 0; i < len; i++) {
if(b->pbuffer == b->buffer + b->buffer_len - 1) {
break;
}
*(b->pbuffer ++) = mini_pchar_decode(s[i]);
}
*(b->pbuffer) = 0;
return b->pbuffer - p0;
}
static s32 mini_strlen(const char *s)
{
s32 len = 0;
while (s[len] != '\0') len++;
return len;
}
static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer)
{
char *pbuffer = buffer;
s32 negative = 0;
s32 i, len;
/* No support for unusual radixes. */
if (radix > 16)
return 0;
if (value < 0 && !unsig)
{
negative = 1;
value = -value;
}
/* This builds the string back to front ... */
do
{
s32 digit = value % radix;
*(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10);
value /= radix;
} while (value > 0);
if (negative)
*(pbuffer++) = '-';
*(pbuffer) = '\0';
/* ... now we reverse it (could do it recursively but will
* conserve the stack space) */
len = (pbuffer - buffer);
for (i = 0; i < len / 2; i++)
{
char j = buffer[i];
buffer[i] = buffer[len-i-1];
buffer[len-i-1] = j;
}
return len;
}
static s32 mini_pad(char* ptr, s32 len, char pad_char, s32 pad_to, char *buffer)
{
s32 i;
bool32 overflow = FALSE;
char * pbuffer = buffer;
if(pad_to == 0)
pad_to = len;
if (len > pad_to) {
len = pad_to;
overflow = TRUE;
}
for(i = pad_to - len; i > 0; i --)
{
*(pbuffer++) = pad_char;
}
for(i = len; i > 0; i --)
{
*(pbuffer++) = *(ptr++);
}
len = pbuffer - buffer;
if(overflow)
{
for (i = 0; i < 3 && pbuffer > buffer; i ++)
{
*(pbuffer-- - 1) = '*';
}
}
return len;
}
s32 mini_vsnprintf(char *buffer, u32 buffer_len, const char *fmt, va_list va)
{
struct mini_buff b;
s32 n;
b.buffer = buffer;
b.pbuffer = buffer;
b.buffer_len = buffer_len;
if (buffer_len == 0)
buffer = NULL;
n = mini_vpprintf((buffer != NULL) ? &b : NULL, fmt, va);
if (buffer == NULL)
return n;
return b.pbuffer - b.buffer;
}
s32 mini_vpprintf(void* buf, const char *fmt, va_list va)
{
char bf[24];
char bf2[24];
char ch;
s32 n;
n = 0;
while ((ch=*(fmt++)))
{
s32 len;
if (ch != '%')
{
len = 1;
len = _putsAscii(&ch, len, buf);
} else
{
char pad_char = ' ';
s32 pad_to = 0;
char l = 0;
char *ptr;
ch=*(fmt++);
/* Zero padding requested */
if (ch == '0')
pad_char = '0';
while (ch >= '0' && ch <= '9')
{
pad_to = pad_to * 10 + (ch - '0');
ch= *(fmt++);
}
if(pad_to > (s32) sizeof(bf))
{
pad_to = sizeof(bf);
}
if (ch == 'l')
{
l = 1;
ch=*(fmt++);
}
switch (ch)
{
case 0:
goto end;
case 'u':
case 'd':
if(l)
{
len = mini_itoa(va_arg(va, u32), 10, 0, (ch=='u'), bf2);
} else
{
if(ch == 'u')
{
len = mini_itoa((u32) va_arg(va, u32), 10, 0, 1, bf2);
}
else
{
len = mini_itoa((s32) va_arg(va, s32), 10, 0, 0, bf2);
}
}
len = mini_pad(bf2, len, pad_char, pad_to, bf);
len = _putsAscii(bf, len, buf);
break;
case 'x':
case 'X':
if(l)
{
len = mini_itoa(va_arg(va, u32), 16, (ch=='X'), 1, bf2);
}
else
{
len = mini_itoa((u32) va_arg(va, u32), 16, (ch=='X'), 1, bf2);
}
len = mini_pad(bf2, len, pad_char, pad_to, bf);
len = _putsAscii(bf, len, buf);
break;
case 'c' :
ch = (char)(va_arg(va, s32));
len = mini_pad(&ch, 1, pad_char, pad_to, bf);
len = _putsAscii(bf, len, buf);
break;
case 's' :
ptr = va_arg(va, char*);
len = mini_strlen(ptr);
if (pad_to > 0)
{
len = mini_pad(ptr, len, pad_char, pad_to, bf);
len = _putsAscii(bf, len, buf);
} else
{
len = _putsAscii(ptr, len, buf);
}
break;
case 'S' : // preproc encoded string handler
ptr = va_arg(va, char*);
len = StringLength(ptr);
if (pad_to > 0)
{
len = mini_pad(ptr, len, pad_char, pad_to, bf);
len = _putsEncoded(bf, len, buf);
} else
{
len = _putsEncoded(ptr, len, buf);
}
break;
default:
len = 1;
len = _putsAscii(&ch, len, buf);
break;
}
}
n = n + len;
}
end:
return n;
}
#endif
#endif
+2 -2
View File
@@ -210,8 +210,8 @@ static void SpriteCB_Start(struct Sprite *sprite)
}
}
static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.gbapal");
static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.4bpp.lz");
static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.gbapal");
static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.4bpp.lz");
static void Load321StartGfx(u16 tilesTag, u16 palTag)
{
+1 -1
View File
@@ -242,7 +242,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
void *mailPtr = (void *)(data + sizeof(struct Pokemon));
pokemon = *(struct Pokemon *)pokemonPtr;
species = GetMonData(&pokemon, MON_DATA_SPECIES2);
species = GetMonData(&pokemon, MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_EGG)
StringCopyN(gStringVar1, gText_EggNickname, POKEMON_NAME_LENGTH + 1);
+3 -3
View File
@@ -722,7 +722,7 @@ static void Task_NewGameScene(u8 taskId)
break;
case 1:
sOakSpeechResources = AllocZeroed(sizeof(*sOakSpeechResources));
OakSpeechNidoranFSetup(1, TRUE);
CreateMonSpritesGfxManager(1, 1);
break;
case 2:
SetGpuReg(REG_OFFSET_WIN0H, 0);
@@ -1775,7 +1775,7 @@ static void Task_OakSpeech_WaitForFade(u8 taskId)
static void Task_OakSpeech_FreeResources(u8 taskId)
{
FreeAllWindowBuffers();
OakSpeechNidoranFFreeResources();
DestroyMonSpritesGfxManager();
Free(sOakSpeechResources);
sOakSpeechResources = NULL;
gTextFlags.canABSpeedUpPrint = FALSE;
@@ -1876,7 +1876,7 @@ static void CreateNidoranFSprite(u8 taskId)
{
u8 spriteId;
DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], OakSpeechNidoranFGetBuffer(0), SPECIES_NIDORAN_F);
DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], MonSpritesGfxManager_GetSpritePtr(0), SPECIES_NIDORAN_F);
LoadCompressedSpritePaletteUsingHeap(&gMonPaletteTable[SPECIES_NIDORAN_F]);
SetMultiuseSpriteTemplateToPokemon(SPECIES_NIDORAN_F, 0);
spriteId = CreateSprite(&gMultiuseSpriteTemplate, 96, 96, 1);
+1 -1
View File
@@ -130,7 +130,7 @@ static const struct BgTemplate sOptionMenuBgTemplates[] =
},
};
static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/unk_83cc2e4.gbapal");
static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/option_menu.gbapal");
static const u16 sOptionMenuItemCounts[MENUITEM_COUNT] = {3, 2, 2, 2, 3, 10, 0};
static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] =
+25 -25
View File
@@ -110,7 +110,7 @@ enum
struct PartyMenuBoxInfoRects
{
void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg);
void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP);
u8 dimensions[24];
u8 descTextLeft;
u8 descTextTop;
@@ -145,8 +145,8 @@ struct PartyMenuBox
u8 statusSpriteId;
};
static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg);
static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg);
static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP);
static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP);
static void CursorCB_Summary(u8 taskId);
static void CursorCB_Switch(u8 taskId);
static void CursorCB_Cancel1(u8 taskId);
@@ -2184,35 +2184,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *tileNums, u8 menuBoxW
}
}
static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg)
static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP)
{
if (width == 0 && height == 0)
{
width = 10;
height = 7;
}
if (!isEgg)
BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height);
if (!hideHP)
BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height);
else
BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height);
BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height);
}
static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg)
static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP)
{
if (width == 0 && height == 0)
{
width = 18;
height = 3;
}
if (!isEgg)
BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height);
if (!hideHP)
BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height);
else
BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height);
BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height);
}
static void DrawEmptySlot(u8 windowId)
{
BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3);
BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3);
}
#define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \
@@ -2652,7 +2652,7 @@ static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *m
// If in a multi battle, show partners Deoxys icon as Normal forme
if (IsMultiBattle() == TRUE && gMain.inBattle)
handleDeoxys = (sMultiBattlePartnersPartyMask[slot] ^ handleDeoxys) ? TRUE : FALSE;
species2 = GetMonData(mon, MON_DATA_SPECIES2);
species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, handleDeoxys);
UpdatePartyMonHPBar(menuBox->monSpriteId, mon);
}
@@ -3357,8 +3357,8 @@ static void SetSwitchedPartyOrderQuestLogEvent(void)
{
struct QuestLogEvent_SwitchedPartyOrder * data = Alloc(sizeof(*data));
data->species1 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
data->species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES2);
data->species1 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
data->species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES_OR_EGG);
SetQuestLogEvent(QL_EVENT_SWITCHED_PARTY_ORDER, (const u16 *)data);
Free(data);
}
@@ -3847,11 +3847,11 @@ static void CursorCB_Store(u8 taskId)
// Register mon for the Trading Board in Union Room
static void CursorCB_Register(u8 taskId)
{
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal))
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter))
{
case CANT_REGISTER_MON:
StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow);
@@ -3874,10 +3874,10 @@ static void CursorCB_Register(u8 taskId)
static void CursorCB_Trade1(u8 taskId)
{
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal);
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter);
if (stringId != UR_TRADE_MSG_NONE)
{
@@ -4133,7 +4133,7 @@ static void SetSwappedHeldItemQuestLogEvent(struct Pokemon *mon, u16 item, u16 i
{
struct QuestLogEvent_SwappedHeldItem *data = Alloc(sizeof(*data));
data->species = GetMonData(mon, MON_DATA_SPECIES2);
data->species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
data->takenItemId = item;
data->givenItemId = item2;
if (gPartyMenu.action == PARTY_ACTION_GIVE_PC_ITEM)
@@ -4147,7 +4147,7 @@ static void SetUsedFieldMoveQuestLogEvent(struct Pokemon *mon, u8 fieldMove)
{
struct QuestLogEvent_FieldMove *data = Alloc(sizeof(*data));
data->species = GetMonData(mon, MON_DATA_SPECIES2);
data->species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
data->fieldMove = fieldMove;
switch (data->fieldMove)
{
@@ -4181,7 +4181,7 @@ void SetUsedFlyQuestLogEvent(const u8 *healLocCtrlData)
Free(map);
data = Alloc(sizeof(*data));
data->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES2);
data->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES_OR_EGG);
data->fieldMove = FIELD_MOVE_FLY;
data->mapSec = mapHeader->regionMapSectionId;
SetQuestLogEvent(QL_EVENT_USED_FIELD_MOVE, (const u16 *)data);
@@ -5336,7 +5336,7 @@ u8 GetItemEffectType(u16 item)
itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
itemEffect = gItemEffectTable[item - ITEM_POTION];
if ((itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_MIST))
if ((itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_GUARD_SPEC))
return ITEM_EFFECT_X_ITEM;
else if (itemEffect[0] & ITEM0_SACRED_ASH)
return ITEM_EFFECT_SACRED_ASH;
+6 -6
View File
@@ -1555,10 +1555,10 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y)
if (caught)
{
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y);
type1 = gBaseStats[species].type1;
type1 = gSpeciesInfo[species].types[0];
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y);
if (type1 != gBaseStats[species].type2)
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gBaseStats[species].type2 + 1, 0x98, y);
if (type1 != gSpeciesInfo[species].types[1])
BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gSpeciesInfo[species].types[1] + 1, 0x98, y);
}
}
@@ -3091,9 +3091,9 @@ u8 DexScreen_DrawMonAreaPage(void)
if (monIsCaught)
{
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type1, 0, 1);
if (gBaseStats[species].type1 != gBaseStats[species].type2)
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type2, 32, 1);
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[0], 0, 1);
if (gSpeciesInfo[species].types[0] != gSpeciesInfo[species].types[1])
BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[1], 32, 1);
}
PutWindowTilemap(sPokedexScreenData->windowIds[12]);
CopyWindowToVram(sPokedexScreenData->windowIds[12], COPYWIN_GFX);
+870 -714
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2692,7 +2692,7 @@ void IsPokemonJumpSpeciesInParty(void)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES))
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (IsSpeciesAllowedInPokemonJump(species))
{
gSpecialVar_Result = TRUE;
+22 -22
View File
@@ -49,16 +49,16 @@ static void Task_LevelUpVerticalSprites(u8 taskId);
static void CreateLevelUpVerticalSprite(u8 taskId, s16 *data);
static void SpriteCB_LevelUpVertical(struct Sprite *sprite);
static const u16 sBgPals_PSA_Any[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845963C.gbapal");
static const u16 sBgPals_PSA_Anim4[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845965C.gbapal");
static const u32 sBg3Tiles_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845967C.4bpp.lz");
static const u32 sBg3Map_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845973C.bin.lz");
static const u16 sSpritePals_LevelUpVertical[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459868.gbapal");
static const u32 sSpriteTiles_LevelUpVertical[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459888.4bpp.lz");
static const u16 sSpritePals_Star[] = INCBIN_U16("graphics/pokemon_special_anim/unk_84598A4.gbapal");
static const u32 sSpriteTiles_Star[] = INCBIN_U32("graphics/pokemon_special_anim/unk_84598C4.4bpp.lz");
static const u16 sSpritePals_UseItem_OutwardSpiralDots[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459940.gbapal");
static const u32 sSpriteTiles_UseItem_OutwardSpiralDots[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459960.4bpp.lz");
static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg.gbapal");
static const u16 sBg_TmHm_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg_tm_hm.gbapal");
static const u32 sBg_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/bg.4bpp.lz");
static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/pokemon_special_anim/bg.bin.lz");
static const u16 sLevelUp_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/level_up.gbapal");
static const u32 sLevelUp_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/level_up.4bpp.lz");
static const u16 sStar_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/star.gbapal");
static const u32 sStar_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/star.4bpp.lz");
static const u16 sOutwardSpiralDots_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/outward_spiral_dots.gbapal");
static const u32 sOutwardSpiralDots_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/outward_spiral_dots.4bpp.lz");
static const struct BgTemplate sBgTemplates[] = {
{
@@ -98,7 +98,7 @@ static const u8 *const s1_2_and_Poof_textPtrs[] = {
gText_Poof,
};
static const u16 sUnref_84599A4[] = {
static const u16 sUnusedArray[] = {
0, 16, 68
};
@@ -116,24 +116,24 @@ static const s8 sStarCoordOffsets[][2] = {
};
static const struct CompressedSpriteSheet sSpriteSheet_Star = {
sSpriteTiles_Star,
sStar_Gfx,
0x80,
2
};
static const struct SpritePalette sSpritePalette_Star = {
sSpritePals_Star,
sStar_Pal,
2
};
static const struct CompressedSpriteSheet sSpriteSheet_UseItem_OutwardSpiralDots = {
sSpriteTiles_UseItem_OutwardSpiralDots,
sOutwardSpiralDots_Gfx,
0x60,
5
};
static const struct SpritePalette sSpritePalette_UseItem_OutwardSpiralDots = {
sSpritePals_UseItem_OutwardSpiralDots,
sOutwardSpiralDots_Pal,
5
};
@@ -633,12 +633,12 @@ bool8 PSA_IsCopyingLevelUpWindowToVram(void)
static void LoadBgGfxByAnimType(u16 animType)
{
CopyToBgTilemapBuffer(3, sBg3Map_PSA, 0, 0x000);
DecompressAndCopyTileDataToVram(3, sBg3Tiles_PSA, 0, 0x000, 0);
CopyToBgTilemapBuffer(3, sBg_Tilemap, 0, 0x000);
DecompressAndCopyTileDataToVram(3, sBg_Gfx, 0, 0x000, 0);
if (animType != 4)
LoadPalette(sBgPals_PSA_Any, 0x00, 0x20);
LoadPalette(sBg_Pal, 0x00, 0x20);
else
LoadPalette(sBgPals_PSA_Anim4, 0x00, 0x20);
LoadPalette(sBg_TmHm_Pal, 0x00, 0x20);
}
void PSA_CreateMonSpriteAtCloseness(u8 closeness)
@@ -1382,9 +1382,9 @@ void CreateLevelUpVerticalSpritesTask(u16 x, u16 y, u16 tileTag, u16 paletteTag,
static struct SpritePalette spritePalette;
u8 taskId;
spriteSheet.tag = tileTag;
spriteSheet.data = sSpriteTiles_LevelUpVertical;
spriteSheet.size = sSpriteTiles_LevelUpVertical[0] >> 8;
spritePalette.data = sSpritePals_LevelUpVertical;
spriteSheet.data = sLevelUp_Gfx;
spriteSheet.size = sLevelUp_Gfx[0] >> 8;
spritePalette.data = sLevelUp_Pal;
spritePalette.tag = paletteTag;
LoadCompressedSpriteSheet(&spriteSheet);
LoadSpritePalette(&spritePalette);
+2 -2
View File
@@ -1031,7 +1031,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
{
struct Pokemon *mon = (struct Pokemon *)pokemon;
gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2);
gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
if (gStorage->displayMonSpecies != SPECIES_NONE)
{
sanityIsBagEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG);
@@ -1054,7 +1054,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
{
struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon;
gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2);
gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES_OR_EGG);
if (gStorage->displayMonSpecies != SPECIES_NONE)
{
u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID);
+6 -6
View File
@@ -298,7 +298,7 @@ static u8 GetMonIconPriorityByCursorArea(void)
void CreateMovingMonIcon(void)
{
u32 personality = GetMonData(&gStorage->movingMon, MON_DATA_PERSONALITY);
u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES2);
u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES_OR_EGG);
u8 priority = GetMonIconPriorityByCursorArea();
gStorage->movingMonSprite = CreateMonIconSprite(species, personality, 0, 0, priority, 7);
@@ -318,7 +318,7 @@ static void InitBoxMonSprites(u8 boxId)
{
for (j = 0; j < IN_BOX_COLUMNS; j++)
{
species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2);
species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
personality = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY);
@@ -344,7 +344,7 @@ static void InitBoxMonSprites(u8 boxId)
void CreateBoxMonIconAtPos(u8 boxPosition)
{
u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
@@ -567,7 +567,7 @@ static void SetBoxSpeciesAndPersonalities(u8 boxId)
{
for (j = 0; j < IN_BOX_COLUMNS; j++)
{
gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2);
gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG);
if (gStorage->boxSpecies[boxPosition] != SPECIES_NONE)
gStorage->boxPersonalities[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY);
boxPosition++;
@@ -597,14 +597,14 @@ void SetBoxMonIconObjMode(u8 boxPosition, u8 objMode)
void CreatePartyMonsSprites(bool8 visible)
{
u16 i, count;
u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG);
u32 personality = GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY);
gStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12);
count = 1;
for (i = 1; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
+2 -2
View File
@@ -400,7 +400,7 @@ static void MultiMove_DeselectRow(u8 row, u8 minColumn, u8 maxColumn)
static void MultiMove_SetIconToBg(u8 x, u8 y)
{
u8 position = x + (IN_BOX_COLUMNS * y);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG);
u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY);
if (species != SPECIES_NONE)
@@ -414,7 +414,7 @@ static void MultiMove_SetIconToBg(u8 x, u8 y)
static void MultiMove_ClearIconFromBg(u8 x, u8 y)
{
u8 position = x + (IN_BOX_COLUMNS * y);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
FillWindowPixelRect8Bit(gStorage->multiMoveWindowId, PIXEL_FILL(0), 24 * x, 24 * y, 32, 32);
+2 -2
View File
@@ -2680,12 +2680,12 @@ static void SetPokeStorageQuestLogEvent(u8 action)
if (sInPartyMenu)
{
box2 = TOTAL_BOXES_COUNT;
species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES2);
species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES_OR_EGG);
}
else
{
box2 = StorageGetCurrentBox();
species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES2);
species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES_OR_EGG);
}
questLogData = &gStorage->questLogData;
+138 -139
View File
@@ -58,7 +58,7 @@ static void PokeSum_SetHelpContext(void);
static void Task_HandleInput_SelectMove(u8 id);
static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void);
static void PokeSum_CopyNewBgTilemapBeforePageFlip(void);
static void PokeSum_DrawBg3Tilemap(void);
static void PokeSum_DrawPageProgressTiles(void);
static void PokeSum_PrintRightPaneText(void);
static void PokeSum_PrintBottomPaneText(void);
static void PokeSum_PrintAbilityDataOrMoveTypes(void);
@@ -327,26 +327,25 @@ static EWRAM_DATA u8 sMoveSelectionCursorPos = 0;
static EWRAM_DATA u8 sMoveSwapCursorPos = 0;
static EWRAM_DATA struct MonPicBounceState * sMonPicBounceState = NULL;
extern const u32 gBgTilemap_TrainerMemo_Stats[];
extern const u32 gBgTilemap_PokeSum_MovesListForDelete[];
extern const u32 gBgTilemap_TrainerMemo_Details[];
extern const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[];
extern const u32 gBgTilemap_TrainerMemo_Egg[];
extern const u16 gTrainerMemoPal1[];
extern const u32 gPokeSumBgTiles[];
extern const u16 gPokeSummary_ExpBarPals[];
extern const u32 gPokeSummary_StatusAilmentIconTiles[];
extern const u16 gPokeSummary_StatusAilmentIconPals[];
extern const u32 gPokeSummary_HpBarTiles[];
extern const u32 gPokeSummary_ExpBarTiles[];
extern const u16 gPokeSummary_ExpBarPals[];
extern const u32 gSummaryScreen_PageSkills_Tilemap[];
extern const u32 gSummaryScreen_PageMoves_Tilemap[];
extern const u32 gSummaryScreen_PageInfo_Tilemap[];
extern const u32 gSummaryScreen_PageMovesInfo_Tilemap[];
extern const u32 gSummaryScreen_PageEgg_Tilemap[];
extern const u16 gSummaryScreen_Bg_Pal[];
extern const u32 gSummaryScreen_Bg_Gfx[];
extern const u16 gSummaryScreen_HpExpBar_Pal[];
extern const u32 gSummaryScreen_StatusAilmentIcon_Gfx[];
extern const u16 gSummaryScreen_StatusAilmentIcon_Pal[];
extern const u32 gSummaryScreen_HpBar_Gfx[];
extern const u32 gSummaryScreen_ExpBar_Gfx[];
static const u32 sBgPal7[] = INCBIN_U32("graphics/interface/pokesummary_unk_84636C0.gbapal");
static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/interface/pokesummary_unk_84636E0.gbapal");
static const u32 sBgPal8[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463700.gbapal");
static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463720.gbapal");
static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463740.4bpp.lz");
static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/interface/pokesummary_unk_846386C.4bpp.lz");
static const u32 sTextHeaderPalette[] = INCBIN_U32("graphics/summary_screen/text_header.gbapal");
static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/summary_screen/marking.gbapal");
static const u32 sTextMovesPalette[] = INCBIN_U32("graphics/summary_screen/text_moves.gbapal");
static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/summary_screen/move_selection_cursor.gbapal");
static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_left.4bpp.lz");
static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_right.4bpp.lz");
static const struct OamData sMoveSelectionCursorOamData =
{
@@ -560,8 +559,8 @@ static const union AnimCmd * const sHpOrExpBarAnimTable[] =
sHpOrExpAnim_11
};
static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463AAC.gbapal");
static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463ACC.gbapal");
static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/summary_screen/hp_bar_yellow.gbapal");
static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/summary_screen/hp_bar_red.gbapal");
static const struct OamData sPokerusIconObjOamData = {
.y = 0,
@@ -589,8 +588,8 @@ static const union AnimCmd * const sPokerusIconObjAnimTable[] =
sPokerusIconObjAnim0
};
static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463B00.gbapal");
static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463B20.4bpp.lz");
static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/summary_screen/pokerus_cured.gbapal");
static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/summary_screen/pokerus_cured.4bpp.lz");
static const struct OamData sStarObjOamData =
{
@@ -619,10 +618,10 @@ static const union AnimCmd * const sStarObjAnimTable[] =
sStarObjAnim0
};
static const u16 sStarObjPal[] = INCBIN_U16( "graphics/interface/pokesummary_unk_8463B44.gbapal");
static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B64.4bpp.lz");
static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B88.bin.lz");
static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463C80.bin.lz");
static const u16 sStarObjPal[] = INCBIN_U16( "graphics/summary_screen/shiny_star.gbapal");
static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/summary_screen/shiny_star.4bpp.lz");
static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/summary_screen/moves_info_page.bin.lz");
static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/summary_screen/moves_page.bin.lz");
#include "data/text/nature_names.h"
@@ -959,7 +958,7 @@ static const s8 sEggPicShakeXDelta_AlmostReadyToHatch[] =
static const u16 * const sHpBarPals[] =
{
gPokeSummary_ExpBarPals,
gSummaryScreen_HpExpBar_Pal,
sPokeSummary_HpBarPalYellow,
sPokeSummary_HpBarPalRed,
};
@@ -1262,7 +1261,7 @@ static void Task_PokeSum_FlipPages(u8 taskId)
case 2:
PokeSum_CopyNewBgTilemapBeforePageFlip_2();
PokeSum_CopyNewBgTilemapBeforePageFlip();
PokeSum_DrawBg3Tilemap();
PokeSum_DrawPageProgressTiles();
PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex);
break;
case 3:
@@ -1358,7 +1357,7 @@ static void Task_FlipPages_FromInfo(u8 taskId)
PokeSum_HideSpritesBeforePageFlip();
PokeSum_UpdateWin1ActiveFlag(sMonSummaryScreen->curPageIndex);
PokeSum_CopyNewBgTilemapBeforePageFlip();
PokeSum_DrawBg3Tilemap();
PokeSum_DrawPageProgressTiles();
PokeSum_CopyNewBgTilemapBeforePageFlip_2();
break;
case 3:
@@ -1510,7 +1509,7 @@ static void Task_BackOutOfSelectMove(u8 taskId)
break;
case 10:
PokeSum_CopyNewBgTilemapBeforePageFlip();
PokeSum_DrawBg3Tilemap();
PokeSum_DrawPageProgressTiles();
CopyBgTilemapBufferToVram(3);
PokeSum_ShowSpritesBeforePageFlip();
break;
@@ -1838,24 +1837,24 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void)
switch (newPage)
{
case PSS_PAGE_INFO:
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
break;
case PSS_PAGE_SKILLS:
if (sMonSummaryScreen->pageFlipDirection == 1)
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0);
else
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0);
break;
case PSS_PAGE_MOVES:
if (sMonSummaryScreen->pageFlipDirection == 1)
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0);
else
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
break;
case PSS_PAGE_MOVES_INFO:
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0);
break;
}
}
@@ -1872,7 +1871,7 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip(void)
switch (newPage)
{
case PSS_PAGE_INFO:
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
break;
case PSS_PAGE_SKILLS:
break;
@@ -1933,22 +1932,22 @@ static void CB2_SetUpPSS(void)
else
CopyToBgTilemapBuffer(3, sBgTilemap_MovesInfoPage, 0, 0);
PokeSum_DrawBg3Tilemap();
PokeSum_DrawPageProgressTiles();
break;
case 11:
if (sMonSummaryScreen->isEgg)
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0);
else
{
if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE || sMonSummaryScreen->mode == PSS_MODE_FORGET_MOVE)
{
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0);
}
else
{
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
}
}
@@ -2007,28 +2006,28 @@ static u8 PokeSum_HandleLoadBgGfx(void)
switch (sMonSummaryScreen->loadBgGfxStep)
{
case 0:
LoadPalette(gTrainerMemoPal1, 0, 0x20 * 5);
LoadPalette(gSummaryScreen_Bg_Pal, 0, 0x20 * 5);
if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg)
{
LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20);
LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20);
}
else
{
LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20);
LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20);
}
break;
case 1:
ListMenuLoadStdPalAt(0x60, 1);
LoadPalette(sBgPal7, 0x70, 0x20);
LoadPalette(sTextHeaderPalette, 0x70, 0x20);
break;
case 2:
ResetTempTileDataBuffers();
break;
case 3:
DecompressAndCopyTileDataToVram(2, gPokeSumBgTiles, 0, 0, 0);
DecompressAndCopyTileDataToVram(2, gSummaryScreen_Bg_Gfx, 0, 0, 0);
break;
case 4:
if (FreeTempTileDataBuffersIfPossible() == TRUE)
@@ -2040,7 +2039,7 @@ static u8 PokeSum_HandleLoadBgGfx(void)
break;
default:
LoadPalette(sBgPal8, 0x80, 0x20);
LoadPalette(sTextMovesPalette, 0x80, 0x20);
return TRUE;
}
@@ -2105,15 +2104,15 @@ static void BufferMonInfo(void)
return;
}
sMonSummaryScreen->monTypes[0] = gBaseStats[dexNum].type1;
sMonSummaryScreen->monTypes[1] = gBaseStats[dexNum].type2;
sMonSummaryScreen->monTypes[0] = gSpeciesInfo[dexNum].types[0];
sMonSummaryScreen->monTypes[1] = gSpeciesInfo[dexNum].types[1];
GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_NICKNAME, tempStr);
StringCopyN_Multibyte(sMonSummaryScreen->summary.nicknameStrBuf, tempStr, POKEMON_NAME_LENGTH);
StringGet_Nickname(sMonSummaryScreen->summary.nicknameStrBuf);
gender = GetMonGender(&sMonSummaryScreen->currentMon);
dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
if (gender == MON_FEMALE)
StringCopy(sMonSummaryScreen->summary.genderSymbolStrBuf, gText_FemaleSymbol);
@@ -2224,7 +2223,7 @@ static void BufferMonSkills(void)
if (level < 100)
{
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES);
expToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - exp;
expToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - exp;
}
ConvertIntToDecimalStringN(sMonSummaryScreen->summary.expToNextLevelStrBuf, expToNextLevel, STR_CONV_MODE_LEFT_ALIGN, 7);
@@ -2646,7 +2645,7 @@ static void PokeSum_PrintTrainerMemo_Mon_HeldByOT(void)
// but Japanese uses different grammar for Bold and Gentle natures.
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // Hatched
{
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
{
if (PokeSum_IsMonBoldOrGentle(nature))
DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_FatefulEncounterHatched_BoldGentleGrammar);
@@ -2743,7 +2742,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void)
// but Japanese uses different grammar for Bold and Gentle natures.
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // hatched from an EGG
{
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
{
if (PokeSum_IsMonBoldOrGentle(nature))
DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_ApparentlyFatefulEncounterHatched_BoldGentleGrammar);
@@ -2797,7 +2796,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void)
if (sMonSummaryScreen->monList.mons != gEnemyParty)
{
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1)
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
chosenStrIndex = 4;
else
{
@@ -2815,7 +2814,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void)
}
else
{
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1)
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
chosenStrIndex = 4;
else
{
@@ -3272,86 +3271,86 @@ static u8 PokeSum_BufferOtName_IsEqualToCurrentOwner(struct Pokemon * mon)
return TRUE;
}
#define SUB_8138538_BASE_TILE_NUM (345)
#define PAGE_PROGRESS_BASE_TILE_NUM (345)
static void PokeSum_DrawBg3Tilemap(void)
static void PokeSum_DrawPageProgressTiles(void)
{
switch (sMonSummaryScreen->curPageIndex)
{
case PSS_PAGE_INFO:
if (!sMonSummaryScreen->isEgg)
{
FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 20 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 36 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 20 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 36 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0);
}
else
{
FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 2 + SUB_8138538_BASE_TILE_NUM, 15, 0, 4, 2, 0);
FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 2 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 4, 2, 0);
}
break;
case PSS_PAGE_SKILLS:
FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0);
break;
case PSS_PAGE_MOVES:
FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0);
break;
case PSS_PAGE_MOVES_INFO:
if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE)
{
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 13, 0, 4, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 13, 1, 4, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 4, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 4, 1, 0);
}
else
{
FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0);
}
FillBgTilemapBufferRect(3, 50 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 66 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 50 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 66 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0);
FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0);
FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0);
break;
}
}
@@ -4014,7 +4013,7 @@ static void PokeSum_CreateMonPicSprite(void)
sMonPicBounceState = AllocZeroed(sizeof(struct MonPicBounceState));
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY);
trainerId = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_OT_ID);
@@ -4142,7 +4141,7 @@ static void PokeSum_CreateMonIconSprite(void)
u16 species;
u32 personality;
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY);
SafeLoadMonIconPalette(species);
@@ -4178,7 +4177,7 @@ static void PokeSum_ShowOrHideMonIconSprite(bool8 invisible)
static void PokeSum_DestroyMonIconSprite(void)
{
u16 species;
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
SafeFreeMonIconPalette(species);
DestroyMonIcon(&gSprites[sMonSummaryScreen->monIconSpriteId]);
}
@@ -4309,7 +4308,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag)
sStatusIcon = AllocZeroed(sizeof(struct MonStatusIconObj));
gfxBufferPtr = AllocZeroed(0x20 * 32);
LZ77UnCompWram(gPokeSummary_StatusAilmentIconTiles, gfxBufferPtr);
LZ77UnCompWram(gSummaryScreen_StatusAilmentIcon_Gfx, gfxBufferPtr);
if (sStatusIcon != NULL)
{
@@ -4319,7 +4318,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag)
.tag = tileTag
};
struct SpritePalette palette = {.data = gPokeSummary_StatusAilmentIconPals, .tag = palTag};
struct SpritePalette palette = {.data = gSummaryScreen_StatusAilmentIcon_Pal, .tag = palTag};
struct SpriteTemplate template = {
.tileTag = tileTag,
.paletteTag = palTag,
@@ -4401,7 +4400,7 @@ static void CreateHpBarObjs(u16 tileTag, u16 palTag)
sHpBarObjs = AllocZeroed(sizeof(struct HpBarObjs));
gfxBufferPtr = AllocZeroed(0x20 * 12);
LZ77UnCompWram(gPokeSummary_HpBarTiles, gfxBufferPtr);
LZ77UnCompWram(gSummaryScreen_HpBar_Gfx, gfxBufferPtr);
curHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_HP);
maxHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MAX_HP);
@@ -4559,7 +4558,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag)
sExpBarObjs = AllocZeroed(sizeof(struct ExpBarObjs));
gfxBufferPtr = AllocZeroed(0x20 * 12);
LZ77UnCompWram(gPokeSummary_ExpBarTiles, gfxBufferPtr);
LZ77UnCompWram(gSummaryScreen_ExpBar_Gfx, gfxBufferPtr);
if (gfxBufferPtr != NULL)
{
struct SpriteSheet sheet = {
@@ -4568,7 +4567,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag)
.tag = tileTag
};
struct SpritePalette palette = {.data = gPokeSummary_ExpBarPals, .tag = palTag};
struct SpritePalette palette = {.data = gSummaryScreen_HpExpBar_Pal, .tag = palTag};
LoadSpriteSheet(&sheet);
LoadSpritePalette(&palette);
}
@@ -4622,8 +4621,8 @@ static void UpdateExpBarObjs(void)
if (level < 100)
{
totalExpToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - gExperienceTables[gBaseStats[species].growthRate][level];
curExpToNextLevel = exp - gExperienceTables[gBaseStats[species].growthRate][level];
totalExpToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - gExperienceTables[gSpeciesInfo[species].growthRate][level];
curExpToNextLevel = exp - gExperienceTables[gSpeciesInfo[species].growthRate][level];
pointsPerTile = ((totalExpToNextLevel << 2) / 8);
totalPoints = (curExpToNextLevel << 2);
@@ -5079,13 +5078,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId)
if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg)
{
LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20);
LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20);
}
else
{
LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20);
LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20);
LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20);
}
sMonSummaryScreen->switchMonTaskState++;
@@ -5095,13 +5094,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId)
{
if (sMonSummaryScreen->isEgg)
{
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
}
else
{
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0);
CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0);
}
}
sMonSummaryScreen->switchMonTaskState++;
@@ -5130,7 +5129,7 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId)
break;
case 9:
PokeSum_PrintMonTypeIcons();
PokeSum_DrawBg3Tilemap();
PokeSum_DrawPageProgressTiles();
PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex);
sMonSummaryScreen->switchMonTaskState++;
break;
@@ -5183,9 +5182,9 @@ static void PokeSum_TryPlayMonCry(void)
if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG))
{
if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE)
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL);
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_NORMAL);
else
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK);
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_WEAK);
}
}
+2 -2
View File
@@ -61,7 +61,7 @@ struct GFRomHeader
u32 externalEventFlagsOffset;
u32 externalEventDataOffset;
u32 unk18;
const struct BaseStats * baseStats;
const struct SpeciesInfo * speciesInfo;
const u8 (* abilityNames)[];
const u8 *const * abilityDescriptions;
const struct Item * items;
@@ -146,7 +146,7 @@ static const struct GFRomHeader sGFRomHeader = {
.externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags),
.externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData),
.unk18 = 0x00000000,
.baseStats = gBaseStats,
.speciesInfo = gSpeciesInfo,
.abilityNames = gAbilityNames,
.abilityDescriptions = gAbilityDescriptionPointers,
.items = gItems,
+1
View File
@@ -7,6 +7,7 @@
#include "link.h"
#include "save_failed_screen.h"
#include "fieldmap.h"
#include "pokemon_storage_system.h"
#include "gba/flash_internal.h"
static u8 HandleWriteSector(u16 sectorId, const struct SaveSectorLocation *locations);
+6 -6
View File
@@ -2222,21 +2222,21 @@ bool8 ScrCmd_normalmsg(struct ScriptContext * ctx)
return FALSE;
}
// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it.
bool8 ScrCmd_setmoneventlegal(struct ScriptContext * ctx)
// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it.
bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext * ctx)
{
bool8 isEventLegal = TRUE;
bool8 isModernFatefulEncounter = TRUE;
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal);
SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
return FALSE;
}
bool8 ScrCmd_checkmoneventlegal(struct ScriptContext * ctx)
bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext * ctx)
{
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL);
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
return FALSE;
}
+287 -256
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -109,7 +109,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item)
for(i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item)
return TRUE;
}
+435 -365
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -95,7 +95,7 @@ static u8 TeachyTvGrassAnimationCheckIfNeedsToGenerateGrassObj(s16 x, s16 y);
static void TeachyTvGrassAnimationObjCallback(struct Sprite *sprite);
static void TeachyTvRestorePlayerPartyCallback(void);
static void TeachyTvPreBattleAnimAndSetBattleCallback(u8 taskId);
static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size);
static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size);
static void TeachyTvPushBackNewMapPalIndexArrayEntry(const struct MapLayout *mStruct, u16 *buf1, u8 *palIndexArray, u16 mapEntry, u16 offset);
static void TeachyTvComputeMapTilesFromTilesetAndMetaTiles(const u16 *metaTilesArray, u8 *blockBuf, u8 *tileset);
static void TeachyTvComputeSingleMapTileBlockFromTilesetAndMetaTiles(u8 *blockBuf, u8 *tileset, u8 metaTile);
@@ -1276,7 +1276,7 @@ static void TeachyTvLoadBg3Map(u16 *buffer)
Free(blockIndicesBuffer);
}
static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size)
static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size)
{
if (ts)
{
+15 -15
View File
@@ -948,7 +948,7 @@ static void CB2_CreateTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++)
{
struct Pokemon * mon = &gPlayerParty[i];
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2),
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i][0] * 8) + 14,
(sTradeMonSpriteCoords[i][1] * 8) - 12,
@@ -960,7 +960,7 @@ static void CB2_CreateTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++)
{
struct Pokemon * mon = &gEnemyParty[i];
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL),
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14,
(sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12,
@@ -1145,7 +1145,7 @@ void CB2_ReturnToTradeMenuFromSummary(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++)
{
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(
GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL),
GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
sTradeMonSpriteCoords[i][0] * 8 + 14,
sTradeMonSpriteCoords[i][1] * 8 - 12,
@@ -1157,7 +1157,7 @@ void CB2_ReturnToTradeMenuFromSummary(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++)
{
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(
GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL),
GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8 + 14,
sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8 - 12,
@@ -1964,7 +1964,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 cursor
// Partner cant trade illegitimate Deoxys or Mew
partnerSpecies = GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_SPECIES);
if ((partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW)
&& !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_EVENT_LEGAL))
&& !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
return PARTNER_MON_INVALID;
if (hasLiveMon != 0)
@@ -2747,7 +2747,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int
for (i = 0; i < partyCount; i++)
{
species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES2);
species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES_OR_EGG);
species[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES);
}
@@ -2790,7 +2790,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int
if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW)
{
if (!GetMonData(&playerParty[monIdx], MON_DATA_EVENT_LEGAL))
if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
return CANT_TRADE_INVALID_MON;
}
@@ -2855,17 +2855,17 @@ s32 GetGameProgressForLinkTrade(void)
return TRADE_BOTH_PLAYERS_READY;
}
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal)
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter)
{
if (species == SPECIES_DEOXYS || species == SPECIES_MEW)
{
if (!isEventLegal)
if (!isModernFatefulEncounter)
return TRUE;
}
return FALSE;
}
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal)
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter)
{
bool8 playerHasNationalDex = player.hasNationalDex;
bool8 playerCanLinkNationally = player.canLinkNationally;
@@ -2890,7 +2890,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
}
// Cannot trade illegitimate Deoxys/Mew
if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal))
if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter))
return UR_TRADE_MSG_MON_CANT_BE_TRADED_2;
if (partnerSpecies == SPECIES_EGG)
@@ -2902,8 +2902,8 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
else
{
// Player's Pokémon must be of the type the partner requested
if (gBaseStats[playerSpecies2].type1 != requestedType
&& gBaseStats[playerSpecies2].type2 != requestedType)
if (gSpeciesInfo[playerSpecies2].types[0] != requestedType
&& gSpeciesInfo[playerSpecies2].types[1] != requestedType)
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
}
@@ -2933,11 +2933,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
return UR_TRADE_MSG_NONE;
}
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal)
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter)
{
bool8 hasNationalDex = player.hasNationalDex;
if (IsDeoxysOrMewUntradable(species, isEventLegal))
if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter))
return CANT_REGISTER_MON;
if (hasNationalDex)
+3 -3
View File
@@ -753,7 +753,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state)
{
case 0:
// Load graphics
species = GetMonData(mon, MON_DATA_SPECIES2);
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
if (whichParty == TRADE_PLAYER)
@@ -881,8 +881,8 @@ void CB2_LinkTrade(void)
case 10:
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
ShowBg(0);
sTradeAnim->questLogData.speciesSent = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES2);
sTradeAnim->questLogData.speciesReceived = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES2);
sTradeAnim->questLogData.speciesSent = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES_OR_EGG);
sTradeAnim->questLogData.speciesReceived = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES_OR_EGG);
memcpy(sTradeAnim->questLogData.partnerName, gLinkPlayers[GetMultiplayerId() ^ 1].name, PLAYER_NAME_LENGTH);
gMain.state++;
break;
+1 -1
View File
@@ -1030,7 +1030,7 @@ static s32 GetPartyMaxLevel(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG)
{
s32 currLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL);
if (currLevel > topLevel)
+7 -7
View File
@@ -4002,7 +4002,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
{
for (i = 0; i < gPlayerPartyCount; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_EGG)
return UR_TRADE_MATCH;
}
@@ -4012,8 +4012,8 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
{
for (i = 0; i < gPlayerPartyCount; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type)
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type)
return UR_TRADE_MATCH;
}
return UR_TRADE_NOTYPE;
@@ -4145,7 +4145,7 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void)
for (i = 0; i < gPlayerPartyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= UNION_ROOM_MAX_LEVEL
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
count++;
}
@@ -4174,7 +4174,7 @@ void Script_ResetUnionRoomTrade(void)
static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * trade)
{
trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2);
trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG);
trade->playerLevel = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
trade->playerPersonality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY);
if (trade->playerSpecies == SPECIES_EGG)
@@ -4185,7 +4185,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * tra
static void RegisterTradeMon(u32 monId, struct UnionRoomTrade * trade)
{
trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2);
trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG);
trade->level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
trade->personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY);
}
@@ -4217,7 +4217,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade * trade, u8 mul
cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
if (cur_personality != personality)
continue;
cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (cur_species != species)
continue;
response = i;
+12 -12
View File
@@ -119,9 +119,9 @@ static void InitScanlineEffect(void);
static void FillScanlineEffectWithValue1col(s16 a0);
static void FillScanlineEffectWithValue2col(s16 a0);
static const u16 sUnionRoomChatPanelBgPal_C[] = INCBIN_U16("graphics/union_room_chat/unk_845AA24.gbapal");
static const u16 sBg1Pal8[] = INCBIN_U16("graphics/union_room_chat/unk_845AA44.gbapal");
static const u16 sWin0PalF[] = INCBIN_U16("graphics/union_room_chat/unk_845AA64.gbapal");
static const u16 sUnionRoomChat_TextEntry_Pal[] = INCBIN_U16("graphics/union_room_chat/text_entry.gbapal");
static const u16 gUnionRoomChat_Unused_Pal[] = INCBIN_U16("graphics/union_room_chat/unused.gbapal"); // Loaded, but nothing uses it
static const u16 sUnionRoomChat_Messages_Pal[] = INCBIN_U16("graphics/union_room_chat/messages.gbapal");
static const struct BgTemplate sBgTemplates[] = {
{
@@ -1259,10 +1259,10 @@ static void ClearBg0(void)
static void LoadUnionRoomChatPanelGfx(void)
{
LoadPalette(gUnionRoomChatPanelBgPal_7, 0x70, 0x20);
LoadPalette(sUnionRoomChatPanelBgPal_C, 0xC0, 0x20);
DecompressAndCopyTileDataToVram(1, gUnionRoomChatPanelBgTiles, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnionRoomChatPanelBgMap, 0, 0);
LoadPalette(gUnionRoomChat_Panel_Pal, 0x70, 0x20);
LoadPalette(sUnionRoomChat_TextEntry_Pal, 0xC0, 0x20);
DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Panel_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnionRoomChat_Panel_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
}
@@ -1270,21 +1270,21 @@ static void LoadLinkMiscMenuGfx(void)
{
u8 *ptr;
LoadPalette(gLinkMiscMenu_Pal, 0, 0x20);
ptr = DecompressAndCopyTileDataToVram(2, gLinkMiscMenu_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(2, gLinkMiscMenu_Tilemap, 0, 0);
LoadPalette(gUnionRoomChat_Bg_Pal, 0, 0x20);
ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Bg_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(2, gUnionRoomChat_Bg_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(2);
}
static void LoadBg1Pal8(void)
{
LoadPalette(sBg1Pal8, 0x80, 0x20);
LoadPalette(gUnionRoomChat_Unused_Pal, 0x80, 0x20);
RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, DMA3_32BIT);
}
static void LoadWin0(void)
{
LoadPalette(sWin0PalF, 0xF0, 0x20);
LoadPalette(sUnionRoomChat_Messages_Pal, 0xF0, 0x20);
PutWindowTilemap(0);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
CopyWindowToVram(0, COPYWIN_FULL);
+43 -15
View File
@@ -4,6 +4,14 @@
#include "graphics.h"
#include "union_room_chat.h"
enum {
GFXTAG_SELECTOR_CURSOR,
GFXTAG_CHAR_SELECT_CURSOR,
GFXTAG_TEXT_ENTRY_CURSOR,
GFXTAG_R_BUTTON,
GFXTAG_ICONS,
};
struct UnionRoomChat3
{
struct Sprite *selectorCursorSprite;
@@ -19,18 +27,38 @@ static EWRAM_DATA struct UnionRoomChat3 *sWork = NULL;
static void SpriteCB_TextEntryCursor(struct Sprite *sprite);
static void SpriteCB_CharacterSelectCursor(struct Sprite *sprite);
static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/unk_845AC14.gbapal");
static const u32 sSelectorCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AC34.4bpp.lz");
static const u32 sHorizontalBarGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AEB8.4bpp.lz");
static const u32 sMenuCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AED8.4bpp.lz");
static const u32 sRButtonGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AF04.4bpp.lz");
static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/objects.gbapal");
static const u32 sSelectorCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/selector_cursor.4bpp.lz");
static const u32 sTextEntryCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/text_entry_cursor.4bpp.lz");
static const u32 sCharacterSelectCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/character_select_cursor.4bpp.lz");
static const u32 sRButton_Gfx[] = INCBIN_U32("graphics/union_room_chat/r_button.4bpp.lz");
static const struct CompressedSpriteSheet sSpriteSheets[] = {
{sSelectorCursorGfxTiles, 0x1000, 0},
{sMenuCursorGfxTiles, 0x0040, 1},
{sHorizontalBarGfxTiles, 0x0040, 2},
{sRButtonGfxTiles, 0x0080, 3},
{gUnionRoomChatIcons, 0x0400, 4}
{
.data = sSelectorCursor_Gfx,
.size = 128 * TILE_SIZE_4BPP,
.tag = GFXTAG_SELECTOR_CURSOR
},
{
.data = sCharacterSelectCursor_Gfx,
.size = 2 * TILE_SIZE_4BPP,
.tag = GFXTAG_CHAR_SELECT_CURSOR
},
{
.data = sTextEntryCursor_Gfx,
.size = 2 * TILE_SIZE_4BPP,
.tag = GFXTAG_TEXT_ENTRY_CURSOR
},
{
.data = sRButton_Gfx,
.size = 4 * TILE_SIZE_4BPP,
.tag = GFXTAG_R_BUTTON
},
{
.data = gUnionRoomChat_Icons_Gfx,
.size = 32 * TILE_SIZE_4BPP,
.tag = GFXTAG_ICONS
},
};
static const struct SpritePalette sSpritePalette = {
@@ -71,7 +99,7 @@ static const union AnimCmd *const sSpriteAnims_SelectorCursor[] = {
};
static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = {
.tileTag = 0,
.tileTag = GFXTAG_SELECTOR_CURSOR,
.paletteTag = 0,
.oam = &sOamData_64x32_1,
.anims = sSpriteAnims_SelectorCursor,
@@ -86,7 +114,7 @@ static const struct OamData sOamData_8x16_2 = {
};
static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = {
.tileTag = 2,
.tileTag = GFXTAG_TEXT_ENTRY_CURSOR,
.paletteTag = 0,
.oam = &sOamData_8x16_2,
.anims = gDummySpriteAnimTable,
@@ -95,7 +123,7 @@ static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = {
};
static const struct SpriteTemplate sSpriteTemplate_CharacterSelectCursor = {
.tileTag = 1,
.tileTag = GFXTAG_CHAR_SELECT_CURSOR,
.paletteTag = 0,
.oam = &sOamData_8x16_2,
.anims = gDummySpriteAnimTable,
@@ -143,7 +171,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnionRoomChatIcons[] = {
};
static const struct SpriteTemplate sSpriteTemplate_RButton = {
.tileTag = 3,
.tileTag = GFXTAG_R_BUTTON,
.paletteTag = 0,
.oam = &sOamData_16x16_2,
.anims = gDummySpriteAnimTable,
@@ -152,7 +180,7 @@ static const struct SpriteTemplate sSpriteTemplate_RButton = {
};
static const struct SpriteTemplate sSpriteTemplate_UnionRoomChatIcons = {
.tileTag = 4,
.tileTag = GFXTAG_ICONS,
.paletteTag = 0,
.oam = &sOamData_32x16_2,
.anims = sSpriteAnimTable_UnionRoomChatIcons,