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
+5
View File
@@ -45,6 +45,9 @@ public:
bool InRange(int i) { return i >= begin && i < end; }
static int SetRangeEnd(int i) { return rangeEnd = i; }
static int GetRangeEnd() { return rangeEnd; }
//accessors and mutators
Image* GetImage() { return &image; }
@@ -61,6 +64,8 @@ public:
int GetBegin() const { return begin; }
int GetEnd() const { return end; }
private:
static int rangeEnd;
Image image;
std::string name;