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

87 lines
2.3 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_WORLD_HPP
  20. #define ANTKEEPER_GAME_WORLD_HPP
  21. #include "game/game.hpp"
  22. #include "game/ecoregion.hpp"
  23. /// World creation and manipulation functions.
  24. namespace world {
  25. /// Creates the cosmos.
  26. void cosmogenesis(::game& ctx);
  27. /// Creates the observer.
  28. void create_observer(::game& ctx);
  29. /**
  30. * Sets the location of the observer.
  31. *
  32. * @param ctx Game context.
  33. * @param elevation Elevation, in meters.
  34. * @param latitude Latitude, in radians.
  35. * @param longitude Longitude, in radians.
  36. */
  37. void set_location(::game& ctx, double elevation, double latitude, double longitude);
  38. /**
  39. * Sets the current time.
  40. *
  41. * @param ctx Game context.
  42. * @param t UT1 time, in days.
  43. */
  44. void set_time(::game& ctx, double t);
  45. /**
  46. * Sets the current time.
  47. *
  48. * @param ctx Game context.
  49. * @param year Astronomical year numbering. 1 BC is `0`, 2 BC is `-1`.
  50. * @param month Month number on `[1, 12]`.
  51. * @param day Day number on `[1, 31]`.
  52. * @param hour Hour number on `[0, 23]`.
  53. * @param minute Minute number on `[0, 59]`.
  54. * @param second Fractional second on `[0.0, 60.0)`.
  55. */
  56. void set_time(::game& ctx, int year, int month, int day, int hour, int minute, double second);
  57. /**
  58. * Sets rate at which time passes.
  59. *
  60. * @param ctx Game context.
  61. * @param scale Time scale.
  62. */
  63. void set_time_scale(::game& ctx, double scale);
  64. /**
  65. * Enters a ecoregion.
  66. *
  67. * @param ctx Game context.
  68. * @param ecoregion Ecoregion to enter.
  69. */
  70. void enter_ecoregion(::game& ctx, const ecoregion& ecoregion);
  71. void switch_scene(::game& ctx);
  72. } // namespace menu
  73. #endif // ANTKEEPER_GAME_WORLD_HPP