Beispiel #1
0
        List <ScenarioStructureBsp.Cluster.DecoratorGrid> ConvertDecoratorGrid(List <TinyPositionVertex> vertices, ScenarioStructureBsp.Cluster.DecoratorGrid grid)
        {
            List <ScenarioStructureBsp.Cluster.DecoratorGrid> decoratorGrids = new List <ScenarioStructureBsp.Cluster.DecoratorGrid>();

            List <DecoratorData> decoratorData = ParseVertices(vertices);

            foreach (var data in decoratorData)
            {
                var newGrid = grid.DeepClone();

                newGrid.Amount = data.Amount;
                newGrid.DecoratorGeometryOffset = grid.DecoratorGeometryOffset + data.GeometryOffset;
                newGrid.DecoratorVariant        = data.Variant;

                //Position fixups should go here if needed

                decoratorGrids.Add(newGrid);
            }
            return(decoratorGrids);
        }
Beispiel #2
0
        List <ScenarioStructureBsp.Cluster.DecoratorGrid> ConvertDecoratorGrid(List <TinyPositionVertex> vertices, ScenarioStructureBsp.Cluster.DecoratorGrid grid)
        {
            List <ScenarioStructureBsp.Cluster.DecoratorGrid> decoratorGrids = new List <ScenarioStructureBsp.Cluster.DecoratorGrid>();

            List <DecoratorData> decoratorData = ParseVertices(vertices);

            foreach (var data in decoratorData)
            {
                var newGrid = grid.DeepClone();

                newGrid.HaloOnlineInfo     = new ScenarioStructureBsp.Cluster.DecoratorGrid.HaloOnlineDecoratorInfo();
                newGrid.Amount             = data.Amount;
                newGrid.VertexBufferOffset = grid.VertexBufferOffset + data.GeometryOffset;

                newGrid.HaloOnlineInfo.Variant           = data.Variant;
                newGrid.HaloOnlineInfo.PaletteIndex      = grid.Gen3Info.PaletteIndex;
                newGrid.HaloOnlineInfo.VertexBufferIndex = grid.Gen3Info.VertexBufferIndex; // this doesn't change as each vertex buffer corresponds to the palette index

                decoratorGrids.Add(newGrid);
            }
            return(decoratorGrids);
        }