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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user