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.

163 lines
6.1 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. #define PLAYER_ANIM_FRAMES 7
  28. #define PLAYER_ANIM_SEQ 2
  29. //----------------------------------------------------------------------------------
  30. // Types and Structures Definition
  31. //----------------------------------------------------------------------------------
  32. typedef enum GameScreen { LOGO = 0, LOGO_RL, TITLE, ATTIC, AISLE01, AISLE02, BATHROOM, LIVINGROOM, KITCHEN, ARMORY, ENDING } GameScreen;
  33. typedef struct Door {
  34. Vector2 position;
  35. int facing;
  36. bool locked;
  37. bool selected;
  38. Rectangle frameRec;
  39. Rectangle bound;
  40. } Door;
  41. //----------------------------------------------------------------------------------
  42. // Global Variables Definition
  43. //----------------------------------------------------------------------------------
  44. GameScreen currentScreen;
  45. SpriteFont font;
  46. Texture2D doors;
  47. Sound sndDoor;
  48. Sound sndScream;
  49. #ifdef __cplusplus
  50. extern "C" { // Prevents name mangling of functions
  51. #endif
  52. //----------------------------------------------------------------------------------
  53. // Logo Screen Functions Declaration
  54. //----------------------------------------------------------------------------------
  55. void InitLogoScreen(void);
  56. void UpdateLogoScreen(void);
  57. void DrawLogoScreen(void);
  58. void UnloadLogoScreen(void);
  59. int FinishLogoScreen(void);
  60. //----------------------------------------------------------------------------------
  61. // raylib Logo Screen Functions Declaration
  62. //----------------------------------------------------------------------------------
  63. void rlInitLogoScreen(void);
  64. void rlUpdateLogoScreen(void);
  65. void rlDrawLogoScreen(void);
  66. void rlUnloadLogoScreen(void);
  67. int rlFinishLogoScreen(void);
  68. //----------------------------------------------------------------------------------
  69. // Title Screen Functions Declaration
  70. //----------------------------------------------------------------------------------
  71. void InitTitleScreen(void);
  72. void UpdateTitleScreen(void);
  73. void DrawTitleScreen(void);
  74. void UnloadTitleScreen(void);
  75. int FinishTitleScreen(void);
  76. //----------------------------------------------------------------------------------
  77. // Attic Screen Functions Declaration
  78. //----------------------------------------------------------------------------------
  79. void InitAtticScreen(void);
  80. void UpdateAtticScreen(void);
  81. void DrawAtticScreen(void);
  82. void UnloadAtticScreen(void);
  83. int FinishAtticScreen(void);
  84. //----------------------------------------------------------------------------------
  85. // Aisle01 Screen Functions Declaration
  86. //----------------------------------------------------------------------------------
  87. void InitAisle01Screen(void);
  88. void UpdateAisle01Screen(void);
  89. void DrawAisle01Screen(void);
  90. void UnloadAisle01Screen(void);
  91. int FinishAisle01Screen(void);
  92. //----------------------------------------------------------------------------------
  93. // Aisle02 Screen Functions Declaration
  94. //----------------------------------------------------------------------------------
  95. void InitAisle02Screen(void);
  96. void UpdateAisle02Screen(void);
  97. void DrawAisle02Screen(void);
  98. void UnloadAisle02Screen(void);
  99. int FinishAisle02Screen(void);
  100. //----------------------------------------------------------------------------------
  101. // Bathroom Screen Functions Declaration
  102. //----------------------------------------------------------------------------------
  103. void InitBathroomScreen(void);
  104. void UpdateBathroomScreen(void);
  105. void DrawBathroomScreen(void);
  106. void UnloadBathroomScreen(void);
  107. int FinishBathroomScreen(void);
  108. //----------------------------------------------------------------------------------
  109. // Livingroom Screen Functions Declaration
  110. //----------------------------------------------------------------------------------
  111. void InitLivingroomScreen(void);
  112. void UpdateLivingroomScreen(void);
  113. void DrawLivingroomScreen(void);
  114. void UnloadLivingroomScreen(void);
  115. int FinishLivingroomScreen(void);
  116. //----------------------------------------------------------------------------------
  117. // Kitchen Screen Functions Declaration
  118. //----------------------------------------------------------------------------------
  119. void InitKitchenScreen(void);
  120. void UpdateKitchenScreen(void);
  121. void DrawKitchenScreen(void);
  122. void UnloadKitchenScreen(void);
  123. int FinishKitchenScreen(void);
  124. //----------------------------------------------------------------------------------
  125. // Armory Screen Functions Declaration
  126. //----------------------------------------------------------------------------------
  127. void InitArmoryScreen(void);
  128. void UpdateArmoryScreen(void);
  129. void DrawArmoryScreen(void);
  130. void UnloadArmoryScreen(void);
  131. int FinishArmoryScreen(void);
  132. //----------------------------------------------------------------------------------
  133. // Ending Screen Functions Declaration
  134. //----------------------------------------------------------------------------------
  135. void InitEndingScreen(void);
  136. void UpdateEndingScreen(void);
  137. void DrawEndingScreen(void);
  138. void UnloadEndingScreen(void);
  139. int FinishEndingScreen(void);
  140. #ifdef __cplusplus
  141. }
  142. #endif
  143. #endif // SCREENS_H