Created
January 29, 2017 11:54
-
-
Save PoetaKodu/f42ab545c6adfd9d31868c9fe8c44006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void draw_all(sf::RenderWindow &window, std::vector<sf::Sprite*> &sprites) | |
{ | |
for(auto *sprite : sprites) | |
window.draw(*sprite); | |
} | |
int main() | |
{ | |
sf::RenderWindow window; | |
std::vector <sf::Sprite*> gameSprites; | |
// troche kodu | |
while(window.isOpen()) | |
{ | |
// troche więcej kodu | |
draw_all(window, gameSprites); | |
window.display(); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment