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.

86 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 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, GAMEPLAY, ENDING } GameScreen;
  31. //----------------------------------------------------------------------------------
  32. // Global Variables Definition
  33. //----------------------------------------------------------------------------------
  34. GameScreen currentScreen;
  35. SpriteFont font;
  36. Music music;
  37. int endingStatus; // 1 - Win, 2 - Lose
  38. //char *sampleFilename;
  39. #ifdef __cplusplus
  40. extern "C" { // Prevents name mangling of functions
  41. #endif
  42. //----------------------------------------------------------------------------------
  43. // Logo Screen Functions Declaration
  44. //----------------------------------------------------------------------------------
  45. void InitLogoScreen(void);
  46. void UpdateLogoScreen(void);
  47. void DrawLogoScreen(void);
  48. void UnloadLogoScreen(void);
  49. int FinishLogoScreen(void);
  50. //----------------------------------------------------------------------------------
  51. // Title Screen Functions Declaration
  52. //----------------------------------------------------------------------------------
  53. void InitTitleScreen(void);
  54. void UpdateTitleScreen(void);
  55. void DrawTitleScreen(void);
  56. void UnloadTitleScreen(void);
  57. int FinishTitleScreen(void);
  58. //----------------------------------------------------------------------------------
  59. // Gameplay Screen Functions Declaration
  60. //----------------------------------------------------------------------------------
  61. void InitGameplayScreen(void);
  62. void UpdateGameplayScreen(void);
  63. void DrawGameplayScreen(void);
  64. void UnloadGameplayScreen(void);
  65. int FinishGameplayScreen(void);
  66. //----------------------------------------------------------------------------------
  67. // Ending Screen Functions Declaration
  68. //----------------------------------------------------------------------------------
  69. void InitEndingScreen(void);
  70. void UpdateEndingScreen(void);
  71. void DrawEndingScreen(void);
  72. void UnloadEndingScreen(void);
  73. int FinishEndingScreen(void);
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #endif // SCREENS_H