System.IO.BinaryReader.ReadSingle()

Here are the examples of the csharp api System.IO.BinaryReader.ReadSingle() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

929 Examples 7

19 View Source File : CelesteNetUtils.BinaryRWCompat.cs
License : MIT License
Project Creator : 0x0ade

[Obsolete("Use CelesteNetBinaryReader instead.")]
        public static Vector2 ReadVector2Scale(this BinaryReader reader)
            => new(Calc.Clamp(reader.ReadSingle(), -3f, 3f)

19 View Source File : SimpleJSON.cs
License : MIT License
Project Creator : 734843327

public static JSONNode Deserialize(System.IO.BinaryReader aReader)
		{
			JSONBinaryTag type = (JSONBinaryTag)aReader.ReadByte();
			switch(type)
			{
			case JSONBinaryTag.Array:
			{
				int count = aReader.ReadInt32();
				JSONArray tmp = new JSONArray();
				for(int i = 0; i < count; i++)
					tmp.Add(Deserialize(aReader));
				return tmp;
			}
			case JSONBinaryTag.Clreplaced:
			{
				int count = aReader.ReadInt32();				
				JSONClreplaced tmp = new JSONClreplaced();
				for(int i = 0; i < count; i++)
				{
					string key = aReader.ReadString();
					var val = Deserialize(aReader);
					tmp.Add(key, val);
				}
				return tmp;
			}
			case JSONBinaryTag.Value:
			{
				return new JSONData(aReader.ReadString());
			}
			case JSONBinaryTag.IntValue:
			{
				return new JSONData(aReader.ReadInt32());
			}
			case JSONBinaryTag.DoubleValue:
			{
				return new JSONData(aReader.ReadDouble());
			}
			case JSONBinaryTag.BoolValue:
			{
				return new JSONData(aReader.ReadBoolean());
			}
			case JSONBinaryTag.FloatValue:
			{
				return new JSONData(aReader.ReadSingle());
			}
				
			default:
			{
				throw new Exception("Error deserializing JSON. Unknown tag: " + type);
			}
			}
		}

19 View Source File : IPCSupport.cs
License : GNU General Public License v3.0
Project Creator : 9E4ECDDE

public static SerializedBoneData FromByteArray(byte[] array)
            {
                using (MemoryStream memoryStream = new MemoryStream(array))
                {
                    using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
                    {
                        SerializedBoneData boneData = new SerializedBoneData();
                        boneData.name = binaryReader.ReadString();
                        boneData.damping = binaryReader.ReadSingle();
                        boneData.elasticity = binaryReader.ReadSingle();
                        boneData.stiffness = binaryReader.ReadSingle();
                        boneData.inert = binaryReader.ReadSingle();
                        boneData.radius = binaryReader.ReadSingle();
                        boneData.endLength = binaryReader.ReadSingle();
                        boneData.endOffset = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
                        boneData.gravity = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
                        boneData.force = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
                        return boneData;

                    }
                }
            }

19 View Source File : EndianBinaryReader.cs
License : MIT License
Project Creator : 91Act

public override float ReadSingle()
        {
            if (endian == EndianType.BigEndian)
            {
                a32 = ReadBytes(4);
                Array.Reverse(a32);
                return BitConverter.ToSingle(a32, 0);
            }
            return base.ReadSingle();
        }

19 View Source File : UmaTPose.cs
License : Apache License 2.0
Project Creator : A7ocin

public void DeSerialize()
	    {
			if (boneInfo == null)
			{
				var ms = new MemoryStream(serializedChunk);
				var br = new BinaryReader(ms);
				int count = br.ReadInt32();
				boneInfo = new SkeletonBone[count];
				for (int i = 0; i < count; i++)
				{
					boneInfo[i] = DeSerializeSkeletonBone(br);
				}
				count = br.ReadInt32();
				humanInfo = new HumanBone[count];
				for (int i = 0; i < count; i++)
				{
					humanInfo[i] = DeSerializeHumanBone(br);
				}
				if (br.PeekChar() >= 0)
				{
					extendedInfo = true;
					armStretch = br.ReadSingle();
					feetSpacing = br.ReadSingle();
					legStretch = br.ReadSingle();
					lowerArmTwist = br.ReadSingle();
					lowerLegTwist = br.ReadSingle();
					upperArmTwist = br.ReadSingle();
					upperLegTwist = br.ReadSingle();
				}
			}
	    }

19 View Source File : UmaTPose.cs
License : Apache License 2.0
Project Creator : A7ocin

private Quaternion DeSerializeQuaternion(BinaryReader br)
	    {
	        var res = new Quaternion();
	        res.x = br.ReadSingle();
	        res.y = br.ReadSingle();
	        res.z = br.ReadSingle();
	        res.w = br.ReadSingle();
	        return res;
	    }

19 View Source File : UmaTPose.cs
License : Apache License 2.0
Project Creator : A7ocin

private HumanLimit DeSerializeHumanLimit(BinaryReader br)
	    {
	        var res = new HumanLimit();
	        res.axisLength = br.ReadSingle();
	        res.center = DeserializeVector3(br);
	        res.max = DeserializeVector3(br);
	        res.min = DeserializeVector3(br);
	        res.useDefaultValues = br.ReadBoolean();
	        return res;
	    }

19 View Source File : UmaTPose.cs
License : Apache License 2.0
Project Creator : A7ocin

private Vector3 DeserializeVector3(BinaryReader br)
	    {
	        var res = new Vector3();
	        res.x = br.ReadSingle();
	        res.y = br.ReadSingle();
	        res.z = br.ReadSingle();
	        return res;
	    }

19 View Source File : RoomFileSerializer.cs
License : Apache License 2.0
Project Creator : abist-co-ltd

private static Vector3[] ReadVertices(BinaryReader reader, int vertexCount)
        {
            Vector3[] vertices = new Vector3[vertexCount];

            for (int i = 0; i < vertices.Length; i++)
            {
                vertices[i] = new Vector3(reader.ReadSingle(),
                                        reader.ReadSingle(),
                                        reader.ReadSingle());
            }

            return vertices;
        }

19 View Source File : InputAnimationSerializationUtils.cs
License : Apache License 2.0
Project Creator : abist-co-ltd

public static void ReadFloatCurve(BinaryReader reader, AnimationCurve curve)
        {
            curve.preWrapMode = (WrapMode)reader.ReadInt32();
            curve.postWrapMode = (WrapMode)reader.ReadInt32();

            int keyframeCount = reader.ReadInt32();

            Keyframe[] keys = new Keyframe[keyframeCount];
            for (int i = 0; i < keyframeCount; ++i)
            {
                keys[i].time = reader.ReadSingle();
                keys[i].value = reader.ReadSingle();
                keys[i].inTangent = reader.ReadSingle();
                keys[i].outTangent = reader.ReadSingle();
                keys[i].inWeight = reader.ReadSingle();
                keys[i].outWeight = reader.ReadSingle();
                keys[i].weightedMode = (WeightedMode)reader.ReadInt32();
            }

            curve.keys = keys;
        }

19 View Source File : InputAnimationSerializationUtils.cs
License : Apache License 2.0
Project Creator : abist-co-ltd

public static void ReadBoolCurve(BinaryReader reader, AnimationCurve curve)
        {
            curve.preWrapMode = (WrapMode)reader.ReadInt32();
            curve.postWrapMode = (WrapMode)reader.ReadInt32();

            int keyframeCount = reader.ReadInt32();

            Keyframe[] keys = new Keyframe[keyframeCount];
            for (int i = 0; i < keyframeCount; ++i)
            {
                keys[i].time = reader.ReadSingle();
                keys[i].value = reader.ReadSingle();
                keys[i].inTangent = 0.0f;
                keys[i].outTangent = 0.0f;
                keys[i].inWeight = 0.0f;
                keys[i].outWeight = 1.0e6f;
                keys[i].weightedMode = WeightedMode.Both;
            }

            curve.keys = keys;
        }

19 View Source File : InputAnimationSerializationUtils.cs
License : Apache License 2.0
Project Creator : abist-co-ltd

public static void ReadMarkerList(BinaryReader reader, List<InputAnimationMarker> markers)
        {
            markers.Clear();
            int count = reader.ReadInt32();
            markers.Capacity = count;
            for (int i = 0; i < count; ++i)
            {
                var marker = new InputAnimationMarker();
                marker.time = reader.ReadSingle();
                marker.name = reader.ReadString();
                markers.Add(marker);
            }
        }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static OvrAvatarDriver.PoseFrame ReadPoseFrame(this BinaryReader reader)
    {
        return new OvrAvatarDriver.PoseFrame
        {
            headPosition = reader.ReadVector3(),
            headRotation = reader.ReadQuaternion(),
            handLeftPosition = reader.ReadVector3(),
            handLeftRotation = reader.ReadQuaternion(),
            handRightPosition = reader.ReadVector3(),
            handRightRotation = reader.ReadQuaternion(),
            voiceAmplitude = reader.ReadSingle(),

            controllerLeftPose = reader.ReadControllerPose(),
            controllerRightPose = reader.ReadControllerPose(),
        };
    }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static Vector2 ReadVector2(this BinaryReader reader)
    {
        return new Vector2
        {
            x = reader.ReadSingle(),
            y = reader.ReadSingle()
        };
    }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static OvrAvatarPacket Read(Stream stream)
    {
        BinaryReader reader = new BinaryReader(stream);

        // Todo: bounds check frame count
        int frameCount = reader.ReadInt32();
        List<float> frameTimes = new List<float>(frameCount);
        for (int i = 0; i < frameCount; ++i)
        {
            frameTimes.Add(reader.ReadSingle());
        }
        List<OvrAvatarDriver.PoseFrame> frames = new List<OvrAvatarDriver.PoseFrame>(frameCount);
        for (int i = 0; i < frameCount; ++i)
        {
            frames.Add(reader.ReadPoseFrame());
        }

        // Todo: bounds check audio packet count
        int audioPacketCount = reader.ReadInt32();
        List<byte[]> audioPackets = new List<byte[]>(audioPacketCount);
        for (int i = 0; i < audioPacketCount; ++i)
        {
            int audioPacketSize = reader.ReadInt32();
            byte[] audioPacket = reader.ReadBytes(audioPacketSize);
            audioPackets.Add(audioPacket);
        }

        return new OvrAvatarPacket(frameTimes, frames, audioPackets);
    }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static Vector3 ReadVector3(this BinaryReader reader)
    {
        return new Vector3
        {
            x = reader.ReadSingle(),
            y = reader.ReadSingle(),
            z = reader.ReadSingle()
        };
    }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static Quaternion ReadQuaternion(this BinaryReader reader)
    {
        return new Quaternion
        {
            x = reader.ReadSingle(),
            y = reader.ReadSingle(),
            z = reader.ReadSingle(),
            w = reader.ReadSingle(),
        };
    }

19 View Source File : OvrAvatarPacket.cs
License : MIT License
Project Creator : absurd-joy

public static OvrAvatarDriver.ControllerPose ReadControllerPose(this BinaryReader reader)
    {
        return new OvrAvatarDriver.ControllerPose
        {
            buttons = (ovrAvatarButton)reader.ReadUInt32(),
            touches = (ovrAvatarTouch)reader.ReadUInt32(),
            joystickPosition = reader.ReadVector2(),
            indexTrigger = reader.ReadSingle(),
            handTrigger = reader.ReadSingle(),
            isActive = reader.ReadBoolean(),
        };
    }

19 View Source File : DiffusePartHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            Part    = reader.ReadUInt32();
            Start   = reader.ReadSingle();
            End     = reader.ReadSingle();
            Time    = reader.ReadSingle();
        }

19 View Source File : LuminousHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            Start   = reader.ReadSingle();
            End     = reader.ReadSingle();
            Time    = reader.ReadSingle();
        }

19 View Source File : ScaleHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            End     = reader.ReadSingle();
            Time    = reader.ReadSingle();
        }

19 View Source File : AttackCone.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            PartIndex   = reader.ReadUInt32();

            LeftX       = reader.ReadSingle();
            LeftY       = reader.ReadSingle();

            RightX      = reader.ReadSingle();
            RightY      = reader.ReadSingle();
            
            Radius      = reader.ReadSingle();
            Height      = reader.ReadSingle();
        }

19 View Source File : CylSphere.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            var x = reader.ReadSingle();
            var y = reader.ReadSingle();
            var z = reader.ReadSingle();
            Origin = new Vector3(x, y, z);

            Radius = reader.ReadSingle();
            Height = reader.ReadSingle();
        }

19 View Source File : DayGroup.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            ChanceOfOccur   = reader.ReadSingle();
            DayName         = reader.ReadPString();
            reader.AlignBoundary();

            SkyObjects.Unpack(reader);
            SkyTime.Unpack(reader);
        }

19 View Source File : Frame.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Origin = reader.ReadVector3();

            var qw = reader.ReadSingle();
            var qx = reader.ReadSingle();
            var qy = reader.ReadSingle();
            var qz = reader.ReadSingle();
            Orientation = new Quaternion(qx, qy, qz, qw);
        }

19 View Source File : GameTime.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            ZeroTimeOfYear  = reader.ReadDouble();
            ZeroYear        = reader.ReadUInt32();
            DayLength       = reader.ReadSingle();
            DaysPerYear     = reader.ReadUInt32();
            YearSpec        = reader.ReadPString();
            reader.AlignBoundary();

            TimesOfDay.Unpack(reader);

            uint numDaysOfTheWeek = reader.ReadUInt32();
            for (uint i = 0; i < numDaysOfTheWeek; i++)
            {
                var weekDay = reader.ReadPString();
                reader.AlignBoundary();
                DaysOfTheWeek.Add(weekDay);
            }

            Seasons.Unpack(reader);
        }

19 View Source File : LandDefs.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            NumBlockLength  = reader.ReadInt32();
            NumBlockWidth   = reader.ReadInt32();
            SquareLength    = reader.ReadSingle();
            LBlockLength    = reader.ReadInt32();
            VertexPerCell   = reader.ReadInt32();
            MaxObjHeight    = reader.ReadSingle();
            SkyHeight       = reader.ReadSingle();
            RoadWidth       = reader.ReadSingle();

            for (int i = 0; i < 256; i++)
                LandHeightTable.Add(reader.ReadSingle());
        }

19 View Source File : ObjectDesc.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            ObjId       = reader.ReadUInt32();

            BaseLoc.Unpack(reader);

            Freq        = reader.ReadSingle();

            DisplaceX   = reader.ReadSingle();
            DisplaceY   = reader.ReadSingle();

            MinScale    = reader.ReadSingle();
            MaxScale    = reader.ReadSingle();

            MaxRotation = reader.ReadSingle();

            MinSlope    = reader.ReadSingle();
            MaxSlope    = reader.ReadSingle();

            Align       = reader.ReadUInt32();
            Orient      = reader.ReadUInt32();

            WeenieObj   = reader.ReadUInt32();
        }

19 View Source File : ScriptAndModData.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Mod         = reader.ReadSingle();
            ScriptId    = reader.ReadUInt32();
        }

19 View Source File : SkyObject.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            BeginTime           = reader.ReadSingle();
            EndTime             = reader.ReadSingle();
            BeginAngle          = reader.ReadSingle();
            EndAngle            = reader.ReadSingle();
            TexVelocityX        = reader.ReadSingle();
            TexVelocityY        = reader.ReadSingle();
            DefaultGFXObjectId  = reader.ReadUInt32();
            DefaultPESObjectId  = reader.ReadUInt32();
            Properties          = reader.ReadUInt32();

            reader.AlignBoundary();
        }

19 View Source File : SkyObjectReplace.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            ObjectIndex = reader.ReadUInt32();
            GFXObjId    = reader.ReadUInt32();
            Rotate      = reader.ReadSingle();
            Transparent = reader.ReadSingle();
            Luminosity  = reader.ReadSingle();
            MaxBright   = reader.ReadSingle();

            reader.AlignBoundary();
        }

19 View Source File : SkyTimeOfDay.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Begin       = reader.ReadSingle();

            DirBright   = reader.ReadSingle();
            DirHeading  = reader.ReadSingle();
            DirPitch    = reader.ReadSingle();
            DirColor    = reader.ReadUInt32();

            AmbBright   = reader.ReadSingle();
            AmbColor    = reader.ReadUInt32();

            MinWorldFog     = reader.ReadSingle();
            MaxWorldFog     = reader.ReadSingle();
            WorldFogColor   = reader.ReadUInt32();
            WorldFog        = reader.ReadUInt32();

            reader.AlignBoundary();

            SkyObjReplace.Unpack(reader);
        }

19 View Source File : SoundTableData.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            SoundId = reader.ReadUInt32();
            Priority = reader.ReadSingle();
            Probability = reader.ReadSingle();
            Volume = reader.ReadSingle();
        }

19 View Source File : SpellBase.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Name = reader.ReadObfuscatedString();
            reader.AlignBoundary();
            Desc = reader.ReadObfuscatedString();
            reader.AlignBoundary();
            School = (MagicSchool)reader.ReadUInt32();
            Icon = reader.ReadUInt32();
            Category = (SpellCategory)reader.ReadUInt32();
            Bitfield = reader.ReadUInt32();
            BaseMana = reader.ReadUInt32();
            BaseRangeConstant = reader.ReadSingle();
            BaseRangeMod = reader.ReadSingle();
            Power = reader.ReadUInt32();
            SpellEconomyMod = reader.ReadSingle();
            FormulaVersion = reader.ReadUInt32();
            ComponentLoss = reader.ReadSingle();
            MetaSpellType = (SpellType)reader.ReadUInt32();
            MetaSpellId = reader.ReadUInt32();

            switch (MetaSpellType)
            {
                case SpellType.Enchantment:
                case SpellType.FellowEnchantment:
                    Duration = reader.ReadDouble();
                    DegradeModifier = reader.ReadSingle();
                    DegradeLimit = reader.ReadSingle();
                    break;
                case SpellType.PortalSummon:
                    PortalLifetime = reader.ReadDouble();
                    break;
            }

            // Components : Load them first, then decrypt them. More efficient to hash all at once.
            List<uint> rawComps = new List<uint>();

            for (uint j = 0; j < 8; j++)
            {
                uint comp = reader.ReadUInt32();

                // We will only add the comp if it is valid
                if (comp > 0)
                    rawComps.Add(comp);
            }

            // Get the decryped component values
            Formula = DecryptFormula(rawComps, Name, Desc);

            CasterEffect = reader.ReadUInt32();
            TargetEffect = reader.ReadUInt32();
            FizzleEffect = reader.ReadUInt32();
            RecoveryInterval = reader.ReadDouble();
            RecoveryAmount = reader.ReadSingle();
            DisplayOrder = reader.ReadUInt32();
            NonComponentTargetType = reader.ReadUInt32();
            ManaMod = reader.ReadUInt32();
        }

19 View Source File : SpellComponentBase.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Name        = reader.ReadObfuscatedString();
            reader.AlignBoundary();
            Category    = reader.ReadUInt32();
            Icon        = reader.ReadUInt32();
            Type        = reader.ReadUInt32();
            Gesture     = reader.ReadUInt32();
            Time        = reader.ReadSingle();
            Text        = reader.ReadObfuscatedString();
            reader.AlignBoundary();
            CDM         = reader.ReadSingle();
        }

19 View Source File : Sphere.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Origin = reader.ReadVector3();
            Radius = reader.ReadSingle();
        }

19 View Source File : Surface.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            Type = (SurfaceType)reader.ReadUInt32();

            if (Type.HasFlag(SurfaceType.Base1Image) || Type.HasFlag(SurfaceType.Base1ClipMap))
            {
                // image or clipmap
                OrigTextureId = reader.ReadUInt32();
                OrigPaletteId = reader.ReadUInt32();
            }
            else
            {
                // solid color
                ColorValue = reader.ReadUInt32();
            }

            Translucency    = reader.ReadSingle();
            Luminosity      = reader.ReadSingle();
            Diffuse         = reader.ReadSingle();
        }

19 View Source File : BinaryReaderExtensions.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public static Vector3 ReadVector3(this BinaryReader reader)
        {
            var x = reader.ReadSingle();
            var y = reader.ReadSingle();
            var z = reader.ReadSingle();

            return new Vector3(x, y, z);
        }

19 View Source File : SoundTweakedHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            SoundID = reader.ReadUInt32();
            Priority = reader.ReadSingle();
            Probability = reader.ReadSingle();
            Volume = reader.ReadSingle();
        }

19 View Source File : TextureVelocityHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            USpeed = reader.ReadSingle();
            VSpeed = reader.ReadSingle();
        }

19 View Source File : TextureVelocityPartHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            PartIndex   = reader.ReadUInt32();
            USpeed      = reader.ReadSingle();
            VSpeed      = reader.ReadSingle();
        }

19 View Source File : AmbientSoundDesc.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            SType       = reader.ReadUInt32();
            Volume      = reader.ReadSingle();
            BaseChance  = reader.ReadSingle();
            MinRate     = reader.ReadSingle();
            MaxRate     = reader.ReadSingle();
        }

19 View Source File : AnimData.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            AnimId      = reader.ReadUInt32();
            LowFrame    = reader.ReadInt32();
            HighFrame   = reader.ReadInt32();
            Framerate   = reader.ReadSingle();
        }

19 View Source File : GfxObjInfo.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Id          = reader.ReadUInt32();
            DegradeMode = reader.ReadUInt32();
            MinDist     = reader.ReadSingle();
            IdealDist   = reader.ReadSingle();
            MaxDist     = reader.ReadSingle();
        }

19 View Source File : LightInfo.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            ViewerSpaceLocation.Unpack(reader);

            Color       = reader.ReadUInt32();
            Intensity   = reader.ReadSingle();
            Falloff     = reader.ReadSingle();
            ConeAngle   = reader.ReadSingle();
        }

19 View Source File : TimeOfDay.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            Start   = reader.ReadSingle();
            IsNight = (reader.ReadUInt32() == 1);
            Name    = reader.ReadPString();
            reader.AlignBoundary();
        }

19 View Source File : Vec2Duv.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            U = reader.ReadSingle();
            V = reader.ReadSingle();
        }

19 View Source File : CallPESHook.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            base.Unpack(reader);

            PES     = reader.ReadUInt32();
            Pause   = reader.ReadSingle();
        }

19 View Source File : Plane.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public void Unpack(BinaryReader reader)
        {
            N = reader.ReadVector3();
            D = reader.ReadSingle();
        }

19 View Source File : ParticleEmitterInfo.cs
License : GNU Affero General Public License v3.0
Project Creator : ACEmulator

public override void Unpack(BinaryReader reader)
        {
            Id = reader.ReadUInt32();

            /*uint unknown = */reader.ReadUInt32();

            EmitterType  =  (EmitterType)reader.ReadInt32();
            ParticleType = (ParticleType)reader.ReadInt32();

            GfxObjId   = reader.ReadUInt32();
            HwGfxObjId = reader.ReadUInt32();

            Birthrate   = reader.ReadDouble();

            MaxParticles  = reader.ReadInt32();
            InitialParticles = reader.ReadInt32();

            TotalParticles = reader.ReadInt32();

            TotalSeconds  = reader.ReadDouble();

            Lifespan     = reader.ReadDouble();
            LifespanRand = reader.ReadDouble();

            OffsetDir = reader.ReadVector3();      
            MinOffset = reader.ReadSingle();
            MaxOffset = reader.ReadSingle(); 

            A = reader.ReadVector3();
            MinA = reader.ReadSingle();
            MaxA = reader.ReadSingle();

            B = reader.ReadVector3();
            MinB = reader.ReadSingle();
            MaxB = reader.ReadSingle();

            C = reader.ReadVector3();
            MinC = reader.ReadSingle();
            MaxC = reader.ReadSingle();

            StartScale = reader.ReadSingle();
            FinalScale = reader.ReadSingle();
            ScaleRand  = reader.ReadSingle();

            StartTrans = reader.ReadSingle();
            FinalTrans = reader.ReadSingle();
            TransRand  = reader.ReadSingle();

            IsParentLocal = reader.ReadInt32();
        }

See More Examples