Merge branch 'master' into pokenav_unk_2
This commit is contained in:
@@ -1364,24 +1364,24 @@ static void BattleAICmd_get_ability(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||
{
|
||||
// AI has no knowledge of opponent, so it guesses which ability.
|
||||
if (Random() & 1)
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
else
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2;
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability1; // It's definitely ability 1.
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; // It's definitely ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1412,15 +1412,15 @@ static void BattleAICmd_check_ability(void)
|
||||
{
|
||||
ability = gBattleMons[battlerId].ability;
|
||||
}
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].ability1 != ABILITY_NONE)
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability2 != ABILITY_NONE)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||
{
|
||||
u8 abilityDummyVariable = ability; // Needed to match.
|
||||
if (gBaseStats[gBattleMons[battlerId].species].ability1 != abilityDummyVariable
|
||||
&& gBaseStats[gBattleMons[battlerId].species].ability2 != abilityDummyVariable)
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != abilityDummyVariable
|
||||
&& gBaseStats[gBattleMons[battlerId].species].abilities[1] != abilityDummyVariable)
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1429,12 +1429,12 @@ static void BattleAICmd_check_ability(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability1;
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].ability2; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -93,7 +93,7 @@ static bool8 ShouldSwitchIfWonderGuard(void)
|
||||
continue;
|
||||
|
||||
GetMonData(&party[i], MON_DATA_SPECIES); // Unused return value.
|
||||
GetMonData(&party[i], MON_DATA_ALT_ABILITY); // Unused return value.
|
||||
GetMonData(&party[i], MON_DATA_ABILITY_NUM); // Unused return value.
|
||||
|
||||
for (opposingBattler = GetBattlerAtPosition(opposingPosition), j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
@@ -197,10 +197,10 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
continue;
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ALT_ABILITY) != 0)
|
||||
monAbility = gBaseStats[species].ability2;
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].ability1;
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
|
||||
if (absorbingTypeAbility == monAbility && Random() & 1)
|
||||
{
|
||||
@@ -392,10 +392,10 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
|
||||
continue;
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ALT_ABILITY) != 0)
|
||||
monAbility = gBaseStats[species].ability2;
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].ability1;
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
|
||||
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility);
|
||||
if (moveFlags & flags)
|
||||
|
||||
+17
-22
@@ -5315,21 +5315,19 @@ static void sub_8102D8C(s16 a, s16 b, s16* c, s16* d, s8 e)
|
||||
|
||||
static void sub_8102DE4(struct Sprite* sprite)
|
||||
{
|
||||
int b;
|
||||
s16 a;
|
||||
int c;
|
||||
s16 y, yDelta;
|
||||
u8 index;
|
||||
|
||||
sprite->data[0]++;
|
||||
b = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8);
|
||||
yDelta = sprite->data[0] * 5 - ((sprite->data[0] * 5 / 256) << 8);
|
||||
sprite->data[4] += sprite->data[6];
|
||||
sprite->data[5] += sprite->data[7];
|
||||
sprite->pos1.x = sprite->data[4] >> 4;
|
||||
sprite->pos1.y = sprite->data[5] >> 4;
|
||||
sprite->pos2.y = Sin(b, 15);
|
||||
a = (u16)sprite->pos1.y;
|
||||
c = (u16)sprite->pos1.x;
|
||||
sprite->pos2.y = Sin(yDelta, 15);
|
||||
|
||||
if ((u32)((c + 16) << 16) > (0x110) << 16 || a < -16 || a > 0x80)
|
||||
y = sprite->pos1.y;
|
||||
if (sprite->pos1.x < -16 || sprite->pos1.x > 256 || y < -16 || y > 128)
|
||||
{
|
||||
DestroySpriteAndMatrix(sprite);
|
||||
}
|
||||
@@ -5350,12 +5348,8 @@ static void sub_8102DE4(struct Sprite* sprite)
|
||||
|
||||
void sub_8102EB0(struct Sprite* sprite)
|
||||
{
|
||||
int a;
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
{
|
||||
a = gBattleAnimArgs[1];
|
||||
(u16)gBattleAnimArgs[1] = -a;
|
||||
}
|
||||
gBattleAnimArgs[1] *= -1;
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2];
|
||||
@@ -5541,8 +5535,8 @@ static void sub_8103300(struct Sprite* sprite)
|
||||
|
||||
static void sub_8103320(struct Sprite* sprite)
|
||||
{
|
||||
s16 temp;
|
||||
s16 temp2;
|
||||
s16 x1, x2;
|
||||
|
||||
sprite->data[1] += 4;
|
||||
if (sprite->data[1] > 254)
|
||||
{
|
||||
@@ -5564,20 +5558,21 @@ static void sub_8103320(struct Sprite* sprite)
|
||||
if (sprite->data[1] > 0x9F)
|
||||
sprite->subpriority = sprite->data[2];
|
||||
|
||||
temp = gSineTable[sprite->data[1]];
|
||||
sprite->pos2.x = (temp2 = temp >> 3) + (temp2 >> 1);
|
||||
x1 = gSineTable[sprite->data[1]];
|
||||
x2 = x1 >> 3;
|
||||
sprite->pos2.x = (x1 >> 3) + (x2 >> 1);
|
||||
}
|
||||
|
||||
void sub_8103390(struct Sprite* sprite)
|
||||
{
|
||||
u8 bank;
|
||||
u8 battler;
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
bank = gBattleAnimAttacker;
|
||||
battler = gBattleAnimAttacker;
|
||||
else
|
||||
bank = gBattleAnimTarget;
|
||||
battler = gBattleAnimTarget;
|
||||
|
||||
sub_810310C(bank, sprite);
|
||||
if (GetBattlerSide(bank) == B_SIDE_PLAYER)
|
||||
sub_810310C(battler, sprite);
|
||||
if (GetBattlerSide(battler) == B_SIDE_PLAYER)
|
||||
{
|
||||
StartSpriteAnim(sprite, 0);
|
||||
sprite->data[0] = 2;
|
||||
|
||||
@@ -2504,13 +2504,10 @@ void sub_815BE04(struct Sprite *sprite)
|
||||
|
||||
static void sub_815BF44(struct Sprite *sprite)
|
||||
{
|
||||
int var0;
|
||||
s8 var1;
|
||||
|
||||
var0 = (u16)sprite->data[2] + (u16)sprite->data[3];
|
||||
var1 = var0 >> 8;
|
||||
sprite->pos2.y -= var1;
|
||||
sprite->data[3] = var0 & 0xFF;
|
||||
s16 delta = sprite->data[3] + sprite->data[2];
|
||||
sprite->pos2.y -= delta >> 8;
|
||||
sprite->data[3] += sprite->data[2];
|
||||
sprite->data[3] &= 0xFF;
|
||||
if (sprite->data[4] == 0 && sprite->pos2.y < -8)
|
||||
{
|
||||
gSprites[sprite->data[6]].invisible = 0;
|
||||
@@ -2543,19 +2540,12 @@ static void sub_815BFF4(struct Sprite *sprite)
|
||||
|
||||
static void sub_815C050(struct Sprite *sprite)
|
||||
{
|
||||
u16 d2;
|
||||
register u16 d3 asm("r1");
|
||||
int var0;
|
||||
s8 var1;
|
||||
|
||||
if (!sprite->invisible)
|
||||
{
|
||||
d2 = sprite->data[2];
|
||||
d3 = sprite->data[3];
|
||||
var0 = d2 + d3;
|
||||
var1 = var0 >> 8;
|
||||
sprite->pos2.y -= var1;
|
||||
sprite->data[3] = var0 & 0xFF;
|
||||
s16 delta = sprite->data[3] + sprite->data[2];
|
||||
sprite->pos2.y -= delta >> 8;
|
||||
sprite->data[3] += sprite->data[2];
|
||||
sprite->data[3] &= 0xFF;
|
||||
if (--sprite->data[1] == -1)
|
||||
{
|
||||
sprite->invisible = 1;
|
||||
@@ -4322,7 +4312,7 @@ static void AnimSmellingSaltExclamationStep(struct Sprite *sprite)
|
||||
|
||||
// Claps a hand several times.
|
||||
// arg 0: which hand
|
||||
// arg 1:
|
||||
// arg 1:
|
||||
void AnimHelpingHandClap(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
|
||||
@@ -2037,7 +2037,7 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority
|
||||
gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000);
|
||||
if (!isBackpic)
|
||||
{
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20);
|
||||
LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20);
|
||||
if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0)
|
||||
LoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->field_17C,
|
||||
@@ -2053,7 +2053,7 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20);
|
||||
LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20);
|
||||
if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0)
|
||||
LoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species],
|
||||
gMonSpritesGfxPtr->field_17C,
|
||||
|
||||
@@ -2029,7 +2029,7 @@ void sub_8172EF0(u8 battler, struct Pokemon *mon)
|
||||
if (IsBattlerSpriteVisible(battler))
|
||||
{
|
||||
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
|
||||
if (shinyValue < 8)
|
||||
if (shinyValue < SHINY_ODDS)
|
||||
isShiny = TRUE;
|
||||
|
||||
if (isShiny)
|
||||
|
||||
@@ -602,7 +602,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -487,7 +487,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -585,7 +585,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -1628,7 +1628,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -672,7 +672,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -584,7 +584,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gEnemyParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -567,7 +567,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
@@ -485,7 +485,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst)
|
||||
battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK);
|
||||
battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF);
|
||||
battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG);
|
||||
battleMon.altAbility = GetMonData(&gPlayerParty[monId], MON_DATA_ALT_ABILITY);
|
||||
battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM);
|
||||
battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID);
|
||||
GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname);
|
||||
StringCopy10(battleMon.nickname, nickname);
|
||||
|
||||
+16
-21
@@ -819,15 +819,11 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
// fix me
|
||||
void sub_8033648(void)
|
||||
{
|
||||
u8 i;
|
||||
s32 j;
|
||||
u16 r6;
|
||||
u8 *recvBuffer;
|
||||
u8 *dest;
|
||||
u8 *src;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_20))
|
||||
{
|
||||
@@ -838,25 +834,24 @@ void sub_8033648(void)
|
||||
{
|
||||
ResetBlockReceivedFlag(i);
|
||||
recvBuffer = (u8 *)gBlockRecvBuffer[i];
|
||||
#ifndef NONMATCHING
|
||||
asm("");
|
||||
recvBuffer = (u8 *)&gBlockRecvBuffer[i];
|
||||
#endif
|
||||
r6 = gBlockRecvBuffer[i][2];
|
||||
|
||||
if (gTasks[sLinkReceiveTaskId].data[14] + 9 + r6 > 0x1000)
|
||||
{
|
||||
gTasks[sLinkReceiveTaskId].data[12] = gTasks[sLinkReceiveTaskId].data[14];
|
||||
gTasks[sLinkReceiveTaskId].data[14] = 0;
|
||||
u8 *dest, *src;
|
||||
u16 r6 = gBlockRecvBuffer[i][2];
|
||||
|
||||
if (gTasks[sLinkReceiveTaskId].data[14] + 9 + r6 > 0x1000)
|
||||
{
|
||||
gTasks[sLinkReceiveTaskId].data[12] = gTasks[sLinkReceiveTaskId].data[14];
|
||||
gTasks[sLinkReceiveTaskId].data[14] = 0;
|
||||
}
|
||||
|
||||
dest = &gLinkBattleRecvBuffer[gTasks[sLinkReceiveTaskId].data[14]];
|
||||
src = recvBuffer;
|
||||
|
||||
for (j = 0; j < r6 + 8; j++)
|
||||
dest[j] = src[j];
|
||||
|
||||
gTasks[sLinkReceiveTaskId].data[14] = gTasks[sLinkReceiveTaskId].data[14] + r6 + 8;
|
||||
}
|
||||
|
||||
dest = &gLinkBattleRecvBuffer[gTasks[sLinkReceiveTaskId].data[14]];
|
||||
src = recvBuffer;
|
||||
|
||||
for (j = 0; j < r6 + 8; j++)
|
||||
dest[j] = src[j];
|
||||
|
||||
gTasks[sLinkReceiveTaskId].data[14] = gTasks[sLinkReceiveTaskId].data[14] + r6 + 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -1024,13 +1024,13 @@ static const union AnimCmd gUnknown_0860D020[] =
|
||||
|
||||
static const union AnimCmd gUnknown_0860D028[] =
|
||||
{
|
||||
ANIMCMD_FRAME(18, 129, .vFlip = TRUE),
|
||||
ANIMCMD_FRAME(18, 1, .vFlip = TRUE),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0860D030[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 65, .hFlip = TRUE),
|
||||
ANIMCMD_FRAME(16, 1, .hFlip = TRUE),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
@@ -2903,7 +2903,7 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int arg2)
|
||||
|
||||
defType1 = gBaseStats[targetSpecies].type1;
|
||||
defType2 = gBaseStats[targetSpecies].type2;
|
||||
defAbility = gBaseStats[targetSpecies].ability1;
|
||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
moveType = gBattleMoves[move].type;
|
||||
|
||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
@@ -5447,9 +5447,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
|
||||
targetSpecies = gFacilityTrainerMons[gSaveBlock2Ptr->frontier.domeMonIds[loserTournamentId][k]].species;
|
||||
if (var & 1)
|
||||
targetAbility = gBaseStats[targetSpecies].ability2;
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
||||
else
|
||||
targetAbility = gBaseStats[targetSpecies].ability1;
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
|
||||
var = AI_TypeCalc(moveIds[i * 4 + j], targetSpecies, targetAbility);
|
||||
if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "constants/moves.h"
|
||||
|
||||
// IWRAM bss
|
||||
static IWRAM_DATA bool8 sPerformedRentalSwap;
|
||||
static bool8 sPerformedRentalSwap;
|
||||
|
||||
// This file's functions.
|
||||
static void InitFactoryChallenge(void);
|
||||
@@ -373,7 +373,7 @@ static void SetRentalsToOpponentParty(void)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ALT_ABILITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
||||
}
|
||||
}
|
||||
@@ -439,7 +439,7 @@ static void SetPlayerAndOpponentParties(void)
|
||||
SetMonMoveAvoidReturn(&gPlayerParty[i], gFacilityTrainerMons[monSetId].moves[k], k);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &friendship);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit);
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ static void SetPlayerAndOpponentParties(void)
|
||||
for (k = 0; k < MAX_MON_MOVES; k++)
|
||||
SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monSetId].moves[k], k);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monSetId].itemTableId]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ALT_ABILITY, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityBit);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -227,9 +227,9 @@ static EWRAM_DATA u8 *sSwapMenuTilemapBuffer = NULL;
|
||||
static EWRAM_DATA u8 *sSwapMonCardBgTilemapBuffer = NULL;
|
||||
|
||||
// IWRAM bss
|
||||
static IWRAM_DATA struct FactorySelectMonsStruct *sFactorySelectScreen;
|
||||
static IWRAM_DATA void (*sSwap_CurrentTableFunc)(u8 taskId);
|
||||
static IWRAM_DATA struct FactorySwapMonsStruct *sFactorySwapScreen;
|
||||
static struct FactorySelectMonsStruct *sFactorySelectScreen;
|
||||
static void (*sSwap_CurrentTableFunc)(u8 taskId);
|
||||
static struct FactorySwapMonsStruct *sFactorySwapScreen;
|
||||
|
||||
// IWRAM common
|
||||
u8 (*gUnknown_030062E8)(void);
|
||||
@@ -1742,7 +1742,7 @@ static void Select_CopyMonsToPlayerParty(void)
|
||||
gPlayerParty[i] = sFactorySelectScreen->mons[j].monData;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].monId = sFactorySelectScreen->mons[j].monSetId;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ALT_ABILITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].abilityNum = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].ivs = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
break;
|
||||
}
|
||||
@@ -2266,7 +2266,7 @@ static void CopySwappedMonData(void)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].monId = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].monId;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].ivs = gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->enemyMonId + 3].ivs;
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].personality = GetMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityBit = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ALT_ABILITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[sFactorySwapScreen->playerMonId].abilityNum = GetBoxMonData(&gEnemyParty[sFactorySwapScreen->enemyMonId].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
}
|
||||
|
||||
static void Task_FromSwapScreenToSummaryScreen(u8 taskId)
|
||||
|
||||
+11
-17
@@ -534,7 +534,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE)
|
||||
lzPaletteData = GetMonFrontSpritePal(mon);
|
||||
else
|
||||
lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality);
|
||||
lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality);
|
||||
|
||||
LZDecompressWram(lzPaletteData, gDecompressionBuffer);
|
||||
LoadPalette(gDecompressionBuffer, paletteOffset, 0x20);
|
||||
@@ -597,7 +597,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies == SPECIES_NONE)
|
||||
lzPaletteData = GetMonFrontSpritePal(mon);
|
||||
else
|
||||
lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality);
|
||||
lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, monsPersonality);
|
||||
|
||||
LZDecompressWram(lzPaletteData, gDecompressionBuffer);
|
||||
LoadPalette(gDecompressionBuffer, paletteOffset, 0x20);
|
||||
@@ -918,7 +918,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||
dst = (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
|
||||
DmaCopy32(3, src, dst, 0x800);
|
||||
paletteOffset = 0x100 + battlerAtk * 16;
|
||||
lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue);
|
||||
lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue);
|
||||
LZDecompressWram(lzPaletteData, gDecompressionBuffer);
|
||||
LoadPalette(gDecompressionBuffer, paletteOffset, 32);
|
||||
|
||||
@@ -945,10 +945,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||
|
||||
void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
||||
{
|
||||
u8 position;
|
||||
s32 i;
|
||||
u32 var;
|
||||
const void *substitutePal;
|
||||
s32 i, position, palOffset;
|
||||
|
||||
if (!loadMonSprite)
|
||||
{
|
||||
@@ -964,19 +961,16 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
||||
else
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites[position]);
|
||||
|
||||
i = 1;
|
||||
var = battlerId * 16;
|
||||
substitutePal = gSubstituteDollPal;
|
||||
for (; i < 4; i++)
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
register void *dmaSrc asm("r0") = gMonSpritesGfxPtr->sprites[position];
|
||||
void *dmaDst = (i * 0x800) + dmaSrc;
|
||||
u32 dmaSize = 0x800;
|
||||
DmaCopy32(3, dmaSrc, dmaDst, dmaSize);
|
||||
i++;i--;
|
||||
u8 (*ptr)[4][0x800] = gMonSpritesGfxPtr->sprites[position];
|
||||
ptr++;ptr--; // Needed to match.
|
||||
|
||||
DmaCopy32Defvars(3, (*ptr)[0], (*ptr)[i], 0x800);
|
||||
}
|
||||
|
||||
LoadCompressedPalette(substitutePal, 0x100 + var, 32);
|
||||
palOffset = (battlerId * 16) + 0x100;
|
||||
LoadCompressedPalette(gSubstituteDollPal, palOffset, 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+8
-119
@@ -205,7 +205,7 @@ static void BattleIntroSlide1(u8 taskId)
|
||||
|
||||
if (gBattle_WIN0V & 0xFF00)
|
||||
gBattle_WIN0V -= 0x3FC;
|
||||
|
||||
|
||||
if (gTasks[taskId].data[2])
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
@@ -314,7 +314,7 @@ static void BattleIntroSlide2(u8 taskId)
|
||||
|
||||
if (gBattle_WIN0V & 0xFF00)
|
||||
gBattle_WIN0V -= 0x3FC;
|
||||
|
||||
|
||||
if (gTasks[taskId].data[2])
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
@@ -402,7 +402,7 @@ static void BattleIntroSlide3(u8 taskId)
|
||||
|
||||
if (gBattle_WIN0V & 0xFF00)
|
||||
gBattle_WIN0V -= 0x3FC;
|
||||
|
||||
|
||||
if (gTasks[taskId].data[2])
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
@@ -484,7 +484,7 @@ static void BattleIntroSlideLink(u8 taskId)
|
||||
case 3:
|
||||
if (gBattle_WIN0V & 0xFF00)
|
||||
gBattle_WIN0V -= 0x3FC;
|
||||
|
||||
|
||||
if (gTasks[taskId].data[2])
|
||||
gTasks[taskId].data[2] -= 2;
|
||||
|
||||
@@ -537,7 +537,7 @@ static void BattleIntroSlidePartner(u8 taskId)
|
||||
gBattle_WIN0V += 0x100;
|
||||
if ((gBattle_WIN0V & 0xFF00) != 0x100)
|
||||
gBattle_WIN0V--;
|
||||
|
||||
|
||||
if ((gBattle_WIN0V & 0xFF00) == 0x2000)
|
||||
{
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -600,129 +600,18 @@ void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *ar
|
||||
LoadBgTilemap(bgId, arg6, BG_SCREEN_SIZE, 0);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
{
|
||||
int i, j;
|
||||
int offset;
|
||||
int i, j, offset;
|
||||
|
||||
DmaCopy16(3, gMonSpritesGfxPtr->sprites[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE);
|
||||
offset = (arg5 >> 5) - (arg7 << 9);
|
||||
for (i = arg1; i < arg1 + 8; i++)
|
||||
{
|
||||
for (j = arg0; j < arg0 + 8; j++)
|
||||
{
|
||||
((u16 *)BG_VRAM)[i * 32 + j + (arg6 * 0x400) + arg0] = offset | (arg4 << 12);
|
||||
*((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (arg4 << 12);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
{
|
||||
asm_unified("\n\
|
||||
push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, 0x4\n\
|
||||
ldr r4, [sp, 0x24]\n\
|
||||
ldr r5, [sp, 0x28]\n\
|
||||
mov r8, r5\n\
|
||||
ldr r5, [sp, 0x2C]\n\
|
||||
ldr r6, [sp, 0x30]\n\
|
||||
mov r9, r6\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r12, r0\n\
|
||||
lsls r1, 24\n\
|
||||
lsls r2, 24\n\
|
||||
lsls r3, 24\n\
|
||||
lsls r4, 24\n\
|
||||
lsrs r4, 24\n\
|
||||
mov r10, r4\n\
|
||||
mov r7, r8\n\
|
||||
lsls r7, 16\n\
|
||||
lsrs r6, r7, 16\n\
|
||||
lsls r5, 24\n\
|
||||
lsrs r5, 24\n\
|
||||
mov r0, r9\n\
|
||||
lsls r0, 24\n\
|
||||
mov r9, r0\n\
|
||||
ldr r4, =0x040000d4\n\
|
||||
ldr r0, =gMonSpritesGfxPtr\n\
|
||||
ldr r0, [r0]\n\
|
||||
lsrs r2, 22\n\
|
||||
adds r0, 0x4\n\
|
||||
adds r0, r2\n\
|
||||
lsrs r3, 13\n\
|
||||
ldr r0, [r0]\n\
|
||||
adds r0, r3\n\
|
||||
str r0, [r4]\n\
|
||||
movs r0, 0xC0\n\
|
||||
lsls r0, 19\n\
|
||||
adds r6, r0\n\
|
||||
str r6, [r4, 0x4]\n\
|
||||
ldr r0, =0x80000400\n\
|
||||
str r0, [r4, 0x8]\n\
|
||||
ldr r0, [r4, 0x8]\n\
|
||||
adds r2, r7, 0\n\
|
||||
lsrs r2, 21\n\
|
||||
mov r6, r9\n\
|
||||
lsrs r6, 15\n\
|
||||
subs r4, r2, r6\n\
|
||||
lsrs r0, r1, 24\n\
|
||||
adds r1, r0, 0\n\
|
||||
adds r1, 0x8\n\
|
||||
cmp r0, r1\n\
|
||||
bge _08119148\n\
|
||||
mov r9, r1\n\
|
||||
mov r7, r12\n\
|
||||
lsls r7, 1\n\
|
||||
mov r8, r7\n\
|
||||
lsls r5, 11\n\
|
||||
str r5, [sp]\n\
|
||||
_08119110:\n\
|
||||
mov r2, r12\n\
|
||||
adds r3, r2, 0\n\
|
||||
adds r3, 0x8\n\
|
||||
adds r5, r0, 0x1\n\
|
||||
cmp r2, r3\n\
|
||||
bge _08119142\n\
|
||||
mov r1, r10\n\
|
||||
lsls r6, r1, 12\n\
|
||||
lsls r0, 6\n\
|
||||
movs r7, 0xC0\n\
|
||||
lsls r7, 19\n\
|
||||
adds r0, r7\n\
|
||||
ldr r1, [sp]\n\
|
||||
adds r0, r1, r0\n\
|
||||
mov r7, r8\n\
|
||||
adds r1, r7, r0\n\
|
||||
subs r2, r3, r2\n\
|
||||
_08119132:\n\
|
||||
adds r0, r4, 0\n\
|
||||
orrs r0, r6\n\
|
||||
strh r0, [r1]\n\
|
||||
adds r4, 0x1\n\
|
||||
adds r1, 0x2\n\
|
||||
subs r2, 0x1\n\
|
||||
cmp r2, 0\n\
|
||||
bne _08119132\n\
|
||||
_08119142:\n\
|
||||
adds r0, r5, 0\n\
|
||||
cmp r0, r9\n\
|
||||
blt _08119110\n\
|
||||
_08119148:\n\
|
||||
add sp, 0x4\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool");
|
||||
}
|
||||
#endif
|
||||
|
||||
+4
-1
@@ -72,6 +72,9 @@ extern const u8 *const gBattlescriptsForUsingItem[];
|
||||
extern const u8 *const gBattlescriptsForSafariActions[];
|
||||
|
||||
// this file's functions
|
||||
#if !defined(NONMATCHING) && MODERN
|
||||
#define static
|
||||
#endif
|
||||
static void CB2_InitBattleInternal(void);
|
||||
static void CB2_PreInitMultiBattle(void);
|
||||
static void CB2_PreInitIngamePlayerPartnerBattle(void);
|
||||
@@ -3390,7 +3393,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].altAbility);
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
|
||||
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
|
||||
+10
-10
@@ -53,11 +53,11 @@ struct PikeWildMon
|
||||
};
|
||||
|
||||
// IWRAM bss
|
||||
static IWRAM_DATA u8 sRoomType;
|
||||
static IWRAM_DATA u8 sStatusMon;
|
||||
static IWRAM_DATA bool8 sUnknown_0300128E;
|
||||
static IWRAM_DATA u32 sStatusFlags;
|
||||
static IWRAM_DATA u8 sNpcId;
|
||||
static u8 sRoomType;
|
||||
static u8 sStatusMon;
|
||||
static bool8 sUnknown_0300128E;
|
||||
static u32 sStatusFlags;
|
||||
static u8 sNpcId;
|
||||
|
||||
// This file's functions.
|
||||
static void SetRoomType(void);
|
||||
@@ -1122,7 +1122,7 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
u8 headerId = GetBattlePikeWildMonHeaderId();
|
||||
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
|
||||
const struct PikeWildMon *const *const wildMons = sWildMons[lvlMode];
|
||||
u32 abilityBit;
|
||||
u32 abilityNum;
|
||||
s32 pikeMonId = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL);
|
||||
pikeMonId = SpeciesToPikeMonId(pikeMonId);
|
||||
|
||||
@@ -1152,11 +1152,11 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].ability2)
|
||||
abilityBit = Random() % 2;
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
abilityNum = Random() % 2;
|
||||
else
|
||||
abilityBit = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &abilityBit);
|
||||
abilityNum = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &abilityNum);
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
SetMonMoveSlot(&gEnemyParty[0], wildMons[headerId][pikeMonId].moves[i], i);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ struct PyramidWildMon
|
||||
{
|
||||
u16 species;
|
||||
u8 lvl;
|
||||
u8 abilityBit;
|
||||
u8 abilityNum;
|
||||
u16 moves[4];
|
||||
};
|
||||
|
||||
@@ -129,6 +129,8 @@ static bool8 TrySetPyramidEventObjectPositionInSquare(u8 arg0, u8 *floorLayoutOf
|
||||
static bool8 TrySetPyramidEventObjectPositionAtCoords(bool8 objType, u8 x, u8 y, u8 *floorLayoutOffsets, u8 squareId, u8 eventObjectId);
|
||||
|
||||
// Const rom data.
|
||||
#define ABILITY_RANDOM 2 // For wild mons data.
|
||||
|
||||
#include "data/battle_frontier/battle_pyramid_level_50_wild_mons.h"
|
||||
#include "data/battle_frontier/battle_pyramid_open_level_wild_mons.h"
|
||||
|
||||
@@ -1401,23 +1403,23 @@ void GenerateBattlePyramidWildMon(void)
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[id].species].growthRate][lvl]);
|
||||
|
||||
switch (wildMons[id].abilityBit)
|
||||
switch (wildMons[id].abilityNum)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &wildMons[id].abilityBit);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &wildMons[id].abilityNum);
|
||||
break;
|
||||
case 2:
|
||||
case ABILITY_RANDOM:
|
||||
default:
|
||||
if (gBaseStats[wildMons[id].species].ability2)
|
||||
if (gBaseStats[wildMons[id].species].abilities[1])
|
||||
{
|
||||
i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &i);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 0;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ALT_ABILITY, &i);
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ static const union AffineAnimCmd * const gSpriteAffineAnimTable_861F3C4[] =
|
||||
gSpriteAffineAnim_861F39C,
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_0861F3CC = {gBattleFrontierGfx_PyramidBag, 0x0800, 0x1024};
|
||||
static const struct CompressedSpriteSheet gPyramidBagSpriteSheet = {gBattleFrontierGfx_PyramidBag, 0x0800, 0x1024};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0861F3D4 =
|
||||
{
|
||||
@@ -538,7 +538,7 @@ static bool8 sub_81C5238(void)
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gUnknown_08D9AE04, gPyramidBagResources->tilemapBuffer);
|
||||
LZDecompressWram(gBattleFrontierGfx_PyramidBagTileMap, gPyramidBagResources->tilemapBuffer);
|
||||
gPyramidBagResources->state++;
|
||||
}
|
||||
break;
|
||||
@@ -547,7 +547,7 @@ static bool8 sub_81C5238(void)
|
||||
gPyramidBagResources->state++;
|
||||
break;
|
||||
case 3:
|
||||
LoadCompressedSpriteSheet(&gUnknown_0861F3CC);
|
||||
LoadCompressedSpriteSheet(&gPyramidBagSpriteSheet);
|
||||
gPyramidBagResources->state++;
|
||||
break;
|
||||
case 4:
|
||||
@@ -1489,7 +1489,7 @@ static void sub_81C6E98(void)
|
||||
struct SpritePalette spritePalette;
|
||||
u16 *palPtr = Alloc(0x40);
|
||||
|
||||
LZDecompressWram(gUnknown_08D9ADD0, palPtr);
|
||||
LZDecompressWram(gBattleFrontierGfx_PyramidBag_Pal, palPtr);
|
||||
spritePalette.data = palPtr + (gSaveBlock2Ptr->frontier.lvlMode * 16);
|
||||
spritePalette.tag = ITEM_IMAGE_TAG;
|
||||
LoadSpritePalette(&spritePalette);
|
||||
|
||||
@@ -1276,8 +1276,8 @@ static void atk04_critcalc(void)
|
||||
+ 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY)
|
||||
+ 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD);
|
||||
|
||||
if (critChance > 4)
|
||||
critChance = 4;
|
||||
if (critChance >= ARRAY_COUNT(sCriticalHitChance))
|
||||
critChance = ARRAY_COUNT(sCriticalHitChance) - 1;
|
||||
|
||||
if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR)
|
||||
&& !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT)
|
||||
@@ -4906,7 +4906,7 @@ static void atk4D_switchindataupdate(void)
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].altAbility);
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
|
||||
// check knocked off item
|
||||
i = GetBattlerSide(gActiveBattler);
|
||||
@@ -8622,7 +8622,7 @@ static void atkAE_healpartystatus(void)
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
|
||||
u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY);
|
||||
u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
|
||||
|
||||
if (species != SPECIES_NONE && species != SPECIES_EGG)
|
||||
{
|
||||
@@ -8635,7 +8635,7 @@ static void atkAE_healpartystatus(void)
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gActiveBattler]))
|
||||
ability = gBattleMons[gActiveBattler].ability;
|
||||
else
|
||||
ability = GetAbilityBySpecies(species, abilityBit);
|
||||
ability = GetAbilityBySpecies(species, abilityNum);
|
||||
|
||||
if (ability != ABILITY_SOUNDPROOF)
|
||||
toHeal |= (1 << i);
|
||||
@@ -9844,10 +9844,10 @@ static void atkE5_pickup(void)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
@@ -9867,10 +9867,10 @@ static void atkE5_pickup(void)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY))
|
||||
ability = gBaseStats[species].ability2;
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].ability1;
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != 0
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ static void sub_81BA040(void);
|
||||
static void sub_81B9EC0(void);
|
||||
|
||||
// IWRAM bss
|
||||
static IWRAM_DATA u16 sRandMonSetId;
|
||||
static u16 sRandMonSetId;
|
||||
|
||||
// const rom data
|
||||
void static (*const gUnknown_086160B4[])(void) =
|
||||
|
||||
@@ -262,10 +262,10 @@ static bool8 sub_814842C(struct Sprite *sprite);
|
||||
static bool8 sub_8148458(struct Sprite *sprite);
|
||||
|
||||
// iwram bss vars
|
||||
IWRAM_DATA static s16 sUnusedRectangularSpiralVar;
|
||||
IWRAM_DATA static u8 sTestingTransitionId;
|
||||
IWRAM_DATA static u8 sTestingTransitionState;
|
||||
IWRAM_DATA static struct StructRectangularSpiral sRectangularSpiralTransition[4];
|
||||
static s16 sUnusedRectangularSpiralVar;
|
||||
static u8 sTestingTransitionId;
|
||||
static u8 sTestingTransitionState;
|
||||
static struct StructRectangularSpiral sRectangularSpiralTransition[4];
|
||||
|
||||
// ewram vars
|
||||
EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL;
|
||||
|
||||
+5
-5
@@ -194,10 +194,10 @@ EWRAM_DATA static s32 sUnknown_020322BC[5] = {0};
|
||||
EWRAM_DATA static u32 sUnknown_020322D0 = 0;
|
||||
|
||||
// IWRAM bss
|
||||
IWRAM_DATA static s16 sUnknown_03000DE8[8];
|
||||
IWRAM_DATA static s16 sUnknown_03000DF8[6];
|
||||
IWRAM_DATA static s16 sUnknown_03000E04;
|
||||
IWRAM_DATA static s16 sUnknown_03000E06;
|
||||
static s16 sUnknown_03000DE8[8];
|
||||
static s16 sUnknown_03000DF8[6];
|
||||
static s16 sUnknown_03000E04;
|
||||
static s16 sUnknown_03000E06;
|
||||
|
||||
// IWRAM common
|
||||
u8 gInGameOpponentsNo;
|
||||
@@ -1078,7 +1078,7 @@ static void sub_807FD64(struct Sprite* sprite, s16 a2, s16 a3, s16 a4, s16 a5, s
|
||||
|
||||
static void sub_807FD90(u16 a0, u8 a1)
|
||||
{
|
||||
u8 spriteId = sub_80D511C(a0 + 123, 0, 80, a1 & 1);
|
||||
u8 spriteId = LoadSpinningBerryPicGfx(a0 + 123, 0, 80, a1 & 1);
|
||||
sub_807FD64(&gSprites[spriteId], sUnknown_08339C78[a1][0], sUnknown_08339C78[a1][1], sUnknown_08339C78[a1][2], sUnknown_08339C78[a1][3], sUnknown_08339C78[a1][4]);
|
||||
}
|
||||
|
||||
|
||||
+119
-69
@@ -55,7 +55,10 @@ struct BerryCrushGame_138_C
|
||||
|
||||
struct BerryCrushGame_138
|
||||
{
|
||||
u8 filler0[0xC];
|
||||
u8 filler0[0x4];
|
||||
u16 unk4;
|
||||
u16 unk6;
|
||||
u16 unk8;
|
||||
struct BerryCrushGame_138_C *unkC[5];
|
||||
u8 filler1C[0x4];
|
||||
struct Sprite *unk24[5];
|
||||
@@ -105,7 +108,7 @@ struct BerryCrushGame
|
||||
u8 filler26[0x2];
|
||||
u16 unk28;
|
||||
u16 unk2A;
|
||||
u16 unk2C;
|
||||
s16 unk2C;
|
||||
u8 filler2E[0x8];
|
||||
u8 unk36[0xA];
|
||||
struct BerryCrushGame_40 unk40;
|
||||
@@ -149,6 +152,8 @@ extern const struct SpriteTemplate gUnknown_082F436C;
|
||||
extern const u16 gUnknown_082F41E8[];
|
||||
extern const s8 gUnknown_082F41CC[][2];
|
||||
extern const s8 gUnknown_082F41D2[][2];
|
||||
extern const u32 gUnknown_082F334C[];
|
||||
extern const u8 gUnknown_082F32D8[][3];
|
||||
|
||||
struct BerryCrushGame *sub_8020C00(void)
|
||||
{
|
||||
@@ -700,76 +705,121 @@ void sub_80216A8(struct BerryCrushGame *arg0)
|
||||
}
|
||||
}
|
||||
|
||||
// void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
|
||||
// {
|
||||
// u8 sp4;
|
||||
// struct BerryCrushGame_4E *var4E;
|
||||
// u8 i;
|
||||
// u16 var0;
|
||||
void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
|
||||
{
|
||||
u8 sp4;
|
||||
struct BerryCrushGame_4E *var4E;
|
||||
u8 i;
|
||||
u16 var, var2;
|
||||
|
||||
// sp4 = 0;
|
||||
// var4E = &arg0->unk40.unkE;
|
||||
// for (i = 0; i < arg0->unk9; i++)
|
||||
// {
|
||||
// var0 = var4E->unkA >> (i * 3);
|
||||
// var0 &= 7;
|
||||
// if (var0)
|
||||
// {
|
||||
// int offset;
|
||||
// sp4++;
|
||||
// if (var0 & 0x4)
|
||||
// StartSpriteAnim(arg1->unk24[i], 1);
|
||||
// else
|
||||
// StartSpriteAnim(arg1->unk24[i], 0);
|
||||
sp4 = 0;
|
||||
var4E = &arg0->unk40.unkE;
|
||||
for (i = 0; i < arg0->unk9; i++)
|
||||
{
|
||||
var = var4E->unkA >> (i * 3);
|
||||
var &= 7;
|
||||
if (var)
|
||||
{
|
||||
sp4++;
|
||||
if (var & 0x4)
|
||||
StartSpriteAnim(arg1->unk24[i], 1);
|
||||
else
|
||||
StartSpriteAnim(arg1->unk24[i], 0);
|
||||
|
||||
// arg1->unk24[i]->invisible = 0;
|
||||
// arg1->unk24[i]->animPaused = 0;
|
||||
// offset = (var0 % 4) - 1;
|
||||
// arg1->unk24[i]->pos2.x = gUnknown_082F41CC[offset][0];
|
||||
// arg1->unk24[i]->pos2.y = gUnknown_082F41CC[offset][1];
|
||||
// }
|
||||
// }
|
||||
arg1->unk24[i]->invisible = 0;
|
||||
arg1->unk24[i]->animPaused = 0;
|
||||
arg1->unk24[i]->pos2.x = gUnknown_082F41CC[(var % 4) - 1][0];
|
||||
arg1->unk24[i]->pos2.y = gUnknown_082F41CC[(var % 4) - 1][1];
|
||||
}
|
||||
}
|
||||
|
||||
// if (sp4 == 0)
|
||||
// {
|
||||
// arg0->unk25_2 = 0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// u8 var3 = arg0->unk28 % 3;
|
||||
// u16 var2 = var3;
|
||||
// for (i = 0; i < var4E->unkC * 2 + 3; i++)
|
||||
// {
|
||||
// if (arg1->unk4C[i]->invisible)
|
||||
// {
|
||||
// arg1->unk4C[i]->callback = sub_8022B28;
|
||||
// arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120;
|
||||
// arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + (136 - var2 * 4);
|
||||
// arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] / (var3 * 4);
|
||||
// arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1];
|
||||
// if (var4E->unk4 & 0x2)
|
||||
// StartSpriteAnim(arg1->unk4C[i], 1);
|
||||
// else
|
||||
// StartSpriteAnim(arg1->unk4C[i], 0);
|
||||
if (sp4 == 0)
|
||||
{
|
||||
arg0->unk25_2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var = (u8)(arg0->unk28 % 3);
|
||||
var2 = var;
|
||||
for (i = 0; i < var4E->unkC * 2 + 3; i++)
|
||||
{
|
||||
if (arg1->unk4C[i]->invisible)
|
||||
{
|
||||
arg1->unk4C[i]->callback = sub_8022B28;
|
||||
arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120;
|
||||
arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + 136 - (var * 4);
|
||||
arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] + (gUnknown_082F41D2[i][0] / (var2 * 4));
|
||||
arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1];
|
||||
if (var4E->unk4 & 0x2)
|
||||
StartSpriteAnim(arg1->unk4C[i], 1);
|
||||
else
|
||||
StartSpriteAnim(arg1->unk4C[i], 0);
|
||||
|
||||
// var2++;
|
||||
// if (var2 > 3)
|
||||
// var2 = 0;
|
||||
// }
|
||||
// }
|
||||
var++;
|
||||
if (var > 3)
|
||||
var = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// if (arg0->unk25_2)
|
||||
// {
|
||||
// arg0->unk25_2 = 0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (sp4 == 1)
|
||||
// PlaySE(SE_TOY_DANGO);
|
||||
// else
|
||||
// PlaySE(SE_TOY_KABE);
|
||||
if (arg0->unk25_2)
|
||||
{
|
||||
arg0->unk25_2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sp4 == 1)
|
||||
PlaySE(SE_TOY_DANGO);
|
||||
else
|
||||
PlaySE(SE_TOY_KABE);
|
||||
|
||||
// arg0->unk25_2 = 1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
arg0->unk25_2 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_80218D4(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < arg0->unk9; i++)
|
||||
{
|
||||
if (!arg1->unk24[i]->invisible)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < 11; i++)
|
||||
{
|
||||
if (!arg1->unk4C[i]->invisible)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (arg0->unk2C != 0)
|
||||
arg0->unk2C = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_8021944(struct BerryCrushGame_138 *arg0, u16 arg1)
|
||||
{
|
||||
u8 i = 0;
|
||||
u32 r7 = 0;
|
||||
s16 r3 = 0;
|
||||
|
||||
arg0->unk4 = arg1 / 3600;
|
||||
arg0->unk6 = (arg1 % 3600) / 60;
|
||||
r3 = sub_8151534((arg1 % 60) << 8, 4);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if ((r3 >> (7 - i)) & 1)
|
||||
r7 += gUnknown_082F334C[i];
|
||||
}
|
||||
|
||||
arg0->unk8 = r7 / 1000000;
|
||||
}
|
||||
|
||||
void sub_80219C8(u8 windowId, u8 left, u8 colorId, const u8 *string)
|
||||
{
|
||||
left = (left * 4) - (GetStringWidth(2, string, -1) / 2u);
|
||||
AddTextPrinterParameterized3(windowId, 2, left, 0, gUnknown_082F32D8[colorId], 0, string);
|
||||
}
|
||||
|
||||
@@ -318,18 +318,18 @@ static bool8 LoadBerryTagGfx(void)
|
||||
{
|
||||
case 0:
|
||||
reset_temp_tile_data_buffers();
|
||||
decompress_and_copy_tile_data_to_vram(2, gUnknown_08D9BB44, 0, 0, 0);
|
||||
decompress_and_copy_tile_data_to_vram(2, gBerryCheck_Gfx, 0, 0, 0);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 1:
|
||||
if (free_temp_tile_data_buffers_if_possible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gUnknown_08D9BF98, sBerryTag->tilemapBuffers[0]);
|
||||
LZDecompressWram(gBerryTag_Gfx, sBerryTag->tilemapBuffers[0]);
|
||||
sBerryTag->gfxState++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
LZDecompressWram(gUnknown_08D9C13C, sBerryTag->tilemapBuffers[2]);
|
||||
LZDecompressWram(gBerryTag_Pal, sBerryTag->tilemapBuffers[2]);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 3:
|
||||
@@ -346,15 +346,15 @@ static bool8 LoadBerryTagGfx(void)
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 4:
|
||||
LoadCompressedPalette(gUnknown_08D9BEF0, 0, 0xC0);
|
||||
LoadCompressedPalette(gBerryCheck_Pal, 0, 0xC0);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
case 5:
|
||||
LoadCompressedSpriteSheet(&gUnknown_0857FDEC);
|
||||
LoadCompressedSpriteSheet(&gBerryCheckCircleSpriteSheet);
|
||||
sBerryTag->gfxState++;
|
||||
break;
|
||||
default:
|
||||
LoadCompressedSpritePalette(&gUnknown_0857FDF4);
|
||||
LoadCompressedSpritePalette(&gBerryCheckCirclePaletteTable);
|
||||
return TRUE; // done
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ static void Task_HandleInput(u8 taskId)
|
||||
static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
s16 currPocketPosition = gUnknown_0203CE58.scrollPosition[3] + gUnknown_0203CE58.cursorPosition[3];
|
||||
s16 currPocketPosition = gBagPositionStruct.scrollPosition[3] + gBagPositionStruct.cursorPosition[3];
|
||||
u32 newPocketPosition = currPocketPosition + toMove;
|
||||
if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != 0)
|
||||
{
|
||||
@@ -566,8 +566,8 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
|
||||
|
||||
static void HandleBagCursorPositionChange(s8 toMove)
|
||||
{
|
||||
u16 *scrollPos = &gUnknown_0203CE58.scrollPosition[3];
|
||||
u16 *cursorPos = &gUnknown_0203CE58.cursorPosition[3];
|
||||
u16 *scrollPos = &gBagPositionStruct.scrollPosition[3];
|
||||
u16 *cursorPos = &gBagPositionStruct.cursorPosition[3];
|
||||
if (toMove > 0)
|
||||
{
|
||||
if (*cursorPos < 4 || BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + 8) == 0)
|
||||
|
||||
@@ -37,9 +37,9 @@ struct BgConfig2
|
||||
s32 bg_y;
|
||||
};
|
||||
|
||||
static IWRAM_DATA struct BgControl sGpuBgConfigs;
|
||||
static IWRAM_DATA struct BgConfig2 sGpuBgConfigs2[4];
|
||||
static IWRAM_DATA u32 sDmaBusyBitfield[4];
|
||||
static struct BgControl sGpuBgConfigs;
|
||||
static struct BgConfig2 sGpuBgConfigs2[4];
|
||||
static u32 sDmaBusyBitfield[4];
|
||||
|
||||
u32 gUnneededFireRedVariable;
|
||||
|
||||
@@ -220,7 +220,7 @@ static void ShowBgInternal(u8 bg)
|
||||
(sGpuBgConfigs.configs[bg].wraparound << 13) |
|
||||
(sGpuBgConfigs.configs[bg].screenSize << 14);
|
||||
|
||||
SetGpuReg((bg << 1) + 0x8, value);
|
||||
SetGpuReg((bg << 1) + REG_OFFSET_BG0CNT, value);
|
||||
|
||||
sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8);
|
||||
sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS;
|
||||
@@ -914,7 +914,6 @@ void CopyBgTilemapBufferToVram(u8 bg)
|
||||
|
||||
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height)
|
||||
{
|
||||
const void *srcCopy;
|
||||
u16 destX16;
|
||||
u16 destY16;
|
||||
u16 mode;
|
||||
@@ -924,27 +923,31 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
|
||||
switch (GetBgType(bg))
|
||||
{
|
||||
case 0:
|
||||
srcCopy = src;
|
||||
{
|
||||
const u16 * srcCopy = src;
|
||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||
{
|
||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||
{
|
||||
((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++;
|
||||
((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
srcCopy = src;
|
||||
{
|
||||
const u8 * srcCopy = src;
|
||||
mode = GetBgMetricAffineMode(bg, 0x1);
|
||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||
{
|
||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||
{
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++;
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-18
@@ -10,6 +10,7 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
#include "fieldmap.h"
|
||||
#include "party_menu.h"
|
||||
#include "fldeff.h"
|
||||
@@ -86,12 +87,12 @@ bool8 ShouldDoBrailleDigEffect(void)
|
||||
|
||||
void DoBrailleDigEffect(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(16, 8, 0x22A);
|
||||
MapGridSetMetatileIdAt(17, 8, 0x22B);
|
||||
MapGridSetMetatileIdAt(18, 8, 0x22C);
|
||||
MapGridSetMetatileIdAt(16, 9, 0xE32);
|
||||
MapGridSetMetatileIdAt(17, 9, 0x233);
|
||||
MapGridSetMetatileIdAt(18, 9, 0xE34);
|
||||
MapGridSetMetatileIdAt(16, 8, METATILE_ID(Cave, SealedChamberEntrance_TopLeft));
|
||||
MapGridSetMetatileIdAt(17, 8, METATILE_ID(Cave, SealedChamberEntrance_TopMid));
|
||||
MapGridSetMetatileIdAt(18, 8, METATILE_ID(Cave, SealedChamberEntrance_TopRight));
|
||||
MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(17, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomMid));
|
||||
MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(FLAG_SYS_BRAILLE_DIG);
|
||||
@@ -279,12 +280,12 @@ void UseRegirockHm_Callback(void)
|
||||
|
||||
void DoBrailleRegirockEffect(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(14, 26, 0x22A);
|
||||
MapGridSetMetatileIdAt(15, 26, 0x22B);
|
||||
MapGridSetMetatileIdAt(16, 26, 0x22C);
|
||||
MapGridSetMetatileIdAt(14, 27, 0xE32);
|
||||
MapGridSetMetatileIdAt(15, 27, 0x233);
|
||||
MapGridSetMetatileIdAt(16, 27, 0xE34);
|
||||
MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft));
|
||||
MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid));
|
||||
MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight));
|
||||
MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid));
|
||||
MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED);
|
||||
@@ -318,12 +319,12 @@ void UseRegisteelHm_Callback(void)
|
||||
|
||||
void DoBrailleRegisteelEffect(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(14, 26, 0x22A);
|
||||
MapGridSetMetatileIdAt(15, 26, 0x22B);
|
||||
MapGridSetMetatileIdAt(16, 26, 0x22C);
|
||||
MapGridSetMetatileIdAt(14, 27, 0xE32);
|
||||
MapGridSetMetatileIdAt(15, 27, 0x233);
|
||||
MapGridSetMetatileIdAt(16, 27, 0xE34);
|
||||
MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft));
|
||||
MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid));
|
||||
MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight));
|
||||
MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid));
|
||||
MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_BAN);
|
||||
FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED);
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ static void CableCarMainCallback_Setup(void)
|
||||
{
|
||||
u16 imebak;
|
||||
u8 i = 0;
|
||||
int sizeOut = 0;
|
||||
u32 sizeOut = 0;
|
||||
|
||||
switch (gMain.state)
|
||||
{
|
||||
|
||||
+2
-4
@@ -269,8 +269,6 @@ extern const u8 gText_Contest_Fear[];
|
||||
extern const u8 gText_BDot[];
|
||||
extern const u8 gText_CDot[];
|
||||
extern const u8 *const gUnknown_08587E10[];
|
||||
extern const struct SpriteTemplate gSpriteTemplate_8587AD0;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_8587B18[];
|
||||
extern void (*const gContestEffectFuncs[])(void);
|
||||
|
||||
static const u8 gUnknown_08587A6C[] =
|
||||
@@ -1268,7 +1266,7 @@ static void sub_80D8108(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
(s16)gBattle_BG1_Y += 7;
|
||||
*(s16*)&gBattle_BG1_Y += 7;
|
||||
if ((s16)gBattle_BG1_Y <= 160)
|
||||
break;
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -2975,7 +2973,7 @@ static u8 sub_80DB174(u16 species, u32 otId, u32 personality, u32 index)
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(gMonBackPicTable + species, gMonSpritesGfxPtr->sprites[0], species, personality);
|
||||
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20);
|
||||
LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, 0);
|
||||
|
||||
spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x70, GetBattlerSpriteFinal_Y(2, species, FALSE), 30);
|
||||
|
||||
+171
-745
File diff suppressed because it is too large
Load Diff
@@ -28,11 +28,11 @@ struct ContestWinner *gUnknown_030061C0;
|
||||
u16 *gContestPaintingMonPalette;
|
||||
|
||||
// IWRAM bss
|
||||
IWRAM_DATA u8 gContestPaintingState;
|
||||
IWRAM_DATA u16 gContestPaintingMosaicVal;
|
||||
IWRAM_DATA u16 gContestPaintingFadeCounter;
|
||||
IWRAM_DATA bool8 gUnknown_030011F6;
|
||||
IWRAM_DATA u8 gContestPaintingWindowId;
|
||||
static u8 gContestPaintingState;
|
||||
static u16 gContestPaintingMosaicVal;
|
||||
static u16 gContestPaintingFadeCounter;
|
||||
static bool8 gUnknown_030011F6;
|
||||
static u8 gContestPaintingWindowId;
|
||||
|
||||
static void ShowContestPainting(void);
|
||||
static void HoldContestPainting(void);
|
||||
@@ -250,8 +250,7 @@ static void HoldContestPainting(void)
|
||||
case 1:
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
{
|
||||
u8 two = 2; //needed to make the asm match
|
||||
gContestPaintingState = two;
|
||||
gContestPaintingState++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
}
|
||||
|
||||
@@ -363,7 +362,7 @@ static void VBlankCB_ContestPainting(void)
|
||||
|
||||
void sub_81302E8(u16 species, u8 arg1)
|
||||
{
|
||||
const void *pal = GetFrontSpritePalFromSpeciesAndPersonality(species, gUnknown_030061C0->trainerId, gUnknown_030061C0->personality);
|
||||
const void *pal = GetMonSpritePalFromSpeciesAndPersonality(species, gUnknown_030061C0->trainerId, gUnknown_030061C0->personality);
|
||||
LZDecompressVram(pal, gContestPaintingMonPalette);
|
||||
if (!arg1)
|
||||
{
|
||||
@@ -685,7 +684,7 @@ static void sub_8130760(u8 contestResult)
|
||||
|
||||
gUnknown_030061A0.var_16 = 2;
|
||||
gUnknown_030061A0.var_0 = contestResult;
|
||||
gUnknown_030061A0.var_10 = 0x6010000;
|
||||
gUnknown_030061A0.var_10 = OBJ_VRAM0;
|
||||
|
||||
sub_8124F2C(&gUnknown_030061A0);
|
||||
sub_81261A4(&gUnknown_030061A0);
|
||||
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
wild_encounters.h
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
const u32 gUnknown_08D9BB44[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz");
|
||||
const u32 gUnknown_08D9BEF0[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz");
|
||||
const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz");
|
||||
const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz");
|
||||
|
||||
const u32 gUnknown_08D9BF98[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz");
|
||||
const u32 gUnknown_08D9C13C[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz");
|
||||
const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz");
|
||||
const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz");
|
||||
|
||||
const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/interface/check_berry_circle.4bpp.lz");
|
||||
|
||||
|
||||
+387
-774
File diff suppressed because it is too large
Load Diff
@@ -166,7 +166,6 @@ const u8 gFacilityClassToTrainerClass[] =
|
||||
[FACILITY_CLASS_DOME_ACE_TUCKER] = TRAINER_CLASS_DOME_ACE,
|
||||
[FACILITY_CLASS_RED] = TRAINER_CLASS_PKMN_TRAINER_3,
|
||||
[FACILITY_CLASS_LEAF] = TRAINER_CLASS_PKMN_TRAINER_3,
|
||||
[FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_PKMN_TRAINER_4,
|
||||
[FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_PKMN_TRAINER_4,
|
||||
[FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_RS_PROTAG,
|
||||
[FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_RS_PROTAG,
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
const struct CityMapEntry gPokenavCityMaps[] =
|
||||
{
|
||||
{
|
||||
.mapSecId = 0,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Littleroot_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 1,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Oldale_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 2,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Dewford_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 3,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Lavarige_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 4,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Fallarbor_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 5,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Verdanturf_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 6,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Pacifidlog_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 7,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Petalburg_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 8,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Slateport_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 8,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_Slateport_1,
|
||||
},
|
||||
{
|
||||
.mapSecId = 9,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Mauville_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 9,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_Mauville_1,
|
||||
},
|
||||
{
|
||||
.mapSecId = 10,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Rustboro_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 10,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_Rustboro_1,
|
||||
},
|
||||
{
|
||||
.mapSecId = 11,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Fortree_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 12,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Lilycove_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 12,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_Lilycove_1,
|
||||
},
|
||||
{
|
||||
.mapSecId = 13,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Mossdeep_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 13,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_Mossdeep_1,
|
||||
},
|
||||
{
|
||||
.mapSecId = 14,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_Sootopolis_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 15,
|
||||
.index = 0,
|
||||
.tilemap = gPokenavCityMap_EverGrande_0,
|
||||
},
|
||||
{
|
||||
.mapSecId = 15,
|
||||
.index = 1,
|
||||
.tilemap = gPokenavCityMap_EverGrande_1,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
const u32 gPokenavCityMap_Lavarige_0[] = INCBIN_U32("graphics/pokenav/city_maps/lavaridge_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Fallarbor_0[] = INCBIN_U32("graphics/pokenav/city_maps/fallarbor_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Fortree_0[] = INCBIN_U32("graphics/pokenav/city_maps/fortree_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Slateport_0[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Slateport_1[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Rustboro_0[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Rustboro_1[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U32("graphics/pokenav/city_maps/pacifidlog_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Mauville_1[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Mauville_0[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Oldale_0[] = INCBIN_U32("graphics/pokenav/city_maps/oldale_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Lilycove_1[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Lilycove_0[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Littleroot_0[] = INCBIN_U32("graphics/pokenav/city_maps/littleroot_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Dewford_0[] = INCBIN_U32("graphics/pokenav/city_maps/dewford_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Sootopolis_0[] = INCBIN_U32("graphics/pokenav/city_maps/sootopolis_0.bin.lz");
|
||||
const u32 gPokenavCityMap_EverGrande_0[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_0.bin.lz");
|
||||
const u32 gPokenavCityMap_EverGrande_1[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Verdanturf_0[] = INCBIN_U32("graphics/pokenav/city_maps/verdanturf_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Mossdeep_1[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_1.bin.lz");
|
||||
const u32 gPokenavCityMap_Mossdeep_0[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_0.bin.lz");
|
||||
const u32 gPokenavCityMap_Petalburg_0[] = INCBIN_U32("graphics/pokenav/city_maps/petalburg_0.bin.lz");
|
||||
@@ -0,0 +1,115 @@
|
||||
const u8 gGiftRibbonDescriptionPart1_2003RegionalTourney[] = _("2003 REGIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart2_Champion[] = _("CHAMPION RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_2003NationalTourney[] = _("2003 NATIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart1_2003GlobalCup[] = _("2003 GLOBAL CUP");
|
||||
const u8 gGiftRibbonDescriptionPart2_RunnerUp[] = _("Runner-up RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart2_Semifinalist[] = _("Semifinalist RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_2004RegionalTourney[] = _("2004 REGIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart1_2004NationalTourney[] = _("2004 NATIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart1_2004GlobalCup[] = _("2004 GLOBAL CUP");
|
||||
const u8 gGiftRibbonDescriptionPart1_2005RegionalTourney[] = _("2005 REGIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart1_2005NationalTourney[] = _("2005 NATIONAL TOURNEY");
|
||||
const u8 gGiftRibbonDescriptionPart1_2005GlobalCup[] = _("2005 GLOBAL CUP");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonBattleCup[] = _("POKéMON BATTLE CUP");
|
||||
const u8 gGiftRibbonDescriptionPart2_Participation[] = _("Participation RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonLeague[] = _("POKéMON LEAGUE");
|
||||
const u8 gGiftRibbonDescriptionPart1_AdvanceCup[] = _("ADVANCE CUP");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonTournament[] = _("POKéMON Tournament");
|
||||
const u8 gGiftRibbonDescriptionPart2_Participation2[] = _("Participation RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonEvent[] = _("POKéMON Event");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonFestival[] = _("POKéMON Festival");
|
||||
const u8 gGiftRibbonDescriptionPart1_DifficultyClearing[] = _("Difficulty-clearing");
|
||||
const u8 gGiftRibbonDescriptionPart2_Commemorative[] = _("Commemorative RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_ClearingAllChallenges[] = _("RIBBON awarded for");
|
||||
const u8 gGiftRibbonDescriptionPart2_ClearingAllChallenges[] = _("clearing all challenges.");
|
||||
const u8 gGiftRibbonDescriptionPart1_100StraightWin[] = _("100-straight Win");
|
||||
const u8 gGiftRibbonDescriptionPart1_DarknessTower[] = _("DARKNESS TOWER Clear");
|
||||
const u8 gGiftRibbonDescriptionPart1_RedTower[] = _("RED TOWER Clear");
|
||||
const u8 gGiftRibbonDescriptionPart1_BlackironTower[] = _("BLACKIRON TOWER Clear");
|
||||
const u8 gGiftRibbonDescriptionPart1_FinalTower[] = _("FINAL TOWER Clear");
|
||||
const u8 gGiftRibbonDescriptionPart1_LegendMaking[] = _("Legend-making");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonCenterTokyo[] = _("POKéMON CENTER TOKYO");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonCenterOsaka[] = _("POKéMON CENTER OSAKA");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonCenterNagoya[] = _("POKéMON CENTER NAGOYA");
|
||||
const u8 gGiftRibbonDescriptionPart1_PokemonCenterNY[] = _("POKéMON CENTER NY");
|
||||
const u8 gGiftRibbonDescriptionPart1_SummerHolidays[] = _("Summer Holidays RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart2_EmptyString[] = _("");
|
||||
const u8 gGiftRibbonDescriptionPart1_WinterHolidays[] = _("Winter Holidays RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_SpringHolidays[] = _("Spring Holidays RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_Evergreen[] = _("Evergreen RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_SpecialHoliday[] = _("Special Holiday RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_HardWorker[] = _("Hard Worker RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_LotsOfFriends[] = _("Lots of Friends RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_FullOfEnergy[] = _("Full of Energy RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart1_LovedPokemon[] = _("A commemorative RIBBON");
|
||||
const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _("for a loved POKéMON.");
|
||||
const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows");
|
||||
const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON.");
|
||||
|
||||
const u8 *const gGiftRibbonDescriptionPointers[][2] =
|
||||
{
|
||||
{gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation},
|
||||
{gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation},
|
||||
{gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion},
|
||||
{gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp},
|
||||
{gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist},
|
||||
{gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation},
|
||||
{gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2},
|
||||
{gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2},
|
||||
{gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2},
|
||||
{gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_ClearingAllChallenges, gGiftRibbonDescriptionPart2_ClearingAllChallenges},
|
||||
{gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative},
|
||||
{gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString},
|
||||
{gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon},
|
||||
{gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon}
|
||||
};
|
||||
@@ -0,0 +1,476 @@
|
||||
#define MCFLAVOR(name) {gMatchCallFlavorText_##name##_Strategy, \
|
||||
gMatchCallFlavorText_##name##_Pokemon, \
|
||||
gMatchCallFlavorText_##name##_Intro1, \
|
||||
gMatchCallFlavorText_##name##_Intro2}
|
||||
|
||||
const u8 gMatchCallFlavorText_AromaLady_Rose_Strategy[] = _("Becalm fighting emotions.");
|
||||
const u8 gMatchCallFlavorText_AromaLady_Rose_Pokemon[] = _("Fragrant GRASS POKéMON.");
|
||||
const u8 gMatchCallFlavorText_AromaLady_Rose_Intro1[] = _("Soothing aromas make the");
|
||||
const u8 gMatchCallFlavorText_AromaLady_Rose_Intro2[] = _("body and mind healthy.");
|
||||
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Andres_Strategy[] = _("I'm not very good at this.");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Andres_Pokemon[] = _("Ruin-exploration partners.");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro1[] = _("I am searching for undersea");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro2[] = _("ruins and relics.");
|
||||
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Dusty_Strategy[] = _("Overwhelm with power!");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Dusty_Pokemon[] = _("Craggy ROCK POKéMON.");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro1[] = _("In search of ancient lore,");
|
||||
const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro2[] = _("I travel the world.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Tuber_Lola_Strategy[] = _("I'm going to try hard!");
|
||||
const u8 gMatchCallFlavorText_Tuber_Lola_Pokemon[] = _("Good swimmer POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Tuber_Lola_Intro1[] = _("I wish I could swim without");
|
||||
const u8 gMatchCallFlavorText_Tuber_Lola_Intro2[] = _("using an inner tube.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Tuber_Ricky_Strategy[] = _("I don't know. I'll try hard.");
|
||||
const u8 gMatchCallFlavorText_Tuber_Ricky_Pokemon[] = _("WATER POKéMON are buddies.");
|
||||
const u8 gMatchCallFlavorText_Tuber_Ricky_Intro1[] = _("It's not like I can't swim.");
|
||||
const u8 gMatchCallFlavorText_Tuber_Ricky_Intro2[] = _("I just like my inner tube.");
|
||||
|
||||
const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Strategy[] = _("We split our duties.");
|
||||
const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Pokemon[] = _("We like friendly POKéMON.");
|
||||
const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro1[] = _("We enjoy POKéMON together");
|
||||
const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro2[] = _("as sister and brother.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Strategy[] = _("I finish with power moves!");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Pokemon[] = _("A mix of different types.");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro1[] = _("I aim to become the ultimate");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro2[] = _("TRAINER!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Strategy[] = _("Exploit the foe's weakness.");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Pokemon[] = _("Balance is crucial.");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro1[] = _("My goal is to become the");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro2[] = _("POKéMON CHAMPION.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Strategy[] = _("Upset the opponent.");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Pokemon[] = _("Type doesn't matter.");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro1[] = _("I'm a top student at the");
|
||||
const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro2[] = _("TRAINER'S SCHOOL.");
|
||||
|
||||
const u8 gMatchCallFlavorText_HexManiac_Valerie_Strategy[] = _("Slow, steady suffering.");
|
||||
const u8 gMatchCallFlavorText_HexManiac_Valerie_Pokemon[] = _("Scary to meet at night.");
|
||||
const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro1[] = _("I see things that others");
|
||||
const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro2[] = _("can't see...");
|
||||
|
||||
const u8 gMatchCallFlavorText_Lady_Cindy_Strategy[] = _("Anything to win.");
|
||||
const u8 gMatchCallFlavorText_Lady_Cindy_Pokemon[] = _("Gorgeous type!");
|
||||
const u8 gMatchCallFlavorText_Lady_Cindy_Intro1[] = _("I have a pool specially for");
|
||||
const u8 gMatchCallFlavorText_Lady_Cindy_Intro2[] = _("my POKéMON at home.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Beauty_Thalia_Strategy[] = _("You'll fall under my spell!");
|
||||
const u8 gMatchCallFlavorText_Beauty_Thalia_Pokemon[] = _("Mature WATER type.");
|
||||
const u8 gMatchCallFlavorText_Beauty_Thalia_Intro1[] = _("I dream of cruising around");
|
||||
const u8 gMatchCallFlavorText_Beauty_Thalia_Intro2[] = _("the world on a luxury liner.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Beauty_Jessica_Strategy[] = _("I'll lead you astray.");
|
||||
const u8 gMatchCallFlavorText_Beauty_Jessica_Pokemon[] = _("Cute, of course.");
|
||||
const u8 gMatchCallFlavorText_Beauty_Jessica_Intro1[] = _("I love the SAFARI ZONE.");
|
||||
const u8 gMatchCallFlavorText_Beauty_Jessica_Intro2[] = _("I seem to end up there.");
|
||||
|
||||
const u8 gMatchCallFlavorText_RichBoy_Winston_Strategy[] = _("Strategy? Who needs it?");
|
||||
const u8 gMatchCallFlavorText_RichBoy_Winston_Pokemon[] = _("I spent big money on it!");
|
||||
const u8 gMatchCallFlavorText_RichBoy_Winston_Intro1[] = _("I, being rich, sleep in a");
|
||||
const u8 gMatchCallFlavorText_RichBoy_Winston_Intro2[] = _("custom POKéMON bed.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PokeManiac_Steve_Strategy[] = _("Wrestle down with power.");
|
||||
const u8 gMatchCallFlavorText_PokeManiac_Steve_Pokemon[] = _("Took all night to catch.");
|
||||
const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro1[] = _("Big, burly, and buff");
|
||||
const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro2[] = _("POKéMON are the best...");
|
||||
|
||||
const u8 gMatchCallFlavorText_Swimmer_Tony_Strategy[] = _("Ram at full speed!");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Tony_Pokemon[] = _("Funky WATER type!");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Tony_Intro1[] = _("If I can't be out swimming,");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Tony_Intro2[] = _("I'll be pumping weights.");
|
||||
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Nob_Strategy[] = _("Grand slam pummeling!");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Nob_Pokemon[] = _("FIGHTING type.");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro1[] = _("Not to brag, but I can bust");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro2[] = _("ten roof tiles!");
|
||||
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Koji_Strategy[] = _("Witness karate power!");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Koji_Pokemon[] = _("My partners in training!");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro1[] = _("Let us discuss matters of");
|
||||
const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro2[] = _("the world with bare fists!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Guitarist_Fernando_Strategy[] = _("Rock to stunning sounds!");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Fernando_Pokemon[] = _("Electric-and-sound combo!");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro1[] = _("My compositions will shock");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro2[] = _("you and stun you!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Guitarist_Dalton_Strategy[] = _("I'll electrify you!");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Dalton_Pokemon[] = _("They're ELECTRIC!");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro1[] = _("I want to make people cry");
|
||||
const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro2[] = _("with songs from my heart.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Kindler_Bernie_Strategy[] = _("Burn it all down!");
|
||||
const u8 gMatchCallFlavorText_Kindler_Bernie_Pokemon[] = _("Burn-inducing POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Kindler_Bernie_Intro1[] = _("When you light a campfire,");
|
||||
const u8 gMatchCallFlavorText_Kindler_Bernie_Intro2[] = _("be sure there's some water.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Camper_Ethan_Strategy[] = _("Hang in and be tenacious!");
|
||||
const u8 gMatchCallFlavorText_Camper_Ethan_Pokemon[] = _("I'll raise any POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Camper_Ethan_Intro1[] = _("POKéMON raised in the wild");
|
||||
const u8 gMatchCallFlavorText_Camper_Ethan_Intro2[] = _("grow strong!");
|
||||
|
||||
const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Strategy[] = _("Our love lets us prevail.");
|
||||
const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Pokemon[] = _("We've had them for years.");
|
||||
const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro1[] = _("Married 50 years, we've");
|
||||
const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro2[] = _("devotedly raised POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Strategy[] = _("Attack in waves!");
|
||||
const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Pokemon[] = _("BUG POKéMON are cool.");
|
||||
const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro1[] = _("I go into the forest every");
|
||||
const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro2[] = _("day to catch BUG POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Psychic_Cameron_Strategy[] = _("Daze and confuse!");
|
||||
const u8 gMatchCallFlavorText_Psychic_Cameron_Pokemon[] = _("Ones with weird powers.");
|
||||
const u8 gMatchCallFlavorText_Psychic_Cameron_Intro1[] = _("I can see through exactly");
|
||||
const u8 gMatchCallFlavorText_Psychic_Cameron_Intro2[] = _("what you're thinking!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Psychic_Jacki_Strategy[] = _("Battle at full power.");
|
||||
const u8 gMatchCallFlavorText_Psychic_Jacki_Pokemon[] = _("POKéMON of many mysteries.");
|
||||
const u8 gMatchCallFlavorText_Psychic_Jacki_Intro1[] = _("When we spoke, I was really");
|
||||
const u8 gMatchCallFlavorText_Psychic_Jacki_Intro2[] = _("using telepathy.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Gentleman_Walter_Strategy[] = _("Calm and collected.");
|
||||
const u8 gMatchCallFlavorText_Gentleman_Walter_Pokemon[] = _("POKéMON of distinction.");
|
||||
const u8 gMatchCallFlavorText_Gentleman_Walter_Intro1[] = _("We enjoy a spot of tea");
|
||||
const u8 gMatchCallFlavorText_Gentleman_Walter_Intro2[] = _("every day. It's imported.");
|
||||
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Karen_Strategy[] = _("I use my head to battle.");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Karen_Pokemon[] = _("I love any kind of POKéMON!");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro1[] = _("My daddy gives me spending");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro2[] = _("money if I ace a test.");
|
||||
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Jerry_Strategy[] = _("My knowledge rules!");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Jerry_Pokemon[] = _("Any smart POKéMON!");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro1[] = _("I want to be a POKéMON");
|
||||
const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro2[] = _("researcher in the future.");
|
||||
|
||||
const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Strategy[] = _("We talk it over first.");
|
||||
const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Pokemon[] = _("POKéMON that we both like.");
|
||||
const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro1[] = _("We're senior and junior");
|
||||
const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro2[] = _("students into POKéMON!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Pokefan_Isabel_Strategy[] = _("Go for it, my dears!");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Isabel_Pokemon[] = _("I have no likes or dislikes.");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro1[] = _("While out shopping for");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro2[] = _("supper, I battle too.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Pokefan_Miguel_Strategy[] = _("I battle with love!");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Miguel_Pokemon[] = _("A POKéMON raised with love!");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro1[] = _("It's important to build");
|
||||
const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro2[] = _("trust with your POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Expert_Timothy_Strategy[] = _("I see through your moves!");
|
||||
const u8 gMatchCallFlavorText_Expert_Timothy_Pokemon[] = _("The essence of FIGHTING.");
|
||||
const u8 gMatchCallFlavorText_Expert_Timothy_Intro1[] = _("I'm not ready to give way");
|
||||
const u8 gMatchCallFlavorText_Expert_Timothy_Intro2[] = _("to the young yet!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Expert_Shelby_Strategy[] = _("Attack while defending.");
|
||||
const u8 gMatchCallFlavorText_Expert_Shelby_Pokemon[] = _("The FIGHTING type.");
|
||||
const u8 gMatchCallFlavorText_Expert_Shelby_Intro1[] = _("Being old, I have my own");
|
||||
const u8 gMatchCallFlavorText_Expert_Shelby_Intro2[] = _("style of battling.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Youngster_Calvin_Strategy[] = _("I do what I can.");
|
||||
const u8 gMatchCallFlavorText_Youngster_Calvin_Pokemon[] = _("I use different types.");
|
||||
const u8 gMatchCallFlavorText_Youngster_Calvin_Intro1[] = _("I'm going to keep working");
|
||||
const u8 gMatchCallFlavorText_Youngster_Calvin_Intro2[] = _("until I beat a GYM LEADER.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Fisherman_Elliot_Strategy[] = _("I battle patiently.");
|
||||
const u8 gMatchCallFlavorText_Fisherman_Elliot_Pokemon[] = _("WATER POKéMON to battle!");
|
||||
const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro1[] = _("I'm the world's only guy to");
|
||||
const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro2[] = _("catch a huge POKéMON!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Isaiah_Strategy[] = _("Exploit the environment!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Isaiah_Pokemon[] = _("All hail the WATER type!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro1[] = _("I won't be beaten by some");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro2[] = _("beach bum SWIMMER!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Maria_Strategy[] = _("Speed above all!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Maria_Pokemon[] = _("I use a speedy POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Maria_Intro1[] = _("A marathon is a challenge");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Maria_Intro2[] = _("against your own self.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Abigail_Strategy[] = _("Defense is crucial.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Abigail_Pokemon[] = _("My POKéMON is solid.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro1[] = _("I started this for dieting,");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro2[] = _("but I got right into it.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Dylan_Strategy[] = _("Strike before stricken!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Dylan_Pokemon[] = _("A fast-running POKéMON!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro1[] = _("If you ran and ran, you'd");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro2[] = _("become one with the wind.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Katelyn_Strategy[] = _("All-out offensive!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Katelyn_Pokemon[] = _("WATER POKéMON rule!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro1[] = _("I must swim over 6 miles");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro2[] = _("every day.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Benjamin_Strategy[] = _("Push and push again!");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Benjamin_Pokemon[] = _("The strength of STEEL.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro1[] = _("If you're sweating, get");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro2[] = _("fluids into you regularly.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Triathlete_Pablo_Strategy[] = _("Draw the power of WATER.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Pablo_Pokemon[] = _("Toughened WATER POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro1[] = _("Training POKéMON is good,");
|
||||
const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro2[] = _("but don't neglect yourself.");
|
||||
|
||||
const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Strategy[] = _("It's about POKéMON power!");
|
||||
const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Pokemon[] = _("See the power of DRAGONS!");
|
||||
const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro1[] = _("I'll become legendary as the");
|
||||
const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro2[] = _("strongest one day!");
|
||||
|
||||
const u8 gMatchCallFlavorText_BirdKeeper_Robert_Strategy[] = _("I'll show you my technique!");
|
||||
const u8 gMatchCallFlavorText_BirdKeeper_Robert_Pokemon[] = _("Elegantly wheeling BIRDS.");
|
||||
const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro1[] = _("My BIRD POKéMON, deliver my");
|
||||
const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro2[] = _("love to that girl!");
|
||||
|
||||
const u8 gMatchCallFlavorText_NinjaBoy_Lao_Strategy[] = _("You'll suffer from poison!");
|
||||
const u8 gMatchCallFlavorText_NinjaBoy_Lao_Pokemon[] = _("Poisonous POKéMON.");
|
||||
const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro1[] = _("I undertake training so");
|
||||
const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro2[] = _("that I may become a ninja.");
|
||||
|
||||
const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Strategy[] = _("The first strike wins!");
|
||||
const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Pokemon[] = _("Speedy FIGHTING type.");
|
||||
const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro1[] = _("If my POKéMON lose,");
|
||||
const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro2[] = _("I'll carry on the fight!");
|
||||
|
||||
const u8 gMatchCallFlavorText_ParasolLady_Madeline_Strategy[] = _("Go, go, my POKéMON!");
|
||||
const u8 gMatchCallFlavorText_ParasolLady_Madeline_Pokemon[] = _("I'll raise anything.");
|
||||
const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro1[] = _("UV rays are your skin's");
|
||||
const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro2[] = _("enemy. Get protected.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Swimmer_Jenny_Strategy[] = _("No mercy!");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Jenny_Pokemon[] = _("Cute WATER POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro1[] = _("I have too many fans.");
|
||||
const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro2[] = _("I was interviewed on TV.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Picnicker_Diana_Strategy[] = _("I think about this & that.");
|
||||
const u8 gMatchCallFlavorText_Picnicker_Diana_Pokemon[] = _("I like all POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Picnicker_Diana_Intro1[] = _("What lies beyond that");
|
||||
const u8 gMatchCallFlavorText_Picnicker_Diana_Intro2[] = _("yonder hill?");
|
||||
|
||||
const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Strategy[] = _("We battle together!");
|
||||
const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Pokemon[] = _("We train together!");
|
||||
const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro1[] = _("We like the same POKéMON,");
|
||||
const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro2[] = _("but different desserts.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Sailor_Ernest_Strategy[] = _("I force things with power!");
|
||||
const u8 gMatchCallFlavorText_Sailor_Ernest_Pokemon[] = _("WATER and FIGHTING types.");
|
||||
const u8 gMatchCallFlavorText_Sailor_Ernest_Intro1[] = _("Seamen are rough spirits!");
|
||||
const u8 gMatchCallFlavorText_Sailor_Ernest_Intro2[] = _("Any complaints?");
|
||||
|
||||
const u8 gMatchCallFlavorText_Sailor_Cory_Strategy[] = _("Up for a fight anytime!");
|
||||
const u8 gMatchCallFlavorText_Sailor_Cory_Pokemon[] = _("WATER POKéMON are my faves!");
|
||||
const u8 gMatchCallFlavorText_Sailor_Cory_Intro1[] = _("If you want to shout loud,");
|
||||
const u8 gMatchCallFlavorText_Sailor_Cory_Intro2[] = _("suck in air with your belly!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Collector_Edwin_Strategy[] = _("Protect POKéMON from harm.");
|
||||
const u8 gMatchCallFlavorText_Collector_Edwin_Pokemon[] = _("I love rare POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Collector_Edwin_Intro1[] = _("I want to collect all the");
|
||||
const u8 gMatchCallFlavorText_Collector_Edwin_Intro2[] = _("world's rare POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Strategy[] = _("I count on power.");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Pokemon[] = _("POKéMON are my children.");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro1[] = _("It takes knowledge and");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro2[] = _("love to raise POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Strategy[] = _("Full-on attack!");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Pokemon[] = _("Anything. I'll raise it.");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro1[] = _("I give them {POKEBLOCK}S for");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro2[] = _("going after CONTEST titles.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Strategy[] = _("I raise POKéMON with care.");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Pokemon[] = _("Fun-to-raise POKéMON.");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro1[] = _("Treat every POKéMON you");
|
||||
const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro2[] = _("meet with respect.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Strategy[] = _("I believe in my POKéMON.");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Pokemon[] = _("I like strong POKéMON.");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro1[] = _("I'm training for rescue");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro2[] = _("work with my POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Strategy[] = _("Attack in waves!");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Pokemon[] = _("I use different types.");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro1[] = _("Those who destroy nature");
|
||||
const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro2[] = _("must never be forgiven!");
|
||||
|
||||
const u8 gMatchCallFlavorText_Lass_Haley_Strategy[] = _("I'll show you some guts!");
|
||||
const u8 gMatchCallFlavorText_Lass_Haley_Pokemon[] = _("Cute POKéMON are my faves!");
|
||||
const u8 gMatchCallFlavorText_Lass_Haley_Intro1[] = _("After a battle, I always");
|
||||
const u8 gMatchCallFlavorText_Lass_Haley_Intro2[] = _("bathe with my POKéMON.");
|
||||
|
||||
const u8 gMatchCallFlavorText_BugCatcher_James_Strategy[] = _("Lightning-fast attack!");
|
||||
const u8 gMatchCallFlavorText_BugCatcher_James_Pokemon[] = _("BUG POKéMON are number 1!");
|
||||
const u8 gMatchCallFlavorText_BugCatcher_James_Intro1[] = _("If you want to catch BUG");
|
||||
const u8 gMatchCallFlavorText_BugCatcher_James_Intro2[] = _("POKéMON, wake up early.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Hiker_Trent_Strategy[] = _("I battle with power.");
|
||||
const u8 gMatchCallFlavorText_Hiker_Trent_Pokemon[] = _("Hard-bodied POKéMON.");
|
||||
const u8 gMatchCallFlavorText_Hiker_Trent_Intro1[] = _("I've been planning a month");
|
||||
const u8 gMatchCallFlavorText_Hiker_Trent_Intro2[] = _("for today's hike.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Hiker_Sawyer_Strategy[] = _("I like it hot!");
|
||||
const u8 gMatchCallFlavorText_Hiker_Sawyer_Pokemon[] = _("Hot POKéMON!");
|
||||
const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro1[] = _("As much as I love POKéMON,");
|
||||
const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro2[] = _("I surely like hiking!");
|
||||
|
||||
const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Strategy[] = _("Lovey-dovey strategy!");
|
||||
const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Pokemon[] = _("Lovey-dovey POKéMON!");
|
||||
const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro1[] = _("We're lovey-dovey!");
|
||||
const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro2[] = _("Forever lovey-dovey!");
|
||||
|
||||
const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Strategy[] = _("We let it all hang out.");
|
||||
const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Pokemon[] = _("The 1st POKéMON I caught.");
|
||||
const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro1[] = _("POKéMON and I have grown");
|
||||
const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro2[] = _("stronger together.");
|
||||
|
||||
const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Strategy[] = _("ROCK-type power attack.");
|
||||
const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Pokemon[] = _("I prefer rock-hard POKéMON.");
|
||||
const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro1[] = _("A LEADER of a big GYM bears");
|
||||
const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro2[] = _("a lot of responsibility.");
|
||||
|
||||
const u8 gMatchCallFlavorText_TheBigHit_Brawly_Strategy[] = _("Direct physical action!");
|
||||
const u8 gMatchCallFlavorText_TheBigHit_Brawly_Pokemon[] = _("FIGHTING POKéMON rule!");
|
||||
const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro1[] = _("The world awaits me as the");
|
||||
const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro2[] = _("next big wave!");
|
||||
|
||||
const u8 gMatchCallFlavorText_SwellShock_Wattson_Strategy[] = _("I choose to electrify.");
|
||||
const u8 gMatchCallFlavorText_SwellShock_Wattson_Pokemon[] = _("Get shocked by electricity!");
|
||||
const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro1[] = _("One must never throw a");
|
||||
const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro2[] = _("match. Even I must not.");
|
||||
|
||||
const u8 gMatchCallFlavorText_PassionBurn_Flannery_Strategy[] = _("Battle aggressively.");
|
||||
const u8 gMatchCallFlavorText_PassionBurn_Flannery_Pokemon[] = _("Burn with passion!");
|
||||
const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro1[] = _("Completely wash away daily");
|
||||
const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro2[] = _("fatigue in hot springs!");
|
||||
|
||||
const u8 gMatchCallFlavorText_ReliableOne_Dad_Strategy[] = _("I flexibly adapt my style.");
|
||||
const u8 gMatchCallFlavorText_ReliableOne_Dad_Pokemon[] = _("Grown in a balanced manner.");
|
||||
const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro1[] = _("I walk the 30 minutes from");
|
||||
const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro2[] = _("home to here every day.");
|
||||
|
||||
const u8 gMatchCallFlavorText_SkyTamer_Winona_Strategy[] = _("I take advantage of speed.");
|
||||
const u8 gMatchCallFlavorText_SkyTamer_Winona_Pokemon[] = _("Graceful sky dancers.");
|
||||
const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro1[] = _("The ultimate would be to");
|
||||
const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro2[] = _("live as one with nature.");
|
||||
|
||||
const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Strategy[] = _("We battle in cooperation.");
|
||||
const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Pokemon[] = _("Always friendly POKéMON.");
|
||||
const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro1[] = _("Papa has trouble telling");
|
||||
const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro2[] = _("the two of us apart!");
|
||||
|
||||
const u8 gMatchCallFlavorText_DandyCharm_Juan_Strategy[] = _("I use splendid waterpower.");
|
||||
const u8 gMatchCallFlavorText_DandyCharm_Juan_Pokemon[] = _("POKéMON of elegance!");
|
||||
const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro1[] = _("The adulation of beautiful");
|
||||
const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro2[] = _("ladies fills me with energy!");
|
||||
|
||||
const u8 gMatchCallFlavorText_EliteFour_Sidney_Strategy[] = _("Offense over defense!");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Sidney_Pokemon[] = _("The DARK side's beauties.");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro1[] = _("They said I was a punk, but");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro2[] = _("I'm one of the ELITE FOUR!");
|
||||
|
||||
const u8 gMatchCallFlavorText_EliteFour_Phoebe_Strategy[] = _("Confuse and confound.");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Phoebe_Pokemon[] = _("There's nothing definite.");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro1[] = _("I wonder how my grandma at");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro2[] = _("MT. PYRE is doing?");
|
||||
|
||||
const u8 gMatchCallFlavorText_EliteFour_Glacia_Strategy[] = _("I use items for help.");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Glacia_Pokemon[] = _("Flaming passion in icy cold!");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro1[] = _("The ICE type can be better");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro2[] = _("trained in this hot land.");
|
||||
|
||||
const u8 gMatchCallFlavorText_EliteFour_Drake_Strategy[] = _("Harness strong abilities.");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Drake_Pokemon[] = _("The raw power of DRAGONS!");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Drake_Intro1[] = _("I dedicate myself to the");
|
||||
const u8 gMatchCallFlavorText_EliteFour_Drake_Intro2[] = _("POKéMON that saved me.");
|
||||
|
||||
const u8 gMatchCallFlavorText_Champion_Wallace_Strategy[] = _("Dignity and respect.");
|
||||
const u8 gMatchCallFlavorText_Champion_Wallace_Pokemon[] = _("I prefer POKéMON of grace.");
|
||||
const u8 gMatchCallFlavorText_Champion_Wallace_Intro1[] = _("I represent beauty as");
|
||||
const u8 gMatchCallFlavorText_Champion_Wallace_Intro2[] = _("well as intelligence.");
|
||||
|
||||
const u8 *const gMatchCallMessages[][4] =
|
||||
{
|
||||
[REMATCH_ROSE] = MCFLAVOR(AromaLady_Rose),
|
||||
[REMATCH_ANDRES] = MCFLAVOR(RuinManiac_Andres),
|
||||
[REMATCH_DUSTY] = MCFLAVOR(RuinManiac_Dusty),
|
||||
[REMATCH_LOLA] = MCFLAVOR(Tuber_Lola),
|
||||
[REMATCH_RICKY] = MCFLAVOR(Tuber_Ricky),
|
||||
[REMATCH_LILA_AND_ROY] = MCFLAVOR(SisAndBro_LilaAndRoy),
|
||||
[REMATCH_CRISTIN] = MCFLAVOR(Cooltrainer_Cristin),
|
||||
[REMATCH_BROOKE] = MCFLAVOR(Cooltrainer_Brooke),
|
||||
[REMATCH_WILTON] = MCFLAVOR(Cooltrainer_Wilton),
|
||||
[REMATCH_VALERIE] = MCFLAVOR(HexManiac_Valerie),
|
||||
[REMATCH_CINDY] = MCFLAVOR(Lady_Cindy),
|
||||
[REMATCH_THALIA] = MCFLAVOR(Beauty_Thalia),
|
||||
[REMATCH_JESSICA] = MCFLAVOR(Beauty_Jessica),
|
||||
[REMATCH_WINSTON] = MCFLAVOR(RichBoy_Winston),
|
||||
[REMATCH_STEVE] = MCFLAVOR(PokeManiac_Steve),
|
||||
[REMATCH_TONY] = MCFLAVOR(Swimmer_Tony),
|
||||
[REMATCH_NOB] = MCFLAVOR(BlackBelt_Nob),
|
||||
[REMATCH_KOJI] = MCFLAVOR(BlackBelt_Koji),
|
||||
[REMATCH_FERNANDO] = MCFLAVOR(Guitarist_Fernando),
|
||||
[REMATCH_DALTON] = MCFLAVOR(Guitarist_Dalton),
|
||||
[REMATCH_BERNIE] = MCFLAVOR(Kindler_Bernie),
|
||||
[REMATCH_ETHAN] = MCFLAVOR(Camper_Ethan),
|
||||
[REMATCH_JOHN_AND_JAY] = MCFLAVOR(OldCouple_JohnAndJay),
|
||||
[REMATCH_JEFFREY] = MCFLAVOR(BugManiac_Jeffrey),
|
||||
[REMATCH_CAMERON] = MCFLAVOR(Psychic_Cameron),
|
||||
[REMATCH_JACKI] = MCFLAVOR(Psychic_Jacki),
|
||||
[REMATCH_WALTER] = MCFLAVOR(Gentleman_Walter),
|
||||
[REMATCH_KAREN] = MCFLAVOR(SchoolKid_Karen),
|
||||
[REMATCH_JERRY] = MCFLAVOR(SchoolKid_Jerry),
|
||||
[REMATCH_ANNA_AND_MEG] = MCFLAVOR(SrAndJr_AnnaAndMeg),
|
||||
[REMATCH_ISABEL] = MCFLAVOR(Pokefan_Isabel),
|
||||
[REMATCH_MIGUEL] = MCFLAVOR(Pokefan_Miguel),
|
||||
[REMATCH_TIMOTHY] = MCFLAVOR(Expert_Timothy),
|
||||
[REMATCH_SHELBY] = MCFLAVOR(Expert_Shelby),
|
||||
[REMATCH_CALVIN] = MCFLAVOR(Youngster_Calvin),
|
||||
[REMATCH_ELLIOT] = MCFLAVOR(Fisherman_Elliot),
|
||||
[REMATCH_ISAIAH] = MCFLAVOR(Triathlete_Isaiah),
|
||||
[REMATCH_MARIA] = MCFLAVOR(Triathlete_Maria),
|
||||
[REMATCH_ABIGAIL] = MCFLAVOR(Triathlete_Abigail),
|
||||
[REMATCH_DYLAN] = MCFLAVOR(Triathlete_Dylan),
|
||||
[REMATCH_KATELYN] = MCFLAVOR(Triathlete_Katelyn),
|
||||
[REMATCH_BENJAMIN] = MCFLAVOR(Triathlete_Benjamin),
|
||||
[REMATCH_PABLO] = MCFLAVOR(Triathlete_Pablo),
|
||||
[REMATCH_NICOLAS] = MCFLAVOR(DragonTamer_Nicolas),
|
||||
[REMATCH_ROBERT] = MCFLAVOR(BirdKeeper_Robert),
|
||||
[REMATCH_LAO] = MCFLAVOR(NinjaBoy_Lao),
|
||||
[REMATCH_CYNDY] = MCFLAVOR(BattleGirl_Cyndy),
|
||||
[REMATCH_MADELINE] = MCFLAVOR(ParasolLady_Madeline),
|
||||
[REMATCH_JENNY] = MCFLAVOR(Swimmer_Jenny),
|
||||
[REMATCH_DIANA] = MCFLAVOR(Picnicker_Diana),
|
||||
[REMATCH_AMY_AND_LIV] = MCFLAVOR(Twins_AmyAndLiv),
|
||||
[REMATCH_ERNEST] = MCFLAVOR(Sailor_Ernest),
|
||||
[REMATCH_CORY] = MCFLAVOR(Sailor_Cory),
|
||||
[REMATCH_EDWIN] = MCFLAVOR(Collector_Edwin),
|
||||
[REMATCH_LYDIA] = MCFLAVOR(PkmnBreeder_Lydia),
|
||||
[REMATCH_ISAAC] = MCFLAVOR(PkmnBreeder_Isaac),
|
||||
[REMATCH_GABRIELLE] = MCFLAVOR(PkmnBreeder_Gabrielle),
|
||||
[REMATCH_CATHERINE] = MCFLAVOR(PkmnRanger_Catherine),
|
||||
[REMATCH_JACKSON] = MCFLAVOR(PkmnRanger_Jackson),
|
||||
[REMATCH_HALEY] = MCFLAVOR(Lass_Haley),
|
||||
[REMATCH_JAMES] = MCFLAVOR(BugCatcher_James),
|
||||
[REMATCH_TRENT] = MCFLAVOR(Hiker_Trent),
|
||||
[REMATCH_SAWYER] = MCFLAVOR(Hiker_Sawyer),
|
||||
[REMATCH_KIRA_AND_DAN] = MCFLAVOR(YoungCouple_LoisAndHal),
|
||||
[REMATCH_WALLY_3] = MCFLAVOR(PkmnTrainer_Wally),
|
||||
[REMATCH_ROXANNE] = MCFLAVOR(RockinWhiz_Roxanne),
|
||||
[REMATCH_BRAWLY] = MCFLAVOR(TheBigHit_Brawly),
|
||||
[REMATCH_WATTSON] = MCFLAVOR(SwellShock_Wattson),
|
||||
[REMATCH_FLANNERY] = MCFLAVOR(PassionBurn_Flannery),
|
||||
[REMATCH_NORMAN] = MCFLAVOR(ReliableOne_Dad),
|
||||
[REMATCH_WINONA] = MCFLAVOR(SkyTamer_Winona),
|
||||
[REMATCH_TATE_AND_LIZA] = MCFLAVOR(MysticDuo_TateAndLiza),
|
||||
[REMATCH_JUAN] = MCFLAVOR(DandyCharm_Juan),
|
||||
[REMATCH_SIDNEY] = MCFLAVOR(EliteFour_Sidney),
|
||||
[REMATCH_PHOEBE] = MCFLAVOR(EliteFour_Phoebe),
|
||||
[REMATCH_GLACIA] = MCFLAVOR(EliteFour_Glacia),
|
||||
[REMATCH_DRAKE] = MCFLAVOR(EliteFour_Drake),
|
||||
[REMATCH_WALLACE] = MCFLAVOR(Champion_Wallace),
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
const u8 gRibbonDescriptionPart1_Champion[] = _("CHAMPION-beating, HALL");
|
||||
const u8 gRibbonDescriptionPart2_Champion[] = _("OF FAME Member RIBBON");
|
||||
const u8 gRibbonDescriptionPart1_CoolContest[] = _("COOL CONTEST");
|
||||
const u8 gRibbonDescriptionPart1_BeautyContest[] = _("BEAUTY CONTEST");
|
||||
const u8 gRibbonDescriptionPart1_CuteContest[] = _("CUTE CONTEST");
|
||||
const u8 gRibbonDescriptionPart1_SmartContest[] = _("SMART CONTEST");
|
||||
const u8 gRibbonDescriptionPart1_ToughContest[] = _("TOUGH CONTEST");
|
||||
const u8 gRibbonDescriptionPart2_NormalRank[] = _("Normal Rank winner!");
|
||||
const u8 gRibbonDescriptionPart2_SuperRank[] = _("Super Rank winner!");
|
||||
const u8 gRibbonDescriptionPart2_HyperRank[] = _("Hyper Rank winner!");
|
||||
const u8 gRibbonDescriptionPart2_MasterRank[] = _("Master Rank winner!");
|
||||
const u8 gRibbonDescriptionPart1_Winning[] = _("For clearing LV50");
|
||||
const u8 gRibbonDescriptionPart2_Winning[] = _("at the BATTLE TOWER.");
|
||||
const u8 gRibbonDescriptionPart1_Victory[] = _("For clearing Open Level");
|
||||
const u8 gRibbonDescriptionPart2_Victory[] = _("at the BATTLE TOWER.");
|
||||
const u8 gRibbonDescriptionPart1_Artist[] = _("RIBBON for being chosen");
|
||||
const u8 gRibbonDescriptionPart2_Artist[] = _("as a super sketch model.");
|
||||
const u8 gRibbonDescriptionPart1_Effort[] = _("RIBBON awarded for");
|
||||
const u8 gRibbonDescriptionPart2_Effort[] = _("being a hard worker.");
|
||||
|
||||
const u8 *const gRibbonDescriptionPointers[][2] =
|
||||
{
|
||||
{gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion},
|
||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank},
|
||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank},
|
||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank},
|
||||
{gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank},
|
||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank},
|
||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank},
|
||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank},
|
||||
{gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank},
|
||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank},
|
||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank},
|
||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank},
|
||||
{gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank},
|
||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank},
|
||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank},
|
||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank},
|
||||
{gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank},
|
||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank},
|
||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank},
|
||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank},
|
||||
{gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank},
|
||||
{gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning},
|
||||
{gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory},
|
||||
{gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist},
|
||||
{gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort},
|
||||
};
|
||||
@@ -47,7 +47,7 @@ const u8 gTrainerClassNames[][13] = {
|
||||
[TRAINER_CLASS_SWIMMER_F] = _("SWIMMER♀"),
|
||||
[TRAINER_CLASS_TWINS] = _("TWINS"),
|
||||
[TRAINER_CLASS_SAILOR] = _("SAILOR"),
|
||||
[TRAINER_CLASS_COOLTRAINER_UNUSED] = _("COOLTRAINER"),
|
||||
[TRAINER_CLASS_COOLTRAINER_2] = _("COOLTRAINER"),
|
||||
[TRAINER_CLASS_MAGMA_ADMIN] = _("MAGMA ADMIN"),
|
||||
[TRAINER_CLASS_PKMN_TRAINER_3] = _("{PKMN} TRAINER"),
|
||||
[TRAINER_CLASS_BUG_CATCHER] = _("BUG CATCHER"),
|
||||
@@ -64,5 +64,5 @@ const u8 gTrainerClassNames[][13] = {
|
||||
[TRAINER_CLASS_FACTORY_HEAD] = _("FACTORY HEAD"),
|
||||
[TRAINER_CLASS_PIKE_QUEEN] = _("PIKE QUEEN"),
|
||||
[TRAINER_CLASS_PYRAMID_KING] = _("PYRAMID KING"),
|
||||
[TRAINER_CLASS_PKMN_TRAINER_4] = _("{PKMN} TRAINER"),
|
||||
[TRAINER_CLASS_RS_PROTAG] = _("{PKMN} TRAINER"),
|
||||
};
|
||||
|
||||
+1712
-1712
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Executable
+12186
File diff suppressed because it is too large
Load Diff
Executable
+67
@@ -0,0 +1,67 @@
|
||||
{{ doNotModifyHeader }}
|
||||
## for wild_encounter_group in wild_encounter_groups
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{% if existsIn(encounter, "land_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_LandMons[] =
|
||||
{
|
||||
## for wild_mon in encounter.land_mons.mons
|
||||
{ {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_LandMonsInfo = { {{encounter.land_mons.encounter_rate}}, {{ encounter.base_label }}_LandMons };
|
||||
{% endif %}
|
||||
{% if existsIn(encounter, "water_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_WaterMons[] =
|
||||
{
|
||||
## for wild_mon in encounter.water_mons.mons
|
||||
{ {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_WaterMonsInfo = { {{encounter.water_mons.encounter_rate}}, {{ encounter.base_label }}_WaterMons };
|
||||
{% endif %}
|
||||
{% if existsIn(encounter, "rock_smash_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_RockSmashMons[] =
|
||||
{
|
||||
## for wild_mon in encounter.rock_smash_mons.mons
|
||||
{ {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_RockSmashMonsInfo = { {{encounter.rock_smash_mons.encounter_rate}}, {{ encounter.base_label }}_RockSmashMons };
|
||||
{% endif %}
|
||||
{% if existsIn(encounter, "fishing_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_FishingMons[] =
|
||||
{
|
||||
## for wild_mon in encounter.fishing_mons.mons
|
||||
{ {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_FishingMonsInfo = { {{encounter.fishing_mons.encounter_rate}}, {{ encounter.base_label }}_FishingMons };
|
||||
{% endif %}
|
||||
## endfor
|
||||
|
||||
const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
|
||||
{
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{
|
||||
.mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP({{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %},
|
||||
.mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM({{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %},
|
||||
.landMonsInfo = {% if existsIn(encounter, "land_mons") %}&{{ encounter.base_label }}_LandMonsInfo{% else %}NULL{% endif %},
|
||||
.waterMonsInfo = {% if existsIn(encounter, "water_mons") %}&{{ encounter.base_label }}_WaterMonsInfo{% else %}NULL{% endif %},
|
||||
.rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %},
|
||||
.fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %},
|
||||
},
|
||||
## endfor
|
||||
{
|
||||
.mapGroup = MAP_GROUP(UNDEFINED),
|
||||
.mapNum = MAP_NUM(UNDEFINED),
|
||||
.landMonsInfo = NULL,
|
||||
.waterMonsInfo = NULL,
|
||||
.rockSmashMonsInfo = NULL,
|
||||
.fishingMonsInfo = NULL,
|
||||
},
|
||||
};
|
||||
## endfor
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
#define PLACE_DECORATION_SELECTOR_TAG 0xbe5
|
||||
#define PLACE_DECORATION_PLAYER_TAG 0x008
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
#define DMA_REQUEST_COPY16 3
|
||||
#define DMA_REQUEST_FILL16 4
|
||||
|
||||
IWRAM_DATA struct
|
||||
BSS_DATA struct
|
||||
{
|
||||
const u8 *src;
|
||||
u8 *dest;
|
||||
@@ -17,7 +17,7 @@ IWRAM_DATA struct
|
||||
u32 value;
|
||||
} gDma3Requests[MAX_DMA_REQUESTS];
|
||||
|
||||
static bool8 gDma3ManagerLocked;
|
||||
static volatile bool8 gDma3ManagerLocked;
|
||||
static u8 gDma3RequestCursor;
|
||||
|
||||
void ClearDma3Requests(void)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -73,7 +73,7 @@ static void CreateRandomEggShardSprite(void);
|
||||
static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex);
|
||||
|
||||
// IWRAM bss
|
||||
static IWRAM_DATA struct EggHatchData *sEggHatchData;
|
||||
static struct EggHatchData *sEggHatchData;
|
||||
|
||||
// rom data
|
||||
static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal");
|
||||
|
||||
+11
-11
@@ -26,17 +26,17 @@ static void sub_81D414C(void);
|
||||
static void sub_81D3F1C(u32, u32*, u32*);
|
||||
static void sub_81D3F68(void);
|
||||
|
||||
IWRAM_DATA struct Unknown030012C8 gUnknown_030012C8;
|
||||
IWRAM_DATA u16 gUnknown_030012E0;
|
||||
IWRAM_DATA u16 gUnknown_030012E2;
|
||||
IWRAM_DATA u16 gUnknown_030012E4;
|
||||
IWRAM_DATA u16 gUnknown_030012E6;
|
||||
IWRAM_DATA u32 gUnknown_030012E8;
|
||||
IWRAM_DATA u16 gUnknown_030012EC;
|
||||
IWRAM_DATA u16 gUnknown_030012EE;
|
||||
IWRAM_DATA u16 gUnknown_030012F0;
|
||||
IWRAM_DATA u16 gUnknown_030012F2;
|
||||
IWRAM_DATA u16 gUnknown_030012F4;
|
||||
static struct Unknown030012C8 gUnknown_030012C8;
|
||||
static u16 gUnknown_030012E0;
|
||||
static u16 gUnknown_030012E2;
|
||||
static u16 gUnknown_030012E4;
|
||||
static u16 gUnknown_030012E6;
|
||||
static u32 gUnknown_030012E8;
|
||||
static u16 gUnknown_030012EC;
|
||||
static u16 gUnknown_030012EE;
|
||||
static u16 gUnknown_030012F0;
|
||||
static u16 gUnknown_030012F2;
|
||||
static u16 gUnknown_030012F4;
|
||||
|
||||
extern const u8 gUnknown_08625B6C[][0x148];
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ struct Unk03006370
|
||||
|
||||
static void sub_81D5084(u8);
|
||||
|
||||
extern struct Unk03006370 gUnknown_03006370;
|
||||
struct Unk03006370 gUnknown_03006370;
|
||||
|
||||
extern const u8 gUnknown_089A3470[];
|
||||
extern const u8 gMultiBootProgram_BerryGlitchFix_Start[];
|
||||
|
||||
@@ -556,7 +556,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_10, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, (&data));
|
||||
|
||||
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + 5; i++)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
|
||||
|
||||
+5
-5
@@ -36,11 +36,11 @@ static void DrawMetatile(s32 a, u16 *b, u16 c);
|
||||
static void CameraPanningCB_PanAhead(void);
|
||||
|
||||
// IWRAM bss vars
|
||||
static IWRAM_DATA struct FieldCameraOffset sFieldCameraOffset;
|
||||
static IWRAM_DATA s16 sHorizontalCameraPan;
|
||||
static IWRAM_DATA s16 sVerticalCameraPan;
|
||||
static IWRAM_DATA u8 gUnknown_03000E2C;
|
||||
static IWRAM_DATA void (*sFieldCameraPanningCallback)(void);
|
||||
static struct FieldCameraOffset sFieldCameraOffset;
|
||||
static s16 sHorizontalCameraPan;
|
||||
static s16 sVerticalCameraPan;
|
||||
static u8 gUnknown_03000E2C;
|
||||
static void (*sFieldCameraPanningCallback)(void);
|
||||
|
||||
struct CameraObject gFieldCamera;
|
||||
u16 gTotalCameraPixelOffsetY;
|
||||
|
||||
@@ -304,7 +304,7 @@ static const u8 *GetInteractedEventObjectScript(struct MapPosition *position, u8
|
||||
gSpecialVar_Facing = direction;
|
||||
|
||||
if (InTrainerHill() == TRUE)
|
||||
script = sub_81D62AC();
|
||||
script = GetTrainerHillTrainerScript();
|
||||
else
|
||||
script = GetEventObjectScriptPointerByEventObjectId(eventObjectId);
|
||||
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@ static void Fldeff_MoveDeoxysRock_Step(u8 taskId);
|
||||
|
||||
// Static RAM declarations
|
||||
|
||||
static IWRAM_DATA u8 sActiveList[32];
|
||||
static u8 sActiveList[32];
|
||||
|
||||
// External declarations
|
||||
extern struct CompressedSpritePalette gMonPaletteTable[]; // GF made a mistake and did not extern it as const.
|
||||
|
||||
@@ -868,13 +868,13 @@ u32 FldEff_Unknown22(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StartAshFieldEffect(s16 x, s16 y, u16 c, s16 d)
|
||||
void StartAshFieldEffect(s16 x, s16 y, u16 metatileId, s16 d)
|
||||
{
|
||||
gFieldEffectArguments[0] = x;
|
||||
gFieldEffectArguments[1] = y;
|
||||
gFieldEffectArguments[2] = 0x52;
|
||||
gFieldEffectArguments[3] = 1;
|
||||
gFieldEffectArguments[4] = c;
|
||||
gFieldEffectArguments[4] = metatileId;
|
||||
gFieldEffectArguments[5] = d;
|
||||
FieldEffectStart(FLDEFF_ASH);
|
||||
}
|
||||
|
||||
@@ -336,14 +336,9 @@ void player_step(u8 direction, u16 newKeys, u16 heldKeys)
|
||||
|
||||
static bool8 TryInterruptEventObjectSpecialAnim(struct EventObject *playerEventObj, u8 direction)
|
||||
{
|
||||
#ifdef NONMATCHING
|
||||
u8 r5 = direction;
|
||||
u8 r6 = direction;
|
||||
#else
|
||||
u8 r5 = direction;
|
||||
register u8 r6 asm("r6") = direction;
|
||||
#endif
|
||||
//a very bad HACK
|
||||
u8 r5 = direction;
|
||||
u8 r6 = direction;
|
||||
r6++; r6--;
|
||||
|
||||
if (EventObjectIsMovementOverridden(playerEventObj)
|
||||
&& !EventObjectClearHeldMovementIfFinished(playerEventObj))
|
||||
@@ -1337,13 +1332,13 @@ void SetPlayerAvatarStateMask(u8 flags)
|
||||
gPlayerAvatar.flags |= flags;
|
||||
}
|
||||
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 a, u8 gender)
|
||||
static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (gUnknown_0849750C[gender][i][0] == a)
|
||||
if (gUnknown_0849750C[gender][i][0] == graphicsId)
|
||||
return gUnknown_0849750C[gender][i][1];
|
||||
}
|
||||
return 1;
|
||||
@@ -1362,9 +1357,9 @@ u8 GetPlayerAvatarGraphicsIdByCurrentState(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetPlayerAvatarExtraStateTransition(u8 a, u8 b)
|
||||
void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 b)
|
||||
{
|
||||
u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(a, gPlayerAvatar.gender);
|
||||
u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender);
|
||||
|
||||
gPlayerAvatar.unk1 |= unk | b;
|
||||
DoPlayerAvatarTransition();
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
#define SECONDS(value) ((signed) (60.0 * value + 0.5))
|
||||
|
||||
@@ -202,9 +204,9 @@ void Task_HandleTruckSequence(u8 taskId)
|
||||
data[1]++;
|
||||
if (data[1] == 120)
|
||||
{
|
||||
MapGridSetMetatileIdAt(11, 8, 520);
|
||||
MapGridSetMetatileIdAt(11, 9, 528);
|
||||
MapGridSetMetatileIdAt(11, 10, 536);
|
||||
MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, ExitLight_Top));
|
||||
MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, ExitLight_Mid));
|
||||
MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, ExitLight_Bottom));
|
||||
DrawWholeMapView();
|
||||
PlaySE(SE_TRACK_DOOR);
|
||||
DestroyTask(taskId);
|
||||
@@ -216,9 +218,9 @@ void Task_HandleTruckSequence(u8 taskId)
|
||||
|
||||
void ExecuteTruckSequence(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(11, 8, 525);
|
||||
MapGridSetMetatileIdAt(11, 9, 533);
|
||||
MapGridSetMetatileIdAt(11, 10, 541);
|
||||
MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, DoorClosedFloor_Top));
|
||||
MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, DoorClosedFloor_Mid));
|
||||
MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, DoorClosedFloor_Bottom));
|
||||
DrawWholeMapView();
|
||||
ScriptContext2_Enable();
|
||||
CpuFastFill(0, gPlttBufferFaded, 0x400);
|
||||
@@ -311,7 +313,7 @@ void Task_HandlePorthole(u8 taskId)
|
||||
|
||||
void sub_80FB6EC(void)
|
||||
{
|
||||
u8 spriteId = AddPseudoEventObject(0x8C, SpriteCallbackDummy, 112, 80, 0);
|
||||
u8 spriteId = AddPseudoEventObject(EVENT_OBJ_GFX_SS_TIDAL, SpriteCallbackDummy, 112, 80, 0);
|
||||
|
||||
gSprites[spriteId].coordOffsetEnabled = FALSE;
|
||||
|
||||
|
||||
+190
-154
@@ -55,13 +55,14 @@
|
||||
#include "constants/vars.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/weather.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
#include "palette.h"
|
||||
|
||||
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
|
||||
EWRAM_DATA u8 gBikeCollisions = 0;
|
||||
static EWRAM_DATA u32 gBikeCyclingTimer = 0;
|
||||
static EWRAM_DATA u8 gUnknown_0203AB5C = 0;
|
||||
static EWRAM_DATA u8 gUnknown_0203AB5D = 0;
|
||||
static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0;
|
||||
static EWRAM_DATA u8 gUnknown_0203AB5E = 0;
|
||||
static EWRAM_DATA u16 gUnknown_0203AB60 = 0;
|
||||
static EWRAM_DATA u16 gUnknown_0203AB62 = 0;
|
||||
@@ -100,7 +101,7 @@ static void sub_81395BC(u8 taskId);
|
||||
static void sub_8139620(u8 taskId);
|
||||
static void sub_8139AF4(u8 taskId);
|
||||
static void sub_8139C2C(u16 a1, u8 a2);
|
||||
static void sub_8139C80(u8 taskId);
|
||||
static void MoveElevatorWindowLights(u8 taskId);
|
||||
static void sub_813A2DC(u8 taskId);
|
||||
static void sub_813AA60(u16 a0, u16 a1);
|
||||
static void sub_813ACE8(u8 a0, u16 a1);
|
||||
@@ -623,25 +624,26 @@ static void LoadLinkPartnerEventObjectSpritePalette(u8 graphicsId, u8 localEvent
|
||||
}
|
||||
}
|
||||
|
||||
static const struct UCoords8 gUnknown_085B2B68[] = {
|
||||
static const struct UCoords8 sMauvilleGymSwitchCoords[] = {
|
||||
{ 7, 22},
|
||||
{11, 19},
|
||||
{10, 16},
|
||||
{15, 16}
|
||||
};
|
||||
|
||||
// Flips the switches on the ground when the player steps on them.
|
||||
void MauvilleGymSpecial1(void)
|
||||
{
|
||||
u8 i;
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_085B2B68); i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sMauvilleGymSwitchCoords); i++)
|
||||
{
|
||||
if (i == gSpecialVar_0x8004)
|
||||
{
|
||||
MapGridSetMetatileIdAt(gUnknown_085B2B68[i].x, gUnknown_085B2B68[i].y, 0x206);
|
||||
MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, PressedSwitch));
|
||||
}
|
||||
else
|
||||
{
|
||||
MapGridSetMetatileIdAt(gUnknown_085B2B68[i].x, gUnknown_085B2B68[i].y, 0x205);
|
||||
MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, RaisedSwitch));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -655,100 +657,101 @@ void MauvilleGymSpecial2(void)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x220:
|
||||
MapGridSetMetatileIdAt(x, y, 0x230);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off));
|
||||
break;
|
||||
case 0x221:
|
||||
MapGridSetMetatileIdAt(x, y, 0x231);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off));
|
||||
break;
|
||||
case 0x228:
|
||||
MapGridSetMetatileIdAt(x, y, 0x238);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH3_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off));
|
||||
break;
|
||||
case 0x229:
|
||||
MapGridSetMetatileIdAt(x, y, 0x239);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH4_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off));
|
||||
break;
|
||||
case 0x230:
|
||||
MapGridSetMetatileIdAt(x, y, 0x220);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH1_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_On));
|
||||
break;
|
||||
case 0x231:
|
||||
MapGridSetMetatileIdAt(x, y, 0x221);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH2_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_On));
|
||||
break;
|
||||
case 0x238:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe28);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH3_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x239:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe29);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH4_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x222:
|
||||
MapGridSetMetatileIdAt(x, y, 0x232);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off));
|
||||
break;
|
||||
case 0x223:
|
||||
MapGridSetMetatileIdAt(x, y, 0x233);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off));
|
||||
break;
|
||||
case 0x22a:
|
||||
MapGridSetMetatileIdAt(x, y, 0x23a);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH3_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off));
|
||||
break;
|
||||
case 0x22b:
|
||||
MapGridSetMetatileIdAt(x, y, 0x23b);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH4_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off));
|
||||
break;
|
||||
case 0x232:
|
||||
MapGridSetMetatileIdAt(x, y, 0x222);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH1_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_On));
|
||||
break;
|
||||
case 0x233:
|
||||
MapGridSetMetatileIdAt(x, y, 0x223);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH2_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_On));
|
||||
break;
|
||||
case 0x23a:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe2a);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH3_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x23b:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe2b);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH4_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x240:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe42);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamV1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x248:
|
||||
MapGridSetMetatileIdAt(x, y, 0x21a);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamV2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile));
|
||||
break;
|
||||
case 0x241:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe43);
|
||||
case METATILE_ID(MauvilleGym, RedBeamV1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x249:
|
||||
MapGridSetMetatileIdAt(x, y, 0x21a);
|
||||
case METATILE_ID(MauvilleGym, RedBeamV2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile));
|
||||
break;
|
||||
case 0x242:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe40);
|
||||
case METATILE_ID(MauvilleGym, PoleBottom_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV1_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x21a:
|
||||
if (MapGridGetMetatileIdAt(x, y - 1) == 0x240)
|
||||
case METATILE_ID(MauvilleGym, FloorTile):
|
||||
if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_ID(MauvilleGym, GreenBeamV1_On))
|
||||
{
|
||||
MapGridSetMetatileIdAt(x, y, 0xe48);
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV2_On) | METATILE_COLLISION_MASK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MapGridSetMetatileIdAt(x, y, 0xe49);
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV2_On) | METATILE_COLLISION_MASK);
|
||||
}
|
||||
break;
|
||||
case 0x243:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe41);
|
||||
case METATILE_ID(MauvilleGym, PoleBottom_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV1_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x251:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe50);
|
||||
case METATILE_ID(MauvilleGym, PoleTop_Off):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x250:
|
||||
MapGridSetMetatileIdAt(x, y, 0x251);
|
||||
case METATILE_ID(MauvilleGym, PoleTop_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Presses all switches and deactivates all beams.
|
||||
void MauvilleGymSpecial3(void)
|
||||
{
|
||||
int i, x, y;
|
||||
const struct UCoords8 *switchCoords = gUnknown_085B2B68;
|
||||
for (i = ARRAY_COUNT(gUnknown_085B2B68) - 1; i >= 0; i--)
|
||||
const struct UCoords8 *switchCoords = sMauvilleGymSwitchCoords;
|
||||
for (i = ARRAY_COUNT(sMauvilleGymSwitchCoords) - 1; i >= 0; i--)
|
||||
{
|
||||
MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, 0x206);
|
||||
MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, METATILE_ID(MauvilleGym, PressedSwitch));
|
||||
switchCoords++;
|
||||
}
|
||||
for (y = 12; y < 24; y++)
|
||||
@@ -757,42 +760,42 @@ void MauvilleGymSpecial3(void)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x220:
|
||||
MapGridSetMetatileIdAt(x, y, 0x230);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off));
|
||||
break;
|
||||
case 0x221:
|
||||
MapGridSetMetatileIdAt(x, y, 0x231);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off));
|
||||
break;
|
||||
case 0x228:
|
||||
MapGridSetMetatileIdAt(x, y, 0x238);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH3_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off));
|
||||
break;
|
||||
case 0x229:
|
||||
MapGridSetMetatileIdAt(x, y, 0x239);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamH4_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off));
|
||||
break;
|
||||
case 0x222:
|
||||
MapGridSetMetatileIdAt(x, y, 0x232);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off));
|
||||
break;
|
||||
case 0x223:
|
||||
MapGridSetMetatileIdAt(x, y, 0x233);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off));
|
||||
break;
|
||||
case 0x22a:
|
||||
MapGridSetMetatileIdAt(x, y, 0x23a);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH3_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off));
|
||||
break;
|
||||
case 0x22b:
|
||||
MapGridSetMetatileIdAt(x, y, 0x23b);
|
||||
case METATILE_ID(MauvilleGym, RedBeamH4_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off));
|
||||
break;
|
||||
case 0x240:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe42);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamV1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x241:
|
||||
MapGridSetMetatileIdAt(x, y, 0xe43);
|
||||
case METATILE_ID(MauvilleGym, RedBeamV1_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 0x248:
|
||||
case 0x249:
|
||||
MapGridSetMetatileIdAt(x, y, 0x21a);
|
||||
case METATILE_ID(MauvilleGym, GreenBeamV2_On):
|
||||
case METATILE_ID(MauvilleGym, RedBeamV2_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile));
|
||||
break;
|
||||
case 0x250:
|
||||
MapGridSetMetatileIdAt(x, y, 0x251);
|
||||
case METATILE_ID(MauvilleGym, PoleTop_On):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -800,23 +803,30 @@ void MauvilleGymSpecial3(void)
|
||||
}
|
||||
|
||||
static const u8 gUnknown_085B2B78[] = {0, 1, 1, 1, 1};
|
||||
static const u16 gUnknown_085B2B7E[] = {0x218, 0x219, 0x21a, 0x21b, 0x21c};
|
||||
|
||||
static const u16 sPetalburgGymSlidingDoorMetatiles[] = {
|
||||
METATILE_ID(PetalburgGym, SlidingDoor_Frame0),
|
||||
METATILE_ID(PetalburgGym, SlidingDoor_Frame1),
|
||||
METATILE_ID(PetalburgGym, SlidingDoor_Frame2),
|
||||
METATILE_ID(PetalburgGym, SlidingDoor_Frame3),
|
||||
METATILE_ID(PetalburgGym, SlidingDoor_Frame4),
|
||||
};
|
||||
|
||||
void PetalburgGymSpecial1(void)
|
||||
{
|
||||
gUnknown_0203AB5C = 0;
|
||||
gUnknown_0203AB5D = 0;
|
||||
sPetalburgGymSlidingDoorFrameCounter = 0;
|
||||
PlaySE(SE_KI_GASYAN);
|
||||
CreateTask(Task_PetalburgGym, 8);
|
||||
}
|
||||
|
||||
static void Task_PetalburgGym(u8 taskId)
|
||||
{
|
||||
if (gUnknown_085B2B78[gUnknown_0203AB5D] == gUnknown_0203AB5C)
|
||||
if (gUnknown_085B2B78[sPetalburgGymSlidingDoorFrameCounter] == gUnknown_0203AB5C)
|
||||
{
|
||||
PetalburgGymFunc(gSpecialVar_0x8004, gUnknown_085B2B7E[gUnknown_0203AB5D]);
|
||||
PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[sPetalburgGymSlidingDoorFrameCounter]);
|
||||
gUnknown_0203AB5C = 0;
|
||||
if ((++gUnknown_0203AB5D) == 5)
|
||||
if ((++sPetalburgGymSlidingDoorFrameCounter) == ARRAY_COUNT(sPetalburgGymSlidingDoorMetatiles))
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
@@ -828,74 +838,74 @@ static void Task_PetalburgGym(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void PetalburgGymFunc(u8 a0, u16 a1)
|
||||
static void PetalburgGymFunc(u8 roomNumber, u16 metatileId)
|
||||
{
|
||||
u16 x[4];
|
||||
u16 y[4];
|
||||
u16 doorCoordsX[4];
|
||||
u16 doorCoordsY[4];
|
||||
u8 i;
|
||||
u8 nDoors = 0;
|
||||
switch (a0)
|
||||
switch (roomNumber)
|
||||
{
|
||||
case 1:
|
||||
nDoors = 2;
|
||||
x[0] = 1;
|
||||
x[1] = 7;
|
||||
y[0] = 0x68;
|
||||
y[1] = 0x68;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsX[1] = 7;
|
||||
doorCoordsY[0] = 104;
|
||||
doorCoordsY[1] = 104;
|
||||
break;
|
||||
case 2:
|
||||
nDoors = 2;
|
||||
x[0] = 1;
|
||||
x[1] = 7;
|
||||
y[0] = 0x4e;
|
||||
y[1] = 0x4e;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsX[1] = 7;
|
||||
doorCoordsY[0] = 78;
|
||||
doorCoordsY[1] = 78;
|
||||
break;
|
||||
case 3:
|
||||
nDoors = 2;
|
||||
x[0] = 1;
|
||||
x[1] = 7;
|
||||
y[0] = 0x5b;
|
||||
y[1] = 0x5b;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsX[1] = 7;
|
||||
doorCoordsY[0] = 91;
|
||||
doorCoordsY[1] = 91;
|
||||
break;
|
||||
case 4:
|
||||
nDoors = 1;
|
||||
x[0] = 7;
|
||||
y[0] = 0x27;
|
||||
doorCoordsX[0] = 7;
|
||||
doorCoordsY[0] = 39;
|
||||
break;
|
||||
case 5:
|
||||
nDoors = 2;
|
||||
x[0] = 1;
|
||||
x[1] = 7;
|
||||
y[0] = 0x34;
|
||||
y[1] = 0x34;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsX[1] = 7;
|
||||
doorCoordsY[0] = 52;
|
||||
doorCoordsY[1] = 52;
|
||||
break;
|
||||
case 6:
|
||||
nDoors = 1;
|
||||
x[0] = 1;
|
||||
y[0] = 0x41;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsY[0] = 65;
|
||||
break;
|
||||
case 7:
|
||||
nDoors = 1;
|
||||
x[0] = 7;
|
||||
y[0] = 0xd;
|
||||
doorCoordsX[0] = 7;
|
||||
doorCoordsY[0] = 13;
|
||||
break;
|
||||
case 8:
|
||||
nDoors = 1;
|
||||
x[0] = 1;
|
||||
y[0] = 0x1a;
|
||||
doorCoordsX[0] = 1;
|
||||
doorCoordsY[0] = 26;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < nDoors; i++)
|
||||
{
|
||||
MapGridSetMetatileIdAt(x[i] + 7, y[i] + 7, a1 | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(x[i] + 7, y[i] + 8, (a1 + 8) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 7, metatileId | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 8, (metatileId + 8) | METATILE_COLLISION_MASK);
|
||||
}
|
||||
DrawWholeMapView();
|
||||
}
|
||||
|
||||
void PetalburgGymSpecial2(void)
|
||||
{
|
||||
PetalburgGymFunc(gSpecialVar_0x8004, gUnknown_085B2B7E[4]);
|
||||
PetalburgGymFunc(gSpecialVar_0x8004, sPetalburgGymSlidingDoorMetatiles[4]);
|
||||
}
|
||||
|
||||
void ShowFieldMessageStringVar4(void)
|
||||
@@ -1067,6 +1077,7 @@ static void PCTurnOnEffect_0(struct Task *task)
|
||||
task->data[3]++;
|
||||
}
|
||||
|
||||
// enum pc location,
|
||||
static void PCTurnOnEffect_1(s16 flag, s8 dx, s8 dy)
|
||||
{
|
||||
u16 tileId = 0;
|
||||
@@ -1074,30 +1085,30 @@ static void PCTurnOnEffect_1(s16 flag, s8 dx, s8 dy)
|
||||
{
|
||||
if (gSpecialVar_0x8004 == 0)
|
||||
{
|
||||
tileId = 0x4;
|
||||
tileId = METATILE_ID(Building, PC_Off);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 1)
|
||||
{
|
||||
tileId = 0x25a;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 2)
|
||||
{
|
||||
tileId = 0x259;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gSpecialVar_0x8004 == 0)
|
||||
{
|
||||
tileId = 0x5;
|
||||
tileId = METATILE_ID(Building, PC_On);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 1)
|
||||
{
|
||||
tileId = 0x27f;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_On);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 2)
|
||||
{
|
||||
tileId = 0x27e;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, MayPC_On);
|
||||
}
|
||||
}
|
||||
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK);
|
||||
@@ -1131,15 +1142,15 @@ static void PCTurnOffEffect(void)
|
||||
}
|
||||
if (gSpecialVar_0x8004 == 0)
|
||||
{
|
||||
tileId = 0x4;
|
||||
tileId = METATILE_ID(Building, PC_Off);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 1)
|
||||
{
|
||||
tileId = 0x25a;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off);
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 2)
|
||||
{
|
||||
tileId = 0x259;
|
||||
tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off);
|
||||
}
|
||||
MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
@@ -1174,13 +1185,13 @@ static void LotteryCornerComputerEffect(struct Task *task)
|
||||
task->data[3] = 0;
|
||||
if (task->data[4] != 0)
|
||||
{
|
||||
MapGridSetMetatileIdAt(18, 8, 0xe9d);
|
||||
MapGridSetMetatileIdAt(18, 9, 0xea5);
|
||||
MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MapGridSetMetatileIdAt(18, 8, 0xe58);
|
||||
MapGridSetMetatileIdAt(18, 9, 0xe60);
|
||||
MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Flash) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Flash) | METATILE_COLLISION_MASK);
|
||||
}
|
||||
DrawWholeMapView();
|
||||
task->data[4] ^= 1;
|
||||
@@ -1194,8 +1205,8 @@ static void LotteryCornerComputerEffect(struct Task *task)
|
||||
|
||||
void EndLotteryCornerComputerEffect(void)
|
||||
{
|
||||
MapGridSetMetatileIdAt(18, 8, 0xe9d);
|
||||
MapGridSetMetatileIdAt(18, 9, 0xea5);
|
||||
MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK);
|
||||
DrawWholeMapView();
|
||||
}
|
||||
|
||||
@@ -1433,7 +1444,7 @@ void PutZigzagoonInPlayerParty(void)
|
||||
u16 monData;
|
||||
CreateMon(&gPlayerParty[0], SPECIES_ZIGZAGOON, 7, 0x20, FALSE, 0, FALSE, 0);
|
||||
monData = TRUE;
|
||||
SetMonData(&gPlayerParty[0], MON_DATA_ALT_ABILITY, &monData);
|
||||
SetMonData(&gPlayerParty[0], MON_DATA_ABILITY_NUM, &monData);
|
||||
monData = MOVE_TACKLE;
|
||||
SetMonData(&gPlayerParty[0], MON_DATA_MOVE1, &monData);
|
||||
monData = MOVE_NONE;
|
||||
@@ -1711,17 +1722,42 @@ const u8 *const gElevatorFloorsTable[] = {
|
||||
gText_Rooftop
|
||||
};
|
||||
|
||||
const u16 gUnknown_085B2BF4[][3] =
|
||||
static const u16 sElevatorWindowTiles_Ascending[][3] =
|
||||
{
|
||||
{0x0329, 0x032a, 0x032b},
|
||||
{0x0331, 0x0332, 0x0333},
|
||||
{0x0339, 0x033a, 0x033b},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Top0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Top1),
|
||||
METATILE_ID(BattleFrontier, Elevator_Top2)
|
||||
},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid1),
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid2)
|
||||
},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom1),
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom2)
|
||||
},
|
||||
};
|
||||
const u16 gUnknown_085B2C06[][3] =
|
||||
|
||||
static const u16 sElevatorWindowTiles_Descending[][3] =
|
||||
{
|
||||
{0x0329, 0x032b, 0x032a},
|
||||
{0x0331, 0x0333, 0x0332},
|
||||
{0x0339, 0x033b, 0x033a},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Top0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Top2),
|
||||
METATILE_ID(BattleFrontier, Elevator_Top1)
|
||||
},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid2),
|
||||
METATILE_ID(BattleFrontier, Elevator_Mid1)
|
||||
},
|
||||
{
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom0),
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom2),
|
||||
METATILE_ID(BattleFrontier, Elevator_Bottom1)
|
||||
},
|
||||
};
|
||||
|
||||
void SetDepartmentStoreFloorVar(void)
|
||||
@@ -1864,21 +1900,21 @@ void sub_8139C10(void)
|
||||
RemoveWindow(gUnknown_0203AB5E);
|
||||
}
|
||||
|
||||
static void sub_8139C2C(u16 a1, u8 a2)
|
||||
static void sub_8139C2C(u16 a1, bool8 descending)
|
||||
{
|
||||
static const u8 gUnknown_085B2C21[] = { 0x03, 0x06, 0x09, 0x0c, 0x0f, 0x12, 0x15, 0x18, 0x1b };
|
||||
|
||||
if (FuncIsActiveTask(sub_8139C80) != TRUE)
|
||||
if (FuncIsActiveTask(MoveElevatorWindowLights) != TRUE)
|
||||
{
|
||||
u8 taskId = CreateTask(sub_8139C80, 8);
|
||||
u8 taskId = CreateTask(MoveElevatorWindowLights, 8);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
gTasks[taskId].data[2] = a2;
|
||||
gTasks[taskId].data[2] = descending;
|
||||
gTasks[taskId].data[3] = gUnknown_085B2C21[a1];
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8139C80(u8 taskId)
|
||||
static void MoveElevatorWindowLights(u8 taskId)
|
||||
{
|
||||
u8 x, y;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
@@ -1886,13 +1922,13 @@ static void sub_8139C80(u8 taskId)
|
||||
if (data[1] == 6)
|
||||
{
|
||||
data[0]++;
|
||||
if (data[2] == 0)
|
||||
if (data[2] == FALSE)
|
||||
{
|
||||
for (y = 0; y < 3; y++)
|
||||
{
|
||||
for (x = 0; x < 3; x++)
|
||||
{
|
||||
MapGridSetMetatileIdAt(x + 8, y + 7, gUnknown_085B2BF4[y][data[0] % 3] | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1902,7 +1938,7 @@ static void sub_8139C80(u8 taskId)
|
||||
{
|
||||
for (x = 0; x < 3; x++)
|
||||
{
|
||||
MapGridSetMetatileIdAt(x + 8, y + 7, gUnknown_085B2C06[y][data[0] % 3] | METATILE_COLLISION_MASK);
|
||||
MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+35
-29
@@ -19,6 +19,7 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
struct PacifidlogMetatileOffsets
|
||||
{
|
||||
@@ -50,26 +51,26 @@ static const TaskFunc sPerStepCallbacks[] =
|
||||
// they are in pairs but declared as 1D array
|
||||
static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x259}, { 0, 1, 0x261},
|
||||
{ 0, -1, 0x259}, { 0, 0, 0x261},
|
||||
{ 0, 0, 0x252}, { 1, 0, 0x253},
|
||||
{ -1, 0, 0x252}, { 0, 0, 0x253}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x25A}, { 0, 1, 0x262},
|
||||
{ 0, -1, 0x25A}, { 0, 0, 0x262},
|
||||
{ 0, 0, 0x254}, { 1, 0, 0x255},
|
||||
{ -1, 0, 0x254}, { 0, 0, 0x255}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] =
|
||||
{
|
||||
{ 0, 0, 0x258}, { 0, 1, 0x260},
|
||||
{ 0, -1, 0x258}, { 0, 0, 0x260},
|
||||
{ 0, 0, 0x250}, { 1, 0, 0x251},
|
||||
{ -1, 0, 0x250}, { 0, 0, 0x251}
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)},
|
||||
{ 0, -1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)},
|
||||
{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)},
|
||||
{-1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}
|
||||
};
|
||||
|
||||
// Each element corresponds to a y coordinate row in the sootopolis gym 1F map.
|
||||
@@ -103,7 +104,12 @@ static const u16 sSootopolisGymIceRowVars[] =
|
||||
0
|
||||
};
|
||||
|
||||
static const u16 sMuddySlopeMetatiles[] = {0xe8, 0xeb, 0xea, 0xe9};
|
||||
static const u16 sMuddySlopeMetatiles[] = {
|
||||
METATILE_ID(General, MuddySlope_Frame0),
|
||||
METATILE_ID(General, MuddySlope_Frame3),
|
||||
METATILE_ID(General, MuddySlope_Frame2),
|
||||
METATILE_ID(General, MuddySlope_Frame1)
|
||||
};
|
||||
|
||||
static void Task_RunPerStepCallback(u8 taskId)
|
||||
{
|
||||
@@ -374,11 +380,11 @@ static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x24e:
|
||||
MapGridSetMetatileIdAt(x, y, 0x24f);
|
||||
case METATILE_ID(Fortree, BridgeOverGrass_Raised):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Lowered));
|
||||
break;
|
||||
case 0x256:
|
||||
MapGridSetMetatileIdAt(x, y, 0x257);
|
||||
case METATILE_ID(Fortree, BridgeOverTrees_Raised):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Lowered));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -391,11 +397,11 @@ static void SetNormalFortreeBridgeMetatile(s16 x, s16 y)
|
||||
{
|
||||
switch (MapGridGetMetatileIdAt(x, y))
|
||||
{
|
||||
case 0x24f:
|
||||
MapGridSetMetatileIdAt(x, y, 0x24e);
|
||||
case METATILE_ID(Fortree, BridgeOverGrass_Lowered):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Raised));
|
||||
break;
|
||||
case 0x257:
|
||||
MapGridSetMetatileIdAt(x, y, 0x256);
|
||||
case METATILE_ID(Fortree, BridgeOverTrees_Lowered):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Raised));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -523,7 +529,7 @@ void SetSootopolisGymCrackedIceMetatiles(void)
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
if (IsIcePuzzleCoordVisited(x, y) == TRUE)
|
||||
MapGridSetMetatileIdAt(x + 7, y + 7, 0x20e);
|
||||
MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_ID(SootopolisGym, Ice_Cracked));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -578,7 +584,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId)
|
||||
x = data[4];
|
||||
y = data[5];
|
||||
PlaySE(SE_RU_BARI);
|
||||
MapGridSetMetatileIdAt(x, y, 0x20e);
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Cracked));
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
MarkIcePuzzleCoordVisited(x - 7, y - 7);
|
||||
data[1] = 1;
|
||||
@@ -594,7 +600,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId)
|
||||
x = data[4];
|
||||
y = data[5];
|
||||
PlaySE(SE_RU_GASYAN);
|
||||
MapGridSetMetatileIdAt(x, y, 0x206);
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Broken));
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
data[1] = 1;
|
||||
}
|
||||
@@ -614,10 +620,10 @@ static void AshGrassPerStepCallback(u8 taskId)
|
||||
data[2] = y;
|
||||
if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y)))
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(x, y) == 0x20a)
|
||||
StartAshFieldEffect(x, y, 0x212, 4);
|
||||
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(Fallarbor, AshGrass))
|
||||
StartAshFieldEffect(x, y, METATILE_ID(Fallarbor, NormalGrass), 4);
|
||||
else
|
||||
StartAshFieldEffect(x, y, 0x206, 4);
|
||||
StartAshFieldEffect(x, y, METATILE_ID(Lavaridge, NormalGrass), 4);
|
||||
|
||||
if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
|
||||
{
|
||||
@@ -631,7 +637,7 @@ static void AshGrassPerStepCallback(u8 taskId)
|
||||
|
||||
static void SetCrackedFloorHoleMetatile(s16 x, s16 y)
|
||||
{
|
||||
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);
|
||||
MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == 0x22f ? 0x206 : 0x237);// unsure what these are referring to
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
}
|
||||
|
||||
@@ -686,7 +692,7 @@ static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y)
|
||||
|
||||
MapGridSetMetatileIdAt(x, y, tile);
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
MapGridSetMetatileIdAt(x, y, 0xe8);
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, MuddySlope_Frame0));
|
||||
}
|
||||
|
||||
static void Task_MuddySlope(u8 taskId)
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ static u8 None_Finish(void);
|
||||
EWRAM_DATA struct Weather gWeather = {0};
|
||||
EWRAM_DATA static u8 sFieldEffectPaletteGammaTypes[32] = {0};
|
||||
|
||||
IWRAM_DATA static const u8 *sPaletteGammaTypes;
|
||||
static const u8 *sPaletteGammaTypes;
|
||||
|
||||
// The drought weather effect uses a precalculated color lookup table. Presumably this
|
||||
// is because the underlying color shift calculation is slow.
|
||||
|
||||
@@ -891,6 +891,7 @@ static void sub_81094D0(u8 taskId) // animate Move_ERUPTION?
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+85
-120
@@ -20,6 +20,7 @@
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/field_effects.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
extern struct MapPosition gPlayerFacingPosition;
|
||||
|
||||
@@ -29,42 +30,6 @@ extern const u8 FarawayIsland_Interior_EventScript_267EDB[];
|
||||
extern const u8 gFieldEffectPic_CutGrass[];
|
||||
extern const u16 gFieldEffectObjectPalette6[];
|
||||
|
||||
// tileset 0 as first
|
||||
#define METATILE_ID_GRASS 0x1
|
||||
#define METATILE_ID_POKE_GRASS 0xD
|
||||
|
||||
#define METATILE_ID_POKE_GRASS_TREE_UP 0x25
|
||||
#define METATILE_ID_GRASS_TREE_UP 0xE
|
||||
|
||||
#define METATILE_ID_POKE_GRASS_TREE_LEFT 0x1C6
|
||||
#define METATILE_ID_POKE_GRASS_TREE_RIGHT 0x1C7
|
||||
|
||||
#define METATILE_ID_GRASS_TREE_LEFT 0x1CE
|
||||
#define METATILE_ID_GRASS_TREE_RIGHT 0x1CF
|
||||
|
||||
#define METATILE_ID_POKE_LONG_GRASS 0x15
|
||||
|
||||
// tileset 6 as second
|
||||
#define METATILE_ID_POKE_STEP_LAVA_GRASS 0x206
|
||||
#define METATILE_ID_POKE_LAVA_GRASS 0x207
|
||||
#define METATILE_ID_LAVA_FIELD 0x271
|
||||
|
||||
// tileset 7 as second
|
||||
#define METATILE_ID_POKE_ASH_GRASS 0x20A
|
||||
#define METATILE_ID_POKE_STEP_ASH_GRASS 0x212
|
||||
#define METATILE_ID_ASH 0x218
|
||||
|
||||
// tileset 8 as second
|
||||
#define METATILE_ID_POKE_LONG_GRASS_START 0x208
|
||||
|
||||
#define METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS 0x279
|
||||
#define METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS 0x27A
|
||||
#define METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS 0x27B
|
||||
|
||||
#define METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS 0x281
|
||||
#define METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS 0x282
|
||||
#define METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS 0x283
|
||||
|
||||
// cut 'square' defines
|
||||
#define CUT_NORMAL_SIDE 3
|
||||
#define CUT_NORMAL_AREA CUT_NORMAL_SIDE * CUT_NORMAL_SIDE
|
||||
@@ -94,11 +59,11 @@ static void CutGrassSpriteCallbackEnd(struct Sprite *);
|
||||
static void HandleLongGrassOnHyper(u8, s16, s16);
|
||||
|
||||
// IWRAM variables
|
||||
static IWRAM_DATA u8 sCutSquareSide;
|
||||
static IWRAM_DATA u8 sTileCountFromPlayer_X;
|
||||
static IWRAM_DATA u8 sTileCountFromPlayer_Y;
|
||||
static IWRAM_DATA u32 sUnused;
|
||||
static IWRAM_DATA bool8 sHyperCutTiles[CUT_HYPER_AREA];
|
||||
static u8 sCutSquareSide;
|
||||
static u8 sTileCountFromPlayer_X;
|
||||
static u8 sTileCountFromPlayer_Y;
|
||||
static u32 sUnused;
|
||||
static bool8 sHyperCutTiles[CUT_HYPER_AREA];
|
||||
|
||||
// EWRAM variables
|
||||
static EWRAM_DATA u8 *sCutGrassSpriteArrayPtr = NULL;
|
||||
@@ -390,36 +355,36 @@ static void SetCutGrassMetatile(s16 x, s16 y)
|
||||
|
||||
switch (metatileId)
|
||||
{
|
||||
case METATILE_ID_POKE_LONG_GRASS_START:
|
||||
case METATILE_ID_POKE_LONG_GRASS:
|
||||
case METATILE_ID_POKE_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS);
|
||||
case METATILE_ID(Fortree, LongGrass_Root):
|
||||
case METATILE_ID(General, LongGrass):
|
||||
case METATILE_ID(General, TallGrass):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass));
|
||||
break;
|
||||
case METATILE_ID_POKE_GRASS_TREE_LEFT:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_LEFT);
|
||||
case METATILE_ID(General, TallGrass_TreeLeft):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeLeft));
|
||||
break;
|
||||
case METATILE_ID_POKE_GRASS_TREE_RIGHT:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_RIGHT);
|
||||
case METATILE_ID(General, TallGrass_TreeRight):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeRight));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
|
||||
break;
|
||||
case METATILE_ID_POKE_STEP_LAVA_GRASS:
|
||||
case METATILE_ID_POKE_LAVA_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_LAVA_FIELD);
|
||||
case METATILE_ID(Lavaridge, NormalGrass):
|
||||
case METATILE_ID(Lavaridge, AshGrass):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Lavaridge, LavaField));
|
||||
break;
|
||||
case METATILE_ID_POKE_STEP_ASH_GRASS:
|
||||
case METATILE_ID_POKE_ASH_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_ASH);
|
||||
case METATILE_ID(Fallarbor, NormalGrass):
|
||||
case METATILE_ID(Fallarbor, AshGrass):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(Fallarbor, AshField));
|
||||
break;
|
||||
case METATILE_ID_POKE_GRASS_TREE_UP:
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID_GRASS_TREE_UP);
|
||||
case METATILE_ID(General, TallGrass_TreeUp):
|
||||
MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeUp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -437,13 +402,13 @@ static u8 GetLongGrassCaseAt(s16 x, s16 y)
|
||||
{
|
||||
u16 metatileId = MapGridGetMetatileIdAt(x, y);
|
||||
|
||||
if (metatileId == METATILE_ID_GRASS)
|
||||
if (metatileId == METATILE_ID(General, Grass))
|
||||
return LONG_GRASS_FIELD;
|
||||
else if (metatileId == METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS)
|
||||
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft))
|
||||
return LONG_GRASS_BASE_LEFT;
|
||||
else if (metatileId == METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS)
|
||||
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopMid))
|
||||
return LONG_GRASS_BASE_CENTER;
|
||||
else if (metatileId == METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS)
|
||||
else if (metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopRight))
|
||||
return LONG_GRASS_BASE_RIGHT;
|
||||
else
|
||||
return LONG_GRASS_NONE;
|
||||
@@ -457,34 +422,34 @@ static void SetCutGrassMetatiles(s16 x, s16 y)
|
||||
for (i = 0; i < sCutSquareSide; i++)
|
||||
{
|
||||
s16 currentX = x + i;
|
||||
if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID_POKE_LONG_GRASS)
|
||||
if (MapGridGetMetatileIdAt(currentX, y) == METATILE_ID(General, LongGrass))
|
||||
{
|
||||
switch (GetLongGrassCaseAt(currentX, y + 1))
|
||||
{
|
||||
case LONG_GRASS_FIELD:
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_POKE_LONG_GRASS_START);
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, LongGrass_Root));
|
||||
break;
|
||||
case LONG_GRASS_BASE_LEFT:
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
|
||||
break;
|
||||
case LONG_GRASS_BASE_CENTER:
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
|
||||
break;
|
||||
case LONG_GRASS_BASE_RIGHT:
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(currentX, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID_GRASS)
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY) == METATILE_ID(General, Grass))
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_POKE_LONG_GRASS_START)
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_GRASS);
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, LongGrass_Root))
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(General, Grass));
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
|
||||
if (MapGridGetMetatileIdAt(currentX, lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
|
||||
MapGridSetMetatileIdAt(currentX, lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,62 +486,62 @@ static void HandleLongGrassOnHyper(u8 caseId, s16 x, s16 y)
|
||||
|
||||
if (arr[0] == TRUE)
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS_START)
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, LongGrass_Root))
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(General, Grass));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
|
||||
}
|
||||
if (arr[1] == TRUE)
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID_POKE_LONG_GRASS)
|
||||
if (MapGridGetMetatileIdAt(newX, y + 2) == METATILE_ID(General, LongGrass))
|
||||
{
|
||||
switch (GetLongGrassCaseAt(newX, y + 3))
|
||||
{
|
||||
case LONG_GRASS_FIELD:
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_POKE_LONG_GRASS_START);
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, LongGrass_Root));
|
||||
break;
|
||||
case LONG_GRASS_BASE_LEFT:
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
|
||||
break;
|
||||
case LONG_GRASS_BASE_CENTER:
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
|
||||
break;
|
||||
case LONG_GRASS_BASE_RIGHT:
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 3, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_POKE_LONG_GRASS_START)
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS)
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, LongGrass_Root))
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(General, Grass));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft))
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid))
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
|
||||
if (MapGridGetMetatileIdAt(newX, y + 4) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight))
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
|
||||
}
|
||||
if (arr[2] == TRUE)
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID_POKE_LONG_GRASS)
|
||||
if (MapGridGetMetatileIdAt(newX, y + 3) == METATILE_ID(General, LongGrass))
|
||||
{
|
||||
switch (GetLongGrassCaseAt(newX, y + 4))
|
||||
{
|
||||
case LONG_GRASS_FIELD:
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_POKE_LONG_GRASS_START);
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, LongGrass_Root));
|
||||
break;
|
||||
case LONG_GRASS_BASE_LEFT:
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
|
||||
break;
|
||||
case LONG_GRASS_BASE_CENTER:
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
|
||||
break;
|
||||
case LONG_GRASS_BASE_RIGHT:
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(newX, y + 4, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -630,16 +595,16 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y)
|
||||
switch (GetLongGrassCaseAt(x, y + 1))
|
||||
{
|
||||
case LONG_GRASS_FIELD:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_POKE_LONG_GRASS_START);
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, LongGrass_Root));
|
||||
break;
|
||||
case LONG_GRASS_BASE_LEFT:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft));
|
||||
break;
|
||||
case LONG_GRASS_BASE_CENTER:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid));
|
||||
break;
|
||||
case LONG_GRASS_BASE_RIGHT:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS);
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -647,7 +612,7 @@ void FixLongGrassMetatilesWindowTop(s16 x, s16 y)
|
||||
|
||||
void FixLongGrassMetatilesWindowBottom(s16 x, s16 y)
|
||||
{
|
||||
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID_GRASS)
|
||||
if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(General, Grass))
|
||||
{
|
||||
u8 metatileBehavior = MapGridGetMetatileBehaviorAt(x, y + 1);
|
||||
if (MetatileBehavior_IsLongGrassSouthEdge(metatileBehavior))
|
||||
@@ -655,17 +620,17 @@ void FixLongGrassMetatilesWindowBottom(s16 x, s16 y)
|
||||
s32 metatileId = MapGridGetMetatileIdAt(x, y + 1);
|
||||
switch (metatileId)
|
||||
{
|
||||
case METATILE_ID_POKE_LONG_GRASS_START:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_GRASS);
|
||||
case METATILE_ID(Fortree, LongGrass_Root):
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(General, Grass));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_LEFT_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_LEFT_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft):
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_CENTER_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_CENTER_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid):
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid));
|
||||
break;
|
||||
case METATILE_ID_SECRET_BASE_RIGHT_POKE_LONG_GRASS:
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID_SECRET_BASE_RIGHT_LONG_GRASS);
|
||||
case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight):
|
||||
MapGridSetMetatileIdAt(x, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+49
-14
@@ -4,6 +4,7 @@
|
||||
#include "fieldmap.h"
|
||||
#include "fldeff.h"
|
||||
#include "task.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0;
|
||||
|
||||
@@ -53,13 +54,47 @@ static void sub_80E12E8(u8 taskId, const s16 *list, u16 isImpassableFlag)
|
||||
}
|
||||
}
|
||||
|
||||
static const u16 gUnknown_08589ABA[] = {0x284, 0x282, 0x280};
|
||||
static const u16 gUnknown_08589AC0[] = {0x285, 0x283, 0x281};
|
||||
static const u16 gUnknown_08589AC6[] = {0x28C, 0x28A, 0x288};
|
||||
static const u16 gUnknown_08589ACC[] = {0x28D, 0x28B, 0x289};
|
||||
static const u16 gUnknown_08589AD2[] = {0x2A0, 0x2A2, 0x2A4};
|
||||
static const u16 gUnknown_08589AD8[] = {0x2A1, 0x2A3, 0x2A5};
|
||||
static const u16 gUnknown_08589ADE[] = {0x2A8, 0x2AA, 0x2AC};
|
||||
static const u16 sElevatorMetatiles_1F_0[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame2),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile0_Frame0)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_1F_1[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame2),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile1_Frame0)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_1F_2[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame2),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile2_Frame0)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_1F_3[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame2),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator1F_Tile3_Frame0)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_2F_0[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame0),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile0_Frame2)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_2F_1[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame0),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile1_Frame2)
|
||||
};
|
||||
|
||||
static const u16 sElevatorMetatiles_2F_2[] = {
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame0),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame1),
|
||||
METATILE_ID(PokemonCenter, Elevator2F_Tile2_Frame2)
|
||||
};
|
||||
|
||||
static void sub_80E1444(u8 taskId)
|
||||
{
|
||||
@@ -70,25 +105,25 @@ static void sub_80E1444(u8 taskId)
|
||||
switch (data[0])
|
||||
{
|
||||
case 0:
|
||||
sub_80E12E8(taskId, gUnknown_08589ABA, 0);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_1F_0, 0);
|
||||
break;
|
||||
case 1:
|
||||
sub_80E12E8(taskId, gUnknown_08589AC0, 0);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_1F_1, 0);
|
||||
break;
|
||||
case 2:
|
||||
sub_80E12E8(taskId, gUnknown_08589AC6, METATILE_COLLISION_MASK);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_1F_2, METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 3:
|
||||
sub_80E12E8(taskId, gUnknown_08589ACC, 0);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_1F_3, 0);
|
||||
break;
|
||||
case 4:
|
||||
sub_80E12E8(taskId, gUnknown_08589AD2, METATILE_COLLISION_MASK);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_2F_0, METATILE_COLLISION_MASK);
|
||||
break;
|
||||
case 5:
|
||||
sub_80E12E8(taskId, gUnknown_08589AD8, 0);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_2F_1, 0);
|
||||
break;
|
||||
case 6:
|
||||
sub_80E12E8(taskId, gUnknown_08589ADE, 0);
|
||||
sub_80E12E8(taskId, sElevatorMetatiles_2F_2, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -219,8 +219,8 @@ static void sub_8137404(u8 taskId)
|
||||
static void sub_8137420(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000);
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20);
|
||||
LoadPalette(gUnknown_085B28A0, 0xE0, 0x10);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0
|
||||
@@ -304,8 +304,8 @@ static void sub_81375BC(u8 taskId)
|
||||
static void sub_81375D8(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)0x600C000);
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)0x600F800);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
|
||||
+8
-7
@@ -22,6 +22,7 @@
|
||||
#include "constants/metatile_behaviors.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/vars.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
EWRAM_DATA struct MapPosition gPlayerFacingPosition = {0};
|
||||
|
||||
@@ -800,16 +801,16 @@ static void Task_SecretBasePCTurnOn(u8 taskId)
|
||||
{
|
||||
case 4:
|
||||
case 12:
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 548);
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 0x224);
|
||||
CurrentMapDrawMetatileAt(data[0], data[1]);
|
||||
break;
|
||||
case 8:
|
||||
case 16:
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 544);
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 0x220);
|
||||
CurrentMapDrawMetatileAt(data[0], data[1]);
|
||||
break;
|
||||
case 20:
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 548);
|
||||
MapGridSetMetatileIdAt(data[0], data[1], 0x224);
|
||||
CurrentMapDrawMetatileAt(data[0], data[1]);
|
||||
FieldEffectActiveListRemove(FLDEFF_PCTURN_ON);
|
||||
EnableBothScriptContexts();
|
||||
@@ -828,9 +829,9 @@ void DoSecretBasePCTurnOffEffect(void)
|
||||
PlaySE(SE_PC_OFF);
|
||||
|
||||
if (!VarGet(VAR_CURRENT_SECRET_BASE))
|
||||
MapGridSetMetatileIdAt(x, y, 3616);
|
||||
MapGridSetMetatileIdAt(x, y, 0x220 | METATILE_COLLISION_MASK);
|
||||
else
|
||||
MapGridSetMetatileIdAt(x, y, 3617);
|
||||
MapGridSetMetatileIdAt(x, y, 0x221 | METATILE_COLLISION_MASK);
|
||||
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
}
|
||||
@@ -902,8 +903,8 @@ bool8 FldEff_NopA700(void)
|
||||
static void DoSecretBaseBreakableDoorEffect(s16 x, s16 y)
|
||||
{
|
||||
PlaySE(SE_TOY_KABE);
|
||||
MapGridSetMetatileIdAt(x, y, 630);
|
||||
MapGridSetMetatileIdAt(x, y - 1, 622);
|
||||
MapGridSetMetatileIdAt(x, y, 0x276);
|
||||
MapGridSetMetatileIdAt(x, y - 1, 0x26E);
|
||||
CurrentMapDrawMetatileAt(x, y);
|
||||
CurrentMapDrawMetatileAt(x, y - 1);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ bool8 SetUpFieldMove_SoftBoiled(void)
|
||||
void sub_8161560(u8 taskId)
|
||||
{
|
||||
gUnknown_0203CEC8.unkB = 0xA;
|
||||
gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.unk9;
|
||||
gUnknown_0203CEC8.unkA = gUnknown_0203CEC8.slotId;
|
||||
sub_81B0FCC(GetCursorSelectionMonId(), 0x1);
|
||||
display_pokemon_menu_message(0x5);
|
||||
gTasks[taskId].func = sub_81B1370;
|
||||
@@ -42,7 +42,7 @@ void sub_81615A8(u8 taskId)
|
||||
{
|
||||
u16 hp;
|
||||
|
||||
u8 unk9 = gUnknown_0203CEC8.unk9;
|
||||
u8 slotId = gUnknown_0203CEC8.slotId;
|
||||
u8 pokemonIndex = gUnknown_0203CEC8.unkA;
|
||||
if(pokemonIndex > 6)
|
||||
{
|
||||
@@ -53,20 +53,20 @@ void sub_81615A8(u8 taskId)
|
||||
}
|
||||
|
||||
hp = GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_HP);
|
||||
if(hp == 0 || unk9 == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp)
|
||||
if(hp == 0 || slotId == pokemonIndex || GetMonData(&gPlayerParty[pokemonIndex], MON_DATA_MAX_HP) == hp)
|
||||
{
|
||||
sub_81617B8(taskId);
|
||||
return;
|
||||
}
|
||||
|
||||
PlaySE(SE_KAIFUKU);
|
||||
sub_81B1F18(taskId, unk9, -1, GetMonData(&gPlayerParty[unk9], MON_DATA_MAX_HP)/5, sub_816166C);
|
||||
sub_81B1F18(taskId, slotId, -1, GetMonData(&gPlayerParty[slotId], MON_DATA_MAX_HP)/5, sub_816166C);
|
||||
}
|
||||
|
||||
static void sub_816166C(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_KAIFUKU);
|
||||
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAX_HP)/5, sub_81616C0);
|
||||
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.slotId], MON_DATA_MAX_HP)/5, sub_81616C0);
|
||||
}
|
||||
|
||||
static void sub_81616C0(u8 taskId)
|
||||
@@ -83,8 +83,8 @@ static void sub_8161724(u8 taskId)
|
||||
if(sub_81B1BD4() == 1)
|
||||
return;
|
||||
gUnknown_0203CEC8.unkB = 0x0;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.unk9, 0);
|
||||
gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.slotId, 0);
|
||||
gUnknown_0203CEC8.slotId = gUnknown_0203CEC8.unkA;
|
||||
sub_81B0FCC(gUnknown_0203CEC8.unkA, 1);
|
||||
ClearStdWindowAndFrameToTransparent(0x6, FALSE);
|
||||
ClearWindowTilemap(0x6);
|
||||
|
||||
+2
-1
@@ -1148,7 +1148,8 @@ static void sub_8112B78(struct Sprite *sprite)
|
||||
|
||||
if (++coeffB > 16)
|
||||
coeffB = 16;
|
||||
if (--(s16)coeffA < 0)
|
||||
--coeffA;
|
||||
if ((s16)coeffA < 0)
|
||||
coeffA = 0;
|
||||
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(coeffA, coeffB));
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@
|
||||
|
||||
static u8 sGpuRegBuffer[GPU_REG_BUF_SIZE];
|
||||
static u8 sGpuRegWaitingList[GPU_REG_BUF_SIZE];
|
||||
static bool8 sGpuRegBufferLocked;
|
||||
static bool8 sShouldSyncRegIE;
|
||||
static u16 sRegIE;
|
||||
static volatile bool8 sGpuRegBufferLocked;
|
||||
static volatile bool8 sShouldSyncRegIE;
|
||||
static vu16 sRegIE;
|
||||
|
||||
static void CopyBufferedValueToGpuReg(u8 regOffset);
|
||||
static void SyncRegIE(void);
|
||||
|
||||
+3
-5
@@ -1172,13 +1172,11 @@ const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_male.
|
||||
const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_female.gbapal.lz");
|
||||
|
||||
const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/interface/bag_screen.4bpp.lz");
|
||||
|
||||
const u32 gUnknown_08D9A88C[] = INCBIN_U32("graphics/unknown/unknown_D9A88C.bin.lz");
|
||||
const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/interface/bag_screen_tilemap.bin.lz");
|
||||
|
||||
const u32 gBattleFrontierGfx_PyramidBag[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz");
|
||||
const u32 gUnknown_08D9ADD0[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second.
|
||||
|
||||
const u32 gUnknown_08D9AE04[] = INCBIN_U32("graphics/unknown/unknown_D9AE04.bin.lz");
|
||||
const u32 gBattleFrontierGfx_PyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second.
|
||||
const u32 gBattleFrontierGfx_PyramidBagTileMap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz");
|
||||
|
||||
const u32 gUnknown_08D9AF44[] = INCBIN_U32("graphics/unknown/unknown_D9AF44.gbapal.lz");
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
extern u16 gUnknown_0203CF30[];
|
||||
|
||||
// this file's functions
|
||||
#if !defined(NONMATCHING) && MODERN
|
||||
#define static
|
||||
#endif
|
||||
static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
||||
static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
|
||||
|
||||
|
||||
+390
-390
File diff suppressed because it is too large
Load Diff
+118
-118
@@ -24,12 +24,12 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite);
|
||||
static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite);
|
||||
|
||||
// static const rom data
|
||||
static const u16 gUnknown_0857F564[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal");
|
||||
static const u8 gUnknown_0857F584[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp");
|
||||
static const u8 gUnknown_0857F604[] = INCBIN_U8("graphics/unused/cherry.4bpp");
|
||||
static const u16 gUnknown_0857FA84[] = INCBIN_U16("graphics/unused/cherry.gbapal");
|
||||
static const u16 gRotatingBall_Pal[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal");
|
||||
static const u8 gRotatingBall[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp");
|
||||
static const u8 gCherryUnused[] = INCBIN_U8("graphics/unused/cherry.4bpp");
|
||||
static const u16 gCherryUnused_Pal[] = INCBIN_U16("graphics/unused/cherry.gbapal");
|
||||
|
||||
static const struct OamData sOamData_857FAA4 =
|
||||
static const struct OamData sBagOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 1,
|
||||
@@ -46,59 +46,59 @@ static const struct OamData sOamData_857FAA4 =
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FAAC[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_Closed[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FAB4[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_Items[] =
|
||||
{
|
||||
ANIMCMD_FRAME(64, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FABC[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_KeyItems[] =
|
||||
{
|
||||
ANIMCMD_FRAME(128, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FAC4[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_Pokeballs[] =
|
||||
{
|
||||
ANIMCMD_FRAME(192, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FACC[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_TMsHMs[] =
|
||||
{
|
||||
ANIMCMD_FRAME(256, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FAD4[] =
|
||||
static const union AnimCmd sSpriteAnim_Bag_Berries[] =
|
||||
{
|
||||
ANIMCMD_FRAME(320, 4),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_857FADC[] =
|
||||
static const union AnimCmd *const sBagSpriteAnimTable[] =
|
||||
{
|
||||
sSpriteAnim_857FAAC,
|
||||
sSpriteAnim_857FAB4,
|
||||
sSpriteAnim_857FAC4,
|
||||
sSpriteAnim_857FACC,
|
||||
sSpriteAnim_857FAD4,
|
||||
sSpriteAnim_857FABC
|
||||
sSpriteAnim_Bag_Closed,
|
||||
sSpriteAnim_Bag_Items,
|
||||
sSpriteAnim_Bag_Pokeballs,
|
||||
sSpriteAnim_Bag_TMsHMs,
|
||||
sSpriteAnim_Bag_Berries,
|
||||
sSpriteAnim_Bag_KeyItems
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FAF4[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_BagNormal[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FB04[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_BagShake[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 254, 2),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 2, 4),
|
||||
@@ -107,39 +107,39 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FB04[] =
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB2C[] =
|
||||
static const union AffineAnimCmd *const sBagAffineAnimCmds[] =
|
||||
{
|
||||
sSpriteAffineAnim_857FAF4,
|
||||
sSpriteAffineAnim_857FB04
|
||||
sSpriteAffineAnim_BagNormal,
|
||||
sSpriteAffineAnim_BagShake
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_0857FB34 =
|
||||
const struct CompressedSpriteSheet gBagMaleSpriteSheet =
|
||||
{
|
||||
gBagMaleTiles, 0x3000, 100
|
||||
gBagMaleTiles, 0x3000, TAG_BAG_GFX
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_0857FB3C =
|
||||
const struct CompressedSpriteSheet gBagFemaleSpriteSheet =
|
||||
{
|
||||
gBagFemaleTiles, 0x3000, 100
|
||||
gBagFemaleTiles, 0x3000, TAG_BAG_GFX
|
||||
};
|
||||
|
||||
const struct CompressedSpritePalette gUnknown_0857FB44 =
|
||||
const struct CompressedSpritePalette gBagPaletteTable =
|
||||
{
|
||||
gBagPalette, 100
|
||||
gBagPalette, TAG_BAG_GFX
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0857FB4C =
|
||||
static const struct SpriteTemplate gBagSpriteTemplate =
|
||||
{
|
||||
.tileTag = 100,
|
||||
.paletteTag = 100,
|
||||
.oam = &sOamData_857FAA4,
|
||||
.anims = sSpriteAnimTable_857FADC,
|
||||
.tileTag = TAG_BAG_GFX,
|
||||
.paletteTag = TAG_BAG_GFX,
|
||||
.oam = &sBagOamData,
|
||||
.anims = sBagSpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sSpriteAffineAnimTable_857FB2C,
|
||||
.affineAnims = sBagAffineAnimCmds,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_857FB64 =
|
||||
static const struct OamData sRotatingBallOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
@@ -156,61 +156,61 @@ static const struct OamData sOamData_857FB64 =
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FB6C[] =
|
||||
static const union AnimCmd sSpriteAffineAnim_RotatingBallStationary[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_857FB74[] =
|
||||
static const union AnimCmd *const sRotatingBallSpriteAnimTable[] =
|
||||
{
|
||||
sSpriteAnim_857FB6C
|
||||
sSpriteAffineAnim_RotatingBallStationary
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FB78[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_RotatingBallRotation1[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 8, 16),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FB88[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_RotatingBallRotation2[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0, 0, 248, 16),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB98[] =
|
||||
static const union AffineAnimCmd *const sRotatingBallAnimCmds[] =
|
||||
{
|
||||
sSpriteAffineAnim_857FB78,
|
||||
sSpriteAffineAnim_RotatingBallRotation1,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FB9C[] =
|
||||
static const union AffineAnimCmd *const sRotatingBallAnimCmds_FullRotation[] =
|
||||
{
|
||||
sSpriteAffineAnim_857FB88,
|
||||
sSpriteAffineAnim_RotatingBallRotation2,
|
||||
};
|
||||
|
||||
static const struct SpriteSheet gUnknown_0857FBA0 =
|
||||
static const struct SpriteSheet gRotatingBallTable =
|
||||
{
|
||||
gUnknown_0857F584, 0x80, 101
|
||||
gRotatingBall, 0x80, TAG_ROTATING_BALL_GFX
|
||||
};
|
||||
|
||||
static const struct SpritePalette gUnknown_0857FBA8 =
|
||||
static const struct SpritePalette gRotatingBallPaletteTable =
|
||||
{
|
||||
gUnknown_0857F564, 101
|
||||
gRotatingBall_Pal, TAG_ROTATING_BALL_GFX
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gSpriteTemplate_RotatingBall =
|
||||
static const struct SpriteTemplate gRotatingBallSpriteTemplate =
|
||||
{
|
||||
.tileTag = 101,
|
||||
.paletteTag = 101,
|
||||
.oam = &sOamData_857FB64,
|
||||
.anims = sSpriteAnimTable_857FB74,
|
||||
.tileTag = TAG_ROTATING_BALL_GFX,
|
||||
.paletteTag = TAG_ROTATING_BALL_GFX,
|
||||
.oam = &sRotatingBallOamData,
|
||||
.anims = sRotatingBallSpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sSpriteAffineAnimTable_857FB98,
|
||||
.affineAnims = sRotatingBallAnimCmds,
|
||||
.callback = SpriteCB_SwitchPocketRotatingBallInit,
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_857FBC8 =
|
||||
static const struct OamData sBerryPicOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
@@ -227,7 +227,7 @@ static const struct OamData sOamData_857FBC8 =
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_857FBD0 =
|
||||
static const struct OamData sBerryPicRotatingOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 3,
|
||||
@@ -250,28 +250,28 @@ static const union AnimCmd sSpriteAnim_857FBD8[] =
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_857FBE0[] =
|
||||
static const union AnimCmd *const sBerryPicSpriteAnimTable[] =
|
||||
{
|
||||
sSpriteAnim_857FBD8
|
||||
};
|
||||
|
||||
static const struct SpriteFrameImage sSpriteImageTable_857FBE4[] =
|
||||
static const struct SpriteFrameImage sBerryPicSpriteImageTable[] =
|
||||
{
|
||||
{&gDecompressionBuffer[0], 0x800},
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0857FBEC =
|
||||
static const struct SpriteTemplate gBerryPicSpriteTemplate =
|
||||
{
|
||||
.tileTag = 65535,
|
||||
.paletteTag = 30020,
|
||||
.oam = &sOamData_857FBC8,
|
||||
.anims = sSpriteAnimTable_857FBE0,
|
||||
.images = sSpriteImageTable_857FBE4,
|
||||
.tileTag = TAG_BERRY_PIC_TILE,
|
||||
.paletteTag = TAG_BERRY_PIC_PAL,
|
||||
.oam = &sBerryPicOamData,
|
||||
.anims = sBerryPicSpriteAnimTable,
|
||||
.images = sBerryPicSpriteImageTable,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FC04[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_BerryPicRotation1[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(-1, -1, 253, 96),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 16),
|
||||
@@ -282,7 +282,7 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FC04[] =
|
||||
AFFINEANIMCMD_JUMP(0)
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_857FC3C[] =
|
||||
static const union AffineAnimCmd sSpriteAffineAnim_BerryPicRotation2[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(-1, -1, 3, 96),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 16),
|
||||
@@ -293,20 +293,20 @@ static const union AffineAnimCmd sSpriteAffineAnim_857FC3C[] =
|
||||
AFFINEANIMCMD_JUMP(0)
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const sSpriteAffineAnimTable_857FC74[] =
|
||||
static const union AffineAnimCmd *const sBerryPicRotatingAnimCmds[] =
|
||||
{
|
||||
sSpriteAffineAnim_857FC04,
|
||||
sSpriteAffineAnim_857FC3C
|
||||
sSpriteAffineAnim_BerryPicRotation1,
|
||||
sSpriteAffineAnim_BerryPicRotation2
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0857FC7C =
|
||||
static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = 0x7544,
|
||||
.oam = &sOamData_857FBD0,
|
||||
.anims = sSpriteAnimTable_857FBE0,
|
||||
.images = sSpriteImageTable_857FBE4,
|
||||
.affineAnims = sSpriteAffineAnimTable_857FC74,
|
||||
.tileTag = TAG_BERRY_PIC_TILE,
|
||||
.paletteTag = TAG_BERRY_PIC_PAL,
|
||||
.oam = &sBerryPicRotatingOamData,
|
||||
.anims = sBerryPicSpriteAnimTable,
|
||||
.images = sBerryPicSpriteImageTable,
|
||||
.affineAnims = sBerryPicRotatingAnimCmds,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
@@ -357,17 +357,17 @@ static const struct CompressedTilesPal gBerryPicTable[] =
|
||||
{gBerryPic_Enigma, gBerryPalette_Enigma},
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_0857FDEC =
|
||||
const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet =
|
||||
{
|
||||
gBerryCheckCircle_Gfx, 0x800, 10000
|
||||
gBerryCheckCircle_Gfx, 0x800, TAG_BERRY_CHECK_CIRCLE_GFX
|
||||
};
|
||||
|
||||
const struct CompressedSpritePalette gUnknown_0857FDF4 =
|
||||
const struct CompressedSpritePalette gBerryCheckCirclePaletteTable =
|
||||
{
|
||||
gUnknown_08D9BEF0, 10000
|
||||
gBerryCheck_Pal, TAG_BERRY_CHECK_CIRCLE_GFX
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_857FDFC =
|
||||
static const struct OamData sBerryCheckCircleOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
@@ -384,23 +384,23 @@ static const struct OamData sOamData_857FDFC =
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_857FE04[] =
|
||||
static const union AnimCmd sSpriteAnim_BerryCheckCircle[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_857FE0C[] =
|
||||
static const union AnimCmd *const sBerryCheckCircleSpriteAnimTable[] =
|
||||
{
|
||||
sSpriteAnim_857FE04
|
||||
sSpriteAnim_BerryCheckCircle
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_0857FE10 =
|
||||
static const struct SpriteTemplate gBerryCheckCircleSpriteTemplate =
|
||||
{
|
||||
.tileTag = 10000,
|
||||
.paletteTag = 10000,
|
||||
.oam = &sOamData_857FDFC,
|
||||
.anims = sSpriteAnimTable_857FE0C,
|
||||
.tileTag = TAG_BERRY_CHECK_CIRCLE_GFX,
|
||||
.paletteTag = TAG_BERRY_CHECK_CIRCLE_GFX,
|
||||
.oam = &sBerryCheckCircleOamData,
|
||||
.anims = sBerryCheckCircleSpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
@@ -409,7 +409,7 @@ static const struct SpriteTemplate gUnknown_0857FE10 =
|
||||
// code
|
||||
void RemoveBagSprite(u8 id)
|
||||
{
|
||||
u8 *spriteId = &gUnknown_0203CE54->spriteId[id];
|
||||
u8 *spriteId = &gBagMenu->spriteId[id];
|
||||
if (*spriteId != 0xFF)
|
||||
{
|
||||
FreeSpriteTilesByTag(id + 100);
|
||||
@@ -422,14 +422,14 @@ void RemoveBagSprite(u8 id)
|
||||
|
||||
void AddBagVisualSprite(u8 bagPocketId)
|
||||
{
|
||||
u8 *spriteId = &gUnknown_0203CE54->spriteId[0];
|
||||
*spriteId = CreateSprite(&gUnknown_0857FB4C, 68, 66, 0);
|
||||
u8 *spriteId = &gBagMenu->spriteId[0];
|
||||
*spriteId = CreateSprite(&gBagSpriteTemplate, 68, 66, 0);
|
||||
SetBagVisualPocketId(bagPocketId, FALSE);
|
||||
}
|
||||
|
||||
void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[gUnknown_0203CE54->spriteId[0]];
|
||||
struct Sprite *sprite = &gSprites[gBagMenu->spriteId[0]];
|
||||
if (isSwitchingPockets)
|
||||
{
|
||||
sprite->pos2.y = -5;
|
||||
@@ -458,7 +458,7 @@ static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite)
|
||||
|
||||
void ShakeBagVisual(void)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[gUnknown_0203CE54->spriteId[0]];
|
||||
struct Sprite *sprite = &gSprites[gBagMenu->spriteId[0]];
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
@@ -477,14 +477,14 @@ static void SpriteCB_ShakeBagVisual(struct Sprite *sprite)
|
||||
|
||||
void AddSwitchPocketRotatingBallSprite(s16 rotationDirection)
|
||||
{
|
||||
u8 *spriteId = &gUnknown_0203CE54->spriteId[1];
|
||||
LoadSpriteSheet(&gUnknown_0857FBA0);
|
||||
LoadSpritePalette(&gUnknown_0857FBA8);
|
||||
*spriteId = CreateSprite(&gSpriteTemplate_RotatingBall, 16, 16, 0);
|
||||
u8 *spriteId = &gBagMenu->spriteId[1];
|
||||
LoadSpriteSheet(&gRotatingBallTable);
|
||||
LoadSpritePalette(&gRotatingBallPaletteTable);
|
||||
*spriteId = CreateSprite(&gRotatingBallSpriteTemplate, 16, 16, 0);
|
||||
gSprites[*spriteId].data[0] = rotationDirection;
|
||||
}
|
||||
|
||||
static void update_switch_pocket_rotating_ball_coords(struct Sprite *sprite)
|
||||
static void UpdateSwitchPocketRotatingBallCoords(struct Sprite *sprite)
|
||||
{
|
||||
sprite->centerToCornerVecX = sprite->data[1] - ((sprite->data[3] + 1) & 1);
|
||||
sprite->centerToCornerVecY = sprite->data[1] - ((sprite->data[3] + 1) & 1);
|
||||
@@ -494,28 +494,28 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite)
|
||||
{
|
||||
sprite->oam.affineMode = 1;
|
||||
if (sprite->data[0] == -1)
|
||||
sprite->affineAnims = sSpriteAffineAnimTable_857FB98;
|
||||
sprite->affineAnims = sRotatingBallAnimCmds;
|
||||
else
|
||||
sprite->affineAnims = sSpriteAffineAnimTable_857FB9C;
|
||||
sprite->affineAnims = sRotatingBallAnimCmds_FullRotation;
|
||||
|
||||
InitSpriteAffineAnim(sprite);
|
||||
sprite->data[1] = sprite->centerToCornerVecX;
|
||||
sprite->data[1] = sprite->centerToCornerVecY;
|
||||
update_switch_pocket_rotating_ball_coords(sprite);
|
||||
UpdateSwitchPocketRotatingBallCoords(sprite);
|
||||
sprite->callback = SpriteCB_SwitchPocketRotatingBallContinue;
|
||||
}
|
||||
|
||||
static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[3]++;
|
||||
update_switch_pocket_rotating_ball_coords(sprite);
|
||||
UpdateSwitchPocketRotatingBallCoords(sprite);
|
||||
if (sprite->data[3] == 16)
|
||||
RemoveBagSprite(1);
|
||||
}
|
||||
|
||||
void AddBagItemIconSprite(u16 itemId, u8 id)
|
||||
{
|
||||
u8 *spriteId = &gUnknown_0203CE54->spriteId[id + 2];
|
||||
u8 *spriteId = &gBagMenu->spriteId[id + 2];
|
||||
if (*spriteId == 0xFF)
|
||||
{
|
||||
u8 iconSpriteId;
|
||||
@@ -539,17 +539,17 @@ void RemoveBagItemIconSprite(u8 id)
|
||||
|
||||
void sub_80D4FAC(void)
|
||||
{
|
||||
sub_8122344(&gUnknown_0203CE54->spriteId[4], 8);
|
||||
sub_8122344(&gBagMenu->spriteId[4], 8);
|
||||
}
|
||||
|
||||
void sub_80D4FC8(u8 arg0)
|
||||
{
|
||||
sub_81223FC(&gUnknown_0203CE54->spriteId[4], 8, arg0);
|
||||
sub_81223FC(&gBagMenu->spriteId[4], 8, arg0);
|
||||
}
|
||||
|
||||
void sub_80D4FEC(u8 arg0)
|
||||
{
|
||||
sub_8122448(&gUnknown_0203CE54->spriteId[4], 136, 120, (arg0 + 1) * 16);
|
||||
sub_8122448(&gBagMenu->spriteId[4], 136, 120, (arg0 + 1) * 16);
|
||||
}
|
||||
|
||||
static void sub_80D5018(void *mem0, void *mem1)
|
||||
@@ -572,7 +572,7 @@ static void sub_80D5018(void *mem0, void *mem1)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80D5070(u8 berryId)
|
||||
static void LoadBerryGfx(u8 berryId)
|
||||
{
|
||||
struct CompressedSpritePalette pal;
|
||||
|
||||
@@ -582,7 +582,7 @@ static void sub_80D5070(u8 berryId)
|
||||
}
|
||||
|
||||
pal.data = gBerryPicTable[berryId].pal;
|
||||
pal.tag = 0x7544;
|
||||
pal.tag = TAG_BERRY_PIC_PAL;
|
||||
LoadCompressedSpritePalette(&pal);
|
||||
LZDecompressWram(gBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]);
|
||||
sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]);
|
||||
@@ -590,22 +590,22 @@ static void sub_80D5070(u8 berryId)
|
||||
|
||||
u8 CreateBerryTagSprite(u8 id, s16 x, s16 y)
|
||||
{
|
||||
sub_80D5070(id);
|
||||
return CreateSprite(&gUnknown_0857FBEC, x, y, 0);
|
||||
LoadBerryGfx(id);
|
||||
return CreateSprite(&gBerryPicSpriteTemplate, x, y, 0);
|
||||
}
|
||||
|
||||
void FreeBerryTagSpritePalette(void)
|
||||
{
|
||||
FreeSpritePaletteByTag(0x7544);
|
||||
FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL);
|
||||
}
|
||||
|
||||
u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine)
|
||||
u8 LoadSpinningBerryPicGfx(u8 berryId, u8 x, u8 y, bool8 startAffine)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
FreeSpritePaletteByTag(0x7544);
|
||||
sub_80D5070(berryId);
|
||||
spriteId = CreateSprite(&gUnknown_0857FC7C, x, y, 0);
|
||||
FreeSpritePaletteByTag(TAG_BERRY_PIC_PAL);
|
||||
LoadBerryGfx(berryId);
|
||||
spriteId = CreateSprite(&gBerryPicRotatingSpriteTemplate, x, y, 0);
|
||||
if (startAffine == TRUE)
|
||||
StartSpriteAffineAnim(&gSprites[spriteId], 1);
|
||||
|
||||
@@ -614,5 +614,5 @@ u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine)
|
||||
|
||||
u8 CreateBerryFlavorCircleSprite(s16 x)
|
||||
{
|
||||
return CreateSprite(&gUnknown_0857FE10, x, 116, 0);
|
||||
return CreateSprite(&gBerryCheckCircleSpriteTemplate, x, 116, 0);
|
||||
}
|
||||
|
||||
+16
-16
@@ -51,7 +51,7 @@ void SetUpItemUseCallback(u8 taskId);
|
||||
void MapPostLoadHook_UseItem(void);
|
||||
void sub_80AF6D4(void);
|
||||
void Task_CallItemUseOnFieldCallback(u8 taskId);
|
||||
void bag_menu_inits_lists_menu(u8 taskId);
|
||||
void BagMenu_InitListsMenu(u8 taskId);
|
||||
void ItemUseOnFieldCB_Bike(u8 taskId);
|
||||
void ItemUseOnFieldCB_Rod(u8 taskId);
|
||||
void ItemUseOnFieldCB_Itemfinder(u8 taskId);
|
||||
@@ -101,7 +101,7 @@ static const u8 gUnknown_085920E4[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST}
|
||||
static const struct YesNoFuncTable gUnknown_085920E8 =
|
||||
{
|
||||
.yesFunc = sub_80FE03C,
|
||||
.noFunc = bag_menu_inits_lists_menu,
|
||||
.noFunc = BagMenu_InitListsMenu,
|
||||
};
|
||||
|
||||
// .text
|
||||
@@ -115,7 +115,7 @@ void SetUpItemUseCallback(u8 taskId)
|
||||
type = ItemId_GetType(gSpecialVar_ItemId) - 1;
|
||||
if (!InBattlePyramid())
|
||||
{
|
||||
gUnknown_0203CE54->mainCallback2 = gUnknown_085920D8[type];
|
||||
gBagMenu->mainCallback2 = gUnknown_085920D8[type];
|
||||
unknown_ItemMenu_Confirm(taskId);
|
||||
}
|
||||
else
|
||||
@@ -154,7 +154,7 @@ void DisplayCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnFiel
|
||||
if (!isUsingRegisteredKeyItemOnField)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_DadsAdvice, sub_81C6714);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void sub_80FD254(void)
|
||||
|
||||
void ItemUseOutOfBattle_Mail(u8 taskId)
|
||||
{
|
||||
gUnknown_0203CE54->mainCallback2 = sub_80FD254;
|
||||
gBagMenu->mainCallback2 = sub_80FD254;
|
||||
unknown_ItemMenu_Confirm(taskId);
|
||||
}
|
||||
|
||||
@@ -595,7 +595,7 @@ void ItemUseOutOfBattle_PokeblockCase(u8 taskId)
|
||||
}
|
||||
else if (gTasks[taskId].data[3] != TRUE)
|
||||
{
|
||||
gUnknown_0203CE54->mainCallback2 = sub_80FDBEC;
|
||||
gBagMenu->mainCallback2 = sub_80FDBEC;
|
||||
unknown_ItemMenu_Confirm(taskId);
|
||||
}
|
||||
else
|
||||
@@ -628,7 +628,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId)
|
||||
|
||||
if (!gTasks[taskId].data[3])
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -643,7 +643,7 @@ void ItemUseOutOfBattle_PowderJar(u8 taskId)
|
||||
|
||||
if (!gTasks[taskId].data[3])
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -657,7 +657,7 @@ void sub_80FDD10(u8 taskId)
|
||||
{
|
||||
gUnknown_0203A0F4 = sub_80FDD74;
|
||||
gFieldCallback = MapPostLoadHook_UseItem;
|
||||
gUnknown_0203CE54->mainCallback2 = CB2_ReturnToField;
|
||||
gBagMenu->mainCallback2 = CB2_ReturnToField;
|
||||
unknown_ItemMenu_Confirm(taskId);
|
||||
}
|
||||
else
|
||||
@@ -782,7 +782,7 @@ void task08_0809AD8C(u8 taskId)
|
||||
|
||||
void sub_80FE024(u8 taskId)
|
||||
{
|
||||
bag_menu_yes_no(taskId, 6, &gUnknown_085920E8);
|
||||
BagMenu_YesNo(taskId, 6, &gUnknown_085920E8);
|
||||
}
|
||||
|
||||
void sub_80FE03C(u8 taskId)
|
||||
@@ -813,7 +813,7 @@ void ItemUseOutOfBattle_Repel(u8 taskId)
|
||||
if (VarGet(VAR_REPEL_STEP_COUNT) == 0)
|
||||
gTasks[taskId].func = sub_80FE124;
|
||||
else if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, BagMenu_InitListsMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_RepelEffectsLingered, sub_81C6714);
|
||||
}
|
||||
@@ -837,7 +837,7 @@ void sub_80FE164(u8 taskId)
|
||||
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
|
||||
sub_80FE058();
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, sub_81C6714);
|
||||
}
|
||||
@@ -849,7 +849,7 @@ void sub_80FE1D0(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_BIDORO);
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, sub_81C6714);
|
||||
}
|
||||
@@ -928,7 +928,7 @@ void ItemUseInBattle_PokeBall(u8 taskId)
|
||||
}
|
||||
else if (!InBattlePyramid())
|
||||
{
|
||||
DisplayItemMessage(taskId, 1, gText_BoxFull, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gText_BoxFull, BagMenu_InitListsMenu);
|
||||
}
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, sub_81C6714);
|
||||
@@ -965,7 +965,7 @@ void ItemUseInBattle_StatIncrease(u8 taskId)
|
||||
if (ExecuteTableBasedItemEffect(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, 1, gText_WontHaveEffect, bag_menu_inits_lists_menu);
|
||||
DisplayItemMessage(taskId, 1, gText_WontHaveEffect, BagMenu_InitListsMenu);
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gText_WontHaveEffect, sub_81C6714);
|
||||
}
|
||||
@@ -980,7 +980,7 @@ void sub_80FE54C(u8 taskId)
|
||||
{
|
||||
if (!InBattlePyramid())
|
||||
{
|
||||
gUnknown_0203CE54->mainCallback2 = sub_81B89F0;
|
||||
gBagMenu->mainCallback2 = sub_81B89F0;
|
||||
unknown_ItemMenu_Confirm(taskId);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "librfu.h"
|
||||
|
||||
struct RfuUnk1* gUnknown_03007870[4];
|
||||
struct RfuUnk2* gUnknown_03007880[4];
|
||||
struct RfuUnk5 *gUnknown_03007890;
|
||||
u32 *gUnknown_03007894;
|
||||
struct RfuUnk3* gUnknown_03007898;
|
||||
u8 gUnknown_030078A0[12];
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "librfu.h"
|
||||
|
||||
//TODO: decompile asm/librfu_intr.s to here
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "librfu.h"
|
||||
|
||||
struct RfuStruct *gRfuState;
|
||||
|
||||
extern IntrFunc IntrSIO32(void);
|
||||
|
||||
extern void STWI_stop_timer(void);
|
||||
|
||||
+15
-16
@@ -52,22 +52,21 @@ struct LinkTestBGInfo
|
||||
|
||||
// Static RAM declarations
|
||||
|
||||
IWRAM_DATA struct BlockTransfer sBlockSend;
|
||||
IWRAM_DATA u32 link_c_unused_03000d1c;
|
||||
IWRAM_DATA struct BlockTransfer sBlockRecv[MAX_LINK_PLAYERS];
|
||||
IWRAM_DATA u32 sBlockSendDelayCounter;
|
||||
IWRAM_DATA u32 gUnknown_03000D54;
|
||||
IWRAM_DATA u8 gUnknown_03000D58;
|
||||
IWRAM_DATA u32 sPlayerDataExchangeStatus;
|
||||
IWRAM_DATA u32 gUnknown_03000D60;
|
||||
IWRAM_DATA u8 sLinkTestLastBlockSendPos;
|
||||
ALIGNED() IWRAM_DATA u8 sLinkTestLastBlockRecvPos[MAX_LINK_PLAYERS];
|
||||
IWRAM_DATA u8 sNumVBlanksWithoutSerialIntr;
|
||||
IWRAM_DATA bool8 sSendBufferEmpty;
|
||||
IWRAM_DATA u16 sSendNonzeroCheck;
|
||||
IWRAM_DATA u16 sRecvNonzeroCheck;
|
||||
IWRAM_DATA u8 sChecksumAvailable;
|
||||
IWRAM_DATA u8 sHandshakePlayerCount;
|
||||
static struct BlockTransfer sBlockSend;
|
||||
static struct BlockTransfer sBlockRecv[MAX_LINK_PLAYERS];
|
||||
static u32 sBlockSendDelayCounter;
|
||||
static u32 gUnknown_03000D54;
|
||||
static u8 gUnknown_03000D58;
|
||||
static u32 sPlayerDataExchangeStatus;
|
||||
static u32 gUnknown_03000D60;
|
||||
static u8 sLinkTestLastBlockSendPos;
|
||||
static u8 sLinkTestLastBlockRecvPos[MAX_LINK_PLAYERS];
|
||||
static u8 sNumVBlanksWithoutSerialIntr;
|
||||
static bool8 sSendBufferEmpty;
|
||||
static u16 sSendNonzeroCheck;
|
||||
static u16 sRecvNonzeroCheck;
|
||||
static u8 sChecksumAvailable;
|
||||
static u8 sHandshakePlayerCount;
|
||||
|
||||
u16 gLinkPartnersHeldKeys[6];
|
||||
u32 gLinkDebugSeed;
|
||||
|
||||
+13
-61
@@ -24,10 +24,10 @@ extern u16 gHeldKeyCodeToSend;
|
||||
struct UnkRfuStruct_1 gUnknown_03004140;
|
||||
struct UnkRfuStruct_2 gUnknown_03005000;
|
||||
|
||||
IWRAM_DATA u8 gUnknown_03000D74;
|
||||
ALIGNED(4) IWRAM_DATA u8 gUnknown_03000D78[8];
|
||||
IWRAM_DATA u8 gUnknown_03000D80[16];
|
||||
IWRAM_DATA u16 gUnknown_03000D90[8];
|
||||
BSS_DATA u8 gUnknown_03000D74;
|
||||
ALIGNED(4) BSS_DATA u8 gUnknown_03000D78[8];
|
||||
BSS_DATA u8 gUnknown_03000D80[16];
|
||||
BSS_DATA u16 gUnknown_03000D90[8];
|
||||
|
||||
EWRAM_DATA u8 gWirelessStatusIndicatorSpriteId = 0;
|
||||
EWRAM_DATA ALIGNED(4) struct UnkLinkRfuStruct_02022B14 gUnknown_02022B14 = {};
|
||||
@@ -2021,6 +2021,8 @@ void sub_800DBF8(u8 *q1, u8 mode)
|
||||
}
|
||||
}
|
||||
|
||||
// File boundary here maybe?
|
||||
|
||||
void PkmnStrToASCII(u8 *q1, const u8 *q2)
|
||||
{
|
||||
s32 i;
|
||||
@@ -2413,7 +2415,7 @@ void RecordMixTrainerNames(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Save the connected trainers first, at the top of the list.
|
||||
nextSpace = 0;
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
@@ -2444,7 +2446,7 @@ void RecordMixTrainerNames(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Finalize the new list, and clean up.
|
||||
memcpy(gSaveBlock1Ptr->trainerNameRecords, newRecords, 20 * sizeof(struct TrainerNameRecord));
|
||||
free(newRecords);
|
||||
@@ -2914,70 +2916,21 @@ void sub_800EF88(u8 a0)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// FIXME: gUnknown_03005000.unk_c87 should be in r5
|
||||
// FIXME: gRecvCmds should be in r6 and r7
|
||||
void sub_800EFB0(void)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
struct UnkRfuStruct_2 *ptr = &gUnknown_03005000;
|
||||
for (j = 0; j < 7; j++)
|
||||
{
|
||||
gUnknown_03005000.unk_c87[i][j][1] = gRecvCmds[i][j] >> 8;
|
||||
gUnknown_03005000.unk_c87[i][j][0] = gRecvCmds[i][j];
|
||||
ptr->unk_c87[i][j][1] = gRecvCmds[i][j] >> 8;
|
||||
ptr->unk_c87[i][j][0] = gRecvCmds[i][j];
|
||||
}
|
||||
}
|
||||
CpuFill16(0, gRecvCmds, sizeof gRecvCmds);
|
||||
}
|
||||
#else
|
||||
NAKED void sub_800EFB0(void)
|
||||
{
|
||||
asm_unified("\tpush {r4-r7,lr}\n"
|
||||
"\tsub sp, 0x4\n"
|
||||
"\tmovs r2, 0\n"
|
||||
"\tldr r7, =gRecvCmds\n"
|
||||
"\tldr r0, =gUnknown_03005000\n"
|
||||
"\tadds r6, r7, 0\n"
|
||||
"\tldr r1, =0x00000c87\n"
|
||||
"\tadds r5, r0, r1\n"
|
||||
"_0800EFC0:\n"
|
||||
"\tmovs r3, 0\n"
|
||||
"\tlsls r0, r2, 3\n"
|
||||
"\tlsls r1, r2, 4\n"
|
||||
"\tadds r4, r2, 0x1\n"
|
||||
"\tsubs r0, r2\n"
|
||||
"\tlsls r0, 1\n"
|
||||
"\tadds r2, r0, r5\n"
|
||||
"\tadds r1, r6\n"
|
||||
"_0800EFD0:\n"
|
||||
"\tldrh r0, [r1]\n"
|
||||
"\tlsrs r0, 8\n"
|
||||
"\tstrb r0, [r2, 0x1]\n"
|
||||
"\tldrh r0, [r1]\n"
|
||||
"\tstrb r0, [r2]\n"
|
||||
"\tadds r2, 0x2\n"
|
||||
"\tadds r1, 0x2\n"
|
||||
"\tadds r3, 0x1\n"
|
||||
"\tcmp r3, 0x6\n"
|
||||
"\tble _0800EFD0\n"
|
||||
"\tadds r2, r4, 0\n"
|
||||
"\tcmp r2, 0x4\n"
|
||||
"\tble _0800EFC0\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tmov r1, sp\n"
|
||||
"\tstrh r0, [r1]\n"
|
||||
"\tldr r2, =0x01000028\n"
|
||||
"\tmov r0, sp\n"
|
||||
"\tadds r1, r7, 0\n"
|
||||
"\tbl CpuSet\n"
|
||||
"\tadd sp, 0x4\n"
|
||||
"\tpop {r4-r7}\n"
|
||||
"\tpop {r0}\n"
|
||||
"\tbx r0\n"
|
||||
"\t.pool");
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_800F014(void)
|
||||
{
|
||||
@@ -3542,7 +3495,7 @@ void sub_800FD14(u16 command)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800FE50(u16 *a0)
|
||||
void sub_800FE50(void *a0)
|
||||
{
|
||||
if (gSendCmd[0] == 0 && !sub_8011A80())
|
||||
{
|
||||
@@ -5191,4 +5144,3 @@ u32 GetRfuRecvQueueLength(void)
|
||||
{
|
||||
return gUnknown_03005000.unk_124.unk_8c2;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -42,10 +42,10 @@ EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
|
||||
EWRAM_DATA u32 gLastEncryptionKey = 0;
|
||||
|
||||
// IWRAM common
|
||||
IWRAM_DATA bool32 gFlashMemoryPresent;
|
||||
IWRAM_DATA struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
IWRAM_DATA struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
IWRAM_DATA struct PokemonStorage *gPokemonStoragePtr;
|
||||
bool32 gFlashMemoryPresent;
|
||||
struct SaveBlock1 *gSaveBlock1Ptr;
|
||||
struct SaveBlock2 *gSaveBlock2Ptr;
|
||||
struct PokemonStorage *gPokemonStoragePtr;
|
||||
|
||||
// code
|
||||
void CheckForFlashMemory(void)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <string.h>
|
||||
#include "gba/m4a_internal.h"
|
||||
|
||||
extern const u8 gCgb3Vol[];
|
||||
|
||||
+20
@@ -85,7 +85,27 @@ void EnableVCountIntrAtLine150(void);
|
||||
|
||||
void AgbMain()
|
||||
{
|
||||
#if MODERN
|
||||
// Modern compilers are liberal with the stack on entry to this function,
|
||||
// so RegisterRamReset may crash if it resets IWRAM.
|
||||
RegisterRamReset(RESET_ALL & ~RESET_IWRAM);
|
||||
asm("mov\tr1, #0xC0\n"
|
||||
"\tlsl\tr1, r1, #0x12\n"
|
||||
"\tmov r2, #0xFC\n"
|
||||
"\tlsl r2, r2, #0x7\n"
|
||||
"\tadd\tr2, r1, r2\n"
|
||||
"\tmov\tr0, #0\n"
|
||||
"\tmov\tr3, r0\n"
|
||||
"\tmov\tr4, r0\n"
|
||||
"\tmov\tr5, r0\n"
|
||||
".LCU0:\n"
|
||||
"\tstmia r1!, {r0, r3, r4, r5}\n"
|
||||
"\tcmp\tr1, r2\n"
|
||||
"\tbcc\t.LCU0\n"
|
||||
);
|
||||
#else
|
||||
RegisterRamReset(RESET_ALL);
|
||||
#endif //MODERN
|
||||
*(vu16 *)BG_PLTT = 0x7FFF;
|
||||
InitGpuRegManager();
|
||||
REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3;
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@
|
||||
static EWRAM_DATA u8 gUnknown_02022D04 = 0;
|
||||
static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0;
|
||||
|
||||
static IWRAM_DATA u8 sBirchSpeechMainTaskId;
|
||||
static u8 sBirchSpeechMainTaskId;
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
|
||||
+1
-1
@@ -2012,4 +2012,4 @@ void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId)
|
||||
void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId)
|
||||
{
|
||||
DrawMatchCallTextBoxBorder(windowId, tileOffset, paletteId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ static void Task_BardSong(u8 taskId);
|
||||
static void StorytellerSetup(void);
|
||||
static void Storyteller_ResetFlag(void);
|
||||
|
||||
IWRAM_DATA u8 sSelectedStory;
|
||||
static u8 sSelectedStory;
|
||||
|
||||
struct BardSong gBardSong;
|
||||
|
||||
|
||||
+51
-305
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "alloc.h"
|
||||
#include "bg.h"
|
||||
#include "blit.h"
|
||||
#include "dma3.h"
|
||||
#include "event_data.h"
|
||||
#include "graphics.h"
|
||||
@@ -2013,337 +2014,82 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y)
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, 0xFF, 0);
|
||||
}
|
||||
|
||||
//Screw this function, it's long and unreferenced and ugh
|
||||
|
||||
struct UnkStruct_819A080 {
|
||||
u8 *unk00;
|
||||
u16 unk04;
|
||||
u16 unk06;
|
||||
};
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_819A080(struct UnkStruct_819A080 *a0, struct UnkStruct_819A080 *a1, u16 a2, u16 a3, u16 a4, u16 a5, u16 a6, u16 a7)
|
||||
// Unused. Similar to BlitBitmapRect4Bit.
|
||||
void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
{
|
||||
// r3 = a3
|
||||
// r4 = a5
|
||||
// r1 = a6
|
||||
// r5 = a7
|
||||
// sp+00 = a0
|
||||
// sp+04 = a1
|
||||
// sp+08 = a2
|
||||
// sp+0c = a4
|
||||
int sp10 = a1->unk04 - a4 < a6 ? a1->unk04 - a4 + a2 : a6 + a2;
|
||||
int sp14 = a0->unk06 - a5 < a7 ? a3 + a0->unk06 - a5 : a3 + a7;
|
||||
int sp18 = (a0->unk04 + (a0->unk04 & 0x7)) / 8;
|
||||
int sp1c = (a1->unk04 + (a1->unk04 & 0x7)) / 8;
|
||||
int r12; // sp+20
|
||||
int r8; // sp+24
|
||||
int r5;
|
||||
int r6;
|
||||
u16 r2;
|
||||
int loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY;
|
||||
const u8 *pixelsSrc;
|
||||
u16 *pixelsDst;
|
||||
u16 toOrr;
|
||||
|
||||
for (r12 = a3, r8 = a5; r12 < sp14; r12++, r8++)
|
||||
if (dst->width - dstX < width)
|
||||
xEnd = dst->width - dstX + srcX;
|
||||
else
|
||||
xEnd = width + srcX;
|
||||
|
||||
if (dst->height - dstY < height)
|
||||
yEnd = srcY + dst->height - dstY;
|
||||
else
|
||||
yEnd = srcY + height;
|
||||
|
||||
multiplierSrcY = (src->width + (src->width & 7)) >> 3;
|
||||
multiplierDstY = (dst->width + (dst->width & 7)) >> 3;
|
||||
|
||||
for (loopSrcY = srcY, loopDstY = dstY; loopSrcY < yEnd; loopSrcY++, loopDstY++)
|
||||
{
|
||||
for (r5 = a2, r6 = a4; a5 < sp10; a5++, a6++)
|
||||
for (loopSrcX = srcX, loopDstX = dstX; loopSrcX < xEnd; loopSrcX++, loopDstX++)
|
||||
{
|
||||
u8 *r3 = a0->unk00 + ((r5 >> 1) & 0x3) + ((r5 >> 3) << 5) + (((r12 >> 3) * sp18) << 5) + ((r12 & 0x7) << 2);
|
||||
u8 *r4 = a1->unk00 + ((r6 >> 1) & 0x3) + ((r6 >> 3) << 5) + (((r8 >> 3) * sp1c) << 5) + ((r8 & 0x7) << 2);
|
||||
if (((uintptr_t)r4) & 0x1)
|
||||
pixelsSrc = src->pixels + ((loopSrcX >> 1) & 3) + ((loopSrcX >> 3) << 5) + (((loopSrcY >> 3) * multiplierSrcY) << 5) + ((u32)(loopSrcY << 0x1d) >> 0x1B);
|
||||
pixelsDst = (void*) dst->pixels + ((loopDstX >> 1) & 3) + ((loopDstX >> 3) << 5) + ((( loopDstY >> 3) * multiplierDstY) << 5) + ((u32)( loopDstY << 0x1d) >> 0x1B);
|
||||
|
||||
if ((uintptr_t )pixelsDst & 0x1)
|
||||
{
|
||||
u16 *r4_2 = (u16 *)(r4 - 1);
|
||||
if (r6 & 0x1)
|
||||
pixelsDst = (void*)(pixelsDst) - 1;
|
||||
if (loopDstX & 0x1)
|
||||
{
|
||||
r2 = *r4_2 & 0x0fff;
|
||||
if (r5 & 0x1)
|
||||
*r4_2 = r2 | ((*r3 & 0xf0) << 8);
|
||||
toOrr = *pixelsDst & 0x0fff;
|
||||
if (loopSrcX & 0x1)
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0xf0) << 8);
|
||||
else
|
||||
*r4_2 = r2 | ((*r3 & 0x0f) << 12);
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0x0f) << 12);
|
||||
}
|
||||
else
|
||||
{
|
||||
r2 = *r4_2 * 0xf0ff;
|
||||
if (r5 & 0x1)
|
||||
*r4_2 = r2 | ((*r3 & 0xf0) << 4);
|
||||
toOrr = *pixelsDst & 0xf0ff;
|
||||
if (loopSrcX & 0x1)
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0xf0) << 4);
|
||||
else
|
||||
*r4_2 = r2 | ((*r3 & 0x0f) << 8);
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0x0f) << 8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
u16 *r4_2 = (u16 *)r4;
|
||||
if (r6 & 1)
|
||||
if (loopDstX & 1)
|
||||
{
|
||||
r2 = *r4_2 & 0xff0f;
|
||||
if (r5 & 1)
|
||||
*r4_2 = r2 | ((*r3 & 0xf0) << 0);
|
||||
toOrr = *pixelsDst & 0xff0f;
|
||||
if (loopSrcX & 1)
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0xf0) << 0);
|
||||
else
|
||||
*r4_2 = r2 | ((*r3 & 0x0f) << 4);
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0x0f) << 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
r2 = *r4_2 & 0xfff0;
|
||||
if (r5 & 1)
|
||||
*r4_2 = r2 | ((*r3 & 0xf0) >> 4);
|
||||
toOrr = *pixelsDst & 0xfff0;
|
||||
if (loopSrcX & 1)
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0xf0) >> 4);
|
||||
else
|
||||
*r4_2 = r2 | ((*r3 & 0x0f) >> 0);
|
||||
*pixelsDst = toOrr | ((*pixelsSrc & 0x0f) >> 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Needed to match, urgh.
|
||||
#ifndef NONMATCHING
|
||||
asm("":::"r4");
|
||||
pixelsDst++;pixelsDst--;
|
||||
#endif // NONMATCHING
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_819A080(struct UnkStruct_819A080 *a0, struct UnkStruct_819A080 *a1, u16 a2, u16 a3, u16 a4, u16 a5, u16 a6, u16 a7)
|
||||
{
|
||||
asm("push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, #0x28\n\
|
||||
str r0, [sp]\n\
|
||||
str r1, [sp, #0x4]\n\
|
||||
ldr r0, [sp, #0x48]\n\
|
||||
ldr r4, [sp, #0x4C]\n\
|
||||
ldr r1, [sp, #0x50]\n\
|
||||
ldr r5, [sp, #0x54]\n\
|
||||
lsl r2, #16\n\
|
||||
lsr r2, #16\n\
|
||||
str r2, [sp, #0x8]\n\
|
||||
lsl r3, #16\n\
|
||||
lsr r3, #16\n\
|
||||
lsl r0, #16\n\
|
||||
lsr r0, #16\n\
|
||||
str r0, [sp, #0xC]\n\
|
||||
lsl r4, #16\n\
|
||||
lsr r4, #16\n\
|
||||
lsl r1, #16\n\
|
||||
lsr r1, #16\n\
|
||||
lsl r5, #16\n\
|
||||
lsr r5, #16\n\
|
||||
ldr r2, [sp, #0x4]\n\
|
||||
ldrh r0, [r2, #0x4]\n\
|
||||
ldr r2, [sp, #0xC]\n\
|
||||
sub r0, r2\n\
|
||||
ldr r2, [sp, #0x8]\n\
|
||||
add r2, r1, r2\n\
|
||||
str r2, [sp, #0x10]\n\
|
||||
cmp r0, r1\n\
|
||||
bge _0819A0CC\n\
|
||||
ldr r1, [sp, #0x8]\n\
|
||||
add r0, r1\n\
|
||||
str r0, [sp, #0x10]\n\
|
||||
_0819A0CC:\n\
|
||||
ldr r2, [sp, #0x4]\n\
|
||||
ldrh r1, [r2, #0x6]\n\
|
||||
sub r0, r1, r4\n\
|
||||
cmp r0, r5\n\
|
||||
bge _0819A0DE\n\
|
||||
add r0, r3, r1\n\
|
||||
sub r0, r4\n\
|
||||
str r0, [sp, #0x14]\n\
|
||||
b _0819A0E2\n\
|
||||
_0819A0DE:\n\
|
||||
add r5, r3, r5\n\
|
||||
str r5, [sp, #0x14]\n\
|
||||
_0819A0E2:\n\
|
||||
ldr r0, [sp]\n\
|
||||
ldrh r1, [r0, #0x4]\n\
|
||||
mov r2, #0x7\n\
|
||||
add r0, r1, #0\n\
|
||||
and r0, r2\n\
|
||||
add r1, r0\n\
|
||||
asr r1, #3\n\
|
||||
str r1, [sp, #0x18]\n\
|
||||
ldr r0, [sp, #0x4]\n\
|
||||
ldrh r1, [r0, #0x4]\n\
|
||||
add r0, r1, #0\n\
|
||||
and r0, r2\n\
|
||||
add r1, r0\n\
|
||||
asr r1, #3\n\
|
||||
str r1, [sp, #0x1C]\n\
|
||||
mov r12, r3\n\
|
||||
mov r8, r4\n\
|
||||
ldr r1, [sp, #0x14]\n\
|
||||
cmp r12, r1\n\
|
||||
blt _0819A10C\n\
|
||||
b _0819A24A\n\
|
||||
_0819A10C:\n\
|
||||
ldr r5, [sp, #0x8]\n\
|
||||
ldr r6, [sp, #0xC]\n\
|
||||
mov r2, r12\n\
|
||||
add r2, #0x1\n\
|
||||
str r2, [sp, #0x20]\n\
|
||||
mov r0, r8\n\
|
||||
add r0, #0x1\n\
|
||||
str r0, [sp, #0x24]\n\
|
||||
ldr r1, [sp, #0x10]\n\
|
||||
cmp r5, r1\n\
|
||||
blt _0819A124\n\
|
||||
b _0819A23A\n\
|
||||
_0819A124:\n\
|
||||
mov r7, #0x1\n\
|
||||
mov r2, #0xF0\n\
|
||||
mov r10, r2\n\
|
||||
mov r0, #0xF\n\
|
||||
mov r9, r0\n\
|
||||
_0819A12E:\n\
|
||||
asr r0, r5, #1\n\
|
||||
mov r1, #0x3\n\
|
||||
and r0, r1\n\
|
||||
ldr r2, [sp]\n\
|
||||
ldr r1, [r2]\n\
|
||||
add r1, r0\n\
|
||||
asr r0, r5, #3\n\
|
||||
lsl r0, #5\n\
|
||||
add r1, r0\n\
|
||||
mov r2, r12\n\
|
||||
asr r0, r2, #3\n\
|
||||
ldr r2, [sp, #0x18]\n\
|
||||
mul r0, r2\n\
|
||||
lsl r0, #5\n\
|
||||
add r1, r0\n\
|
||||
mov r2, r12\n\
|
||||
lsl r0, r2, #29\n\
|
||||
lsr r0, #27\n\
|
||||
add r3, r1, r0\n\
|
||||
asr r0, r6, #1\n\
|
||||
mov r1, #0x3\n\
|
||||
and r0, r1\n\
|
||||
ldr r2, [sp, #0x4]\n\
|
||||
ldr r1, [r2]\n\
|
||||
add r1, r0\n\
|
||||
asr r0, r6, #3\n\
|
||||
lsl r0, #5\n\
|
||||
add r1, r0\n\
|
||||
mov r2, r8\n\
|
||||
asr r0, r2, #3\n\
|
||||
ldr r2, [sp, #0x1C]\n\
|
||||
mul r0, r2\n\
|
||||
lsl r0, #5\n\
|
||||
add r1, r0\n\
|
||||
mov r2, r8\n\
|
||||
lsl r0, r2, #29\n\
|
||||
lsr r0, #27\n\
|
||||
add r4, r1, r0\n\
|
||||
add r0, r4, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A1DA\n\
|
||||
sub r4, #0x1\n\
|
||||
add r0, r6, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A1B2\n\
|
||||
ldrh r0, [r4]\n\
|
||||
ldr r2, =0x00000fff\n\
|
||||
and r2, r0\n\
|
||||
add r0, r5, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A1A8\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r10\n\
|
||||
and r0, r1\n\
|
||||
lsl r0, #8\n\
|
||||
b _0819A22A\n\
|
||||
.pool\n\
|
||||
_0819A1A8:\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r9\n\
|
||||
and r0, r1\n\
|
||||
lsl r0, #12\n\
|
||||
b _0819A22A\n\
|
||||
_0819A1B2:\n\
|
||||
ldrh r0, [r4]\n\
|
||||
ldr r2, =0x0000f0ff\n\
|
||||
and r2, r0\n\
|
||||
add r0, r5, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A1D0\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r10\n\
|
||||
and r0, r1\n\
|
||||
lsl r0, #4\n\
|
||||
b _0819A22A\n\
|
||||
.pool\n\
|
||||
_0819A1D0:\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r9\n\
|
||||
and r0, r1\n\
|
||||
lsl r0, #8\n\
|
||||
b _0819A22A\n\
|
||||
_0819A1DA:\n\
|
||||
add r0, r6, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A206\n\
|
||||
ldrh r0, [r4]\n\
|
||||
ldr r2, =0x0000ff0f\n\
|
||||
and r2, r0\n\
|
||||
add r0, r5, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A1FC\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r10\n\
|
||||
b _0819A228\n\
|
||||
.pool\n\
|
||||
_0819A1FC:\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r9\n\
|
||||
and r0, r1\n\
|
||||
lsl r0, #4\n\
|
||||
b _0819A22A\n\
|
||||
_0819A206:\n\
|
||||
ldrh r0, [r4]\n\
|
||||
ldr r2, =0x0000fff0\n\
|
||||
and r2, r0\n\
|
||||
add r0, r5, #0\n\
|
||||
and r0, r7\n\
|
||||
cmp r0, #0\n\
|
||||
beq _0819A224\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r10\n\
|
||||
and r0, r1\n\
|
||||
lsr r0, #4\n\
|
||||
b _0819A22A\n\
|
||||
.pool\n\
|
||||
_0819A224:\n\
|
||||
ldrb r1, [r3]\n\
|
||||
mov r0, r9\n\
|
||||
_0819A228:\n\
|
||||
and r0, r1\n\
|
||||
_0819A22A:\n\
|
||||
orr r2, r0\n\
|
||||
strh r2, [r4]\n\
|
||||
add r5, #0x1\n\
|
||||
add r6, #0x1\n\
|
||||
ldr r0, [sp, #0x10]\n\
|
||||
cmp r5, r0\n\
|
||||
bge _0819A23A\n\
|
||||
b _0819A12E\n\
|
||||
_0819A23A:\n\
|
||||
ldr r1, [sp, #0x20]\n\
|
||||
mov r12, r1\n\
|
||||
ldr r2, [sp, #0x24]\n\
|
||||
mov r8, r2\n\
|
||||
ldr r0, [sp, #0x14]\n\
|
||||
cmp r12, r0\n\
|
||||
bge _0819A24A\n\
|
||||
b _0819A10C\n\
|
||||
_0819A24A:\n\
|
||||
add sp, #0x28\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_819A25C(u8 palOffset, u16 speciesId)
|
||||
{
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ EWRAM_DATA static struct YesNoFuncTable gUnknown_0203A138 = {0};
|
||||
EWRAM_DATA static u8 gUnknown_0203A140 = 0;
|
||||
|
||||
// IWRAM bss vars
|
||||
IWRAM_DATA static TaskFunc gUnknown_0300117C;
|
||||
static TaskFunc gUnknown_0300117C;
|
||||
|
||||
// const rom data
|
||||
static const struct OamData sOamData_859F4E8 =
|
||||
|
||||
+89
-321
@@ -458,338 +458,106 @@ void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0)
|
||||
arg0->unk354 = 1;
|
||||
}
|
||||
|
||||
/* TODO
|
||||
static void sub_81D2278(struct UnknownStruct_81D1ED4 *arg0, u16 arg1[66][2], struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 arg5[66][2])
|
||||
static void sub_81D2278(struct UnknownStruct_81D1ED4 *arg0, u16 *arg1, struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 *arg5)
|
||||
{
|
||||
s32 var_2C = 0;
|
||||
u16 r8;
|
||||
s32 r10, r4, r2, r0, r1, var_30;
|
||||
u16 i, r8, r10, r0, var_30;
|
||||
u16 *ptr;
|
||||
s32 r4, var_2C;
|
||||
|
||||
var_2C = 0;
|
||||
if (arg2->unk2 < arg3->unk2)
|
||||
{
|
||||
r2 = arg2->unk2;
|
||||
r10 = arg2->unk2;
|
||||
r0 = arg3->unk2;
|
||||
r1 = arg2->unk0;
|
||||
r4 = r1 << 10;
|
||||
r4 = arg2->unk0 << 10;
|
||||
var_30 = arg3->unk0;
|
||||
r8 = r0 - r10;
|
||||
if (r8 != 0)
|
||||
var_2C = ((var_30 - arg2->unk0) << 10) / r8;
|
||||
}
|
||||
else
|
||||
{
|
||||
r0 = arg2->unk0;
|
||||
r0 = arg2->unk2;
|
||||
r10 = arg3->unk2;
|
||||
r1 = arg3->unk0;
|
||||
r4 = r1 << 10;
|
||||
r4 = arg3->unk0 << 10;
|
||||
var_30 = arg2->unk0;
|
||||
r2 = arg3->unk2;
|
||||
r8 = r0 - r10;
|
||||
if (r8 != 0)
|
||||
var_2C = ((var_30 - arg3->unk0) << 10) / r8;
|
||||
}
|
||||
r8 = r0 - r2;
|
||||
if (r8 != 0)
|
||||
var_2C = ((var_30 - r1) << 10) / r8;
|
||||
|
||||
r8++;
|
||||
if (arg5 == NULL)
|
||||
{
|
||||
arg1 += (r10 - 56) * 2;
|
||||
for (i = 0; i < r8; i++)
|
||||
{
|
||||
arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4;
|
||||
r4 += var_2C;
|
||||
arg1 += 2;
|
||||
}
|
||||
|
||||
ptr = arg1 - 2;
|
||||
}
|
||||
}
|
||||
*/
|
||||
NAKED
|
||||
static void sub_81D2278(struct UnknownStruct_81D1ED4 *arg0, u16 arg1[66][2], struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 arg5[66][2])
|
||||
{
|
||||
asm_unified("\n\
|
||||
push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
mov r6, r9\n\
|
||||
mov r5, r8\n\
|
||||
push {r5-r7}\n\
|
||||
sub sp, 0x18\n\
|
||||
str r0, [sp]\n\
|
||||
adds r6, r1, 0\n\
|
||||
adds r5, r2, 0\n\
|
||||
str r3, [sp, 0x4]\n\
|
||||
ldr r0, [sp, 0x38]\n\
|
||||
ldr r7, [sp, 0x3C]\n\
|
||||
lsls r0, 24\n\
|
||||
lsrs r0, 24\n\
|
||||
mov r9, r0\n\
|
||||
movs r0, 0\n\
|
||||
str r0, [sp, 0xC]\n\
|
||||
ldrh r0, [r5, 0x2]\n\
|
||||
ldrh r1, [r3, 0x2]\n\
|
||||
cmp r0, r1\n\
|
||||
bcs _081D22B2\n\
|
||||
adds r2, r0, 0\n\
|
||||
mov r10, r2\n\
|
||||
ldrh r0, [r3, 0x2]\n\
|
||||
ldrh r1, [r5]\n\
|
||||
lsls r4, r1, 10\n\
|
||||
ldrh r3, [r3]\n\
|
||||
str r3, [sp, 0x8]\n\
|
||||
b _081D22C6\n\
|
||||
_081D22B2:\n\
|
||||
ldrh r0, [r5, 0x2]\n\
|
||||
ldr r1, [sp, 0x4]\n\
|
||||
ldrh r1, [r1, 0x2]\n\
|
||||
mov r10, r1\n\
|
||||
ldr r2, [sp, 0x4]\n\
|
||||
ldrh r1, [r2]\n\
|
||||
lsls r4, r1, 10\n\
|
||||
ldrh r3, [r5]\n\
|
||||
str r3, [sp, 0x8]\n\
|
||||
mov r2, r10\n\
|
||||
_081D22C6:\n\
|
||||
subs r0, r2\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
mov r8, r0\n\
|
||||
cmp r0, 0\n\
|
||||
beq _081D22DE\n\
|
||||
subs r0, r3, r1\n\
|
||||
lsls r0, 10\n\
|
||||
mov r1, r8\n\
|
||||
bl __divsi3\n\
|
||||
str r0, [sp, 0xC]\n\
|
||||
_081D22DE:\n\
|
||||
mov r0, r8\n\
|
||||
adds r0, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r0, 16\n\
|
||||
mov r8, r0\n\
|
||||
cmp r7, 0\n\
|
||||
bne _081D2328\n\
|
||||
mov r0, r10\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r6, r0\n\
|
||||
movs r5, 0\n\
|
||||
mov r3, r9\n\
|
||||
lsls r3, 1\n\
|
||||
mov r12, r3\n\
|
||||
ldr r0, [sp, 0x8]\n\
|
||||
add r0, r9\n\
|
||||
str r0, [sp, 0x10]\n\
|
||||
cmp r7, r8\n\
|
||||
bcs _081D23B6\n\
|
||||
movs r7, 0x1\n\
|
||||
_081D2308:\n\
|
||||
adds r2, r3, r6\n\
|
||||
asrs r1, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
ands r0, r7\n\
|
||||
adds r1, r0\n\
|
||||
add r1, r9\n\
|
||||
strh r1, [r2]\n\
|
||||
ldr r1, [sp, 0xC]\n\
|
||||
adds r4, r1\n\
|
||||
adds r6, 0x4\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, r8\n\
|
||||
bcc _081D2308\n\
|
||||
b _081D23B6\n\
|
||||
_081D2328:\n\
|
||||
ldr r2, [sp, 0xC]\n\
|
||||
cmp r2, 0\n\
|
||||
ble _081D23C0\n\
|
||||
mov r0, r10\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r7, r0\n\
|
||||
movs r5, 0\n\
|
||||
mov r3, r9\n\
|
||||
lsls r3, 1\n\
|
||||
mov r12, r3\n\
|
||||
ldr r0, [sp, 0x8]\n\
|
||||
add r0, r9\n\
|
||||
str r0, [sp, 0x10]\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D237A\n\
|
||||
ldr r0, =0x00026bff\n\
|
||||
cmp r4, r0\n\
|
||||
bgt _081D237A\n\
|
||||
mov r1, r12\n\
|
||||
str r1, [sp, 0x14]\n\
|
||||
_081D2352:\n\
|
||||
ldr r3, [sp, 0x14]\n\
|
||||
adds r2, r3, r7\n\
|
||||
asrs r1, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
movs r3, 0x1\n\
|
||||
ands r0, r3\n\
|
||||
adds r1, r0\n\
|
||||
add r1, r9\n\
|
||||
strh r1, [r2]\n\
|
||||
ldr r0, [sp, 0xC]\n\
|
||||
adds r4, r0\n\
|
||||
adds r7, 0x4\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D237A\n\
|
||||
ldr r1, =0x00026bff\n\
|
||||
cmp r4, r1\n\
|
||||
ble _081D2352\n\
|
||||
_081D237A:\n\
|
||||
mov r2, r10\n\
|
||||
adds r1, r2, r5\n\
|
||||
ldr r3, [sp]\n\
|
||||
movs r2, 0xD4\n\
|
||||
lsls r2, 2\n\
|
||||
adds r0, r3, r2\n\
|
||||
strh r1, [r0]\n\
|
||||
ldrh r0, [r0]\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r6, r0\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D23B6\n\
|
||||
mov r3, r12\n\
|
||||
movs r7, 0x1\n\
|
||||
_081D2398:\n\
|
||||
adds r2, r3, r6\n\
|
||||
asrs r1, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
ands r0, r7\n\
|
||||
adds r1, r0\n\
|
||||
add r1, r9\n\
|
||||
strh r1, [r2]\n\
|
||||
ldr r0, [sp, 0xC]\n\
|
||||
adds r4, r0\n\
|
||||
adds r6, 0x4\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, r8\n\
|
||||
bcc _081D2398\n\
|
||||
_081D23B6:\n\
|
||||
subs r0, r6, 0x4\n\
|
||||
b _081D248C\n\
|
||||
.pool\n\
|
||||
_081D23C0:\n\
|
||||
ldr r1, [sp, 0xC]\n\
|
||||
cmp r1, 0\n\
|
||||
bge _081D2464\n\
|
||||
mov r0, r10\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r6, r0\n\
|
||||
movs r5, 0\n\
|
||||
mov r2, r9\n\
|
||||
lsls r2, 1\n\
|
||||
mov r12, r2\n\
|
||||
ldr r3, [sp, 0x8]\n\
|
||||
add r3, r9\n\
|
||||
str r3, [sp, 0x10]\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D241E\n\
|
||||
adds r3, r2, r6\n\
|
||||
asrs r1, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
movs r2, 0x1\n\
|
||||
ands r0, r2\n\
|
||||
adds r1, r0\n\
|
||||
add r1, r9\n\
|
||||
strh r1, [r3]\n\
|
||||
b _081D2414\n\
|
||||
_081D23F2:\n\
|
||||
ldr r0, [sp, 0xC]\n\
|
||||
adds r4, r0\n\
|
||||
adds r6, 0x4\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D241E\n\
|
||||
mov r1, r12\n\
|
||||
adds r3, r1, r6\n\
|
||||
asrs r2, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
movs r1, 0x1\n\
|
||||
ands r0, r1\n\
|
||||
adds r2, r0\n\
|
||||
add r2, r9\n\
|
||||
strh r2, [r3]\n\
|
||||
_081D2414:\n\
|
||||
ldr r0, =0x00026bff\n\
|
||||
cmp r4, r0\n\
|
||||
bgt _081D23F2\n\
|
||||
movs r0, 0x9B\n\
|
||||
strh r0, [r3]\n\
|
||||
_081D241E:\n\
|
||||
mov r2, r10\n\
|
||||
adds r1, r2, r5\n\
|
||||
ldr r3, [sp]\n\
|
||||
movs r2, 0xD4\n\
|
||||
lsls r2, 2\n\
|
||||
adds r0, r3, r2\n\
|
||||
strh r1, [r0]\n\
|
||||
ldrh r0, [r0]\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r7, r0\n\
|
||||
cmp r5, r8\n\
|
||||
bcs _081D245A\n\
|
||||
mov r3, r12\n\
|
||||
movs r6, 0x1\n\
|
||||
_081D243C:\n\
|
||||
adds r2, r3, r7\n\
|
||||
asrs r1, r4, 10\n\
|
||||
asrs r0, r4, 9\n\
|
||||
ands r0, r6\n\
|
||||
adds r1, r0\n\
|
||||
add r1, r9\n\
|
||||
strh r1, [r2]\n\
|
||||
ldr r0, [sp, 0xC]\n\
|
||||
adds r4, r0\n\
|
||||
adds r7, 0x4\n\
|
||||
adds r0, r5, 0x1\n\
|
||||
lsls r0, 16\n\
|
||||
lsrs r5, r0, 16\n\
|
||||
cmp r5, r8\n\
|
||||
bcc _081D243C\n\
|
||||
_081D245A:\n\
|
||||
subs r0, r7, 0x4\n\
|
||||
b _081D248C\n\
|
||||
.pool\n\
|
||||
_081D2464:\n\
|
||||
ldr r1, [sp]\n\
|
||||
movs r2, 0xD4\n\
|
||||
lsls r2, 2\n\
|
||||
adds r0, r1, r2\n\
|
||||
mov r3, r10\n\
|
||||
strh r3, [r0]\n\
|
||||
mov r0, r10\n\
|
||||
subs r0, 0x38\n\
|
||||
lsls r0, 2\n\
|
||||
adds r6, r0\n\
|
||||
adds r7, r0\n\
|
||||
ldrh r0, [r5]\n\
|
||||
adds r0, 0x1\n\
|
||||
strh r0, [r6, 0x2]\n\
|
||||
ldr r1, [sp, 0x4]\n\
|
||||
ldrh r0, [r1]\n\
|
||||
strh r0, [r7]\n\
|
||||
movs r0, 0x9B\n\
|
||||
strh r0, [r7, 0x2]\n\
|
||||
b _081D2494\n\
|
||||
_081D248C:\n\
|
||||
add r0, r12\n\
|
||||
mov r2, sp\n\
|
||||
ldrh r2, [r2, 0x10]\n\
|
||||
strh r2, [r0]\n\
|
||||
_081D2494:\n\
|
||||
add sp, 0x18\n\
|
||||
pop {r3-r5}\n\
|
||||
mov r8, r3\n\
|
||||
mov r9, r4\n\
|
||||
mov r10, r5\n\
|
||||
pop {r4-r7}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
");
|
||||
else if (var_2C > 0)
|
||||
{
|
||||
arg5 += (r10 - 56) * 2;
|
||||
// Less readable than the other loops, but it has to be written this way to match.
|
||||
for (i = 0; i < r8; arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4, r4 += var_2C, arg5 += 2, i++)
|
||||
{
|
||||
if (r4 >= (155 << 10))
|
||||
break;
|
||||
}
|
||||
|
||||
arg0->unk350 = r10 + i;
|
||||
arg1 += (arg0->unk350 - 56) * 2;
|
||||
for (; i < r8; i++)
|
||||
{
|
||||
arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4;
|
||||
r4 += var_2C;
|
||||
arg1 += 2;
|
||||
}
|
||||
|
||||
ptr = arg1 - 2;
|
||||
}
|
||||
else if (var_2C < 0)
|
||||
{
|
||||
arg1 += (r10 - 56) * 2;
|
||||
for (i = 0; i < r8; i++)
|
||||
{
|
||||
arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4;
|
||||
if (r4 < (155 << 10))
|
||||
{
|
||||
arg1[arg4] = 155;
|
||||
break;
|
||||
}
|
||||
r4 += var_2C;
|
||||
arg1 += 2;
|
||||
}
|
||||
|
||||
arg0->unk350 = r10 + i;
|
||||
arg5 += (arg0->unk350 - 56) * 2;
|
||||
for (; i < r8; i++)
|
||||
{
|
||||
arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4;
|
||||
r4 += var_2C;
|
||||
arg5 += 2;
|
||||
}
|
||||
|
||||
ptr = arg5 - 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
arg0->unk350 = r10;
|
||||
arg1 += (r10 - 56) * 2;
|
||||
arg5 += (r10 - 56) * 2;
|
||||
arg1[1] = arg2->unk0 + 1;
|
||||
arg5[0] = arg3->unk0;
|
||||
arg5[1] = 155;
|
||||
return;
|
||||
}
|
||||
|
||||
ptr[arg4] = arg4 + var_30;
|
||||
}
|
||||
|
||||
static void sub_81D24A4(struct UnknownStruct_81D1ED4 *arg0)
|
||||
@@ -799,18 +567,18 @@ static void sub_81D24A4(struct UnknownStruct_81D1ED4 *arg0)
|
||||
if (arg0->unk12C[0].unk2 < arg0->unk12C[1].unk2)
|
||||
{
|
||||
r6 = arg0->unk12C[0].unk2;
|
||||
sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[0], &arg0->unk12C[1], 1, NULL);
|
||||
sub_81D2278(arg0, arg0->unk140[0], &arg0->unk12C[0], &arg0->unk12C[1], 1, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
r6 = arg0->unk12C[1].unk2;
|
||||
sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[1], &arg0->unk12C[0], 0, NULL);
|
||||
sub_81D2278(arg0, arg0->unk140[0], &arg0->unk12C[1], &arg0->unk12C[0], 0, NULL);
|
||||
}
|
||||
|
||||
sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[1], &arg0->unk12C[2], 1, NULL);
|
||||
sub_81D2278(arg0, arg0->unk140[0], &arg0->unk12C[1], &arg0->unk12C[2], 1, NULL);
|
||||
|
||||
i = (arg0->unk12C[2].unk2 <= arg0->unk12C[3].unk2);
|
||||
sub_81D2278(arg0, arg0->unk140, &arg0->unk12C[2], &arg0->unk12C[3], i, arg0->unk248);
|
||||
sub_81D2278(arg0, arg0->unk140[0], &arg0->unk12C[2], &arg0->unk12C[3], i, arg0->unk248[0]);
|
||||
for (i = 56; i < r6; i++)
|
||||
{
|
||||
arg0->unk140[i - 56][0] = 0;
|
||||
@@ -841,15 +609,15 @@ static void sub_81D2634(struct UnknownStruct_81D1ED4 *arg0)
|
||||
if (arg0->unk12C[0].unk2 < arg0->unk12C[4].unk2)
|
||||
{
|
||||
r6 = arg0->unk12C[0].unk2;
|
||||
sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[0], &arg0->unk12C[4], 0, NULL);
|
||||
sub_81D2278(arg0, arg0->unk248[0], &arg0->unk12C[0], &arg0->unk12C[4], 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
r6 = arg0->unk12C[4].unk2;
|
||||
sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[4], &arg0->unk12C[0], 1, NULL);
|
||||
sub_81D2278(arg0, arg0->unk248[0], &arg0->unk12C[4], &arg0->unk12C[0], 1, NULL);
|
||||
}
|
||||
|
||||
sub_81D2278(arg0, arg0->unk248, &arg0->unk12C[4], &arg0->unk12C[3], 0, NULL);
|
||||
sub_81D2278(arg0, arg0->unk248[0], &arg0->unk12C[4], &arg0->unk12C[3], 0, NULL);
|
||||
|
||||
for (i = 56; i < r6; i++)
|
||||
{
|
||||
@@ -1290,7 +1058,7 @@ void sub_81D3094(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 arg5, u
|
||||
u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
|
||||
|
||||
LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE);
|
||||
LZ77UnCompWram(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst);
|
||||
LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-19
@@ -18,6 +18,7 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
|
||||
struct MirageTowerPulseBlend {
|
||||
u8 taskId;
|
||||
@@ -109,24 +110,24 @@ const struct SpriteSheet gMirageTowerCeilingCrumbleSpriteSheets[] =
|
||||
|
||||
static const struct MetatileCoords sInvisibleMirageTowerMetatiles[] =
|
||||
{
|
||||
{18, 53, 0x251},
|
||||
{19, 53, 0x251},
|
||||
{20, 53, 0x251},
|
||||
{18, 54, 0x251},
|
||||
{19, 54, 0x251},
|
||||
{20, 54, 0x251},
|
||||
{18, 55, 0x251},
|
||||
{19, 55, 0x251},
|
||||
{20, 55, 0x251},
|
||||
{18, 56, 0x251},
|
||||
{19, 56, 0x251},
|
||||
{20, 56, 0x251},
|
||||
{18, 57, 0x259},
|
||||
{19, 57, 0x259},
|
||||
{20, 57, 0x259},
|
||||
{18, 58, 0x121},
|
||||
{19, 58, 0x121},
|
||||
{20, 58, 0x121},
|
||||
{18, 53, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{19, 53, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{20, 53, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{18, 54, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{19, 54, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{20, 54, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{18, 55, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{19, 55, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{20, 55, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{18, 56, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{19, 56, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{20, 56, METATILE_ID(Mauville, DeepSand_Center)},
|
||||
{18, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
|
||||
{19, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
|
||||
{20, 57, METATILE_ID(Mauville, DeepSand_BottomMid)},
|
||||
{18, 58, METATILE_ID(General, SandPit_Center)},
|
||||
{19, 58, METATILE_ID(General, SandPit_Center)},
|
||||
{20, 58, METATILE_ID(General, SandPit_Center)},
|
||||
};
|
||||
|
||||
static const union AnimCmd gSpriteAnim_8617DEC[] =
|
||||
@@ -257,7 +258,7 @@ EWRAM_DATA static struct Struct203CF10 *sUnknown_0203CF10 = NULL;
|
||||
EWRAM_DATA static struct BgRegOffsets *sBgShakeOffsets = NULL;
|
||||
EWRAM_DATA struct MirageTowerPulseBlend *sMirageTowerPulseBlend = NULL;
|
||||
|
||||
IWRAM_DATA static u16 gUnknown_030012A8[8];
|
||||
static u16 gUnknown_030012A8[8];
|
||||
|
||||
bool8 IsMirageTowerVisible(void)
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#include "gba/gba.h"
|
||||
#include "multiboot.h"
|
||||
|
||||
IWRAM_DATA static u16 MultiBoot_required_data[MULTIBOOT_NCHILD];
|
||||
static u16 MultiBoot_required_data[MULTIBOOT_NCHILD];
|
||||
|
||||
static int MultiBootSend(struct MultiBootParam *mp, u16 data);
|
||||
static int MultiBootHandShake(struct MultiBootParam *mp);
|
||||
@@ -435,7 +435,7 @@ static int MultiBootHandShake(struct MultiBootParam *mp)
|
||||
#undef must_data
|
||||
}
|
||||
|
||||
static void MultiBootWaitCycles(u32 cycles)
|
||||
static NOINLINE void MultiBootWaitCycles(u32 cycles)
|
||||
{
|
||||
asm("mov r2, pc");
|
||||
asm("lsr r2, #24");
|
||||
|
||||
+1
-2
@@ -37,6 +37,7 @@
|
||||
#include "contest.h"
|
||||
#include "item_menu.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "pokemon_jump.h"
|
||||
#include "decoration_inventory.h"
|
||||
#include "secret_base.h"
|
||||
#include "player_pc.h"
|
||||
@@ -45,8 +46,6 @@
|
||||
#include "mevent.h"
|
||||
#include "union_room_chat.h"
|
||||
|
||||
extern void ResetPokeJumpResults(void);
|
||||
|
||||
extern const u8 EventScript_ResetAllMapFlags[];
|
||||
|
||||
// this file's functions
|
||||
|
||||
+6
-6
@@ -186,15 +186,15 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr
|
||||
static u16 GetCenterScreenMetatileBehavior(void);
|
||||
|
||||
// IWRAM bss vars
|
||||
IWRAM_DATA static void *sUnusedOverworldCallback;
|
||||
IWRAM_DATA static u8 sPlayerTradingStates[4];
|
||||
static void *sUnusedOverworldCallback;
|
||||
static u8 sPlayerTradingStates[4];
|
||||
// This callback is called with a player's key code. It then returns an
|
||||
// adjusted key code, effectively intercepting the input before anything
|
||||
// can process it.
|
||||
IWRAM_DATA static u16 (*sPlayerKeyInterceptCallback)(u32);
|
||||
IWRAM_DATA static bool8 sUnknown_03000E18;
|
||||
IWRAM_DATA static u8 sRfuKeepAliveTimer;
|
||||
IWRAM_DATA static u32 sUnusedVar;
|
||||
static u16 (*sPlayerKeyInterceptCallback)(u32);
|
||||
static bool8 sUnknown_03000E18;
|
||||
static u8 sRfuKeepAliveTimer;
|
||||
static u32 sUnusedVar;
|
||||
|
||||
// IWRAM common
|
||||
u16 *gBGTilemapBuffers1;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user