diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-18 20:24:39 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-18 20:24:39 -0500 |
commit | be716ef9f841589c67f152a90ce5c7c29f7211d8 (patch) | |
tree | af6b7422327908415f5aa9cbe64d97273076971a /src/field/rotating_gate.c | |
parent | 016b2d16bcc735053267b3b5e8cd597807db4055 (diff) |
change Sprite struct to use a data array instead of manual declares.
Diffstat (limited to 'src/field/rotating_gate.c')
-rw-r--r-- | src/field/rotating_gate.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/field/rotating_gate.c b/src/field/rotating_gate.c index e8ab7e1bf..a672f3489 100644 --- a/src/field/rotating_gate.c +++ b/src/field/rotating_gate.c @@ -762,7 +762,7 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY) y = gate->y + 7; sprite = &gSprites[spriteId]; - sprite->data0 = gateId; + sprite->data[0] = gateId; sprite->coordOffsetEnabled = 1; sub_8060388(x + deltaX, y + deltaY, &sprite->pos1.x, &sprite->pos1.y); @@ -778,8 +778,8 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) u8 orientation; u8 affineAnimation; - rotationDirection = sprite->data1; - orientation = sprite->data2; + rotationDirection = sprite->data[1]; + orientation = sprite->data[2]; RotatingGate_HideGatesOutsideViewport(sprite); @@ -804,7 +804,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) StartSpriteAffineAnim(sprite, affineAnimation); } - sprite->data1 = ROTATE_NONE; + sprite->data[1] = ROTATE_NONE; } static void RotatingGate_HideGatesOutsideViewport(struct Sprite *sprite) @@ -1065,8 +1065,8 @@ static void RotatingGate_TriggerRotationAnimation(u8 gateId, int rotationDirecti if (gRotatingGate_GateSpriteIds[gateId] != MAX_SPRITES) { sprite = &gSprites[gRotatingGate_GateSpriteIds[gateId]]; - sprite->data1 = rotationDirection; - sprite->data2 = RotatingGate_GetGateOrientation(gateId); + sprite->data[1] = rotationDirection; + sprite->data[2] = RotatingGate_GetGateOrientation(gateId); } } |