1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Fix btye order for image decoding gc images

This commit is contained in:
KillzXGaming 2019-07-19 17:24:54 -04:00
parent 0699a50408
commit 419a76a508
5 changed files with 8 additions and 6 deletions

View File

@ -541,7 +541,7 @@ namespace Toolbox.Library.Animations
if (child is Animation)
{
((Animation)child).SetFrame(Frame);
((Animation)child).NextFrame(skeleton, isChild: true);
((Animation)child).NextFrame(skeleton, isChild, AdancedNextFrame);
}
}

View File

@ -216,10 +216,10 @@ namespace Toolbox.Library.Animations
file.WriteLine("startTime " + 1 + ";");
file.WriteLine("endTime " + a.FrameCount + ";");
a.SetFrame(a.FrameCount - 1); //from last frame
for (int li = 0; li < a.FrameCount; ++li) //go through each frame with nextFrame
a.NextFrame(vbn);
a.NextFrame(vbn); //go on first frame
// a.SetFrame(a.FrameCount - 1); //from last frame
// for (int li = 0; li < a.FrameCount; ++li) //go through each frame with nextFrame
// a.NextFrame(vbn);
// a.NextFrame(vbn, false); //go on first frame
int i = 0;

View File

@ -190,6 +190,8 @@ namespace Toolbox.Library
private static byte[] DecodeData(FileReader stream, uint width, uint height, TextureFormats format, Palette imagePalette, PaletteFormats paletteFormat)
{
stream.SetByteOrder(true);
switch (format)
{
case TextureFormats.I4:
@ -686,7 +688,7 @@ namespace Toolbox.Library
private static byte[] DecodeRgb5A3(FileReader stream, uint width, uint height)
{
uint numBlocksW = width / 4; //4 byte block width
uint numBlocksW = width / 4; //4 byte block width
uint numBlocksH = height / 4; //4 byte block height
byte[] decodedData = new byte[width * height * 4];

Binary file not shown.

Binary file not shown.