2
0

GameDetails.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * This source file is part of libRocket, the HTML/CSS Interface Middleware
  3. *
  4. * For the latest information, see http://www.librocket.com
  5. *
  6. * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in
  16. * all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. *
  26. */
  27. #ifndef ROCKETINVADERSGAMEDETAILS_H
  28. #define ROCKETINVADERSGAMEDETAILS_H
  29. #include <Rocket/Core/Types.h>
  30. /**
  31. @author Peter Curry
  32. */
  33. class GameDetails
  34. {
  35. public:
  36. enum Difficulty { EASY, HARD };
  37. /// Sets the game difficulty.
  38. /// @param[in] difficulty The new game difficulty.
  39. static void SetDifficulty(Difficulty difficulty);
  40. /// Returns the game difficulty.
  41. /// @return The current game difficulty.
  42. static Difficulty GetDifficulty();
  43. /// Sets the colour of the player's ship.
  44. /// @param[in] colour The new ship colour.
  45. static void SetDefenderColour(const Rocket::Core::Colourb& colour);
  46. /// Returns the player's ship colour.
  47. /// @return The colour of the player's ship.
  48. static const Rocket::Core::Colourb& GetDefenderColour();
  49. /// Sets the score the player achieved in the last game.
  50. /// @param[in] score The player's score.
  51. static void SetScore(int score);
  52. /// Resets the player's score.
  53. static void ResetScore();
  54. /// Returns the score the player achieved in the last game.
  55. /// @return The player's score.
  56. static int GetScore();
  57. /// Sets the current wave number
  58. /// @param[in] wave The wave number
  59. static void SetWave(int wave);
  60. /// Get the current wave number
  61. /// @return The wave number
  62. static int GetWave();
  63. /// Sets the pauses state of the game
  64. /// @param[in] paused Whether the game is paused or not
  65. static void SetPaused(bool paused);
  66. /// Gets if the game is paused or not
  67. /// @return True if the game is paused, false otherwise.
  68. static bool GetPaused();
  69. enum GraphicsQuality { GOOD, OK, BAD };
  70. /// Sets the quality of the graphics used in-game.
  71. /// @param[in] quality The new graphics quality.
  72. static void SetGraphicsQuality(GraphicsQuality quality);
  73. /// Returns the quality of the graphics to use in-game.
  74. /// @return The currently-set graphical quality.
  75. static GraphicsQuality GetGraphicsQuality();
  76. /// Enables or disables reverb.
  77. /// @param[in] enabled True to enable reverb, false to disable.
  78. static void SetReverb(bool enabled);
  79. /// Returns the current state of reverb.
  80. /// @return The current reverb state.
  81. static bool GetReverb();
  82. /// Enables or disables 3D spatialisation in the audio engine.
  83. /// @param[in] enabled True to enable spatialisation, false to disable.
  84. static void Set3DSpatialisation(bool enabled);
  85. /// Returns the current state of audio spatialisation.
  86. /// @return The current audio spatialisation state.
  87. static bool Get3DSpatialisation();
  88. private:
  89. GameDetails();
  90. ~GameDetails();
  91. };
  92. #endif