Replaced getWidth/getHeight with getSize in sf::Texture and sf::Image

This commit is contained in:
Laurent Gomila 2012-03-31 22:37:13 +02:00
parent b2f3787db1
commit 17e6a45a90
12 changed files with 127 additions and 180 deletions

View file

@ -81,7 +81,7 @@ INT WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, INT)
return EXIT_FAILURE;
sf::Sprite sprite1(texture1);
sf::Sprite sprite2(texture2);
sprite1.setOrigin(texture1.getWidth() / 2.f, texture1.getHeight() / 2.f);
sprite1.setOrigin(sf::Vector2f(texture1.getSize()) / 2.f);
sprite1.setPosition(sprite1.getOrigin());
// Create a clock for measuring elapsed time