Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu committed Aug 20, 2022
1 parent 365808d commit 46c59f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions FreeMote.Tests/FreeMoteTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down
2 changes: 1 addition & 1 deletion FreeMote/PostProcessing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static int GetTilePixelOffset(int t, int x, int y, int width, PixelForma
/// <param name="pixelFormat"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
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)
Expand Down
4 changes: 2 additions & 2 deletions FreeMote/RL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 46c59f8

Please sign in to comment.