Example #1
0
        private void WriteMapDataTo(BinaryWriter writer, AssetNameCollection assetNames)
        {
            writer.Write(assetNames.GetOrCreateAssetIndex(HeightMapData.AssetName));
            HeightMapData.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(BlendTileData.AssetName));
            BlendTileData.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(WorldInfo.AssetName));
            WorldInfo.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(SidesList.AssetName));
            SidesList.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(ObjectsList.AssetName));
            ObjectsList.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(PolygonTriggers.AssetName));
            PolygonTriggers.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(GlobalLighting.AssetName));
            GlobalLighting.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(WaypointsList.AssetName));
            WaypointsList.WriteTo(writer);
        }
Example #2
0
        private void WriteMapDataTo(BinaryWriter writer, AssetNameCollection assetNames)
        {
            if (AssetList != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(AssetList.AssetName));
                AssetList.WriteTo(writer);
            }

            if (GlobalVersion != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(GlobalVersion.AssetName));
                GlobalVersion.WriteTo(writer);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(HeightMapData.AssetName));
            HeightMapData.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(BlendTileData.AssetName));
            BlendTileData.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(WorldInfo.AssetName));
            WorldInfo.WriteTo(writer, assetNames);

            if (MPPositionList != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(MPPositionList.AssetName));
                MPPositionList.WriteTo(writer, assetNames);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(SidesList.AssetName));
            SidesList.WriteTo(writer, assetNames, AssetList != null);

            if (LibraryMapLists != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(LibraryMapLists.AssetName));
                LibraryMapLists.WriteTo(writer, assetNames);
            }

            if (Teams != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(Teams.AssetName));
                Teams.WriteTo(writer, assetNames);
            }

            if (PlayerScriptsList != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(PlayerScriptsList.AssetName));
                PlayerScriptsList.WriteTo(writer, assetNames);
            }

            if (BuildLists != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(BuildLists.AssetName));
                BuildLists.WriteTo(writer, assetNames, AssetList != null);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(ObjectsList.AssetName));
            ObjectsList.WriteTo(writer, assetNames);

            if (PolygonTriggers != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(PolygonTriggers.AssetName));
                PolygonTriggers.WriteTo(writer);
            }

            if (TriggerAreas != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(TriggerAreas.AssetName));
                TriggerAreas.WriteTo(writer);
            }

            if (GlobalWaterSettings != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(GlobalWaterSettings.AssetName));
                GlobalWaterSettings.WriteTo(writer);
            }

            if (FogSettings != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(FogSettings.AssetName));
                FogSettings.WriteTo(writer);
            }

            if (MissionHotSpots != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(MissionHotSpots.AssetName));
                MissionHotSpots.WriteTo(writer);
            }

            if (MissionObjectives != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(MissionObjectives.AssetName));
                MissionObjectives.WriteTo(writer);
            }

            if (StandingWaterAreas != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(StandingWaterAreas.AssetName));
                StandingWaterAreas.WriteTo(writer);
            }

            if (RiverAreas != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(RiverAreas.AssetName));
                RiverAreas.WriteTo(writer);
            }

            if (StandingWaveAreas != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(StandingWaveAreas.AssetName));
                StandingWaveAreas.WriteTo(writer);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(GlobalLighting.AssetName));
            GlobalLighting.WriteTo(writer);

            if (PostEffectsChunk != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(PostEffectsChunk.AssetName));
                PostEffectsChunk.WriteTo(writer);
            }

            if (EnvironmentData != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(EnvironmentData.AssetName));
                EnvironmentData.WriteTo(writer);
            }

            if (NamedCameras != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(NamedCameras.AssetName));
                NamedCameras.WriteTo(writer);
            }

            if (CameraAnimationList != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(CameraAnimationList.AssetName));
                CameraAnimationList.WriteTo(writer);
            }

            if (CastleTemplates != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(CastleTemplates.AssetName));
                CastleTemplates.WriteTo(writer, assetNames);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(WaypointsList.AssetName));
            WaypointsList.WriteTo(writer);

            if (SkyboxSettings != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(SkyboxSettings.AssetName));
                SkyboxSettings.WriteTo(writer);
            }
        }