Skip to content

Commit

Permalink
Fixing alignment of Chaotix sprites.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Sep 21, 2015
1 parent 9e31e55 commit 8b27b8f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions SonLVLAPI/DataTypes.cs
Expand Up @@ -2432,19 +2432,15 @@ public void SaveChaotixSprite(string filename)
xr = x + 1;
break;
}
xl &= ~1;
if ((xr - xl) % 2 != 0)
{
if (xr != Width)
++xr;
else
--xl;
}
++xr;
result.Add((byte)(sbyte)(xl + Left));
result.Add((byte)(sbyte)(xr + Left));
result.Add((byte)(sbyte)(y + Top));
result.Add((byte)0);
for (int x = xl; x < xr; x++)
result.Add(Image[x, y]);
result.Add((byte)(x < Width ? Image[x, y] : 0));
}
result.AddRange(ByteConverter.GetBytes((short)0));
if (result.Count % 4 != 0)
Expand Down

0 comments on commit 8b27b8f

Please sign in to comment.