Beispiel #1
0
 private void parseTexture(BAR.BARFile file, int barPos)
 {
     using (var br = new BinaryReader(new MemoryStream(file.data, false)))
     {
         int v0 = br.ReadInt32();
         if (v0 == 0)
         {
             ParseTIM(br, 0, barPos);
         }
         else if (v0 == -1)
         {
             v0 = br.ReadInt32();
             for (int j = 0; j < v0; j++)
             {
                 long lPos = br.BaseStream.Position + 4;
                 ParseTIM(br, br.ReadInt32(), barPos);
                 br.BaseStream.Position = lPos;
             }
         }
         else
         {
             throw new NotSupportedException("Unknown v0: " + v0);
         }
     }
 }
Beispiel #2
0
        public SrkTim(BAR.BARFile b)
        {
            this.barFile   = b;
            this.timBinary = new SrkBinary(ref this.barFile.data);

            this.DisplayTextures     = new Microsoft.Xna.Framework.Graphics.Texture2D[0];
            this.Palettes            = new List <System.Drawing.Color[]>(0);
            this.Bitmaps             = new List <Bitmap>(0);
            this.textureAddresses    = new List <int>(0);
            this.paletteAddresses    = new List <int>(0);
            this.Patches             = new List <Bitmap>(0);
            this.PatchIndexes        = new List <int>(0);
            this.PatchTextureIndexes = new List <int>(0);
            this.PatchCounts         = new List <int>(0);
            this.PatchSizes          = new List <Size>(0);
            this.PatchLocs           = new List <Point>(0);
        }
Beispiel #3
0
 public CatzTim(BAR.BARFile bar)
 {
     this.barFile = bar;
 }