Exemple #1
0
        public void Read(BinaryReaderEx br)
        {
            texOff = br.ReadInt32();

            uint x = 0;

            do
            {
                x = br.ReadUInt32();
                if (x != 0)
                {
                    modOffs.Add(x);
                }
            }while (x != 0);


            br.Jump(texOff);

            map = new UImap(br);

            foreach (uint u in modOffs)
            {
                br.Jump(u);

                LODModel lod = new LODModel(br);
                lodmods.Add(lod);
            }
        }
Exemple #2
0
        public void Read(BinaryReaderEx br)
        {
            texOff = br.ReadInt32();

            uint        x       = 0;
            List <uint> modOffs = new List <uint>();

            do
            {
                x = br.ReadUInt32();
                if (x != 0)
                {
                    modOffs.Add(x);
                }
            }while (x != 0);


            br.Jump(texOff);

            map = new UImap(br);

            foreach (uint u in modOffs)
            {
                br.Jump(u);

                CtrModel lod = new CtrModel(br);
                dynamics.Add(lod);
            }
        }
Exemple #3
0
        public void Read(BinaryReaderEx br)
        {
            texOff = br.ReadInt32();

            //so here's what's going on, instead of  reading all pointers in a loop, we assume the 1st pointer is smallest, which is also where pointermap ends.
            //we get number of models and just read the array. this will shamelessly fail, if pointers are not sorted or models don't come after pointer map.
            int numModels = (br.ReadInt32() - 4) / 4 - 1;

            br.Seek(-4); //go back

            List <uint> modelPtrs = br.ReadListUInt32(numModels);


            br.Jump(texOff);

            map = new UImap(br);

            foreach (var ptr in modelPtrs)
            {
                br.Jump(ptr);
                Models.Add(CtrModel.FromReader(br));
            }
        }