Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SDL/SDL.h>
- #include <fstream>
- #include <vector>
- #include <iostream>
- #include "Tile.h"
- using namespace std;
- #ifndef MAP_H
- #define MAP_H
- class Map {
- private:
- vector<SDL_Surface*> surfaces;
- vector<char*> surfacePaths;
- Tile tiles[32][32];
- int width;
- int height;
- int tileSize;
- int xtrans;
- int ytrans;
- public:
- Map(int width, int height, int tileSize);
- virtual ~Map();
- int getWidth();
- int getHeight();
- Tile getTile(int x, int y);
- void setTile(Tile tile, int x, int y);
- void shiftX(int x);
- void shiftY(int y);
- int currShiftX();
- int currShiftY();
- int getTileSize();
- void setTileSize(int tileSize);
- void addSheet(SDL_Surface* sheet, char* filename);
- SDL_Surface* getSheet(int n);
- int getSheetNum(int x, int y);
- char* getSheetPath(int n);
- int numSheets();
- void render(SDL_Surface* screen);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment