Merge pull request #1854 from GriffinRichards/constants-num-frames

Add MAX_MON_PIC_FRAMES, and trainer pic size constants
This commit is contained in:
GriffinR
2023-02-27 13:16:49 -05:00
committed by GitHub
15 changed files with 211 additions and 164 deletions

View File

@@ -593,7 +593,7 @@ struct MonSpritesGfx
u8 *byte[MAX_BATTLERS_COUNT];
} sprites;
struct SpriteTemplate templates[MAX_BATTLERS_COUNT];
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4];
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][MAX_MON_PIC_FRAMES];
u8 unusedArr[0x80];
u8 *barFontGfx;
void *unusedPtr;

View File

@@ -260,6 +260,14 @@
#define MON_PIC_HEIGHT 64
#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
// Most pokemon have 2 frames (a default and an alternate for their animation).
// There are 4 exceptions:
// - Castform has 4 frames, 1 for each form
// - Deoxys has 2 frames, 1 for each form
// - Spinda has 1 frame, presumably to avoid the work of animating its spots
// - Unown has 1 frame, presumably to avoid the work of animating all 28 of its forms
#define MAX_MON_PIC_FRAMES 4
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2

View File

@@ -7,6 +7,13 @@
#define MAX_TRAINER_ITEMS 4
#define TRAINER_PIC_WIDTH 64
#define TRAINER_PIC_HEIGHT 64
#define TRAINER_PIC_SIZE (TRAINER_PIC_WIDTH * TRAINER_PIC_HEIGHT / 2)
// Red and Leaf's back pics have 5 frames, but this is presumably irrelevant in the places this is used.
#define MAX_TRAINER_PIC_FRAMES 4
enum {
BATTLER_AFFINE_NORMAL,
BATTLER_AFFINE_EMERGE,