diff options
author | sfan5 <sfan5@live.de> | 2014-07-08 20:04:37 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2014-07-12 17:38:17 +0200 |
commit | eec456be63f6fee8604f7a9c40aa41a1af3f1fac (patch) | |
tree | e97d792d648fa6f76c1479ac3e978ada2c075a48 /src/database.h | |
parent | 3feece1f2887eda368c0a9e42e3ab26b4b754354 (diff) | |
download | minetest-eec456be63f6fee8604f7a9c40aa41a1af3f1fac.tar.gz minetest-eec456be63f6fee8604f7a9c40aa41a1af3f1fac.tar.bz2 minetest-eec456be63f6fee8604f7a9c40aa41a1af3f1fac.zip |
Move MapBlock (de)serializing code out of Database class
Diffstat (limited to 'src/database.h')
-rw-r--r-- | src/database.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/database.h b/src/database.h index d8669dd9b..ffec7c977 100644 --- a/src/database.h +++ b/src/database.h @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #define DATABASE_HEADER #include <list> +#include <string> #include "irr_v3d.h" #include "irrlichttypes.h" @@ -28,16 +29,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" #endif -class MapBlock; - class Database { public: virtual void beginSave() = 0; virtual void endSave() = 0; - virtual bool saveBlock(MapBlock *block) = 0; - virtual MapBlock *loadBlock(v3s16 blockpos) = 0; + virtual bool saveBlock(v3s16 blockpos, std::string &data) = 0; + virtual std::string loadBlock(v3s16 blockpos) = 0; s64 getBlockAsInteger(const v3s16 pos) const; v3s16 getIntegerAsBlock(s64 i) const; virtual void listAllLoadableBlocks(std::list<v3s16> &dst) = 0; |