Dziuala 3 strzlowiec
This commit is contained in:
11
main.cpp
11
main.cpp
@@ -6,6 +6,13 @@
|
||||
int main()
|
||||
{
|
||||
std::clog << "Game started\n";
|
||||
sf::Texture playerTexture, playerBulletTexture, playerRocketTexture;
|
||||
if (!playerTexture.loadFromFile("../assets/ship/Dreadnought-Base.png") ||
|
||||
!playerBulletTexture.loadFromFile("../assets/img/bullets/bullet_pink.png") ||
|
||||
!playerRocketTexture.loadFromFile("../assets/img/rockets/Rocket_111.png")) {
|
||||
std::cerr << "Failed to load player textures!" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
sf::RenderWindow mainWindow(sf::VideoMode(600, 800), "LotoStatek");
|
||||
mainWindow.setVerticalSyncEnabled(true);
|
||||
mainWindow.setFramerateLimit(60);
|
||||
@@ -14,7 +21,9 @@ int main()
|
||||
icon.loadFromFile("../assets/img/icon/ikonka.png");
|
||||
mainWindow.setIcon(128, 128, icon.getPixelsPtr());
|
||||
|
||||
Plansza plansza(mainWindow.getSize().y, mainWindow.getSize().x, &mainWindow);
|
||||
|
||||
|
||||
Plansza plansza(mainWindow.getSize().y, mainWindow.getSize().x, &mainWindow,playerTexture, playerBulletTexture, playerRocketTexture);
|
||||
|
||||
while (mainWindow.isOpen()) {
|
||||
mainWindow.clear();
|
||||
|
||||
Reference in New Issue
Block a user