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:
@@ -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 ℑ }
|
||||
|
||||
@@ -61,6 +64,8 @@ public:
|
||||
int GetBegin() const { return begin; }
|
||||
int GetEnd() const { return end; }
|
||||
private:
|
||||
static int rangeEnd;
|
||||
|
||||
Image image;
|
||||
std::string name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user