Skip to content

Commit

Permalink
unify monSpritesGfx sprites/ptr and fix various compiler errors on o3…
Browse files Browse the repository at this point in the history
…/os/og (#4252)
  • Loading branch information
DizzyEggg authored Mar 6, 2024
1 parent 3b45fda commit a36cfb1
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 66 deletions.
7 changes: 1 addition & 6 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -973,15 +973,10 @@ struct BattleSpriteData
struct MonSpritesGfx
{
void *firstDecompressed; // ptr to the decompressed sprite of the first Pokémon
union {
void *ptr[MAX_BATTLERS_COUNT];
u8 *byte[MAX_BATTLERS_COUNT];
} sprites;
u8 *spritesGfx[MAX_BATTLERS_COUNT];
struct SpriteTemplate templates[MAX_BATTLERS_COUNT];
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][MAX_MON_PIC_FRAMES];
u8 unusedArr[0x80];
u8 *barFontGfx;
void *unusedPtr;
u16 *buffer;
};

Expand Down
2 changes: 1 addition & 1 deletion src/battle_anim_effects_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,7 @@ void AnimTask_TransformMon(u8 taskId)
else
position = GetBattlerPosition(gBattleAnimAttacker);

src = gMonSpritesGfxPtr->sprites.ptr[position];
src = gMonSpritesGfxPtr->spritesGfx[position];
dest = animBg.bgTiles;
CpuCopy32(src, dest, MON_PIC_SIZE);
LoadBgTiles(1, animBg.bgTiles, 0x800, animBg.tilesOffset);
Expand Down
2 changes: 1 addition & 1 deletion src/battle_dynamax.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void BS_SetMaxMoveEffect(void)
case MAX_EFFECT_SANDSTORM:
case MAX_EFFECT_HAIL:
{
u8 weather, msg;
u8 weather = 0, msg = 0;
switch (maxEffect)
{
case MAX_EFFECT_SUN:
Expand Down
44 changes: 21 additions & 23 deletions src/battle_gfx_sfx_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,13 +606,13 @@ void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battler)
if (GetBattlerSide(battler) == B_SIDE_OPPONENT)
{
HandleLoadSpecialPokePic(TRUE,
gMonSpritesGfxPtr->sprites.ptr[position],
gMonSpritesGfxPtr->spritesGfx[position],
species, currentPersonality);
}
else
{
HandleLoadSpecialPokePic(FALSE,
gMonSpritesGfxPtr->sprites.ptr[position],
gMonSpritesGfxPtr->spritesGfx[position],
species, currentPersonality);
}

Expand Down Expand Up @@ -654,15 +654,15 @@ void DecompressTrainerFrontPic(u16 frontPicId, u8 battler)
{
u8 position = GetBattlerPosition(battler);
DecompressPicFromTable(&gTrainerSprites[frontPicId].frontPic,
gMonSpritesGfxPtr->sprites.ptr[position]);
gMonSpritesGfxPtr->spritesGfx[position]);
LoadCompressedSpritePalette(&gTrainerSprites[frontPicId].palette);
}

void DecompressTrainerBackPic(u16 backPicId, u8 battler)
{
u8 position = GetBattlerPosition(battler);
DecompressPicFromTable(&gTrainerBacksprites[backPicId].backPic,
gMonSpritesGfxPtr->sprites.ptr[position]);
gMonSpritesGfxPtr->spritesGfx[position]);
LoadCompressedPalette(gTrainerBacksprites[backPicId].palette.data,
OBJ_PLTT_ID(battler), PLTT_SIZE_4BPP);
}
Expand Down Expand Up @@ -883,7 +883,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool32 megaEvo, bo
isShiny = gContestResources->moveAnim->isShiny;

HandleLoadSpecialPokePic(FALSE,
gMonSpritesGfxPtr->sprites.ptr[position],
gMonSpritesGfxPtr->spritesGfx[position],
targetSpecies,
gContestResources->moveAnim->targetPersonality);
}
Expand All @@ -910,7 +910,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool32 megaEvo, bo
}

HandleLoadSpecialPokePic(FALSE,
gMonSpritesGfxPtr->sprites.ptr[position],
gMonSpritesGfxPtr->spritesGfx[position],
targetSpecies,
gTransformedPersonalities[battlerAtk]);
}
Expand All @@ -928,12 +928,12 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool32 megaEvo, bo
}

HandleLoadSpecialPokePic(TRUE,
gMonSpritesGfxPtr->sprites.ptr[position],
gMonSpritesGfxPtr->spritesGfx[position],
targetSpecies,
gTransformedPersonalities[battlerAtk]);
}
}
src = gMonSpritesGfxPtr->sprites.ptr[position];
src = gMonSpritesGfxPtr->spritesGfx[position];
dst = (void *)(OBJ_VRAM0 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
DmaCopy32(3, src, dst, MON_PIC_SIZE);
paletteOffset = OBJ_PLTT_ID(battlerAtk);
Expand Down Expand Up @@ -961,22 +961,21 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battler, bool8 loadMonSprite)

if (!loadMonSprite)
{

if (IsContest())
position = B_POSITION_PLAYER_LEFT;
else
position = GetBattlerPosition(battler);

if (IsContest())
LZDecompressVram(gBattleAnimSpriteGfx_SubstituteBack, gMonSpritesGfxPtr->sprites.ptr[position]);
LZDecompressVram(gBattleAnimSpriteGfx_SubstituteBack, gMonSpritesGfxPtr->spritesGfx[position]);
else if (GetBattlerSide(battler) != B_SIDE_PLAYER)
LZDecompressVram(gBattleAnimSpriteGfx_Substitute, gMonSpritesGfxPtr->sprites.ptr[position]);
LZDecompressVram(gBattleAnimSpriteGfx_Substitute, gMonSpritesGfxPtr->spritesGfx[position]);
else
LZDecompressVram(gBattleAnimSpriteGfx_SubstituteBack, gMonSpritesGfxPtr->sprites.ptr[position]);
LZDecompressVram(gBattleAnimSpriteGfx_SubstituteBack, gMonSpritesGfxPtr->spritesGfx[position]);

for (i = 1; i < 4; i++)
{
Dma3CopyLarge32_(gMonSpritesGfxPtr->sprites.ptr[position], &gMonSpritesGfxPtr->sprites.byte[position][MON_PIC_SIZE * i], MON_PIC_SIZE);
Dma3CopyLarge32_(gMonSpritesGfxPtr->spritesGfx[position], &gMonSpritesGfxPtr->spritesGfx[position][MON_PIC_SIZE * i], MON_PIC_SIZE);
}

palOffset = OBJ_PLTT_ID(battler);
Expand Down Expand Up @@ -1217,14 +1216,14 @@ void AllocateMonSpritesGfx(void)

for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * MON_PIC_SIZE * 4);
*(gMonSpritesGfxPtr->templates + i) = gBattlerSpriteTemplates[i];
gMonSpritesGfxPtr->spritesGfx[i] = gMonSpritesGfxPtr->firstDecompressed + (i * MON_PIC_SIZE * 4);
gMonSpritesGfxPtr->templates[i] = gBattlerSpriteTemplates[i];

for (j = 0; j < 4; j++)
for (j = 0; j < MAX_MON_PIC_FRAMES; j++)
{
if (gMonSpritesGfxPtr->sprites.ptr[i])
if (gMonSpritesGfxPtr->spritesGfx[i])
{
gMonSpritesGfxPtr->frameImages[i][j].data = gMonSpritesGfxPtr->sprites.ptr[i] + (j * MON_PIC_SIZE);
gMonSpritesGfxPtr->frameImages[i][j].data = gMonSpritesGfxPtr->spritesGfx[i] + (j * MON_PIC_SIZE);
gMonSpritesGfxPtr->frameImages[i][j].size = MON_PIC_SIZE;
}
}
Expand All @@ -1241,13 +1240,12 @@ void FreeMonSpritesGfx(void)
return;

TRY_FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer);
TRY_FREE_AND_SET_NULL(gMonSpritesGfxPtr->unusedPtr);
FREE_AND_SET_NULL(gMonSpritesGfxPtr->barFontGfx);
FREE_AND_SET_NULL(gMonSpritesGfxPtr->firstDecompressed);
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT] = NULL;
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT] = NULL;
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT] = NULL;
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT] = NULL;
gMonSpritesGfxPtr->spritesGfx[B_POSITION_PLAYER_LEFT] = NULL;
gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT] = NULL;
gMonSpritesGfxPtr->spritesGfx[B_POSITION_PLAYER_RIGHT] = NULL;
gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_RIGHT] = NULL;
FREE_AND_SET_NULL(gMonSpritesGfxPtr);
}

Expand Down
4 changes: 2 additions & 2 deletions src/battle_intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ void DrawBattlerOnBg(int bgId, u8 x, u8 y, u8 battlerPosition, u8 paletteId, u8
{
int i, j;
int offset = tilesOffset;
CpuCopy16(gMonSpritesGfxPtr->sprites.ptr[battlerPosition], tiles, BG_SCREEN_SIZE);
CpuCopy16(gMonSpritesGfxPtr->spritesGfx[battlerPosition], tiles, BG_SCREEN_SIZE);
LoadBgTiles(bgId, tiles, 0x1000, tilesOffset);
for (i = y; i < y + 8; i++)
{
Expand All @@ -603,7 +603,7 @@ static void UNUSED DrawBattlerOnBgDMA(u8 x, u8 y, u8 battlerPosition, u8 arg3, u
{
int i, j, offset;

DmaCopy16(3, gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE);
DmaCopy16(3, gMonSpritesGfxPtr->spritesGfx[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE);
offset = (arg5 >> 5) - (arg7 << 9);
for (i = y; i < y + 8; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2739,7 +2739,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 = gMonSpritesGfxPtr->sprites.byte[GetBattlerPosition(sprite->sBattler)] + (sprite->data[3] << 8);
u8 *dst = &gMonSpritesGfxPtr->spritesGfx[GetBattlerPosition(sprite->sBattler)][(sprite->data[3] << 8)];

for (i = 0; i < 0x100; i++)
*(dst++) = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -4123,7 +4123,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
}
break;
}

if (effect == 1)
BattleScriptPushCursorAndCallback(BattleScript_OverworldStatusStarts);
else if (effect == 2)
Expand Down Expand Up @@ -4989,7 +4989,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
case ABILITYEFFECT_ABSORBING: // 3
if (move != MOVE_NONE)
{
u8 statId;
u8 statId = 0;
u8 statAmount = 1;
switch (gLastUsedAbility)
{
Expand Down
2 changes: 1 addition & 1 deletion src/contest.c
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,7 @@ static u8 CreateContestantSprite(u16 species, bool8 isShiny, u32 personality, u3
u8 spriteId;
species = SanitizeSpecies(species);

HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality);
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->spritesGfx[B_POSITION_PLAYER_LEFT], species, personality);

LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, isShiny, personality), OBJ_PLTT_ID(2), PLTT_SIZE_4BPP);
SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_PLAYER_LEFT);
Expand Down
8 changes: 4 additions & 4 deletions src/contest_painting.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,18 @@ static void InitContestMonPixels(u16 species, bool8 backPic)
if (!backPic)
{
HandleLoadSpecialPokePic(TRUE,
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT],
species,
gContestPaintingWinner->personality);
_InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels);
_InitContestMonPixels(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels);
}
else
{
HandleLoadSpecialPokePic(FALSE,
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT],
gMonSpritesGfxPtr->spritesGfx[B_POSITION_PLAYER_LEFT],
species,
gContestPaintingWinner->personality);
_InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels);
_InitContestMonPixels(gMonSpritesGfxPtr->spritesGfx[B_POSITION_PLAYER_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/contest_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ static void Task_ShowWinnerMonBanner(u8 taskId)
personality = gContestMons[i].personality;
isShiny = gContestMons[i].isShiny;
HandleLoadSpecialPokePic(TRUE,
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT],
species,
personality);

Expand Down Expand Up @@ -2570,7 +2570,7 @@ void ShowContestEntryMonPic(void)
taskId = CreateTask(Task_ShowContestEntryMonPic, 0x50);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = species;
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality);
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT], species, personality);

LoadCompressedSpritePaletteWithTag(GetMonSpritePalFromSpeciesAndPersonality(species, isShiny, personality), species);
SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_OPPONENT_LEFT);
Expand Down
2 changes: 1 addition & 1 deletion src/egg_hatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16 *speciesL
{
u32 pid = GetMonData(mon, MON_DATA_PERSONALITY);
HandleLoadSpecialPokePic(TRUE,
gMonSpritesGfxPtr->sprites.ptr[(useAlt * 2) + B_POSITION_OPPONENT_LEFT],
gMonSpritesGfxPtr->spritesGfx[(useAlt * 2) + B_POSITION_OPPONENT_LEFT],
species, pid);
LoadCompressedSpritePaletteWithTag(GetMonFrontSpritePal(mon), species);
*speciesLoc = species;
Expand Down
10 changes: 5 additions & 5 deletions src/evolution_scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
currSpecies = GetMonData(mon, MON_DATA_SPECIES);
isShiny = GetMonData(mon, MON_DATA_IS_SHINY);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
LoadSpecialPokePic(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
LoadSpecialPokePic(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT],
currSpecies,
personality,
TRUE);
Expand All @@ -273,7 +273,7 @@ void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u
gSprites[id].invisible = TRUE;

// postEvo sprite
LoadSpecialPokePic(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT],
LoadSpecialPokePic(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_RIGHT],
postEvoSpecies,
personality,
TRUE);
Expand Down Expand Up @@ -350,7 +350,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 4;

LoadSpecialPokePic(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT],
LoadSpecialPokePic(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_RIGHT],
postEvoSpecies,
personality,
TRUE);
Expand Down Expand Up @@ -420,7 +420,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
{
bool8 isShiny = GetMonData(mon, MON_DATA_IS_SHINY);
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY);
LoadSpecialPokePic(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT],
LoadSpecialPokePic(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_RIGHT],
postEvoSpecies,
personality,
TRUE);
Expand Down Expand Up @@ -484,7 +484,7 @@ void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSprit
sEvoStructPtr = AllocZeroed(sizeof(struct EvoInfo));
sEvoStructPtr->preEvoSpriteId = preEvoSpriteId;

LoadSpecialPokePic(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
LoadSpecialPokePic(gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT],
postEvoSpecies,
personality,
TRUE);
Expand Down
2 changes: 1 addition & 1 deletion src/librfu_sio32id.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ s32 AgbRFU_checkID(u8 maxTries)
{
u16 ieBak;
vu16 *regTMCNTL;
s32 id;
s32 id = 0;

// Interrupts must be enabled
if (REG_IME == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/option_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ static u8 FrameType_ProcessInput(u8 selection)

static void FrameType_DrawChoices(u8 selection)
{
u8 text[16];
u8 text[16] = {EOS};
u8 n = selection + 1;
u16 i;

Expand Down
Empty file modified src/palette_util.c
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/pokeblock_feed.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon)
// Load mon gfx
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality);
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->spritesGfx[B_POSITION_OPPONENT_LEFT], species, personality);
sPokeblockFeed->loadGfxState++;
break;
case 1:
Expand Down
4 changes: 2 additions & 2 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ static void SetMonMoveSlot_KeepPP(struct Pokemon *mon, u16 move, u8 slot)
u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL);
u8 currPP = GetMonData(mon, MON_DATA_PP1 + slot, NULL);
u8 newPP = CalculatePPWithBonus(move, ppBonuses, slot);
u8 finalPP = min(currPP, newPP);
u16 finalPP = min(currPP, newPP);

SetMonData(mon, MON_DATA_MOVE1 + slot, &move);
SetMonData(mon, MON_DATA_PP1 + slot, &finalPP);
Expand Down Expand Up @@ -5607,7 +5607,7 @@ static inline bool32 CanFirstMonBoostHeldItemRarity(void)
u32 ability;
if (GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG))
return FALSE;

ability = GetMonAbility(&gPlayerParty[0]);
if ((OW_COMPOUND_EYES < GEN_9) && ability == ABILITY_COMPOUND_EYES)
return TRUE;
Expand Down
8 changes: 4 additions & 4 deletions src/pokemon_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ void CB2_Debug_Pokemon(void)
palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny);
LoadCompressedSpritePaletteWithTag(palette, species);
//Front
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->spritesGfx[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
data->isShiny = FALSE;
data->isFemale = FALSE;
BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1);
Expand All @@ -1129,7 +1129,7 @@ void CB2_Debug_Pokemon(void)
LoadAndCreateEnemyShadowSpriteCustom(data, species);

//Back
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->spritesGfx[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4);
SetMultiuseSpriteTemplateToPokemon(species, 2);
offset_y = gSpeciesInfo[species].backPicYOffset;
Expand Down Expand Up @@ -1666,7 +1666,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny);
LoadCompressedSpritePaletteWithTag(palette, species);
//Front
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->sprites.ptr[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
HandleLoadSpecialPokePic(TRUE, gMonSpritesGfxPtr->spritesGfx[1], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1);
SetMultiuseSpriteTemplateToPokemon(species, 1);
gMultiuseSpriteTemplate.paletteTag = species;
Expand All @@ -1679,7 +1679,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
LoadAndCreateEnemyShadowSpriteCustom(data, species);

//Back
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->spritesGfx[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 5);
SetMultiuseSpriteTemplateToPokemon(species, 2);
offset_y = gSpeciesInfo[species].backPicYOffset;
Expand Down
Loading

0 comments on commit a36cfb1

Please sign in to comment.