Esempio n. 1
0
        private bool LoadFile( Stream stream )
        {
            string magic = stream.ReadAscii( 8 );
            uint floorInfoCount = stream.ReadUInt32().SwapEndian();
            uint refStringStart = stream.ReadUInt32().SwapEndian();

            FloorList = new List<FloorInfo>( (int)floorInfoCount );
            for ( uint i = 0; i < floorInfoCount; ++i ) {
                FloorInfo fi = new FloorInfo( stream, refStringStart );
                FloorList.Add( fi );
            }

            return true;
        }
Esempio n. 2
0
        private bool LoadFile(Stream stream)
        {
            string magic          = stream.ReadAscii(8);
            uint   floorInfoCount = stream.ReadUInt32().SwapEndian();
            uint   refStringStart = stream.ReadUInt32().SwapEndian();

            FloorList = new List <FloorInfo>((int)floorInfoCount);
            for (uint i = 0; i < floorInfoCount; ++i)
            {
                FloorInfo fi = new FloorInfo(stream, refStringStart);
                FloorList.Add(fi);
            }

            return(true);
        }
Esempio n. 3
0
        private bool LoadFile(Stream stream, Util.Endianness endian, Util.Bitness bits)
        {
            string magic          = stream.ReadAscii(8);
            uint   floorInfoCount = stream.ReadUInt32().FromEndian(endian);
            uint   refStringStart = stream.ReadUInt32().FromEndian(endian);

            FloorList = new List <FloorInfo>((int)floorInfoCount);
            for (uint i = 0; i < floorInfoCount; ++i)
            {
                FloorInfo fi = new FloorInfo(stream, refStringStart, endian, bits);
                FloorList.Add(fi);
            }

            return(true);
        }
Esempio n. 4
0
        private bool LoadFile(Stream stream, EndianUtils.Endianness endian, BitUtils.Bitness bits)
        {
            string magic = stream.ReadAscii(8);

            if (magic != "T8BTXTMA")
            {
                throw new Exception("Invalid magic.");
            }
            uint floorInfoCount = stream.ReadUInt32().FromEndian(endian);
            uint refStringStart = stream.ReadUInt32().FromEndian(endian);

            FloorList = new List <FloorInfo>((int)floorInfoCount);
            for (uint i = 0; i < floorInfoCount; ++i)
            {
                FloorInfo fi = new FloorInfo(stream, refStringStart, endian, bits);
                FloorList.Add(fi);
            }

            return(true);
        }