summaryrefslogtreecommitdiff
path: root/src/rotating_gate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rotating_gate.c')
-rw-r--r--src/rotating_gate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rotating_gate.c b/src/rotating_gate.c
index 162eb3e6d..36c23c2a5 100644
--- a/src/rotating_gate.c
+++ b/src/rotating_gate.c
@@ -670,7 +670,8 @@ static void RotatingGate_RotateInDirection(u8 gateId, u32 rotationDirection)
}
else
{
- orientation = ++orientation % GATE_ORIENTATION_MAX;
+ orientation++;
+ orientation = orientation % GATE_ORIENTATION_MAX;
}
RotatingGate_SetGateOrientation(gateId, orientation);
}
@@ -754,7 +755,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY)
sprite->data[0] = gateId;
sprite->coordOffsetEnabled = 1;
- sub_8092FF0(x + deltaX, y + deltaY, &sprite->pos1.x, &sprite->pos1.y);
+ GetMapCoordsFromSpritePos(x + deltaX, y + deltaY, &sprite->pos1.x, &sprite->pos1.y);
RotatingGate_HideGatesOutsideViewport(sprite);
StartSpriteAffineAnim(sprite, RotatingGate_GetGateOrientation(gateId));