Beispiel #1
0
        public void ReadFromFile(BinaryReader reader)
        {
            if (!Directory.Exists("Prefabs"))
            {
                Directory.CreateDirectory("Prefabs");
            }

            sizeOfFile  = reader.ReadInt32();
            unk01       = reader.ReadInt32();
            sizeOfFile2 = reader.ReadInt32();
            prefabs     = new PrefabStruct[unk01];

            for (int i = 0; i != unk01; i++)
            {
                prefabs[i] = new PrefabStruct();
                prefabs[i].ReadFromFile(reader);
            }
            if (reader.BaseStream.Position == reader.BaseStream.Length)
            {
                MessageBox.Show("Debug: Found EOF!");
            }
            else
            {
                MessageBox.Show("Debug: Not Found EOF! This may contain more data!");
            }
        }
Beispiel #2
0
        public void ReadFromFile(BinaryReader reader)
        {
            sizeOfFile  = reader.ReadInt32();
            unk01       = reader.ReadInt32();
            sizeOfFile2 = reader.ReadInt32();
            prefabs     = new PrefabStruct[unk01];

            for (int i = 0; i != unk01; i++)
            {
                prefabs[i] = new PrefabStruct();
                prefabs[i].ReadFromFile(reader);
            }
            if (reader.BaseStream.Position == reader.BaseStream.Length)
            {
                Console.WriteLine("Reached EOF");
            }
        }
Beispiel #3
0
        public void ReadFromFile(BinaryReader reader)
        {
            if (!Directory.Exists("Prefabs"))
            {
                Directory.CreateDirectory("Prefabs");
            }

            sizeOfFile = reader.ReadInt32();
            int numPrefabs = reader.ReadInt32();

            sizeOfFile2 = reader.ReadInt32();
            Prefabs     = new PrefabStruct[numPrefabs];

            for (int i = 0; i < numPrefabs; i++)
            {
                Prefabs[i] = new PrefabStruct();
                Prefabs[i].ReadFromFile(reader);
            }

            Debug.Assert(reader.BaseStream.Position == reader.BaseStream.Position, "We did not reach the end of the prefab file!");
        }