Skip to content

Commit

Permalink
fixed GetGutterLinePos pram names
Browse files Browse the repository at this point in the history
  • Loading branch information
miatribe committed Sep 25, 2017
1 parent 3017675 commit d22e93e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GutterLines/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ private void DrawGutters(int playerX, int playerY)
g.FillRectangle(Brushes.Black, 20 * gridScale - lineOffset, 20 * gridScale - lineOffset, gridScale, gridScale);
}

private int GetGutterLinePos(int playerX, int mod)
private int GetGutterLinePos(int playerAxisPos, int mod)
{
int Gutter = playerX + (40 - (playerX % 40));
if (Gutter + mod > playerX + 20)
int Gutter = playerAxisPos + (40 - (playerAxisPos % 40));
if (Gutter + mod > playerAxisPos + 20)
{
Gutter = playerX - (playerX % 40);
Gutter = playerAxisPos - (playerAxisPos % 40);
}
return Gutter - playerX + 20 + mod;
return Gutter - playerAxisPos + 20 + mod;
}

#region form controls
Expand Down

0 comments on commit d22e93e

Please sign in to comment.