ReadBoolean() public method

public ReadBoolean ( ) : bool
return bool
Example #1
1
        public Boolean fromFile(String path)
        {
            FileStream fs = new FileStream(path, FileMode.Open);
            BinaryReader reader = new BinaryReader(fs);
            try
            {
                String h = reader.ReadString();
                float v = BitConverter.ToSingle(reader.ReadBytes(sizeof(float)), 0);
                drawFloorModel = reader.ReadBoolean();
                showAlwaysFloorMap = reader.ReadBoolean();
                lockMapSize = reader.ReadBoolean();
                mapXsize = reader.ReadInt32();
                mapYsize = reader.ReadInt32();

                //edgeXのxはmapX-1
                //yはmapYsize

                return true;

            }
            catch (EndOfStreamException eex)
            {
                //握りつぶす
                return false;
            }
            finally
            {
                reader.Close();
            }
        }
		/// <summary>
		/// バイナリ読み込み
		/// </summary>
		/// <param name="reader">バイナリリーダー</param>
		public void Read(BinaryReader reader)
		{
			int version = reader.ReadInt32();
			if (version == VERSION)
			{
				isFullScreen = reader.ReadBoolean();
				isMouseWheelSendMessage = reader.ReadBoolean();
				isEffect = reader.ReadBoolean();
				isSkipUnread = reader.ReadBoolean();
				isStopSkipInSelection = reader.ReadBoolean();
				messageSpeed = reader.ReadSingle();
				autoBrPageSpeed = reader.ReadSingle();
				messageWindowTransparency = reader.ReadSingle();
				soundMasterVolume = reader.ReadSingle();
				bgmVolume = reader.ReadSingle();
				seVolume = reader.ReadSingle();
				ambienceVolume = reader.ReadSingle();
				voiceVolume = reader.ReadSingle();
				voiceStopType = (VoiceStopType)(reader.ReadInt32());
				int num = reader.ReadInt32();
				isVoiceActiveArray = new bool[num];
				for (int i = 0; i < num; i++)
				{
					isVoiceActiveArray[i] = reader.ReadBoolean();
				}
				isAutoBrPage = reader.ReadBoolean();
			}
			else
			{
				Debug.LogError(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, version));
			}
		}
Example #3
0
        public virtual void Deserialize(BinaryReader reader)
        {
            RoutineID = reader.ReadUInt16();
            InstructionPointer = reader.ReadUInt16();
            Caller = reader.ReadInt16();
            Callee = reader.ReadInt16();
            StackObject = reader.ReadInt16();
            CodeOwnerGUID = reader.ReadUInt32();

            var localN = reader.ReadInt32();
            if (localN > -1)
            {
                Locals = new short[localN];
                for (int i = 0; i < localN; i++) Locals[i] = reader.ReadInt16();
            }

            var argsN = reader.ReadInt32();
            if (argsN > -1)
            {
                Args = new short[argsN];
                for (int i = 0; i < argsN; i++) Args[i] = reader.ReadInt16();
            }

            if (Version > 3) DiscardResult = reader.ReadBoolean();
            ActionTree = reader.ReadBoolean();
        }
        public void Deserialize(BinaryReader reader)
        {
            Width = reader.ReadInt32();
            Height = reader.ReadInt32();
            Stories = reader.ReadInt32();

            var size = Width * Height;

            Walls = new WallTile[Stories][];
            for (int l=0;l<Stories;l++)
            {
                Walls[l] = new WallTile[size];
                for (int i = 0; i < size; i++) Walls[l][i] = WallTileSerializer.Deserialize(reader);
            }

            Floors = new FloorTile[Stories][];
            for (int l = 0; l < Stories; l++)
            {
                Floors[l] = new FloorTile[size];
                for (int i = 0; i < size; i++) Floors[l][i] = new FloorTile { Pattern = reader.ReadUInt16() };
            }

            WallsDirty = reader.ReadBoolean();
            FloorsDirty = reader.ReadBoolean();
        }
        public void LoadBody(byte[] array)
        {
            BinaryReader br = new BinaryReader(new MemoryStream(array));
            // matname = br.ReadPackString();
            int lodcount = br.ReadInt32();
            LODs = new List<Model>();
            for (int i = 0; i < lodcount; i++)
            {
                SubSet[] LodSubset = new SubSet[br.ReadInt32()];
                for (int j = 0; j < LodSubset.Length; j++)
                {
                    string[] names = new string[br.ReadInt32()];
                    for (int n = 0; n < names.Length; n++)
                        names[n] = br.ReadPackString();
                    LodSubset[j] = new SubSet(names);
                }
                LODs.Add(new Model(LodSubset));
            }

            IsShadowCaster = br.ReadBoolean();
            IsShadowReceiver = br.ReadBoolean();
            NeedRotate = br.ReadBoolean();
            isTransparent = br.ReadBoolean();
            isSelfIllumination = br.ReadBoolean();
        }
Example #6
0
        public void Deserialize(BinaryReader reader)
        {
            var stackN = reader.ReadInt32();
            Stack = new VMStackFrameMarshal[stackN];
            for (int i = 0; i < stackN; i++) {
                var type = reader.ReadByte();
                Stack[i] = (type==1)?new VMRoutingFrameMarshal():new VMStackFrameMarshal();
                Stack[i].Deserialize(reader);
            }

            var queueN = reader.ReadInt32();
            Queue = new VMQueuedActionMarshal[queueN];
            for (int i = 0; i < queueN; i++)
            {
                Queue[i] = new VMQueuedActionMarshal();
                Queue[i].Deserialize(reader);
            }

            TempRegisters = new short[20];
            for (int i = 0; i < 20; i++) TempRegisters[i] = reader.ReadInt16();
            TempXL = new int[2];
            for (int i = 0; i < 2; i++) TempXL[i] = reader.ReadInt32();
            LastStackExitCode = (VMPrimitiveExitCode)reader.ReadByte();

            if (reader.ReadBoolean())
            {
                BlockingDialog = new VMDialogResult();
                BlockingDialog.Deserialize(reader);
            }
            else BlockingDialog = null;
            Interrupt = reader.ReadBoolean();

            ActionUID = reader.ReadUInt16();
            DialogCooldown = reader.ReadInt32();
        }
        /* The serialized format of the anti-XSRF token is as follows:
         * Version: 1 byte integer
         * SecurityToken: 16 byte binary blob
         * IsSessionToken: 1 byte Boolean
         * [if IsSessionToken = true]
         *   +- IsClaimsBased: 1 byte Boolean
         *   |  [if IsClaimsBased = true]
         *   |    `- ClaimUid: 32 byte binary blob
         *   |  [if IsClaimsBased = false]
         *   |    `- Username: UTF-8 string with 7-bit integer length prefix
         *   `- AdditionalData: UTF-8 string with 7-bit integer length prefix
         */
        private static AntiForgeryToken DeserializeImpl(BinaryReader reader)
        {
            // we can only consume tokens of the same serialized version that we generate
            byte embeddedVersion = reader.ReadByte();
            if (embeddedVersion != TokenVersion) {
                return null;
            }

            AntiForgeryToken deserializedToken = new AntiForgeryToken();
            byte[] securityTokenBytes = reader.ReadBytes(AntiForgeryToken.SecurityTokenBitLength / 8);
            deserializedToken.SecurityToken = new BinaryBlob(AntiForgeryToken.SecurityTokenBitLength, securityTokenBytes);
            deserializedToken.IsSessionToken = reader.ReadBoolean();

            if (!deserializedToken.IsSessionToken) {
                bool isClaimsBased = reader.ReadBoolean();
                if (isClaimsBased) {
                    byte[] claimUidBytes = reader.ReadBytes(AntiForgeryToken.ClaimUidBitLength / 8);
                    deserializedToken.ClaimUid = new BinaryBlob(AntiForgeryToken.ClaimUidBitLength, claimUidBytes);
                } else {
                    deserializedToken.Username = reader.ReadString();
                }

                deserializedToken.AdditionalData = reader.ReadString();
            }

            // if there's still unconsumed data in the stream, fail
            if (reader.BaseStream.ReadByte() != -1) {
                return null;
            }

            // success
            return deserializedToken;
        }
Example #8
0
        public static IList<Station> ParseStations(Stream stream)
        {
            using (var reader = new BinaryReader (stream, System.Text.Encoding.UTF8, true)) {
                var count = reader.ReadInt32 ();
                var stations = new Station[count];
                for (int i = 0; i < count; i++) {
                    stations [i] = new Station {
                        Id = reader.ReadInt32 (),
                        Street = reader.ReadString (),
                        Name = reader.ReadString(),
                        StationType = reader.ReadInt32(),
                        b = reader.ReadBoolean(),
                        su = reader.ReadBoolean(),
                        t = reader.ReadBoolean(),
                        bk = reader.ReadBoolean(),
                        bl = reader.ReadBoolean(),
                        Latitude = reader.ReadDouble(),
                        Longitude = reader.ReadDouble(),
                        EmptySlotCount = reader.ReadInt32(),
                        dx = reader.ReadInt32(),
                        BikeCount = reader.ReadInt32(),
                        bx = reader.ReadInt32()
                    };
                }

                return stations;
            }
        }
Example #9
0
 public EffectTemplate(string file)
 {
     BinaryReader reader = new BinaryReader(File.OpenRead(file));
     NumParticles = reader.ReadInt32();
     Offset = new Vector2(reader.ReadSingle(),reader.ReadSingle());
     SizeModRange = new Vector2(reader.ReadSingle(), reader.ReadSingle());
     SpeedRange = new Vector2(reader.ReadSingle(), reader.ReadSingle());
     LifeTimeRange = new Vector2(reader.ReadSingle(), reader.ReadSingle());
     int numRanges = reader.ReadInt32();
     AngleRanges = new List<Vector2>();
     _normalizedAngleRangeLength = new float[numRanges];
     for (int x = 0; x < numRanges; x++)
     {
         Vector2 newRange = new Vector2(reader.ReadSingle(), reader.ReadSingle());
         _totalAngleRangeSum += (float)(((newRange.Y - newRange.X) + Math.PI * 2) % Math.PI * 2);
         _normalizedAngleRangeLength[x] = (float)(((newRange.Y - newRange.X) + Math.PI * 2) % Math.PI * 2);
         AngleRanges.Add(newRange);
     }
     for (int x = 0; x < numRanges; x++)
     {
         _normalizedAngleRangeLength[x] /= _totalAngleRangeSum;
     }
     _normalizedAngleRangeLength = new float[AngleRanges.Count];
     InitialSpeedFactor = reader.ReadSingle();
     string textureName = reader.ReadString();
     Collides = reader.ReadBoolean();
     Sticky = reader.ReadBoolean();
 }
Example #10
0
 public void RaceSfv()
 {
     CleanTestFilesOutput();
     Race race = UploadSfvFile ();
     FileInfo fileInfo = new FileInfo (Misc.PathCombine (race.CurrentRaceData.DirectoryPath, Config.FileNameRace));
     using (FileStream stream = new FileStream (fileInfo.FullName,
                                                FileMode.OpenOrCreate,
                                                FileAccess.ReadWrite,
                                                FileShare.None))
     {
         using (BinaryReader reader = new BinaryReader (stream))
         {
             stream.Seek (0, SeekOrigin.Begin);
             Assert.AreEqual (4, reader.ReadInt32 (), "Expected integer value (4)");
             stream.Seek(256 * 1, SeekOrigin.Begin);
             Assert.AreEqual("infected.part1.rar", reader.ReadString(), "infected.part1.rar");
             Assert.AreEqual("2e04944c", reader.ReadString(), "2e04944c");
             Assert.AreEqual(false, reader.ReadBoolean(), "FileUploaded");
             stream.Seek(256 * 2, SeekOrigin.Begin);
             Assert.AreEqual("infected.part2.rar", reader.ReadString(), "infected.part2.rar");
             Assert.AreEqual("1c7c24a5", reader.ReadString(), "1c7c24a5");
             Assert.AreEqual(false, reader.ReadBoolean(), "FileUploaded");
             stream.Seek(256 * 3, SeekOrigin.Begin);
             Assert.AreEqual("infected.part3.rar", reader.ReadString(), "infected.part3.rar");
             Assert.AreEqual("d5d617e3", reader.ReadString(), "d5d617e3");
             Assert.AreEqual(false, reader.ReadBoolean(), "FileUploaded");
             stream.Seek(256 * 4, SeekOrigin.Begin);
             Assert.AreEqual("infected.part4.rar", reader.ReadString(), "infected.part4.rar");
             Assert.AreEqual("0edb20ea", reader.ReadString(), "0edb20ea");
             Assert.AreEqual(false, reader.ReadBoolean(), "FileUploaded");
         }
     }
 }
Example #11
0
 public BeyondDemons(BinaryReader inStream)
 {
     Unknown0 = inStream.ReadInt32();
     Unknown1 = inStream.ReadInt32();
     Flag0 = inStream.ReadBoolean();
     Flag1 = inStream.ReadBoolean();
 }
Example #12
0
        public override void Unserialize(BinaryReader br, UInt32 mapVersion)
        {
            Location = Vector4.Read(br);
            Quaternion = Vector4.Read(br);

            if (((((mapVersion <= 50) ? 1 : 0) - 1) & 20) + 10 > 0)
            {
                var count = (UInt32)(((((mapVersion <= 50) ? 1 : 0) - 1) & 20) + 10);
                for (var i = 0U; i < count; ++i)
                    ItemsTypes.Add(ItemType.Read(br));
            }

            if (mapVersion >= 39)
            {
                StoreName = br.ReadLengthedString();
                MinLevel = br.ReadUInt32();
                MaxLevel = br.ReadUInt32();
            }

            if (mapVersion > 40)
                IsJunkyard = br.ReadBoolean();

            if (mapVersion >= 50)
                IsVehicleStore = br.ReadBoolean();

            if (mapVersion >= 61)
                IsSouvenirStore = br.ReadBoolean();
        }
Example #13
0
 public NPCMaster(BinaryReader inStream)
 {
     Index0 = inStream.ReadInt32();
     Unknown1 = inStream.ReadInt32();
     Flag0 = inStream.ReadBoolean();
     Flag1 = inStream.ReadBoolean();
     Unknown2 = inStream.ReadInt32();
     Unknown3 = inStream.ReadInt32();
     Flag2 = inStream.ReadBoolean();
     Unknown4 = inStream.ReadInt32();
     Unknown5 = inStream.ReadInt32();
     Unknown6 = inStream.ReadInt32();
     Unknown7 = inStream.ReadInt32();
     Unknown8 = inStream.ReadInt32();
     Unknown9 = inStream.ReadInt32();
     Unknown10 = inStream.ReadInt32();
     Unknown11 = inStream.ReadInt32();
     Unknown12 = inStream.ReadInt32();
     Unknown13 = inStream.ReadInt32();
     Unknown14 = inStream.ReadInt32();
     Unknown15 = inStream.ReadInt32();
     Unknown16 = inStream.ReadInt32();
     Unknown17 = inStream.ReadInt32();
     Unknown18 = inStream.ReadInt32();
     Unknown19 = inStream.ReadInt32();
 }
Example #14
0
 public override void StateLoad(BinaryReader reader)
 {
     ntReg1 = reader.ReadByte();
     ntReg2 = reader.ReadByte();
     ntRom = reader.ReadBoolean();
     mirroring = reader.ReadBoolean();
 }
Example #15
0
 public override void StateLoad(BinaryReader reader)
 {
     irqCounter = reader.ReadByte();
     irqLatch = reader.ReadByte();
     irqReload = reader.ReadBoolean();
     irqEnable = reader.ReadBoolean();
 }
Example #16
0
 public override void StateLoad(BinaryReader reader)
 {
     indexReg = reader.ReadInt32();
     irqCounter = reader.ReadInt32();
     irqEnabled = reader.ReadBoolean();
     irqCountdown = reader.ReadBoolean();
 }
		private static AntiForgeryToken DeserializeImpl(BinaryReader reader)
		{
			byte b = reader.ReadByte();
			if (b != 1)
			{
				return null;
			}
			AntiForgeryToken antiForgeryToken = new AntiForgeryToken();
			byte[] data = reader.ReadBytes(16);
			antiForgeryToken.SecurityToken = new BinaryBlob(128, data);
			antiForgeryToken.IsSessionToken = reader.ReadBoolean();
			if (!antiForgeryToken.IsSessionToken)
			{
				bool flag = reader.ReadBoolean();
				if (flag)
				{
					byte[] data2 = reader.ReadBytes(32);
					antiForgeryToken.ClaimUid = new BinaryBlob(256, data2);
				}
				else
				{
					antiForgeryToken.Username = reader.ReadString();
				}
				antiForgeryToken.AdditionalData = reader.ReadString();
			}
			if (reader.BaseStream.ReadByte() != -1)
			{
				return null;
			}
			return antiForgeryToken;
		}
Example #18
0
		public static List<MethodSigInfo> Read(BinaryReader reader) {
			if (reader.ReadInt32() != 1)
				throw new InvalidDataException();
			int numHandlers = reader.ReadInt32();
			var list = new List<MethodSigInfo>(numHandlers);
			for (int i = 0; i < numHandlers; i++) {
				var typeCode = (HandlerTypeCode)reader.ReadInt32();
				int numBlocks = reader.ReadInt32();
				var blocks = new List<BlockSigInfo>(numBlocks);
				for (int j = 0; j < numBlocks; j++) {
					int numTargets = reader.ReadInt32();
					var targets = new List<int>(numTargets);
					for (int k = 0; k < numTargets; k++)
						targets.Add(reader.ReadInt32());
					var numHashes = reader.ReadInt32();
					var hashes = new List<BlockElementHash>(numHashes);
					for (int k = 0; k < numHashes; k++)
						hashes.Add((BlockElementHash)reader.ReadInt32());
					var block = new BlockSigInfo(hashes, targets);
					block.HasFallThrough = reader.ReadBoolean();
					block.EndsInRet = reader.ReadBoolean();
					blocks.Add(block);
				}
				list.Add(new MethodSigInfo(blocks, typeCode));
			}
			return list;
		}
Example #19
0
 public IEnumerable<Entry> Import()
 {
     using (var reader = new BinaryReader(File.OpenRead(filename)))
     {
         // 4
         Version = reader.ReadInt32();
         // 4
         Positions = reader.ReadInt32();
         foreach (var i in Enumerable.Range(0, Positions))
         {
             // 16
             var board = new Board(reader.ReadUInt64(), reader.ReadUInt64(), Color.Black);
             // 20
             var height = reader.ReadInt32();
             // 24
             var prune = reader.ReadInt32();
             // 25
             var wld = reader.ReadBoolean();
             // 26
             var knownSolve = reader.ReadBoolean();
             // 28
             var fillOut = reader.ReadInt16();
             // 30
             var cutoff = reader.ReadInt16();
             // 32
             var heuristic = reader.ReadInt16();
             // 34
             var black = reader.ReadInt16();
             // 36
             var white = reader.ReadInt16();
             // 37
             var set = reader.ReadBoolean();
             // 38
             var assigned = reader.ReadBoolean();
             // 39
             var wldSolved = reader.ReadBoolean();
             // 40
             var fill2 = reader.ReadByte();
             // 48
             var games = new int[] { reader.ReadInt32(), reader.ReadInt32() };
             // 49
             var root = reader.ReadBoolean();
             // 52
             var fill3 = reader.ReadBytes(3);
             yield return new Entry(board, height, heuristic, 72/*new BookData()
             {
                 Height = height,
                 Prune = prune,
                 WLD = wld,
                 KnownSolve = knownSolve,
                 Cutoff = cutoff,
                 HeuristicValue = heuristic,
                 BlackValue = black,
                 WhiteValue = white,
                 Games = games
             }*/);
         }
     }
 }
Example #20
0
 public override void StateLoad(BinaryReader reader)
 {
     irqReload = reader.ReadInt32();
     irqMode = reader.ReadBoolean();
     irqEnable = reader.ReadBoolean();
     irqAckEnable = reader.ReadBoolean();
     irqCounter = reader.ReadInt32();
 }
Example #21
0
 protected override void OnLoaded(BinaryReader r)
 {
     base.OnLoaded(r);
     _isInit = r.ReadBoolean();
     _running = r.ReadBoolean();
     if (_running)
         OnGameLoad(r);
 }
Example #22
0
        //===========================================================================
        //
        // Public Functions
        //
        //===========================================================================
        //
        // Load(string name, ref NSSKeylogger.ProfileData profile)
        // Attempts to load a profile from a file into a ProfileData structure
        //
        public Boolean Load(string name, ref NSSKeyloggerForm.ProfileData profile)
        {
            Boolean success = false;
            BinaryReader b = null;
            try
            {
                //Open the file
                b = new BinaryReader(File.Open(currentDirectory + "\\" + name + ".nss", FileMode.Open));

                //Check the header
                if (b.ReadString() != "NSS Keylogger Profile")
                {
                    success = false; //header was invalid
                    throw new Exception("File is not a NSS Keylogger profile!");
                }

                //Load the KEYCOMBO structures
                if (!LoadKEYCOMBO(b, ref profile.ActivationKey))
                {
                    success = false;
                    throw new Exception("ActivationKey could not be loaded!");
                }
                if (!LoadKEYCOMBO(b, ref profile.DeactivationKey))
                {
                    success = false;
                    throw new Exception("DeactivationKey could not be loaded!");
                }
                if (!LoadKEYCOMBO(b, ref profile.SubtleModeKey))
                {
                    success = false;
                    throw new Exception("SubtleModeKey could not be loaded!");
                }

                //Load all other profile data
                profile.useDeactivationKey = b.ReadBoolean();
                profile.suppressHotkeys = b.ReadBoolean();
                profile.clearKeylogOnStartup = b.ReadBoolean();
                profile.useSubtleModeKey = b.ReadBoolean();
                profile.startupSubtleMode = b.ReadBoolean();
                profile.subtleMode = b.ReadBoolean();
                profile.keylogSaveLocation = b.ReadString();

                success = true;
            }
            catch
            { //something went wrong
                success = false;
            }
            finally
            {
                if (b != null)
                {
                    b.Close(); //all done with the file
                    b.Dispose();
                }
            }
            return success;
        }
 private void Read(BinaryReader reader) {
     fromId = reader.ReadInt32();
     toId = reader.ReadInt32();
     date = reader.ReadInt32();
     output = reader.ReadBoolean();
     unread = reader.ReadBoolean();
     message = TL.Parse<DecryptedMessage>(reader);
     file = TL.Parse<EncryptedFile>(reader);
 }
Example #24
0
 public override void StateLoad(BinaryReader reader)
 {
     latch0 = reader.ReadBoolean();
     latch1 = reader.ReadBoolean();
     fd0 = reader.ReadInt32();
     fe0 = reader.ReadInt32();
     fd1 = reader.ReadInt32();
     fe1 = reader.ReadInt32();
 }
Example #25
0
 public Buff(BinaryReader reader)
 {
     Type = (BuffType)reader.ReadByte();
     Caster = null;
     Visible = reader.ReadBoolean();
     ObjectID = reader.ReadUInt32();
     ExpireTime = reader.ReadInt64();
     Value = reader.ReadInt32();
     Infinite = reader.ReadBoolean();
 }
 public void Deserialize(BinaryReader reader)
 {
     Type = reader.ReadInt32();
     Target = reader.ReadInt16();
     Interaction = reader.ReadByte();
     SetParam = reader.ReadBoolean();
     StackObject = reader.ReadInt16();
     Caller = reader.ReadInt16();
     IsTree = reader.ReadBoolean();
 }
 public void SetDataFrom(BinaryReader reader)
 {
     CorrelationId = new Guid(reader.ReadString());
     ProcessId = reader.ReadInt32();
     Port = reader.ReadInt32();
     NUnitTestRunner = reader.ReadString();
     MsTestRunner = reader.ReadString();
     LoggingEnabled = reader.ReadBoolean();
     StartedPaused = reader.ReadBoolean();
 }
Example #28
0
 public void Read(BinaryReader reader)
 {
     NumberOfPeels = reader.ReadInt32();
     PerformedFirstPeel = reader.ReadBoolean();
     AvgTimeBetweenPeels = reader.ReadInt32();
     NumberOfDumps = reader.ReadInt32();
     AvgTimeBetweenDumps = reader.ReadInt32();
     IsWinner = reader.ReadBoolean();
     RawGameData = reader.ReadList<GameMoveDataPoint>();
 }
Example #29
0
        public override void Read(BinaryReader br, List<RvDat> parentDirDats)
        {
            base.Read(br, parentDirDats);
            bool foundTree = br.ReadBoolean();
            if (foundTree)
            {
                Tree = new RvTreeRow();
                Tree.Read(br);
            }
            else
                Tree = null;

            bool foundGame = br.ReadBoolean();
            if (foundGame)
            {
                Game = new RvGame();
                Game.Read(br);
            }
            else
                Game = null;

            int count = br.ReadInt32();
            _dirDats.Clear();
            for (int i = 0; i < count; i++)
            {
                RvDat dat = new RvDat { DatIndex = i };
                dat.Read(br);
                _dirDats.Add(dat);

                string datname = TreeFullName + @"\" + dat.GetData(RvDat.DatData.DatName);
                if (datname.Length >= 9 && datname.Substring(0, 9) == @"RomVault\")
                    datname = datname.Substring(9);

                DB.Bgw.ReportProgress(0, new bgwText("Loading: " + datname));
                DB.Bgw.ReportProgress((int)br.BaseStream.Position);

            }
            if (_dirDats.Count > 0)
                parentDirDats = _dirDats;

            count = br.ReadInt32();
            _children.Clear();
            for (int i = 0; i < count; i++)
            {
                RvBase tChild = DBTypeGet.GetRvType((FileType)br.ReadByte());

                tChild.Parent = this;
                tChild.Read(br, parentDirDats);
                _children.Add(tChild);
            }

            if (DBTypeGet.isCompressedDir(FileType))
                ZipStatus = (ZipStatus)br.ReadByte();

        }
 public static AnimationEntry Parse(byte version, BinaryReader br)
 {
     return new AnimationEntry
     {
         Mode = (AnimationMode)br.ReadByte(),
         EaseIn = br.ReadBoolean(),
         EaseOut = br.ReadBoolean(),
         IterationDuration = br.ReadInt32(),
         Frames = new LinkedList<AnimationFrame>(Enumerable.Range(0, br.ReadInt32()).Select(_ => AnimationFrame.Parse(version, br))),
     };
 }