Ejemplo n.º 1
0
        public static RhprojFile Deserialize(BinaryReader reader)
        {
            var file = new RhprojFile();

            file.version  = reader.ReadByte();
            file.unknown1 = reader.ReadByte();             // Always 0?

            file.rhcFile  = RhcFile.Deserialize(reader);
            file.unknown2 = reader.ReadBytes(8);
            file.rhsFile  = RhsFile.Deserialize(reader);
            file.unknown3 = reader.ReadBytes(16);

            return(file);
        }
Ejemplo n.º 2
0
        public static RhcFile Deserialize(BinaryReader reader)
        {
            var file = new RhcFile();

            file.version = reader.ReadByte();

            RhcEntryType type;

            while ((type = (RhcEntryType)reader.ReadByte()) != RhcEntryType.EndOfEntry)
            {
                switch (type)
                {
                case RhcEntryType.Rhc:
                    file.rhcGuid = reader.ReadRhGuid();
                    break;

                case RhcEntryType.Internal:
                    file.internalGuid = reader.ReadRhGuid();
                    break;

                case RhcEntryType.Rhs:
                    file.rhsGuid = reader.ReadRhGuid();
                    break;

                case RhcEntryType.ChartName:
                    file.chartName = reader.ReadShortPrefixedString();
                    break;

                case RhcEntryType.Unknown1:
                    file.unknown1 = reader.ReadUInt16();                             // Always 0
                    break;

                case RhcEntryType.Artists:
                    file.artists.Add(Artist.Deserialize(reader));
                    break;

                case RhcEntryType.Layers:
                    file.layers = Layers.Deserialize(reader);
                    break;

                default:
                    throw new Exception("Unknown chart entry type: " + type);
                }
            }

            return(file);
        }
Ejemplo n.º 3
0
 public RhcSynchronizer(CacheFile cacheFile, RhcFile rhcFile) : base(cacheFile)
 {
     this.rhcFile = rhcFile;
 }