Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // vars
- int sheetMap[100][100];
- Surface* tileSheet;
- // functions
- (inside map::initialise)
- void Map::Initialise()
- {
- for (int Rows = 0; Rows < 25; Rows++)
- {
- for (int Cols = 0; Cols < 43; Cols++)
- {
- sheetMap[Rows][Cols] = GrabTile(Rows, Cols);
- Counter++;
- }
- }
- }
- int Map::GrabTile(int Rows, int Cols)
- {
- Tile* T = new Tile();
- tileSheet->KeyCopyTo(T->TGraphic, -((Cols * 32) + (Cols * 4)), -((Rows * 32) + (Rows * 4)));
- Tiles.push_back(T);
- T = NULL; delete T;
- return Counter;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement