config.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* License Notice:
  2. **
  3. ** This program is free software: you can redistribute it and/or modify
  4. ** it under the terms of the GNU General Public License as published by
  5. ** the Free Software Foundation, either version 3 of the License, or
  6. ** (at your option) any later version.
  7. ** This program is distributed in the hope that it will be useful,
  8. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ** GNU General Public License for more details.
  11. ** You should have received a copy of the GNU General Public License
  12. ** along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. */
  14. /**
  15. * @file config.h
  16. * @author TooOld2Rock'nRoll
  17. * @date 2023/09/22
  18. * @brief Global information about the engine environment initial state.
  19. * @warning Changing any of the following values requires the library to be recompiled to take effect!
  20. * @todo Most of these values should go to a config.xml file, so it can change without recompiling the library.
  21. */
  22. #ifndef _INPUT_H_
  23. #define _INPUT_H_
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /*---- Definitions ----*/
  28. //THIS IS VERY BAD!!! SHOULD NOT EXIST!!!!
  29. #define GROUND_LEVEL_TEMP 1000
  30. #define GRAVITY_TEMP 1300 //pixels/sec
  31. //END OF VERY BAD!!!!
  32. /**@{ Library */
  33. ///Unable/Disable debug messages, options are [<b>true</b> | <b>false</b>]
  34. #define ENABLE_DEBUG true
  35. ///Which debug message level to show, options are [VERBOSE < TRACE < INFO < WARNING < ERROR]
  36. #define DEBUG_LEVEL INFO
  37. ///Unable/Disable OpenGl error messages, options are [<b>true</b> | <b>false</b>]
  38. #define ENABLE_OPENGL_DEBUG true
  39. ///Which debug message level to show, options are [GL_DEBUG_SEVERITY_NOTIFICATION < GL_DEBUG_SEVERITY_LOW < GL_DEBUG_SEVERITY_MEDIUM < GL_DEBUG_SEVERITY_HIGH]
  40. #define DEBUG_OPENGL_LEVEL GL_DEBUG_SEVERITY_LOW
  41. ///The key to load and access references to the library basic Shader
  42. #define BASIC_SHADER_KEY "arcade_fighter_basic_shader"
  43. ///The key to load and access references to the library default Camera view
  44. #define DEFAULT_CAMERA_KEY "arcade_fighter_default_camera"
  45. ///Default game loop style to use, options are [FIXED | VARIABLE | SEMI_FIXED | CHUNKY]
  46. #define GAME_LOOP_STYLE ArcadeFighter::delta_time_style_e::FIXED
  47. ///Bound the game rendering <b>F</b>rames <b>Per</b> <b>S</b>econd to a set value. (ignored for VARIABLE game loop style)
  48. #define GAME_MAX_FPS 30
  49. ///Bound the game loop logic handling to a set FPS. (only valid for CHUNKY game loop style)
  50. #define GAME_LOGIC_FPS 120
  51. ///The minimum number of listeners the library expects to exist.
  52. ///Recommended at least 4 spaces for listeners [API & Level & Player_1 & Player_2]
  53. #define MIN_EVENT_LISTENERS 4
  54. /**@}*/
  55. /**@{ Window */
  56. ///The decoration text of the window.
  57. #define WINDOW_TITLE "Arcade Fighter Library for Linux :D"
  58. ///Width of the program window when started, if no other flags used.
  59. #define START_WINDOW_WIDTH 460
  60. ///Height of the program window when started, if no other flags used.
  61. #define START_WINDOW_HEIGHT 380
  62. /**@}*/
  63. /**@{ Graphics */
  64. ///The target major version for OpenGl Core
  65. #define OPENGL_TARGET_MAJOR_VERSION 4
  66. ///The target minor version for OpenGl Core
  67. #define OPENGL_TARGET_MINOR_VERSION 3
  68. /**@}*/
  69. /**@{ Audio */
  70. ///A or list of audio file formats SDL_Mixer is expected to handle besides wave.
  71. ///@see https://wiki.libsdl.org/SDL2_mixer/MIX_InitFlags
  72. #define AUDIO_SUPPORTED_FORMATS MIX_INIT_MP3 | MIX_INIT_FLAC
  73. /**@}*/
  74. /**@{ Players */
  75. ///The maximum number of players (human or otherwise) the game will be able to handle concurrently.
  76. #define PLAYERS_COUNT 2
  77. /**@}*/
  78. /*---- Typedefs ----*/
  79. /*---- Enumerations ----*/
  80. /*---- Structures ----*/
  81. /*---- Global Variables ----*/
  82. /*---- Macros ----*/
  83. #ifdef __cplusplus
  84. } //extern "C"
  85. #endif
  86. #endif /* _INPUT_H_ */