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.

72 lines
2.4 KiB

пре 7 година
  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 MONSTER_H
  26. #define MONSTER_H
  27. #define MONSTER_ANIM_FRAMES 7
  28. #define MONSTER_ANIM_SEQ 2
  29. //----------------------------------------------------------------------------------
  30. // Types and Structures Definition
  31. //---------------------------------------------------------------------------------
  32. typedef struct Monster {
  33. Vector2 position;
  34. Texture2D texture;
  35. Rectangle bounds;
  36. Rectangle frameRec;
  37. Color color;
  38. int framesCounter;
  39. int currentFrame;
  40. int currentSeq;
  41. int numFrames;
  42. bool active;
  43. bool selected;
  44. bool spooky;
  45. } Monster;
  46. //----------------------------------------------------------------------------------
  47. // Global Variables Definition
  48. //----------------------------------------------------------------------------------
  49. #ifdef __cplusplus
  50. extern "C" { // Prevents name mangling of functions
  51. #endif
  52. //----------------------------------------------------------------------------------
  53. // Monster Functions Declaration
  54. //----------------------------------------------------------------------------------
  55. void UpdateMonster(Monster *monster);
  56. void DrawMonster(Monster monster, int scroll);
  57. void UnloadMonster(Monster monster);
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif // SCREENS_H