diff options
author | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2021-05-23 10:51:26 -0400 |
---|---|---|
committer | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2021-05-23 10:51:26 -0400 |
commit | c723d980e772f7e7ab82dbcb7ad07132c09ab5b4 (patch) | |
tree | 0bed002b2990b9e837220618a321f3b6517a1099 /src/rotating_gate.c | |
parent | c50a21fba07db80ac44c6f09fd202ba4b2e2c7d3 (diff) | |
parent | ffbbc88801de3fc56d0bf5f0af1418ca7cfcfa4f (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald
Diffstat (limited to 'src/rotating_gate.c')
-rw-r--r-- | src/rotating_gate.c | 5 |
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)); |