Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small adjustment to tile automap sort order calculations #87

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Murder/Assets/Graphics/TilesetAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ public void CalculateAndDrawAutoTile(RenderContext render, int x, int y, bool to

// Top Left Inside Corner
if (topLeft && topRight && botLeft && !botRight)
DrawTile(batch, x, y, 1, 3, alpha, color, blend, -1);
DrawTile(batch, x, y, 1, 3, alpha, color, blend, 1);

// Top Right Inside Corner
if (topLeft && topRight && !botLeft && botRight)
DrawTile(batch, x, y, 2, 3, alpha, color, blend, -1);
DrawTile(batch, x, y, 2, 3, alpha, color, blend, 1);

// Top Left Inside Corner
// Bottom Left Inside Corner
if (topLeft && !topRight && botLeft && botRight)
DrawTile(batch, x, y, 1, 4, alpha, color, blend, 1);

// Top Right Inside Corner
// Bottom Right Inside Corner
if (!topLeft && topRight && botLeft && botRight)
DrawTile(batch, x, y, 2, 4, alpha, color, blend, 1);

Expand Down
8 changes: 4 additions & 4 deletions src/Murder/Services/TileServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ public static (int tile, int sortAdjust) GetAutoTile(bool topLeft, bool topRight

// Top Left Inside Corner
if (topLeft && topRight && botLeft && !botRight)
return (Calculator.OneD(1, 3, 3), -1);
return (Calculator.OneD(1, 3, 3), 1);

// Top Right Inside Corner
if (topLeft && topRight && !botLeft && botRight)
return (Calculator.OneD(2, 3, 3), -1);
return (Calculator.OneD(2, 3, 3), 1);

// Top Left Inside Corner
// Bottom Left Inside Corner
if (topLeft && !topRight && botLeft && botRight)
return (Calculator.OneD(1, 4, 3), 1);

// Top Right Inside Corner
// Bottom Right Inside Corner
if (!topLeft && topRight && botLeft && botRight)
return (Calculator.OneD(2, 4, 3), 1);

Expand Down
Loading