Black&White Game of Life with SDL

constante.h 784B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // constante.h
  3. // Life
  4. //
  5. // Created by Benoit Sida on 2014-06-13.
  6. // Copyright (c) 2014 Benoit Sida. All rights reserved.
  7. //
  8. #ifndef Life_constante_h
  9. #define Life_constante_h
  10. #include <stdlib.h>
  11. #include <SDL2/SDL.h>
  12. #include <SDL2_image/SDL_image.h>
  13. #define TAILLE_BLOC 34
  14. #define NB_BLOCS 12
  15. #define LARGEUR_ECRAN TAILLE_BLOC*NB_BLOCS
  16. #define HAUTEUR_ECRAN TAILLE_BLOC*NB_BLOCS
  17. #define CYCLES 24
  18. #define WAIT 100
  19. #define MAXMAP (NB_BLOCS*NB_BLOCS)
  20. #define SHEETSIZE 16
  21. enum {HAUT, BAS, GAUCHE, DROITE};
  22. typedef struct Sprites Sprites;
  23. struct Sprites {
  24. SDL_Surface *menu;
  25. SDL_Surface *arrow;
  26. SDL_Surface *cell;
  27. SDL_Surface *deadcell;
  28. SDL_Surface *alivecell;
  29. SDL_Surface *cellsheet;
  30. SDL_Surface *icon;
  31. SDL_Rect clip[SHEETSIZE];
  32. };
  33. #endif