💿🐜 Antkeeper source code https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. /*
  2. * Copyright (C) 2023 Christopher J. Howard
  3. *
  4. * This file is part of Antkeeper source code.
  5. *
  6. * Antkeeper source code is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Antkeeper source code is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef ANTKEEPER_GAME_STATE_BOOT_HPP
  20. #define ANTKEEPER_GAME_STATE_BOOT_HPP
  21. #include "game/state/base.hpp"
  22. #include "game/context.hpp"
  23. #include <optional>
  24. namespace state {
  25. /**
  26. * Boots the game up on construction, and down on destruction.
  27. */
  28. class boot: public ::state::base
  29. {
  30. public:
  31. /**
  32. * Boots up the game.
  33. *
  34. * @param ctx Game context.
  35. * @param argc Command line argument count.
  36. * @param argv Command line argument vector.
  37. */
  38. boot(::context& ctx, int argc, const char* const* argv);
  39. /**
  40. * Boots down the game.
  41. */
  42. virtual ~boot();
  43. private:
  44. void parse_options(int argc, const char* const* argv);
  45. void setup_resources();
  46. void load_settings();
  47. void setup_window();
  48. void setup_input();
  49. void load_strings();
  50. void setup_rendering();
  51. void setup_audio();
  52. void setup_scenes();
  53. void setup_animation();
  54. void setup_entities();
  55. void setup_systems();
  56. void setup_controls();
  57. void setup_ui();
  58. void setup_debugging();
  59. void setup_loop();
  60. void loop();
  61. void shutdown_audio();
  62. };
  63. } // namespace state
  64. #endif // ANTKEEPER_GAME_STATE_BOOT_HPP