diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-07-07 09:11:52 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-07-07 09:11:52 -0400 |
commit | 810ca5f8ff79aeec6ffe8e982f4786aade616b4d (patch) | |
tree | 7732fc02ff8ced046cedcbd9643122aba7c7706a /src/hall_of_fame.c | |
parent | 3964820a84e4819bb807d601d2c3c7b196f764e8 (diff) |
Flatten pos fields in struct Sprite
Diffstat (limited to 'src/hall_of_fame.c')
-rw-r--r-- | src/hall_of_fame.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 3eb8d3f0a..bfe4beb94 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -712,9 +712,9 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) { gTasks[taskId].tFrameCount--; } - else if (gSprites[gTasks[taskId].tPlayerSpriteID].pos1.x != 192) + else if (gSprites[gTasks[taskId].tPlayerSpriteID].x != 192) { - gSprites[gTasks[taskId].tPlayerSpriteID].pos1.x++; + gSprites[gTasks[taskId].tPlayerSpriteID].x++; } else { @@ -1340,18 +1340,18 @@ static bool8 sub_8175024(void) static void SpriteCB_GetOnScreenAndAnimate(struct Sprite *sprite) { - if (sprite->pos1.x != sprite->tDestinationX - || sprite->pos1.y != sprite->tDestinationY) + if (sprite->x != sprite->tDestinationX + || sprite->y != sprite->tDestinationY) { - if (sprite->pos1.x < sprite->tDestinationX) - sprite->pos1.x += 15; - if (sprite->pos1.x > sprite->tDestinationX) - sprite->pos1.x -= 15; - - if (sprite->pos1.y < sprite->tDestinationY) - sprite->pos1.y += 10; - if (sprite->pos1.y > sprite->tDestinationY) - sprite->pos1.y -= 10; + if (sprite->x < sprite->tDestinationX) + sprite->x += 15; + if (sprite->x > sprite->tDestinationX) + sprite->x -= 15; + + if (sprite->y < sprite->tDestinationY) + sprite->y += 10; + if (sprite->y > sprite->tDestinationY) + sprite->y -= 10; } else { @@ -1373,7 +1373,7 @@ static void SpriteCB_GetOnScreenAndAnimate(struct Sprite *sprite) static void SpriteCB_HofConfetti(struct Sprite* sprite) { - if (sprite->pos2.y > 120) + if (sprite->y2 > 120) { DestroySprite(sprite); } @@ -1382,12 +1382,12 @@ static void SpriteCB_HofConfetti(struct Sprite* sprite) u16 rand; u8 sineIdx; - sprite->pos2.y++; - sprite->pos2.y += sprite->sExtraY; + sprite->y2++; + sprite->y2 += sprite->sExtraY; sineIdx = sprite->sSineIdx; rand = (Random() % 4) + 8; - sprite->pos2.x = rand * gSineTable[sineIdx] / 256; + sprite->x2 = rand * gSineTable[sineIdx] / 256; sprite->sSineIdx += 4; } |