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(); }
public PrtScaleStage(PrtBinaryReader reader) { this.Scale = reader.ReadSingle(); this.ScaleVar = reader.ReadSingle(); this.Hold = reader.ReadSingle(); this.Fade = reader.ReadSingle(); }
public PrtOpacityStage(PrtBinaryReader reader) { this.Opacity = reader.ReadSingle(); this.OpacityVar = reader.ReadSingle(); this.Hold = reader.ReadSingle(); this.Fade = reader.ReadSingle(); }
public PrtColorStage(PrtBinaryReader reader) { this.UsePalette = reader.ReadBoolean(); reader.ReadBytes(3); this.Color = reader.ReadTexel(); this.Hold = reader.ReadSingle(); this.Fade = reader.ReadSingle(); }
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); }
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); }
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)); } } }
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); }
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); }
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(); }
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); }
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); }
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); }
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); }
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); }
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); }
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(); }
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()); } }
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()); } }