Missing uses of MAX_SPRITES

This commit is contained in:
Eduardo Quezada 2022-08-27 00:54:30 -04:00
parent 76d2d92abb
commit 481210b7f3
3 changed files with 3 additions and 3 deletions

View File

@ -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];

View File

@ -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];

View File

@ -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;