summaryrefslogtreecommitdiff
path: root/src/rotating_gate.c
diff options
context:
space:
mode:
authorKDSKardabox <bollygame94@gmail.com>2018-04-18 22:10:26 +0530
committerKDSKardabox <bollygame94@gmail.com>2018-04-18 22:10:26 +0530
commit0bab373f49bec5a945c5e4fa9829397a4dc10415 (patch)
tree0b4549dafc10f6811213b17e64884a728794c795 /src/rotating_gate.c
parent7700fe61fed39ecda329db5087ca30e3eb3335ee (diff)
Perform requested changes
Diffstat (limited to 'src/rotating_gate.c')
-rw-r--r--src/rotating_gate.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/rotating_gate.c b/src/rotating_gate.c
index ac03508bf..f1cb8d1a0 100644
--- a/src/rotating_gate.c
+++ b/src/rotating_gate.c
@@ -646,7 +646,7 @@ static void RotatingGate_ResetAllGateOrientations(void)
s32 i;
u8 *ptr;
- ptr = (u8 *)GetVarPointer(0x4000);
+ ptr = (u8 *)GetVarPointer(VAR_0x4000);
for (i = 0; i < gRotatingGate_PuzzleCount; i++)
{
@@ -656,12 +656,12 @@ static void RotatingGate_ResetAllGateOrientations(void)
static s32 RotatingGate_GetGateOrientation(u8 gateId)
{
- return ((u8 *)GetVarPointer(0x4000))[gateId];
+ return ((u8 *)GetVarPointer(VAR_0x4000))[gateId];
}
static void RotatingGate_SetGateOrientation(u8 gateId, u8 orientation)
{
- ((u8 *)GetVarPointer(0x4000))[gateId] = orientation;
+ ((u8 *)GetVarPointer(VAR_0x4000))[gateId] = orientation;
}
static void RotatingGate_RotateInDirection(u8 gateId, u32 rotationDirection)
@@ -671,18 +671,12 @@ static void RotatingGate_RotateInDirection(u8 gateId, u32 rotationDirection)
if (rotationDirection == ROTATE_ANTICLOCKWISE)
{
if (orientation)
- {
orientation--;
- }
else
- {
orientation = GATE_ORIENTATION_270;
- }
}
else
- {
orientation = ++orientation % GATE_ORIENTATION_MAX;
- }
RotatingGate_SetGateOrientation(gateId, orientation);
}
@@ -776,8 +770,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY)
return spriteId;
}
-/*
-static*/ void SpriteCallback_RotatingGate(struct Sprite *sprite)
+static void SpriteCallback_RotatingGate(struct Sprite *sprite)
{
u8 rotationDirection;
u8 orientation;
@@ -812,8 +805,7 @@ static*/ void SpriteCallback_RotatingGate(struct Sprite *sprite)
sprite->data[1] = ROTATE_NONE;
}
-/*
-static*/ void RotatingGate_HideGatesOutsideViewport(struct Sprite *sprite)
+static void RotatingGate_HideGatesOutsideViewport(struct Sprite *sprite)
{
u16 x;
s16 x2;