internal StructureBspClusterBlockBase(BinaryReader binaryReader) { this.sectionInfo = new GlobalGeometrySectionInfoStructBlock(binaryReader); this.geometryBlockInfo = new GlobalGeometryBlockInfoStructBlock(binaryReader); this.clusterData = ReadStructureBspClusterDataBlockNewArray(binaryReader); this.boundsX = binaryReader.ReadRange(); this.boundsY = binaryReader.ReadRange(); this.boundsZ = binaryReader.ReadRange(); this.scenarioSkyIndex = binaryReader.ReadByte(); this.mediaIndex = binaryReader.ReadByte(); this.scenarioVisibleSkyIndex = binaryReader.ReadByte(); this.scenarioAtmosphericFogIndex = binaryReader.ReadByte(); this.planarFogDesignator = binaryReader.ReadByte(); this.visibleFogPlaneIndex = binaryReader.ReadByte(); this.backgroundSound = binaryReader.ReadShortBlockIndex1(); this.soundEnvironment = binaryReader.ReadShortBlockIndex1(); this.weather = binaryReader.ReadShortBlockIndex1(); this.transitionStructureBSP = binaryReader.ReadInt16(); this.invalidName_ = binaryReader.ReadBytes(2); this.invalidName_0 = binaryReader.ReadBytes(4); this.flags = (Flags)binaryReader.ReadInt16(); this.invalidName_1 = binaryReader.ReadBytes(2); this.predictedResources = ReadPredictedResourceBlockArray(binaryReader); this.portals = ReadStructureBspClusterPortalIndexBlockArray(binaryReader); this.checksumFromStructure = binaryReader.ReadInt32(); this.instancedGeometryIndices = ReadStructureBspClusterInstancedGeometryIndexBlockArray(binaryReader); this.indexReorderTable = ReadGlobalGeometrySectionStripIndexBlockArray(binaryReader); this.collisionMoppCode = ReadData(binaryReader); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.ScaleBounds = binaryReader.ReadRange(); this.RandomBaseAndVariance = binaryReader.ReadRange(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.ItemItemFlags = ((ItemFlags)(binaryReader.ReadInt32())); this.OLDMessageIndex = binaryReader.ReadInt16(); this.SortOrder = binaryReader.ReadInt16(); this.MultiplayerOngroundScale = binaryReader.ReadSingle(); this.CampaignOngroundScale = binaryReader.ReadSingle(); this.PickupMessage = binaryReader.ReadStringID(); this.SwapMessage = binaryReader.ReadStringID(); this.PickupOrDualMsg = binaryReader.ReadStringID(); this.SwapOrDualMsg = binaryReader.ReadStringID(); this.DualonlyMsg = binaryReader.ReadStringID(); this.PickedUpMsg = binaryReader.ReadStringID(); this.SingluarQuantityMsg = binaryReader.ReadStringID(); this.PluralQuantityMsg = binaryReader.ReadStringID(); this.SwitchtoMsg = binaryReader.ReadStringID(); this.SwitchtoFromAiMsg = binaryReader.ReadStringID(); this.UNUSED = binaryReader.ReadTagReference(); this.CollisionSound = binaryReader.ReadTagReference(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); this.DetonationDamageEffect = binaryReader.ReadTagReference(); this.DetonationDelay = binaryReader.ReadRange(); this.DetonatingEffect = binaryReader.ReadTagReference(); this.DetonationEffect = binaryReader.ReadTagReference(); return(pointerQueue); }
internal FlockDefinitionBlockBase(BinaryReader binaryReader) { this.bsp = binaryReader.ReadShortBlockIndex1(); this.invalidName_ = binaryReader.ReadBytes(2); this.boundingVolume = binaryReader.ReadShortBlockIndex1(); this.flags = (Flags)binaryReader.ReadInt16(); this.ecologyMarginWus = binaryReader.ReadSingle(); this.sources = ReadFlockSourceBlockArray(binaryReader); this.sinks = ReadFlockSinkBlockArray(binaryReader); this.productionFrequencyBoidsSec = binaryReader.ReadSingle(); this.scale = binaryReader.ReadRange(); this.creature = binaryReader.ReadTagReference(); this.boidCount = binaryReader.ReadInt32(); this.neighborhoodRadiusWorldUnits = binaryReader.ReadSingle(); this.avoidanceRadiusWorldUnits = binaryReader.ReadSingle(); this.forwardScale01 = binaryReader.ReadSingle(); this.alignmentScale01 = binaryReader.ReadSingle(); this.avoidanceScale01 = binaryReader.ReadSingle(); this.levelingForceScale01 = binaryReader.ReadSingle(); this.sinkScale01 = binaryReader.ReadSingle(); this.perceptionAngleDegrees = binaryReader.ReadSingle(); this.averageThrottle01 = binaryReader.ReadSingle(); this.maximumThrottle01 = binaryReader.ReadSingle(); this.positionScale01 = binaryReader.ReadSingle(); this.positionMinRadiusWus = binaryReader.ReadSingle(); this.positionMaxRadiusWus = binaryReader.ReadSingle(); this.movementWeightThreshold = binaryReader.ReadSingle(); this.dangerRadiusWus = binaryReader.ReadSingle(); this.dangerScale = binaryReader.ReadSingle(); this.randomOffsetScale01 = binaryReader.ReadSingle(); this.randomOffsetPeriodSeconds = binaryReader.ReadRange(); this.flockName = binaryReader.ReadStringID(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.ProjectileMaterialResponseFlags = ((Flags)(binaryReader.ReadInt16())); this.Response = ((ResponseEnum)(binaryReader.ReadInt16())); this.DONOTUSE = binaryReader.ReadTagReference(); this.MaterialName = binaryReader.ReadStringID(); this.fieldskip = binaryReader.ReadBytes(4); this.ProjectileMaterialResponseProjectileMaterialResponseResponse = ((ProjectileMaterialResponseResponseEnum)(binaryReader.ReadInt16())); this.ProjectileMaterialResponseProjectileMaterialResponseFlags0 = ((ProjectileMaterialResponseFlags0)(binaryReader.ReadInt16())); this.ChanceFraction = binaryReader.ReadSingle(); this.Between = binaryReader.ReadRange(); this.And = binaryReader.ReadRange(); this.DONOTUSE0 = binaryReader.ReadTagReference(); this.ScaleEffectsBy = ((ScaleEffectsByEnum)(binaryReader.ReadInt16())); this.fieldpad = binaryReader.ReadBytes(2); this.AngularNoise = binaryReader.ReadSingle(); this.VelocityNoise = binaryReader.ReadSingle(); this.DONOTUSE1 = binaryReader.ReadTagReference(); this.InitialFriction = binaryReader.ReadSingle(); this.MaximumDistance = binaryReader.ReadSingle(); this.ParallelFriction = binaryReader.ReadSingle(); this.PerpendicularFriction = binaryReader.ReadSingle(); return(pointerQueue); }
internal ItemBlockBase(BinaryReader binaryReader) : base(binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.oLDMessageIndex = binaryReader.ReadInt16(); this.sortOrder = binaryReader.ReadInt16(); this.multiplayerOnGroundScale = binaryReader.ReadSingle(); this.campaignOnGroundScale = binaryReader.ReadSingle(); this.pickupMessage = binaryReader.ReadStringID(); this.swapMessage = binaryReader.ReadStringID(); this.pickupOrDualMsg = binaryReader.ReadStringID(); this.swapOrDualMsg = binaryReader.ReadStringID(); this.dualOnlyMsg = binaryReader.ReadStringID(); this.pickedUpMsg = binaryReader.ReadStringID(); this.singluarQuantityMsg = binaryReader.ReadStringID(); this.pluralQuantityMsg = binaryReader.ReadStringID(); this.switchToMsg = binaryReader.ReadStringID(); this.switchToFromAiMsg = binaryReader.ReadStringID(); this.uNUSED = binaryReader.ReadTagReference(); this.collisionSound = binaryReader.ReadTagReference(); this.predictedBitmaps = ReadPredictedBitmapsBlockArray(binaryReader); this.detonationDamageEffect = binaryReader.ReadTagReference(); this.detonationDelaySeconds = binaryReader.ReadRange(); this.detonatingEffect = binaryReader.ReadTagReference(); this.detonationEffect = binaryReader.ReadTagReference(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.CharacterVitalityVitalityFlags = ((VitalityFlags)(binaryReader.ReadInt32())); this.NormalBodyVitality = binaryReader.ReadSingle(); this.NormalShieldVitality = binaryReader.ReadSingle(); this.LegendaryBodyVitality = binaryReader.ReadSingle(); this.LegendaryShieldVitality = binaryReader.ReadSingle(); this.BodyRechargeFraction = binaryReader.ReadSingle(); this.SoftPingThreshold = binaryReader.ReadSingle(); this.SoftPingThreshold0 = binaryReader.ReadSingle(); this.SoftPingMinInterruptTime = binaryReader.ReadSingle(); this.HardPingThreshold = binaryReader.ReadSingle(); this.HardPingThreshold0 = binaryReader.ReadSingle(); this.HardPingMinInterruptTime = binaryReader.ReadSingle(); this.CurrentDamageDecayDelay = binaryReader.ReadSingle(); this.CurrentDamageDecayTime = binaryReader.ReadSingle(); this.RecentDamageDecayDelay = binaryReader.ReadSingle(); this.RecentDamageDecayTime = binaryReader.ReadSingle(); this.BodyRechargeDelayTime = binaryReader.ReadSingle(); this.BodyRechargeTime = binaryReader.ReadSingle(); this.ShieldRechargeDelayTime = binaryReader.ReadSingle(); this.ShieldRechargeTime = binaryReader.ReadSingle(); this.StunThreshold = binaryReader.ReadSingle(); this.StunTimeBounds = binaryReader.ReadRange(); this.ExtendedShieldDamageThreshold = binaryReader.ReadSingle(); this.ExtendedBodyDamageThreshold = binaryReader.ReadSingle(); this.SuicideRadius = binaryReader.ReadSingle(); this.fieldskip = binaryReader.ReadBytes(8); return(pointerQueue); }
internal UnitSeatBlockBase(BinaryReader binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.label = binaryReader.ReadStringID(); this.markerName = binaryReader.ReadStringID(); this.entryMarkerSName = binaryReader.ReadStringID(); this.boardingGrenadeMarker = binaryReader.ReadStringID(); this.boardingGrenadeString = binaryReader.ReadStringID(); this.boardingMeleeString = binaryReader.ReadStringID(); this.pingScale = binaryReader.ReadSingle(); this.turnoverTimeSeconds = binaryReader.ReadSingle(); this.acceleration = new UnitSeatAccelerationStructBlock(binaryReader); this.aIScariness = binaryReader.ReadSingle(); this.aiSeatType = (AiSeatType)binaryReader.ReadInt16(); this.boardingSeat = binaryReader.ReadShortBlockIndex1(); this.listenerInterpolationFactor = binaryReader.ReadSingle(); this.yawRateBoundsDegreesPerSecond = binaryReader.ReadRange(); this.pitchRateBoundsDegreesPerSecond = binaryReader.ReadRange(); this.minSpeedReference = binaryReader.ReadSingle(); this.maxSpeedReference = binaryReader.ReadSingle(); this.speedExponent = binaryReader.ReadSingle(); this.unitCamera = new UnitCameraStructBlock(binaryReader); this.unitHudInterface = ReadUnitHudReferenceBlockArray(binaryReader); this.enterSeatString = binaryReader.ReadStringID(); this.yawMinimum = binaryReader.ReadSingle(); this.yawMaximum = binaryReader.ReadSingle(); this.builtInGunner = binaryReader.ReadTagReference(); this.entryRadius = binaryReader.ReadSingle(); this.entryMarkerConeAngle = binaryReader.ReadSingle(); this.entryMarkerFacingAngle = binaryReader.ReadSingle(); this.maximumRelativeVelocity = binaryReader.ReadSingle(); this.invisibleSeatRegion = binaryReader.ReadStringID(); this.runtimeInvisibleSeatRegionIndex = binaryReader.ReadInt32(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.Bsp = binaryReader.ReadShortBlockIndex1(); this.fieldpad = binaryReader.ReadBytes(2); this.BoundingVolume = binaryReader.ReadShortBlockIndex1(); this.FlockDefinitionFlags = ((Flags)(binaryReader.ReadInt16())); this.EcologyMargin = binaryReader.ReadSingle(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(28)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(16)); this.ProductionFrequency = binaryReader.ReadSingle(); this.Scale = binaryReader.ReadRange(); this.Creature = binaryReader.ReadTagReference(); this.BoidCount = binaryReader.ReadInt32(); this.NeighborhoodRadius = binaryReader.ReadSingle(); this.AvoidanceRadius = binaryReader.ReadSingle(); this.ForwardScale = binaryReader.ReadSingle(); this.AlignmentScale = binaryReader.ReadSingle(); this.AvoidanceScale = binaryReader.ReadSingle(); this.LevelingForceScale = binaryReader.ReadSingle(); this.SinkScale = binaryReader.ReadSingle(); this.PerceptionAngle = binaryReader.ReadSingle(); this.AverageThrottle = binaryReader.ReadSingle(); this.MaximumThrottle = binaryReader.ReadSingle(); this.PositionScale = binaryReader.ReadSingle(); this.PositionMinRadius = binaryReader.ReadSingle(); this.PositionMaxRadius = binaryReader.ReadSingle(); this.MovementWeightThreshold = binaryReader.ReadSingle(); this.DangerRadius = binaryReader.ReadSingle(); this.DangerScale = binaryReader.ReadSingle(); this.RandomOffsetScale = binaryReader.ReadSingle(); this.RandomOffsetPeriod = binaryReader.ReadRange(); this.FlockName = binaryReader.ReadStringID(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.MaxSoundsPerTag116 = binaryReader.ReadInt16(); this.MaxSoundsPerObject116 = binaryReader.ReadInt16(); this.PreemptionTime = binaryReader.ReadInt32(); this.SoundClassInternalFlags = ((InternalFlags)(binaryReader.ReadInt16())); this.SoundClassFlags = ((Flags)(binaryReader.ReadInt16())); this.Priority = binaryReader.ReadInt16(); this.CacheMissMode = ((CacheMissModeEnum)(binaryReader.ReadInt16())); this.ReverbGain = binaryReader.ReadSingle(); this.OverrideSpeakerGain = binaryReader.ReadSingle(); this.DistanceBounds = binaryReader.ReadRange(); this.GainBounds = binaryReader.ReadRange(); this.CutsceneDucking = binaryReader.ReadSingle(); this.CutsceneDuckingFadeInTime = binaryReader.ReadSingle(); this.CutsceneDuckingSustainTime = binaryReader.ReadSingle(); this.CutsceneDuckingFadeOutTime = binaryReader.ReadSingle(); this.ScriptedDialogDucking = binaryReader.ReadSingle(); this.ScriptedDialogDuckingFadeInTime = binaryReader.ReadSingle(); this.ScriptedDialogDuckingSustainTime = binaryReader.ReadSingle(); this.ScriptedDialogDuckingFadeOutTime = binaryReader.ReadSingle(); this.DopplerFactor = binaryReader.ReadSingle(); this.StereoPlaybackType = ((StereoPlaybackTypeEnum)(binaryReader.ReadByte())); this.fieldpad = binaryReader.ReadBytes(3); this.TransmissionMultiplier = binaryReader.ReadSingle(); this.ObstructionMaxBend = binaryReader.ReadSingle(); this.OcclusionMaxBend = binaryReader.ReadSingle(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.fieldpad = binaryReader.ReadBytes(4); this.IdlePoseDelayTime = binaryReader.ReadRange(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.SectionInfo.ReadFields(binaryReader))); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.GeometryBlockInfo.ReadFields(binaryReader))); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(68)); this.BoundsX = binaryReader.ReadRange(); this.BoundsY = binaryReader.ReadRange(); this.BoundsZ = binaryReader.ReadRange(); this.ScenarioSkyIndex = binaryReader.ReadByte(); this.MediaIndex = binaryReader.ReadByte(); this.ScenarioVisibleSkyIndex = binaryReader.ReadByte(); this.ScenarioAtmosphericFogIndex = binaryReader.ReadByte(); this.PlanarFogDesignator = binaryReader.ReadByte(); this.VisibleFogPlaneIndex = binaryReader.ReadByte(); this.BackgroundSound = binaryReader.ReadShortBlockIndex1(); this.SoundEnvironment = binaryReader.ReadShortBlockIndex1(); this.Weather = binaryReader.ReadShortBlockIndex1(); this.TransitionStructureBSP = binaryReader.ReadInt16(); this.fieldpad = binaryReader.ReadBytes(2); this.fieldpad0 = binaryReader.ReadBytes(4); this.StructureBspClusterFlags = ((Flags)(binaryReader.ReadInt16())); this.fieldpad1 = binaryReader.ReadBytes(2); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(2)); this.ChecksumFromStructure = binaryReader.ReadInt32(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(2)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(2)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(1)); return(pointerQueue); }
internal ScenarioAtmosphericFogPaletteBase(BinaryReader binaryReader) { this.name = binaryReader.ReadStringID(); this.color = binaryReader.ReadColorR8G8B8(); this.spreadDistanceWorldUnits = binaryReader.ReadSingle(); this.invalidName_ = binaryReader.ReadBytes(4); this.maximumDensity01 = binaryReader.ReadSingle(); this.startDistanceWorldUnits = binaryReader.ReadSingle(); this.opaqueDistanceWorldUnits = binaryReader.ReadSingle(); this.color0 = binaryReader.ReadColorR8G8B8(); this.invalidName_0 = binaryReader.ReadBytes(4); this.maximumDensity010 = binaryReader.ReadSingle(); this.startDistanceWorldUnits0 = binaryReader.ReadSingle(); this.opaqueDistanceWorldUnits0 = binaryReader.ReadSingle(); this.invalidName_1 = binaryReader.ReadBytes(4); this.planarColor = binaryReader.ReadColorR8G8B8(); this.planarMaxDensity01 = binaryReader.ReadSingle(); this.planarOverrideAmount01 = binaryReader.ReadSingle(); this.planarMinDistanceBiasWorldUnits = binaryReader.ReadSingle(); this.invalidName_2 = binaryReader.ReadBytes(44); this.patchyColor = binaryReader.ReadColorR8G8B8(); this.invalidName_3 = binaryReader.ReadBytes(12); this.patchyDensity01 = binaryReader.ReadVector2(); this.patchyDistanceWorldUnits = binaryReader.ReadRange(); this.invalidName_4 = binaryReader.ReadBytes(32); this.patchyFog = binaryReader.ReadTagReference(); this.mixers = ReadScenarioAtmosphericFogMixerBlockArray(binaryReader); this.amount01 = binaryReader.ReadSingle(); this.threshold01 = binaryReader.ReadSingle(); this.brightness01 = binaryReader.ReadSingle(); this.gammaPower = binaryReader.ReadSingle(); this.cameraImmersionFlags = (CameraImmersionFlags)binaryReader.ReadInt16(); this.invalidName_5 = binaryReader.ReadBytes(2); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(592)); this.fieldpad = binaryReader.ReadBytes(4); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(20)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(64)); this.VehicleFloor = binaryReader.ReadSingle(); this.VehicleCeiling = binaryReader.ReadSingle(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(6)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); this.WorldBoundsX = binaryReader.ReadRange(); this.WorldBoundsY = binaryReader.ReadRange(); this.WorldBoundsZ = binaryReader.ReadRange(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(1)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(36)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(24)); this.fieldpad0 = binaryReader.ReadBytes(24); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(136)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(24)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(36)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(176)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(32)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(2)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(24)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(24)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(116)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(1)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(100)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(72)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(1)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(60)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(16)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(20)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(104)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); this.fieldpad1 = binaryReader.ReadBytes(4); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(16)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(24)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(676)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(48)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(200)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(88)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(20)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(20)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(20)); this.fieldpad2 = binaryReader.ReadBytes(96); this.VehicleSpericalLimitRadius = binaryReader.ReadSingle(); this.VehicleSpericalLimitCenter = binaryReader.ReadVector3(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(88)); this.Decorators = binaryReader.ReadTagReference(); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.StructurePhysics.ReadFields(binaryReader))); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(172)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(16)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(52)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(92)); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(48)); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.DecalFlags = ((Flags)(binaryReader.ReadInt16())); this.Type = ((TypeEnum)(binaryReader.ReadInt16())); this.Layer = ((LayerEnum)(binaryReader.ReadInt16())); this.MaxOverlappingCount = binaryReader.ReadInt16(); this.NextDecalInChain = binaryReader.ReadTagReference(); this.Radius = binaryReader.ReadRange(); this.RadiusOverlapRejection = binaryReader.ReadSingle(); this.ColorLowerBounds = binaryReader.ReadColorR8G8B8(); this.ColorUpperBounds = binaryReader.ReadColorR8G8B8(); this.Lifetime = binaryReader.ReadRange(); this.DecayTime = binaryReader.ReadRange(); this.fieldpad = binaryReader.ReadBytes(40); this.fieldpad0 = binaryReader.ReadBytes(2); this.fieldpad1 = binaryReader.ReadBytes(2); this.fieldpad2 = binaryReader.ReadBytes(2); this.fieldpad3 = binaryReader.ReadBytes(2); this.fieldpad4 = binaryReader.ReadBytes(20); this.Bitmap = binaryReader.ReadTagReference(); this.fieldpad5 = binaryReader.ReadBytes(20); this.MaximumSpriteExtent = binaryReader.ReadSingle(); this.fieldpad6 = binaryReader.ReadBytes(4); return(pointerQueue); }
internal SoundSceneryDatumStructBlockBase(BinaryReader binaryReader) { this.volumeType = (VolumeType)binaryReader.ReadInt32(); this.height = binaryReader.ReadSingle(); this.overrideDistanceBounds = binaryReader.ReadRange(); this.overrideConeAngleBounds = binaryReader.ReadRange(); this.overrideOuterConeGainDB = binaryReader.ReadSingle(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.GainModifier = binaryReader.ReadRange(); this.PitchModifier = binaryReader.ReadInt32(); this.SkipFractionModifier = binaryReader.ReadVector2(); return(pointerQueue); }
public static Range Expand(Range x, float p) { float min = x.min; float max = x.max; min -= p; max += p; return new Range(min, max); }
internal void Expand(float p) { X = Range.Expand(X, p); Y = Range.Expand(Y, p); Z = Range.Expand(Z, p); U = Range.Expand(U, p); V = Range.Expand(V, p); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.CharacterSearchSearchFlags = ((SearchFlags)(binaryReader.ReadInt32())); this.SearchTime = binaryReader.ReadRange(); this.UncoverDistanceBounds = binaryReader.ReadRange(); return(pointerQueue); }
internal UnitCameraStructBlockBase(BinaryReader binaryReader) { this.cameraMarkerName = binaryReader.ReadStringID(); this.cameraSubmergedMarkerName = binaryReader.ReadStringID(); this.pitchAutoLevel = binaryReader.ReadSingle(); this.pitchRange = binaryReader.ReadRange(); this.cameraTracks = ReadUnitCameraTrackBlockArray(binaryReader); }
public static Range Include(Range x, float p) { float min = x.min; float max = x.max; if (x.min > p) min = p; if (x.max < p) max = p; return new Range(min, max); }
internal ScenarioStructureBspBlockBase(BinaryReader binaryReader) { this.importInfo = ReadGlobalTagImportInfoBlockArray(binaryReader); this.invalidName_ = binaryReader.ReadBytes(4); this.collisionMaterials = ReadStructureCollisionMaterialsBlockArray(binaryReader); this.collisionBSP = ReadGlobalCollisionBspBlockArray(binaryReader); this.vehicleFloorWorldUnits = binaryReader.ReadSingle(); this.vehicleCeilingWorldUnits = binaryReader.ReadSingle(); this.uNUSEDNodes = ReadUNUSEDStructureBspNodeBlockArray(binaryReader); this.leaves = ReadStructureBspLeafBlockArray(binaryReader); this.worldBoundsX = binaryReader.ReadRange(); this.worldBoundsY = binaryReader.ReadRange(); this.worldBoundsZ = binaryReader.ReadRange(); this.surfaceReferences = ReadStructureBspSurfaceReferenceBlockArray(binaryReader); this.clusterData = ReadData(binaryReader); this.clusterPortals = ReadStructureBspClusterPortalBlockArray(binaryReader); this.fogPlanes = ReadStructureBspFogPlaneBlockArray(binaryReader); this.invalidName_0 = binaryReader.ReadBytes(24); this.weatherPalette = ReadStructureBspWeatherPaletteBlockArray(binaryReader); this.weatherPolyhedra = ReadStructureBspWeatherPolyhedronBlockArray(binaryReader); this.detailObjects = ReadStructureBspDetailObjectDataBlockArray(binaryReader); this.clusters = ReadStructureBspClusterBlockArray(binaryReader); this.materials = ReadGlobalGeometryMaterialBlockArray(binaryReader); this.skyOwnerCluster = ReadStructureBspSkyOwnerClusterBlockArray(binaryReader); this.conveyorSurfaces = ReadStructureBspConveyorSurfaceBlockArray(binaryReader); this.breakableSurfaces = ReadStructureBspBreakableSurfaceBlockArray(binaryReader); this.pathfindingData = ReadPathfindingDataBlockArray(binaryReader); this.pathfindingEdges = ReadStructureBspPathfindingEdgesBlockArray(binaryReader); this.backgroundSoundPalette = ReadStructureBspBackgroundSoundPaletteBlockArray(binaryReader); this.soundEnvironmentPalette = ReadStructureBspSoundEnvironmentPaletteBlockArray(binaryReader); this.soundPASData = ReadData(binaryReader); this.markers = ReadStructureBspMarkerBlockArray(binaryReader); this.runtimeDecals = ReadStructureBspRuntimeDecalBlockArray(binaryReader); this.environmentObjectPalette = ReadStructureBspEnvironmentObjectPaletteBlockArray(binaryReader); this.environmentObjects = ReadStructureBspEnvironmentObjectBlockArray(binaryReader); this.lightmaps = ReadStructureBspLightmapDataBlockArray(binaryReader); this.invalidName_1 = binaryReader.ReadBytes(4); this.leafMapLeaves = ReadGlobalMapLeafBlockArray(binaryReader); this.leafMapConnections = ReadGlobalLeafConnectionBlockArray(binaryReader); this.errors = ReadGlobalErrorReportCategoriesBlockArray(binaryReader); this.precomputedLighting = ReadStructureBspPrecomputedLightingBlockArray(binaryReader); this.instancedGeometriesDefinitions = ReadStructureBspInstancedGeometryDefinitionBlockArray(binaryReader); this.instancedGeometryInstances = ReadStructureBspInstancedGeometryInstancesBlockArray(binaryReader); this.ambienceSoundClusters = ReadStructureBspSoundClusterBlockArray(binaryReader); this.reverbSoundClusters = ReadStructureBspSoundClusterBlockArray(binaryReader); this.transparentPlanes = ReadTransparentPlanesBlockArray(binaryReader); this.invalidName_2 = binaryReader.ReadBytes(96); this.vehicleSpericalLimitRadius = binaryReader.ReadSingle(); this.vehicleSpericalLimitCenter = binaryReader.ReadVector3(); this.debugInfo = ReadStructureBspDebugInfoBlockArray(binaryReader); this.decorators = binaryReader.ReadTagReference(); this.structurePhysics = new GlobalStructurePhysicsStructBlock(binaryReader); this.waterDefinitions = ReadGlobalWaterDefinitionsBlockArray(binaryReader); this.portalDeviceMapping = ReadStructurePortalDeviceMappingBlockArray(binaryReader); this.audibility = ReadStructureBspAudibilityBlockArray(binaryReader); this.objectFakeLightprobes = ReadStructureBspFakeLightprobesBlockArray(binaryReader); this.decorators0 = ReadDecoratorPlacementDefinitionBlockArray(binaryReader); }
void IDefinition.FromArray(byte[] buffer) { BinaryReader bin = new BinaryReader(new MemoryStream(buffer)); X = bin.ReadRange(); Y = bin.ReadRange(); Z = bin.ReadRange(); U = bin.ReadRange(); V = bin.ReadRange(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.CameraMarkerName = binaryReader.ReadStringID(); this.CameraSubmergedMarkerName = binaryReader.ReadStringID(); this.PitchAutolevel = binaryReader.ReadSingle(); this.PitchRange = binaryReader.ReadRange(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(8)); return(pointerQueue); }
internal StructureBspAudibilityBlockBase(BinaryReader binaryReader) { this.doorPortalCount = binaryReader.ReadInt32(); this.clusterDistanceBounds = binaryReader.ReadRange(); this.encodedDoorPas = ReadDoorEncodedPasBlockArray(binaryReader); this.clusterDoorPortalEncodedPas = ReadClusterDoorPortalEncodedPasBlockArray(binaryReader); this.aiDeafeningPas = ReadAiDeafeningEncodedPasBlockArray(binaryReader); this.clusterDistances = ReadEncodedClusterDistancesBlockArray(binaryReader); this.machineDoorMapping = ReadOccluderToMachineDoorMappingArray(binaryReader); }
internal GlobalGeometryCompressionInfoBlockBase(BinaryReader binaryReader) { this.positionBoundsX = binaryReader.ReadRange(); this.positionBoundsY = binaryReader.ReadRange(); this.positionBoundsZ = binaryReader.ReadRange(); this.texcoordBoundsX = binaryReader.ReadRange(); this.texcoordBoundsY = binaryReader.ReadRange(); this.secondaryTexcoordBoundsX = binaryReader.ReadRange(); this.secondaryTexcoordBoundsY = binaryReader.ReadRange(); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.VolumeType = ((VolumeTypeEnum)(binaryReader.ReadInt32())); this.Height = binaryReader.ReadSingle(); this.OverrideDistanceBounds = binaryReader.ReadRange(); this.OverrideConeAngleBounds = binaryReader.ReadRange(); this.OverrideOuterConeGain = binaryReader.ReadSingle(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.Color = binaryReader.ReadColorR8G8B8(); this.fieldpad = binaryReader.ReadBytes(12); this.Density = binaryReader.ReadVector2(); this.Distance = binaryReader.ReadRange(); this.fieldpad0 = binaryReader.ReadBytes(32); this.PatchyFog = binaryReader.ReadTagReference(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.Velocity = binaryReader.ReadRange(); this.VariationArea = binaryReader.ReadVector2(); this.LocalVariationWeight = binaryReader.ReadSingle(); this.LocalVariationRate = binaryReader.ReadSingle(); this.Damping = binaryReader.ReadSingle(); this.fieldpad = binaryReader.ReadBytes(36); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.CharacterPresearchPresearchFlags = ((PresearchFlags)(binaryReader.ReadInt32())); this.MinPresearchTime = binaryReader.ReadRange(); this.MaxPresearchTime = binaryReader.ReadRange(); this.MinCertaintyRadius = binaryReader.ReadSingle(); this.DEPRECATED = binaryReader.ReadSingle(); this.MinSuppressingTime = binaryReader.ReadRange(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.Radius = binaryReader.ReadRange(); this.CutoffScale = binaryReader.ReadSingle(); this.DamageEffectFlags = ((Flags)(binaryReader.ReadInt32())); this.SideEffect = ((SideEffectEnum)(binaryReader.ReadInt16())); this.Category = ((CategoryEnum)(binaryReader.ReadInt16())); this.DamageEffectDamageEffectFlags0 = ((DamageEffectFlags0)(binaryReader.ReadInt32())); this.AOECoreRadius = binaryReader.ReadSingle(); this.DamageLowerBound = binaryReader.ReadSingle(); this.DamageUpperBound = binaryReader.ReadRange(); this.DmgInnerConeAngle = binaryReader.ReadSingle(); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.Blah.ReadFields(binaryReader))); this.ActiveCamouflageDamage = binaryReader.ReadSingle(); this.Stun = binaryReader.ReadSingle(); this.MaximumStun = binaryReader.ReadSingle(); this.StunTime = binaryReader.ReadSingle(); this.InstantaneousAcceleration = binaryReader.ReadSingle(); this.RiderDirectDamageScale = binaryReader.ReadSingle(); this.RiderMaximumTransferDamageScale = binaryReader.ReadSingle(); this.RiderMinimumTransferDamageScale = binaryReader.ReadSingle(); this.GeneralDamage = binaryReader.ReadStringID(); this.SpecificDamage = binaryReader.ReadStringID(); this.AIStunRadius = binaryReader.ReadSingle(); this.AIStunBounds = binaryReader.ReadRange(); this.ShakeRadius = binaryReader.ReadSingle(); this.EMPRadius = binaryReader.ReadSingle(); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(76)); this.Duration = binaryReader.ReadSingle(); this.FadeFunction = ((FadeFunctionEnum)(binaryReader.ReadInt16())); this.fieldpad = binaryReader.ReadBytes(2); this.Rotation = binaryReader.ReadSingle(); this.Pushback = binaryReader.ReadSingle(); this.Jitter = binaryReader.ReadRange(); this.Duration0 = binaryReader.ReadSingle(); this.FalloffFunction = ((FalloffFunctionEnum)(binaryReader.ReadInt16())); this.fieldpad0 = binaryReader.ReadBytes(2); this.RandomTranslation = binaryReader.ReadSingle(); this.RandomRotation = binaryReader.ReadSingle(); this.WobbleFunction = ((WobbleFunctionEnum)(binaryReader.ReadInt16())); this.fieldpad1 = binaryReader.ReadBytes(2); this.WobbleFunctionPeriod = binaryReader.ReadSingle(); this.WobbleWeight = binaryReader.ReadSingle(); this.Sound = binaryReader.ReadTagReference(); this.ForwardVelocity = binaryReader.ReadSingle(); this.ForwardRadius = binaryReader.ReadSingle(); this.ForwardExponent = binaryReader.ReadSingle(); this.OutwardVelocity = binaryReader.ReadSingle(); this.OutwardRadius = binaryReader.ReadSingle(); this.OutwardExponent = binaryReader.ReadSingle(); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.WeaponBarrelsFlags = ((Flags)(binaryReader.ReadInt32())); this.RoundsPerSecond = binaryReader.ReadRange(); this.AccelerationTime = binaryReader.ReadSingle(); this.DecelerationTime = binaryReader.ReadSingle(); this.BarrelSpinScale = binaryReader.ReadSingle(); this.BlurredRateOfFire = binaryReader.ReadSingle(); this.ShotsPerFire = binaryReader.ReadInt32(); this.FireRecoveryTime = binaryReader.ReadSingle(); this.SoftRecoveryFraction = binaryReader.ReadSingle(); this.Magazine = binaryReader.ReadShortBlockIndex1(); this.RoundsPerShot = binaryReader.ReadInt16(); this.MinimumRoundsLoaded = binaryReader.ReadInt16(); this.RoundsBetweenTracers = binaryReader.ReadInt16(); this.OptionalBarrelMarkerName = binaryReader.ReadStringID(); this.PredictionType = ((PredictionTypeEnum)(binaryReader.ReadInt16())); this.FiringNoise = ((FiringNoiseEnum)(binaryReader.ReadInt16())); this.AccelerationTime0 = binaryReader.ReadSingle(); this.DecelerationTime0 = binaryReader.ReadSingle(); this.DamageError = binaryReader.ReadRange(); this.AccelerationTime1 = binaryReader.ReadSingle(); this.DecelerationTime1 = binaryReader.ReadSingle(); this.fieldpad = binaryReader.ReadBytes(8); this.MinimumError = binaryReader.ReadSingle(); this.ErrorAngle = binaryReader.ReadRange(); this.DualWieldDamageScale = binaryReader.ReadSingle(); this.DistributionFunction = ((DistributionFunctionEnum)(binaryReader.ReadInt16())); this.ProjectilesPerShot = binaryReader.ReadInt16(); this.DistributionAngle = binaryReader.ReadSingle(); this.MinimumError0 = binaryReader.ReadSingle(); this.ErrorAngle0 = binaryReader.ReadRange(); this.FirstPersonOffset = binaryReader.ReadVector3(); this.DamageEffectReportingType = ((DamageEffectReportingTypeEnum)(binaryReader.ReadByte())); this.fieldpad0 = binaryReader.ReadBytes(3); this.Projectile = binaryReader.ReadTagReference(); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.Eh.ReadFields(binaryReader))); this.EjectionPortRecoveryTime = binaryReader.ReadSingle(); this.IlluminationRecoveryTime = binaryReader.ReadSingle(); this.HeatGeneratedPerRound = binaryReader.ReadSingle(); this.AgeGeneratedPerRound = binaryReader.ReadSingle(); this.OverloadTime = binaryReader.ReadSingle(); this.AngleChangePerShot = binaryReader.ReadRange(); this.AccelerationTime2 = binaryReader.ReadSingle(); this.DecelerationTime2 = binaryReader.ReadSingle(); this.AngleChangeFunction = ((AngleChangeFunctionEnum)(binaryReader.ReadInt16())); this.fieldpad1 = binaryReader.ReadBytes(2); this.fieldpad2 = binaryReader.ReadBytes(8); this.fieldpad3 = binaryReader.ReadBytes(24); pointerQueue.Enqueue(binaryReader.ReadBlamPointer(52)); return(pointerQueue); }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.PositionBoundsX = binaryReader.ReadRange(); this.PositionBoundsY = binaryReader.ReadRange(); this.PositionBoundsZ = binaryReader.ReadRange(); this.TexcoordBoundsX = binaryReader.ReadRange(); this.TexcoordBoundsY = binaryReader.ReadRange(); this.SecondaryTexcoordBoundsX = binaryReader.ReadRange(); this.SecondaryTexcoordBoundsY = binaryReader.ReadRange(); return(pointerQueue); }
public StructureBspClusterBlock(BinaryReader binaryReader) { this.sectionInfo = new GlobalGeometrySectionInfoStruct(binaryReader); this.geometryBlockInfo = new Moonfish.Tags.GlobalGeometryBlockInfoStruct(binaryReader); { var elementSize = Marshal.SizeOf(typeof(StructureBspClusterDataBlockNew)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.clusterData = new StructureBspClusterDataBlockNew[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.clusterData[i] = new StructureBspClusterDataBlockNew(binaryReader); } } } this.boundsX = binaryReader.ReadRange(); this.boundsY = binaryReader.ReadRange(); this.boundsZ = binaryReader.ReadRange(); this.scenarioSkyIndex = binaryReader.ReadByte(); this.mediaIndex = binaryReader.ReadByte(); this.scenarioVisibleSkyIndex = binaryReader.ReadByte(); this.scenarioAtmosphericFogIndex = binaryReader.ReadByte(); this.planarFogDesignator = binaryReader.ReadByte(); this.visibleFogPlaneIndex = binaryReader.ReadByte(); this.backgroundSound = binaryReader.ReadShortBlockIndex1(); this.soundEnvironment = binaryReader.ReadShortBlockIndex1(); this.weather = binaryReader.ReadShortBlockIndex1(); this.transitionStructureBSP = binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(2); this.padding0 = binaryReader.ReadBytes(4); this.flags = (Flags)binaryReader.ReadInt16(); this.padding1 = binaryReader.ReadBytes(2); { var elementSize = Marshal.SizeOf(typeof(PredictedResourceBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.predictedResources = new PredictedResourceBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.predictedResources[i] = new PredictedResourceBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspClusterPortalIndexBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.portals = new StructureBspClusterPortalIndexBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.portals[i] = new StructureBspClusterPortalIndexBlock(binaryReader); } } } this.checksumFromStructure = binaryReader.ReadInt32(); { var elementSize = Marshal.SizeOf(typeof(StructureBspClusterInstancedGeometryIndexBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.instancedGeometryIndices = new StructureBspClusterInstancedGeometryIndexBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.instancedGeometryIndices[i] = new StructureBspClusterInstancedGeometryIndexBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(GlobalGeometrySectionStripIndexBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.indexReorderTable = new GlobalGeometrySectionStripIndexBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.indexReorderTable[i] = new GlobalGeometrySectionStripIndexBlock(binaryReader); } } } this.paddingcollisionMoppCode = binaryReader.ReadBytes(8); }
public StructureBspAudibilityBlock(BinaryReader binaryReader) { this.doorPortalCount = binaryReader.ReadInt32(); this.clusterDistanceBounds = binaryReader.ReadRange(); { var elementSize = Marshal.SizeOf(typeof(DoorEncodedPasBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.encodedDoorPas = new DoorEncodedPasBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.encodedDoorPas[i] = new DoorEncodedPasBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ClusterDoorPortalEncodedPasBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.clusterDoorPortalEncodedPas = new ClusterDoorPortalEncodedPasBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.clusterDoorPortalEncodedPas[i] = new ClusterDoorPortalEncodedPasBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(AiDeafeningEncodedPasBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.aiDeafeningPas = new AiDeafeningEncodedPasBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.aiDeafeningPas[i] = new AiDeafeningEncodedPasBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(EncodedClusterDistancesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.clusterDistances = new EncodedClusterDistancesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.clusterDistances[i] = new EncodedClusterDistancesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(OccluderToMachineDoorMapping)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.machineDoorMapping = new OccluderToMachineDoorMapping[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.machineDoorMapping[i] = new OccluderToMachineDoorMapping(binaryReader); } } } }
/// <summary> /// Maps values outside of the range back into the range using the magnitude of the /// value from the closest range-boundary (min or max) /// [min₁..max₁][min₂..max₂] .. [minₓ..maxₓ] /// </summary> /// <param name="range"></param> /// <param name="value"></param> /// <returns></returns> public static float Wrap(Range range, float value) { var wrapped_value = value < range.min ? range.max + (value - range.min) % (range.max - range.min): value > range.max ? range.min + (value - range.min) % (range.max - range.min) : value; return wrapped_value; }
public static float Median(Range range) { return (range.min + range.max) * 0.5f; }
/// <summary> /// Truncates the passed value to the closest value in range if value is outside of the range (range.min or range.max) /// Else returns the value unchanged. /// </summary> /// <param name="range">The range of values to check against</param> /// <param name="value">The value to truncate</param> /// <returns>The truncated value</returns> public static float Truncate(Range range, float value) { if (value < range.min) return range.min; if (value > range.max) return range.max; return value; }
public ErrorReportsBlock(BinaryReader binaryReader) { this.type = (Type)binaryReader.ReadInt16(); this.flags = (Flags)binaryReader.ReadInt16(); this.paddingtext = binaryReader.ReadBytes(8); this.sourceFilename = binaryReader.ReadString32(); this.sourceLineNumber = binaryReader.ReadInt32(); this.vertices = ReadVertices(binaryReader); this.vectors = ReadVectors(binaryReader); this.lines = ReadLines(binaryReader); this.triangles = ReadTriangles(binaryReader); this.quads = ReadQuads(binaryReader); this.comments = ReadComments(binaryReader); this.padding = binaryReader.ReadBytes(380); this.reportKey = binaryReader.ReadInt32(); this.nodeIndex = binaryReader.ReadInt32(); this.boundsX = binaryReader.ReadRange(); this.boundsY = binaryReader.ReadRange(); this.boundsZ = binaryReader.ReadRange(); this.color = binaryReader.ReadVector4(); this.padding0 = binaryReader.ReadBytes(84); }
public GlobalGeometryCompressionInfoBlock(BinaryReader binaryReader) { this.positionBoundsX = binaryReader.ReadRange(); this.positionBoundsY = binaryReader.ReadRange(); this.positionBoundsZ = binaryReader.ReadRange(); this.texcoordBoundsX = binaryReader.ReadRange(); this.texcoordBoundsY = binaryReader.ReadRange(); this.secondaryTexcoordBoundsX = binaryReader.ReadRange(); this.secondaryTexcoordBoundsY = binaryReader.ReadRange(); }
public FlockDefinitionBlock(BinaryReader binaryReader) { this.bsp = binaryReader.ReadShortBlockIndex1(); this.padding = binaryReader.ReadBytes(2); this.boundingVolume = binaryReader.ReadShortBlockIndex1(); this.flags = (Flags)binaryReader.ReadInt16(); this.ecologyMarginWusDistanceFromEcologyBoundaryThatCreatureBeginsToBeRepulsed = binaryReader.ReadSingle(); { var count = binaryReader.ReadInt32(); var address = binaryReader.ReadInt32(); var elementSize = Marshal.SizeOf(typeof(FlockSourceBlock)); this.sources = new FlockSourceBlock[count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < count; ++i) { binaryReader.BaseStream.Position = address + i * elementSize; this.sources[i] = new FlockSourceBlock(binaryReader); } } } { var count = binaryReader.ReadInt32(); var address = binaryReader.ReadInt32(); var elementSize = Marshal.SizeOf(typeof(FlockSinkBlock)); this.sinks = new FlockSinkBlock[count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < count; ++i) { binaryReader.BaseStream.Position = address + i * elementSize; this.sinks[i] = new FlockSinkBlock(binaryReader); } } } this.productionFrequencyBoidsSecHowFrequentlyBoidsAreProducedAtOneOfTheSourcesLimitedByTheMaxBoidCount = binaryReader.ReadSingle(); this.scale = binaryReader.ReadRange(); this.creature = binaryReader.ReadTagReference(); this.boidCount = binaryReader.ReadInt32(); this.neighborhoodRadiusWorldUnitsDistanceWithinWhichOneBoidIsAffectedByAnother = binaryReader.ReadSingle(); this.avoidanceRadiusWorldUnitsDistanceThatABoidTriesToMaintainFromAnother = binaryReader.ReadSingle(); this.forwardScale01WeightGivenToBoidsDesireToFlyStraightAhead = binaryReader.ReadSingle(); this.alignmentScale01WeightGivenToBoidsDesireToAlignItselfWithNeighboringBoids = binaryReader.ReadSingle(); this.avoidanceScale01WeightGivenToBoidsDesireToAvoidCollisionsWithOtherBoidsWhenWithinTheAvoidanceRadius = binaryReader.ReadSingle(); this.levelingForceScale01WeightGivenToBoidsDesireToFlyLevel = binaryReader.ReadSingle(); this.sinkScale01WeightGivenToBoidsDesireToFlyTowardsItsSinks = binaryReader.ReadSingle(); this.perceptionAngleDegreesAngleFromForwardWithinWhichOneBoidCanPerceiveAndReactToAnother = binaryReader.ReadSingle(); this.averageThrottle01ThrottleAtWhichBoidsWillNaturallyFly = binaryReader.ReadSingle(); this.maximumThrottle01MaximumThrottleApplicable = binaryReader.ReadSingle(); this.positionScale01WeightGivenToBoidsDesireToBeNearFlockCenter = binaryReader.ReadSingle(); this.positionMinRadiusWusDistanceToFlockCenterBeyondWhichAnAttractingForceIsApplied = binaryReader.ReadSingle(); this.positionMaxRadiusWusDistanceToFlockCenterAtWhichTheMaximumAttractingForceIsApplied = binaryReader.ReadSingle(); this.movementWeightThresholdTheThresholdOfAccumulatedWeightOverWhichMovementOccurs = binaryReader.ReadSingle(); this.dangerRadiusWusDistanceWithinWhichBoidsWillAvoidADangerousObjectEGThePlayer = binaryReader.ReadSingle(); this.dangerScaleWeightGivenToBoidsDesireToAvoidDanger = binaryReader.ReadSingle(); this.randomOffsetScale01WeightGivenToBoidsRandomHeadingOffset = binaryReader.ReadSingle(); this.randomOffsetPeriodSeconds = binaryReader.ReadRange(); this.flockName = binaryReader.ReadStringID(); }
public ScenarioAtmosphericFogPalette(BinaryReader binaryReader) { this.name = binaryReader.ReadStringID(); this.color = binaryReader.ReadColorR8G8B8(); this.spreadDistanceWorldUnitsHowFarFogSpreadsIntoAdjacentClusters0DefaultsTo1 = binaryReader.ReadSingle(); this.padding = binaryReader.ReadBytes(4); this.maximumDensity01FogDensityClampsToThisValue = binaryReader.ReadSingle(); this.startDistanceWorldUnitsBeforeThisDistanceThereIsNoFog = binaryReader.ReadSingle(); this.opaqueDistanceWorldUnitsFogBecomesOpaqueMaximumDensityAtThisDistanceFromViewer = binaryReader.ReadSingle(); this.color0 = binaryReader.ReadColorR8G8B8(); this.padding0 = binaryReader.ReadBytes(4); this.maximumDensity01FogDensityClampsToThisValue0 = binaryReader.ReadSingle(); this.startDistanceWorldUnitsBeforeThisDistanceThereIsNoFog0 = binaryReader.ReadSingle(); this.opaqueDistanceWorldUnitsFogBecomesOpaqueMaximumDensityAtThisDistanceFromViewer0 = binaryReader.ReadSingle(); this.padding1 = binaryReader.ReadBytes(4); this.planarColor = binaryReader.ReadColorR8G8B8(); this.planarMaxDensity01 = binaryReader.ReadSingle(); this.planarOverrideAmount01 = binaryReader.ReadSingle(); this.planarMinDistanceBiasWorldUnitsDontAsk = binaryReader.ReadSingle(); this.padding2 = binaryReader.ReadBytes(44); this.patchyColor = binaryReader.ReadColorR8G8B8(); this.padding3 = binaryReader.ReadBytes(12); this.patchyDensity01 = binaryReader.ReadSingle(); this.patchyDistanceWorldUnits = binaryReader.ReadRange(); this.padding4 = binaryReader.ReadBytes(32); this.patchyFog = binaryReader.ReadTagReference(); { var count = binaryReader.ReadInt32(); var address = binaryReader.ReadInt32(); var elementSize = Marshal.SizeOf(typeof(ScenarioAtmosphericFogMixerBlock)); this.mixers = new ScenarioAtmosphericFogMixerBlock[count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < count; ++i) { binaryReader.BaseStream.Position = address + i * elementSize; this.mixers[i] = new ScenarioAtmosphericFogMixerBlock(binaryReader); } } } this.amount01 = binaryReader.ReadSingle(); this.threshold01 = binaryReader.ReadSingle(); this.brightness01 = binaryReader.ReadSingle(); this.gammaPower = binaryReader.ReadSingle(); this.cameraImmersionFlags = (CameraImmersionFlags)binaryReader.ReadInt16(); this.padding5 = binaryReader.ReadBytes(2); }
public ErrorReportsBlock(BinaryReader binaryReader) { this.type = (Type)binaryReader.ReadInt16(); this.flags = (Flags)binaryReader.ReadInt16(); this.paddingtext = binaryReader.ReadBytes(8); this.sourceFilename = binaryReader.ReadString32(); this.sourceLineNumber = binaryReader.ReadInt32(); { var elementSize = Marshal.SizeOf(typeof(ErrorReportVerticesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.vertices = new ErrorReportVerticesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.vertices[i] = new ErrorReportVerticesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ErrorReportVectorsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.vectors = new ErrorReportVectorsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.vectors[i] = new ErrorReportVectorsBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ErrorReportLinesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.lines = new ErrorReportLinesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.lines[i] = new ErrorReportLinesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ErrorReportTrianglesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.triangles = new ErrorReportTrianglesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.triangles[i] = new ErrorReportTrianglesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ErrorReportQuadsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.quads = new ErrorReportQuadsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.quads[i] = new ErrorReportQuadsBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(ErrorReportCommentsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.comments = new ErrorReportCommentsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.comments[i] = new ErrorReportCommentsBlock(binaryReader); } } } this.padding = binaryReader.ReadBytes(380); this.reportKey = binaryReader.ReadInt32(); this.nodeIndex = binaryReader.ReadInt32(); this.boundsX = binaryReader.ReadRange(); this.boundsY = binaryReader.ReadRange(); this.boundsZ = binaryReader.ReadRange(); this.color = binaryReader.ReadVector4(); this.padding0 = binaryReader.ReadBytes(84); }
public ScenarioStructureBSP(BinaryReader binaryReader) { { var elementSize = Marshal.SizeOf(typeof(GlobalTagImportInfoBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.importInfo = new GlobalTagImportInfoBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.importInfo[i] = new GlobalTagImportInfoBlock(binaryReader); } } } this.padding = binaryReader.ReadBytes(4); { var elementSize = Marshal.SizeOf(typeof(StructureCollisionMaterialsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.collisionMaterials = new StructureCollisionMaterialsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.collisionMaterials[i] = new StructureCollisionMaterialsBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(GlobalCollisionBspBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.collisionBSP = new GlobalCollisionBspBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.collisionBSP[i] = new GlobalCollisionBspBlock(binaryReader); } } } this.vehicleFloorWorldUnitsHeightBelowWhichVehiclesGetPushedUpByAnUnstoppableForce = binaryReader.ReadSingle(); this.vehicleCeilingWorldUnitsHeightAboveWhichVehiclesGetPushedDownByAnUnstoppableForce = binaryReader.ReadSingle(); { var elementSize = Marshal.SizeOf(typeof(UNUSEDStructureBspNodeBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.uNUSEDNodes = new UNUSEDStructureBspNodeBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.uNUSEDNodes[i] = new UNUSEDStructureBspNodeBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspLeafBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.leaves = new StructureBspLeafBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.leaves[i] = new StructureBspLeafBlock(binaryReader); } } } this.worldBoundsX = binaryReader.ReadRange(); this.worldBoundsY = binaryReader.ReadRange(); this.worldBoundsZ = binaryReader.ReadRange(); { var elementSize = Marshal.SizeOf(typeof(StructureBspSurfaceReferenceBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.surfaceReferences = new StructureBspSurfaceReferenceBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.surfaceReferences[i] = new StructureBspSurfaceReferenceBlock(binaryReader); } } } this.paddingclusterData = binaryReader.ReadBytes(8); { var elementSize = Marshal.SizeOf(typeof(StructureBspClusterPortalBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.clusterPortals = new StructureBspClusterPortalBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.clusterPortals[i] = new StructureBspClusterPortalBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspFogPlaneBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.fogPlanes = new StructureBspFogPlaneBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.fogPlanes[i] = new StructureBspFogPlaneBlock(binaryReader); } } } this.padding0 = binaryReader.ReadBytes(24); { var elementSize = Marshal.SizeOf(typeof(StructureBspWeatherPaletteBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.weatherPalette = new StructureBspWeatherPaletteBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.weatherPalette[i] = new StructureBspWeatherPaletteBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspWeatherPolyhedronBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.weatherPolyhedra = new StructureBspWeatherPolyhedronBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.weatherPolyhedra[i] = new StructureBspWeatherPolyhedronBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspDetailObjectDataBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.detailObjects = new StructureBspDetailObjectDataBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.detailObjects[i] = new StructureBspDetailObjectDataBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspClusterBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.clusters = new StructureBspClusterBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.clusters[i] = new StructureBspClusterBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(GlobalGeometryMaterialBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.materials = new GlobalGeometryMaterialBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.materials[i] = new GlobalGeometryMaterialBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspSkyOwnerClusterBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.skyOwnerCluster = new StructureBspSkyOwnerClusterBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.skyOwnerCluster[i] = new StructureBspSkyOwnerClusterBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspConveyorSurfaceBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.conveyorSurfaces = new StructureBspConveyorSurfaceBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.conveyorSurfaces[i] = new StructureBspConveyorSurfaceBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspBreakableSurfaceBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.breakableSurfaces = new StructureBspBreakableSurfaceBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.breakableSurfaces[i] = new StructureBspBreakableSurfaceBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(PathfindingDataBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.pathfindingData = new PathfindingDataBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.pathfindingData[i] = new PathfindingDataBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspPathfindingEdgesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.pathfindingEdges = new StructureBspPathfindingEdgesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.pathfindingEdges[i] = new StructureBspPathfindingEdgesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspBackgroundSoundPaletteBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.backgroundSoundPalette = new StructureBspBackgroundSoundPaletteBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.backgroundSoundPalette[i] = new StructureBspBackgroundSoundPaletteBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspSoundEnvironmentPaletteBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.soundEnvironmentPalette = new StructureBspSoundEnvironmentPaletteBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.soundEnvironmentPalette[i] = new StructureBspSoundEnvironmentPaletteBlock(binaryReader); } } } this.paddingsoundPASData = binaryReader.ReadBytes(8); { var elementSize = Marshal.SizeOf(typeof(StructureBspMarkerBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.markers = new StructureBspMarkerBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.markers[i] = new StructureBspMarkerBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspRuntimeDecalBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.runtimeDecals = new StructureBspRuntimeDecalBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.runtimeDecals[i] = new StructureBspRuntimeDecalBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspEnvironmentObjectPaletteBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.environmentObjectPalette = new StructureBspEnvironmentObjectPaletteBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.environmentObjectPalette[i] = new StructureBspEnvironmentObjectPaletteBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspEnvironmentObjectBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.environmentObjects = new StructureBspEnvironmentObjectBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.environmentObjects[i] = new StructureBspEnvironmentObjectBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspLightmapDataBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.lightmaps = new StructureBspLightmapDataBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.lightmaps[i] = new StructureBspLightmapDataBlock(binaryReader); } } } this.padding1 = binaryReader.ReadBytes(4); { var elementSize = Marshal.SizeOf(typeof(GlobalMapLeafBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.leafMapLeaves = new GlobalMapLeafBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.leafMapLeaves[i] = new GlobalMapLeafBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(GlobalLeafConnectionBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.leafMapConnections = new GlobalLeafConnectionBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.leafMapConnections[i] = new GlobalLeafConnectionBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(GlobalErrorReportCategoriesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.errors = new GlobalErrorReportCategoriesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.errors[i] = new GlobalErrorReportCategoriesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspPrecomputedLightingBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.precomputedLighting = new StructureBspPrecomputedLightingBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.precomputedLighting[i] = new StructureBspPrecomputedLightingBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspInstancedGeometryDefinitionBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.instancedGeometriesDefinitions = new StructureBspInstancedGeometryDefinitionBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.instancedGeometriesDefinitions[i] = new StructureBspInstancedGeometryDefinitionBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspInstancedGeometryInstancesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.instancedGeometryInstances = new StructureBspInstancedGeometryInstancesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.instancedGeometryInstances[i] = new StructureBspInstancedGeometryInstancesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspSoundClusterBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.ambienceSoundClusters = new StructureBspSoundClusterBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.ambienceSoundClusters[i] = new StructureBspSoundClusterBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspSoundClusterBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.reverbSoundClusters = new StructureBspSoundClusterBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.reverbSoundClusters[i] = new StructureBspSoundClusterBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(TransparentPlanesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.transparentPlanes = new TransparentPlanesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.transparentPlanes[i] = new TransparentPlanesBlock(binaryReader); } } } this.padding2 = binaryReader.ReadBytes(96); this.vehicleSpericalLimitRadiusDistancesThisFarAndLongerFromLimitOriginWillPullYouBackIn = binaryReader.ReadSingle(); this.vehicleSpericalLimitCenterCenterOfSpaceInWhichVehicleCanMove = binaryReader.ReadVector3(); { var elementSize = Marshal.SizeOf(typeof(StructureBspDebugInfoBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.debugInfo = new StructureBspDebugInfoBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.debugInfo[i] = new StructureBspDebugInfoBlock(binaryReader); } } } this.decorators = binaryReader.ReadTagReference(); this.structurePhysics = new GlobalStructurePhysicsStruct(binaryReader); { var elementSize = Marshal.SizeOf(typeof(GlobalWaterDefinitionsBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.waterDefinitions = new GlobalWaterDefinitionsBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.waterDefinitions[i] = new GlobalWaterDefinitionsBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructurePortalDeviceMappingBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.portalDeviceMapping = new StructurePortalDeviceMappingBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.portalDeviceMapping[i] = new StructurePortalDeviceMappingBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspAudibilityBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.audibility = new StructureBspAudibilityBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.audibility[i] = new StructureBspAudibilityBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(StructureBspFakeLightprobesBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.objectFakeLightprobes = new StructureBspFakeLightprobesBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.objectFakeLightprobes[i] = new StructureBspFakeLightprobesBlock(binaryReader); } } } { var elementSize = Marshal.SizeOf(typeof(DecoratorPlacementDefinitionBlock)); var blamPointer = binaryReader.ReadBlamPointer(elementSize); this.decorators0 = new DecoratorPlacementDefinitionBlock[blamPointer.Count]; using (binaryReader.BaseStream.Pin()) { for (int i = 0; i < blamPointer.Count; ++i) { binaryReader.BaseStream.Position = blamPointer[i]; this.decorators0[i] = new DecoratorPlacementDefinitionBlock(binaryReader); } } } }
public SoundSceneryDatumStruct(BinaryReader binaryReader) { this.volumeType = (VolumeType)binaryReader.ReadInt32(); this.height = binaryReader.ReadSingle(); this.overrideDistanceBounds = binaryReader.ReadRange(); this.overrideConeAngleBounds = binaryReader.ReadRange(); this.overrideOuterConeGainDb = binaryReader.ReadSingle(); }