diff --git a/FreeMote.Tests/FreeMoteTest.cs b/FreeMote.Tests/FreeMoteTest.cs index 491c09f..ca4e64f 100644 --- a/FreeMote.Tests/FreeMoteTest.cs +++ b/FreeMote.Tests/FreeMoteTest.cs @@ -362,8 +362,8 @@ public void TestFlip() var path = Path.Combine(resPath, "base_00b33f69d51e22005fd754f79e494968", "2.bin"); var pixels = File.ReadAllBytes(path); var p1 = PostProcessing.UnswizzleTexture(pixels, 1024, 256, PixelFormat.Format32bppArgb); - var p2 = PostProcessing.FlipPs3Texture(p1, 1024, 256, PixelFormat.Format32bppArgb); - var p3 = PostProcessing.FlipPs3Texture(p2, 1024, 256, PixelFormat.Format32bppArgb); + var p2 = PostProcessing.FlipTexturePs3(p1, 1024, 256, PixelFormat.Format32bppArgb); + var p3 = PostProcessing.FlipTexturePs3(p2, 1024, 256, PixelFormat.Format32bppArgb); var p4 = PostProcessing.SwizzleTexture(p3, 1024, 256, PixelFormat.Format32bppArgb); Assert.IsTrue(pixels.SequenceEqual(p4.Take(pixels.Length))); diff --git a/FreeMote/PostProcessing.cs b/FreeMote/PostProcessing.cs index 7155ee7..474c61e 100644 --- a/FreeMote/PostProcessing.cs +++ b/FreeMote/PostProcessing.cs @@ -62,7 +62,7 @@ private static int GetTilePixelOffset(int t, int x, int y, int width, PixelForma /// /// /// - public static byte[] FlipPs3Texture(byte[] pixelData, int width, int height, PixelFormat pixelFormat) + public static byte[] FlipTexturePs3(byte[] pixelData, int width, int height, PixelFormat pixelFormat) { var lw = Math.Log(width, 2); if (lw != (int) lw) diff --git a/FreeMote/RL.cs b/FreeMote/RL.cs index 22f0c86..468e2f4 100644 --- a/FreeMote/RL.cs +++ b/FreeMote/RL.cs @@ -72,7 +72,7 @@ public static Bitmap ConvertToImage(byte[] data, int width, int height, break; case PsbPixelFormat.LeRGBA8_SW: data = PostProcessing.UnswizzleTexture(data, bmp.Width, bmp.Height, bmp.PixelFormat); - data = PostProcessing.FlipPs3Texture(data, width, height, bmp.PixelFormat); + data = PostProcessing.FlipTexturePs3(data, width, height, bmp.PixelFormat); break; case PsbPixelFormat.LeRGBA4444_SW: data = Argb428(data); @@ -202,7 +202,7 @@ private static byte[] PixelBytesFromImage(Bitmap bmp, PsbPixelFormat pixelFormat Switch_0_2(ref result); break; case PsbPixelFormat.LeRGBA8_SW: - result = PostProcessing.FlipPs3Texture(result, bmp.Width, bmp.Height, bmp.PixelFormat); + result = PostProcessing.FlipTexturePs3(result, bmp.Width, bmp.Height, bmp.PixelFormat); result = PostProcessing.SwizzleTexture(result, bmp.Width, bmp.Height, bmp.PixelFormat); break; case PsbPixelFormat.TileLeRGBA8_SW: