mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-26 08:41:27 -05:00
Unify more PokemonSprite references (#807)
This commit is contained in:
parent
b5d2aa56a7
commit
6c51ad190f
|
|
@ -6,8 +6,8 @@
|
|||
#include "constants/moves.h"
|
||||
|
||||
#include "struct_decls/pokemon_animation_sys_decl.h"
|
||||
#include "struct_defs/archived_poke_sprite_data.h"
|
||||
#include "struct_defs/chatot_cry.h"
|
||||
#include "struct_defs/species_sprite_data.h"
|
||||
#include "struct_defs/sprite_animation_frame.h"
|
||||
|
||||
#include "bg_window.h"
|
||||
|
|
@ -410,7 +410,7 @@ typedef struct PokemonSummaryMonData {
|
|||
typedef struct PokemonSummaryMonSpriteData {
|
||||
Camera *camera;
|
||||
void *spriteManager;
|
||||
SpriteAnimationFrame frames[MAX_ANIMATION_FRAMES];
|
||||
SpriteAnimFrame frames[MAX_ANIMATION_FRAMES];
|
||||
PokemonAnimationSys *animationSys;
|
||||
PokemonSprite *sprite;
|
||||
BOOL flip;
|
||||
|
|
|
|||
|
|
@ -838,7 +838,7 @@ void BoxPokemon_RestorePP(BoxPokemon *boxMon);
|
|||
* @param species Species to be loaded
|
||||
* @param clientType Client-type of who made the load request
|
||||
*/
|
||||
void PokeSprite_LoadAnimationFrames(NARC *narc, SpriteAnimationFrame *frames, u16 species, u16 clientType);
|
||||
void PokemonSprite_LoadAnimFrames(NARC *narc, SpriteAnimFrame *frames, u16 species, u16 clientType);
|
||||
|
||||
/**
|
||||
* @brief Load the animation data for a given species and a client type.
|
||||
|
|
@ -851,7 +851,7 @@ void PokeSprite_LoadAnimationFrames(NARC *narc, SpriteAnimationFrame *frames, u1
|
|||
* @param reverse If TRUE, reverse the sprite + animation
|
||||
* @param frame Which frame of the animation to initialize
|
||||
*/
|
||||
void PokeSprite_LoadAnimation(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame);
|
||||
void PokemonSprite_LoadAnim(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame);
|
||||
|
||||
/**
|
||||
* @brief Load the cry delay for a given species and a client type.
|
||||
|
|
@ -861,7 +861,7 @@ void PokeSprite_LoadAnimation(NARC *narc, PokemonAnimationSys *animationSys, Pok
|
|||
* @param species Species to be loaded
|
||||
* @param clientType Client-type of who made the load request
|
||||
*/
|
||||
void PokeSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType);
|
||||
void PokemonSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType);
|
||||
|
||||
/**
|
||||
* @brief Load the vertical offset for a given species and a client type.
|
||||
|
|
@ -871,7 +871,7 @@ void PokeSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientTy
|
|||
* @param species Species to be loaded
|
||||
* @param clientType Client-type of who made the load request
|
||||
*/
|
||||
void PokeSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species);
|
||||
void PokemonSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species);
|
||||
|
||||
/**
|
||||
* @brief Load the shadow's horizontal offset for a given species and a client type.
|
||||
|
|
@ -881,7 +881,7 @@ void PokeSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species);
|
|||
* @param species Species to be loaded
|
||||
* @param clientType Client-type of who made the load request
|
||||
*/
|
||||
void PokeSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species);
|
||||
void PokemonSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species);
|
||||
|
||||
/**
|
||||
* @brief Load the shadow size for a given species and a client type.
|
||||
|
|
@ -891,7 +891,7 @@ void PokeSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species);
|
|||
* @param species Species to be loaded
|
||||
* @param clientType Client-type of who made the load request
|
||||
*/
|
||||
void PokeSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species);
|
||||
void PokemonSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species);
|
||||
BOOL Pokemon_SetBallSeal(int param0, Pokemon *mon, int heapID);
|
||||
void sub_02078B40(Pokemon *mon, UnkStruct_02078B40 *param1);
|
||||
void sub_02078E0C(UnkStruct_02078B40 *param0, Pokemon *mon);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ struct PokemonSprite {
|
|||
PokemonSpriteCallback *callback;
|
||||
PokemonSpriteShadow shadow;
|
||||
PokemonSpriteShadow shadowBackup;
|
||||
SpriteAnimationFrame animFrames[MAX_ANIMATION_FRAMES];
|
||||
SpriteAnimFrame animFrames[MAX_ANIMATION_FRAMES];
|
||||
};
|
||||
|
||||
typedef struct PokemonSpriteManager {
|
||||
|
|
@ -185,17 +185,17 @@ typedef struct {
|
|||
u8 frameDelay;
|
||||
u8 loopTimers[MAX_ANIMATION_FRAMES];
|
||||
u8 padding_0E[2];
|
||||
const SpriteAnimationFrame *animFrames;
|
||||
const SpriteAnimFrame *animFrames;
|
||||
} PokemonSpriteTaskAnim;
|
||||
|
||||
void *PokemonSpriteManager_New(enum HeapID heapID);
|
||||
void PokemonSpriteManager_DrawSprites(PokemonSpriteManager *monSpriteMan);
|
||||
void PokemonSpriteManager_Free(PokemonSpriteManager *monSpriteMan);
|
||||
void PokemonSprite_InitAnim(PokemonSprite *monSprite, int dummy);
|
||||
void PokemonSprite_SetAnim(PokemonSprite *monSprite, SpriteAnimationFrame *animFrames);
|
||||
void PokemonSprite_SetAnimFrames(PokemonSprite *monSprite, SpriteAnimFrame *animFrames);
|
||||
BOOL PokemonSprite_IsAnimActive(PokemonSprite *monSprite);
|
||||
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback);
|
||||
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback);
|
||||
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback);
|
||||
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback);
|
||||
void PokemonSprite_Delete(PokemonSprite *monSprite);
|
||||
void PokemonSpriteManager_DeleteAll(PokemonSpriteManager *monSpriteMan);
|
||||
void PokemonSprite_SetAttribute(PokemonSprite *monSprite, enum PokemonSpriteAttribute attribute, int value);
|
||||
|
|
@ -207,7 +207,7 @@ void PokemonSpriteManager_StartFadeAll(PokemonSpriteManager *monSpriteMan, int i
|
|||
void PokemonSprite_ClearFade(PokemonSprite *monSprite);
|
||||
BOOL PokemonSprite_IsFadeActive(PokemonSprite *monSprite);
|
||||
void PokemonSprite_CalcScaledYOffset(PokemonSprite *monSprite, int height);
|
||||
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimationFrame *animFrames);
|
||||
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimFrame *animFrames);
|
||||
int PokemonSpriteTaskAnim_Tick(PokemonSpriteTaskAnim *anim);
|
||||
void PokemonSprite_ScheduleReloadFromNARC(PokemonSprite *monSprite);
|
||||
void PokemonSprite_Push(PokemonSprite *monSprite);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
#ifndef POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
|
||||
#define POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
|
||||
#ifndef POKEPLATINUM_SPECIES_SPRITE_DATA_H
|
||||
#define POKEPLATINUM_SPECIES_SPRITE_DATA_H
|
||||
|
||||
#include "struct_defs/sprite_animation_frame.h"
|
||||
|
||||
#define MAX_FACES 2
|
||||
|
||||
typedef struct PokeSpriteFaceData {
|
||||
typedef struct SpeciesSpriteAnim {
|
||||
u8 cryDelay; ///< How long to wait before playing the cry.
|
||||
u8 animation; ///< Which pre-programmed animation sequence to use.
|
||||
u8 startDelay; ///< How long to wait before starting the animation sequence.
|
||||
SpriteAnimationFrame frames[MAX_ANIMATION_FRAMES]; ///< Frame-data for each frame of the animation sequence.
|
||||
} PokeSpriteFaceData;
|
||||
SpriteAnimFrame frames[MAX_ANIMATION_FRAMES]; ///< Frame-data for each frame of the animation sequence.
|
||||
} SpeciesSpriteAnim;
|
||||
|
||||
typedef struct ArchivedPokeSpriteData {
|
||||
PokeSpriteFaceData faces[MAX_FACES]; ///< Data for each display-face of the Pokemon's sprite.
|
||||
typedef struct SpeciesSpriteData {
|
||||
SpeciesSpriteAnim faceAnims[MAX_FACES]; ///< Data for each display-face of the Pokemon's sprite.
|
||||
s8 yOffset; ///< Additional vertical offset of the Pokemon's front-face sprite.
|
||||
s8 xOffsetShadow; ///< Horizontal offset for the shadow sprite beneath the Pokemon's sprite.
|
||||
u8 shadowSize; ///< Size of the shadow sprite beneath the Pokemon's sprite.
|
||||
} ArchivedPokeSpriteData;
|
||||
} SpeciesSpriteData;
|
||||
|
||||
#endif // POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
|
||||
#endif // POKEPLATINUM_SPECIES_SPRITE_DATA_H
|
||||
|
|
@ -6,11 +6,11 @@
|
|||
/**
|
||||
* @brief By-frame data definition for animating a sprite.
|
||||
*/
|
||||
typedef struct SpriteAnimationFrame {
|
||||
typedef struct SpriteAnimFrame {
|
||||
s8 spriteFrame; ///< Which frame of the sprite to use for this frame of the animation.
|
||||
u8 frameDelay; ///< How long this animation frame should last.
|
||||
s8 xOffset; ///< Horizontal shift to apply to the sprite for this animation frame.
|
||||
s8 yOffset; ///< Vertical shift to apply to the sprite for this animation frame.
|
||||
} SpriteAnimationFrame;
|
||||
} SpriteAnimFrame;
|
||||
|
||||
#endif // POKEPLATINUM_SPRITE_ANIMATION_DATA_H
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ void PokemonSummaryScreen_LoadMonSprite(PokemonSummaryScreen *summaryScreen)
|
|||
Pokemon_BuildSpriteTemplate(&spriteTemplate, monData, 2);
|
||||
}
|
||||
|
||||
PokeSprite_LoadAnimationFrames(summaryScreen->narcPlPokeData, summaryScreen->monSprite.frames, summaryScreen->monData.species, 1);
|
||||
PokemonSprite_LoadAnimFrames(summaryScreen->narcPlPokeData, summaryScreen->monSprite.frames, summaryScreen->monData.species, 1);
|
||||
|
||||
summaryScreen->monSprite.flip = SpeciesData_GetFormValue(summaryScreen->monData.species, summaryScreen->monData.form, SPECIES_DATA_FLIP_SPRITE) ^ 1;
|
||||
summaryScreen->monSprite.sprite = PokemonSpriteManager_CreateSprite(summaryScreen->monSprite.spriteManager, &spriteTemplate, 52, 104, 0, 0, summaryScreen->monSprite.frames, NULL);
|
||||
|
|
@ -364,10 +364,10 @@ void PokemonSummaryScreen_LoadMonSprite(PokemonSummaryScreen *summaryScreen)
|
|||
void PokemonSummaryScreen_LoadMonAnimation(PokemonSummaryScreen *summaryScreen)
|
||||
{
|
||||
if (summaryScreen->monData.isEgg != FALSE) {
|
||||
PokeSprite_LoadAnimation(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, 0, 2, summaryScreen->monSprite.flip, 0);
|
||||
PokemonSprite_LoadAnim(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, 0, 2, summaryScreen->monSprite.flip, 0);
|
||||
} else {
|
||||
PokemonSprite_InitAnim(summaryScreen->monSprite.sprite, 1);
|
||||
PokeSprite_LoadAnimation(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, summaryScreen->monData.species, 2, summaryScreen->monSprite.flip, 0);
|
||||
PokemonSprite_LoadAnim(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, summaryScreen->monData.species, 2, summaryScreen->monSprite.flip, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ static void PlayMonCry(PokemonSummaryScreen *summaryScreen)
|
|||
}
|
||||
|
||||
u8 cryDelay;
|
||||
PokeSprite_LoadCryDelay(summaryScreen->narcPlPokeData, &cryDelay, summaryScreen->monData.species, 1);
|
||||
PokemonSprite_LoadCryDelay(summaryScreen->narcPlPokeData, &cryDelay, summaryScreen->monData.species, 1);
|
||||
|
||||
if (summaryScreen->monData.species == SPECIES_CHATOT) {
|
||||
Sound_PlayDelayedChatotCry(summaryScreen->data->chatotCry, 0, 100, 0, cryDelay);
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ static void ShowPartyGaugeTask(SysTask *param0, void *param1);
|
|||
static void HidePartyGaugeTask(SysTask *param0, void *param1);
|
||||
static void ov16_02263688(SysTask *param0, void *param1);
|
||||
static void ov16_022636D4(SysTask *param0, void *param1);
|
||||
static PokemonSprite *ov16_02263B30(BattleSystem *battleSys, PokemonSpriteManager *param1, PokemonSpriteTemplate *param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, SpriteAnimationFrame *param11, PokemonSpriteCallback *param12);
|
||||
static PokemonSprite *ov16_02263B30(BattleSystem *battleSys, PokemonSpriteManager *param1, PokemonSpriteTemplate *param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, SpriteAnimFrame *param11, PokemonSpriteCallback *param12);
|
||||
static void ov16_02263C1C(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_0225C3F8 *param2, BattleMessage *param3);
|
||||
static void ov16_02263CF0(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_0225C40C *param2, BattleMessage *param3);
|
||||
static void ov16_02263DD0(BattleSystem *battleSys, BattlerData *param1, BattleMessage *param2);
|
||||
|
|
@ -246,7 +246,7 @@ void ov16_0225CBDC(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_
|
|||
int v0;
|
||||
PokemonSpriteTemplate v1;
|
||||
PokemonSpriteManager *v2;
|
||||
SpriteAnimationFrame v3[10];
|
||||
SpriteAnimFrame v3[10];
|
||||
UnkStruct_ov16_0225E4E8 *v4;
|
||||
int battleType;
|
||||
u8 v6;
|
||||
|
|
@ -280,10 +280,10 @@ void ov16_0225CBDC(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_
|
|||
|
||||
v6 = LoadPokemonSpriteYOffset(param2->unk_02, param2->unk_01_0, v4->unk_13, param2->unk_01_3, param2->unk_04);
|
||||
|
||||
PokeSprite_LoadYOffset(param1->unk_1A0, &v7, param2->unk_02);
|
||||
PokeSprite_LoadXOffsetShadow(param1->unk_1A0, &v8, param2->unk_02);
|
||||
PokeSprite_LoadShadowSize(param1->unk_1A0, &v9, param2->unk_02);
|
||||
PokeSprite_LoadAnimationFrames(param1->unk_1A0, &v3[0], param2->unk_02, param1->battlerType);
|
||||
PokemonSprite_LoadYOffset(param1->unk_1A0, &v7, param2->unk_02);
|
||||
PokemonSprite_LoadXOffsetShadow(param1->unk_1A0, &v8, param2->unk_02);
|
||||
PokemonSprite_LoadShadowSize(param1->unk_1A0, &v9, param2->unk_02);
|
||||
PokemonSprite_LoadAnimFrames(param1->unk_1A0, &v3[0], param2->unk_02, param1->battlerType);
|
||||
|
||||
v4->unk_08 = param1->unk_20 = ov16_02263B30(battleSys, v2, &v1, Unk_ov12_0223B0B8[param1->battlerType][0], Unk_ov12_0223B0B8[param1->battlerType][1], Unk_ov12_0223B0B8[param1->battlerType][2], v6, v7, v8, v9, param1->battler, &v3[0], NULL);
|
||||
|
||||
|
|
@ -349,9 +349,9 @@ void ov16_0225CE1C(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_
|
|||
|
||||
v1->unk_85 = LoadPokemonSpriteYOffset(param2->unk_02, param2->unk_01_0, v1->unk_84, param2->unk_01_3, param2->unk_04);
|
||||
|
||||
PokeSprite_LoadYOffset(param1->unk_1A0, &v1->unk_90, param2->unk_02);
|
||||
PokeSprite_LoadXOffsetShadow(param1->unk_1A0, &v1->unk_91, param2->unk_02);
|
||||
PokeSprite_LoadShadowSize(param1->unk_1A0, &v1->unk_93, param2->unk_02);
|
||||
PokemonSprite_LoadYOffset(param1->unk_1A0, &v1->unk_90, param2->unk_02);
|
||||
PokemonSprite_LoadXOffsetShadow(param1->unk_1A0, &v1->unk_91, param2->unk_02);
|
||||
PokemonSprite_LoadShadowSize(param1->unk_1A0, &v1->unk_93, param2->unk_02);
|
||||
ov16_02263B10(param1);
|
||||
|
||||
v1->unk_00 = battleSys;
|
||||
|
|
@ -399,9 +399,9 @@ void ov16_0225CF70(BattleSystem *battleSys, BattlerData *param1, UnkStruct_ov16_
|
|||
|
||||
v2->unk_85 = LoadPokemonSpriteYOffset(param2->unk_02, param2->unk_01_0, v2->unk_84, param2->unk_01_3, param2->unk_04);
|
||||
|
||||
PokeSprite_LoadYOffset(param1->unk_1A0, &v2->unk_90, param2->unk_02);
|
||||
PokeSprite_LoadXOffsetShadow(param1->unk_1A0, &v2->unk_91, param2->unk_02);
|
||||
PokeSprite_LoadShadowSize(param1->unk_1A0, &v2->unk_93, param2->unk_02);
|
||||
PokemonSprite_LoadYOffset(param1->unk_1A0, &v2->unk_90, param2->unk_02);
|
||||
PokemonSprite_LoadXOffsetShadow(param1->unk_1A0, &v2->unk_91, param2->unk_02);
|
||||
PokemonSprite_LoadShadowSize(param1->unk_1A0, &v2->unk_93, param2->unk_02);
|
||||
ov16_02263B10(param1);
|
||||
|
||||
v2->unk_00 = battleSys;
|
||||
|
|
@ -1502,11 +1502,11 @@ static void ov16_0225E4E8(SysTask *param0, void *param1)
|
|||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_SHADOW_SHOULD_FOLLOW_Y, 0);
|
||||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_SHADOW_IS_AFFINE, 0);
|
||||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_X_CENTER, v0->unk_14);
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
|
||||
{
|
||||
u8 v4;
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_16, v0->unk_1C);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_16, v0->unk_1C);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_11), v0->unk_18, v0->unk_16, v0->unk_2C, 117, 127, NULL, 5, v4);
|
||||
}
|
||||
|
||||
|
|
@ -1544,12 +1544,12 @@ static void ov16_0225E4E8(SysTask *param0, void *param1)
|
|||
|
||||
if (PokemonSprite_GetAttribute(v0->unk_08, MON_SPRITE_X_CENTER) <= v0->unk_14) {
|
||||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_X_CENTER, v0->unk_14);
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
|
||||
{
|
||||
u8 v5;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v5, v0->unk_16, v0->unk_1C);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v5, v0->unk_16, v0->unk_1C);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_11), v0->unk_18, v0->unk_16, v0->unk_2C, -117, 127, NULL, 5, v5);
|
||||
}
|
||||
|
||||
|
|
@ -1628,12 +1628,12 @@ static void ov16_0225E894(SysTask *param0, void *param1)
|
|||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_SHADOW_SHOULD_FOLLOW_Y, 0);
|
||||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_SHADOW_IS_AFFINE, 0);
|
||||
PokemonSprite_SetAttribute(v0->unk_08, MON_SPRITE_Y_CENTER, v0->unk_14);
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_08, v0->unk_16, v0->unk_13, 0, v0->unk_11);
|
||||
|
||||
{
|
||||
u8 v4;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_16, v0->unk_1C);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_16, v0->unk_1C);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_11), v0->unk_18, v0->unk_16, v0->unk_2C, 117, 127, NULL, 5, v4);
|
||||
}
|
||||
|
||||
|
|
@ -1749,10 +1749,10 @@ static void ov16_0225EA80(SysTask *param0, void *param1)
|
|||
|
||||
{
|
||||
PokemonSpriteManager *v2;
|
||||
SpriteAnimationFrame v3[10];
|
||||
SpriteAnimFrame v3[10];
|
||||
|
||||
v2 = ov16_0223E000(v0->unk_00);
|
||||
PokeSprite_LoadAnimationFrames(v0->unk_04->unk_1A0, &v3[0], v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadAnimFrames(v0->unk_04->unk_1A0, &v3[0], v0->unk_86, v0->unk_82);
|
||||
v0->unk_04->unk_20 = ov16_02263B30(v0->unk_00, v2, &v0->unk_14, Unk_ov12_0223B0A0[v0->unk_82][0], Unk_ov12_0223B0B8[v0->unk_82][1], Unk_ov12_0223B0B8[v0->unk_82][2], v0->unk_85, v0->unk_90, v0->unk_91, v0->unk_93, v0->unk_81, &v3[0], NULL);
|
||||
|
||||
PokemonSprite_SetAttribute(v0->unk_04->unk_20, MON_SPRITE_SCALE_X, 0x0);
|
||||
|
|
@ -1793,7 +1793,7 @@ static void ov16_0225EA80(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v4;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v4, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, 117, 127, NULL, 5, v4);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1802,12 +1802,12 @@ static void ov16_0225EA80(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v5;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v5, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v5, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, -117, 127, NULL, 5, v5);
|
||||
}
|
||||
}
|
||||
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_StartFade(v0->unk_04->unk_20, 16, 0, 0, Unk_ov16_0226F1AE[v0->unk_8E]);
|
||||
|
||||
v0->unk_83 = 5;
|
||||
|
|
@ -1822,7 +1822,7 @@ static void ov16_0225EA80(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v6;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v6, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v6, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, 117, 127, NULL, 5, v6);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1831,12 +1831,12 @@ static void ov16_0225EA80(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v7;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v7, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v7, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, -117, 127, NULL, 5, v7);
|
||||
}
|
||||
}
|
||||
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_StartFade(v0->unk_04->unk_20, 16, 0, 1, Unk_ov16_0226F1AE[v0->unk_8E]);
|
||||
|
||||
v0->unk_83 = 5;
|
||||
|
|
@ -1917,10 +1917,10 @@ static void ov16_0225F0C0(SysTask *param0, void *param1)
|
|||
}
|
||||
{
|
||||
PokemonSpriteManager *v3;
|
||||
SpriteAnimationFrame v4[10];
|
||||
SpriteAnimFrame v4[10];
|
||||
|
||||
v3 = ov16_0223E000(v0->unk_00);
|
||||
PokeSprite_LoadAnimationFrames(v0->unk_04->unk_1A0, &v4[0], v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadAnimFrames(v0->unk_04->unk_1A0, &v4[0], v0->unk_86, v0->unk_82);
|
||||
v0->unk_04->unk_20 = ov16_02263B30(v0->unk_00, v3, &v0->unk_14, Unk_ov12_0223B0A0[v0->unk_82][0], Unk_ov12_0223B0B8[v0->unk_82][1], Unk_ov12_0223B0B8[v0->unk_82][2], v0->unk_85, v0->unk_90, v0->unk_91, v0->unk_93, v0->unk_81, &v4[0], NULL);
|
||||
|
||||
PokemonSprite_SetAttribute(v0->unk_04->unk_20, MON_SPRITE_SCALE_X, 0x0);
|
||||
|
|
@ -1987,7 +1987,7 @@ static void ov16_0225F0C0(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v6;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v6, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v6, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, 117, 127, NULL, 5, v6);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1996,12 +1996,12 @@ static void ov16_0225F0C0(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v7;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v7, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v7, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, -117, 127, NULL, 5, v7);
|
||||
}
|
||||
}
|
||||
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_StartFade(v0->unk_04->unk_20, 16, 0, 0, Unk_ov16_0226F1AE[v0->unk_8E]);
|
||||
v0->unk_83 = 5;
|
||||
} else if (PokemonSprite_GetAttribute(v0->unk_04->unk_20, MON_SPRITE_SCALE_X) >= 0x100) {
|
||||
|
|
@ -2015,7 +2015,7 @@ static void ov16_0225F0C0(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v8;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v8, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v8, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, 117, 127, NULL, 5, v8);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -2024,12 +2024,12 @@ static void ov16_0225F0C0(SysTask *param0, void *param1)
|
|||
{
|
||||
u8 v9;
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v9, v0->unk_86, v0->unk_82);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04->unk_1A0, &v9, v0->unk_86, v0->unk_82);
|
||||
Species_PlayDelayedCry(BattleSystem_ChatotVoice(v0->unk_00, v0->unk_81), v0->unk_88, v0->unk_86, v0->unk_97, -117, 127, NULL, 5, v9);
|
||||
}
|
||||
}
|
||||
|
||||
PokeSprite_LoadAnimation(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_LoadAnim(v0->unk_04->unk_1A0, BattleSystem_GetPokemonAnimationSystem(v0->unk_00), v0->unk_04->unk_20, v0->unk_86, v0->unk_84, 0, v0->unk_81);
|
||||
PokemonSprite_StartFade(v0->unk_04->unk_20, 16, 0, 1, Unk_ov16_0226F1AE[v0->unk_8E]);
|
||||
v0->unk_83 = 5;
|
||||
} else {
|
||||
|
|
@ -5628,7 +5628,7 @@ void ov16_02263B20(BattlerData *param0, int param1)
|
|||
ManagedSprite_SetDrawFlag(param0->unk_18, param1);
|
||||
}
|
||||
|
||||
static PokemonSprite *ov16_02263B30(BattleSystem *battleSys, PokemonSpriteManager *param1, PokemonSpriteTemplate *param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, SpriteAnimationFrame *param11, PokemonSpriteCallback *param12)
|
||||
static PokemonSprite *ov16_02263B30(BattleSystem *battleSys, PokemonSpriteManager *param1, PokemonSpriteTemplate *param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, SpriteAnimFrame *param11, PokemonSpriteCallback *param12)
|
||||
{
|
||||
PokemonSprite *v0;
|
||||
u8 *v1 = ov16_0223F2B8(ov16_0223E0C8(battleSys), param10);
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ static void ov12_022380DC(UnkStruct_ov12_022380DC *param0, int param1, int param
|
|||
if (v4 == 2) {
|
||||
NARC *v13 = NARC_ctor(NARC_INDEX_POKETOOL__POKE_EDIT__PL_POKE_DATA, heapID);
|
||||
|
||||
PokeSprite_LoadYOffset(v13, &v9, v2);
|
||||
PokeSprite_LoadXOffsetShadow(v13, &v10, v2);
|
||||
PokeSprite_LoadShadowSize(v13, &v12, v2);
|
||||
PokemonSprite_LoadYOffset(v13, &v9, v2);
|
||||
PokemonSprite_LoadXOffsetShadow(v13, &v10, v2);
|
||||
PokemonSprite_LoadShadowSize(v13, &v12, v2);
|
||||
NARC_dtor(v13);
|
||||
|
||||
PokemonSprite_SetAttribute(param0->sprites[param0->unk_00], MON_SPRITE_SHADOW_SIZE, v12);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ typedef struct HallOfFameMan {
|
|||
Sprite *sprite;
|
||||
void *unk_1D0;
|
||||
void *unk_1D4;
|
||||
SpriteAnimationFrame animFrames[MAX_PARTY_SIZE][MAX_ANIMATION_FRAMES];
|
||||
SpriteAnimFrame animFrames[MAX_PARTY_SIZE][MAX_ANIMATION_FRAMES];
|
||||
int slotIndexes[MAX_PARTY_SIZE];
|
||||
int species[MAX_PARTY_SIZE];
|
||||
u32 forms[MAX_PARTY_SIZE];
|
||||
|
|
@ -169,7 +169,7 @@ typedef struct HallOfFameSliderToBlack {
|
|||
typedef struct HallOfFamePokemonAnimation {
|
||||
HallOfFameTask hallOfFameTask;
|
||||
Sprite *sprite;
|
||||
const SpriteAnimationFrame *animFrame;
|
||||
const SpriteAnimFrame *animFrame;
|
||||
PokemonSpriteTaskAnim anim;
|
||||
NNSG2dImageProxy imageProxies[2];
|
||||
BOOL playCry;
|
||||
|
|
@ -875,7 +875,7 @@ static void ov86_0223BAC8(HallOfFameMan *hallOfFameMan, NNSG2dCellDataBank *cell
|
|||
GX_LoadOBJ(hallOfFameMan->unk_310, i * 2 * 3200 + 3200, 3200);
|
||||
|
||||
Graphics_LoadPalette(spriteTemplate.narcID, spriteTemplate.palette, 1, i * 0x20, 0x20, HEAP_ID_HALL_OF_FAME);
|
||||
PokeSprite_LoadAnimationFrames(hallOfFameMan->narc, &hallOfFameMan->animFrames[i][0], hallOfFameMan->species[i], 1);
|
||||
PokemonSprite_LoadAnimFrames(hallOfFameMan->narc, &hallOfFameMan->animFrames[i][0], hallOfFameMan->species[i], 1);
|
||||
}
|
||||
|
||||
NNS_G2dInitImageProxy(&imageProxy);
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ EvolutionData *Evolution_Begin(Party *param0, Pokemon *param1, int param2, Optio
|
|||
v0->heapID = heapID;
|
||||
v0->unk_80 = NARC_ctor(NARC_INDEX_POKETOOL__POKE_EDIT__PL_POKE_DATA, heapID);
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_80, &(v0->unk_84), v0->unk_60, 1);
|
||||
PokeSprite_LoadCryDelay(v0->unk_80, &(v0->unk_85), v0->unk_62, 1);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_80, &(v0->unk_84), v0->unk_60, 1);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_80, &(v0->unk_85), v0->unk_62, 1);
|
||||
|
||||
v0->unk_14 = PaletteData_New(heapID);
|
||||
|
||||
|
|
@ -275,11 +275,11 @@ static void sub_0207B180(EvolutionData *param0)
|
|||
case 4:
|
||||
if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) {
|
||||
{
|
||||
SpriteAnimationFrame v0[10];
|
||||
SpriteAnimFrame v0[10];
|
||||
|
||||
PokeSprite_LoadAnimation(param0->unk_80, param0->unk_44, param0->unk_1C[0], param0->unk_60, 2, 0, 0);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_80, &v0[0], param0->unk_60, 1);
|
||||
PokemonSprite_SetAnim(param0->unk_1C[0], &v0[0]);
|
||||
PokemonSprite_LoadAnim(param0->unk_80, param0->unk_44, param0->unk_1C[0], param0->unk_60, 2, 0, 0);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_80, &v0[0], param0->unk_60, 1);
|
||||
PokemonSprite_SetAnimFrames(param0->unk_1C[0], &v0[0]);
|
||||
PokemonSprite_InitAnim(param0->unk_1C[0], NULL);
|
||||
}
|
||||
|
||||
|
|
@ -379,11 +379,11 @@ static void sub_0207B180(EvolutionData *param0)
|
|||
case 10:
|
||||
if ((PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) && (sub_0207C8E0(param0->unk_30) == 0)) {
|
||||
{
|
||||
SpriteAnimationFrame v2[10];
|
||||
SpriteAnimFrame v2[10];
|
||||
|
||||
PokeSprite_LoadAnimation(param0->unk_80, param0->unk_44, param0->unk_1C[1], param0->unk_62, 2, 0, 0);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_80, &v2[0], param0->unk_62, 1);
|
||||
PokemonSprite_SetAnim(param0->unk_1C[1], &v2[0]);
|
||||
PokemonSprite_LoadAnim(param0->unk_80, param0->unk_44, param0->unk_1C[1], param0->unk_62, 2, 0, 0);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_80, &v2[0], param0->unk_62, 1);
|
||||
PokemonSprite_SetAnimFrames(param0->unk_1C[1], &v2[0]);
|
||||
PokemonSprite_InitAnim(param0->unk_1C[1], NULL);
|
||||
}
|
||||
|
||||
|
|
@ -641,11 +641,11 @@ static void sub_0207B180(EvolutionData *param0)
|
|||
case 42:
|
||||
if (PaletteData_GetSelectedBuffersMask(param0->unk_14) == 0) {
|
||||
{
|
||||
SpriteAnimationFrame v4[10];
|
||||
SpriteAnimFrame v4[10];
|
||||
|
||||
PokeSprite_LoadAnimation(param0->unk_80, param0->unk_44, param0->unk_1C[0], param0->unk_60, 2, 0, 0);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_80, &v4[0], param0->unk_60, 1);
|
||||
PokemonSprite_SetAnim(param0->unk_1C[0], &v4[0]);
|
||||
PokemonSprite_LoadAnim(param0->unk_80, param0->unk_44, param0->unk_1C[0], param0->unk_60, 2, 0, 0);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_80, &v4[0], param0->unk_60, 1);
|
||||
PokemonSprite_SetAnimFrames(param0->unk_1C[0], &v4[0]);
|
||||
PokemonSprite_InitAnim(param0->unk_1C[0], NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ void ov76_0223DCC0(UnkStruct_ov76_0223DE00 *param0)
|
|||
void ov76_0223DD88(UnkStruct_ov76_0223DE00 *param0)
|
||||
{
|
||||
PokemonSpriteTemplate v0;
|
||||
SpriteAnimationFrame v1[10];
|
||||
SpriteAnimFrame v1[10];
|
||||
int v2;
|
||||
int v3;
|
||||
|
||||
|
|
@ -699,7 +699,7 @@ void ov76_0223DD88(UnkStruct_ov76_0223DE00 *param0)
|
|||
v3 = Pokemon_SpriteYOffset(param0->unk_428, 2);
|
||||
|
||||
param0->unk_D4.unk_D8 = v3;
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_42C, &v1[0], v2, 1);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_42C, &v1[0], v2, 1);
|
||||
param0->unk_D4.unk_D4 = PokemonSpriteManager_CreateSprite(param0->unk_D4.unk_D0, &v0, 256 - 64, 48 + v3, -0x280, 0, &v1[0], NULL);
|
||||
}
|
||||
|
||||
|
|
@ -712,7 +712,7 @@ static void ov76_0223DE00(UnkStruct_ov76_0223DE00 *param0)
|
|||
v1 = Pokemon_GetNature(param0->unk_428);
|
||||
|
||||
PokemonSprite_InitAnim(param0->unk_D4.unk_D4, 1);
|
||||
PokeSprite_LoadAnimation(param0->unk_42C, param0->unk_D4.unk_188, param0->unk_D4.unk_D4, v0, 2, 0, 0);
|
||||
PokemonSprite_LoadAnim(param0->unk_42C, param0->unk_D4.unk_188, param0->unk_D4.unk_D4, v0, 2, 0, 0);
|
||||
}
|
||||
|
||||
static void ov76_0223DE54(UnkStruct_ov76_0223DE00 *param0)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ typedef struct {
|
|||
int unk_08;
|
||||
PokemonSpriteManager *unk_0C;
|
||||
PokemonSprite *unk_10;
|
||||
SpriteAnimationFrame unk_14[10];
|
||||
SpriteAnimFrame unk_14[10];
|
||||
Sprite *unk_3C[2];
|
||||
UnkStruct_ov95_02247568 unk_44;
|
||||
BgConfig *unk_54;
|
||||
|
|
@ -349,7 +349,7 @@ static int ov95_02247F04(UnkStruct_ov95_02247C6C *param0, int *param1)
|
|||
u8 delay;
|
||||
|
||||
PokemonSprite_InitAnim(param0->unk_10, 1);
|
||||
PokeSprite_LoadCryDelay(param0->unk_80, &delay, ov95_0224764C(param0->unk_00), 1);
|
||||
PokemonSprite_LoadCryDelay(param0->unk_80, &delay, ov95_0224764C(param0->unk_00), 1);
|
||||
Sound_PlayDelayedPokemonCry(ov95_0224764C(param0->unk_00), delay, ov95_02247654(param0->unk_00));
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ static PokemonSprite *ov95_02248240(UnkStruct_ov95_02247C6C *param0)
|
|||
v1 = (BoxPokemon *)TradeSequence_GetSendingPokemon(param0->unk_00);
|
||||
|
||||
BoxPokemon_BuildSpriteTemplate(&v0, v1, 2, 0);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_80, param0->unk_14, ov95_0224764C(param0->unk_00), 1);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_80, param0->unk_14, ov95_0224764C(param0->unk_00), 1);
|
||||
|
||||
v2 = (100 - 20) + BoxPokemon_SpriteYOffset(v1, 2, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ typedef struct {
|
|||
BOOL unk_0C;
|
||||
PokemonSpriteManager *unk_10;
|
||||
PokemonSprite *unk_14;
|
||||
SpriteAnimationFrame unk_18[10];
|
||||
SpriteAnimFrame unk_18[10];
|
||||
Sprite *unk_40[2];
|
||||
UnkStruct_ov95_02247568 unk_48;
|
||||
BgConfig *unk_58;
|
||||
|
|
@ -360,7 +360,7 @@ static int ov95_0224B71C(UnkStruct_ov95_0224B4D4 *param0, int *param1)
|
|||
if (BoxPokemon_GetValue((BoxPokemon *)v0, MON_DATA_IS_EGG, NULL) == 0) {
|
||||
u8 delay;
|
||||
|
||||
PokeSprite_LoadCryDelay(param0->unk_84, &delay, ov95_02247660(param0->unk_00), 1);
|
||||
PokemonSprite_LoadCryDelay(param0->unk_84, &delay, ov95_02247660(param0->unk_00), 1);
|
||||
Sound_PlayDelayedPokemonCry(ov95_02247660(param0->unk_00), delay, ov95_02247668(param0->unk_00));
|
||||
PokemonSprite_InitAnim(param0->unk_14, 1);
|
||||
}
|
||||
|
|
@ -499,7 +499,7 @@ static PokemonSprite *ov95_0224BA8C(UnkStruct_ov95_0224B4D4 *param0)
|
|||
v1 = (BoxPokemon *)TradeSequence_GetReceivingPokemon(param0->unk_00);
|
||||
|
||||
BoxPokemon_BuildSpriteTemplate(&v0, v1, 2, 0);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_84, param0->unk_18, ov95_02247660(param0->unk_00), 1);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_84, param0->unk_18, ov95_02247660(param0->unk_00), 1);
|
||||
|
||||
v2 = (100 - 20) + BoxPokemon_SpriteYOffset(v1, 2, 0);
|
||||
return PokemonSpriteManager_CreateSprite(param0->unk_10, &v0, 128, v2, 0, 0, param0->unk_18, NULL);
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ void ov119_021D1844(UnkStruct_ov119_021D17B8 *param0)
|
|||
void ov119_021D1858(UnkStruct_ov119_021D0FD0 *param0)
|
||||
{
|
||||
PokemonSpriteTemplate v0;
|
||||
SpriteAnimationFrame v1[10];
|
||||
SpriteAnimFrame v1[10];
|
||||
Pokemon *v2;
|
||||
int v3;
|
||||
int v4;
|
||||
|
|
@ -735,7 +735,7 @@ void ov119_021D1858(UnkStruct_ov119_021D0FD0 *param0)
|
|||
}
|
||||
|
||||
Pokemon_BuildSpriteTemplate(&v0, v2, 2);
|
||||
PokeSprite_LoadAnimationFrames(param0->unk_04.unk_3C, &v1[0], v3, 1);
|
||||
PokemonSprite_LoadAnimFrames(param0->unk_04.unk_3C, &v1[0], v3, 1);
|
||||
|
||||
param0->unk_70 = PokemonSpriteManager_CreateSprite(param0->unk_04.unk_38, &v0, 128, 96 + v4, 0, 0, &v1[0], NULL);
|
||||
}
|
||||
|
|
@ -749,7 +749,7 @@ void ov119_021D18C0(UnkStruct_ov119_021D0FD0 *param0)
|
|||
v1 = Pokemon_GetNature(param0->unk_00->unk_0C.unk_00);
|
||||
|
||||
PokemonSprite_InitAnim(param0->unk_70, 1);
|
||||
PokeSprite_LoadAnimation(param0->unk_04.unk_3C, param0->unk_04.unk_54, param0->unk_70, v0, 2, 0, 0);
|
||||
PokemonSprite_LoadAnim(param0->unk_04.unk_3C, param0->unk_04.unk_54, param0->unk_70, v0, 2, 0, 0);
|
||||
}
|
||||
|
||||
void ov119_021D1900(UnkStruct_ov119_021D0FD0 *param0)
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
#include "struct_decls/pokemon_animation_sys_decl.h"
|
||||
#include "struct_decls/struct_02023790_decl.h"
|
||||
#include "struct_defs/archived_poke_sprite_data.h"
|
||||
#include "struct_defs/chatot_cry.h"
|
||||
#include "struct_defs/mail.h"
|
||||
#include "struct_defs/poke_animation_settings.h"
|
||||
#include "struct_defs/seal_case.h"
|
||||
#include "struct_defs/species_sprite_data.h"
|
||||
#include "struct_defs/sprite_animation_frame.h"
|
||||
#include "struct_defs/struct_02078B40.h"
|
||||
|
||||
|
|
@ -5135,61 +5135,61 @@ static inline int Pokemon_Face(int clientType)
|
|||
return (clientType & 1) ? 0 : 1;
|
||||
}
|
||||
|
||||
void PokeSprite_LoadAnimationFrames(NARC *narc, SpriteAnimationFrame *frames, u16 species, u16 clientType)
|
||||
void PokemonSprite_LoadAnimFrames(NARC *narc, SpriteAnimFrame *frames, u16 species, u16 clientType)
|
||||
{
|
||||
int face = Pokemon_Face(clientType);
|
||||
|
||||
ArchivedPokeSpriteData data;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &data);
|
||||
MI_CpuCopy8(data.faces[face].frames, frames, sizeof(SpriteAnimationFrame) * MAX_ANIMATION_FRAMES);
|
||||
SpeciesSpriteData data;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &data);
|
||||
MI_CpuCopy8(data.faceAnims[face].frames, frames, sizeof(SpriteAnimFrame) * MAX_ANIMATION_FRAMES);
|
||||
}
|
||||
|
||||
void PokeSprite_LoadAnimation(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame)
|
||||
void PokemonSprite_LoadAnim(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame)
|
||||
{
|
||||
int faceType = (face == FACE_FRONT) ? 0 : 1;
|
||||
|
||||
ArchivedPokeSpriteData spriteData;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &spriteData);
|
||||
SpeciesSpriteData spriteData;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &spriteData);
|
||||
|
||||
PokeAnimationSettings settings;
|
||||
settings.animation = spriteData.faces[faceType].animation;
|
||||
settings.startDelay = spriteData.faces[faceType].startDelay;
|
||||
settings.animation = spriteData.faceAnims[faceType].animation;
|
||||
settings.startDelay = spriteData.faceAnims[faceType].startDelay;
|
||||
settings.reverse = reverse;
|
||||
|
||||
PokeAnimation_Init(animationSys, sprite, &settings, frame);
|
||||
}
|
||||
|
||||
void PokeSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType)
|
||||
void PokemonSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType)
|
||||
{
|
||||
int face = Pokemon_Face(clientType);
|
||||
|
||||
ArchivedPokeSpriteData data;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &data);
|
||||
SpeciesSpriteData data;
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &data);
|
||||
|
||||
*cryDelay = data.faces[face].cryDelay;
|
||||
*cryDelay = data.faceAnims[face].cryDelay;
|
||||
}
|
||||
|
||||
void PokeSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species)
|
||||
void PokemonSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species)
|
||||
{
|
||||
ArchivedPokeSpriteData data;
|
||||
SpeciesSpriteData data;
|
||||
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &data);
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &data);
|
||||
*yOffset = data.yOffset;
|
||||
}
|
||||
|
||||
void PokeSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species)
|
||||
void PokemonSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species)
|
||||
{
|
||||
ArchivedPokeSpriteData data;
|
||||
SpeciesSpriteData data;
|
||||
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &data);
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &data);
|
||||
*xOffsetShadow = data.xOffsetShadow;
|
||||
}
|
||||
|
||||
void PokeSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species)
|
||||
void PokemonSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species)
|
||||
{
|
||||
ArchivedPokeSpriteData data;
|
||||
SpeciesSpriteData data;
|
||||
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(ArchivedPokeSpriteData), sizeof(ArchivedPokeSpriteData), &data);
|
||||
NARC_ReadFromMember(narc, 0, species * sizeof(SpeciesSpriteData), sizeof(SpeciesSpriteData), &data);
|
||||
*shadowSize = data.shadowSize;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -591,9 +591,9 @@ void PokemonSprite_InitAnim(PokemonSprite *monSprite, int dummy)
|
|||
}
|
||||
}
|
||||
|
||||
void PokemonSprite_SetAnim(PokemonSprite *monSprite, SpriteAnimationFrame *animFrames)
|
||||
void PokemonSprite_SetAnimFrames(PokemonSprite *monSprite, SpriteAnimFrame *animFrames)
|
||||
{
|
||||
MI_CpuCopy8(animFrames, &monSprite->animFrames, sizeof(SpriteAnimationFrame) * MAX_ANIMATION_FRAMES);
|
||||
MI_CpuCopy8(animFrames, &monSprite->animFrames, sizeof(SpriteAnimFrame) * MAX_ANIMATION_FRAMES);
|
||||
}
|
||||
|
||||
BOOL PokemonSprite_IsAnimActive(PokemonSprite *monSprite)
|
||||
|
|
@ -602,7 +602,7 @@ BOOL PokemonSprite_IsAnimActive(PokemonSprite *monSprite)
|
|||
return monSprite->animActive != FALSE;
|
||||
}
|
||||
|
||||
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback)
|
||||
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < MAX_MON_SPRITES; i++) {
|
||||
|
|
@ -616,7 +616,7 @@ PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSprite
|
|||
return PokemonSpriteManager_CreateSpriteAtIndex(monSpriteMan, spriteTemplate, x, y, z, polygonID, i, animFrames, callback);
|
||||
}
|
||||
|
||||
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback)
|
||||
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback)
|
||||
{
|
||||
GF_ASSERT(monSpriteMan->sprites[index].active == FALSE);
|
||||
|
||||
|
|
@ -648,7 +648,7 @@ PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *mo
|
|||
monSpriteMan->sprites[index].shadow.isAffine = TRUE;
|
||||
|
||||
if (animFrames != NULL) {
|
||||
MI_CpuCopy8(animFrames, &monSpriteMan->sprites[index].animFrames, sizeof(SpriteAnimationFrame) * MAX_ANIMATION_FRAMES);
|
||||
MI_CpuCopy8(animFrames, &monSpriteMan->sprites[index].animFrames, sizeof(SpriteAnimFrame) * MAX_ANIMATION_FRAMES);
|
||||
}
|
||||
|
||||
return &monSpriteMan->sprites[index];
|
||||
|
|
@ -1131,7 +1131,7 @@ void PokemonSprite_CalcScaledYOffset(PokemonSprite *monSprite, int height)
|
|||
monSprite->transforms.yOffset = ((MON_SPRITE_HEIGHT / 2) - height) - ((((MON_SPRITE_HEIGHT / 2) - height) * monSprite->transforms.scaleY) >> 8);
|
||||
}
|
||||
|
||||
static inline void TickPokemonSpriteTaskAnim(u8 *active, u8 *currSpriteFrame, u8 *currAnimFrame, u8 *frameDelay, u8 *loopTimers, const SpriteAnimationFrame *animFrames)
|
||||
static inline void TickPokemonSpriteTaskAnim(u8 *active, u8 *currSpriteFrame, u8 *currAnimFrame, u8 *frameDelay, u8 *loopTimers, const SpriteAnimFrame *animFrames)
|
||||
{
|
||||
if (*active) {
|
||||
if (*frameDelay == 0) {
|
||||
|
|
@ -1202,7 +1202,7 @@ static void PokemonSprite_TickAnim(PokemonSprite *monSprite)
|
|||
TickPokemonSpriteAnim(monSprite);
|
||||
}
|
||||
|
||||
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimationFrame *animFrames)
|
||||
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimFrame *animFrames)
|
||||
{
|
||||
anim->active = TRUE;
|
||||
anim->currAnimFrame = 0;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ static int sub_02098304(ApplicationManager *appMan, int *param1)
|
|||
|
||||
v1 = Pokemon_GetValue(v0->unk_00->unk_0C.unk_00, MON_DATA_SPECIES, NULL);
|
||||
|
||||
PokeSprite_LoadCryDelay(v0->unk_04.unk_3C, &v0->unk_6C, v1, 1);
|
||||
PokemonSprite_LoadCryDelay(v0->unk_04.unk_3C, &v0->unk_6C, v1, 1);
|
||||
|
||||
if (v1 == SPECIES_MANAPHY) {
|
||||
v0->unk_5C = 1;
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@
|
|||
#include "generated/shadow_sizes.h"
|
||||
#include "generated/species.h"
|
||||
|
||||
#include "struct_defs/archived_poke_sprite_data.h"
|
||||
#include "struct_defs/species.h"
|
||||
#include "struct_defs/species_sprite_data.h"
|
||||
|
||||
#define NUM_TMS 92 // TODO: Move this to a more accessible location, maybe?
|
||||
|
||||
|
|
@ -488,9 +488,9 @@ static void PackHeights(vfs_pack_ctx *vfs, rapidjson::Document &root, u8 genderR
|
|||
narc_pack_file(vfs, frontMale, maleSize);
|
||||
}
|
||||
|
||||
static SpriteAnimationFrame ParseSpriteAnimationFrame(const rapidjson::Value &frame)
|
||||
static SpriteAnimFrame ParseSpriteAnimationFrame(const rapidjson::Value &frame)
|
||||
{
|
||||
SpriteAnimationFrame data = { 0 };
|
||||
SpriteAnimFrame data = { 0 };
|
||||
data.spriteFrame = frame["sprite_frame"].GetInt();
|
||||
data.frameDelay = frame["frame_delay"].GetUint();
|
||||
data.xOffset = frame["x_shift"].GetInt();
|
||||
|
|
@ -499,9 +499,9 @@ static SpriteAnimationFrame ParseSpriteAnimationFrame(const rapidjson::Value &fr
|
|||
return data;
|
||||
}
|
||||
|
||||
static PokeSpriteFaceData ParsePokeSpriteFace(const rapidjson::Value &face)
|
||||
static SpeciesSpriteAnim ParseSpeciesSpriteAnim(const rapidjson::Value &face)
|
||||
{
|
||||
PokeSpriteFaceData data = { 0 };
|
||||
SpeciesSpriteAnim data = { 0 };
|
||||
data.animation = face["animation"].GetUint();
|
||||
data.cryDelay = face["cry_delay"].GetUint();
|
||||
data.startDelay = face["start_delay"].GetUint();
|
||||
|
|
@ -539,16 +539,16 @@ static void TryEmitFootprint(const rapidjson::Document &root, std::string specie
|
|||
<< " },\n";
|
||||
}
|
||||
|
||||
static ArchivedPokeSpriteData ParsePokeSprite(const rapidjson::Document &root)
|
||||
static SpeciesSpriteData ParseSpeciesSpriteData(const rapidjson::Document &root)
|
||||
{
|
||||
ArchivedPokeSpriteData data = { 0 };
|
||||
SpeciesSpriteData data = { 0 };
|
||||
|
||||
const rapidjson::Value &front = root["front"];
|
||||
const rapidjson::Value &back = root["back"];
|
||||
const rapidjson::Value &shadow = root["shadow"];
|
||||
|
||||
data.faces[0] = ParsePokeSpriteFace(front);
|
||||
data.faces[1] = ParsePokeSpriteFace(back);
|
||||
data.faceAnims[0] = ParseSpeciesSpriteAnim(front);
|
||||
data.faceAnims[1] = ParseSpeciesSpriteAnim(back);
|
||||
data.yOffset = front["addl_y_offset"].GetInt();
|
||||
data.xOffsetShadow = shadow["x_offset"].GetInt();
|
||||
data.shadowSize = LookupConst(shadow["size"].GetString(), ShadowSize);
|
||||
|
|
@ -702,7 +702,7 @@ int main(int argc, char **argv)
|
|||
vfs_pack_ctx *heightVFS = narc_pack_start();
|
||||
std::vector<SpeciesPalPark> palParkData;
|
||||
std::vector<u16> offspringData;
|
||||
std::vector<ArchivedPokeSpriteData> pokeSpriteData;
|
||||
std::vector<SpeciesSpriteData> speciesSpriteData;
|
||||
|
||||
u16 personalValue = 0;
|
||||
rapidjson::Document doc;
|
||||
|
|
@ -750,8 +750,8 @@ int main(int argc, char **argv)
|
|||
u8 genderRatio = species != "none" ? data.genderRatio : GENDER_RATIO_FEMALE_50; // treat SPECIES_NONE as if it has two genders.
|
||||
PackHeights(heightVFS, doc, genderRatio);
|
||||
|
||||
ArchivedPokeSpriteData pokeSprite = ParsePokeSprite(doc);
|
||||
pokeSpriteData.emplace_back(pokeSprite);
|
||||
SpeciesSpriteData speciesSprite = ParseSpeciesSpriteData(doc);
|
||||
speciesSpriteData.emplace_back(speciesSprite);
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
|
|
@ -791,7 +791,7 @@ int main(int argc, char **argv)
|
|||
PackNarc(wotblVFS, outputRoot / "wotbl.narc");
|
||||
PackNarc(heightVFS, outputRoot / "height.narc");
|
||||
PackSingleFileNarc(palParkData, outputRoot / "ppark.narc");
|
||||
PackSingleFileNarc(pokeSpriteData, outputRoot / "pl_poke_data.narc");
|
||||
PackSingleFileNarc(speciesSpriteData, outputRoot / "pl_poke_data.narc");
|
||||
PackOffspring(offspringData, outputRoot / "pms.narc");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user