public static void Save(string directory, string file, XCImageCollection images, int bpp)
{
System.IO.BinaryWriter pck = new System.IO.BinaryWriter(System.IO.File.Create(directory+"\\"+file+".pck"));
System.IO.BinaryWriter tab = new System.IO.BinaryWriter(System.IO.File.Create(directory+"\\"+file+TAB_EXT));
if(bpp==2)
{
ushort count=0;
foreach(XCImage img in images)
{
tab.Write((ushort)count);
ushort encLen = (ushort)PckImage.EncodePck(pck,img);
count+=encLen;
}
}
else
{
uint count=0;
foreach(XCImage img in images)
{
tab.Write((uint)count);
uint encLen = (uint)PckImage.EncodePck(pck,img);
count+=encLen;
}
}
pck.Close();
tab.Close();
}
}