示例#1
0
        /// <summary>
        /// Reads CTR model from BinaryReader.
        /// </summary>
        /// <param name="br">BinaryReader object.</param>
        public void Read(BinaryReaderEx br)
        {
            name      = br.ReadStringFixed(16);
            gameEvent = (CTREvent)br.ReadInt16();
            int numEntries = br.ReadInt16();

            ptrHeaders = br.ReadUIntPtr();

            for (int i = 0; i < numEntries; i++)
            {
                Entries.Add(new CtrMesh(br));
            }
        }
示例#2
0
        public void Read(BinaryReaderEx br)
        {
            Console.WriteLine(br.BaseStream.Position.ToString("X8"));

            name      = br.ReadStringFixed(16);
            gameEvent = (CTREvent)br.ReadInt16();
            int numEntries = br.ReadInt16();

            ptrHeaders = br.ReadInt32();

            Console.WriteLine("LODModel: " + name);

            for (int i = 0; i < numEntries; i++)
            {
                Entries.Add(new CtrHeader(br));
            }

            //Helpers.WriteToFile("test.obj", sb.ToString());
        }