Skip to content

Commit

Permalink
Added two pixel format decoders
Browse files Browse the repository at this point in the history
Verified a previously disabled pixel format decoder (L4) and enabled it, along with another (A4) that's assumed to work now as well; thanks Ehm2k
  • Loading branch information
xdanieldzd committed Mar 2, 2016
1 parent 7834fbe commit 44119f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Tharsis/Images/TileCodecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ internal static class TileCodecs
/* ETC1 */ new Codec(Pica.DataTypes.UnsignedByte, Pica.PixelFormats.ETC1RGB8NativeDMP, DecodeETC1, null),
/* ETC1_A4 */ new Codec(Pica.DataTypes.UnsignedByte, Pica.PixelFormats.ETC1AlphaRGB8A4NativeDMP, DecodeETC1_A4, null),
/* A8 */ new Codec(Pica.DataTypes.UnsignedByte, Pica.PixelFormats.AlphaNativeDMP, DecodeA8, EncodeA8),
/* A4 */ new Codec(Pica.DataTypes.Unsigned4BitsDMP, Pica.PixelFormats.AlphaNativeDMP, null /*DecodeA4*/, null),
/* A4 */ new Codec(Pica.DataTypes.Unsigned4BitsDMP, Pica.PixelFormats.AlphaNativeDMP, DecodeA4, null),
/* L8 */ new Codec(Pica.DataTypes.UnsignedByte, Pica.PixelFormats.LuminanceNativeDMP, DecodeL8, EncodeL8),
/* L4 */ new Codec(Pica.DataTypes.Unsigned4BitsDMP, Pica.PixelFormats.LuminanceNativeDMP, null /*DecodeL4*/, null),
/* L4 */ new Codec(Pica.DataTypes.Unsigned4BitsDMP, Pica.PixelFormats.LuminanceNativeDMP, DecodeL4, null),
/* LA88 */ new Codec(Pica.DataTypes.UnsignedByte, Pica.PixelFormats.LuminanceAlphaNativeDMP, DecodeLA88, EncodeLA88),
/* LA44 */ new Codec(Pica.DataTypes.UnsignedByte44DMP, Pica.PixelFormats.LuminanceAlphaNativeDMP, DecodeLA44, EncodeLA44)
};
Expand Down Expand Up @@ -221,7 +221,6 @@ private static void DecodeA8(BinaryReader reader, byte[] targetData, int x, int

private static void DecodeA4(BinaryReader reader, byte[] targetData, int x, int y, int width, int height)
{
// TODO: fixme?
for (int t = 0; t < tileOrder.Length; t += 2)
{
byte a4 = reader.ReadByte();
Expand Down Expand Up @@ -251,7 +250,6 @@ private static void DecodeL8(BinaryReader reader, byte[] targetData, int x, int

private static void DecodeL4(BinaryReader reader, byte[] targetData, int x, int y, int width, int height)
{
// TODO: fixme?
for (int t = 0; t < tileOrder.Length; t += 2)
{
byte l4 = reader.ReadByte();
Expand Down
2 changes: 1 addition & 1 deletion Tharsis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void Main(string[] args)
Console.Title = Path.GetFileName(ApplicationPath);

StringBuilder headerString = new StringBuilder();
headerString.AppendFormat("Tharsis {0}.{1} - Generic Game File Converter\n", ApplicationVersion.Major, ApplicationVersion.Minor);
headerString.AppendFormat("Tharsis v{0}.{1}.{2} - Generic Game File Converter\n", ApplicationVersion.Major, ApplicationVersion.Minor, ApplicationVersion.Build);
headerString.Append("Written 2014-2016 by xdaniel - http://magicstone.de/dzd/");

Console.WriteLine(headerString.ToString().Center(2).StyleLine(LineType.Overline | LineType.Underline));
Expand Down
4 changes: 2 additions & 2 deletions Tharsis/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.0.0")]
[assembly: AssemblyFileVersion("0.9.0.0")]
[assembly: AssemblyVersion("0.9.1.0")]
[assembly: AssemblyFileVersion("0.9.1.0")]

0 comments on commit 44119f9

Please sign in to comment.