Пример #1
0
        public void ReadEnd(byte[] memory)
        {
            EndOfStruct endChunk = new EndOfStruct();

            endChunk.data = new byte[memory.Length - readerpos];
            for (int i = 0; i < 68; i++)
            {
                endChunk.data[i] = memory[readerpos + i];
            }
            readerpos += 68;
            Mesh.End   = endChunk;
        }
Пример #2
0
        public void ReadEnd(byte[] memory)
        {
            #region End
            EndOfStruct endChunk = new EndOfStruct();
            endChunk.data = new byte[memory.Length - readerpos];

            TreeNode res = new TreeNode("Last chunk, 0x" + readerpos.ToString("X4"));

            TreeNode End = new TreeNode("Data");
            string s = ""; //here start some unknown chunks

            // unknown 8 bytes, probably integer
            for (int i = 0; i < 8; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 1 [6]: " + s);


            // same, 8 byte int
            s = "";
            for (int i = 8; i < 16; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 2 [8]: " + s);

            // 4 bytes, always zero
            s = "";
            for (int i = 16; i < 20; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 3 [4]: " + s);

            //4 bytes, always 0x1
            s = "";
            for (int i = 20; i < 24; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 4 [4]: " + s);

            //then some 8 bytes of unknown data
            s = "";
            for (int i = 24; i < 32; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 5 [8]: " + s);

            // 6 bytes, always zero
            s = "";
            for (int i = 32; i < 38; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 6 [6]: " + s);

            //4 bytes data
            s = "";
            for (int i = 38; i < 42; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 7 [4]: " + s);

            //6 bytes zeroes
            s = "";
            for (int i = 42; i < 48; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 8 [6]: " + s);


            //4 bytes zeroes
            s = "";
            for (int i = 48; i < 52; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 9 [4]: " + s);

            //and finally 16 bytes of some data
            s = "";
            for (int i = 52; i < 68; i++)
            {
                endChunk.data[i] = memory[readerpos];
                s += memory[readerpos].ToString("X2") + " ";
                readerpos += 1;
            }
            End.Nodes.Add("Unknown 10 [16]: " + s);
            Mesh.End = endChunk;
            res.Nodes.Add(End);
            Mesh.End.t = End;

            #endregion
        }
Пример #3
0
 public void ReadEnd(byte[] memory)
 {
     EndOfStruct endChunk = new EndOfStruct();
     endChunk.data = new byte[memory.Length - readerpos];
     for (int i = 0; i < 68; i++)
         endChunk.data[i] = memory[readerpos + i];
     readerpos += 68;
     Mesh.End = endChunk;
 }