diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-07-25 12:51:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 12:51:51 -0400 |
commit | 1150e16b68c5e6fc2c7baf56ab061cea69d69953 (patch) | |
tree | 55aafd11c76cb39fe2a83cc7839f5b0f7d7efa9c /src/item_menu_icons.c | |
parent | cd8ac0ed9b9e9f53979409bf1a99d62132e5001b (diff) | |
parent | aec808ac0d6266dc1c96ecf1aca998a06b11db19 (diff) |
Merge pull request #450 from PikalaxALT/flatten_sprite_pos
Flatten pos fields in struct Sprite
Diffstat (limited to 'src/item_menu_icons.c')
-rw-r--r-- | src/item_menu_icons.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 6e7e8b80b..174689413 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -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; } } } |