<commit_before>#include "TextureLoader.h"


TextureLoader::TextureLoader(std::string const & url) :
m_objectsTexture(new sf::Texture()),
m_floorTexture(new sf::Texture()),
m_characterTexture(new sf::Texture())
{
	loadTexture(url);
}


TextureLoader::~TextureLoader()
{
	delete(m_floorTexture);
	delete(m_objectsTexture);
	delete(m_characterTexture);
}

sf::Texture * TextureLoader::getFloorTexture() const 
{
	return m_floorTexture;
}

sf::Texture * TextureLoader::getObjectsTexture() const
{
	return m_objectsTexture;
}

sf::Texture * TextureLoader::getCharacterTexture() const 
{
	return m_characterTexture;
}

//On passe l'url du dossier de Textures
void TextureLoader::loadTexture(std::string const & url)
{
	if(!m_floorTexture->loadFromFile((url + "floor/tileset.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the floor" << std::endl;
        throw LoadingErrorException;
    }

	if(!m_objectsTexture->loadFromFile((url + "mobilier/tileset.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the objects" << std::endl;
        throw LoadingErrorException;
    }
	
	if(!m_characterTexture->loadFromFile((url + "character/.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the character" << std::endl;
        throw LoadingErrorException;
    }
}<commit_msg>tileset for spooky<commit_after>#include "TextureLoader.h"


TextureLoader::TextureLoader(std::string const & url) :
m_objectsTexture(new sf::Texture()),
m_floorTexture(new sf::Texture()),
m_characterTexture(new sf::Texture())
{
	loadTexture(url);
}


TextureLoader::~TextureLoader()
{
	delete(m_floorTexture);
	delete(m_objectsTexture);
	delete(m_characterTexture);
}

sf::Texture * TextureLoader::getFloorTexture() const 
{
	return m_floorTexture;
}

sf::Texture * TextureLoader::getObjectsTexture() const
{
	return m_objectsTexture;
}

sf::Texture * TextureLoader::getCharacterTexture() const 
{
	return m_characterTexture;
}

//On passe l'url du dossier de Textures
void TextureLoader::loadTexture(std::string const & url)
{
	if(!m_floorTexture->loadFromFile((url + "floor/tileset.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the floor" << std::endl;
        throw LoadingErrorException;
    }

	if(!m_objectsTexture->loadFromFile((url + "mobilier/tileset.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the objects" << std::endl;
        throw LoadingErrorException;
    }
	
	if(!m_characterTexture->loadFromFile((url + "spooky/sprite.png").c_str()))
    {
		std::cerr << "Error when loading the texture of the character" << std::endl;
        throw LoadingErrorException;
    }
}
{'fraction_non_alphanumeric': 0.14339339339339338, 'fraction_numerical': 0.0, 'mean_word_length': 5.360381861575179, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2848742', 'n_tokens_mistral': 878, 'n_tokens_neox': 854, 'n_words': 170}