Skip to content

Commit

Permalink
PlatformImage: Fix mirrored 90 and 270 transforms for good.
Browse files Browse the repository at this point in the history
Both were still broken, and Dawn of Sorrow's double jump was lucky
enough to have the mirrored 90 rotation fit just well enough into
a sprite on the sheet that looked correct.
  • Loading branch information
AShiningRay committed Dec 11, 2024
1 parent 7e649a5 commit 999ad6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/recompile/mobile/PlatformImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public static final BufferedImage transformImage(final BufferedImage image, fina
int targetRow = height - 1 - y;
for (int x = 0; x < width; x++)
{
targetData[x * height + targetRow] = sourceData[y * width + x];
targetData[x * height + targetRow] = sourceData[y * width + (width - 1 - x)];
}
}
//dumpImage(image, "");
Expand All @@ -400,7 +400,7 @@ public static final BufferedImage transformImage(final BufferedImage image, fina
{
for (int x = 0; x < width; x++)
{
targetData[(width - 1 - x) * height + y] = sourceData[y * width + x];
targetData[(width - 1 - x) * height + y] = sourceData[y * width + (width - 1 - x)];
}
}
//dumpImage(image, "");
Expand Down

0 comments on commit 999ad6c

Please sign in to comment.