Advertisement
Guest User

Untitled

a guest
Jan 25th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. HEADER FILE: Headers.h
  2. #pragma once
  3.  
  4. #include <fstream>
  5.  
  6. #include "SDL.h"
  7. #include "SDL_image.h"
  8. #include "SDL_ttf.h"
  9. #include "SDL_mixer.h"
  10.  
  11. #include "GV.h"
  12. #include "UI.h"
  13. #include "Tile.h"
  14. #include "Item.h"
  15. #include "Figure.h"
  16.  
  17. //Screen attributes
  18. #define SCREEN_WIDTH 1214
  19. #define SCREEN_HEIGHT 640
  20. #define SCREEN_BPP 32
  21.  
  22. //Game interface attributes
  23. #define MAP_WIDTH 2560
  24. #define MAP_HEIGHT 1280
  25.  
  26. //Tiles, items, figures
  27. #define TILE_COUNT 3
  28. #define FIGURE_COUNT 2
  29. #define FIGURE_SPEC_COUNT 22
  30.  
  31. FIGURE FILE: Figure.h
  32.  
  33. #pragma once
  34.  
  35. #include "Definitions.h"
  36.  
  37. class Figure {
  38. public:
  39.  
  40. int x;
  41. //Figure index
  42. struct FIGURE_TYPE {
  43. //Where to crop the image from
  44. SDL_Rect crop;
  45. int x;
  46. int y;
  47. };
  48.  
  49. //The game figure
  50. FIGURE_TYPE figure_index[FIGURE_COUNT];
  51.  
  52. //The figure array
  53. int figure_array[MAP_HEIGHT / 64][MAP_WIDTH / 64];
  54.  
  55. //Functions
  56. Figure ( void );
  57. bool draw_figures ( SDL_Surface* screen, SDL_Surface* figures, SDL_Rect camera, Figure::FIGURE_TYPE figure_spec[FIGURE_COUNT] );
  58. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement