main.cpp 842 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include <ctime>
  2. #include <iostream>
  3. #include <Starlight.hpp>
  4. /**
  5. * @brief I can't code. Really. Don't look at this.
  6. * I code bad codes, and this one is exceptionally bad.
  7. * And bad c++ codes are very bad.
  8. * Really.
  9. * Git out.
  10. * @return segfaults
  11. */
  12. int main()
  13. {
  14. std::cout << "Hello, world!" << std::endl;
  15. ContextSettings settings;
  16. RenderWindow window;
  17. Music music;
  18. settings.antialiasingLevel = 8;
  19. window.create(VideoMode(768, 768, 32), "one room arena", Style::Titlebar | Style::Close, settings);
  20. window.setVerticalSyncEnabled(true);
  21. music.openFromFile("data/music.ogg");
  22. music.setLoop(true);
  23. music.play();
  24. std::srand(std::time(nullptr));
  25. bool keepRunning = false;
  26. do {
  27. Player::totalScore = 0;
  28. keepRunning = false;
  29. Starlight gaem(&window, &keepRunning);
  30. gaem.run();
  31. } while(keepRunning);
  32. return 0;
  33. }