battle_gfx_sfx_util.c: Very annoying fakematch fix.
daycare.c: -g eliminates the need for the brace hack. battle_transition.c: Fix Phase2_Ripple_Func2...?
This commit is contained in:
parent
1404cf3330
commit
847878eae9
16 changed files with 57 additions and 61 deletions
|
@ -584,7 +584,11 @@ struct BattleSpriteData
|
|||
struct MonSpritesGfx
|
||||
{
|
||||
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
|
||||
void* sprites[4];
|
||||
union
|
||||
{
|
||||
void* ptr[4];
|
||||
u8* byte[4];
|
||||
} sprites;
|
||||
struct SpriteTemplate templates[4];
|
||||
struct SpriteFrameImage field_74[4][4];
|
||||
u8 field_F4[0x80];
|
||||
|
|
|
@ -2291,7 +2291,7 @@ void AnimTask_TransformMon(u8 taskId)
|
|||
else
|
||||
position = GetBattlerPosition(gBattleAnimAttacker);
|
||||
|
||||
src = gMonSpritesGfxPtr->sprites[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
||||
src = gMonSpritesGfxPtr->sprites.ptr[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
||||
dest = animBg.bgTiles;
|
||||
CpuCopy32(src, dest, 0x800);
|
||||
LoadBgTiles(1, animBg.bgTiles, 0x800, animBg.tilesOffset);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "constants/battle_anim.h"
|
||||
#include "battle_interface.h"
|
||||
#include "main.h"
|
||||
#include "dma3.h"
|
||||
#include "malloc.h"
|
||||
#include "graphics.h"
|
||||
#include "random.h"
|
||||
|
@ -568,7 +569,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
|||
otId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
position = GetBattlerPosition(battlerId);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
species, currentPersonality);
|
||||
|
||||
paletteOffset = 0x100 + battlerId * 16;
|
||||
|
@ -624,13 +625,13 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
|||
if (sub_80688F8(1, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != SPECIES_NONE)
|
||||
{
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
species, currentPersonality);
|
||||
}
|
||||
else
|
||||
{
|
||||
HandleLoadSpecialPokePic(&gMonBackPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
species, currentPersonality);
|
||||
}
|
||||
|
||||
|
@ -672,7 +673,7 @@ void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId)
|
|||
{
|
||||
u8 position = GetBattlerPosition(battlerId);
|
||||
DecompressPicFromTable_2(&gTrainerFrontPicTable[frontPicId],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
SPECIES_NONE);
|
||||
LoadCompressedSpritePalette(&gTrainerFrontPicPaletteTable[frontPicId]);
|
||||
}
|
||||
|
@ -681,7 +682,7 @@ void DecompressTrainerBackPic(u16 backPicId, u8 battlerId)
|
|||
{
|
||||
u8 position = GetBattlerPosition(battlerId);
|
||||
DecompressPicFromTable_2(&gTrainerBackPicTable[backPicId],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
SPECIES_NONE);
|
||||
LoadCompressedPalette(gTrainerBackPicPaletteTable[backPicId].data,
|
||||
0x100 + 16 * battlerId, 0x20);
|
||||
|
@ -921,7 +922,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
|||
otId = gContestResources->moveAnim->otId;
|
||||
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[targetSpecies],
|
||||
gMonSpritesGfxPtr->sprites[0],
|
||||
gMonSpritesGfxPtr->sprites.ptr[0],
|
||||
targetSpecies,
|
||||
gContestResources->moveAnim->targetPersonality);
|
||||
}
|
||||
|
@ -940,7 +941,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
|||
otId = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID);
|
||||
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[targetSpecies],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
targetSpecies,
|
||||
gTransformedPersonalities[battlerAtk]);
|
||||
}
|
||||
|
@ -950,13 +951,13 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
|||
otId = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_OT_ID);
|
||||
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[targetSpecies],
|
||||
gMonSpritesGfxPtr->sprites[position],
|
||||
gMonSpritesGfxPtr->sprites.ptr[position],
|
||||
targetSpecies,
|
||||
gTransformedPersonalities[battlerAtk]);
|
||||
}
|
||||
}
|
||||
|
||||
src = gMonSpritesGfxPtr->sprites[position];
|
||||
src = gMonSpritesGfxPtr->sprites.ptr[position];
|
||||
dst = (void *)(OBJ_VRAM0 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
|
||||
DmaCopy32(3, src, dst, 0x800);
|
||||
paletteOffset = 0x100 + battlerAtk * 16;
|
||||
|
@ -997,18 +998,15 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
|||
position = GetBattlerPosition(battlerId);
|
||||
|
||||
if (IsContest())
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites[position]);
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
LZDecompressVram(gSubstituteDollGfx, gMonSpritesGfxPtr->sprites[position]);
|
||||
LZDecompressVram(gSubstituteDollGfx, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
else
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites[position]);
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites.ptr[position]);
|
||||
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
u8 (*ptr)[4][0x800] = gMonSpritesGfxPtr->sprites[position];
|
||||
ptr++;ptr--; // Needed to match.
|
||||
|
||||
DmaCopy32Defvars(3, (*ptr)[0], (*ptr)[i], 0x800);
|
||||
Dma3CopyLarge32_(gMonSpritesGfxPtr->sprites.ptr[position], &gMonSpritesGfxPtr->sprites.byte[position][0x800 * i], 0x800);
|
||||
}
|
||||
|
||||
palOffset = (battlerId * 16) + 0x100;
|
||||
|
@ -1245,12 +1243,12 @@ void AllocateMonSpritesGfx(void)
|
|||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
gMonSpritesGfxPtr->sprites[i] = gMonSpritesGfxPtr->firstDecompressed + (i * 0x2000);
|
||||
gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * 0x2000);
|
||||
*(gMonSpritesGfxPtr->templates + i) = gUnknown_08329D98[i];
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
gMonSpritesGfxPtr->field_74[i][j].data = gMonSpritesGfxPtr->sprites[i] + (j * 0x800);
|
||||
gMonSpritesGfxPtr->field_74[i][j].data = gMonSpritesGfxPtr->sprites.ptr[i] + (j * 0x800);
|
||||
gMonSpritesGfxPtr->field_74[i][j].size = 0x800;
|
||||
}
|
||||
|
||||
|
@ -1272,10 +1270,10 @@ void FreeMonSpritesGfx(void)
|
|||
|
||||
FREE_AND_SET_NULL(gMonSpritesGfxPtr->barFontGfx);
|
||||
FREE_AND_SET_NULL(gMonSpritesGfxPtr->firstDecompressed);
|
||||
gMonSpritesGfxPtr->sprites[0] = NULL;
|
||||
gMonSpritesGfxPtr->sprites[1] = NULL;
|
||||
gMonSpritesGfxPtr->sprites[2] = NULL;
|
||||
gMonSpritesGfxPtr->sprites[3] = NULL;
|
||||
gMonSpritesGfxPtr->sprites.ptr[0] = NULL;
|
||||
gMonSpritesGfxPtr->sprites.ptr[1] = NULL;
|
||||
gMonSpritesGfxPtr->sprites.ptr[2] = NULL;
|
||||
gMonSpritesGfxPtr->sprites.ptr[3] = NULL;
|
||||
FREE_AND_SET_NULL(gMonSpritesGfxPtr);
|
||||
}
|
||||
|
||||
|
|
|
@ -586,7 +586,7 @@ void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *ar
|
|||
int i, j;
|
||||
u8 battler = GetBattlerAtPosition(battlerPosition);
|
||||
int offset = tilesOffset;
|
||||
CpuCopy16(gMonSpritesGfxPtr->sprites[battlerPosition] + BG_SCREEN_SIZE * gBattleMonForms[battler], arg5, BG_SCREEN_SIZE);
|
||||
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++)
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u
|
|||
{
|
||||
int i, j, offset;
|
||||
|
||||
DmaCopy16(3, gMonSpritesGfxPtr->sprites[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE);
|
||||
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++)
|
||||
{
|
||||
|
|
|
@ -2762,7 +2762,7 @@ static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite)
|
|||
}
|
||||
else // Erase bottom part of the sprite to create a smooth illusion of mon falling down.
|
||||
{
|
||||
u8 *dst = (u8 *)gMonSpritesGfxPtr->sprites[GetBattlerPosition(sprite->sBattler)] + (gBattleMonForms[sprite->sBattler] << 11) + (sprite->data[3] << 8);
|
||||
u8* dst = gMonSpritesGfxPtr->sprites.byte[GetBattlerPosition(sprite->sBattler)] + (gBattleMonForms[sprite->sBattler] << 11) + (sprite->data[3] << 8);
|
||||
|
||||
for (i = 0; i < 0x100; i++)
|
||||
*(dst++) = 0;
|
||||
|
|
|
@ -1956,10 +1956,7 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
|
|||
for (i = 0; i < 160; i++, r4 += r8)
|
||||
{
|
||||
s16 var = r4 >> 8;
|
||||
|
||||
var++;
|
||||
var--;
|
||||
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3);
|
||||
gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var & 0xffff, r3);
|
||||
}
|
||||
|
||||
if (++task->tData3 == 81)
|
||||
|
|
|
@ -3119,9 +3119,9 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind
|
|||
species = SanitizeSpecies(species);
|
||||
|
||||
if (index == gContestPlayerMonIndex)
|
||||
HandleLoadSpecialPokePic_2(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites[0], species, personality);
|
||||
HandleLoadSpecialPokePic_2(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[0], species, personality);
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites[0], species, personality);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[0], species, personality);
|
||||
|
||||
LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, 0);
|
||||
|
|
|
@ -368,19 +368,19 @@ static void InitContestMonPixels(u16 species, u8 whichSprite)
|
|||
{
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(
|
||||
&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[1],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
species,
|
||||
gContestPaintingWinner->personality);
|
||||
_InitContestMonPixels(gMonSpritesGfxPtr->sprites[1], gContestPaintingMonPalette, (void *)gContestMonPixels);
|
||||
_InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[1], gContestPaintingMonPalette, (void *)gContestMonPixels);
|
||||
}
|
||||
else
|
||||
{
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(
|
||||
&gMonBackPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[0],
|
||||
gMonSpritesGfxPtr->sprites.ptr[0],
|
||||
species,
|
||||
gContestPaintingWinner->personality);
|
||||
_InitContestMonPixels(gMonSpritesGfxPtr->sprites[0], gContestPaintingMonPalette, (void *)gContestMonPixels);
|
||||
_InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[0], gContestPaintingMonPalette, (void *)gContestMonPixels);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -880,7 +880,7 @@ static void Task_ShowWinnerMonBanner(u8 taskId)
|
|||
{
|
||||
HandleLoadSpecialPokePic_2(
|
||||
&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[1],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
species,
|
||||
personality);
|
||||
}
|
||||
|
@ -888,7 +888,7 @@ static void Task_ShowWinnerMonBanner(u8 taskId)
|
|||
{
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(
|
||||
&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[1],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
species,
|
||||
personality);
|
||||
}
|
||||
|
@ -2552,9 +2552,9 @@ void ShowContestEntryMonPic(void)
|
|||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = species;
|
||||
if (gSpecialVar_0x8006 == gContestPlayerMonIndex)
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality);
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality);
|
||||
|
||||
palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
|
||||
LoadCompressedSpritePalette(palette);
|
||||
|
|
|
@ -615,10 +615,7 @@ static u8 GetEggMoves(struct Pokemon *pokemon, u16 *eggMoves)
|
|||
for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++)
|
||||
{
|
||||
if (gEggMoves[eggMoveIdx + i] > EGG_MOVES_SPECIES_OFFSET)
|
||||
{
|
||||
// TODO: the curly braces around this if statement are required for a matching build.
|
||||
break;
|
||||
}
|
||||
|
||||
eggMoves[i] = gEggMoves[eggMoveIdx + i];
|
||||
numEggMoves++;
|
||||
|
|
|
@ -434,7 +434,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc
|
|||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 pid = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species],
|
||||
gMonSpritesGfxPtr->sprites[(a0 * 2) + 1],
|
||||
gMonSpritesGfxPtr->sprites.ptr [(a0 * 2) + 1],
|
||||
species, pid);
|
||||
LoadCompressedSpritePalette(GetMonSpritePalStruct(mon));
|
||||
*speciesLoc = species;
|
||||
|
|
|
@ -256,7 +256,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[currSpecies],
|
||||
gMonSpritesGfxPtr->sprites[1],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
currSpecies);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x110, 0x20);
|
||||
|
@ -271,7 +271,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||
|
||||
// postEvo sprite
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
|
||||
gMonSpritesGfxPtr->sprites[3],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
speciesToEvolve);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
|
@ -348,7 +348,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||
gReservedSpritePaletteCount = 4;
|
||||
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites[3],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
|
||||
|
@ -420,7 +420,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||
u32 trainerId = GetMonData(Mon, MON_DATA_OT_ID);
|
||||
u32 personality = GetMonData(Mon, MON_DATA_PERSONALITY);
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies],
|
||||
gMonSpritesGfxPtr->sprites[3],
|
||||
gMonSpritesGfxPtr->sprites.ptr[3],
|
||||
postEvoSpecies);
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality);
|
||||
LoadCompressedPalette(pokePal->data, 0x120, 0x20);
|
||||
|
@ -484,7 +484,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
|
|||
sEvoStructPtr->preEvoSpriteID = preEvoSpriteID;
|
||||
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[speciesToEvolve],
|
||||
gMonSpritesGfxPtr->sprites[1],
|
||||
gMonSpritesGfxPtr->sprites.ptr[1],
|
||||
speciesToEvolve);
|
||||
|
||||
pokePal = GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, trainerId, personality);
|
||||
|
|
|
@ -646,7 +646,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon)
|
|||
case 0:
|
||||
species = GetMonData(mon, MON_DATA_SPECIES2);
|
||||
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality);
|
||||
sPokeblockFeed->loadGfxState++;
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -5591,8 +5591,8 @@ u16 SpeciesToCryId(u16 species)
|
|||
void sub_806D544(u16 species, u32 personality, u8 *dest)
|
||||
{
|
||||
if (species == SPECIES_SPINDA
|
||||
&& dest != gMonSpritesGfxPtr->sprites[0]
|
||||
&& dest != gMonSpritesGfxPtr->sprites[2])
|
||||
&& dest != gMonSpritesGfxPtr->sprites.ptr[0]
|
||||
&& dest != gMonSpritesGfxPtr->sprites.ptr[2])
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
|
|
|
@ -3859,18 +3859,18 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state)
|
|||
if (gMain.inBattle)
|
||||
{
|
||||
if (sub_80688F8(3, sMonSummaryScreen->curMonIndex))
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites[1], summary->species2, summary->pid);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid);
|
||||
else
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites[1], summary->species2, summary->pid);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMonSpritesGfxPtr != NULL)
|
||||
{
|
||||
if (sMonSummaryScreen->monList.mons == gPlayerParty || sMonSummaryScreen->mode == PSS_MODE_BOX || sMonSummaryScreen->unk40EF == TRUE)
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites[1], summary->species2, summary->pid);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid);
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites[1], summary->species2, summary->pid);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2725,9 +2725,9 @@ static void LoadTradeMonPic(u8 whichParty, u8 state)
|
|||
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
|
||||
if (whichParty == TRADE_PLAYER)
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[1], species, personality);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality);
|
||||
else
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites[whichParty * 2 + 1], species, personality);
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + 1], species, personality);
|
||||
|
||||
LoadCompressedSpritePalette(GetMonSpritePalStruct(mon));
|
||||
sTradeData->monSpecies[whichParty] = species;
|
||||
|
@ -3660,7 +3660,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
|||
case 65:
|
||||
if (gSprites[sTradeData->unk_D3].callback == SpriteCallbackDummy)
|
||||
{
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites[3], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[3], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]);
|
||||
sTradeData->state++;
|
||||
}
|
||||
break;
|
||||
|
@ -4175,7 +4175,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
|||
case 65:
|
||||
if (gSprites[sTradeData->unk_D3].callback == SpriteCallbackDummy)
|
||||
{
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites[3], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]);
|
||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[3], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]);
|
||||
sTradeData->state++;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue