void Engine::draw_sprite(OBJECT* obj, std::string _url)
{
sf::Texture texture;
texture.loadFromFile(_url); // передавая на прямую - всё работает.
}
// SFML
sf::Texture texture;
texture.loadFromFile(obj->url); // void draw(OBJECT* obj)
//
OBJECT* GetNewBrick()
{
++brickLength;
brick = (OBJECT*)realloc(brick, sizeof(*brick) * brickLength); ///
return brick + brickLength - 1;
}
///
for (int y = 0; y < mapHeight; ++y)
for (int x = 0; x < mapWidth; ++x)
{
if (map[y * mapWidth + x] == 35) // "#" == 35 --> от wstring
init_obj(GetNewBrick(), "ground.png"); // brick + n, url;
}