diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-01-19 22:17:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-19 22:17:37 -0500 |
commit | a7e6045d71d2d21c4fa5a494d112c6b38226eaec (patch) | |
tree | 2f0bd67223e68cbbee52749245aff70ebb90accb /src/rotating_gate.c | |
parent | 69759b2d128ea27f3bc9ebdb7e58ea3698d0a491 (diff) | |
parent | f899a02ac642e66ab9b6baa28903921863529171 (diff) |
Merge pull request #1597 from GriffinRichards/misc-cleanup
Miscellaneous fixes
Diffstat (limited to 'src/rotating_gate.c')
-rw-r--r-- | src/rotating_gate.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 23fbb3e1d..3f73698a8 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -684,13 +684,11 @@ static void RotatingGate_LoadPuzzleConfig(void) { case PUZZLE_FORTREE_CITY_GYM: gRotatingGate_PuzzleConfig = sRotatingGate_FortreePuzzleConfig; - gRotatingGate_PuzzleCount = - sizeof(sRotatingGate_FortreePuzzleConfig) / sizeof(struct RotatingGatePuzzle); + gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_FortreePuzzleConfig); break; case PUZZLE_ROUTE110_TRICK_HOUSE_PUZZLE6: gRotatingGate_PuzzleConfig = sRotatingGate_TrickHousePuzzleConfig; - gRotatingGate_PuzzleCount = - sizeof(sRotatingGate_TrickHousePuzzleConfig) / sizeof(struct RotatingGatePuzzle); + gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_TrickHousePuzzleConfig); break; case PUZZLE_NONE: default: @@ -698,9 +696,7 @@ static void RotatingGate_LoadPuzzleConfig(void) } for (i = 0; i < ROTATING_GATE_PUZZLE_MAX - 1; i++) - { gRotatingGate_GateSpriteIds[i] = MAX_SPRITES; - } } static void RotatingGate_CreateGatesWithinViewport(s16 deltaX, s16 deltaY) @@ -773,7 +769,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) { affineAnimation = orientation + 4; - if (GetPlayerSpeed() != 1) + if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL) affineAnimation += 8; PlaySE(SE_ROTATING_GATE); @@ -783,7 +779,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) { affineAnimation = orientation + 8; - if (GetPlayerSpeed() != 1) + if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL) affineAnimation += 8; PlaySE(SE_ROTATING_GATE); |