From 481210b7f318ee4811a4193216d77c3eefadf848 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 27 Aug 2022 00:54:30 -0400 Subject: [PATCH] Missing uses of MAX_SPRITES --- src/battle_anim_ice.c | 2 +- src/battle_anim_psychic.c | 2 +- src/intro.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index 6a0ff1154..c974ecf66 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -1454,7 +1454,7 @@ static void AnimHailBegin(struct Sprite *sprite) sprite->data[3], sprite->data[4], sprite->subpriority); sprite->data[0] = spriteId; - if (spriteId != 64) + if (spriteId != MAX_SPRITES) { gSprites[sprite->data[0]].callback = AnimHailContinue; gSprites[sprite->data[0]].data[6] = sprite->data[6]; diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index aebf76cc0..833c46c2f 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -918,7 +918,7 @@ static void AnimTask_SkillSwap_Step(u8 taskId) { task->data[1] = 0; spriteId = CreateSprite(&gSkillSwapOrbSpriteTemplate, task->data[11], task->data[12], 0); - if (spriteId != 64) + if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[0] = 16; gSprites[spriteId].data[2] = task->data[13]; diff --git a/src/intro.c b/src/intro.c index 7e9a75169..b06789142 100644 --- a/src/intro.c +++ b/src/intro.c @@ -2933,7 +2933,7 @@ static void SpriteCB_WaterDrop_ReachLeafEnd(struct Sprite *sprite) SetOamMatrix(sprite->data[1], sprite->data[6] + 64, 0, 0, sprite->data[6] + 64); SetOamMatrix(sprite->data[1] + 1, sprite->data[6] + 64, 0, 0, sprite->data[6] + 64); SetOamMatrix(sprite->data[1] + 2, sprite->data[6] + 64, 0, 0, sprite->data[6] + 64); - if (sprite->data[4] != 64) + if (sprite->data[4] != MAX_SPRITES) { u16 sinIdx; sprite->data[4] -= 8;