Fix btye order for image decoding gc images
This commit is contained in:
parent
0699a50408
commit
419a76a508
@ -541,7 +541,7 @@ namespace Toolbox.Library.Animations
|
|||||||
if (child is Animation)
|
if (child is Animation)
|
||||||
{
|
{
|
||||||
((Animation)child).SetFrame(Frame);
|
((Animation)child).SetFrame(Frame);
|
||||||
((Animation)child).NextFrame(skeleton, isChild: true);
|
((Animation)child).NextFrame(skeleton, isChild, AdancedNextFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,10 +216,10 @@ namespace Toolbox.Library.Animations
|
|||||||
file.WriteLine("startTime " + 1 + ";");
|
file.WriteLine("startTime " + 1 + ";");
|
||||||
file.WriteLine("endTime " + a.FrameCount + ";");
|
file.WriteLine("endTime " + a.FrameCount + ";");
|
||||||
|
|
||||||
a.SetFrame(a.FrameCount - 1); //from last frame
|
// a.SetFrame(a.FrameCount - 1); //from last frame
|
||||||
for (int li = 0; li < a.FrameCount; ++li) //go through each frame with nextFrame
|
// for (int li = 0; li < a.FrameCount; ++li) //go through each frame with nextFrame
|
||||||
a.NextFrame(vbn);
|
// a.NextFrame(vbn);
|
||||||
a.NextFrame(vbn); //go on first frame
|
// a.NextFrame(vbn, false); //go on first frame
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -190,6 +190,8 @@ namespace Toolbox.Library
|
|||||||
|
|
||||||
private static byte[] DecodeData(FileReader stream, uint width, uint height, TextureFormats format, Palette imagePalette, PaletteFormats paletteFormat)
|
private static byte[] DecodeData(FileReader stream, uint width, uint height, TextureFormats format, Palette imagePalette, PaletteFormats paletteFormat)
|
||||||
{
|
{
|
||||||
|
stream.SetByteOrder(true);
|
||||||
|
|
||||||
switch (format)
|
switch (format)
|
||||||
{
|
{
|
||||||
case TextureFormats.I4:
|
case TextureFormats.I4:
|
||||||
@ -686,7 +688,7 @@ namespace Toolbox.Library
|
|||||||
|
|
||||||
private static byte[] DecodeRgb5A3(FileReader stream, uint width, uint height)
|
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
|
uint numBlocksH = height / 4; //4 byte block height
|
||||||
|
|
||||||
byte[] decodedData = new byte[width * height * 4];
|
byte[] decodedData = new byte[width * height * 4];
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user