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/rotating_gate.c | |
parent | 3964820a84e4819bb807d601d2c3c7b196f764e8 (diff) |
Flatten pos fields in struct Sprite
Diffstat (limited to 'src/rotating_gate.c')
-rw-r--r-- | src/rotating_gate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 36c23c2a5..a185d9a14 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -755,7 +755,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY) sprite->data[0] = gateId; sprite->coordOffsetEnabled = 1; - GetMapCoordsFromSpritePos(x + deltaX, y + deltaY, &sprite->pos1.x, &sprite->pos1.y); + GetMapCoordsFromSpritePos(x + deltaX, y + deltaY, &sprite->x, &sprite->y); RotatingGate_HideGatesOutsideViewport(sprite); StartSpriteAffineAnim(sprite, RotatingGate_GetGateOrientation(gateId)); @@ -800,8 +800,8 @@ static void RotatingGate_HideGatesOutsideViewport(struct Sprite *sprite) s16 x2, y2; sprite->invisible = FALSE; - x = sprite->pos1.x + sprite->pos2.x + sprite->centerToCornerVecX + gSpriteCoordOffsetX; - y = sprite->pos1.y + sprite->pos2.y + sprite->centerToCornerVecY + gSpriteCoordOffsetY; + x = sprite->x + sprite->x2 + sprite->centerToCornerVecX + gSpriteCoordOffsetX; + y = sprite->y + sprite->y2 + sprite->centerToCornerVecY + gSpriteCoordOffsetY; x2 = x + 0x40; // Dimensions of the rotating gate y2 = y + 0x40; |