Beispiel #1
0
 internal ScenarioSceneryDatumStructV4BlockBase(BinaryReader binaryReader)
 {
     this.pathfindingPolicy     = (PathfindingPolicy)binaryReader.ReadInt16();
     this.lightmappingPolicy    = (LightmappingPolicy)binaryReader.ReadInt16();
     this.pathfindingReferences = ReadPathfindingObjectIndexListBlockArray(binaryReader);
     this.invalidName_          = binaryReader.ReadBytes(2);
     this.validMultiplayerGames = (ValidMultiplayerGames)binaryReader.ReadInt16();
 }
 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.PathfindingPolicy  = ((PathfindingPolicyEnum)(binaryReader.ReadInt16()));
     this.LightmappingPolicy = ((LightmappingPolicyEnum)(binaryReader.ReadInt16()));
     pointerQueue.Enqueue(binaryReader.ReadBlamPointer(4));
     this.fieldpad = binaryReader.ReadBytes(2);
     this.ScenarioSceneryDatumStructV4ValidMultiplayerGames = ((ValidMultiplayerGames)(binaryReader.ReadInt16()));
     return(pointerQueue);
 }
 public ScenarioSceneryDatumStructV4(BinaryReader binaryReader)
 {
     this.pathfindingPolicy = (PathfindingPolicy)binaryReader.ReadInt16();
     this.lightmappingPolicy = (LightmappingPolicy)binaryReader.ReadInt16();
     {
         var count = binaryReader.ReadInt32();
         var address = binaryReader.ReadInt32();
         var elementSize = Marshal.SizeOf(typeof(PathfindingObjectIndexListBlock));
         this.pathfindingReferences = new PathfindingObjectIndexListBlock[count];
         using (binaryReader.BaseStream.Pin())
         {
             for (int i = 0; i < count; ++i)
             {
                 binaryReader.BaseStream.Position = address + i * elementSize;
                 this.pathfindingReferences[i] = new PathfindingObjectIndexListBlock(binaryReader);
             }
         }
     }
     this.padding = binaryReader.ReadBytes(2);
     this.validMultiplayerGames = (ValidMultiplayerGames)binaryReader.ReadInt16();
 }