コード例 #1
0
    private Face GetFace(SgtTerrainLevel level)
    {
        if (faces == null)
        {
            faces = new List <Face>();
        }

        for (var i = faces.Count - 1; i >= 0; i--)
        {
            var face = faces[i];

            if (face != null && face.Level != null)
            {
                if (face.Level == level)
                {
                    return(face);
                }
            }
            else
            {
                faces.RemoveAt(i);
            }
        }

        return(null);
    }
コード例 #2
0
ファイル: SgtTerrainFace.cs プロジェクト: BackToGround/XGame
    public SgtTerrainLevel GetLevel(int index)
    {
        for (var i = Levels.Count - 1; i >= 0; i--)
        {
            var level = Levels[i];

            if (level.Index == index)
            {
                level.Marked = false;

                return(level);
            }
        }

        var newLevel = SgtTerrainLevel.Create("Level " + index, gameObject.layer, transform);

        newLevel.Marked = false;
        newLevel.Index  = index;
        newLevel.Face   = this;
        newLevel.UpdateMaterials();

        Levels.Add(newLevel);

        return(newLevel);
    }
コード例 #3
0
    public void Spawn(SgtTerrain terrain, SgtTerrainLevel level, SgtVector3D localPoint)
    {
        if (OnSpawn != null)
        {
            OnSpawn();
        }

        transform.SetParent(level.transform, false);

        // Snap to surface
        localPoint = terrain.GetLocalPoint(localPoint);

        // Rotate up
        var up = Quaternion.Euler(0.0f, Random.Range(0.0f, 360.0f), 0.0f) * Vector3.up;

        // Spawn on surface
        transform.localPosition = (Vector3)localPoint;
        transform.localRotation = Quaternion.FromToRotation(up, terrain.transform.TransformDirection(transform.localPosition));
        transform.localScale    = Prefab.transform.localScale * Random.Range(ScaleMin, ScaleMax);
        //transform.rotation   = Quaternion.FromToRotation(up, terrain.transform.TransformDirection(localPosition));

        if (AlignToNormal != 0.0f)
        {
            //var worldRight   = transform.right   * AlignToNormal;
            //var worldForward = transform.forward * AlignToNormal;
            //var worldNormal  = terrain.GetLocalNormal(localPoint, worldRight, worldForward);

            //transform.rotation = Quaternion.FromToRotation(up, worldNormal);
        }
    }
コード例 #4
0
 private void CalculateMaterial(SgtTerrainLevel level, ref Material material)
 {
     if (level.Index >= LevelMin && level.Index <= LevelMax)
     {
         if (AllSides == true || level.Face.Side == RequiredSide)
         {
             material = Material;
         }
     }
 }
コード例 #5
0
    public static SgtTerrainLevel MarkForDestruction(SgtTerrainLevel level)
    {
        if (level != null)
        {
            level.Face = null;

            level.gameObject.SetActive(true);
        }

        return(null);
    }
コード例 #6
0
    public static SgtTerrainLevel Pool(SgtTerrainLevel level)
    {
        if (level != null)
        {
            level.Face = null;

            level.PoolMeshNow();
            level.PoolColliderMeshNow();

            SgtComponentPool <SgtTerrainLevel> .Add(level);
        }

        return(null);
    }
コード例 #7
0
    private void WriteParentNormals(SgtTerrainLevel parent, long minX, long minY, long maxX, long maxY)
    {
        for (var y = minY; y <= maxY; y++)
        {
            for (var x = minX; x <= maxX; x++)
            {
                var index   = Wrap(x, y, size);
                var parentX = x / 2.0;
                var parentY = y / 2.0;
                var normal  = parent.normals[Wrap((long)parentX, (long)parentY, parent.size)];

                normals[index] = normal;
            }
        }
    }
コード例 #8
0
ファイル: SgtTerrain.cs プロジェクト: BackToGround/XGame
    public Material GetMaterial(SgtTerrainLevel level)
    {
        var finalMaterial = Material;

        if (level != null && level.Face != null && level.Face.Material != null)
        {
            finalMaterial = level.Face.Material;
        }

        if (OnCalculateMaterial != null)
        {
            OnCalculateMaterial(level, ref finalMaterial);
        }

        return(finalMaterial);
    }
コード例 #9
0
    private void CalculateLevel(SgtTerrainLevel level, SgtTerrain.Ring ring)
    {
        var face = GetFace(level);

        if (level.Index == Depth && ring != null)
        {
            if (face == null)
            {
                face = new Face();

                face.Level = level;

                faces.Add(face);
            }

            face.Clear(ring);

            for (var y = ring.Outer.minY; y <= ring.Outer.maxY; y++)
            {
                for (var x = ring.Outer.minX; x <= ring.Outer.maxX; x++)
                {
                    if (x >= face.Rect.minX && x < face.Rect.maxX && y >= face.Rect.minY && y < face.Rect.maxY)
                    {
                        continue;
                    }

                    if (Random.value < SpawnProbability)
                    {
                        AddObject(face, ring, x, y);
                    }
                }
            }

            face.Rect = ring.Outer;
        }
        else
        {
            if (face != null)
            {
                face.Clear();

                faces.Remove(face);
            }
        }
    }
コード例 #10
0
ファイル: SgtTerrain.cs プロジェクト: BackToGround/XGame
    public Material[] GetMaterials(SgtTerrainLevel level)
    {
        var finalMaterial = GetMaterial(level);

        if (SgtHelper.Enabled(Atmosphere) == true)
        {
            materials2[0] = finalMaterial;
            materials2[1] = Atmosphere.InnerMaterial;

            return(materials2);
        }
        else
        {
            materials1[0] = finalMaterial;

            return(materials1);
        }
    }
コード例 #11
0
ファイル: SgtTerrainFace.cs プロジェクト: BackToGround/XGame
    public void Sweep()
    {
        for (var i = Levels.Count - 1; i >= 0; i--)
        {
            var level = Levels[i];

            if (level.Marked == true)
            {
                if (Terrain != null && Terrain.OnCalculateLevel != null)
                {
                    Terrain.OnCalculateLevel(level, null);
                }

                SgtTerrainLevel.MarkForDestruction(level);

                Levels.RemoveAt(i);
            }
        }
    }
コード例 #12
0
ファイル: SgtTerrainFace.cs プロジェクト: BackToGround/XGame
    public void Mark()
    {
        LastLevel = null;

        if (Levels == null)
        {
            Levels = new List <SgtTerrainLevel>();
        }

        for (var i = Levels.Count - 1; i >= 0; i--)
        {
            var level = Levels[i];

            if (level != null)
            {
                level.Marked = true;
            }
            else
            {
                Levels.RemoveAt(i);
            }
        }
    }
コード例 #13
0
        static SgtTerrainLevel()
        {
            var level0 = new SgtTerrainLevel();

            level0.MaxDelta = 1;
            level0.IndicesL = new int[][] { new int[] { 4, 0, 3, 4, 3, 6 }, new int[] { 4, 0, 6 } };
            level0.IndicesR = new int[][] { new int[] { 4, 8, 5, 4, 5, 2 }, new int[] { 4, 8, 2 } };
            level0.IndicesB = new int[][] { new int[] { 4, 2, 1, 4, 1, 0 }, new int[] { 4, 2, 0 } };
            level0.IndicesT = new int[][] { new int[] { 4, 6, 7, 4, 7, 8 }, new int[] { 4, 6, 8 } };
            level0.Indices  = new int[]
            {
            };

            var level1 = new SgtTerrainLevel();

            level1.MaxDelta = 2;
            level1.IndicesL = new int[][] { new int[] { 20, 16, 15, 15, 16, 10, 10, 16, 11, 11, 06, 10, 10, 06, 05, 05, 06, 00 }, new int[] { 20, 16, 10, 10, 16, 11, 11, 06, 10, 10, 06, 00 }, new int[] { 20, 16, 11, 20, 11, 00, 00, 11, 06 } };
            level1.IndicesR = new int[][] { new int[] { 04, 08, 09, 09, 08, 14, 14, 08, 13, 13, 18, 14, 14, 18, 19, 19, 18, 24 }, new int[] { 04, 08, 14, 14, 08, 13, 13, 18, 14, 14, 18, 24 }, new int[] { 04, 08, 13, 13, 24, 04, 13, 18, 24 } };
            level1.IndicesB = new int[][] { new int[] { 00, 06, 01, 01, 06, 02, 02, 06, 07, 07, 08, 02, 02, 08, 03, 03, 08, 04 }, new int[] { 00, 06, 02, 02, 06, 07, 07, 08, 02, 02, 08, 04 }, new int[] { 00, 06, 07, 00, 07, 04, 04, 07, 08 } };
            level1.IndicesT = new int[][] { new int[] { 24, 18, 23, 23, 18, 22, 22, 18, 17, 17, 16, 22, 22, 16, 21, 21, 16, 20 }, new int[] { 24, 18, 22, 22, 18, 17, 17, 16, 22, 22, 16, 20 }, new int[] { 24, 18, 17, 17, 20, 24, 17, 16, 20 } };
            level1.Indices  = new int[]
            {
                06, 11, 07, 07, 11, 12, 12, 13, 07, 07, 13, 08,
                11, 16, 17, 17, 12, 11, 12, 17, 13, 13, 17, 18,
            };

            var level2 = new SgtTerrainLevel();

            level2.MaxDelta = 3;
            level2.IndicesL = new int[][] { new int[] { 72, 64, 63, 63, 64, 54, 54, 46, 45, 45, 46, 36, 36, 28, 27, 27, 28, 18, 18, 10, 09, 09, 10, 00, 10, 18, 19, 19, 18, 28, 28, 36, 37, 37, 36, 46, 46, 54, 55, 55, 54, 64 }, new int[] { 72, 64, 54, 54, 46, 36, 36, 28, 18, 18, 10, 00, 10, 18, 19, 19, 18, 28, 28, 36, 37, 37, 36, 46, 46, 54, 55, 55, 54, 64 }, new int[] { 72, 64, 55, 72, 55, 36, 36, 55, 46, 36, 46, 37, 36, 37, 28, 36, 28, 19, 36, 19, 00, 00, 19, 10 }, new int[] { 72, 64, 55, 72, 55, 46, 72, 46, 37, 72, 37, 00, 00, 37, 28, 00, 28, 19, 00, 19, 10 } };
            level2.IndicesR = new int[][] { new int[] { 08, 16, 17, 17, 16, 26, 26, 34, 35, 35, 34, 44, 44, 52, 53, 53, 52, 62, 62, 70, 71, 71, 70, 80, 70, 62, 61, 61, 62, 52, 52, 44, 43, 43, 44, 34, 34, 26, 25, 25, 26, 16 }, new int[] { 08, 16, 26, 26, 34, 44, 44, 52, 62, 62, 70, 80, 70, 62, 61, 61, 62, 52, 52, 44, 43, 43, 44, 34, 34, 26, 25, 25, 26, 16 }, new int[] { 08, 16, 25, 08, 25, 44, 44, 25, 34, 44, 34, 43, 44, 43, 52, 44, 52, 61, 44, 61, 80, 80, 61, 70 }, new int[] { 08, 16, 25, 08, 25, 34, 08, 34, 43, 43, 80, 08, 80, 43, 52, 80, 52, 61, 80, 61, 70 } };
            level2.IndicesB = new int[][] { new int[] { 00, 10, 01, 01, 10, 02, 02, 12, 03, 03, 12, 04, 04, 14, 05, 05, 14, 06, 06, 16, 07, 07, 16, 08, 16, 06, 15, 15, 06, 14, 14, 04, 13, 13, 04, 12, 12, 02, 11, 11, 02, 10 }, new int[] { 00, 10, 02, 02, 12, 04, 04, 14, 06, 06, 16, 08, 16, 06, 15, 15, 06, 14, 14, 04, 13, 13, 04, 12, 12, 02, 11, 11, 02, 10 }, new int[] { 00, 10, 11, 00, 11, 04, 04, 11, 12, 04, 12, 13, 04, 13, 14, 04, 14, 15, 04, 15, 08, 08, 15, 16 }, new int[] { 00, 10, 11, 00, 11, 12, 00, 12, 13, 00, 13, 08, 08, 13, 14, 08, 14, 15, 08, 15, 16 } };
            level2.IndicesT = new int[][] { new int[] { 80, 70, 79, 79, 70, 78, 78, 68, 77, 77, 68, 76, 76, 66, 75, 75, 66, 74, 74, 64, 73, 73, 64, 72, 64, 74, 65, 65, 74, 66, 66, 76, 67, 67, 76, 68, 68, 78, 69, 69, 78, 70 }, new int[] { 80, 70, 78, 78, 68, 76, 76, 66, 74, 74, 64, 72, 64, 74, 65, 65, 74, 66, 66, 76, 67, 67, 76, 68, 68, 78, 69, 69, 78, 70 }, new int[] { 80, 70, 69, 80, 69, 76, 76, 69, 68, 76, 68, 67, 76, 67, 66, 76, 66, 65, 76, 65, 72, 72, 65, 64 }, new int[] { 80, 70, 69, 80, 69, 68, 80, 68, 67, 67, 72, 80, 72, 67, 66, 72, 66, 65, 72, 65, 64 } };
            level2.Indices  = new int[]
            {
                10, 19, 11, 11, 19, 20, 20, 21, 11, 11, 21, 12, 12, 21, 13, 13, 21, 22, 22, 23, 13, 13, 23, 14, 14, 23, 15, 15, 23, 24, 24, 25, 15, 15, 25, 16,
                19, 28, 29, 29, 20, 19, 20, 29, 21, 21, 29, 30, 30, 31, 21, 21, 31, 22, 22, 31, 23, 23, 31, 32, 32, 33, 23, 23, 33, 24, 24, 33, 25, 25, 33, 34,
                43, 51, 52, 42, 51, 43, 41, 51, 42, 50, 51, 41, 41, 49, 50, 40, 49, 41, 39, 49, 40, 48, 49, 39, 39, 47, 48, 38, 47, 39, 47, 38, 37, 37, 46, 47,
                33, 43, 34, 42, 43, 33, 33, 41, 42, 32, 41, 33, 31, 41, 32, 40, 41, 31, 31, 39, 40, 30, 39, 31, 29, 39, 30, 38, 39, 29, 29, 37, 38, 28, 37, 29,
                46, 55, 47, 47, 55, 56, 56, 57, 47, 47, 57, 48, 48, 57, 49, 49, 57, 58, 58, 59, 49, 49, 59, 50, 50, 59, 51, 51, 59, 60, 60, 61, 51, 51, 61, 52,
                55, 64, 65, 65, 56, 55, 56, 65, 57, 57, 65, 66, 66, 67, 57, 57, 67, 58, 58, 67, 59, 59, 67, 68, 68, 69, 59, 59, 69, 60, 60, 69, 61, 61, 69, 70,
            };

            var level3 = new SgtTerrainLevel();

            level3.MaxDelta = 4;
            level3.IndicesL = new int[][] { new int[] { 272, 256, 255, 255, 256, 238, 238, 222, 221, 221, 222, 204, 204, 188, 187, 187, 188, 170, 170, 154, 153, 153, 154, 136, 136, 120, 119, 119, 120, 102, 102, 086, 085, 085, 086, 068, 068, 052, 051, 051, 052, 034, 034, 018, 017, 017, 018, 000, 018, 034, 035, 035, 034, 052, 052, 068, 069, 069, 068, 086, 086, 102, 103, 103, 102, 120, 120, 136, 137, 137, 136, 154, 154, 170, 171, 171, 170, 188, 188, 204, 205, 205, 204, 222, 222, 238, 239, 239, 238, 256 }, new int[] { 272, 256, 238, 238, 222, 204, 204, 188, 170, 170, 154, 136, 136, 120, 102, 102, 086, 068, 068, 052, 034, 034, 018, 000, 018, 034, 035, 035, 034, 052, 052, 068, 069, 069, 068, 086, 086, 102, 103, 103, 102, 120, 120, 136, 137, 137, 136, 154, 154, 170, 171, 171, 170, 188, 188, 204, 205, 205, 204, 222, 222, 238, 239, 239, 238, 256 }, new int[] { 035, 000, 068, 103, 068, 136, 171, 136, 204, 239, 204, 272, 272, 256, 239, 204, 239, 222, 204, 222, 205, 204, 205, 188, 204, 188, 171, 136, 171, 154, 136, 154, 137, 136, 137, 120, 136, 120, 103, 068, 103, 086, 068, 086, 069, 068, 069, 052, 068, 052, 035, 000, 035, 018 }, new int[] { 272, 205, 136, 136, 069, 000, 000, 069, 052, 000, 052, 035, 000, 035, 018, 136, 086, 069, 136, 103, 086, 136, 120, 103, 136, 137, 120, 136, 205, 188, 136, 188, 171, 136, 171, 154, 136, 154, 137, 272, 222, 205, 272, 239, 222, 272, 256, 239 }, new int[] { 272, 137, 000, 000, 137, 120, 000, 120, 103, 000, 103, 086, 000, 086, 069, 000, 069, 052, 000, 052, 035, 000, 035, 018, 272, 154, 137, 272, 171, 154, 272, 188, 171, 272, 205, 188, 272, 222, 205, 272, 239, 222, 272, 256, 239 } };
            level3.IndicesR = new int[][] { new int[] { 016, 032, 033, 033, 032, 050, 050, 066, 067, 067, 066, 084, 084, 100, 101, 101, 100, 118, 118, 134, 135, 135, 134, 152, 152, 168, 169, 169, 168, 186, 186, 202, 203, 203, 202, 220, 220, 236, 237, 237, 236, 254, 254, 270, 271, 271, 270, 288, 270, 254, 253, 253, 254, 236, 236, 220, 219, 219, 220, 202, 202, 186, 185, 185, 186, 168, 168, 152, 151, 151, 152, 134, 134, 118, 117, 117, 118, 100, 100, 084, 083, 083, 084, 066, 066, 050, 049, 049, 050, 032 }, new int[] { 016, 032, 050, 050, 066, 084, 084, 100, 118, 118, 134, 152, 152, 168, 186, 186, 202, 220, 220, 236, 254, 254, 270, 288, 270, 254, 253, 253, 254, 236, 236, 220, 219, 219, 220, 202, 202, 186, 185, 185, 186, 168, 168, 152, 151, 151, 152, 134, 134, 118, 117, 117, 118, 100, 100, 084, 083, 083, 084, 066, 066, 050, 049, 049, 050, 032 }, new int[] { 016, 049, 084, 084, 117, 152, 152, 185, 220, 220, 253, 288, 288, 253, 270, 253, 220, 236, 236, 220, 219, 219, 220, 202, 202, 220, 185, 185, 152, 168, 168, 152, 151, 151, 152, 134, 134, 152, 117, 117, 084, 100, 100, 084, 083, 083, 084, 066, 066, 084, 049, 049, 016, 032 }, new int[] { 016, 083, 152, 152, 219, 288, 288, 219, 236, 288, 236, 253, 288, 253, 270, 152, 202, 219, 152, 185, 202, 152, 168, 185, 152, 151, 168, 152, 083, 100, 152, 100, 117, 152, 117, 134, 152, 134, 151, 083, 016, 066, 066, 016, 049, 049, 016, 032 }, new int[] { 000, 025, 016, 016, 025, 026, 016, 026, 027, 016, 027, 028, 016, 028, 029, 016, 029, 030, 016, 030, 031, 016, 031, 032, 000, 024, 025, 000, 023, 024, 000, 022, 023, 000, 021, 022, 000, 020, 021, 000, 019, 020, 000, 018, 019 } };
            level3.IndicesB = new int[][] { new int[] { 000, 018, 001, 001, 018, 002, 002, 020, 003, 003, 020, 004, 004, 022, 005, 005, 022, 006, 006, 024, 007, 007, 024, 008, 008, 026, 009, 009, 026, 010, 010, 028, 011, 011, 028, 012, 012, 030, 013, 013, 030, 014, 014, 032, 015, 015, 032, 016, 018, 019, 002, 002, 019, 020, 020, 021, 004, 004, 021, 022, 022, 023, 006, 006, 023, 024, 024, 025, 008, 008, 025, 026, 026, 027, 010, 010, 027, 028, 028, 029, 012, 012, 029, 030, 030, 031, 014, 014, 031, 032 }, new int[] { 000, 018, 002, 002, 020, 004, 004, 022, 006, 006, 024, 008, 008, 026, 010, 010, 028, 012, 012, 030, 014, 014, 032, 016, 032, 014, 031, 031, 014, 030, 030, 012, 029, 029, 012, 028, 028, 010, 027, 027, 010, 026, 026, 008, 025, 025, 008, 024, 024, 006, 023, 023, 006, 022, 022, 004, 021, 021, 004, 020, 020, 002, 019, 019, 002, 018 }, new int[] { 000, 019, 004, 004, 023, 008, 008, 027, 012, 012, 031, 016, 016, 031, 032, 031, 012, 030, 030, 012, 029, 029, 012, 028, 028, 012, 027, 027, 008, 026, 026, 008, 025, 025, 008, 024, 024, 008, 023, 023, 004, 022, 022, 004, 021, 021, 004, 020, 020, 004, 019, 019, 000, 018 }, new int[] { 000, 021, 008, 008, 029, 016, 016, 029, 030, 016, 030, 031, 016, 031, 032, 008, 028, 029, 008, 027, 028, 008, 026, 027, 008, 025, 026, 008, 024, 025, 008, 023, 024, 008, 022, 023, 008, 021, 022, 000, 020, 021, 000, 019, 020, 000, 018, 019 }, new int[] { 000, 025, 016, 016, 025, 026, 016, 026, 027, 016, 027, 028, 016, 028, 029, 016, 029, 030, 016, 030, 031, 016, 031, 032, 000, 024, 025, 000, 023, 024, 000, 022, 023, 000, 021, 022, 000, 020, 021, 000, 019, 020, 000, 018, 019 } };
            level3.IndicesT = new int[][] { new int[] { 288, 270, 287, 287, 270, 286, 286, 268, 285, 285, 268, 284, 284, 266, 283, 283, 266, 282, 282, 264, 281, 281, 264, 280, 280, 262, 279, 279, 262, 278, 278, 260, 277, 277, 260, 276, 276, 258, 275, 275, 258, 274, 274, 256, 273, 273, 256, 272, 256, 274, 257, 257, 274, 258, 258, 276, 259, 259, 276, 260, 260, 278, 261, 261, 278, 262, 262, 280, 263, 263, 280, 264, 264, 282, 265, 265, 282, 266, 266, 284, 267, 267, 284, 268, 268, 286, 269, 269, 286, 270 }, new int[] { 288, 270, 286, 286, 268, 284, 284, 266, 282, 282, 264, 280, 280, 262, 278, 278, 260, 276, 276, 258, 274, 274, 256, 272, 256, 274, 257, 257, 274, 258, 258, 276, 259, 259, 276, 260, 260, 278, 261, 261, 278, 262, 262, 280, 263, 263, 280, 264, 264, 282, 265, 265, 282, 266, 266, 284, 267, 267, 284, 268, 268, 286, 269, 269, 286, 270 }, new int[] { 288, 269, 284, 284, 265, 280, 280, 261, 276, 276, 257, 272, 272, 257, 256, 257, 276, 258, 258, 276, 259, 259, 276, 260, 260, 276, 261, 261, 280, 262, 262, 280, 263, 263, 280, 264, 264, 280, 265, 265, 284, 266, 266, 284, 267, 267, 284, 268, 268, 284, 269, 269, 288, 270 }, new int[] { 288, 267, 280, 280, 259, 272, 272, 259, 258, 272, 258, 257, 272, 257, 256, 280, 260, 259, 280, 261, 260, 280, 262, 261, 280, 263, 262, 280, 267, 266, 280, 266, 265, 280, 265, 264, 280, 264, 263, 288, 268, 267, 288, 269, 268, 288, 270, 269 }, new int[] { 288, 263, 272, 288, 264, 263, 288, 265, 264, 288, 266, 265, 288, 267, 266, 288, 268, 267, 288, 269, 268, 288, 270, 269, 272, 263, 262, 272, 262, 261, 272, 261, 260, 272, 260, 259, 272, 259, 258, 272, 258, 257, 272, 257, 256 } };
            level3.Indices  = new int[]
            {
                018, 035, 019, 019, 035, 036, 036, 037, 019, 019, 037, 020, 020, 037, 021, 021, 037, 038, 038, 039, 021, 021, 039, 022, 022, 039, 023, 023, 039, 040, 040, 041, 023, 023, 041, 024, 024, 041, 025, 025, 041, 042, 042, 043, 025, 025, 043, 026, 026, 043, 027, 027, 043, 044, 044, 045, 027, 027, 045, 028, 028, 045, 029, 029, 045, 046, 046, 047, 029, 029, 047, 030, 030, 047, 031, 031, 047, 048, 048, 049, 031, 031, 049, 032,
                035, 052, 053, 053, 036, 035, 036, 053, 037, 037, 053, 054, 054, 055, 037, 037, 055, 038, 038, 055, 039, 039, 055, 056, 056, 057, 039, 039, 057, 040, 040, 057, 041, 041, 057, 058, 058, 059, 041, 041, 059, 042, 042, 059, 043, 043, 059, 060, 060, 061, 043, 043, 061, 044, 044, 061, 045, 045, 061, 062, 062, 063, 045, 045, 063, 046, 046, 063, 047, 047, 063, 064, 064, 065, 047, 047, 065, 048, 048, 065, 049, 049, 065, 066,
                083, 099, 100, 082, 099, 083, 081, 099, 082, 098, 099, 081, 081, 097, 098, 080, 097, 081, 079, 097, 080, 096, 097, 079, 079, 095, 096, 078, 095, 079, 077, 095, 078, 094, 095, 077, 077, 093, 094, 076, 093, 077, 075, 093, 076, 092, 093, 075, 075, 091, 092, 074, 091, 075, 073, 091, 074, 090, 091, 073, 073, 089, 090, 072, 089, 073, 071, 089, 072, 088, 089, 071, 071, 087, 088, 070, 087, 071, 087, 070, 069, 069, 086, 087,
                065, 083, 066, 082, 083, 065, 065, 081, 082, 064, 081, 065, 063, 081, 064, 080, 081, 063, 063, 079, 080, 062, 079, 063, 061, 079, 062, 078, 079, 061, 061, 077, 078, 060, 077, 061, 059, 077, 060, 076, 077, 059, 059, 075, 076, 058, 075, 059, 057, 075, 058, 074, 075, 057, 057, 073, 074, 056, 073, 057, 055, 073, 056, 072, 073, 055, 055, 071, 072, 054, 071, 055, 053, 071, 054, 070, 071, 053, 053, 069, 070, 052, 069, 053,
                086, 103, 087, 087, 103, 104, 104, 105, 087, 087, 105, 088, 088, 105, 089, 089, 105, 106, 106, 107, 089, 089, 107, 090, 090, 107, 091, 091, 107, 108, 108, 109, 091, 091, 109, 092, 092, 109, 093, 093, 109, 110, 110, 111, 093, 093, 111, 094, 094, 111, 095, 095, 111, 112, 112, 113, 095, 095, 113, 096, 096, 113, 097, 097, 113, 114, 114, 115, 097, 097, 115, 098, 098, 115, 099, 099, 115, 116, 116, 117, 099, 099, 117, 100,
                103, 120, 121, 121, 104, 103, 104, 121, 105, 105, 121, 122, 122, 123, 105, 105, 123, 106, 106, 123, 107, 107, 123, 124, 124, 125, 107, 107, 125, 108, 108, 125, 109, 109, 125, 126, 126, 127, 109, 109, 127, 110, 110, 127, 111, 111, 127, 128, 128, 129, 111, 111, 129, 112, 112, 129, 113, 113, 129, 130, 130, 131, 113, 113, 131, 114, 114, 131, 115, 115, 131, 132, 132, 133, 115, 115, 133, 116, 116, 133, 117, 117, 133, 134,
                151, 167, 168, 150, 167, 151, 149, 167, 150, 166, 167, 149, 149, 165, 166, 148, 165, 149, 147, 165, 148, 164, 165, 147, 147, 163, 164, 146, 163, 147, 145, 163, 146, 162, 163, 145, 145, 161, 162, 144, 161, 145, 143, 161, 144, 160, 161, 143, 143, 159, 160, 142, 159, 143, 141, 159, 142, 158, 159, 141, 141, 157, 158, 140, 157, 141, 139, 157, 140, 156, 157, 139, 139, 155, 156, 138, 155, 139, 155, 138, 137, 137, 154, 155,
                133, 151, 134, 150, 151, 133, 133, 149, 150, 132, 149, 133, 131, 149, 132, 148, 149, 131, 131, 147, 148, 130, 147, 131, 129, 147, 130, 146, 147, 129, 129, 145, 146, 128, 145, 129, 127, 145, 128, 144, 145, 127, 127, 143, 144, 126, 143, 127, 125, 143, 126, 142, 143, 125, 125, 141, 142, 124, 141, 125, 123, 141, 124, 140, 141, 123, 123, 139, 140, 122, 139, 123, 121, 139, 122, 138, 139, 121, 121, 137, 138, 120, 137, 121,
                154, 171, 155, 155, 171, 172, 172, 173, 155, 155, 173, 156, 156, 173, 157, 157, 173, 174, 174, 175, 157, 157, 175, 158, 158, 175, 159, 159, 175, 176, 176, 177, 159, 159, 177, 160, 160, 177, 161, 161, 177, 178, 178, 179, 161, 161, 179, 162, 162, 179, 163, 163, 179, 180, 180, 181, 163, 163, 181, 164, 164, 181, 165, 165, 181, 182, 182, 183, 165, 165, 183, 166, 166, 183, 167, 167, 183, 184, 184, 185, 167, 167, 185, 168,
                171, 188, 189, 189, 172, 171, 172, 189, 173, 173, 189, 190, 190, 191, 173, 173, 191, 174, 174, 191, 175, 175, 191, 192, 192, 193, 175, 175, 193, 176, 176, 193, 177, 177, 193, 194, 194, 195, 177, 177, 195, 178, 178, 195, 179, 179, 195, 196, 196, 197, 179, 179, 197, 180, 180, 197, 181, 181, 197, 198, 198, 199, 181, 181, 199, 182, 182, 199, 183, 183, 199, 200, 200, 201, 183, 183, 201, 184, 184, 201, 185, 185, 201, 202,
                219, 235, 236, 218, 235, 219, 217, 235, 218, 234, 235, 217, 217, 233, 234, 216, 233, 217, 215, 233, 216, 232, 233, 215, 215, 231, 232, 214, 231, 215, 213, 231, 214, 230, 231, 213, 213, 229, 230, 212, 229, 213, 211, 229, 212, 228, 229, 211, 211, 227, 228, 210, 227, 211, 209, 227, 210, 226, 227, 209, 209, 225, 226, 208, 225, 209, 207, 225, 208, 224, 225, 207, 207, 223, 224, 206, 223, 207, 223, 206, 205, 205, 222, 223,
                201, 219, 202, 218, 219, 201, 201, 217, 218, 200, 217, 201, 199, 217, 200, 216, 217, 199, 199, 215, 216, 198, 215, 199, 197, 215, 198, 214, 215, 197, 197, 213, 214, 196, 213, 197, 195, 213, 196, 212, 213, 195, 195, 211, 212, 194, 211, 195, 193, 211, 194, 210, 211, 193, 193, 209, 210, 192, 209, 193, 191, 209, 192, 208, 209, 191, 191, 207, 208, 190, 207, 191, 189, 207, 190, 206, 207, 189, 189, 205, 206, 188, 205, 189,
                222, 239, 223, 223, 239, 240, 240, 241, 223, 223, 241, 224, 224, 241, 225, 225, 241, 242, 242, 243, 225, 225, 243, 226, 226, 243, 227, 227, 243, 244, 244, 245, 227, 227, 245, 228, 228, 245, 229, 229, 245, 246, 246, 247, 229, 229, 247, 230, 230, 247, 231, 231, 247, 248, 248, 249, 231, 231, 249, 232, 232, 249, 233, 233, 249, 250, 250, 251, 233, 233, 251, 234, 234, 251, 235, 235, 251, 252, 252, 253, 235, 235, 253, 236,
                239, 256, 257, 257, 240, 239, 240, 257, 241, 241, 257, 258, 258, 259, 241, 241, 259, 242, 242, 259, 243, 243, 259, 260, 260, 261, 243, 243, 261, 244, 244, 261, 245, 245, 261, 262, 262, 263, 245, 245, 263, 246, 246, 263, 247, 247, 263, 264, 264, 265, 247, 247, 265, 248, 248, 265, 249, 249, 265, 266, 266, 267, 249, 249, 267, 250, 250, 267, 251, 251, 267, 268, 268, 269, 251, 251, 269, 252, 252, 269, 253, 253, 269, 270,
            };

            Levels = new SgtTerrainLevel[] { level0, level1, level2, level3 };
        }