Exemplo n.º 1
0
    private static void Editor_Maps_Map_Fog(short Index)
    {
        Lists.Structures.Map_Fog Data = Lists.Map[Index].Fog;
        Point Position;

        // Somente se necessário
        if (Data.Texture <= 0)
        {
            return;
        }
        if (!Editor_Maps.Objects.butVisualization.Checked)
        {
            return;
        }

        // Dados
        Size Textura_Tamanho = TSize(Tex_Fog[Data.Texture]);

        for (int x = -1; x <= Editor_Maps.Map_Size.Width * Globals.Grid / Textura_Tamanho.Width + 1; x++)
        {
            for (int y = -1; y <= Editor_Maps.Map_Size.Height * Globals.Grid / Textura_Tamanho.Height + 1; y++)
            {
                // Desenha a fumaça
                Position = new Point(x * Textura_Tamanho.Width + Globals.Fog_X, y * Textura_Tamanho.Height + Globals.Fog_Y);
                Render(Win_Map, Tex_Fog[Data.Texture], Editor_Maps.Zoom(new Rectangle(Position, Textura_Tamanho)), CColor(255, 255, 255, Data.Alpha));
            }
        }
    }
Exemplo n.º 2
0
Arquivo: Map.cs Projeto: Kukks/CryBits
    private static void Map_Fog()
    {
        Lists.Structures.Map_Fog Data = Lists.Map.Fog;
        Size Texture_Size             = TSize(Tex_Fog[Data.Texture]);

        // Previne erros
        if (Data.Texture <= 0)
        {
            return;
        }

        // Desenha a fumaça
        for (int x = -1; x <= Lists.Map.Width * Game.Grid / Texture_Size.Width + 1; x++)
        {
            for (int y = -1; y <= Lists.Map.Height * Game.Grid / Texture_Size.Height + 1; y++)
            {
                Render(Tex_Fog[Data.Texture], new Point(x * Texture_Size.Width + Map.Fog_X, y * Texture_Size.Height + Map.Fog_Y), new SFML.Graphics.Color(255, 255, 255, Data.Alpha));
            }
        }
    }