]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/database-dummy.h
Check minetest.hud_change() parameters on conversion (Fix #1714)
[dragonfireclient.git] / src / database-dummy.h
index 55b21532cdf9d4dd4d9133e7e3fd02e34e967b1b..e1c7b5b2d1884f9a901071e225ed887021f07795 100644 (file)
@@ -1,12 +1,31 @@
+/*
+Minetest
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
 #ifndef DATABASE_DUMMY_HEADER
 #define DATABASE_DUMMY_HEADER
 
-#include "map.h"
-#include "mapsector.h"
-#include "mapblock.h"
-#include "main.h"
-#include "filesys.h"
+#include <map>
+#include <string>
 #include "database.h"
+#include "irrlichttypes.h"
+
+class ServerMap;
 
 class Database_Dummy : public Database
 {
@@ -14,13 +33,13 @@ class Database_Dummy : public Database
        Database_Dummy(ServerMap *map);
        virtual void beginSave();
        virtual void endSave();
-        virtual void saveBlock(MapBlock *block);
-        virtual MapBlock* loadBlock(v3s16 blockpos);
-        virtual void listAllLoadableBlocks(core::list<v3s16> &dst);
-        virtual int Initialized(void);
+       virtual bool saveBlock(v3s16 blockpos, std::string &data);
+       virtual std::string loadBlock(v3s16 blockpos);
+       virtual void listAllLoadableBlocks(std::list<v3s16> &dst);
+       virtual int Initialized(void);
        ~Database_Dummy();
 private:
        ServerMap *srvmap;
-       std::map<unsigned long long, std::string> m_database;
+       std::map<u64, std::string> m_database;
 };
 #endif