|
|
- /*
- * 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 "math/vector.hpp"
-
- /// Global configuration constants.
- namespace config {
-
- /// @name Application config
- /// @{
-
- /// Application name string.
- constexpr const char* application_name = "@PROJECT_NAME@";
-
- /// Application major version number.
- constexpr int application_version_major = @PROJECT_VERSION_MAJOR@;
-
- /// Application minor version number.
- constexpr int application_version_minor = @PROJECT_VERSION_MINOR@;
-
- /// Application patch version number.
- constexpr int application_version_patch = @PROJECT_VERSION_PATCH@;
-
- /// Application version string ("`major.minor.patch`")
- constexpr const char* application_version_string = "@PROJECT_VERSION@";
-
- /// @}
-
- /// @name Debug config
- /// @{
-
- /// Maximum number of debug logs to archive.
- constexpr std::size_t debug_log_archive_capacity = 5;
-
- /// @}
-
- /// @name OpenGL config
- /// @{
-
- /// OpenGL major version number, used when creating OpenGL contexts.
- constexpr int opengl_version_major = 3;
-
- /// OpenGL minor version number, used when creating OpenGL contexts.
- constexpr int opengl_version_minor = 3;
-
- /// Minimum number of bits in the red channel of the color attachment of the OpenGL default framebuffer.
- constexpr int opengl_min_red_size = 8;
-
- /// Minimum number of bits in the green channel of the color attachment of the OpenGL default framebuffer.
- constexpr int opengl_min_green_size = 8;
-
- /// Minimum number of bits in the blue channel of the color attachment of the OpenGL default framebuffer.
- constexpr int opengl_min_blue_size = 8;
-
- /// Minimum number of bits in the alpha channel of the color attachment of the OpenGL default framebuffer.
- constexpr int opengl_min_alpha_size = 0;
-
- /// Minimum number of bits in the depth attachment, if any, of the OpenGL default framebuffer.
- constexpr int opengl_min_depth_size = 0;
-
- /// Minimum number of bits in the stencil attachment, if any, of the OpenGL default framebuffer.
- constexpr int opengl_min_stencil_size = 0;
-
- /// @}
-
- constexpr math::vector<float, 3> global_forward = {0.0f, 0.0f, -1.0f};
- constexpr math::vector<float, 3> global_up = {0.0f, 1.0f, 0.0f};
- constexpr math::vector<float, 3> global_right = {1.0f, 0.0f, 0.0f};
-
- /// Duration of the menu fade in animation, in seconds.
- constexpr float menu_fade_in_duration = 0.25f;
-
- /// Duration of the menu fade out animation, in seconds.
- constexpr float menu_fade_out_duration = 0.125f;
-
- /// Padding of the a menu item mouseover bounds, as a percentage of the font size.
- constexpr float menu_mouseover_padding = 0.1f;
-
- /// Opacity of the menu background.
- constexpr float menu_bg_opacity = 2.0f / 4.0f;
-
- /// RGBA color of active menu items.
- constexpr math::vector<float, 4> menu_active_color{1.0f, 1.0f, 1.0f, 1.0f};
-
- /// RGBA color of inactive menu items.
- 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.
- 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.
- constexpr float quit_fade_out_duration = 0.5f;
-
- /// Duration of the fade out when a new colony is started, in seconds.
- constexpr float new_colony_fade_out_duration = 1.0f;
-
- /// Duration of the nuptial flight fade in, in seconds.
- constexpr float nuptial_flight_fade_in_duration = 5.0f;
-
- #define MATERIAL_PASS_MAX_AMBIENT_LIGHT_COUNT 1
- #define MATERIAL_PASS_MAX_POINT_LIGHT_COUNT 1
- #define MATERIAL_PASS_MAX_DIRECTIONAL_LIGHT_COUNT 3
- #define MATERIAL_PASS_MAX_SPOTLIGHT_COUNT 1
- #define MATERIAL_PASS_MAX_BONE_COUNT 64
- #define TERRAIN_PATCH_SIZE 200.0f
- #define TERRAIN_PATCH_RESOLUTION 4
- #define VEGETATION_PATCH_RESOLUTION 1
-
- } // namespace config
-
- #endif // ANTKEEPER_CONFIG_HPP
|