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.

91 lines
3.4 KiB

  1. /**********************************************************************************************
  2. *
  3. * raylib - Advance Game template
  4. *
  5. * Screens Functions Declarations (Init, Update, Draw, Unload)
  6. *
  7. * Copyright (c) 2014-2019 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. //#define TILE_VIEWER_MODE
  28. //----------------------------------------------------------------------------------
  29. // Types and Structures Definition
  30. //----------------------------------------------------------------------------------
  31. typedef enum GameScreen { LOGO = 0, TITLE, OPTIONS, GAMEPLAY, ENDING } GameScreen;
  32. //----------------------------------------------------------------------------------
  33. // Global Variables Definition
  34. //----------------------------------------------------------------------------------
  35. GameScreen currentScreen;
  36. Font font;
  37. Font font2;
  38. Music music;
  39. Sound fxCoin;
  40. int score;
  41. int result; // 0-Loose, 1-Win
  42. #ifdef __cplusplus
  43. extern "C" { // Prevents name mangling of functions
  44. #endif
  45. //----------------------------------------------------------------------------------
  46. // Logo Screen Functions Declaration
  47. //----------------------------------------------------------------------------------
  48. void InitLogoScreen(void);
  49. void UpdateLogoScreen(void);
  50. void DrawLogoScreen(void);
  51. void UnloadLogoScreen(void);
  52. int FinishLogoScreen(void);
  53. //----------------------------------------------------------------------------------
  54. // Title Screen Functions Declaration
  55. //----------------------------------------------------------------------------------
  56. void InitTitleScreen(void);
  57. void UpdateTitleScreen(void);
  58. void DrawTitleScreen(void);
  59. void UnloadTitleScreen(void);
  60. int FinishTitleScreen(void);
  61. //----------------------------------------------------------------------------------
  62. // Gameplay Screen Functions Declaration
  63. //----------------------------------------------------------------------------------
  64. void InitGameplayScreen(void);
  65. void UpdateGameplayScreen(void);
  66. void DrawGameplayScreen(void);
  67. void UnloadGameplayScreen(void);
  68. int FinishGameplayScreen(void);
  69. //----------------------------------------------------------------------------------
  70. // Ending Screen Functions Declaration
  71. //----------------------------------------------------------------------------------
  72. void InitEndingScreen(void);
  73. void UpdateEndingScreen(void);
  74. void DrawEndingScreen(void);
  75. void UnloadEndingScreen(void);
  76. int FinishEndingScreen(void);
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif // SCREENS_H