Пример #1
0
        static public BemaniSSP Read(Stream source)
        {
            BinaryReaderEx reader = new BinaryReaderEx(source);
            BemaniSSP      result = new BemaniSSP();

            reader.ReadBytes(16); // name of archive

            int length = reader.ReadInt32();
            int count  = (length - 18) / 4;

            for (int i = 0; i < count; i++)
            {
                int offset = reader.ReadInt32();
                if (offset >= length && offset < reader.BaseStream.Length)
                {
                    long currentOffset = reader.BaseStream.Position;
                    reader.BaseStream.Position = offset;
                    result.sounds.Add(BemaniSD9.Read(reader.BaseStream));
                    reader.BaseStream.Position = currentOffset;
                }
            }

            return(result);
        }
Пример #2
0
        public static BemaniSSP Read(Stream source)
        {
            BinaryReaderEx reader = new BinaryReaderEx(source);
            BemaniSSP result = new BemaniSSP();

            reader.ReadBytes(16); // name of archive

            int length = reader.ReadInt32();
            int count = (length - 18) / 4;

            for (int i = 0; i < count; i++)
            {
                int offset = reader.ReadInt32();
                if (offset >= length && offset < reader.BaseStream.Length)
                {
                    long currentOffset = reader.BaseStream.Position;
                    reader.BaseStream.Position = offset;
                    result.sounds.Add(BemaniSD9.Read(reader.BaseStream));
                    reader.BaseStream.Position = currentOffset;
                }
            }

            return result;
        }