Decoupled the TileSheet class from the Map class

I moved the rangeEnd variable into the TileSheet class, making it static.
I also tweaked the return types for a few functions in Region, and removed
the sheetIndex member from Tile.
This commit is contained in:
Kayne Ruse
2013-10-03 21:29:11 +10:00
parent 3628d3c1fd
commit 9c91e9d5fd
5 changed files with 19 additions and 15 deletions
+2 -3
View File
@@ -29,17 +29,16 @@ struct Tile {
//graphics
int width, height;
int sheetIndex, tileIndex;
int tileIndex;
Tile() = default;
Tile(int _x, int _y, int _depth, int _width, int _height, int _sheetIndex, int _tileIndex) {
Tile(int _x, int _y, int _depth, int _width, int _height, int _tileIndex) {
//The order of the arguments should be explicit
x = _x;
y = _y;
depth = _depth;
width = _width;
height = _height;
sheetIndex = _sheetIndex;
tileIndex = _tileIndex;
}
};