Merge pull request #1516 from GriffinRichards/doc-miscbattle
Miscellaneous battle documentation
This commit is contained in:
@@ -334,7 +334,7 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves)
|
||||
defaultScoreMoves >>= 1;
|
||||
}
|
||||
|
||||
moveLimitations = CheckMoveLimitations(gActiveBattler, 0, 0xFF);
|
||||
moveLimitations = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL);
|
||||
|
||||
// Ignore moves that aren't possible to use.
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
|
||||
@@ -22,7 +22,7 @@ static bool8 ShouldSwitchIfPerishSong(void)
|
||||
&& gDisableStructs[gActiveBattler].perishSongTimer == 0)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -106,7 +106,7 @@ static bool8 ShouldSwitchIfWonderGuard(void)
|
||||
{
|
||||
// We found a mon.
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
{
|
||||
// we found a mon.
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -226,13 +226,13 @@ static bool8 ShouldSwitchIfNaturalCure(void)
|
||||
if ((gLastLandedMoves[gActiveBattler] == 0 || gLastLandedMoves[gActiveBattler] == 0xFFFF) && Random() & 1)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
else if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0 && Random() & 1)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ static bool8 ShouldSwitchIfNaturalCure(void)
|
||||
if (Random() & 1)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
|
||||
if (moveFlags & MOVE_RESULT_SUPER_EFFECTIVE && Random() % moduloPercent == 0)
|
||||
{
|
||||
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i;
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -597,7 +597,7 @@ void AI_TrySwitchOrUseItem(void)
|
||||
}
|
||||
}
|
||||
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, (gActiveBattler ^ BIT_SIDE) << 8);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, (gActiveBattler ^ BIT_SIDE) << 8);
|
||||
}
|
||||
|
||||
static void ModulateByTypeEffectiveness(u8 atkType, u8 defType1, u8 defType2, u8 *var)
|
||||
@@ -923,7 +923,7 @@ static bool8 ShouldUseItem(void)
|
||||
|
||||
if (shouldUse)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0);
|
||||
*(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2) = item;
|
||||
gBattleResources->battleHistory->trainerItems[i] = 0;
|
||||
return shouldUse;
|
||||
|
||||
+310
-1906
File diff suppressed because it is too large
Load Diff
@@ -3250,7 +3250,7 @@ void AnimTask_HeartsBackground(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, &gBattleAnimBgImage_Attract, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, FALSE);
|
||||
LoadCompressedPalette(&gBattleAnimBgPalette_Attract, animBg.paletteId * 16, 32);
|
||||
gTasks[taskId].func = AnimTask_HeartsBackground_Step;
|
||||
}
|
||||
@@ -3328,11 +3328,11 @@ void AnimTask_ScaryFace(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
if (IsContest())
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, FALSE);
|
||||
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT)
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, FALSE);
|
||||
else
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, FALSE);
|
||||
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_ScaryFace, animBg.tilesOffset);
|
||||
LoadCompressedPalette(gBattleAnimBgPalette_ScaryFace, animBg.paletteId * 16, 32);
|
||||
|
||||
@@ -2388,7 +2388,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId)
|
||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, FALSE);
|
||||
if (IsContest())
|
||||
{
|
||||
gBattle_BG1_X = -56;
|
||||
@@ -2569,7 +2569,7 @@ void AnimTask_DoomDesireLightBeam(u8 taskId)
|
||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, FALSE);
|
||||
if (IsContest())
|
||||
{
|
||||
gBattle_BG1_X = -56;
|
||||
|
||||
@@ -1000,7 +1000,7 @@ void AnimTask_HazeScrollingFog(u8 taskId)
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, FALSE);
|
||||
LoadPalette(&gFogPalette, animBg.paletteId * 16, 32);
|
||||
|
||||
gTasks[taskId].func = AnimTask_HazeScrollingFog_Step;
|
||||
@@ -1105,7 +1105,7 @@ void AnimTask_LoadMistTiles(u8 taskId)
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, FALSE);
|
||||
LoadPalette(&gFogPalette, animBg.paletteId * 16, 32);
|
||||
|
||||
gTasks[taskId].data[15] = -1;
|
||||
|
||||
+38
-37
@@ -37,15 +37,15 @@ static void sub_80A8D78(struct Task *task, u8 taskId);
|
||||
EWRAM_DATA static union AffineAnimCmd *gAnimTaskAffineAnim = NULL;
|
||||
|
||||
// Const rom data
|
||||
static const struct UCoords8 sBattlerCoords[][4] =
|
||||
static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] =
|
||||
{
|
||||
{
|
||||
{ // Single battle
|
||||
{ 72, 80 },
|
||||
{ 176, 40 },
|
||||
{ 48, 40 },
|
||||
{ 112, 80 },
|
||||
},
|
||||
{
|
||||
{ // Double battle
|
||||
{ 32, 80 },
|
||||
{ 200, 40 },
|
||||
{ 90, 88 },
|
||||
@@ -54,29 +54,29 @@ static const struct UCoords8 sBattlerCoords[][4] =
|
||||
};
|
||||
|
||||
// One entry for each of the four Castform forms.
|
||||
const struct MonCoords gCastformFrontSpriteCoords[] =
|
||||
const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] =
|
||||
{
|
||||
{ .size = 0x44, .y_offset = 17 }, // NORMAL
|
||||
{ .size = 0x66, .y_offset = 9 }, // SUN
|
||||
{ .size = 0x46, .y_offset = 9 }, // RAIN
|
||||
{ .size = 0x86, .y_offset = 8 }, // HAIL
|
||||
[CASTFORM_NORMAL] = { .size = 0x44, .y_offset = 17 },
|
||||
[CASTFORM_FIRE] = { .size = 0x66, .y_offset = 9 },
|
||||
[CASTFORM_WATER] = { .size = 0x46, .y_offset = 9 },
|
||||
[CASTFORM_ICE] = { .size = 0x86, .y_offset = 8 },
|
||||
};
|
||||
|
||||
static const u8 sCastformElevations[] =
|
||||
static const u8 sCastformElevations[NUM_CASTFORM_FORMS] =
|
||||
{
|
||||
13, // NORMAL
|
||||
14, // SUN
|
||||
13, // RAIN
|
||||
13, // HAIL
|
||||
[CASTFORM_NORMAL] = 13,
|
||||
[CASTFORM_FIRE] = 14,
|
||||
[CASTFORM_WATER] = 13,
|
||||
[CASTFORM_ICE] = 13,
|
||||
};
|
||||
|
||||
// Y position of the backsprite for each of the four Castform forms.
|
||||
static const u8 sCastformBackSpriteYCoords[] =
|
||||
static const u8 sCastformBackSpriteYCoords[NUM_CASTFORM_FORMS] =
|
||||
{
|
||||
0, // NORMAL
|
||||
0, // SUN
|
||||
0, // RAIN
|
||||
0, // HAIL
|
||||
[CASTFORM_NORMAL] = 0,
|
||||
[CASTFORM_FIRE] = 0,
|
||||
[CASTFORM_WATER] = 0,
|
||||
[CASTFORM_ICE] = 0,
|
||||
};
|
||||
|
||||
// Placeholders for pokemon sprites to be created for a move animation effect (e.g. Role Play / Snatch)
|
||||
@@ -853,8 +853,8 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData *out)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
out->bgTiles = gUnknown_0202305C;
|
||||
out->bgTilemap = (u16 *)gUnknown_02023060;
|
||||
out->bgTiles = gBattleAnimBgTileBuffer;
|
||||
out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer;
|
||||
out->paletteId = 14;
|
||||
out->bgId = 1;
|
||||
out->tilesOffset = 0;
|
||||
@@ -862,8 +862,8 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData *out)
|
||||
}
|
||||
else
|
||||
{
|
||||
out->bgTiles = gUnknown_0202305C;
|
||||
out->bgTilemap = (u16 *)gUnknown_02023060;
|
||||
out->bgTiles = gBattleAnimBgTileBuffer;
|
||||
out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer;
|
||||
out->paletteId = 8;
|
||||
out->bgId = 1;
|
||||
out->tilesOffset = 0x200;
|
||||
@@ -875,8 +875,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
out->bgTiles = gUnknown_0202305C;
|
||||
out->bgTilemap = (u16 *)gUnknown_02023060;
|
||||
out->bgTiles = gBattleAnimBgTileBuffer;
|
||||
out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer;
|
||||
out->paletteId = 14;
|
||||
out->bgId = 1;
|
||||
out->tilesOffset = 0;
|
||||
@@ -888,8 +888,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId)
|
||||
}
|
||||
else
|
||||
{
|
||||
out->bgTiles = gUnknown_0202305C;
|
||||
out->bgTilemap = (u16 *)gUnknown_02023060;
|
||||
out->bgTiles = gBattleAnimBgTileBuffer;
|
||||
out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer;
|
||||
out->paletteId = 9;
|
||||
out->bgId = 2;
|
||||
out->tilesOffset = 0x300;
|
||||
@@ -899,8 +899,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId)
|
||||
|
||||
void sub_80A6BFC(struct BattleAnimBgData *out, u8 unused)
|
||||
{
|
||||
out->bgTiles = gUnknown_0202305C;
|
||||
out->bgTilemap = (u16 *)gUnknown_02023060;
|
||||
out->bgTiles = gBattleAnimBgTileBuffer;
|
||||
out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer;
|
||||
if (IsContest())
|
||||
{
|
||||
out->paletteId = 14;
|
||||
@@ -937,9 +937,9 @@ void ClearBattleAnimBg(u32 bgId)
|
||||
|
||||
void AnimLoadCompressedBgGfx(u32 bgId, const u32 *src, u32 tilesOffset)
|
||||
{
|
||||
CpuFill32(0, gUnknown_0202305C, 0x2000);
|
||||
LZDecompressWram(src, gUnknown_0202305C);
|
||||
LoadBgTiles(bgId, gUnknown_0202305C, 0x2000, tilesOffset);
|
||||
CpuFill32(0, gBattleAnimBgTileBuffer, 0x2000);
|
||||
LZDecompressWram(src, gBattleAnimBgTileBuffer);
|
||||
LoadBgTiles(bgId, gBattleAnimBgTileBuffer, 0x2000, tilesOffset);
|
||||
}
|
||||
|
||||
static void InitAnimBgTilemapBuffer(u32 bgId, const void *src)
|
||||
@@ -954,12 +954,12 @@ void AnimLoadCompressedBgTilemap(u32 bgId, const void *src)
|
||||
CopyBgTilemapBufferToVram(bgId);
|
||||
}
|
||||
|
||||
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *unk, const void *src, u32 arg2)
|
||||
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *data, const void *src, bool32 largeScreen)
|
||||
{
|
||||
InitAnimBgTilemapBuffer(unk->bgId, src);
|
||||
InitAnimBgTilemapBuffer(data->bgId, src);
|
||||
if (IsContest() == TRUE)
|
||||
sub_80A4720(unk->paletteId, unk->bgTilemap, 0, arg2);
|
||||
CopyBgTilemapBufferToVram(unk->bgId);
|
||||
RelocateBattleBgPal(data->paletteId, data->bgTilemap, 0, largeScreen);
|
||||
CopyBgTilemapBufferToVram(data->bgId);
|
||||
}
|
||||
|
||||
u8 GetBattleBgPaletteNum(void)
|
||||
@@ -1947,7 +1947,8 @@ void AnimTask_GetFrustrationPowerLevel(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_80A8174(u8 priority)
|
||||
// Unused
|
||||
static void SetPriorityForVisibleBattlers(u8 priority)
|
||||
{
|
||||
if (IsBattlerSpriteVisible(gBattleAnimTarget))
|
||||
gSprites[gBattlerSpriteIds[gBattleAnimTarget]].oam.priority = priority;
|
||||
@@ -1959,7 +1960,7 @@ void sub_80A8174(u8 priority)
|
||||
gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority = priority;
|
||||
}
|
||||
|
||||
void sub_80A8278(void)
|
||||
void InitPrioritiesForVisibleBattlers(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ void AnimTask_LoadSandstormBackground(u8 taskId)
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Sandstorm, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, FALSE);
|
||||
LoadCompressedPalette(gBattleAnimSpritePal_FlyingDirt, animBg.paletteId * 16, 32);
|
||||
|
||||
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
|
||||
@@ -331,7 +331,7 @@ void AnimTask_DrawFallingWhiteLinesOnAttacker(u8 taskId)
|
||||
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
newSpriteId = CreateInvisibleSpriteCopy(gBattleAnimAttacker, spriteId, species);
|
||||
GetBattleAnimBg1Data(&animBgData);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleAnimMaskTilemap_Curse, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleAnimMaskTilemap_Curse, FALSE);
|
||||
AnimLoadCompressedBgGfx(animBgData.bgId, gBattleAnimMaskImage_Curse, animBgData.tilesOffset);
|
||||
LoadPalette(sCurseLinesPalette, animBgData.paletteId * 16 + 1, 2);
|
||||
|
||||
@@ -470,9 +470,9 @@ static void StatsChangeAnimation_Step2(u8 taskId)
|
||||
|
||||
GetBattleAnimBg1Data(&animBgData);
|
||||
if (sAnimStatsChangeData->data[0] == 0)
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask1_Tilemap, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask1_Tilemap, FALSE);
|
||||
else
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask2_Tilemap, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask2_Tilemap, FALSE);
|
||||
|
||||
AnimLoadCompressedBgGfx(animBgData.bgId, gBattleStatMask_Gfx, animBgData.tilesOffset);
|
||||
switch (sAnimStatsChangeData->data[1])
|
||||
@@ -821,7 +821,7 @@ void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler,
|
||||
spriteId2 = CreateInvisibleSpriteCopy(battler2, gBattlerSpriteIds[battler2], species);
|
||||
|
||||
GetBattleAnimBg1Data(&animBgData);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, tilemap, 0);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBgData, tilemap, FALSE);
|
||||
AnimLoadCompressedBgGfx(animBgData.bgId, gfx, animBgData.tilesOffset);
|
||||
LoadCompressedPalette(palette, animBgData.paletteId * 16, 32);
|
||||
|
||||
|
||||
@@ -54,9 +54,8 @@ static void AnimTask_WaterSport_Step(u8);
|
||||
static void CreateWaterSportDroplet(struct Task*);
|
||||
static void CreateWaterPulseRingBubbles(struct Sprite*, int, int);
|
||||
|
||||
// Both unused
|
||||
const u8 gUnknown_8593C80[] = INCBIN_U8("graphics/unknown/unknown_593C80.4bpp");
|
||||
const u8 gUnknown_8593FFC[] = INCBIN_U8("graphics/unknown/unknown_593FFC.bin");
|
||||
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused_water_gfx.4bpp");
|
||||
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused_water.bin");
|
||||
|
||||
static const union AnimCmd sAnim_RainDrop[] =
|
||||
{
|
||||
@@ -822,7 +821,7 @@ void AnimTask_CreateSurfWave(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_SurfContest, 1);
|
||||
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_SurfContest, TRUE);
|
||||
}
|
||||
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Surf, animBg.tilesOffset);
|
||||
if (gBattleAnimArgs[0] == 0)
|
||||
|
||||
+10
-13
@@ -28,7 +28,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
// This file's functions.
|
||||
static void InitArenaChallenge(void);
|
||||
static void GetArenaData(void);
|
||||
static void SetArenaData(void);
|
||||
@@ -39,7 +38,6 @@ static void BufferArenaOpponentName(void);
|
||||
static void SpriteCb_JudgmentIcon(struct Sprite *sprite);
|
||||
static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler);
|
||||
|
||||
// Const rom data.
|
||||
static const s8 sMindRatings[] =
|
||||
{
|
||||
[MOVE_NONE] = 0,
|
||||
@@ -501,7 +499,6 @@ static const u16 sLongStreakPrizeItems[] =
|
||||
ITEM_CHOICE_BAND,
|
||||
};
|
||||
|
||||
// code
|
||||
void CallBattleArenaFunction(void)
|
||||
{
|
||||
sArenaFunctions[gSpecialVar_0x8004]();
|
||||
@@ -537,15 +534,15 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
|
||||
gBattleTextBuff2[0] = CHAR_0;
|
||||
gBattleTextBuff2[1] = EOS;
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_PlayerMon1Name);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 15);
|
||||
BattlePutTextOnWindow(gText_Vs, 16);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_PLAYER_NAME);
|
||||
BattlePutTextOnWindow(gText_Vs, ARENA_WIN_VS);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_OpponentMon1Name);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 17);
|
||||
BattlePutTextOnWindow(gText_Mind, 18);
|
||||
BattlePutTextOnWindow(gText_Skill, 19);
|
||||
BattlePutTextOnWindow(gText_Body, 20);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_OPPONENT_NAME);
|
||||
BattlePutTextOnWindow(gText_Mind, ARENA_WIN_MIND);
|
||||
BattlePutTextOnWindow(gText_Skill, ARENA_WIN_SKILL);
|
||||
BattlePutTextOnWindow(gText_Body, ARENA_WIN_BODY);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 21);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
|
||||
(*state)++;
|
||||
}
|
||||
break;
|
||||
@@ -567,7 +564,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
|
||||
ShowJudgmentSprite(80, 40, ARENA_CATEGORY_MIND, B_POSITION_PLAYER_LEFT);
|
||||
ShowJudgmentSprite(160, 40, ARENA_CATEGORY_MIND, B_POSITION_OPPONENT_LEFT);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 21);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
|
||||
(*state)++;
|
||||
ret = 1;
|
||||
break;
|
||||
@@ -576,7 +573,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
|
||||
ShowJudgmentSprite(80, 56, ARENA_CATEGORY_SKILL, B_POSITION_PLAYER_LEFT);
|
||||
ShowJudgmentSprite(160, 56, ARENA_CATEGORY_SKILL, B_POSITION_OPPONENT_LEFT);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 21);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
|
||||
(*state)++;
|
||||
ret = 1;
|
||||
break;
|
||||
@@ -585,7 +582,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
|
||||
ShowJudgmentSprite(80, 72, ARENA_CATEGORY_BODY, B_POSITION_PLAYER_LEFT);
|
||||
ShowJudgmentSprite(160, 72, ARENA_CATEGORY_BODY, B_POSITION_OPPONENT_LEFT);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 21);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
|
||||
(*state)++;
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
+89
-90
@@ -161,7 +161,7 @@ const struct BgTemplate gBattleBgTemplates[] =
|
||||
|
||||
static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
{
|
||||
{ // 0 Standard battle message
|
||||
[B_WIN_MSG] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
@@ -170,7 +170,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
{ // 1 "What will (pokemon) do?"
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
@@ -179,7 +179,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x01c0,
|
||||
},
|
||||
{ // 2 "Fight/Pokemon/Bag/Run"
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
@@ -188,7 +188,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0190,
|
||||
},
|
||||
{ // 3 Top left move
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
@@ -197,7 +197,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0300,
|
||||
},
|
||||
{ // 4 Top right move
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
@@ -206,7 +206,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0310,
|
||||
},
|
||||
{ // 5 Bottom left move
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
@@ -215,7 +215,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0320,
|
||||
},
|
||||
{ // 6 Bottom right move
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
@@ -224,7 +224,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0330,
|
||||
},
|
||||
{
|
||||
[B_WIN_PP] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -233,7 +233,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0290,
|
||||
},
|
||||
{
|
||||
[B_WIN_DUMMY] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
@@ -242,7 +242,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 55,
|
||||
@@ -251,7 +251,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
@@ -260,7 +260,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02a0,
|
||||
},
|
||||
{
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -269,7 +269,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02b0,
|
||||
},
|
||||
{
|
||||
[B_WIN_YESNO] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
@@ -278,7 +278,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 8,
|
||||
@@ -287,7 +287,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 0,
|
||||
@@ -296,7 +296,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 6,
|
||||
.baseBlock = 0x016e,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_PLAYER] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
@@ -305,7 +305,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0020,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_OPPONENT] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
@@ -314,7 +314,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0040,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_MULTI_PLAYER_1] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
@@ -323,7 +323,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0020,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_MULTI_PLAYER_2] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
@@ -332,7 +332,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0040,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_MULTI_PLAYER_3] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
@@ -341,7 +341,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0060,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_MULTI_PLAYER_4] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
@@ -350,7 +350,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0080,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_OUTCOME_DRAW] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 2,
|
||||
@@ -359,7 +359,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x00a0,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_OUTCOME_LEFT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 4,
|
||||
.tilemapTop = 2,
|
||||
@@ -368,7 +368,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x00a0,
|
||||
},
|
||||
{
|
||||
[B_WIN_VS_OUTCOME_RIGHT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 2,
|
||||
@@ -382,7 +382,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] =
|
||||
|
||||
static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
{
|
||||
{
|
||||
[B_WIN_MSG] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
@@ -391,7 +391,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0090,
|
||||
},
|
||||
{
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
@@ -400,7 +400,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x01c0,
|
||||
},
|
||||
{
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
@@ -409,7 +409,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0190,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
@@ -418,7 +418,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0300,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
@@ -427,7 +427,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0310,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
@@ -436,7 +436,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0320,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
@@ -445,7 +445,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0330,
|
||||
},
|
||||
{
|
||||
[B_WIN_PP] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -454,7 +454,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0290,
|
||||
},
|
||||
{
|
||||
[B_WIN_DUMMY] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
@@ -463,7 +463,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 55,
|
||||
@@ -472,7 +472,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0298,
|
||||
},
|
||||
{
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
@@ -481,7 +481,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02a0,
|
||||
},
|
||||
{
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -490,7 +490,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x02b0,
|
||||
},
|
||||
{
|
||||
[B_WIN_YESNO] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 26,
|
||||
.tilemapTop = 9,
|
||||
@@ -499,7 +499,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 8,
|
||||
@@ -508,7 +508,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 0,
|
||||
@@ -517,7 +517,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 6,
|
||||
.baseBlock = 0x016e,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_PLAYER_NAME] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 1,
|
||||
@@ -526,7 +526,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0100,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_VS] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 14,
|
||||
.tilemapTop = 1,
|
||||
@@ -535,7 +535,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0110,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_OPPONENT_NAME] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 16,
|
||||
.tilemapTop = 1,
|
||||
@@ -544,7 +544,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0114,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_MIND] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 4,
|
||||
@@ -553,7 +553,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0124,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_SKILL] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 6,
|
||||
@@ -562,7 +562,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0130,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_BODY] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 12,
|
||||
.tilemapTop = 8,
|
||||
@@ -571,7 +571,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x013c,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_JUDGEMENT_TITLE] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 8,
|
||||
.tilemapTop = 11,
|
||||
@@ -580,7 +580,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x0148,
|
||||
},
|
||||
{
|
||||
[ARENA_WIN_JUDGEMENT_TEXT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
@@ -594,8 +594,8 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] =
|
||||
|
||||
const struct WindowTemplate * const gBattleWindowTemplates[] =
|
||||
{
|
||||
gStandardBattleWindowTemplates,
|
||||
gBattleArenaWindowTemplates,
|
||||
[B_WIN_TYPE_NORMAL] = gStandardBattleWindowTemplates,
|
||||
[B_WIN_TYPE_ARENA] = gBattleArenaWindowTemplates,
|
||||
};
|
||||
|
||||
static const struct BattleBackground gBattleTerrainTable[] =
|
||||
@@ -691,20 +691,19 @@ static const struct BattleBackground gBattleTerrainTable[] =
|
||||
},
|
||||
};
|
||||
|
||||
static void sub_8035648(void);
|
||||
static void CB2_UnusedBattleInit(void);
|
||||
|
||||
// Unused
|
||||
static void sub_8035608(void)
|
||||
static void UnusedBattleInit(void)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
ResetSpriteData();
|
||||
spriteId = CreateSprite(&gUnknown_0831AC88, 0, 0, 0);
|
||||
spriteId = CreateSprite(&gUnusedBattleInitSprite, 0, 0, 0);
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
SetMainCallback2(sub_8035648);
|
||||
SetMainCallback2(CB2_UnusedBattleInit);
|
||||
}
|
||||
|
||||
static void sub_8035648(void)
|
||||
static void CB2_UnusedBattleInit(void)
|
||||
{
|
||||
AnimateSprites();
|
||||
BuildOamBuffer();
|
||||
@@ -717,13 +716,13 @@ void BattleInitBgsAndWindows(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
||||
{
|
||||
gBattleScripting.windowsType = 1;
|
||||
SetBgTilemapBuffer(1, gUnknown_02023060);
|
||||
SetBgTilemapBuffer(2, gUnknown_02023060);
|
||||
gBattleScripting.windowsType = B_WIN_TYPE_ARENA;
|
||||
SetBgTilemapBuffer(1, gBattleAnimBgTilemapBuffer);
|
||||
SetBgTilemapBuffer(2, gBattleAnimBgTilemapBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleScripting.windowsType = 0;
|
||||
gBattleScripting.windowsType = B_WIN_TYPE_NORMAL;
|
||||
}
|
||||
|
||||
InitWindows(gBattleWindowTemplates[gBattleScripting.windowsType]);
|
||||
@@ -936,7 +935,7 @@ static void DrawLinkBattleVsScreenOutcomeText(void)
|
||||
{
|
||||
if (gBattleOutcome == B_OUTCOME_DREW)
|
||||
{
|
||||
BattlePutTextOnWindow(gText_Draw, 0x15);
|
||||
BattlePutTextOnWindow(gText_Draw, B_WIN_VS_OUTCOME_DRAW);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
@@ -945,20 +944,20 @@ static void DrawLinkBattleVsScreenOutcomeText(void)
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
|
||||
{
|
||||
case 0:
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
break;
|
||||
case 1:
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
break;
|
||||
case 2:
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
break;
|
||||
case 3:
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -967,20 +966,20 @@ static void DrawLinkBattleVsScreenOutcomeText(void)
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
|
||||
{
|
||||
case 0:
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
break;
|
||||
case 1:
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
break;
|
||||
case 2:
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
break;
|
||||
case 3:
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -989,26 +988,26 @@ static void DrawLinkBattleVsScreenOutcomeText(void)
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
|
||||
{
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
}
|
||||
else
|
||||
{
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
|
||||
{
|
||||
BattlePutTextOnWindow(gText_Win, 0x16);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x17);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
BattlePutTextOnWindow(gText_Win, 0x17);
|
||||
BattlePutTextOnWindow(gText_Loss, 0x16);
|
||||
BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT);
|
||||
BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1032,19 +1031,19 @@ void InitLinkBattleVsScreen(u8 taskId)
|
||||
switch (linkPlayer->id)
|
||||
{
|
||||
case 0:
|
||||
BattlePutTextOnWindow(name, 0x11);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_1);
|
||||
DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 1, 2, 4);
|
||||
break;
|
||||
case 1:
|
||||
BattlePutTextOnWindow(name, 0x12);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_2);
|
||||
DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 2, 2, 4);
|
||||
break;
|
||||
case 2:
|
||||
BattlePutTextOnWindow(name, 0x13);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_3);
|
||||
DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 1, 2, 8);
|
||||
break;
|
||||
case 3:
|
||||
BattlePutTextOnWindow(name, 0x14);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_4);
|
||||
DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 2, 2, 8);
|
||||
break;
|
||||
}
|
||||
@@ -1060,10 +1059,10 @@ void InitLinkBattleVsScreen(u8 taskId)
|
||||
opponentId = playerId, playerId = opponentId_copy;
|
||||
|
||||
name = gLinkPlayers[playerId].name;
|
||||
BattlePutTextOnWindow(name, 0xF);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_PLAYER);
|
||||
|
||||
name = gLinkPlayers[opponentId].name;
|
||||
BattlePutTextOnWindow(name, 0x10);
|
||||
BattlePutTextOnWindow(name, B_WIN_VS_OPPONENT);
|
||||
|
||||
DrawLinkBattleParticipantPokeballs(taskId, playerId, 1, 2, 7);
|
||||
DrawLinkBattleParticipantPokeballs(taskId, opponentId, 2, 2, 7);
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "recorded_battle.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void LinkOpponentHandleGetMonData(void);
|
||||
static void LinkOpponentHandleGetRawMonData(void);
|
||||
static void LinkOpponentHandleSetMonData(void);
|
||||
@@ -424,7 +421,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -558,7 +555,7 @@ static void LinkOpponentHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1471,7 +1468,7 @@ static void LinkOpponentHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
BattleTv_SetDataBasedOnString(*stringId);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "recorded_battle.h"
|
||||
|
||||
// this file's functions
|
||||
static void LinkPartnerHandleGetMonData(void);
|
||||
static void LinkPartnerHandleGetRawMonData(void);
|
||||
static void LinkPartnerHandleSetMonData(void);
|
||||
@@ -313,7 +312,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -443,7 +442,7 @@ static void LinkPartnerHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1301,7 +1300,7 @@ static void LinkPartnerHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
BattleTv_SetDataBasedOnString(*stringId);
|
||||
}
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "trainer_hill.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void OpponentHandleGetMonData(void);
|
||||
static void OpponentHandleGetRawMonData(void);
|
||||
static void OpponentHandleSetMonData(void);
|
||||
@@ -430,7 +427,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -558,7 +555,7 @@ static void OpponentHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -878,7 +875,7 @@ static void OpponentHandleGetRawMonData(void)
|
||||
for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++)
|
||||
dst[i] = src[i];
|
||||
|
||||
BtlController_EmitDataTransfer(1, gBattleBufferA[gActiveBattler][2], dst);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, gBattleBufferA[gActiveBattler][2], dst);
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1524,7 +1521,7 @@ static void OpponentHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
BattleArena_DeductMindPoints(gActiveBattler, *stringId);
|
||||
}
|
||||
@@ -1549,7 +1546,7 @@ static void OpponentHandleChooseMove(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
@@ -1566,13 +1563,13 @@ static void OpponentHandleChooseMove(void)
|
||||
switch (chosenMoveId)
|
||||
{
|
||||
case AI_CHOICE_WATCH:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_WATCH_CAREFULLY, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_WATCH_CAREFULLY, 0);
|
||||
break;
|
||||
case AI_CHOICE_FLEE:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_RUN, 0);
|
||||
break;
|
||||
case 6:
|
||||
BtlController_EmitTwoReturnValues(1, 15, gBattlerTarget);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 15, gBattlerTarget);
|
||||
break;
|
||||
default:
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER))
|
||||
@@ -1583,7 +1580,7 @@ static void OpponentHandleChooseMove(void)
|
||||
if (gAbsentBattlerFlags & gBitTable[gBattlerTarget])
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
}
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattlerTarget << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gBattlerTarget << 8));
|
||||
break;
|
||||
}
|
||||
OpponentBufferExecCompleted();
|
||||
@@ -1598,11 +1595,11 @@ static void OpponentHandleChooseMove(void)
|
||||
} while (move == MOVE_NONE);
|
||||
|
||||
if (gBattleMoves[move].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER))
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gActiveBattler << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gActiveBattler << 8));
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8));
|
||||
else
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8));
|
||||
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
@@ -1611,7 +1608,7 @@ static void OpponentHandleChooseMove(void)
|
||||
|
||||
static void OpponentHandleChooseItem(void)
|
||||
{
|
||||
BtlController_EmitOneReturnValue(1, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2));
|
||||
BtlController_EmitOneReturnValue(BUFFER_B, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2));
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1668,7 +1665,7 @@ static void OpponentHandleChoosePokemon(void)
|
||||
|
||||
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId;
|
||||
BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL);
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void PlayerHandleGetMonData(void);
|
||||
static void PlayerHandleSetMonData(void);
|
||||
static void PlayerHandleSetRawMonData(void);
|
||||
@@ -251,17 +248,17 @@ static void HandleInputChooseAction(void)
|
||||
|
||||
switch (gActionSelectionCursor[gActiveBattler])
|
||||
{
|
||||
case 0:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0);
|
||||
case 0: // Top left
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0);
|
||||
break;
|
||||
case 1:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0);
|
||||
case 1: // Top right
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0);
|
||||
break;
|
||||
case 2:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0);
|
||||
case 2: // Bottom left
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0);
|
||||
break;
|
||||
case 3:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0);
|
||||
case 3: // Bottom right
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_RUN, 0);
|
||||
break;
|
||||
}
|
||||
PlayerBufferExecCompleted();
|
||||
@@ -322,7 +319,7 @@ static void HandleInputChooseAction(void)
|
||||
return;
|
||||
}
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_CANCEL_PARTNER, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -368,7 +365,7 @@ static void HandleInputChooseTarget(void)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gSprites[gBattlerSpriteIds[gMultiUsePlayerCursor]].callback = SpriteCb_HideAsMoveTarget;
|
||||
BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8));
|
||||
EndBounceEffect(gMultiUsePlayerCursor, BOUNCE_HEALTHBOX);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
@@ -526,7 +523,7 @@ static void HandleInputChooseMove(void)
|
||||
|
||||
if (!canSelectTarget)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8));
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
@@ -546,7 +543,7 @@ static void HandleInputChooseMove(void)
|
||||
else if (JOY_NEW(B_BUTTON) || gPlayerDpadHoldFrames > 59)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, 10, 0xFFFF);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, 0xFFFF);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
else if (JOY_NEW(DPAD_LEFT))
|
||||
@@ -611,7 +608,7 @@ static void HandleInputChooseMove(void)
|
||||
gMultiUsePlayerCursor = gMoveSelectionCursor[gActiveBattler] + 1;
|
||||
|
||||
MoveSelectionCreateCursorAt(gMultiUsePlayerCursor, 27);
|
||||
BattlePutTextOnWindow(gText_BattleSwitchWhich, 0xB);
|
||||
BattlePutTextOnWindow(gText_BattleSwitchWhich, B_WIN_SWITCH_PROMPT);
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitching;
|
||||
}
|
||||
}
|
||||
@@ -858,7 +855,7 @@ static void SetLinkBattleEndCallbacks(void)
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
m4aSongNumStop(SE_LOW_HEALTH);
|
||||
gMain.inBattle = 0;
|
||||
gMain.inBattle = FALSE;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
SetMainCallback2(CB2_InitEndLinkBattle);
|
||||
if (gBattleOutcome == B_OUTCOME_WON)
|
||||
@@ -871,7 +868,7 @@ static void SetLinkBattleEndCallbacks(void)
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
m4aSongNumStop(SE_LOW_HEALTH);
|
||||
gMain.inBattle = 0;
|
||||
gMain.inBattle = FALSE;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
SetMainCallback2(CB2_InitEndLinkBattle);
|
||||
if (gBattleOutcome == B_OUTCOME_WON)
|
||||
@@ -901,7 +898,7 @@ void SetBattleEndCallbacks(void)
|
||||
else
|
||||
{
|
||||
m4aSongNumStop(SE_LOW_HEALTH);
|
||||
gMain.inBattle = 0;
|
||||
gMain.inBattle = FALSE;
|
||||
gMain.callback1 = gPreBattleCallback1;
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
}
|
||||
@@ -1145,7 +1142,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1177,7 +1174,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
gainedExp -= nextLvlExp - currExp;
|
||||
savedActiveBattler = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
gActiveBattler = savedActiveBattler;
|
||||
|
||||
if (IsDoubleBattle() == TRUE
|
||||
@@ -1256,7 +1253,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
gainedExp -= expOnNextLvl - currExp;
|
||||
savedActiveBattler = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
gActiveBattler = savedActiveBattler;
|
||||
gTasks[taskId].func = Task_LaunchLvlUpAnim;
|
||||
}
|
||||
@@ -1341,7 +1338,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter2(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1364,9 +1361,9 @@ static void WaitForMonSelection(void)
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
if (gPartyMenuUseExitCallback == TRUE)
|
||||
BtlController_EmitChosenMonReturnValue(1, gSelectedMonPartyId, gBattlePartyCurrentOrder);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, gSelectedMonPartyId, gBattlePartyCurrentOrder);
|
||||
else
|
||||
BtlController_EmitChosenMonReturnValue(1, PARTY_SIZE, NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, PARTY_SIZE, NULL);
|
||||
|
||||
if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1)
|
||||
PrintLinkStandbyMsg();
|
||||
@@ -1390,7 +1387,7 @@ static void CompleteWhenChoseItem(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -1442,9 +1439,9 @@ static void PlayerHandleYesNoInput(void)
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
if (gMultiUsePlayerCursor != 0)
|
||||
BtlController_EmitTwoReturnValues(1, 0xE, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 0xE, 0);
|
||||
else
|
||||
BtlController_EmitTwoReturnValues(1, 0xD, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 0xD, 0);
|
||||
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
@@ -1466,7 +1463,8 @@ static void MoveSelectionDisplayMoveNames(void)
|
||||
{
|
||||
MoveSelectionDestroyCursorAt(i);
|
||||
StringCopy(gDisplayedStringBattle, gMoveNames[moveInfo->moves[i]]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
|
||||
// Prints on windows B_WIN_MOVE_NAME_1, B_WIN_MOVE_NAME_2, B_WIN_MOVE_NAME_3, B_WIN_MOVE_NAME_4
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, i + B_WIN_MOVE_NAME_1);
|
||||
if (moveInfo->moves[i] != MOVE_NONE)
|
||||
gNumberOfMovesToChoose++;
|
||||
}
|
||||
@@ -1475,7 +1473,7 @@ static void MoveSelectionDisplayMoveNames(void)
|
||||
static void MoveSelectionDisplayPpString(void)
|
||||
{
|
||||
StringCopy(gDisplayedStringBattle, gText_MoveInterfacePP);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 7);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP);
|
||||
}
|
||||
|
||||
static void MoveSelectionDisplayPpNumber(void)
|
||||
@@ -1492,7 +1490,7 @@ static void MoveSelectionDisplayPpNumber(void)
|
||||
*(txtPtr)++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 9);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP_REMAINING);
|
||||
}
|
||||
|
||||
static void MoveSelectionDisplayMoveType(void)
|
||||
@@ -1506,7 +1504,7 @@ static void MoveSelectionDisplayMoveType(void)
|
||||
*(txtPtr)++ = 1;
|
||||
|
||||
StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 10);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE);
|
||||
}
|
||||
|
||||
static void MoveSelectionCreateCursorAt(u8 cursorPosition, u8 arg1)
|
||||
@@ -1577,7 +1575,7 @@ static void PrintLinkStandbyMsg(void)
|
||||
{
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
BattlePutTextOnWindow(gText_LinkStandby, 0);
|
||||
BattlePutTextOnWindow(gText_LinkStandby, B_WIN_MSG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1602,7 +1600,7 @@ static void PlayerHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1922,7 +1920,7 @@ void PlayerHandleGetRawMonData(void)
|
||||
for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++)
|
||||
dst[i] = src[i];
|
||||
|
||||
BtlController_EmitDataTransfer(1, gBattleBufferA[gActiveBattler][2], dst);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, gBattleBufferA[gActiveBattler][2], dst);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -2228,13 +2226,14 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
|
||||
static void PlayerHandleReturnMonToBall(void)
|
||||
{
|
||||
if (gBattleBufferA[gActiveBattler][1] == 0)
|
||||
if (!gBattleBufferA[gActiveBattler][1])
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = DoSwitchOutAnimation;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Skip animation, just remove battler
|
||||
FreeSpriteOamMatrix(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
DestroySprite(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
SetHealthboxSpriteInvisible(gHealthboxSpriteIds[gActiveBattler]);
|
||||
@@ -2549,7 +2548,7 @@ static void PlayerHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2;
|
||||
BattleTv_SetDataBasedOnString(*stringId);
|
||||
BattleArena_DeductMindPoints(gActiveBattler, *stringId);
|
||||
@@ -2579,14 +2578,14 @@ static void PlayerHandleChooseAction(void)
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3;
|
||||
BattleTv_ClearExplosionFaintCause();
|
||||
BattlePutTextOnWindow(gText_BattleMenu, 2);
|
||||
BattlePutTextOnWindow(gText_BattleMenu, B_WIN_ACTION_MENU);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
ActionSelectionDestroyCursorAt(i);
|
||||
|
||||
ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 1);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT);
|
||||
}
|
||||
|
||||
static void PlayerHandleYesNoBox(void)
|
||||
@@ -2594,7 +2593,7 @@ static void PlayerHandleYesNoBox(void)
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, 12);
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gMultiUsePlayerCursor = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
gBattlerControllerFuncs[gActiveBattler] = PlayerHandleYesNoInput;
|
||||
@@ -2622,7 +2621,7 @@ static void PlayerChooseMoveInBattlePalace(void)
|
||||
if (--*(gBattleStruct->arenaMindPoints + gActiveBattler) == 0)
|
||||
{
|
||||
gBattlePalaceMoveSelectionRngValue = gRngValue;
|
||||
BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -2672,7 +2671,7 @@ static void PlayerHandleChoosePokemon(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleBufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH)
|
||||
{
|
||||
BtlController_EmitChosenMonReturnValue(1, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
@@ -2829,25 +2828,25 @@ static void PlayerHandleCmd32(void)
|
||||
|
||||
static void PlayerHandleTwoReturnValues(void)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 0, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 0, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleChosenMonReturnValue(void)
|
||||
{
|
||||
BtlController_EmitChosenMonReturnValue(1, 0, NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, 0, NULL);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleOneReturnValue(void)
|
||||
{
|
||||
BtlController_EmitOneReturnValue(1, 0);
|
||||
BtlController_EmitOneReturnValue(BUFFER_B, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerHandleOneReturnValue_Duplicate(void)
|
||||
{
|
||||
BtlController_EmitOneReturnValue_Duplicate(1, 0);
|
||||
BtlController_EmitOneReturnValue_Duplicate(BUFFER_B, 0);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -3100,14 +3099,14 @@ static void PlayerHandleLinkStandbyMsg(void)
|
||||
RecordedBattle_RecordAllBattlerData(&gBattleBufferA[gActiveBattler][2]);
|
||||
switch (gBattleBufferA[gActiveBattler][1])
|
||||
{
|
||||
case 0:
|
||||
case LINK_STANDBY_MSG_STOP_BOUNCE:
|
||||
PrintLinkStandbyMsg();
|
||||
// fall through
|
||||
case 1:
|
||||
case LINK_STANDBY_STOP_BOUNCE_ONLY:
|
||||
EndBounceEffect(gActiveBattler, BOUNCE_HEALTHBOX);
|
||||
EndBounceEffect(gActiveBattler, BOUNCE_MON);
|
||||
break;
|
||||
case 2:
|
||||
case LINK_STANDBY_MSG_ONLY:
|
||||
PrintLinkStandbyMsg();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
// this file's functions
|
||||
static void PlayerPartnerHandleGetMonData(void);
|
||||
static void PlayerPartnerHandleGetRawMonData(void);
|
||||
static void PlayerPartnerHandleSetMonData(void);
|
||||
@@ -300,7 +299,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -333,7 +332,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
gainedExp -= nextLvlExp - currExp;
|
||||
savedActiveBank = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
gActiveBattler = savedActiveBank;
|
||||
|
||||
if (IsDoubleBattle() == TRUE
|
||||
@@ -412,7 +411,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
gainedExp -= expOnNextLvl - currExp;
|
||||
savedActiveBank = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp);
|
||||
gActiveBattler = savedActiveBank;
|
||||
gTasks[taskId].func = Task_LaunchLvlUpAnim;
|
||||
}
|
||||
@@ -497,7 +496,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter2(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -627,7 +626,7 @@ static void PlayerPartnerHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1491,7 +1490,7 @@ static void PlayerPartnerHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2;
|
||||
}
|
||||
|
||||
@@ -1528,7 +1527,7 @@ static void PlayerPartnerHandleChooseMove(void)
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
}
|
||||
|
||||
BtlController_EmitTwoReturnValues(1, 10, chosenMoveId | (gBattlerTarget << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, chosenMoveId | (gBattlerTarget << 8));
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1558,7 +1557,7 @@ static void PlayerPartnerHandleChoosePokemon(void)
|
||||
}
|
||||
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId;
|
||||
BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL);
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void RecordedOpponentHandleGetMonData(void);
|
||||
static void RecordedOpponentHandleGetRawMonData(void);
|
||||
static void RecordedOpponentHandleSetMonData(void);
|
||||
@@ -408,7 +405,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -541,7 +538,7 @@ static void RecordedOpponentHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1398,7 +1395,7 @@ static void RecordedOpponentHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
}
|
||||
|
||||
@@ -1409,7 +1406,7 @@ static void RecordedOpponentHandlePrintSelectionString(void)
|
||||
|
||||
static void RecordedOpponentHandleChooseAction(void)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1422,13 +1419,13 @@ static void RecordedOpponentHandleChooseMove(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
u8 target = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8));
|
||||
}
|
||||
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
@@ -1442,7 +1439,7 @@ static void RecordedOpponentHandleChooseItem(void)
|
||||
static void RecordedOpponentHandleChoosePokemon(void)
|
||||
{
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void RecordedPlayerHandleGetMonData(void);
|
||||
static void RecordedPlayerHandleGetRawMonData(void);
|
||||
static void RecordedPlayerHandleSetMonData(void);
|
||||
@@ -390,7 +387,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -520,7 +517,7 @@ static void RecordedPlayerHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1404,7 +1401,7 @@ static void RecordedPlayerHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
}
|
||||
|
||||
@@ -1417,7 +1414,7 @@ static void ChooseActionInBattlePalace(void)
|
||||
{
|
||||
if (gBattleCommunication[4] >= gBattlersCount / 2)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -1430,7 +1427,7 @@ static void RecordedPlayerHandleChooseAction(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -1444,13 +1441,13 @@ static void RecordedPlayerHandleChooseMove(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
u8 target = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8));
|
||||
}
|
||||
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
@@ -1464,7 +1461,7 @@ static void RecordedPlayerHandleChooseItem(void)
|
||||
static void RecordedPlayerHandleChoosePokemon(void)
|
||||
{
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
// this file's functions
|
||||
static void SafariHandleGetMonData(void);
|
||||
static void SafariHandleGetRawMonData(void);
|
||||
static void SafariHandleSetMonData(void);
|
||||
@@ -177,16 +176,16 @@ static void HandleInputChooseAction(void)
|
||||
switch (gActionSelectionCursor[gActiveBattler])
|
||||
{
|
||||
case 0:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_BALL, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_BALL, 0);
|
||||
break;
|
||||
case 1:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_POKEBLOCK, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_POKEBLOCK, 0);
|
||||
break;
|
||||
case 2:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_GO_NEAR, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_GO_NEAR, 0);
|
||||
break;
|
||||
case 3:
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_RUN, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_RUN, 0);
|
||||
break;
|
||||
}
|
||||
SafariBufferExecCompleted();
|
||||
@@ -241,7 +240,7 @@ static void CompleteOnBattlerSpriteCallbackDummy(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -281,7 +280,7 @@ static void CompleteWhenChosePokeblock(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId);
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -425,7 +424,7 @@ static void SafariHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
}
|
||||
|
||||
@@ -452,14 +451,14 @@ static void SafariHandleChooseAction(void)
|
||||
s32 i;
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3;
|
||||
BattlePutTextOnWindow(gText_SafariZoneMenu, 2);
|
||||
BattlePutTextOnWindow(gText_SafariZoneMenu, B_WIN_ACTION_MENU);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
ActionSelectionDestroyCursorAt(i);
|
||||
|
||||
ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo2);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 1);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT);
|
||||
}
|
||||
|
||||
static void SafariHandleYesNoBox(void)
|
||||
|
||||
@@ -196,7 +196,7 @@ static void WallyHandleActions(void)
|
||||
if (--gBattleStruct->wallyWaitFrames == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0);
|
||||
WallyBufferExecCompleted();
|
||||
gBattleStruct->wallyBattleState++;
|
||||
gBattleStruct->wallyMovesState = 0;
|
||||
@@ -207,7 +207,7 @@ static void WallyHandleActions(void)
|
||||
if (--gBattleStruct->wallyWaitFrames == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0);
|
||||
WallyBufferExecCompleted();
|
||||
gBattleStruct->wallyBattleState++;
|
||||
gBattleStruct->wallyMovesState = 0;
|
||||
@@ -217,7 +217,7 @@ static void WallyHandleActions(void)
|
||||
case 3:
|
||||
if (--gBattleStruct->wallyWaitFrames == 0)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_WALLY_THROW, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_WALLY_THROW, 0);
|
||||
WallyBufferExecCompleted();
|
||||
gBattleStruct->wallyBattleState++;
|
||||
gBattleStruct->wallyMovesState = 0;
|
||||
@@ -238,7 +238,7 @@ static void WallyHandleActions(void)
|
||||
if (--gBattleStruct->wallyWaitFrames == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0);
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
break;
|
||||
@@ -253,7 +253,7 @@ static void CompleteOnBattlerSpriteCallbackDummy(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ static void CompleteOnChosenItem(void)
|
||||
{
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId);
|
||||
BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId);
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,7 @@ static void WallyHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1178,7 +1178,7 @@ static void WallyHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
}
|
||||
|
||||
@@ -1205,14 +1205,14 @@ static void WallyHandleChooseAction(void)
|
||||
s32 i;
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3;
|
||||
BattlePutTextOnWindow(gText_BattleMenu, 2);
|
||||
BattlePutTextOnWindow(gText_BattleMenu, B_WIN_ACTION_MENU);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
ActionSelectionDestroyCursorAt(i);
|
||||
|
||||
ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillWallyDo);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 1);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT);
|
||||
}
|
||||
|
||||
static void WallyHandleYesNoBox(void)
|
||||
@@ -1241,7 +1241,7 @@ static void WallyHandleChooseMove(void)
|
||||
if (--gBattleStruct->wallyMoveFrames == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(1, 10, 0x100);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, 0x100);
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
break;
|
||||
|
||||
+27
-21
@@ -660,14 +660,14 @@ static void PrepareBufferDataTransfer(u8 bufferId, u8 *data, u16 size)
|
||||
{
|
||||
switch (bufferId)
|
||||
{
|
||||
case 0:
|
||||
case BUFFER_A:
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
gBattleBufferA[gActiveBattler][i] = *data;
|
||||
data++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case BUFFER_B:
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
gBattleBufferB[gActiveBattler][i] = *data;
|
||||
@@ -737,7 +737,7 @@ void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *data)
|
||||
|
||||
static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||
{
|
||||
u16 var;
|
||||
u16 numPlayers;
|
||||
u16 blockSize;
|
||||
|
||||
switch (gTasks[taskId].data[11])
|
||||
@@ -759,11 +759,11 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||
else
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER)
|
||||
var = 2;
|
||||
numPlayers = 2;
|
||||
else
|
||||
var = (gBattleTypeFlags & BATTLE_TYPE_MULTI) ? 4 : 2;
|
||||
numPlayers = (gBattleTypeFlags & BATTLE_TYPE_MULTI) ? 4 : 2;
|
||||
|
||||
if (GetLinkPlayerCount_2() >= var)
|
||||
if (GetLinkPlayerCount_2() >= numPlayers)
|
||||
{
|
||||
if (IsLinkMaster())
|
||||
{
|
||||
@@ -964,10 +964,10 @@ void BtlController_EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubs
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitReturnMonToBall(u8 bufferId, u8 arg1)
|
||||
void BtlController_EmitReturnMonToBall(u8 bufferId, bool8 skipAnim)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_RETURNMONTOBALL;
|
||||
sBattleBuffersTransferData[1] = arg1;
|
||||
sBattleBuffersTransferData[1] = skipAnim;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 2);
|
||||
}
|
||||
|
||||
@@ -1134,12 +1134,13 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID)
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(struct BattleMsgData) + 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2)
|
||||
// itemId only relevant for B_ACTION_USE_ITEM
|
||||
void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId)
|
||||
{
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_CHOOSEACTION;
|
||||
sBattleBuffersTransferData[1] = arg1;
|
||||
sBattleBuffersTransferData[2] = arg2;
|
||||
sBattleBuffersTransferData[3] = (arg2 & 0xFF00) >> 8;
|
||||
sBattleBuffersTransferData[1] = action;
|
||||
sBattleBuffersTransferData[2] = itemId;
|
||||
sBattleBuffersTransferData[3] = (itemId & 0xFF00) >> 8;
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
@@ -1177,7 +1178,7 @@ void BtlController_EmitChooseItem(u8 bufferId, u8 *arg1)
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *arg4)
|
||||
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *data)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@@ -1186,7 +1187,7 @@ void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abili
|
||||
sBattleBuffersTransferData[2] = slotId;
|
||||
sBattleBuffersTransferData[3] = abilityId;
|
||||
for (i = 0; i < 3; i++)
|
||||
sBattleBuffersTransferData[4 + i] = arg4[i];
|
||||
sBattleBuffersTransferData[4 + i] = data[i];
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 8); // Only 7 bytes were written.
|
||||
}
|
||||
|
||||
@@ -1280,15 +1281,19 @@ void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, size + 7);
|
||||
}
|
||||
|
||||
void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *unusedDumbDataParameter)
|
||||
// Unused
|
||||
void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_PLAYBGM;
|
||||
sBattleBuffersTransferData[1] = songId;
|
||||
sBattleBuffersTransferData[2] = (songId & 0xFF00) >> 8;
|
||||
for (i = 0; i < songId; i++) // ????
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(unusedDumbDataParameter++);
|
||||
|
||||
// Nonsense loop using songId as a size
|
||||
// Would go out of bounds for any song id after SE_RG_BAG_POCKET (253)
|
||||
for (i = 0; i < songId; i++)
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, songId + 3);
|
||||
}
|
||||
|
||||
@@ -1442,8 +1447,8 @@ void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* h
|
||||
s32 i;
|
||||
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_DRAWPARTYSTATUSSUMMARY;
|
||||
sBattleBuffersTransferData[1] = flags & 0x7F;
|
||||
sBattleBuffersTransferData[2] = (flags & 0x80) >> 7; // If true, skip delay after drawing. True during intro
|
||||
sBattleBuffersTransferData[1] = flags & ~PARTY_SUMM_SKIP_DRAW_DELAY; // If true, skip player side
|
||||
sBattleBuffersTransferData[2] = (flags & PARTY_SUMM_SKIP_DRAW_DELAY) >> 7; // If true, skip delay after drawing. True during intro
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_DRAWPARTYSTATUSSUMMARY;
|
||||
for (i = 0; i < (s32)(sizeof(struct HpAndStatus) * PARTY_SIZE); i++)
|
||||
sBattleBuffersTransferData[4 + i] = *(i + (u8*)(hpAndStatus));
|
||||
@@ -1486,11 +1491,12 @@ void BtlController_EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4);
|
||||
}
|
||||
|
||||
void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 record)
|
||||
// mode is a LINK_STANDBY_* constant
|
||||
void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 mode, bool32 record)
|
||||
{
|
||||
bool8 record_ = record;
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_LINKSTANDBYMSG;
|
||||
sBattleBuffersTransferData[1] = arg1;
|
||||
sBattleBuffersTransferData[1] = mode;
|
||||
|
||||
if (record_)
|
||||
sBattleBuffersTransferData[3] = sBattleBuffersTransferData[2] = RecordedBattle_BufferNewBattlerData(&sBattleBuffersTransferData[4]);
|
||||
|
||||
+12
-15
@@ -26,10 +26,6 @@
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/battle_palace.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
extern const u8 gBattlePalaceNatureToMoveTarget[];
|
||||
extern const u8 * const gBattleAnims_General[];
|
||||
extern const u8 * const gBattleAnims_Special[];
|
||||
@@ -115,7 +111,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
||||
s32 i, var1, var2;
|
||||
s32 chosenMoveId = -1;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, 0xFF);
|
||||
u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL);
|
||||
s32 percent = Random() % 100;
|
||||
|
||||
// Heavy variable re-use here makes this hard to read without defines
|
||||
@@ -438,9 +434,10 @@ bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattler, u8 atkBattler, u8 de
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
if (tableId == B_ANIM_CASTFORM_CHANGE && (argument & 0x80))
|
||||
if (tableId == B_ANIM_CASTFORM_CHANGE && (argument & CASTFORM_SUBSTITUTE))
|
||||
{
|
||||
gBattleMonForms[activeBattler] = (argument & ~(0x80));
|
||||
// If Castform is behind substitute, set the new form but skip the animation
|
||||
gBattleMonForms[activeBattler] = (argument & ~CASTFORM_SUBSTITUTE);
|
||||
return TRUE;
|
||||
}
|
||||
if (gBattleSpritesDataPtr->battlerData[activeBattler].behindSubstitute
|
||||
@@ -593,7 +590,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
paletteOffset = 0x100 + battlerId * 16;
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20);
|
||||
}
|
||||
|
||||
@@ -656,7 +653,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
paletteOffset = 0x100 + battlerId * 16;
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20);
|
||||
}
|
||||
|
||||
@@ -895,7 +892,7 @@ void CopyBattleSpriteInvisibility(u8 battlerId)
|
||||
gBattleSpritesDataPtr->battlerData[battlerId].invisible = gSprites[gBattlerSpriteIds[battlerId]].invisible;
|
||||
}
|
||||
|
||||
void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform)
|
||||
void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform)
|
||||
{
|
||||
u16 paletteOffset;
|
||||
u32 personalityValue;
|
||||
@@ -903,7 +900,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||
u8 position;
|
||||
const u32 *lzPaletteData;
|
||||
|
||||
if (notTransform)
|
||||
if (castform)
|
||||
{
|
||||
StartSpriteAnim(&gSprites[gBattlerSpriteIds[battlerAtk]], gBattleSpritesDataPtr->animationData->animArg);
|
||||
paletteOffset = 0x100 + battlerAtk * 16;
|
||||
@@ -976,8 +973,8 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||
if (targetSpecies == SPECIES_CASTFORM)
|
||||
{
|
||||
gSprites[gBattlerSpriteIds[battlerAtk]].anims = gMonFrontAnimsPtrTable[targetSpecies];
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]);
|
||||
LoadPalette(gBattleStruct->castformPalette[0] + gBattleMonForms[battlerDef] * 16, paletteOffset, 32);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerDef]], paletteOffset, 32);
|
||||
}
|
||||
|
||||
BlendPalette(paletteOffset, 16, 6, RGB_WHITE);
|
||||
@@ -1251,11 +1248,11 @@ void AllocateMonSpritesGfx(void)
|
||||
|
||||
gMonSpritesGfxPtr = NULL;
|
||||
gMonSpritesGfxPtr = AllocZeroed(sizeof(*gMonSpritesGfxPtr));
|
||||
gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(0x8000);
|
||||
gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(MON_PIC_SIZE * 4 * MAX_BATTLERS_COUNT);
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * 0x2000);
|
||||
gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * MON_PIC_SIZE * 4);
|
||||
*(gMonSpritesGfxPtr->templates + i) = gBattlerSpriteTemplates[i];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
|
||||
+11
-12
@@ -584,36 +584,35 @@ static void BattleIntroSlidePartner(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 tilesOffset)
|
||||
void DrawBattlerOnBg(int bgId, u8 x, u8 y, u8 battlerPosition, u8 paletteId, u8 *tiles, u16 *tilemap, u16 tilesOffset)
|
||||
{
|
||||
int i, j;
|
||||
u8 battler = GetBattlerAtPosition(battlerPosition);
|
||||
int offset = tilesOffset;
|
||||
CpuCopy16(gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * gBattleMonForms[battler], arg5, BG_SCREEN_SIZE);
|
||||
LoadBgTiles(bgId, arg5, 0x1000, tilesOffset);
|
||||
for (i = arg2; i < arg2 + 8; i++)
|
||||
CpuCopy16(gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * gBattleMonForms[battler], tiles, BG_SCREEN_SIZE);
|
||||
LoadBgTiles(bgId, tiles, 0x1000, tilesOffset);
|
||||
for (i = y; i < y + 8; i++)
|
||||
{
|
||||
for (j = arg1; j < arg1 + 8; j++)
|
||||
for (j = x; j < x + 8; j++)
|
||||
{
|
||||
arg6[i * 32 + j] = offset | (arg4 << 12);
|
||||
tilemap[i * 32 + j] = offset | (paletteId << 12);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
|
||||
LoadBgTilemap(bgId, arg6, BG_SCREEN_SIZE, 0);
|
||||
LoadBgTilemap(bgId, tilemap, BG_SCREEN_SIZE, 0);
|
||||
}
|
||||
|
||||
void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
static void DrawBattlerOnBgDMA(u8 x, u8 y, u8 battlerPosition, u8 arg3, u8 paletteId, u16 arg5, u8 arg6, u8 arg7)
|
||||
{
|
||||
int i, j, offset;
|
||||
|
||||
DmaCopy16(3, gMonSpritesGfxPtr->sprites.ptr[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 (i = y; i < y + 8; i++)
|
||||
{
|
||||
for (j = arg0; j < arg0 + 8; j++)
|
||||
for (j = x; j < x + 8; j++)
|
||||
{
|
||||
*((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (arg4 << 12);
|
||||
*((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (paletteId << 12);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
|
||||
+318
-268
File diff suppressed because it is too large
Load Diff
+198
-198
@@ -1480,8 +1480,7 @@ static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS,
|
||||
|
||||
static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
{
|
||||
// The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c
|
||||
{ // 0 Standard battle message
|
||||
[B_WIN_MSG] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1489,11 +1488,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 1,
|
||||
.fgColor = 1,
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_6,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 1 "What will (pokemon) do?"
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.x = 1,
|
||||
@@ -1501,11 +1500,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_6,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 2 "Fight/Pokemon/Bag/Run"
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1513,11 +1512,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 3 Top left move
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1525,11 +1524,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 4 Top right move
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1537,11 +1536,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 5 Bottom left move
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1549,11 +1548,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 6 Bottom right move
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1561,11 +1560,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 7 "PP"
|
||||
[B_WIN_PP] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1573,11 +1572,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 12,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 11,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_3,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_2,
|
||||
},
|
||||
{ // 8
|
||||
[B_WIN_DUMMY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1585,11 +1584,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 9 PP remaining
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 2,
|
||||
@@ -1597,11 +1596,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 12,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 11,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_3,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_2,
|
||||
},
|
||||
{ // 10 "type"
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1609,11 +1608,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 11 "switch which?"
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1621,11 +1620,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 12 "gText_BattleYesNoChoice"
|
||||
[B_WIN_YESNO] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1633,11 +1632,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 13
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1645,11 +1644,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 14
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.x = 32,
|
||||
@@ -1657,11 +1656,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 0,
|
||||
.shadowColor = 2,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_COLOR_TRANSPARENT,
|
||||
.shadowColor = TEXT_COLOR_DARK_GRAY,
|
||||
},
|
||||
{ // 15
|
||||
[B_WIN_VS_PLAYER] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1669,11 +1668,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 16
|
||||
[B_WIN_VS_OPPONENT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1681,11 +1680,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 17
|
||||
[B_WIN_VS_MULTI_PLAYER_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1693,11 +1692,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 18
|
||||
[B_WIN_VS_MULTI_PLAYER_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1705,11 +1704,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 19
|
||||
[B_WIN_VS_MULTI_PLAYER_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1717,11 +1716,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 20
|
||||
[B_WIN_VS_MULTI_PLAYER_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1729,11 +1728,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 21
|
||||
[B_WIN_VS_OUTCOME_DRAW] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1741,11 +1740,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 0,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_COLOR_TRANSPARENT,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 22
|
||||
[B_WIN_VS_OUTCOME_LEFT] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1753,11 +1752,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 0,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_COLOR_TRANSPARENT,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 23
|
||||
[B_WIN_VS_OUTCOME_RIGHT] = {
|
||||
.fillValue = PIXEL_FILL(0x0),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1765,15 +1764,15 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 0,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_COLOR_TRANSPARENT,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
{
|
||||
{ // 0
|
||||
[B_WIN_MSG] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1781,11 +1780,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 1,
|
||||
.fgColor = 1,
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_6,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 1
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xF),
|
||||
.fontId = 1,
|
||||
.x = 1,
|
||||
@@ -1793,11 +1792,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 15,
|
||||
.shadowColor = 6,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_6,
|
||||
.shadowColor = TEXT_COLOR_GREEN,
|
||||
},
|
||||
{ // 2
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1805,11 +1804,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 3
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1817,11 +1816,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 4
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1829,11 +1828,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 5
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1841,11 +1840,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 6
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1853,11 +1852,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 7
|
||||
[B_WIN_PP] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1865,11 +1864,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 12,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 11,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_3,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_2,
|
||||
},
|
||||
{ // 8
|
||||
[B_WIN_DUMMY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1877,11 +1876,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 9
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 2,
|
||||
@@ -1889,11 +1888,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 12,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 11,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_3,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_2,
|
||||
},
|
||||
{ // 10
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1901,11 +1900,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 11
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 7,
|
||||
.x = 0,
|
||||
@@ -1913,11 +1912,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 12
|
||||
[B_WIN_YESNO] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1925,11 +1924,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 13
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -1937,11 +1936,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 14
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.fillValue = PIXEL_FILL(0),
|
||||
.fontId = 1,
|
||||
.x = 32,
|
||||
@@ -1949,11 +1948,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 0,
|
||||
.shadowColor = 2,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_COLOR_TRANSPARENT,
|
||||
.shadowColor = TEXT_COLOR_DARK_GRAY,
|
||||
},
|
||||
{ // 15
|
||||
[ARENA_WIN_PLAYER_NAME] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1961,11 +1960,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 1,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_COLOR_WHITE,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 16
|
||||
[ARENA_WIN_VS] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1973,11 +1972,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 17
|
||||
[ARENA_WIN_OPPONENT_NAME] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1985,11 +1984,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 18
|
||||
[ARENA_WIN_MIND] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -1997,11 +1996,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 19
|
||||
[ARENA_WIN_SKILL] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -2009,11 +2008,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 20
|
||||
[ARENA_WIN_BODY] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -2021,11 +2020,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 21
|
||||
[ARENA_WIN_JUDGEMENT_TITLE] = {
|
||||
.fillValue = PIXEL_FILL(0xE),
|
||||
.fontId = 1,
|
||||
.x = -1,
|
||||
@@ -2033,11 +2032,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 0,
|
||||
.fgColor = 13,
|
||||
.bgColor = 14,
|
||||
.shadowColor = 15,
|
||||
.fgColor = TEXT_DYNAMIC_COLOR_4,
|
||||
.bgColor = TEXT_DYNAMIC_COLOR_5,
|
||||
.shadowColor = TEXT_DYNAMIC_COLOR_6,
|
||||
},
|
||||
{ // 22
|
||||
[ARENA_WIN_JUDGEMENT_TEXT] = {
|
||||
.fillValue = PIXEL_FILL(0x1),
|
||||
.fontId = 1,
|
||||
.x = 0,
|
||||
@@ -2045,15 +2044,16 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
|
||||
.letterSpacing = 0,
|
||||
.lineSpacing = 0,
|
||||
.speed = 1,
|
||||
.fgColor = 2,
|
||||
.bgColor = 1,
|
||||
.shadowColor = 3,
|
||||
.fgColor = TEXT_COLOR_DARK_GRAY,
|
||||
.bgColor = TEXT_COLOR_WHITE,
|
||||
.shadowColor = TEXT_COLOR_LIGHT_GRAY,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct BattleWindowText *const sBattleTextOnWindowsInfo[] =
|
||||
{
|
||||
sTextOnWindowsInfo_Normal, sTextOnWindowsInfo_Arena
|
||||
[B_WIN_TYPE_NORMAL] = sTextOnWindowsInfo_Normal,
|
||||
[B_WIN_TYPE_ARENA] = sTextOnWindowsInfo_Arena
|
||||
};
|
||||
|
||||
static const u8 sRecordedBattleTextSpeeds[] = {8, 4, 1, 0};
|
||||
@@ -3054,9 +3054,9 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
|
||||
struct TextPrinterTemplate printerTemplate;
|
||||
u8 speed;
|
||||
|
||||
if (windowId & 0x80)
|
||||
if (windowId & B_WIN_COPYTOVRAM)
|
||||
{
|
||||
windowId &= ~(0x80);
|
||||
windowId &= ~B_WIN_COPYTOVRAM;
|
||||
copyToVram = FALSE;
|
||||
}
|
||||
else
|
||||
@@ -3086,17 +3086,17 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
|
||||
printerTemplate.x = printerTemplate.currentX = alignX;
|
||||
}
|
||||
|
||||
if (windowId == 0x16)
|
||||
gTextFlags.useAlternateDownArrow = 0;
|
||||
if (windowId == ARENA_WIN_JUDGEMENT_TEXT)
|
||||
gTextFlags.useAlternateDownArrow = FALSE;
|
||||
else
|
||||
gTextFlags.useAlternateDownArrow = 1;
|
||||
gTextFlags.useAlternateDownArrow = TRUE;
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED))
|
||||
gTextFlags.autoScroll = 1;
|
||||
gTextFlags.autoScroll = TRUE;
|
||||
else
|
||||
gTextFlags.autoScroll = 0;
|
||||
gTextFlags.autoScroll = FALSE;
|
||||
|
||||
if (windowId == 0 || windowId == 0x16)
|
||||
if (windowId == B_WIN_MSG || windowId == ARENA_WIN_JUDGEMENT_TEXT)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
speed = 1;
|
||||
|
||||
+401
-382
File diff suppressed because it is too large
Load Diff
+28
-35
@@ -319,7 +319,7 @@ const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
|
||||
[REMATCH_TRENT] = REMATCH(TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5, ROUTE112),
|
||||
[REMATCH_SAWYER] = REMATCH(TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5, MT_CHIMNEY),
|
||||
[REMATCH_KIRA_AND_DAN] = REMATCH(TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5, ABANDONED_SHIP_ROOMS2_1F),
|
||||
[REMATCH_WALLY_3] = REMATCH(TRAINER_WALLY_VR_2, TRAINER_WALLY_VR_3, TRAINER_WALLY_VR_4, TRAINER_WALLY_VR_5, TRAINER_WALLY_VR_5, VICTORY_ROAD_1F),
|
||||
[REMATCH_WALLY_VR] = REMATCH(TRAINER_WALLY_VR_2, TRAINER_WALLY_VR_3, TRAINER_WALLY_VR_4, TRAINER_WALLY_VR_5, TRAINER_WALLY_VR_5, VICTORY_ROAD_1F),
|
||||
[REMATCH_ROXANNE] = REMATCH(TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5, RUSTBORO_CITY),
|
||||
[REMATCH_BRAWLY] = REMATCH(TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5, DEWFORD_TOWN),
|
||||
[REMATCH_WATTSON] = REMATCH(TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5, MAUVILLE_CITY),
|
||||
@@ -460,12 +460,12 @@ static void DoTrainerBattle(void)
|
||||
TryUpdateGymLeaderRematchFromTrainer();
|
||||
}
|
||||
|
||||
static void sub_80B0828(void)
|
||||
static void DoBattlePyramidTrainerHillBattle(void)
|
||||
{
|
||||
if (InBattlePyramid())
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(10), 0);
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PYRAMID), 0);
|
||||
else
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(11), 0);
|
||||
CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_TRAINER_HILL), 0);
|
||||
|
||||
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
|
||||
IncrementGameStat(GAME_STAT_TRAINER_BATTLES);
|
||||
@@ -853,16 +853,7 @@ static u8 GetTrainerBattleTransition(void)
|
||||
return sBattleTransitionTable_Trainer[transitionType][1];
|
||||
}
|
||||
|
||||
// 0: Battle Tower
|
||||
// 3: Battle Dome
|
||||
// 4: Battle Palace
|
||||
// 5: Battle Arena
|
||||
// 6: Battle Factory
|
||||
// 7: Battle Pike
|
||||
// 10: Battle Pyramid
|
||||
// 11: Trainer Hill
|
||||
// 12: Secret Base
|
||||
// 13: E-Reader
|
||||
#define RANDOM_TRANSITION(table)(table[Random() % ARRAY_COUNT(table)])
|
||||
u8 GetSpecialBattleTransition(s32 id)
|
||||
{
|
||||
u16 var;
|
||||
@@ -873,35 +864,35 @@ u8 GetSpecialBattleTransition(s32 id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case B_TRANSITION_GROUP_TRAINER_HILL:
|
||||
case B_TRANSITION_GROUP_SECRET_BASE:
|
||||
case B_TRANSITION_GROUP_E_READER:
|
||||
return B_TRANSITION_POKEBALLS_TRAIL;
|
||||
case 10:
|
||||
return sBattleTransitionTable_BattlePyramid[Random() % ARRAY_COUNT(sBattleTransitionTable_BattlePyramid)];
|
||||
case 3:
|
||||
return sBattleTransitionTable_BattleDome[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleDome)];
|
||||
case B_TRANSITION_GROUP_B_PYRAMID:
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattlePyramid);
|
||||
case B_TRANSITION_GROUP_B_DOME:
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattleDome);
|
||||
}
|
||||
|
||||
if (VarGet(VAR_FRONTIER_BATTLE_MODE) != FRONTIER_MODE_LINK_MULTIS)
|
||||
return sBattleTransitionTable_BattleFrontier[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleFrontier)];
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattleFrontier);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case B_TRANSITION_GROUP_TRAINER_HILL:
|
||||
case B_TRANSITION_GROUP_SECRET_BASE:
|
||||
case B_TRANSITION_GROUP_E_READER:
|
||||
return B_TRANSITION_BIG_POKEBALL;
|
||||
case 10:
|
||||
return sBattleTransitionTable_BattlePyramid[Random() % ARRAY_COUNT(sBattleTransitionTable_BattlePyramid)];
|
||||
case 3:
|
||||
return sBattleTransitionTable_BattleDome[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleDome)];
|
||||
case B_TRANSITION_GROUP_B_PYRAMID:
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattlePyramid);
|
||||
case B_TRANSITION_GROUP_B_DOME:
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattleDome);
|
||||
}
|
||||
|
||||
if (VarGet(VAR_FRONTIER_BATTLE_MODE) != FRONTIER_MODE_LINK_MULTIS)
|
||||
return sBattleTransitionTable_BattleFrontier[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleFrontier)];
|
||||
return RANDOM_TRANSITION(sBattleTransitionTable_BattleFrontier);
|
||||
}
|
||||
|
||||
var = gSaveBlock2Ptr->frontier.trainerIds[gSaveBlock2Ptr->frontier.curChallengeBattleNum * 2 + 0]
|
||||
@@ -1319,7 +1310,7 @@ void BattleSetup_StartTrainerBattle(void)
|
||||
gMain.savedCallback = CB2_EndTrainerBattle;
|
||||
|
||||
if (InBattlePyramid() || InTrainerHillChallenge())
|
||||
sub_80B0828();
|
||||
DoBattlePyramidTrainerHillBattle();
|
||||
else
|
||||
DoTrainerBattle();
|
||||
|
||||
@@ -1575,12 +1566,14 @@ static s32 TrainerIdToRematchTableId(const struct RematchTrainer *table, u16 tra
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool32 sub_80B1D94(s32 rematchTableId)
|
||||
// Returns TRUE if the given trainer (by their entry in the rematch table) is not allowed to have rematches.
|
||||
// This applies to the Elite Four and Victory Road Wally (if he's not been defeated yet)
|
||||
static bool32 IsRematchForbidden(s32 rematchTableId)
|
||||
{
|
||||
if (rematchTableId >= REMATCH_ELITE_FOUR_ENTRIES)
|
||||
return TRUE;
|
||||
else if (rematchTableId == REMATCH_WALLY_3)
|
||||
return (FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD) == FALSE);
|
||||
else if (rematchTableId == REMATCH_WALLY_VR)
|
||||
return !FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1609,7 +1602,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u
|
||||
|
||||
for (i = 0; i <= REMATCH_SPECIAL_TRAINER_START; i++)
|
||||
{
|
||||
if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i))
|
||||
if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !IsRematchForbidden(i))
|
||||
{
|
||||
if (gSaveBlock1Ptr->trainerRematches[i] != 0)
|
||||
{
|
||||
|
||||
+10
-10
@@ -2025,7 +2025,7 @@ void DoSpecialTrainerBattle(void)
|
||||
}
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(0));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_TOWER));
|
||||
break;
|
||||
case SPECIAL_BATTLE_SECRET_BASE:
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
@@ -2035,7 +2035,7 @@ void DoSpecialTrainerBattle(void)
|
||||
}
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(12));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_SECRET_BASE));
|
||||
break;
|
||||
case SPECIAL_BATTLE_EREADER:
|
||||
ZeroEnemyPartyMons();
|
||||
@@ -2045,7 +2045,7 @@ void DoSpecialTrainerBattle(void)
|
||||
gTrainerBattleOpponent_A = 0;
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(13));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_E_READER));
|
||||
break;
|
||||
case SPECIAL_BATTLE_DOME:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOME;
|
||||
@@ -2055,7 +2055,7 @@ void DoSpecialTrainerBattle(void)
|
||||
FillFrontierTrainerParty(DOME_BATTLE_PARTY_SIZE);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
CreateTask_PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(3));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_DOME));
|
||||
break;
|
||||
case SPECIAL_BATTLE_PALACE:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_PALACE;
|
||||
@@ -2067,7 +2067,7 @@ void DoSpecialTrainerBattle(void)
|
||||
FillTentTrainerParty(FRONTIER_PARTY_SIZE);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(4));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PALACE));
|
||||
break;
|
||||
case SPECIAL_BATTLE_ARENA:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_ARENA;
|
||||
@@ -2077,7 +2077,7 @@ void DoSpecialTrainerBattle(void)
|
||||
FillTentTrainerParty(FRONTIER_PARTY_SIZE);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(5));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_ARENA));
|
||||
break;
|
||||
case SPECIAL_BATTLE_FACTORY:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_FACTORY;
|
||||
@@ -2086,28 +2086,28 @@ void DoSpecialTrainerBattle(void)
|
||||
FillFactoryTrainerParty();
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(6));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_FACTORY));
|
||||
break;
|
||||
case SPECIAL_BATTLE_PIKE_SINGLE:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_BATTLE_TOWER;
|
||||
FillFrontierTrainerParty(FRONTIER_PARTY_SIZE);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(7));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PIKE));
|
||||
break;
|
||||
case SPECIAL_BATTLE_PYRAMID:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_PYRAMID;
|
||||
FillFrontierTrainerParty(FRONTIER_PARTY_SIZE);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(10));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PYRAMID));
|
||||
break;
|
||||
case SPECIAL_BATTLE_PIKE_DOUBLE:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS;
|
||||
FillFrontierTrainersParties(1);
|
||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||
PlayMapChosenOrBattleBGM(0);
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(7));
|
||||
BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PIKE));
|
||||
break;
|
||||
case SPECIAL_BATTLE_STEVEN:
|
||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER;
|
||||
|
||||
+198
-298
File diff suppressed because it is too large
Load Diff
+7
-10
@@ -34,8 +34,8 @@ void AllocateBattleResources(void)
|
||||
gLinkBattleSendBuffer = AllocZeroed(BATTLE_BUFFER_LINK_SIZE);
|
||||
gLinkBattleRecvBuffer = AllocZeroed(BATTLE_BUFFER_LINK_SIZE);
|
||||
|
||||
gUnknown_0202305C = AllocZeroed(0x2000);
|
||||
gUnknown_02023060 = AllocZeroed(0x1000);
|
||||
gBattleAnimBgTileBuffer = AllocZeroed(0x2000);
|
||||
gBattleAnimBgTilemapBuffer = AllocZeroed(0x1000);
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE)
|
||||
{
|
||||
@@ -66,8 +66,8 @@ void FreeBattleResources(void)
|
||||
FREE_AND_SET_NULL(gLinkBattleSendBuffer);
|
||||
FREE_AND_SET_NULL(gLinkBattleRecvBuffer);
|
||||
|
||||
FREE_AND_SET_NULL(gUnknown_0202305C);
|
||||
FREE_AND_SET_NULL(gUnknown_02023060);
|
||||
FREE_AND_SET_NULL(gBattleAnimBgTileBuffer);
|
||||
FREE_AND_SET_NULL(gBattleAnimBgTilemapBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,16 +108,13 @@ void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1)
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
// gBattleStruct->field_60[0][i]
|
||||
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->field_60));
|
||||
gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders));
|
||||
|
||||
SwitchPartyMonSlots(GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId]), GetPartyIdFromBattlePartyId(arg1));
|
||||
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
*(0 * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i];
|
||||
*(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +204,7 @@ u32 BattlePalace_TryEscapeStatus(u8 battlerId)
|
||||
if (effect == 2)
|
||||
{
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -1136,9 +1136,9 @@ static void AllocContestResources(void)
|
||||
gContestResources->contestBgTilemaps[3] = AllocZeroed(0x1000);
|
||||
gContestResources->boxBlinkTiles1 = AllocZeroed(0x800);
|
||||
gContestResources->boxBlinkTiles2 = AllocZeroed(0x800);
|
||||
gContestResources->field_3c = AllocZeroed(0x2000);
|
||||
gUnknown_0202305C = gContestResources->field_3c;
|
||||
gUnknown_02023060 = gContestResources->contestBgTilemaps[1];
|
||||
gContestResources->animBgTileBuffer = AllocZeroed(0x2000);
|
||||
gBattleAnimBgTileBuffer = gContestResources->animBgTileBuffer;
|
||||
gBattleAnimBgTilemapBuffer = gContestResources->contestBgTilemaps[1];
|
||||
}
|
||||
|
||||
static void FreeContestResources(void)
|
||||
@@ -1158,10 +1158,10 @@ static void FreeContestResources(void)
|
||||
FREE_AND_SET_NULL(gContestResources->contestBgTilemaps[3]);
|
||||
FREE_AND_SET_NULL(gContestResources->boxBlinkTiles1);
|
||||
FREE_AND_SET_NULL(gContestResources->boxBlinkTiles2);
|
||||
FREE_AND_SET_NULL(gContestResources->field_3c);
|
||||
FREE_AND_SET_NULL(gContestResources->animBgTileBuffer);
|
||||
FREE_AND_SET_NULL(gContestResources);
|
||||
gUnknown_0202305C = NULL;
|
||||
gUnknown_02023060 = NULL;
|
||||
gBattleAnimBgTileBuffer = NULL;
|
||||
gBattleAnimBgTilemapBuffer = NULL;
|
||||
}
|
||||
|
||||
void CB2_StartContest(void)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -454,7 +454,7 @@ const u8 *const gMatchCallFlavorTexts[REMATCH_TABLE_ENTRIES][CHECK_PAGE_ENTRY_CO
|
||||
[REMATCH_TRENT] = MCFLAVOR(Hiker_Trent),
|
||||
[REMATCH_SAWYER] = MCFLAVOR(Hiker_Sawyer),
|
||||
[REMATCH_KIRA_AND_DAN] = MCFLAVOR(YoungCouple_LoisAndHal),
|
||||
[REMATCH_WALLY_3] = MCFLAVOR(PkmnTrainer_Wally),
|
||||
[REMATCH_WALLY_VR] = MCFLAVOR(PkmnTrainer_Wally),
|
||||
[REMATCH_ROXANNE] = MCFLAVOR(RockinWhiz_Roxanne),
|
||||
[REMATCH_BRAWLY] = MCFLAVOR(TheBigHit_Brawly),
|
||||
[REMATCH_WATTSON] = MCFLAVOR(SwellShock_Wattson),
|
||||
|
||||
+14
-14
@@ -661,7 +661,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnIsEvolving);
|
||||
BattlePutTextOnWindow(gStringVar4, 0);
|
||||
BattlePutTextOnWindow(gStringVar4, B_WIN_MSG);
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
break;
|
||||
@@ -758,7 +758,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
if (IsCryFinished())
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, gText_CongratsPkmnEvolved);
|
||||
BattlePutTextOnWindow(gStringVar4, 0);
|
||||
BattlePutTextOnWindow(gStringVar4, B_WIN_MSG);
|
||||
PlayBGM(MUS_EVOLVED);
|
||||
gTasks[taskId].tState++;
|
||||
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskId].tPostEvoSpecies));
|
||||
@@ -845,7 +845,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
else // Fire Red leftover probably
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnStoppedEvolving);
|
||||
|
||||
BattlePutTextOnWindow(gStringVar4, 0);
|
||||
BattlePutTextOnWindow(gStringVar4, B_WIN_MSG);
|
||||
gTasks[taskId].tEvoWasStopped = TRUE;
|
||||
gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE;
|
||||
}
|
||||
@@ -856,7 +856,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
PlayFanfare(MUS_LEVEL_UP);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnsFirstMove = 0x40; // re-used as a counter
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
@@ -874,7 +874,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
// "{mon} is trying to learn {move}"
|
||||
BufferMoveToLearnIntoBattleTextBuff2();
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
}
|
||||
break;
|
||||
@@ -883,7 +883,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
{
|
||||
// "But, {mon} can't learn more than four moves"
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
}
|
||||
break;
|
||||
@@ -892,7 +892,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
{
|
||||
// "Delete a move to make room for {move}?"
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveYesState = MVSTATE_SHOW_MOVE_SELECT;
|
||||
gTasks[taskId].tLearnMoveNoState = MVSTATE_ASK_CANCEL;
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
@@ -901,7 +901,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0);
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC);
|
||||
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
sEvoCursorPos = 0;
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
@@ -980,7 +980,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
{
|
||||
// Can't forget HMs
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveState = MVSTATE_RETRY_AFTER_HM;
|
||||
}
|
||||
else
|
||||
@@ -997,14 +997,14 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
break;
|
||||
case MVSTATE_FORGET_MSG_1:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
break;
|
||||
case MVSTATE_FORGET_MSG_2:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
}
|
||||
break;
|
||||
@@ -1012,20 +1012,20 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tState = EVOSTATE_LEARNED_MOVE;
|
||||
}
|
||||
break;
|
||||
case MVSTATE_ASK_CANCEL:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tLearnMoveYesState = MVSTATE_CANCEL;
|
||||
gTasks[taskId].tLearnMoveNoState = MVSTATE_INTRO_MSG_1;
|
||||
gTasks[taskId].tLearnMoveState = MVSTATE_PRINT_YES_NO;
|
||||
break;
|
||||
case MVSTATE_CANCEL:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE;
|
||||
break;
|
||||
case MVSTATE_RETRY_AFTER_HM:
|
||||
|
||||
@@ -64,8 +64,6 @@ static EWRAM_DATA u32 sHofFadePalettes = 0;
|
||||
static EWRAM_DATA struct HallofFameTeam *sHofMonPtr = NULL;
|
||||
static EWRAM_DATA struct HofGfx *sHofGfxPtr = NULL;
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
static void ClearVramOamPltt_LoadHofPal(void);
|
||||
static void LoadHofGfx(void);
|
||||
static void InitHofBgs(void);
|
||||
|
||||
+5
-5
@@ -944,7 +944,7 @@ static void DisplayPartyPokemonDataToTeachMove(u8 slot, u16 item, u8 tutor)
|
||||
static void DisplayPartyPokemonDataForMultiBattle(u8 slot)
|
||||
{
|
||||
struct PartyMenuBox *menuBox = &sPartyMenuBoxes[slot];
|
||||
u8 actualSlot = slot - (3);
|
||||
u8 actualSlot = slot - MULTI_PARTY_SIZE;
|
||||
|
||||
if (gMultiPartnerParty[actualSlot].species == SPECIES_NONE)
|
||||
{
|
||||
@@ -5840,7 +5840,7 @@ static void BufferBattlePartyOrder(u8 *partyBattleOrder, u8 flankId)
|
||||
|
||||
void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId)
|
||||
{
|
||||
BufferBattlePartyOrderBySide(gBattleStruct->field_60[battlerId], flankId, battlerId);
|
||||
BufferBattlePartyOrderBySide(gBattleStruct->battlerPartyOrders[battlerId], flankId, battlerId);
|
||||
}
|
||||
|
||||
// when GetBattlerSide(battlerId) == B_SIDE_PLAYER, this function is identical the one above
|
||||
@@ -5920,8 +5920,8 @@ void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 slot2)
|
||||
|
||||
if (IsMultiBattle())
|
||||
{
|
||||
partyBattleOrder = gBattleStruct->field_60[battlerId];
|
||||
for (i = j = 0; i < 3; j++, i++)
|
||||
partyBattleOrder = gBattleStruct->battlerPartyOrders[battlerId];
|
||||
for (i = j = 0; i < PARTY_SIZE / 2; j++, i++)
|
||||
{
|
||||
partyIds[j] = partyBattleOrder[i] >> 4;
|
||||
j++;
|
||||
@@ -6103,7 +6103,7 @@ static void SlideMultiPartyMenuBoxSpritesOneStep(u8 taskId)
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u8 i;
|
||||
|
||||
for (i = 3; i < PARTY_SIZE; i++)
|
||||
for (i = MULTI_PARTY_SIZE; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (gMultiPartnerParty[i - MULTI_PARTY_SIZE].species != SPECIES_NONE)
|
||||
{
|
||||
|
||||
+2
-5
@@ -15,9 +15,6 @@
|
||||
#include "data.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void Task_DoPokeballSendOutAnim(u8 taskId);
|
||||
static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite);
|
||||
static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite);
|
||||
@@ -801,9 +798,9 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite)
|
||||
StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_EMERGE);
|
||||
|
||||
if (GetBattlerSide(sprite->sBattler) == B_SIDE_OPPONENT)
|
||||
gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCb_OpponentMonFromBall;
|
||||
gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCB_OpponentMonFromBall;
|
||||
else
|
||||
gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCb_PlayerMonFromBall;
|
||||
gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCB_PlayerMonFromBall;
|
||||
|
||||
AnimateSprite(&gSprites[gBattlerSpriteIds[sprite->sBattler]]);
|
||||
gSprites[gBattlerSpriteIds[sprite->sBattler]].data[1] = 0x1000;
|
||||
|
||||
@@ -116,8 +116,6 @@ struct PokeblockFeed
|
||||
u8 unused4;
|
||||
};
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
extern const u16 gUnknown_0860F074[];
|
||||
|
||||
static void HandleInitBackgrounds(void);
|
||||
|
||||
@@ -148,8 +148,6 @@ struct SearchMenuItem
|
||||
u8 selectionBgWidth;
|
||||
};
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
struct PokedexListItem
|
||||
{
|
||||
u16 dexNum;
|
||||
|
||||
+6
-9
@@ -38,6 +38,7 @@
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/battle_script_commands.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "constants/item_effects.h"
|
||||
#include "constants/items.h"
|
||||
@@ -3103,7 +3104,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
||||
if (!typeOverride)
|
||||
type = gBattleMoves[move].type;
|
||||
else
|
||||
type = typeOverride & 0x3F;
|
||||
type = typeOverride & DYNAMIC_TYPE_MASK;
|
||||
|
||||
attack = attacker->attack;
|
||||
defense = defender->defense;
|
||||
@@ -5041,7 +5042,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
|
||||
temp2 = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0);
|
||||
BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gActiveBattler = temp2;
|
||||
}
|
||||
@@ -5077,9 +5078,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
SetMonData(mon, MON_DATA_PP1 + temp2, &dataUnsigned);
|
||||
|
||||
// Heal battler PP too (if applicable)
|
||||
if (gMain.inBattle
|
||||
&& battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)
|
||||
&& !(gDisableStructs[battlerId].mimickedMoves & gBitTable[temp2]))
|
||||
if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, temp2))
|
||||
gBattleMons[battlerId].pp[temp2] = dataUnsigned;
|
||||
|
||||
retVal = FALSE;
|
||||
@@ -5105,9 +5104,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned);
|
||||
|
||||
// Heal battler PP too (if applicable)
|
||||
if (gMain.inBattle
|
||||
&& battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)
|
||||
&& !(gDisableStructs[battlerId].mimickedMoves & gBitTable[moveIndex]))
|
||||
if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, moveIndex))
|
||||
gBattleMons[battlerId].pp[moveIndex] = dataUnsigned;
|
||||
|
||||
retVal = FALSE;
|
||||
@@ -6875,7 +6872,7 @@ static bool8 ShouldSkipFriendshipChange(void)
|
||||
#define ALLOC_FAIL_BUFFER (1 << 0)
|
||||
#define ALLOC_FAIL_STRUCT (1 << 1)
|
||||
#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value
|
||||
#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // * 4 is unnecessary, MON_PIC_SIZE is sufficient
|
||||
#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // Only Castform uses more than MON_PIC_SIZE, despite not displaying its forms.
|
||||
#define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed
|
||||
|
||||
static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx)
|
||||
|
||||
@@ -336,7 +336,7 @@ static const struct MatchCallWally sWallyMatchCallHeader =
|
||||
.type = MC_TYPE_WALLY,
|
||||
.mapSec = 0,
|
||||
.flag = FLAG_ENABLE_WALLY_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_WALLY_3,
|
||||
.rematchTableIdx = REMATCH_WALLY_VR,
|
||||
.desc = gText_WallyMatchCallDesc,
|
||||
.textData = sWallyTextScripts,
|
||||
.locationData = sWallyLocationData
|
||||
|
||||
+64
-87
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "battle.h"
|
||||
#include "battle_anim.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "recorded_battle.h"
|
||||
#include "main.h"
|
||||
#include "pokemon.h"
|
||||
@@ -35,12 +36,6 @@ struct PlayerInfo
|
||||
u16 language;
|
||||
};
|
||||
|
||||
struct MovePp
|
||||
{
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 pp[MAX_MON_MOVES];
|
||||
};
|
||||
|
||||
struct RecordedBattleSave
|
||||
{
|
||||
struct Pokemon playerParty[PARTY_SIZE];
|
||||
@@ -65,7 +60,7 @@ struct RecordedBattleSave
|
||||
u8 recordMixFriendName[PLAYER_NAME_LENGTH + 1];
|
||||
u8 recordMixFriendClass;
|
||||
u8 apprenticeId;
|
||||
u16 easyChatSpeech[6];
|
||||
u16 easyChatSpeech[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
u8 recordMixFriendLanguage;
|
||||
u8 apprenticeLanguage;
|
||||
u8 battleRecord[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE];
|
||||
@@ -91,13 +86,13 @@ EWRAM_DATA static u32 sBattleFlags = 0;
|
||||
EWRAM_DATA static u32 sAI_Scripts = 0;
|
||||
EWRAM_DATA static struct Pokemon sSavedPlayerParty[PARTY_SIZE] = {0};
|
||||
EWRAM_DATA static struct Pokemon sSavedOpponentParty[PARTY_SIZE] = {0};
|
||||
EWRAM_DATA static u16 sPlayerMonMoves[2][MAX_MON_MOVES] = {0};
|
||||
EWRAM_DATA static u16 sPlayerMonMoves[MAX_BATTLERS_COUNT / 2][MAX_MON_MOVES] = {0};
|
||||
EWRAM_DATA static struct PlayerInfo sPlayers[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA static bool8 sUnknown_0203CCD0 = 0;
|
||||
EWRAM_DATA static bool8 sIsPlaybackFinished = 0;
|
||||
EWRAM_DATA static u8 sRecordMixFriendName[PLAYER_NAME_LENGTH + 1] = {0};
|
||||
EWRAM_DATA static u8 sRecordMixFriendClass = 0;
|
||||
EWRAM_DATA static u8 sApprenticeId = 0;
|
||||
EWRAM_DATA static u16 sEasyChatSpeech[6] = {0};
|
||||
EWRAM_DATA static u16 sEasyChatSpeech[EASY_CHAT_BATTLE_WORDS_COUNT] = {0};
|
||||
EWRAM_DATA static u8 sBattleOutcome = 0;
|
||||
|
||||
static u8 sRecordMixFriendLanguage;
|
||||
@@ -113,7 +108,7 @@ void RecordedBattle_Init(u8 mode)
|
||||
s32 i, j;
|
||||
|
||||
sRecordMode = mode;
|
||||
sUnknown_0203CCD0 = FALSE;
|
||||
sIsPlaybackFinished = FALSE;
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
@@ -124,16 +119,14 @@ void RecordedBattle_Init(u8 mode)
|
||||
if (mode == B_RECORD_MODE_RECORDING)
|
||||
{
|
||||
for (j = 0; j < BATTLER_RECORD_SIZE; j++)
|
||||
{
|
||||
sBattleRecords[i][j] = 0xFF;
|
||||
}
|
||||
sBattleFlags = gBattleTypeFlags;
|
||||
sAI_Scripts = gBattleResources->ai->aiFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8184E58(void)
|
||||
void RecordedBattle_SetTrainerInfo(void)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
@@ -150,6 +143,7 @@ void sub_8184E58(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
// Link recorded battle, record info for all trainers
|
||||
u8 linkPlayersCount;
|
||||
u8 text[30];
|
||||
|
||||
@@ -163,6 +157,7 @@ void sub_8184E58(void)
|
||||
sPlayers[i].battlerId = gLinkPlayers[i].id;
|
||||
sPlayers[i].language = gLinkPlayers[i].language;
|
||||
|
||||
// Record names
|
||||
if (i < linkPlayersCount)
|
||||
{
|
||||
StringCopy(text, gLinkPlayers[i].name);
|
||||
@@ -178,10 +173,11 @@ void sub_8184E58(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Local battle, just record own info
|
||||
sPlayers[0].trainerId = (gSaveBlock2Ptr->playerTrainerId[0])
|
||||
| (gSaveBlock2Ptr->playerTrainerId[1] << 8)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[2] << 16)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[3] << 24);
|
||||
| (gSaveBlock2Ptr->playerTrainerId[1] << 8)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[2] << 16)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[3] << 24);
|
||||
|
||||
sPlayers[0].gender = gSaveBlock2Ptr->playerGender;
|
||||
sPlayers[0].battlerId = 0;
|
||||
@@ -195,9 +191,7 @@ void sub_8184E58(void)
|
||||
void RecordedBattle_SetBattlerAction(u8 battlerId, u8 action)
|
||||
{
|
||||
if (sBattlerRecordSizes[battlerId] < BATTLER_RECORD_SIZE && sRecordMode != B_RECORD_MODE_PLAYBACK)
|
||||
{
|
||||
sBattleRecords[battlerId][sBattlerRecordSizes[battlerId]++] = action;
|
||||
}
|
||||
}
|
||||
|
||||
void RecordedBattle_ClearBattlerAction(u8 battlerId, u8 bytesToClear)
|
||||
@@ -220,7 +214,7 @@ u8 RecordedBattle_GetBattlerAction(u8 battlerId)
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; // hah
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
return 0xFF;
|
||||
}
|
||||
@@ -249,9 +243,7 @@ u8 RecordedBattle_BufferNewBattlerData(u8 *dst)
|
||||
dst[idx++] = sBattlerRecordSizes[i] - sBattlerPrevRecordSizes[i];
|
||||
|
||||
for (j = 0; j < sBattlerRecordSizes[i] - sBattlerPrevRecordSizes[i]; j++)
|
||||
{
|
||||
dst[idx++] = sBattleRecords[i][sBattlerPrevRecordSizes[i] + j];
|
||||
}
|
||||
|
||||
sBattlerPrevRecordSizes[i] = sBattlerRecordSizes[i];
|
||||
}
|
||||
@@ -283,9 +275,7 @@ void RecordedBattle_RecordAllBattlerData(u8 *src)
|
||||
u8 numActions = GetNextRecordedDataByte(src, &idx, &size);
|
||||
|
||||
for (i = 0; i < numActions; i++)
|
||||
{
|
||||
sBattleRecords[battlerId][sBattlerSavedRecordSizes[battlerId]++] = GetNextRecordedDataByte(src, &idx, &size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,7 +308,7 @@ static bool32 IsRecordedBattleSaveValid(struct RecordedBattleSave *save)
|
||||
|
||||
static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct RecordedBattleSave *saveSection)
|
||||
{
|
||||
memset(saveSection, 0, 0x1000);
|
||||
memset(saveSection, 0, SECTOR_SIZE);
|
||||
memcpy(saveSection, battleSave, sizeof(*battleSave));
|
||||
|
||||
saveSection->checksum = CalcByteArraySum((void*)(saveSection), sizeof(*saveSection) - 4);
|
||||
@@ -338,7 +328,7 @@ bool32 MoveRecordedBattleToSaveData(void)
|
||||
|
||||
saveAttempts = 0;
|
||||
battleSave = AllocZeroed(sizeof(struct RecordedBattleSave));
|
||||
savSection = AllocZeroed(0x1000);
|
||||
savSection = AllocZeroed(SECTOR_SIZE);
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
@@ -349,9 +339,7 @@ bool32 MoveRecordedBattleToSaveData(void)
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
for (j = 0; j < PLAYER_NAME_LENGTH + 1; j++)
|
||||
{
|
||||
battleSave->playersName[i][j] = sPlayers[i].name[j];
|
||||
}
|
||||
battleSave->playersGender[i] = sPlayers[i].gender;
|
||||
battleSave->playersLanguage[i] = sPlayers[i].language;
|
||||
battleSave->playersBattlers[i] = sPlayers[i].battlerId;
|
||||
@@ -471,12 +459,8 @@ bool32 MoveRecordedBattleToSaveData(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
for (j = 0; j < BATTLER_RECORD_SIZE; j++)
|
||||
{
|
||||
battleSave->battleRecord[i][j] = sBattleRecords[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -585,29 +569,21 @@ static void SetVariablesForRecordedBattle(struct RecordedBattleSave *src)
|
||||
sAI_Scripts = src->AI_scripts;
|
||||
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++)
|
||||
{
|
||||
sRecordMixFriendName[i] = src->recordMixFriendName[i];
|
||||
}
|
||||
|
||||
sRecordMixFriendClass = src->recordMixFriendClass;
|
||||
sApprenticeId = src->apprenticeId;
|
||||
sRecordMixFriendLanguage = src->recordMixFriendLanguage;
|
||||
sApprenticeLanguage = src->apprenticeLanguage;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++)
|
||||
sEasyChatSpeech[i] = src->easyChatSpeech[i];
|
||||
}
|
||||
|
||||
gSaveBlock2Ptr->frontier.lvlMode = src->lvlMode;
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
for (j = 0; j < BATTLER_RECORD_SIZE; j++)
|
||||
{
|
||||
sBattleRecords[i][j] = src->battleRecord[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PlayRecordedBattle(void (*CB2_After)(void))
|
||||
@@ -693,9 +669,9 @@ void RecordedBattle_ClearFrontierPassFlag(void)
|
||||
}
|
||||
|
||||
// Set sFrontierPassFlag to received state of FLAG_SYS_FRONTIER_PASS
|
||||
void RecordedBattle_SetFrontierPassFlagFromHword(u16 arg0)
|
||||
void RecordedBattle_SetFrontierPassFlagFromHword(u16 flags)
|
||||
{
|
||||
sFrontierPassFlag |= (arg0 & 0x8000) >> 15;
|
||||
sFrontierPassFlag |= (flags & (1 << 15)) >> 15;
|
||||
}
|
||||
|
||||
u8 RecordedBattle_GetFrontierPassFlag(void)
|
||||
@@ -725,14 +701,14 @@ void RecordedBattle_CopyBattlerMoves(void)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
sPlayerMonMoves[gActiveBattler / 2][i] = gBattleMons[gActiveBattler].moves[i];
|
||||
}
|
||||
}
|
||||
|
||||
// This is a special battle action only used by this function
|
||||
// It shares a value with B_ACTION_SAFARI_POKEBLOCK, which can never occur in a recorded battle.
|
||||
#define ACTION_MOVE_CHANGE 6
|
||||
|
||||
void sub_818603C(u8 arg0)
|
||||
void RecordedBattle_CheckMovesetChanges(u8 mode)
|
||||
{
|
||||
s32 battlerId, j, k;
|
||||
|
||||
@@ -741,17 +717,20 @@ void sub_818603C(u8 arg0)
|
||||
|
||||
for (battlerId = 0; battlerId < gBattlersCount; battlerId++)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) // player's side only
|
||||
// Player's side only
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT)
|
||||
{
|
||||
if (arg0 == 1)
|
||||
if (mode == B_RECORD_MODE_RECORDING)
|
||||
{
|
||||
// Check if any of the battler's moves have changed.
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
if (gBattleMons[battlerId].moves[j] != sPlayerMonMoves[battlerId / 2][j])
|
||||
break;
|
||||
}
|
||||
if (j != MAX_MON_MOVES) // player's mon's move has been changed
|
||||
if (j != MAX_MON_MOVES)
|
||||
{
|
||||
// At least one of the moves has been changed
|
||||
RecordedBattle_SetBattlerAction(battlerId, ACTION_MOVE_CHANGE);
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
@@ -766,68 +745,66 @@ void sub_818603C(u8 arg0)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else // B_RECORD_MODE_PLAYBACK
|
||||
{
|
||||
if (sBattleRecords[battlerId][sBattlerRecordSizes[battlerId]] == ACTION_MOVE_CHANGE)
|
||||
{
|
||||
u8 ppBonuses[MAX_MON_MOVES];
|
||||
u8 array1[MAX_MON_MOVES];
|
||||
u8 array2[MAX_MON_MOVES];
|
||||
struct MovePp movePp;
|
||||
u8 array3[(MAX_MON_MOVES * 2)];
|
||||
u8 var;
|
||||
u8 moveSlots[MAX_MON_MOVES];
|
||||
u8 mimickedMoveSlots[MAX_MON_MOVES];
|
||||
struct ChooseMoveStruct movePp;
|
||||
u8 ppBonusSet;
|
||||
|
||||
// We know the current action is ACTION_MOVE_CHANGE, retrieve
|
||||
// it without saving it to move on to the next action.
|
||||
RecordedBattle_GetBattlerAction(battlerId);
|
||||
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & (3 << (j << 1))) >> (j << 1));
|
||||
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & ((3 << (j << 1)))) >> (j << 1));
|
||||
}
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
array1[j] = RecordedBattle_GetBattlerAction(battlerId);
|
||||
movePp.moves[j] = gBattleMons[battlerId].moves[array1[j]];
|
||||
movePp.pp[j] = gBattleMons[battlerId].pp[array1[j]];
|
||||
array3[j] = ppBonuses[array1[j]];
|
||||
array2[j] = (gDisableStructs[battlerId].mimickedMoves & gBitTable[j]) >> j;
|
||||
moveSlots[j] = RecordedBattle_GetBattlerAction(battlerId);
|
||||
movePp.moves[j] = gBattleMons[battlerId].moves[moveSlots[j]];
|
||||
movePp.currentPp[j] = gBattleMons[battlerId].pp[moveSlots[j]];
|
||||
movePp.maxPp[j] = ppBonuses[moveSlots[j]];
|
||||
mimickedMoveSlots[j] = (gDisableStructs[battlerId].mimickedMoves & gBitTable[j]) >> j;
|
||||
}
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
gBattleMons[battlerId].moves[j] = movePp.moves[j];
|
||||
gBattleMons[battlerId].pp[j] = movePp.pp[j];
|
||||
gBattleMons[battlerId].pp[j] = movePp.currentPp[j];
|
||||
}
|
||||
gBattleMons[battlerId].ppBonuses = 0;
|
||||
gDisableStructs[battlerId].mimickedMoves = 0;
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
gBattleMons[battlerId].ppBonuses |= (array3[j]) << (j << 1);
|
||||
gDisableStructs[battlerId].mimickedMoves |= (array2[j]) << (j);
|
||||
gBattleMons[battlerId].ppBonuses |= movePp.maxPp[j] << (j << 1);
|
||||
gDisableStructs[battlerId].mimickedMoves |= mimickedMoveSlots[j] << j;
|
||||
}
|
||||
|
||||
if (!(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED))
|
||||
{
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
ppBonuses[j] = ((GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1));
|
||||
}
|
||||
ppBonuses[j] = (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1);
|
||||
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + array1[j], NULL);
|
||||
movePp.pp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + array1[j], NULL);
|
||||
array3[j] = ppBonuses[array1[j]];
|
||||
movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + moveSlots[j], NULL);
|
||||
movePp.currentPp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + moveSlots[j], NULL);
|
||||
movePp.maxPp[j] = ppBonuses[moveSlots[j]];
|
||||
}
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + j, &movePp.moves[j]);
|
||||
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + j, &movePp.pp[j]);
|
||||
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + j, &movePp.currentPp[j]);
|
||||
}
|
||||
var = 0;
|
||||
ppBonusSet = 0;
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
var |= (array3[j]) << (j << 1);
|
||||
}
|
||||
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, &var);
|
||||
}
|
||||
ppBonusSet |= movePp.maxPp[j] << (j << 1);
|
||||
|
||||
SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, &ppBonusSet);
|
||||
}
|
||||
gChosenMoveByBattler[battlerId] = gBattleMons[battlerId].moves[*(gBattleStruct->chosenMovePositions + battlerId)];
|
||||
}
|
||||
}
|
||||
@@ -840,24 +817,24 @@ u32 GetAiScriptsInRecordedBattle(void)
|
||||
return sAI_Scripts;
|
||||
}
|
||||
|
||||
void sub_8186444(void)
|
||||
// Used to determine when the player is allowed to press B to end a recorded battle's playback
|
||||
void RecordedBattle_SetPlaybackFinished(void)
|
||||
{
|
||||
sUnknown_0203CCD0 = TRUE;
|
||||
sIsPlaybackFinished = TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8186450(void)
|
||||
bool8 RecordedBattle_CanStopPlayback(void)
|
||||
{
|
||||
return (sUnknown_0203CCD0 == FALSE);
|
||||
return (sIsPlaybackFinished == FALSE);
|
||||
}
|
||||
|
||||
void GetRecordedBattleRecordMixFriendName(u8 *dst)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++)
|
||||
dst[i] = sRecordMixFriendName[i];
|
||||
|
||||
dst[7] = EOS;
|
||||
dst[PLAYER_NAME_LENGTH] = EOS;
|
||||
ConvertInternationalString(dst, sRecordMixFriendLanguage);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,24 +14,17 @@ struct Fanfare
|
||||
u16 duration;
|
||||
};
|
||||
|
||||
// ewram
|
||||
EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL;
|
||||
EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0;
|
||||
|
||||
// iwram bss
|
||||
static u16 sCurrentMapMusic;
|
||||
static u16 sNextMapMusic;
|
||||
static u8 sMapMusicState;
|
||||
static u8 sMapMusicFadeInSpeed;
|
||||
static u16 sFanfareCounter;
|
||||
|
||||
// iwram common
|
||||
bool8 gDisableMusic;
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE1;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE2;
|
||||
extern struct MusicPlayerInfo gMPlayInfo_SE3;
|
||||
extern struct ToneData gCryTable[];
|
||||
extern struct ToneData gCryTable2[];
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
#define BERRY_UPDATE_BUTTON_COMBO (B_BUTTON | SELECT_BUTTON)
|
||||
#define A_B_START_SELECT (A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON)
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void MainCB2(void);
|
||||
static void Task_TitleScreenPhase1(u8);
|
||||
static void Task_TitleScreenPhase2(u8);
|
||||
|
||||
Reference in New Issue
Block a user