private bool LoadFile( Stream stream )
        {
            string magic = stream.ReadAscii( 8 );
            uint infoCount = stream.ReadUInt32().SwapEndian();
            uint refStringStart = stream.ReadUInt32().SwapEndian();

            TreasureInfoList = new List<TreasureInfo>( (int)infoCount );
            for ( uint i = 0; i < infoCount; ++i ) {
                TreasureInfo ti = new TreasureInfo( stream, refStringStart );
                TreasureInfoList.Add( ti );
            }

            return true;
        }
Exemple #2
0
        private bool LoadFile(Stream stream, Util.Endianness endian, Util.Bitness bits)
        {
            string magic          = stream.ReadAscii(8);
            uint   infoCount      = stream.ReadUInt32().FromEndian(endian);
            uint   refStringStart = stream.ReadUInt32().FromEndian(endian);

            TreasureInfoList = new List <TreasureInfo>((int)infoCount);
            for (uint i = 0; i < infoCount; ++i)
            {
                TreasureInfo ti = new TreasureInfo(stream, refStringStart, endian, bits);
                TreasureInfoList.Add(ti);
            }

            return(true);
        }
Exemple #3
0
        private bool LoadFile(Stream stream)
        {
            string magic          = stream.ReadAscii(8);
            uint   infoCount      = stream.ReadUInt32().SwapEndian();
            uint   refStringStart = stream.ReadUInt32().SwapEndian();

            TreasureInfoList = new List <TreasureInfo>((int)infoCount);
            for (uint i = 0; i < infoCount; ++i)
            {
                TreasureInfo ti = new TreasureInfo(stream, refStringStart);
                TreasureInfoList.Add(ti);
            }

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

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

            TreasureInfoList = new List <TreasureInfo>((int)infoCount);
            for (uint i = 0; i < infoCount; ++i)
            {
                TreasureInfo ti = new TreasureInfo(stream, refStringStart, endian, bits);
                TreasureInfoList.Add(ti);
            }

            return(true);
        }