Beispiel #1
0
void ImageManager::AbstractLoadFromFile(sf::Image &image, std::string name, bool transparency, sf::Color color)
{
    if (!image.LoadFromFile(name))
        std::cerr << "Impossible d'ouvrir le fichier " << name << " !" << std::endl;

    if(transparency)
    {
        image.SetSmooth(false);
        image.CreateMaskFromColor(color);
    }
}