💿🐜 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.

84 lines
2.1 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 game {
  25. namespace state {
  26. /**
  27. * Boots the game up on construction, and down on destruction.
  28. */
  29. class boot: public game::state::base
  30. {
  31. public:
  32. /**
  33. * Boots up the game.
  34. *
  35. * @param ctx Game context.
  36. * @param argc Command line argument count.
  37. * @param argv Command line argument vector.
  38. */
  39. boot(game::context& ctx, int argc, char** argv);
  40. /**
  41. * Boots down the game.
  42. */
  43. virtual ~boot();
  44. private:
  45. void parse_arguments(int argc, char** argv);
  46. void setup_resources();
  47. void load_settings();
  48. void load_strings();
  49. void setup_window();
  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. // Command line options
  63. std::optional<bool> option_continue;
  64. std::optional<std::string> option_data;
  65. std::optional<bool> option_fullscreen;
  66. std::optional<bool> option_new_game;
  67. std::optional<bool> option_quick_start;
  68. std::optional<bool> option_reset;
  69. std::optional<int> option_v_sync;
  70. std::optional<bool> option_windowed;
  71. };
  72. } // namespace state
  73. } // namespace game
  74. #endif // ANTKEEPER_GAME_STATE_BOOT_HPP