示例#1
0
        private bool LoadFile( Stream stream )
        {
            string magic = stream.ReadAscii( 8 );
            uint entryCount = stream.ReadUInt32().SwapEndian();
            uint refStringStart = stream.ReadUInt32().SwapEndian();

            GradeShopEntryList = new List<GradeShopEntry>( (int)entryCount );
            for ( uint i = 0; i < entryCount; ++i ) {
                GradeShopEntry e = new GradeShopEntry( stream, refStringStart );
                GradeShopEntryList.Add( e );
            }

            return true;
        }
示例#2
0
        private bool LoadFile(Stream stream)
        {
            string magic          = stream.ReadAscii(8);
            uint   entryCount     = stream.ReadUInt32().SwapEndian();
            uint   refStringStart = stream.ReadUInt32().SwapEndian();

            GradeShopEntryList = new List <GradeShopEntry>((int)entryCount);
            for (uint i = 0; i < entryCount; ++i)
            {
                GradeShopEntry e = new GradeShopEntry(stream, refStringStart);
                GradeShopEntryList.Add(e);
            }

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

            GradeShopEntryList = new List <GradeShopEntry>((int)entryCount);
            for (uint i = 0; i < entryCount; ++i)
            {
                GradeShopEntry e = new GradeShopEntry(stream, refStringStart, endian, bits);
                GradeShopEntryList.Add(e);
            }

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

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

            GradeShopEntryList = new List <GradeShopEntry>((int)entryCount);
            for (uint i = 0; i < entryCount; ++i)
            {
                GradeShopEntry e = new GradeShopEntry(stream, refStringStart, endian, bits);
                GradeShopEntryList.Add(e);
            }

            return(true);
        }