1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
bool Engine::invoke(int screenwidth, int screenheight)
{
// Initialize all the variables/things you normally would have to do
sf::Color rect2color(0, 0, 255, 255);
sf::Color rect3color(0, 0, 255, 200);
rect1.setPosition(0, 0);
rect1.setFillColor(sf::Color::Red);
rect1.setSize(sf::Vector2f(40, 40));
rect2.setPosition(0, 0);
rect2.setFillColor(rect2color);
rect2.setSize(sf::Vector2f(400, 300));
rect3.setFillColor(rect3color); /* <--- It says 'This is the next statement to execute when this thread ret
urns from the current function.*/
rect3.setSize(sf::Vector2f(400, 20));
rect3.setPosition(0, 0);
moveSpeed = 7;
engineDebug.invoke("engine_debug.txt", true);
mainWindow.create(sf::VideoMode(screenwidth, screenheight), getVerNumber());
mainWindow.setVerticalSyncEnabled(true);
// Start Main Loop
mainLoop();
return true;
}
|