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

/*
* Copyright (C) 2023 Christopher J. Howard
*
* This file is part of Antkeeper source code.
*
* Antkeeper source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Antkeeper source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ANTKEEPER_GAME_WORLD_HPP
#define ANTKEEPER_GAME_WORLD_HPP
#include "game/game.hpp"
#include "game/ecoregion.hpp"
/// World creation and manipulation functions.
namespace world {
/// Creates the cosmos.
void cosmogenesis(::game& ctx);
/// Creates the observer.
void create_observer(::game& ctx);
/**
* Sets the location of the observer.
*
* @param ctx Game context.
* @param elevation Elevation, in meters.
* @param latitude Latitude, in radians.
* @param longitude Longitude, in radians.
*/
void set_location(::game& ctx, double elevation, double latitude, double longitude);
/**
* Sets the current time.
*
* @param ctx Game context.
* @param t UT1 time, in days.
*/
void set_time(::game& ctx, double t);
/**
* Sets the current time.
*
* @param ctx Game context.
* @param year Astronomical year numbering. 1 BC is `0`, 2 BC is `-1`.
* @param month Month number on `[1, 12]`.
* @param day Day number on `[1, 31]`.
* @param hour Hour number on `[0, 23]`.
* @param minute Minute number on `[0, 59]`.
* @param second Fractional second on `[0.0, 60.0)`.
*/
void set_time(::game& ctx, int year, int month, int day, int hour, int minute, double second);
/**
* Sets rate at which time passes.
*
* @param ctx Game context.
* @param scale Time scale.
*/
void set_time_scale(::game& ctx, double scale);
/**
* Enters a ecoregion.
*
* @param ctx Game context.
* @param ecoregion Ecoregion to enter.
*/
void enter_ecoregion(::game& ctx, const ecoregion& ecoregion);
void switch_scene(::game& ctx);
} // namespace menu
#endif // ANTKEEPER_GAME_WORLD_HPP