Advertisement
ananasa

entite.h

Apr 4th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.84 KB | None | 0 0
  1. #ifndef FONCTIONS_H_
  2. #define FONCTIONS_H_
  3.  
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <SDL/SDL.h>
  7. #include <SDL/SDL_image.h>
  8. #include <SDL/SDL_mixer.h>
  9. #include <SDL/SDL_ttf.h>
  10. #include <time.h>
  11.  
  12. #define W_Screen 800
  13. #define H_Screen 600
  14.  
  15.  
  16. #define SPEED 5
  17.  
  18.  
  19. #define SPRITE_H 148
  20. #define SPRITE_W 102
  21. #define MAX_FRAMES 6
  22.  
  23. #define W_BackgImg 259
  24. #define H_BackgImg 194
  25.  
  26.  
  27. typedef struct
  28. {
  29.  
  30. SDL_Rect position_entite;
  31. SDL_Rect position_map;
  32. SDL_Rect frame;
  33. SDL_Rect dst;
  34.  
  35. SDL_Surface * image_entite;
  36. SDL_Surface * spriteleft;
  37. SDL_Surface * spriteright;
  38.  
  39. int pos_alea_max_x;
  40. int pos_alea_min_x;
  41.  
  42. int pos_alea_max_y;
  43. int pos_alea_min_y;
  44.  
  45. int pos_max_x;
  46. int pos_min_x;
  47.  
  48. int pos_max_y;
  49. int pos_min_y;
  50.  
  51. }ent;
  52.  
  53. void initialiser_entite(ent *E);
  54. void animation_entite(ent E);
  55.  
  56.  
  57.  
  58.  
  59.  
  60. #endif /* FONCTIONS_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement