summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_gfx_sfx_util.c4
-rw-r--r--src/pokemon.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index 77c50dc18..c01c76b7c 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -1248,11 +1248,11 @@ void AllocateMonSpritesGfx(void)
gMonSpritesGfxPtr = NULL;
gMonSpritesGfxPtr = AllocZeroed(sizeof(*gMonSpritesGfxPtr));
- gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(0x8000);
+ gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(MON_PIC_SIZE * 4 * MAX_BATTLERS_COUNT);
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
- gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * 0x2000);
+ gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * MON_PIC_SIZE * 4);
*(gMonSpritesGfxPtr->templates + i) = gBattlerSpriteTemplates[i];
for (j = 0; j < 4; j++)
diff --git a/src/pokemon.c b/src/pokemon.c
index 06a7a01f1..011e288db 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -6876,7 +6876,7 @@ static bool8 ShouldSkipFriendshipChange(void)
#define ALLOC_FAIL_BUFFER (1 << 0)
#define ALLOC_FAIL_STRUCT (1 << 1)
#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value
-#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // * 4 is unnecessary, MON_PIC_SIZE is sufficient
+#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // Only Castform uses more than MON_PIC_SIZE, despite not displaying its forms.
#define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed
static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx)