Working on the client side map code (read more)

I've also added in some debug code to the map classes, because I was
hunting down a std::bad_alloc beingthrown. Turns out I forgot to set the
map sizes in the client's InWorld constructor. I'm committing the fix, and
the debug code.
This commit is contained in:
Kayne Ruse
2014-04-06 02:25:55 +11:00
parent 962f3f5dd0
commit 27bda5dc28
7 changed files with 113 additions and 24 deletions
+6 -1
View File
@@ -33,18 +33,23 @@ public:
RegionPagerBase(int regionWidth, int regionHeight, int regionDepth);
virtual ~RegionPagerBase();
//tile manipulation
Region::type_t SetTile(int x, int y, int z, Region::type_t v);
Region::type_t GetTile(int x, int y, int z);
//region manipulation
Region* GetRegion(int x, int y);
Region* FindRegion(int x, int y);
Region* PushRegion(Region*);
//interface
virtual Region* LoadRegion(int x, int y) = 0;
virtual Region* SaveRegion(int x, int y) = 0;
virtual Region* CreateRegion(int x, int y) = 0;
virtual void UnloadRegion(int x, int y) = 0;
//TODO: delete?
//accessors
//accessors & mutators
//NOTE: don't change the sizes mid-program, it will cause issues
int SetRegionWidth(int i) { return regionWidth = i; }
int SetRegionHeight(int i) { return regionHeight = i; }