ajtgarber

map (Tile.h)

May 5th, 2011
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <SDL/SDL.h>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. #ifndef TILE_H
  7. #define TILE_H
  8.  
  9. class Tile {
  10.     private:
  11.         SDL_Surface* surface;
  12.         int x, y, size;
  13.         int sx, sy; //sheet coordinates
  14.  
  15.     public:
  16.         Tile();
  17.         Tile(SDL_Surface* surface, int x, int y, int size, int sx, int sy);
  18.  
  19.         SDL_Surface* getSheet();
  20.         int getX();
  21.         int getY();
  22.         int getSheetX();
  23.         int getSheetY();
  24.         int getSize();
  25.  
  26.         void setX(int x);
  27.         void setY(int y);
  28.         void setSheetX(int x);
  29.         void setSheetY(int y);
  30.         void setSheet(SDL_Surface* sheet);
  31.  
  32.         void render(SDL_Surface* screen, int xtrans, int ytrans);
  33. };
  34.  
  35. #endif
Advertisement
Add Comment
Please, Sign In to add comment