GameDetails.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * This source file is part of RmlUi, the HTML/CSS Interface Middleware
  3. *
  4. * For the latest information, see http://github.com/mikke89/RmlUi
  5. *
  6. * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
  7. * Copyright (c) 2019-2023 The RmlUi Team, and contributors
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a copy
  10. * of this software and associated documentation files (the "Software"), to deal
  11. * in the Software without restriction, including without limitation the rights
  12. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. * copies of the Software, and to permit persons to whom the Software is
  14. * furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included in
  17. * all copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25. * THE SOFTWARE.
  26. *
  27. */
  28. #include "GameDetails.h"
  29. static GameDetails::Difficulty difficulty = GameDetails::EASY;
  30. static Rml::Colourb colour = Rml::Colourb(255, 0, 0);
  31. static int score = -1;
  32. static int wave = 0;
  33. static bool paused = false;
  34. static GameDetails::GraphicsQuality graphics_quality = GameDetails::OK;
  35. static bool reverb = true;
  36. static bool spatialisation = false;
  37. GameDetails::GameDetails() {}
  38. GameDetails::~GameDetails() {}
  39. void GameDetails::SetDifficulty(Difficulty _difficulty)
  40. {
  41. difficulty = _difficulty;
  42. }
  43. GameDetails::Difficulty GameDetails::GetDifficulty()
  44. {
  45. return difficulty;
  46. }
  47. void GameDetails::SetDefenderColour(const Rml::Colourb& _colour)
  48. {
  49. colour = _colour;
  50. }
  51. const Rml::Colourb& GameDetails::GetDefenderColour()
  52. {
  53. return colour;
  54. }
  55. void GameDetails::SetScore(int _score)
  56. {
  57. score = _score;
  58. }
  59. void GameDetails::ResetScore()
  60. {
  61. score = -1;
  62. }
  63. int GameDetails::GetScore()
  64. {
  65. return score;
  66. }
  67. void GameDetails::SetWave(int _wave)
  68. {
  69. wave = _wave;
  70. }
  71. int GameDetails::GetWave()
  72. {
  73. return wave;
  74. }
  75. void GameDetails::SetPaused(bool _paused)
  76. {
  77. paused = _paused;
  78. }
  79. bool GameDetails::GetPaused()
  80. {
  81. return paused;
  82. }
  83. void GameDetails::SetGraphicsQuality(GraphicsQuality quality)
  84. {
  85. graphics_quality = quality;
  86. }
  87. GameDetails::GraphicsQuality GameDetails::GetGraphicsQuality()
  88. {
  89. return graphics_quality;
  90. }
  91. void GameDetails::SetReverb(bool enabled)
  92. {
  93. reverb = enabled;
  94. }
  95. bool GameDetails::GetReverb()
  96. {
  97. return reverb;
  98. }
  99. void GameDetails::Set3DSpatialisation(bool enabled)
  100. {
  101. spatialisation = enabled;
  102. }
  103. bool GameDetails::Get3DSpatialisation()
  104. {
  105. return spatialisation;
  106. }