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.

94 lines
3.7 KiB

  1. /**********************************************************************************************
  2. *
  3. * raylib - Advance Game template
  4. *
  5. * Screens Functions Declarations (Init, Update, Draw, Unload)
  6. *
  7. * Copyright (c) 2014-2018 Ramon Santamaria (@raysan5)
  8. *
  9. * This software is provided "as-is", without any express or implied warranty. In no event
  10. * will the authors be held liable for any damages arising from the use of this software.
  11. *
  12. * Permission is granted to anyone to use this software for any purpose, including commercial
  13. * applications, and to alter it and redistribute it freely, subject to the following restrictions:
  14. *
  15. * 1. The origin of this software must not be misrepresented; you must not claim that you
  16. * wrote the original software. If you use this software in a product, an acknowledgment
  17. * in the product documentation would be appreciated but is not required.
  18. *
  19. * 2. Altered source versions must be plainly marked as such, and must not be misrepresented
  20. * as being the original software.
  21. *
  22. * 3. This notice may not be removed or altered from any source distribution.
  23. *
  24. **********************************************************************************************/
  25. #ifndef SCREENS_H
  26. #define SCREENS_H
  27. //----------------------------------------------------------------------------------
  28. // Types and Structures Definition
  29. //----------------------------------------------------------------------------------
  30. typedef enum GameScreen { LOGO = 0, TITLE, OPTIONS, GAMEPLAY, ENDING } GameScreen;
  31. //----------------------------------------------------------------------------------
  32. // Global Variables Definition
  33. //----------------------------------------------------------------------------------
  34. GameScreen currentScreen;
  35. Font font;
  36. Music music;
  37. Sound fxCoin;
  38. #ifdef __cplusplus
  39. extern "C" { // Prevents name mangling of functions
  40. #endif
  41. //----------------------------------------------------------------------------------
  42. // Logo Screen Functions Declaration
  43. //----------------------------------------------------------------------------------
  44. void InitLogoScreen(void);
  45. void UpdateLogoScreen(void);
  46. void DrawLogoScreen(void);
  47. void UnloadLogoScreen(void);
  48. int FinishLogoScreen(void);
  49. //----------------------------------------------------------------------------------
  50. // Title Screen Functions Declaration
  51. //----------------------------------------------------------------------------------
  52. void InitTitleScreen(void);
  53. void UpdateTitleScreen(void);
  54. void DrawTitleScreen(void);
  55. void UnloadTitleScreen(void);
  56. int FinishTitleScreen(void);
  57. //----------------------------------------------------------------------------------
  58. // Options Screen Functions Declaration
  59. //----------------------------------------------------------------------------------
  60. void InitOptionsScreen(void);
  61. void UpdateOptionsScreen(void);
  62. void DrawOptionsScreen(void);
  63. void UnloadOptionsScreen(void);
  64. int FinishOptionsScreen(void);
  65. //----------------------------------------------------------------------------------
  66. // Gameplay Screen Functions Declaration
  67. //----------------------------------------------------------------------------------
  68. void InitGameplayScreen(void);
  69. void UpdateGameplayScreen(void);
  70. void DrawGameplayScreen(void);
  71. void UnloadGameplayScreen(void);
  72. int FinishGameplayScreen(void);
  73. //----------------------------------------------------------------------------------
  74. // Ending Screen Functions Declaration
  75. //----------------------------------------------------------------------------------
  76. void InitEndingScreen(void);
  77. void UpdateEndingScreen(void);
  78. void DrawEndingScreen(void);
  79. void UnloadEndingScreen(void);
  80. int FinishEndingScreen(void);
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84. #endif // SCREENS_H