Inheritance: MiscUtil.IO.EndianBinaryReader
コード例 #1
0
        public PrtForces(PrtBinaryReader reader)
        {
            this.RandomOrientation    = reader.ReadBoolean();
            this.Tumble               = reader.ReadBoolean();
            this.TumbleBothDirections = reader.ReadBoolean();
            this.RandomAxis           = reader.ReadBoolean();

            this.InternalGravity          = reader.ReadSingle();
            this.InternalGravityVar       = reader.ReadSingle();
            this.InternalWindDirection    = reader.ReadSingle();
            this.InternalWindDirectionVar = reader.ReadSingle();
            this.InternalWindSpeed        = reader.ReadSingle();
            this.InternalWindSpeedVar     = reader.ReadSingle();
            this.InternalWindDelay        = reader.ReadSingle();
            this.InternalWindDelayVar     = reader.ReadSingle();
            this.ExternalWindInfluence    = reader.ReadSingle();
            this.ExternalWindInfluenceVar = reader.ReadSingle();
            this.ExternalWindDelay        = reader.ReadSingle();
            this.ExternalWindDelayVar     = reader.ReadSingle();
            this.MinAngularVelocity       = reader.ReadSingle();
            this.MaxAngularVelocity       = reader.ReadSingle();
            this.XAxis    = reader.ReadSingle();
            this.XAxisVar = reader.ReadSingle();
            this.YAxis    = reader.ReadSingle();
            this.YAxisVar = reader.ReadSingle();
            this.ZAxis    = reader.ReadSingle();
            this.ZAxisVar = reader.ReadSingle();
        }
コード例 #2
0
 public PrtScaleStage(PrtBinaryReader reader)
 {
     this.Scale = reader.ReadSingle();
     this.ScaleVar = reader.ReadSingle();
     this.Hold = reader.ReadSingle();
     this.Fade = reader.ReadSingle();
 }
コード例 #3
0
 public PrtScaleStage(PrtBinaryReader reader)
 {
     this.Scale    = reader.ReadSingle();
     this.ScaleVar = reader.ReadSingle();
     this.Hold     = reader.ReadSingle();
     this.Fade     = reader.ReadSingle();
 }
コード例 #4
0
 public PrtOpacityStage(PrtBinaryReader reader)
 {
     this.Opacity    = reader.ReadSingle();
     this.OpacityVar = reader.ReadSingle();
     this.Hold       = reader.ReadSingle();
     this.Fade       = reader.ReadSingle();
 }
コード例 #5
0
ファイル: PrtForces.cs プロジェクト: Ryder25/Age-of-Mythology
        public PrtForces(PrtBinaryReader reader)
        {
            this.RandomOrientation = reader.ReadBoolean();
            this.Tumble = reader.ReadBoolean();
            this.TumbleBothDirections = reader.ReadBoolean();
            this.RandomAxis = reader.ReadBoolean();

            this.InternalGravity = reader.ReadSingle();
            this.InternalGravityVar = reader.ReadSingle();
            this.InternalWindDirection = reader.ReadSingle();
            this.InternalWindDirectionVar = reader.ReadSingle();
            this.InternalWindSpeed = reader.ReadSingle();
            this.InternalWindSpeedVar = reader.ReadSingle();
            this.InternalWindDelay = reader.ReadSingle();
            this.InternalWindDelayVar = reader.ReadSingle();
            this.ExternalWindInfluence = reader.ReadSingle();
            this.ExternalWindInfluenceVar = reader.ReadSingle();
            this.ExternalWindDelay = reader.ReadSingle();
            this.ExternalWindDelayVar = reader.ReadSingle();
            this.MinAngularVelocity = reader.ReadSingle();
            this.MaxAngularVelocity = reader.ReadSingle();
            this.XAxis = reader.ReadSingle();
            this.XAxisVar = reader.ReadSingle();
            this.YAxis = reader.ReadSingle();
            this.YAxisVar = reader.ReadSingle();
            this.ZAxis = reader.ReadSingle();
            this.ZAxisVar = reader.ReadSingle();
        }
コード例 #6
0
 public PrtOpacityStage(PrtBinaryReader reader)
 {
     this.Opacity = reader.ReadSingle();
     this.OpacityVar = reader.ReadSingle();
     this.Hold = reader.ReadSingle();
     this.Fade = reader.ReadSingle();
 }
コード例 #7
0
        public PrtColorStage(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.Color = reader.ReadTexel();
            this.Hold = reader.ReadSingle();
            this.Fade = reader.ReadSingle();
        }
コード例 #8
0
        public PrtCollision(PrtBinaryReader reader)
        {
            this.NumTypes = reader.ReadInt32();
            this.TerrainInteractionType = (PrtTerrainInteractionType)reader.ReadInt32();
            this.TerrainHeight = reader.ReadSingle();
            this.TerrainHeightVar = reader.ReadSingle();

            this.CollisionTypes = new List<PrtCollisionType>(this.NumTypes);
        }
コード例 #9
0
        public PrtCollision(PrtBinaryReader reader)
        {
            this.NumTypes = reader.ReadInt32();
            this.TerrainInteractionType = (PrtTerrainInteractionType)reader.ReadInt32();
            this.TerrainHeight          = reader.ReadSingle();
            this.TerrainHeightVar       = reader.ReadSingle();

            this.CollisionTypes = new List <PrtCollisionType>(this.NumTypes);
        }
コード例 #10
0
        public PrtColorStage(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.Color = reader.ReadTexel();
            this.Hold  = reader.ReadSingle();
            this.Fade  = reader.ReadSingle();
        }
コード例 #11
0
        public PrtFile(Stream stream)
        {
            using (PrtBinaryReader reader = new PrtBinaryReader(new LittleEndianBitConverter(), stream))
            {
                this.Version = reader.ReadInt32();

                this.Emitter    = new PrtEmitter(reader);
                this.Shape      = new PrtShape(reader);
                this.Appearance = new PrtAppearance(reader);
                this.Opacity    = new PrtOpacity(reader);
                this.Scale      = new PrtScale(reader);
                this.Color      = new PrtColor(reader);
                this.Forces     = new PrtForces(reader);
                this.Collision  = new PrtCollision(reader);

                this.BrgFileName = reader.ReadString();

                for (int i = 0; i < this.Color.NumPaletteColors; i++)
                {
                    this.Color.PaletteColors.Add(reader.ReadTexel());
                }

                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceWeights.Add(reader.ReadSingle());
                }
                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceFiles.Add(reader.ReadString());
                }

                for (int i = 0; i < this.Opacity.NumStages; i++)
                {
                    this.Opacity.OpacityStages.Add(new PrtOpacityStage(reader));
                }

                for (int i = 0; i < this.Scale.NumStages; i++)
                {
                    this.Scale.ScaleStages.Add(new PrtScaleStage(reader));
                }

                for (int i = 0; i < this.Color.NumStages; i++)
                {
                    this.Color.ColorStages.Add(new PrtColorStage(reader));
                }

                for (int i = 0; i < this.Collision.NumTypes; i++)
                {
                    this.Collision.CollisionTypes.Add(new PrtCollisionType(reader));
                }
            }
        }
コード例 #12
0
ファイル: PrtFile.cs プロジェクト: Ryder25/Age-of-Mythology
        public PrtFile(Stream stream)
        {
            using (PrtBinaryReader reader = new PrtBinaryReader(new LittleEndianBitConverter(), stream))
            {
                this.Version = reader.ReadInt32();

                this.Emitter = new PrtEmitter(reader);
                this.Shape = new PrtShape(reader);
                this.Appearance = new PrtAppearance(reader);
                this.Opacity = new PrtOpacity(reader);
                this.Scale = new PrtScale(reader);
                this.Color = new PrtColor(reader);
                this.Forces = new PrtForces(reader);
                this.Collision = new PrtCollision(reader);

                this.BrgFileName = reader.ReadString();

                for (int i = 0; i < this.Color.NumPaletteColors; i++)
                {
                    this.Color.PaletteColors.Add(reader.ReadTexel());
                }

                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceWeights.Add(reader.ReadSingle());
                }
                for (int i = 0; i < this.Appearance.NumFiles; i++)
                {
                    this.Appearance.AppearanceFiles.Add(reader.ReadString());
                }

                for (int i = 0; i < this.Opacity.NumStages; i++)
                {
                    this.Opacity.OpacityStages.Add(new PrtOpacityStage(reader));
                }

                for (int i = 0; i < this.Scale.NumStages; i++)
                {
                    this.Scale.ScaleStages.Add(new PrtScaleStage(reader));
                }

                for (int i = 0; i < this.Color.NumStages; i++)
                {
                    this.Color.ColorStages.Add(new PrtColorStage(reader));
                }

                for (int i = 0; i < this.Collision.NumTypes; i++)
                {
                    this.Collision.CollisionTypes.Add(new PrtCollisionType(reader));
                }
            }
        }
コード例 #13
0
        public PrtOpacity(PrtBinaryReader reader)
        {
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumStages    = reader.ReadInt32();
            this.Opacity      = reader.ReadSingle();
            this.OpacityVar   = reader.ReadSingle();
            this.CycleTime    = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();

            this.OpacityStages = new List <PrtOpacityStage>(this.NumStages);
        }
コード例 #14
0
        public PrtOpacity(PrtBinaryReader reader)
        {
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumStages = reader.ReadInt32();
            this.Opacity = reader.ReadSingle();
            this.OpacityVar = reader.ReadSingle();
            this.CycleTime = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();

            this.OpacityStages = new List<PrtOpacityStage>(this.NumStages);
        }
コード例 #15
0
        public PrtEmitter(PrtBinaryReader reader)
        {
            this.TiedToEmitter = reader.ReadBoolean();
            this.IgnoreRotation = reader.ReadBoolean();
            this.EmitByMotion = reader.ReadBoolean();
            this.Loop = reader.ReadBoolean();
            this.InheritVelocity = reader.ReadBoolean();
            this.UseMinVelocity = reader.ReadBoolean();
            this.UseMaxVelocity = reader.ReadBoolean();
            this.AlwaysActive = reader.ReadBoolean();
            this.SyncWithAttackAnim = reader.ReadBoolean();
            reader.ReadBytes(3); // 32 bit padding

            this.MaxParticles = reader.ReadInt32();
            this.AppearanceType = (PrtAppearanceType)reader.ReadInt32();
            this.UpdateRadius = reader.ReadSingle();
            this.MaxParticlesVar = reader.ReadSingle();
            this.ParticleLife = reader.ReadSingle();
            this.ParticleLifeVar = reader.ReadSingle();
            this.GlobalFadeIn = reader.ReadSingle();
            this.GlobalFadeInVar = reader.ReadSingle();
            this.GlobalFadeOut = reader.ReadSingle();
            this.GlobalFadeOutVar = reader.ReadSingle();
            this.EmitDistance = reader.ReadSingle();
            this.EmitDistanceVar = reader.ReadSingle();
            this.EmissionRate = reader.ReadSingle();
            this.EmissionRateVar = reader.ReadSingle();
            this.InitialDormancy = reader.ReadSingle();
            this.InitialDormancyVar = reader.ReadSingle();
            this.InitialUpdate = reader.ReadSingle();
            this.InitialUpdateVar = reader.ReadSingle();
            this.EmissionTime = reader.ReadSingle();
            this.EmissionTimeVar = reader.ReadSingle();
            this.DormantTime = reader.ReadSingle();
            this.DormantTimeVar = reader.ReadSingle();
            this.InitialDistance = reader.ReadSingle();
            this.InitialDistanceVar = reader.ReadSingle();
            this.InitialVelocity = reader.ReadSingle();
            this.InitialVelocityVar = reader.ReadSingle();
            this.Acceleration = reader.ReadSingle();
            this.AccelerationVar = reader.ReadSingle();
            this.InheritInfluence = reader.ReadSingle();
            this.InheritInfluenceVar = reader.ReadSingle();
            this.MinVelocity = reader.ReadSingle();
            this.MinVelocityVar = reader.ReadSingle();
            this.MaxVelocity = reader.ReadSingle();
            this.MaxVelocityVar = reader.ReadSingle();
        }
コード例 #16
0
        public PrtEmitter(PrtBinaryReader reader)
        {
            this.TiedToEmitter      = reader.ReadBoolean();
            this.IgnoreRotation     = reader.ReadBoolean();
            this.EmitByMotion       = reader.ReadBoolean();
            this.Loop               = reader.ReadBoolean();
            this.InheritVelocity    = reader.ReadBoolean();
            this.UseMinVelocity     = reader.ReadBoolean();
            this.UseMaxVelocity     = reader.ReadBoolean();
            this.AlwaysActive       = reader.ReadBoolean();
            this.SyncWithAttackAnim = reader.ReadBoolean();
            reader.ReadBytes(3); // 32 bit padding

            this.MaxParticles        = reader.ReadInt32();
            this.AppearanceType      = (PrtAppearanceType)reader.ReadInt32();
            this.UpdateRadius        = reader.ReadSingle();
            this.MaxParticlesVar     = reader.ReadSingle();
            this.ParticleLife        = reader.ReadSingle();
            this.ParticleLifeVar     = reader.ReadSingle();
            this.GlobalFadeIn        = reader.ReadSingle();
            this.GlobalFadeInVar     = reader.ReadSingle();
            this.GlobalFadeOut       = reader.ReadSingle();
            this.GlobalFadeOutVar    = reader.ReadSingle();
            this.EmitDistance        = reader.ReadSingle();
            this.EmitDistanceVar     = reader.ReadSingle();
            this.EmissionRate        = reader.ReadSingle();
            this.EmissionRateVar     = reader.ReadSingle();
            this.InitialDormancy     = reader.ReadSingle();
            this.InitialDormancyVar  = reader.ReadSingle();
            this.InitialUpdate       = reader.ReadSingle();
            this.InitialUpdateVar    = reader.ReadSingle();
            this.EmissionTime        = reader.ReadSingle();
            this.EmissionTimeVar     = reader.ReadSingle();
            this.DormantTime         = reader.ReadSingle();
            this.DormantTimeVar      = reader.ReadSingle();
            this.InitialDistance     = reader.ReadSingle();
            this.InitialDistanceVar  = reader.ReadSingle();
            this.InitialVelocity     = reader.ReadSingle();
            this.InitialVelocityVar  = reader.ReadSingle();
            this.Acceleration        = reader.ReadSingle();
            this.AccelerationVar     = reader.ReadSingle();
            this.InheritInfluence    = reader.ReadSingle();
            this.InheritInfluenceVar = reader.ReadSingle();
            this.MinVelocity         = reader.ReadSingle();
            this.MinVelocityVar      = reader.ReadSingle();
            this.MaxVelocity         = reader.ReadSingle();
            this.MaxVelocityVar      = reader.ReadSingle();
        }
コード例 #17
0
        public PrtColor(PrtBinaryReader reader)
        {
            this.UsePalette   = reader.ReadBoolean();
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(2);

            this.NumPaletteColors       = reader.ReadInt32();
            this.NumStages              = reader.ReadInt32();
            this.CycleTime              = reader.ReadSingle();
            this.CycleTimeVar           = reader.ReadSingle();
            this.WorldLightingInfluence = reader.ReadSingle();
            this.Color = reader.ReadTexel();

            this.PaletteColors = new List <Texel>(this.NumPaletteColors);
            this.ColorStages   = new List <PrtColorStage>(this.NumStages);
        }
コード例 #18
0
ファイル: PrtColor.cs プロジェクト: Ryder25/Age-of-Mythology
        public PrtColor(PrtBinaryReader reader)
        {
            this.UsePalette = reader.ReadBoolean();
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(2);

            this.NumPaletteColors = reader.ReadInt32();
            this.NumStages = reader.ReadInt32();
            this.CycleTime = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();
            this.WorldLightingInfluence = reader.ReadSingle();
            this.Color = reader.ReadTexel();

            this.PaletteColors = new List<Texel>(this.NumPaletteColors);
            this.ColorStages = new List<PrtColorStage>(this.NumStages);
        }
コード例 #19
0
ファイル: PrtScale.cs プロジェクト: Ryder25/Age-of-Mythology
        public PrtScale(PrtBinaryReader reader)
        {
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumStages = reader.ReadInt32();
            this.Scale = reader.ReadSingle();
            this.ScaleVar = reader.ReadSingle();
            this.XScale = reader.ReadSingle();
            this.XScaleVar = reader.ReadSingle();
            this.YScale = reader.ReadSingle();
            this.YScaleVar = reader.ReadSingle();
            this.ZScale = reader.ReadSingle();
            this.ZScaleVar = reader.ReadSingle();
            this.CycleTime = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();

            this.ScaleStages = new List<PrtScaleStage>(this.NumStages);
        }
コード例 #20
0
ファイル: PrtScale.cs プロジェクト: heinezen/Age-of-Mythology
        public PrtScale(PrtBinaryReader reader)
        {
            this.LoopingCycle = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumStages    = reader.ReadInt32();
            this.Scale        = reader.ReadSingle();
            this.ScaleVar     = reader.ReadSingle();
            this.XScale       = reader.ReadSingle();
            this.XScaleVar    = reader.ReadSingle();
            this.YScale       = reader.ReadSingle();
            this.YScaleVar    = reader.ReadSingle();
            this.ZScale       = reader.ReadSingle();
            this.ZScaleVar    = reader.ReadSingle();
            this.CycleTime    = reader.ReadSingle();
            this.CycleTimeVar = reader.ReadSingle();

            this.ScaleStages = new List <PrtScaleStage>(this.NumStages);
        }
コード例 #21
0
        public PrtAppearance(PrtBinaryReader reader)
        {
            this.OrientByMotion = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumFiles = reader.ReadInt32();
            this.NumFrames = reader.ReadInt32();
            this.FrameWidth = reader.ReadInt32();
            this.FrameHeight = reader.ReadInt32();
            this.MaterialType = (PrtMaterialType)reader.ReadInt32();
            this.Emissive = reader.ReadTexel();
            this.Specular = reader.ReadTexel();
            this.SpecularExponent = reader.ReadSingle();
            this.FramesPerSecond = reader.ReadSingle();
            this.AnimationRate = reader.ReadSingle();
            this.AnimationRateVar = reader.ReadSingle();

            this.AppearanceWeights = new List<float>(this.NumFiles);
            this.AppearanceFiles = new List<string>(this.NumFiles);
        }
コード例 #22
0
        public PrtAppearance(PrtBinaryReader reader)
        {
            this.OrientByMotion = reader.ReadBoolean();
            reader.ReadBytes(3);

            this.NumFiles         = reader.ReadInt32();
            this.NumFrames        = reader.ReadInt32();
            this.FrameWidth       = reader.ReadInt32();
            this.FrameHeight      = reader.ReadInt32();
            this.MaterialType     = (PrtMaterialType)reader.ReadInt32();
            this.Emissive         = reader.ReadTexel();
            this.Specular         = reader.ReadTexel();
            this.SpecularExponent = reader.ReadSingle();
            this.FramesPerSecond  = reader.ReadSingle();
            this.AnimationRate    = reader.ReadSingle();
            this.AnimationRateVar = reader.ReadSingle();

            this.AppearanceWeights = new List <float>(this.NumFiles);
            this.AppearanceFiles   = new List <string>(this.NumFiles);
        }
コード例 #23
0
ファイル: PrtShape.cs プロジェクト: Ryder25/Age-of-Mythology
        public PrtShape(PrtBinaryReader reader)
        {
            this.StartFull = reader.ReadBoolean();
            this.EmitAwayFromBias = reader.ReadBoolean();
            this.UseSpreader = reader.ReadBoolean();
            reader.ReadByte();

            this.ShapeType = (PrtShapeType)reader.ReadInt32();
            this.OuterXRadius = reader.ReadSingle();
            this.InnerXRadius = reader.ReadSingle();
            this.OuterYRadius = reader.ReadSingle();
            this.InnerYRadius = reader.ReadSingle();
            this.OuterZRadius = reader.ReadSingle();
            this.InnerZRadius = reader.ReadSingle();
            this.CenterHeight = reader.ReadSingle();
            this.OffAxis = reader.ReadSingle();
            this.OffAxisSpread = reader.ReadSingle();
            this.OffPlane = reader.ReadSingle();
            this.OffPlaneSpread = reader.ReadSingle();
            this.BiasPointHeight = reader.ReadSingle();
        }
コード例 #24
0
        public PrtShape(PrtBinaryReader reader)
        {
            this.StartFull        = reader.ReadBoolean();
            this.EmitAwayFromBias = reader.ReadBoolean();
            this.UseSpreader      = reader.ReadBoolean();
            reader.ReadByte();

            this.ShapeType       = (PrtShapeType)reader.ReadInt32();
            this.OuterXRadius    = reader.ReadSingle();
            this.InnerXRadius    = reader.ReadSingle();
            this.OuterYRadius    = reader.ReadSingle();
            this.InnerYRadius    = reader.ReadSingle();
            this.OuterZRadius    = reader.ReadSingle();
            this.InnerZRadius    = reader.ReadSingle();
            this.CenterHeight    = reader.ReadSingle();
            this.OffAxis         = reader.ReadSingle();
            this.OffAxisSpread   = reader.ReadSingle();
            this.OffPlane        = reader.ReadSingle();
            this.OffPlaneSpread  = reader.ReadSingle();
            this.BiasPointHeight = reader.ReadSingle();
        }
コード例 #25
0
        public PrtCollisionType(PrtBinaryReader reader)
        {
            this.SpawnSystem = reader.ReadBoolean();
            this.CollideTerrain = reader.ReadBoolean();
            this.CollideWater = reader.ReadBoolean();
            this.CollideUnits = reader.ReadBoolean();

            this.Result = reader.ReadInt32();
            this.NumFileNames = reader.ReadInt32();
            this.LingerTime = reader.ReadSingle();
            this.LingerTimeVar = reader.ReadSingle();
            this.FadeTime = reader.ReadSingle();
            this.FadeTimeVar = reader.ReadSingle();
            this.EnergyLoss = reader.ReadSingle();
            this.EnergyLossVar = reader.ReadSingle();

            this.Name = reader.ReadString();
            this.FileNames = new List<string>(this.NumFileNames);
            for (int i = 0; i < this.NumFileNames; i++)
            {
                this.FileNames.Add(reader.ReadString());
            }
        }
コード例 #26
0
        public PrtCollisionType(PrtBinaryReader reader)
        {
            this.SpawnSystem    = reader.ReadBoolean();
            this.CollideTerrain = reader.ReadBoolean();
            this.CollideWater   = reader.ReadBoolean();
            this.CollideUnits   = reader.ReadBoolean();

            this.Result        = reader.ReadInt32();
            this.NumFileNames  = reader.ReadInt32();
            this.LingerTime    = reader.ReadSingle();
            this.LingerTimeVar = reader.ReadSingle();
            this.FadeTime      = reader.ReadSingle();
            this.FadeTimeVar   = reader.ReadSingle();
            this.EnergyLoss    = reader.ReadSingle();
            this.EnergyLossVar = reader.ReadSingle();

            this.Name      = reader.ReadString();
            this.FileNames = new List <string>(this.NumFileNames);
            for (int i = 0; i < this.NumFileNames; i++)
            {
                this.FileNames.Add(reader.ReadString());
            }
        }