Flatten pos fields in struct Sprite

This commit is contained in:
PikalaxALT
2021-07-07 09:05:48 -04:00
parent 1a43cdc81f
commit aec808ac0d
92 changed files with 2891 additions and 2891 deletions
+9 -9
View File
@@ -562,15 +562,15 @@ void CreateBagOrSatchelSprite(u8 animNum)
void sub_8098528(u8 animNum)
{
struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]];
sprite->pos2.y = -5;
sprite->y2 = -5;
sprite->callback = sub_8098560;
StartSpriteAnim(sprite, animNum);
}
static void sub_8098560(struct Sprite * sprite)
{
if (sprite->pos2.y != 0)
sprite->pos2.y++;
if (sprite->y2 != 0)
sprite->y2++;
else
sprite->callback = SpriteCallbackDummy;
}
@@ -635,8 +635,8 @@ void ItemMenuIcons_MoveInsertIndicatorBar(s16 x, u16 y)
for (i = 0; i < 9; i++)
{
gSprites[ptr[i]].pos2.x = x;
gSprites[ptr[i]].pos1.y = y + 7;
gSprites[ptr[i]].x2 = x;
gSprites[ptr[i]].y = y + 7;
}
}
@@ -743,8 +743,8 @@ void CreateItemMenuIcon(u16 itemId, u8 idx)
if (spriteId != MAX_SPRITES)
{
ptr[idx] = spriteId;
gSprites[spriteId].pos2.x = 24;
gSprites[spriteId].pos2.y = 140;
gSprites[spriteId].x2 = 24;
gSprites[spriteId].y2 = 140;
}
}
}
@@ -780,8 +780,8 @@ void sub_80989A0(u16 itemId, u8 idx)
if (spriteId != MAX_SPRITES)
{
ptr[idx] = spriteId;
gSprites[spriteId].pos2.x = 24;
gSprites[spriteId].pos2.y = 147;
gSprites[spriteId].x2 = 24;
gSprites[spriteId].y2 = 147;
}
}
}