Skip to content

Commit

Permalink
fix revo CI8 image export #139
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu committed Nov 23, 2024
1 parent 1984648 commit 0bfc6f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FreeMote.Psb/Types/MapType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ private List<ImageMetadata> FindTileResources(PSB psb, bool deDuplication)
}

var md = PsbResHelper.GenerateImageMetadata(image, null);
if (obj.ContainsKey("label") && (string.IsNullOrEmpty(md.Name) || md.Name == "image"))
{
md.Name = obj["label"].ToString();
}
md.PsbType = PsbType.Map;
md.Spec = psb.Platform;
resList.Add(md);
Expand Down
4 changes: 4 additions & 0 deletions FreeMote/PostProcessing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ public static byte[] UntileTextureRvl(byte[] pixelData, int width, int height, i

if (!compactMode)
{
if (dataIndex >= pixelData.Length)
{
break;
}
Buffer.BlockCopy(pixelData, dataIndex, untiledData, pixelIndex, bpp);
dataIndex += bpp;
}
Expand Down

0 comments on commit 0bfc6f8

Please sign in to comment.