Skip to content

Commit 6c51ad1

Browse files
authored
Unify more PokemonSprite references (#807)
1 parent b5d2aa5 commit 6c51ad1

File tree

19 files changed

+140
-140
lines changed

19 files changed

+140
-140
lines changed

include/applications/pokemon_summary_screen/main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "constants/moves.h"
77

88
#include "struct_decls/pokemon_animation_sys_decl.h"
9-
#include "struct_defs/archived_poke_sprite_data.h"
109
#include "struct_defs/chatot_cry.h"
10+
#include "struct_defs/species_sprite_data.h"
1111
#include "struct_defs/sprite_animation_frame.h"
1212

1313
#include "bg_window.h"
@@ -410,7 +410,7 @@ typedef struct PokemonSummaryMonData {
410410
typedef struct PokemonSummaryMonSpriteData {
411411
Camera *camera;
412412
void *spriteManager;
413-
SpriteAnimationFrame frames[MAX_ANIMATION_FRAMES];
413+
SpriteAnimFrame frames[MAX_ANIMATION_FRAMES];
414414
PokemonAnimationSys *animationSys;
415415
PokemonSprite *sprite;
416416
BOOL flip;

include/pokemon.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ void BoxPokemon_RestorePP(BoxPokemon *boxMon);
838838
* @param species Species to be loaded
839839
* @param clientType Client-type of who made the load request
840840
*/
841-
void PokeSprite_LoadAnimationFrames(NARC *narc, SpriteAnimationFrame *frames, u16 species, u16 clientType);
841+
void PokemonSprite_LoadAnimFrames(NARC *narc, SpriteAnimFrame *frames, u16 species, u16 clientType);
842842

843843
/**
844844
* @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
851851
* @param reverse If TRUE, reverse the sprite + animation
852852
* @param frame Which frame of the animation to initialize
853853
*/
854-
void PokeSprite_LoadAnimation(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame);
854+
void PokemonSprite_LoadAnim(NARC *narc, PokemonAnimationSys *animationSys, PokemonSprite *sprite, u16 species, int face, int reverse, int frame);
855855

856856
/**
857857
* @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
861861
* @param species Species to be loaded
862862
* @param clientType Client-type of who made the load request
863863
*/
864-
void PokeSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType);
864+
void PokemonSprite_LoadCryDelay(NARC *narc, u8 *cryDelay, u16 species, u16 clientType);
865865

866866
/**
867867
* @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
871871
* @param species Species to be loaded
872872
* @param clientType Client-type of who made the load request
873873
*/
874-
void PokeSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species);
874+
void PokemonSprite_LoadYOffset(NARC *narc, s8 *yOffset, u16 species);
875875

876876
/**
877877
* @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);
881881
* @param species Species to be loaded
882882
* @param clientType Client-type of who made the load request
883883
*/
884-
void PokeSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species);
884+
void PokemonSprite_LoadXOffsetShadow(NARC *narc, s8 *xOffsetShadow, u16 species);
885885

886886
/**
887887
* @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);
891891
* @param species Species to be loaded
892892
* @param clientType Client-type of who made the load request
893893
*/
894-
void PokeSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species);
894+
void PokemonSprite_LoadShadowSize(NARC *narc, u8 *shadowSize, u16 species);
895895
BOOL Pokemon_SetBallSeal(int param0, Pokemon *mon, int heapID);
896896
void sub_02078B40(Pokemon *mon, UnkStruct_02078B40 *param1);
897897
void sub_02078E0C(UnkStruct_02078B40 *param0, Pokemon *mon);

include/pokemon_sprite.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct PokemonSprite {
152152
PokemonSpriteCallback *callback;
153153
PokemonSpriteShadow shadow;
154154
PokemonSpriteShadow shadowBackup;
155-
SpriteAnimationFrame animFrames[MAX_ANIMATION_FRAMES];
155+
SpriteAnimFrame animFrames[MAX_ANIMATION_FRAMES];
156156
};
157157

158158
typedef struct PokemonSpriteManager {
@@ -185,17 +185,17 @@ typedef struct {
185185
u8 frameDelay;
186186
u8 loopTimers[MAX_ANIMATION_FRAMES];
187187
u8 padding_0E[2];
188-
const SpriteAnimationFrame *animFrames;
188+
const SpriteAnimFrame *animFrames;
189189
} PokemonSpriteTaskAnim;
190190

191191
void *PokemonSpriteManager_New(enum HeapID heapID);
192192
void PokemonSpriteManager_DrawSprites(PokemonSpriteManager *monSpriteMan);
193193
void PokemonSpriteManager_Free(PokemonSpriteManager *monSpriteMan);
194194
void PokemonSprite_InitAnim(PokemonSprite *monSprite, int dummy);
195-
void PokemonSprite_SetAnim(PokemonSprite *monSprite, SpriteAnimationFrame *animFrames);
195+
void PokemonSprite_SetAnimFrames(PokemonSprite *monSprite, SpriteAnimFrame *animFrames);
196196
BOOL PokemonSprite_IsAnimActive(PokemonSprite *monSprite);
197-
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback);
198-
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimationFrame *animFrames, PokemonSpriteCallback *callback);
197+
PokemonSprite *PokemonSpriteManager_CreateSprite(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback);
198+
PokemonSprite *PokemonSpriteManager_CreateSpriteAtIndex(PokemonSpriteManager *monSpriteMan, PokemonSpriteTemplate *spriteTemplate, int x, int y, int z, int polygonID, int index, SpriteAnimFrame *animFrames, PokemonSpriteCallback *callback);
199199
void PokemonSprite_Delete(PokemonSprite *monSprite);
200200
void PokemonSpriteManager_DeleteAll(PokemonSpriteManager *monSpriteMan);
201201
void PokemonSprite_SetAttribute(PokemonSprite *monSprite, enum PokemonSpriteAttribute attribute, int value);
@@ -207,7 +207,7 @@ void PokemonSpriteManager_StartFadeAll(PokemonSpriteManager *monSpriteMan, int i
207207
void PokemonSprite_ClearFade(PokemonSprite *monSprite);
208208
BOOL PokemonSprite_IsFadeActive(PokemonSprite *monSprite);
209209
void PokemonSprite_CalcScaledYOffset(PokemonSprite *monSprite, int height);
210-
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimationFrame *animFrames);
210+
void PokemonSpriteTaskAnim_Init(PokemonSpriteTaskAnim *anim, const SpriteAnimFrame *animFrames);
211211
int PokemonSpriteTaskAnim_Tick(PokemonSpriteTaskAnim *anim);
212212
void PokemonSprite_ScheduleReloadFromNARC(PokemonSprite *monSprite);
213213
void PokemonSprite_Push(PokemonSprite *monSprite);
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
#ifndef POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
2-
#define POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
1+
#ifndef POKEPLATINUM_SPECIES_SPRITE_DATA_H
2+
#define POKEPLATINUM_SPECIES_SPRITE_DATA_H
33

44
#include "struct_defs/sprite_animation_frame.h"
55

66
#define MAX_FACES 2
77

8-
typedef struct PokeSpriteFaceData {
8+
typedef struct SpeciesSpriteAnim {
99
u8 cryDelay; ///< How long to wait before playing the cry.
1010
u8 animation; ///< Which pre-programmed animation sequence to use.
1111
u8 startDelay; ///< How long to wait before starting the animation sequence.
12-
SpriteAnimationFrame frames[MAX_ANIMATION_FRAMES]; ///< Frame-data for each frame of the animation sequence.
13-
} PokeSpriteFaceData;
12+
SpriteAnimFrame frames[MAX_ANIMATION_FRAMES]; ///< Frame-data for each frame of the animation sequence.
13+
} SpeciesSpriteAnim;
1414

15-
typedef struct ArchivedPokeSpriteData {
16-
PokeSpriteFaceData faces[MAX_FACES]; ///< Data for each display-face of the Pokemon's sprite.
15+
typedef struct SpeciesSpriteData {
16+
SpeciesSpriteAnim faceAnims[MAX_FACES]; ///< Data for each display-face of the Pokemon's sprite.
1717
s8 yOffset; ///< Additional vertical offset of the Pokemon's front-face sprite.
1818
s8 xOffsetShadow; ///< Horizontal offset for the shadow sprite beneath the Pokemon's sprite.
1919
u8 shadowSize; ///< Size of the shadow sprite beneath the Pokemon's sprite.
20-
} ArchivedPokeSpriteData;
20+
} SpeciesSpriteData;
2121

22-
#endif // POKEPLATINUM_ARCHIVED_POKE_SPRITE_DATA_H
22+
#endif // POKEPLATINUM_SPECIES_SPRITE_DATA_H

include/struct_defs/sprite_animation_frame.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
/**
77
* @brief By-frame data definition for animating a sprite.
88
*/
9-
typedef struct SpriteAnimationFrame {
9+
typedef struct SpriteAnimFrame {
1010
s8 spriteFrame; ///< Which frame of the sprite to use for this frame of the animation.
1111
u8 frameDelay; ///< How long this animation frame should last.
1212
s8 xOffset; ///< Horizontal shift to apply to the sprite for this animation frame.
1313
s8 yOffset; ///< Vertical shift to apply to the sprite for this animation frame.
14-
} SpriteAnimationFrame;
14+
} SpriteAnimFrame;
1515

1616
#endif // POKEPLATINUM_SPRITE_ANIMATION_DATA_H

src/applications/pokemon_summary_screen/3d_anim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ void PokemonSummaryScreen_LoadMonSprite(PokemonSummaryScreen *summaryScreen)
353353
Pokemon_BuildSpriteTemplate(&spriteTemplate, monData, 2);
354354
}
355355

356-
PokeSprite_LoadAnimationFrames(summaryScreen->narcPlPokeData, summaryScreen->monSprite.frames, summaryScreen->monData.species, 1);
356+
PokemonSprite_LoadAnimFrames(summaryScreen->narcPlPokeData, summaryScreen->monSprite.frames, summaryScreen->monData.species, 1);
357357

358358
summaryScreen->monSprite.flip = SpeciesData_GetFormValue(summaryScreen->monData.species, summaryScreen->monData.form, SPECIES_DATA_FLIP_SPRITE) ^ 1;
359359
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)
364364
void PokemonSummaryScreen_LoadMonAnimation(PokemonSummaryScreen *summaryScreen)
365365
{
366366
if (summaryScreen->monData.isEgg != FALSE) {
367-
PokeSprite_LoadAnimation(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, 0, 2, summaryScreen->monSprite.flip, 0);
367+
PokemonSprite_LoadAnim(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, 0, 2, summaryScreen->monSprite.flip, 0);
368368
} else {
369369
PokemonSprite_InitAnim(summaryScreen->monSprite.sprite, 1);
370-
PokeSprite_LoadAnimation(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, summaryScreen->monData.species, 2, summaryScreen->monSprite.flip, 0);
370+
PokemonSprite_LoadAnim(summaryScreen->narcPlPokeData, summaryScreen->monSprite.animationSys, summaryScreen->monSprite.sprite, summaryScreen->monData.species, 2, summaryScreen->monSprite.flip, 0);
371371
}
372372
}
373373

src/applications/pokemon_summary_screen/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ static void PlayMonCry(PokemonSummaryScreen *summaryScreen)
11791179
}
11801180

11811181
u8 cryDelay;
1182-
PokeSprite_LoadCryDelay(summaryScreen->narcPlPokeData, &cryDelay, summaryScreen->monData.species, 1);
1182+
PokemonSprite_LoadCryDelay(summaryScreen->narcPlPokeData, &cryDelay, summaryScreen->monData.species, 1);
11831183

11841184
if (summaryScreen->monData.species == SPECIES_CHATOT) {
11851185
Sound_PlayDelayedChatotCry(summaryScreen->data->chatotCry, 0, 100, 0, cryDelay);

0 commit comments

Comments
 (0)