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

145 lines
4.8 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_CONFIG_HPP
#define ANTKEEPER_CONFIG_HPP
// Disable trace message logging on release builds
#if defined(NDEBUG)
#define ANTKEEPER_DEBUG_LOG_MIN_MESSAGE_SEVERITY 1
#else
#define ANTKEEPER_DEBUG_LOG_MIN_MESSAGE_SEVERITY 0
#endif
#include <engine/math/vector.hpp>
#include <engine/color/aces.hpp>
/// Global configuration constants.
namespace config {
/// @name Application config
/// @{
/// Application name string.
inline constexpr const char* application_name = "@APPLICATION_NAME@";
/// Application slug string.
inline constexpr const char* application_slug = "@APPLICATION_SLUG@";
/// Application major version number.
inline constexpr int application_version_major = @APPLICATION_VERSION_MAJOR@;
/// Application minor version number.
inline constexpr int application_version_minor = @APPLICATION_VERSION_MINOR@;
/// Application patch version number.
inline constexpr int application_version_patch = @APPLICATION_VERSION_PATCH@;
/// Application version string ("`major.minor.patch`")
inline constexpr const char* application_version_string = "@APPLICATION_VERSION@";
/// @}
/// @name Debug config
/// @{
/// Maximum number of debug logs to archive.
inline constexpr std::size_t debug_log_archive_capacity = 5;
/// @}
/// @name OpenGL config
/// @{
/// OpenGL major version number, used when creating OpenGL contexts.
inline constexpr int opengl_version_major = 4;
/// OpenGL minor version number, used when creating OpenGL contexts.
inline constexpr int opengl_version_minor = 6;
/// Minimum number of bits in the red channel of the color attachment of the OpenGL default framebuffer.
inline constexpr int opengl_min_red_size = 8;
/// Minimum number of bits in the green channel of the color attachment of the OpenGL default framebuffer.
inline constexpr int opengl_min_green_size = 8;
/// Minimum number of bits in the blue channel of the color attachment of the OpenGL default framebuffer.
inline constexpr int opengl_min_blue_size = 8;
/// Minimum number of bits in the alpha channel of the color attachment of the OpenGL default framebuffer.
inline constexpr int opengl_min_alpha_size = 0;
/// Minimum number of bits in the depth attachment, if any, of the OpenGL default framebuffer.
inline constexpr int opengl_min_depth_size = 0;
/// Minimum number of bits in the stencil attachment, if any, of the OpenGL default framebuffer.
inline constexpr int opengl_min_stencil_size = 0;
/// @}
/// @name Rendering config
/// @{
/**
* Scene-linear color space.
*
* @tparam T Scalar type.
*/
template <class T>
inline constexpr color::rgb_color_space<T> scene_linear_color_space = color::aces_ap1<T>;
/// @}
inline constexpr math::vector<float, 3> global_forward = {0.0f, 0.0f, -1.0f};
inline constexpr math::vector<float, 3> global_up = {0.0f, 1.0f, 0.0f};
inline constexpr math::vector<float, 3> global_right = {1.0f, 0.0f, 0.0f};
/// Duration of the menu fade in animation, in seconds.
inline constexpr float menu_fade_in_duration = 0.25f;
/// Duration of the menu fade out animation, in seconds.
inline constexpr float menu_fade_out_duration = 0.125f;
/// Padding of the a menu item mouseover bounds, as a percentage of the font size.
inline constexpr float menu_mouseover_padding = 0.1f;
/// Opacity of the menu background.
inline constexpr float menu_bg_opacity = 2.0f / 4.0f;
/// RGBA color of active menu items.
inline constexpr math::vector<float, 4> menu_active_color{1.0f, 1.0f, 1.0f, 1.0f};
/// RGBA color of inactive menu items.
inline constexpr math::vector<float, 4> menu_inactive_color{1.0f, 1.0f, 1.0f, 0.5f};
/// Duration of the title screen fade in, in seconds.
inline constexpr float title_fade_in_duration = 1.0f;
/// Duration of the fade out when quitting the game or returning to the main menu, in seconds.
inline constexpr float quit_fade_out_duration = 0.5f;
/// Duration of the fade out when a new colony is started, in seconds.
inline constexpr float new_colony_fade_out_duration = 1.0f;
/// Duration of the nuptial flight fade in, in seconds.
inline constexpr float nuptial_flight_fade_in_duration = 5.0f;
} // namespace config
#endif // ANTKEEPER_CONFIG_HPP