Exemplo n.º 1
0
 public Hexi(int off, RDForm.MI mi)
 {
     this.off = off;
     this.mi = mi;
 }
Exemplo n.º 2
0
 private M4 Parse4_02(TreeNode tn, int xoff, ReadBar.Barent ent)
 {
     MemoryStream memoryStream = new MemoryStream(ent.bin, false);
     BinaryReader binaryReader = new BinaryReader(memoryStream);
     memoryStream.Position = 144L;
     int num = binaryReader.ReadInt32();
     if (num != 2)
     {
         throw new NotSupportedException("@90 != 2");
     }
     memoryStream.Position = 160L;
     int num2 = binaryReader.ReadInt32();
     binaryReader.ReadUInt16();
     int num3 = (int)binaryReader.ReadUInt16();
     int num4 = binaryReader.ReadInt32();
     int num5 = binaryReader.ReadInt32();
     List<int[]> list = new List<int[]>();
     for (int i = 0; i < num3; i++)
     {
         memoryStream.Position = (long)(144 + num4 + 4 * i);
         int num6 = binaryReader.ReadInt32();
         memoryStream.Position = (long)(144 + num6);
         List<int> list2 = new List<int>();
         while (true)
         {
             int num7 = (int)binaryReader.ReadUInt16();
             if (num7 == 65535)
             {
                 break;
             }
             list2.Add(num7);
         }
         list.Add(list2.ToArray());
     }
     List<int> list3 = new List<int>();
     memoryStream.Position = (long)(144 + num5);
     for (int j = 0; j < 1; j++)
     {
         int num8 = binaryReader.ReadInt32();
         memoryStream.Position = (long)(144 + num8);
         for (int k = 0; k < num2; k++)
         {
             list3.Add((int)binaryReader.ReadUInt16());
         }
     }
     List<Vifpli> list4 = new List<Vifpli>();
     for (int l = 0; l < num2; l++)
     {
         memoryStream.Position = (long)(176 + 16 * l);
         int num9 = binaryReader.ReadInt32();
         int num10 = binaryReader.ReadInt32();
         MemoryStream memoryStream2 = new MemoryStream();
         while (true)
         {
             memoryStream.Position = (long)(144 + num9);
             int num11 = binaryReader.ReadInt32();
             int num12 = num11 & 65535;
             binaryReader.ReadInt32();
             byte[] array = binaryReader.ReadBytes(8 + 16 * num12);
             memoryStream2.Write(array, 0, array.Length);
             if (num11 >> 28 == 6)
             {
                 break;
             }
             num9 += 16 + 16 * num12;
         }
         byte[] vifpkt = memoryStream2.ToArray();
         list4.Add(new Vifpli(vifpkt, num10));
         TreeNode treeNode = tn.Nodes.Add(string.Format("vifpkt{0} ({1})", l, num10));
         RDForm.MI mI = new RDForm.MI();
         mI.Add("vifpkt", xoff + 144 + num9);
         treeNode.Tag = new RDForm.Vifi(xoff + 144 + num9, mI, vifpkt);
     }
     return new M4
     {
         alb1t2 = list3,
         alb2 = list,
         alvifpkt = list4
     };
 }
Exemplo n.º 3
0
 private MTex ParseTex_TIMf(TreeNode tn, int xoff, MemoryStream si, BinaryReader br)
 {
     br.ReadInt32();
     br.ReadInt32();
     int num = br.ReadInt32();
     int num2 = br.ReadInt32();
     int num3 = br.ReadInt32();
     int num4 = br.ReadInt32();
     int num5 = br.ReadInt32();
     br.ReadInt32();
     br.ReadInt32();
     SortedDictionary<int, int> sortedDictionary = new SortedDictionary<int, int>();
     si.Position = (long)num3;
     for (int i = 0; i < num2; i++)
     {
         sortedDictionary[i] = (int)br.ReadByte();
     }
     RDForm.Texctx texctx = new RDForm.Texctx();
     new List<int>();
     for (int j = 0; j < num + 1; j++)
     {
     }
     List<Bitmap> list = new List<Bitmap>();
     for (int k = 0; k < num2; k++)
     {
         int num6 = num4;
         si.Position = (long)(num6 + 32);
         texctx.Do1(si);
         int offBin = texctx.offBin;
         int num7 = num4 + 144 * (1 + sortedDictionary[k]);
         si.Position = (long)(num7 + 32);
         texctx.Do1(si);
         int offBin2 = texctx.offBin;
         int num8 = num5 + 160 * k + 32;
         si.Position = (long)num8;
         STim sTim = texctx.Do2(si);
         RDForm.MI mI = new RDForm.MI();
         mI.Add("offp1pal", xoff + num6);
         mI.Add("offp1tex", xoff + num7);
         mI.Add("offp2", xoff + num8);
         mI.Add("offTex", xoff + offBin2);
         mI.Add("offPal", xoff + offBin);
         TreeNode treeNode = tn.Nodes.Add(string.Format("tex{0} ({1})", k, texctx.t0PSM));
         treeNode.Tag = new RDForm.Texi(xoff + offBin2, mI, sTim);
         list.Add(sTim.Generate());
     }
     return new MTex(list);
 }