public HIRC(BinaryReader instream)
        {
            this.length = instream.ReadUInt32();
            this.offset = instream.BaseStream.Position;
            this.objects_count = instream.ReadUInt32();

            for (int x = 0; x < this.objects_count; x++)
            {
                object newobject = new object();

                byte idbyte = instream.ReadByte();

                if (idbyte == 1)
                {
                    newobject = new HIRC_Settings(instream);
                }
                else if (idbyte == 2)
                {
                    newobject = new HIRC_SoundSFX(instream);
                }
                else if (idbyte == 3)
                {
                    newobject = new HIRC_EventAction(instream);
                }
                else if (idbyte == 10)
                {
                    newobject = new HIRC_MusicSegment(instream);
                }
                else if (idbyte == 11)
                {
                    newobject = new HIRC_MusicTrack(instream);
                }
                else
                {
                    newobject = new HIRC_object(instream);
                }
                this.objects.Add(newobject);
            }
        }
Пример #2
0
        public HIRC(BinaryReader instream)
        {
            this.length        = instream.ReadUInt32();
            this.offset        = instream.BaseStream.Position;
            this.objects_count = instream.ReadUInt32();

            for (int x = 0; x < this.objects_count; x++)
            {
                object newobject = new object();

                byte idbyte = instream.ReadByte();

                if (idbyte == 1)
                {
                    newobject = new HIRC_Settings(instream);
                }
                else if (idbyte == 2)
                {
                    newobject = new HIRC_SoundSFX(instream);
                }
                else if (idbyte == 3)
                {
                    newobject = new HIRC_EventAction(instream);
                }
                else if (idbyte == 10)
                {
                    newobject = new HIRC_MusicSegment(instream);
                }
                else if (idbyte == 11)
                {
                    newobject = new HIRC_MusicTrack(instream);
                }
                else
                {
                    newobject = new HIRC_object(instream);
                }
                this.objects.Add(newobject);
            }
        }