public RenderModel(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.flags = (Flags)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.padding0 = binaryReader.ReadBytes(4);
     this.importInfo = ReadImportinfo(binaryReader);
     this.compressionInfo = ReadCompressioninfo(binaryReader);
     this.regions = ReadRegions(binaryReader);
     this.sections = ReadSections(binaryReader);
     this.invalidSectionPairBits = ReadInvalidsectionpairbits(binaryReader);
     this.sectionGroups = ReadSectiongroups(binaryReader);
     this.l1SectionGroupIndexSuperLow = binaryReader.ReadByte();
     this.l2SectionGroupIndexLow = binaryReader.ReadByte();
     this.l3SectionGroupIndexMedium = binaryReader.ReadByte();
     this.l4SectionGroupIndexHigh = binaryReader.ReadByte();
     this.l5SectionGroupIndexSuperHigh = binaryReader.ReadByte();
     this.l6SectionGroupIndexHollywood = binaryReader.ReadByte();
     this.padding1 = binaryReader.ReadBytes(2);
     this.nodeListChecksum = binaryReader.ReadInt32();
     this.nodes = ReadNodes(binaryReader);
     this.nodeMapOLD = ReadNodemapold(binaryReader);
     this.markerGroups = ReadMarkergroups(binaryReader);
     this.materials = ReadMaterials(binaryReader);
     this.errors = ReadErrors(binaryReader);
     this.dontDrawOverCameraCosineAngleDontDrawFpModelWhenCameraThisAngleCosine11Sugg020Disables = binaryReader.ReadSingle();
     this.pRTInfo = ReadPrtinfo(binaryReader);
     this.sectionRenderLeaves = ReadSectionrenderleaves(binaryReader);
 }
 public GlobalDamageSectionBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.flags = (Flags)binaryReader.ReadInt32();
     this.vitalityPercentage01PercentageOfTotalObjectVitality = binaryReader.ReadSingle();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(InstantaneousDamageRepsonseBlock));
         this.instantResponses = new InstantaneousDamageRepsonseBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.instantResponses[i] = new InstantaneousDamageRepsonseBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(GNullBlock));
         this.gNullBlock = new GNullBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.gNullBlock[i] = new GNullBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(GNullBlock));
         this.gNullBlock0 = new GNullBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.gNullBlock0[i] = new GNullBlock(binaryReader);
             }
         }
     }
     this.stunTimeSeconds = binaryReader.ReadSingle();
     this.rechargeTimeSeconds = binaryReader.ReadSingle();
     this.padding = binaryReader.ReadBytes(4);
     this.resurrectionRestoredRegionName = binaryReader.ReadStringID();
     this.padding0 = binaryReader.ReadBytes(4);
 }
 void IDefinition.FromArray(byte[] buffer)
 {
     BinaryReader bin = new BinaryReader(new MemoryStream(buffer));
     Name = bin.ReadStringID();
     Parent_NodeIndex = bin.ReadInt16();
     FirstChild_NodeIndex = bin.ReadInt16();
     NextSibling_NodeIndex = bin.ReadInt16();
     bin.BaseStream.Seek(sizeof(short), SeekOrigin.Current);
     Position = bin.ReadVector3();
     Rotation = bin.ReadQuaternion();
     Scale = bin.ReadSingle();
     Right = bin.ReadVector3();
     Forward = bin.ReadVector3();
     Up = bin.ReadVector3();
     AbsolutePosition = bin.ReadVector3();
 }
 public ScenarioInterpolatorBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.acceleratorNameInterpolator = binaryReader.ReadStringID();
     this.multiplierNameInterpolator = binaryReader.ReadStringID();
     this.function = new ScalarFunctionStruct(binaryReader);
     this.skip = binaryReader.ReadBytes(2);
     this.skip0 = binaryReader.ReadBytes(2);
 }
 public ScenarioPlanarFogPalette(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.planarFog = binaryReader.ReadTagReference();
     this.padding = binaryReader.ReadBytes(2);
     this.padding0 = binaryReader.ReadBytes(2);
 }
 public ScenarioAtmosphericFogMixerBlock(BinaryReader binaryReader)
 {
     this.padding = binaryReader.ReadBytes(4);
     this.atmosphericFogSourceFromScenarioAtmosphericFogPalette = binaryReader.ReadStringID();
     this.interpolatorFromScenarioInterpolators = binaryReader.ReadStringID();
     this.skip0 = binaryReader.ReadBytes(2);
     this.skip1 = binaryReader.ReadBytes(2);
 }
 public ScenarioCutsceneTitleBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.textBoundsOnScreen = binaryReader.ReadVector2();
     this.justification = (Justification)binaryReader.ReadInt16();
     this.font = (Font)binaryReader.ReadInt16();
     this.textColor = binaryReader.ReadRGBColor();
     this.shadowColor = binaryReader.ReadRGBColor();
     this.fadeInTimeSeconds = binaryReader.ReadSingle();
     this.upTimeSeconds = binaryReader.ReadSingle();
     this.fadeOutTimeSeconds = binaryReader.ReadSingle();
     this.paddingpadding = binaryReader.ReadBytes(2);
 }
 public AiSceneRoleBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.group = (Group)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(AiSceneRoleVariantsBlock));
         this.roleVariants = new AiSceneRoleVariantsBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.roleVariants[i] = new AiSceneRoleVariantsBlock(binaryReader);
             }
         }
     }
 }
 public RenderModelMarkerGroupBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.markers = ReadMarkers(binaryReader);
 }
        public HierarchyModel(BinaryReader binaryReader)
        {
            this.renderModel = binaryReader.ReadTagReference();
            this.collisionModel = binaryReader.ReadTagReference();
            this.animation = binaryReader.ReadTagReference();
            this.physics = binaryReader.ReadTagReference();
            this.physicsModel = binaryReader.ReadTagReference();
            this.disappearDistanceWorldUnits = binaryReader.ReadSingle();
            this.beginFadeDistanceWorldUnits = binaryReader.ReadSingle();
            this.padding = binaryReader.ReadBytes(4);
            this.reduceToL1WorldUnitsSuperLow = binaryReader.ReadSingle();
            this.reduceToL2WorldUnitsLow = binaryReader.ReadSingle();
            this.reduceToL3WorldUnitsMedium = binaryReader.ReadSingle();
            this.reduceToL4WorldUnitsHigh = binaryReader.ReadSingle();
            this.reduceToL5WorldUnitsSuperHigh = binaryReader.ReadSingle();
            this.skip0 = binaryReader.ReadBytes(4);
            this.shadowFadeDistance = (ShadowFadeDistance)binaryReader.ReadInt16();
            this.padding1 = binaryReader.ReadBytes(2);
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelVariantBlock));
                this.variants = new ModelVariantBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.variants[i] = new ModelVariantBlock(binaryReader);
                    }
                }
            }
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelMaterialBlock));
                this.materials = new ModelMaterialBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.materials[i] = new ModelMaterialBlock(binaryReader);
                    }
                }
            }
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(GlobalDamageInfoBlock));
                this.newDamageInfo = new GlobalDamageInfoBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.newDamageInfo[i] = new GlobalDamageInfoBlock(binaryReader);
                    }
                }
            }
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelTargetBlock));
                this.targets = new ModelTargetBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.targets[i] = new ModelTargetBlock(binaryReader);
                    }
                }
            }
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelRegionBlock));
                this.modelRegionBlock = new ModelRegionBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.modelRegionBlock[i] = new ModelRegionBlock(binaryReader);
                    }
                }
            }
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelNodeBlock));
                this.modelNodeBlock = new ModelNodeBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.modelNodeBlock[i] = new ModelNodeBlock(binaryReader);
                    }
                }
            }
            this.padding2 = binaryReader.ReadBytes(4);
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(ModelObjectDataBlock));
                this.modelObjectData = new ModelObjectDataBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.modelObjectData[i] = new ModelObjectDataBlock(binaryReader);
                    }
                }
            }
            this.defaultDialogueTheDefaultDialogueTagForThisModelOverridenByVariants = binaryReader.ReadTagReference();
            this.uNUSED = binaryReader.ReadTagReference();
            this.flags = (Flags)binaryReader.ReadInt32();
            this.defaultDialogueEffectTheDefaultDialogueTagForThisModelOverridenByVariants = binaryReader.ReadStringID();
            this.renderOnlyNodeFlags = new RenderOnlyNodeFlags[32];
            for (int i = 0; i < 32; ++i)
            {
                this.renderOnlyNodeFlags[i] = new RenderOnlyNodeFlags(binaryReader);
            }
            this.renderOnlySectionFlags = new RenderOnlySectionFlags[32];
            for (int i = 0; i < 32; ++i)
            {
                this.renderOnlySectionFlags[i] = new RenderOnlySectionFlags(binaryReader);
            }
            this.runtimeFlags = (RuntimeFlags)binaryReader.ReadInt32();
            {
                var count = binaryReader.ReadInt32();
                var address = binaryReader.ReadInt32();
                var elementSize = Marshal.SizeOf(typeof(GlobalScenarioLoadParametersBlock));
                this.scenarioLoadParameters = new GlobalScenarioLoadParametersBlock[count];
                using (binaryReader.BaseStream.Pin())
                {
                    for (int i = 0; i < count; ++i)
                    {
                        binaryReader.BaseStream.Position = address + i * elementSize;
                        this.scenarioLoadParameters[i] = new GlobalScenarioLoadParametersBlock(binaryReader);
                    }
                }
            }
            this.hologramShader = binaryReader.ReadTagReference();
            this.hologramControlFunction = binaryReader.ReadStringID();

            Initialize();
        }
 public RenderModelNodeBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.parentNode = binaryReader.ReadShortBlockIndex1();
     this.firstChildNode = binaryReader.ReadShortBlockIndex1();
     this.nextSiblingNode = binaryReader.ReadShortBlockIndex1();
     this.importNodeIndex = binaryReader.ReadInt16();
     this.defaultTranslation = binaryReader.ReadVector3();
     this.defaultRotation = binaryReader.ReadQuaternion();
     this.inverseForward = binaryReader.ReadVector3();
     this.inverseLeft = binaryReader.ReadVector3();
     this.inverseUp = binaryReader.ReadVector3();
     this.inversePosition = binaryReader.ReadVector3();
     this.inverseScale = binaryReader.ReadSingle();
     this.distanceFromParent = binaryReader.ReadSingle();
 }
 public GlobalDamageInfoBlock(BinaryReader binaryReader)
 {
     this.flags = (Flags)binaryReader.ReadInt32();
     this.globalIndirectMaterialNameAbsorbesAOEOrChildDamage = binaryReader.ReadStringID();
     this.indirectDamageSectionAbsorbesAOEOrChildDamage = binaryReader.ReadShortBlockIndex2();
     this.padding = binaryReader.ReadBytes(2);
     this.padding0 = binaryReader.ReadBytes(4);
     this.collisionDamageReportingType = (CollisionDamageReportingType)binaryReader.ReadByte();
     this.responseDamageReportingType = (ResponseDamageReportingType)binaryReader.ReadByte();
     this.padding1 = binaryReader.ReadBytes(2);
     this.padding2 = binaryReader.ReadBytes(20);
     this.maximumVitality = binaryReader.ReadSingle();
     this.minimumStunDamageTheMinimumDamageRequiredToStunThisObjectsHealth = binaryReader.ReadSingle();
     this.stunTimeSecondsTheLengthOfTimeTheHealthStayStunnedDoNotRechargeAfterTakingDamage = binaryReader.ReadSingle();
     this.rechargeTimeSecondsTheLengthOfTimeItWouldTakeForTheShieldsToFullyRechargeAfterBeingCompletelyDepleted = binaryReader.ReadSingle();
     this.rechargeFraction0DefaultsTo1ToWhatMaximumLevelTheBodyHealthWillBeAllowedToRecharge = binaryReader.ReadSingle();
     this.padding3 = binaryReader.ReadBytes(64);
     this.shieldDamagedFirstPersonShader = binaryReader.ReadTagReference();
     this.shieldDamagedShader = binaryReader.ReadTagReference();
     this.maximumShieldVitalityTheDefaultInitialAndMaximumShieldVitalityOfThisObject = binaryReader.ReadSingle();
     this.globalShieldMaterialName = binaryReader.ReadStringID();
     this.minimumStunDamageTheMinimumDamageRequiredToStunThisObjectsShields = binaryReader.ReadSingle();
     this.stunTimeSecondsTheLengthOfTimeTheShieldsStayStunnedDoNotRechargeAfterTakingDamage = binaryReader.ReadSingle();
     this.rechargeTimeSecondsTheLengthOfTimeItWouldTakeForTheShieldsToFullyRechargeAfterBeingCompletelyDepleted0 = binaryReader.ReadSingle();
     this.shieldDamagedThreshold = binaryReader.ReadSingle();
     this.shieldDamagedEffect = binaryReader.ReadTagReference();
     this.shieldDepletedEffect = binaryReader.ReadTagReference();
     this.shieldRechargingEffect = binaryReader.ReadTagReference();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(GlobalDamageSectionBlock));
         this.damageSections = new GlobalDamageSectionBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.damageSections[i] = new GlobalDamageSectionBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(GlobalDamageNodesBlock));
         this.nodes = new GlobalDamageNodesBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.nodes[i] = new GlobalDamageNodesBlock(binaryReader);
             }
         }
     }
     this.padding4 = binaryReader.ReadBytes(2);
     this.padding5 = binaryReader.ReadBytes(2);
     this.padding6 = binaryReader.ReadBytes(4);
     this.padding7 = binaryReader.ReadBytes(4);
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(DamageSeatInfoBlock));
         this.damageSeats = new DamageSeatInfoBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.damageSeats[i] = new DamageSeatInfoBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(DamageConstraintInfoBlock));
         this.damageConstraints = new DamageConstraintInfoBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.damageConstraints[i] = new DamageConstraintInfoBlock(binaryReader);
             }
         }
     }
     this.overshieldFirstPersonShader = binaryReader.ReadTagReference();
     this.overshieldShader = binaryReader.ReadTagReference();
 }
 public DamageConstraintInfoBlock(BinaryReader binaryReader)
 {
     this.physicsModelConstraintName = binaryReader.ReadStringID();
     this.damageConstraintName = binaryReader.ReadStringID();
     this.damageConstraintGroupName = binaryReader.ReadStringID();
     this.groupProbabilityScale = binaryReader.ReadSingle();
     this.padding = binaryReader.ReadBytes(4);
 }
 public DamageSeatInfoBlock(BinaryReader binaryReader)
 {
     this.seatLabel = binaryReader.ReadStringID();
     this.directDamageScale0NoDamage1FullDamage = binaryReader.ReadSingle();
     this.damageTransferFallOffRadius = binaryReader.ReadSingle();
     this.maximumTransferDamageScale = binaryReader.ReadSingle();
     this.minimumTransferDamageScale = binaryReader.ReadSingle();
 }
Example #15
0
 public SquadsBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadString32();
     this.flags = (Flags)binaryReader.ReadInt32();
     this.team = (Team)binaryReader.ReadInt16();
     this.parent = binaryReader.ReadShortBlockIndex1();
     this.squadDelayTimeSeconds = binaryReader.ReadSingle();
     this.normalDiffCountInitialNumberOfActorsOnNormalDifficulty = binaryReader.ReadInt16();
     this.insaneDiffCountInitialNumberOfActorsOnInsaneDifficultyHardDifficultyIsMidwayBetweenNormalAndInsane = binaryReader.ReadInt16();
     this.majorUpgrade = (MajorUpgrade)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.vehicleType = binaryReader.ReadShortBlockIndex1();
     this.characterType = binaryReader.ReadShortBlockIndex1();
     this.initialZone = binaryReader.ReadShortBlockIndex1();
     this.padding0 = binaryReader.ReadBytes(2);
     this.initialWeapon = binaryReader.ReadShortBlockIndex1();
     this.initialSecondaryWeapon = binaryReader.ReadShortBlockIndex1();
     this.grenadeType = (GrenadeType)binaryReader.ReadInt16();
     this.initialOrder = binaryReader.ReadShortBlockIndex1();
     this.vehicleVariant = binaryReader.ReadStringID();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(ActorStartingLocationsBlock));
         this.startingLocations = new ActorStartingLocationsBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.startingLocations[i] = new ActorStartingLocationsBlock(binaryReader);
             }
         }
     }
     this.placementScript = binaryReader.ReadString32();
     this.skip1 = binaryReader.ReadBytes(2);
     this.padding2 = binaryReader.ReadBytes(2);
 }
 public RenderModelPermutationBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.l1SectionIndexSuperLow = binaryReader.ReadInt16();
     this.l2SectionIndexLow = binaryReader.ReadInt16();
     this.l3SectionIndexMedium = binaryReader.ReadInt16();
     this.l4SectionIndexHigh = binaryReader.ReadInt16();
     this.l5SectionIndexSuperHigh = binaryReader.ReadInt16();
     this.l6SectionIndexHollywood = binaryReader.ReadInt16();
 }
Example #17
0
 public AiSceneRoleVariantsBlock(BinaryReader binaryReader)
 {
     this.variantDesignation = binaryReader.ReadStringID();
 }
 public RenderModelRegionBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.nodeMapOffsetOLD = binaryReader.ReadInt16();
     this.nodeMapSizeOLD = binaryReader.ReadInt16();
     this.permutations = ReadPermutations(binaryReader);
 }
Example #19
0
 public AiSceneBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.flags = (Flags)binaryReader.ReadInt32();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(AiSceneTriggerBlock));
         this.triggerConditions = new AiSceneTriggerBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.triggerConditions[i] = new AiSceneTriggerBlock(binaryReader);
             }
         }
     }
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(AiSceneRoleBlock));
         this.roles = new AiSceneRoleBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.roles[i] = new AiSceneRoleBlock(binaryReader);
             }
         }
     }
 }
Example #20
0
 public ScenarioObjectPermutationStruct(BinaryReader binaryReader)
 {
     this.variantName = binaryReader.ReadStringID();
     this.activeChangeColors = (ActiveChangeColors)binaryReader.ReadInt32();
     this.primaryColor = binaryReader.ReadRGBColor();
     this.secondaryColor = binaryReader.ReadRGBColor();
     this.tertiaryColor = binaryReader.ReadRGBColor();
     this.quaternaryColor = binaryReader.ReadRGBColor();
 }
Example #21
0
 public StaticSpawnZoneDataStruct(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.relevantTeam = (RelevantTeam)binaryReader.ReadInt32();
     this.relevantGames = (RelevantGames)binaryReader.ReadInt32();
     this.flags = (Flags)binaryReader.ReadInt32();
 }
Example #22
0
 public ScenarioPlayersBlock(BinaryReader binaryReader)
 {
     this.position = binaryReader.ReadVector3();
     this.facingDegrees = binaryReader.ReadSingle();
     this.teamDesignator = (TeamDesignator)binaryReader.ReadInt16();
     this.bSPIndex = binaryReader.ReadInt16();
     this.gameType1 = (GameType1)binaryReader.ReadInt16();
     this.gameType2 = (GameType2)binaryReader.ReadInt16();
     this.gameType3 = (GameType3)binaryReader.ReadInt16();
     this.gameType4 = (GameType4)binaryReader.ReadInt16();
     this.spawnType0 = (SpawnType0)binaryReader.ReadInt16();
     this.spawnType1 = (SpawnType1)binaryReader.ReadInt16();
     this.spawnType2 = (SpawnType2)binaryReader.ReadInt16();
     this.spawnType3 = (SpawnType3)binaryReader.ReadInt16();
     this.eMPTYSTRING = binaryReader.ReadStringID();
     this.eMPTYSTRING0 = binaryReader.ReadStringID();
     this.campaignPlayerType = (CampaignPlayerType)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(6);
 }
Example #23
0
 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);
 }
Example #24
0
 public ScenarioTriggerVolumeBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.objectName = binaryReader.ReadShortBlockIndex1();
     this.skip = binaryReader.ReadBytes(2);
     this.nodeName = binaryReader.ReadStringID();
     this.eMPTYSTRING = new EMPTYSTRING[6];
     for (int i = 0; i < 6; ++i)
     {
         this.eMPTYSTRING[i] = new EMPTYSTRING(binaryReader);
     }
     this.position = binaryReader.ReadVector3();
     this.extents = binaryReader.ReadVector3();
     this.padding0 = binaryReader.ReadBytes(4);
     this.killTriggerVolume = binaryReader.ReadShortBlockIndex1();
     this.padding1 = binaryReader.ReadBytes(2);
 }
Example #25
0
 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();
 }
Example #26
0
 public ScenarioNetpointsBlock(BinaryReader binaryReader)
 {
     this.position = binaryReader.ReadVector3();
     this.facingDegrees = binaryReader.ReadSingle();
     this.type = (Type)binaryReader.ReadInt16();
     this.teamDesignator = (TeamDesignator)binaryReader.ReadInt16();
     this.identifier = binaryReader.ReadInt16();
     this.flags = (Flags)binaryReader.ReadInt16();
     this.eMPTYSTRING = binaryReader.ReadStringID();
     this.eMPTYSTRING0 = binaryReader.ReadStringID();
 }
Example #27
0
 public ScenarioScreenEffectReferenceBlock(BinaryReader binaryReader)
 {
     this.padding = binaryReader.ReadBytes(16);
     this.screenEffect = binaryReader.ReadTagReference();
     this.primaryInputInterpolator = binaryReader.ReadStringID();
     this.secondaryInputInterpolator = binaryReader.ReadStringID();
     this.skip0 = binaryReader.ReadBytes(2);
     this.skip1 = binaryReader.ReadBytes(2);
 }
Example #28
0
 public ActorStartingLocationsBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.position = binaryReader.ReadVector3();
     this.referenceFrame = binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.facingYawPitchDegrees = binaryReader.ReadVector2();
     this.flags = (Flags)binaryReader.ReadInt32();
     this.characterType = binaryReader.ReadShortBlockIndex1();
     this.initialWeapon = binaryReader.ReadShortBlockIndex1();
     this.initialSecondaryWeapon = binaryReader.ReadShortBlockIndex1();
     this.padding0 = binaryReader.ReadBytes(2);
     this.vehicleType = binaryReader.ReadShortBlockIndex1();
     this.seatType = (SeatType)binaryReader.ReadInt16();
     this.grenadeType = (GrenadeType)binaryReader.ReadInt16();
     this.swarmCountNumberOfCreturesInSwarmIfASwarmIsSpawnedAtThisLocation = binaryReader.ReadInt16();
     this.actorVariantName = binaryReader.ReadStringID();
     this.vehicleVariantName = binaryReader.ReadStringID();
     this.initialMovementDistanceBeforeDoingAnythingElseTheActorWillTravelTheGivenDistanceInItsForwardDirection = binaryReader.ReadSingle();
     this.emitterVehicle = binaryReader.ReadShortBlockIndex1();
     this.initialMovementMode = (InitialMovementMode)binaryReader.ReadInt16();
     this.placementScript = binaryReader.ReadString32();
     this.skip1 = binaryReader.ReadBytes(2);
     this.padding2 = binaryReader.ReadBytes(2);
 }
 void IDefinition.FromArray(byte[] buffer)
 {
     BinaryReader bin = new BinaryReader(new MemoryStream(buffer));
     Name = bin.ReadStringID();
     NodeMapOffset = bin.ReadInt16();
     NodeMapSize = bin.ReadInt16();
 }
 public InstantaneousDamageRepsonseBlock(BinaryReader binaryReader)
 {
     this.responseType = (ResponseType)binaryReader.ReadInt16();
     this.constraintDamageType = (ConstraintDamageType)binaryReader.ReadInt16();
     this.flags = (Flags)binaryReader.ReadInt32();
     this.damageThresholdRepsonseFiresAfterCrossingThisThreshold1FullHealth = binaryReader.ReadSingle();
     this.transitionEffect = binaryReader.ReadTagReference();
     this.damageEffect = new InstantaneousResponseDamageEffectStruct(binaryReader);
     this.region = binaryReader.ReadStringID();
     this.newState = (NewState)binaryReader.ReadInt16();
     this.runtimeRegionIndex = binaryReader.ReadInt16();
     this.effectMarkerName = binaryReader.ReadStringID();
     this.damageEffectMarker = new InstantaneousResponseDamageEffectMarkerStruct(binaryReader);
     this.responseDelayInSeconds = binaryReader.ReadSingle();
     this.delayEffect = binaryReader.ReadTagReference();
     this.delayEffectMarkerName = binaryReader.ReadStringID();
     this.constraintGroupName = binaryReader.ReadStringID();
     this.ejectingSeatLabel = binaryReader.ReadStringID();
     this.skipFraction = binaryReader.ReadSingle();
     this.destroyedChildObjectMarkerName = binaryReader.ReadStringID();
     this.totalDamageThreshold = binaryReader.ReadSingle();
 }