Refactored the map system (read more)

The region's width, height and depth are all defined by preprocessor
macros. The rest of the map system has been updated to match. The
programs proper need to be updated as well. It would be a good idea to
include the macros' values as part of the initial communication protocols,
so that the clients don't connect to a server that is using the wrong
sized regions.
This commit is contained in:
Kayne Ruse
2014-04-20 03:31:37 +10:00
parent ac27fb0ca7
commit c5a627004a
10 changed files with 60 additions and 159 deletions
+4 -23
View File
@@ -30,18 +30,7 @@
class DummyFormat {
public:
void Load(Region** const, int width, int height, int depth, int x, int y);
void Save(Region* const);
std::string SetSaveDir(std::string s) { return saveDir = s; }
std::string GetSaveDir() { return saveDir; }
private:
std::string saveDir;
};
/*
class VerboseFormat {
public:
void Load(Region** const, int width, int height, int depth, int x, int y);
void Load(Region** const, int x, int y);
void Save(Region* const);
std::string SetSaveDir(std::string s) { return saveDir = s; }
@@ -50,20 +39,12 @@ private:
std::string saveDir;
};
class CompactFormat {
public:
void Load(Region** const, int width, int height, int depth, int x, int y);
void Save(Region* const);
//TODO: verbose save file format
//TODO: compact save file format
std::string SetSaveDir(std::string s) { return saveDir = s; }
std::string GetSaveDir() { return saveDir; }
private:
std::string saveDir;
};
*/
class LuaFormat {
public:
void Load(Region** const, int width, int height, int depth, int x, int y);
void Load(Region** const, int x, int y);
void Save(Region* const);
std::string SetSaveDir(std::string s) { return saveDir = s; }