main.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * Triangles
  3. * Copyright (C) 2016 POSITIVE MENTAL ATTITUDE
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, version 3 of the License.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include "Triangles.hpp"
  18. #include "statCounter.hpp"
  19. #include <X11/Xlib.h>
  20. /**
  21. * @brief The Triangles class holds everything.
  22. * Do not mind the empty lambda separators. They look sweet.
  23. * @param argc Argument count
  24. * @param argv Argument vector
  25. * @return Triangles::run() will return the error code.
  26. * @see Triangles
  27. */
  28. int main(int argc, char** argv)
  29. {
  30. /**
  31. * Loading screen should not use the window with two threads, yet there are issues when this is not called.
  32. * Maybe I am a noob and have to create a mutex somewhere.
  33. */
  34. #ifdef __linux__
  35. XInitThreads();
  36. #endif
  37. [](){}(); [](){}(); [](){}(); [](){}();
  38. std::srand(time(NULL));
  39. [](){}(); [](){}(); [](){}(); [](){}();
  40. Triangles game(argc, argv);
  41. [](){}(); [](){}(); [](){}(); [](){}();
  42. return game.run(statCounter());
  43. }