X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdatabase-dummy.h;h=e1c7b5b2d1884f9a901071e225ed887021f07795;hb=dec8c43de3afdbd2e257a031f5e053e7f1e74aa0;hp=5a6921370b46ab92f6894c77de0a0bf7e54c4146;hpb=f1e4a671dc524430cae0dc66fd774858842a3067;p=oweals%2Fminetest.git diff --git a/src/database-dummy.h b/src/database-dummy.h index 5a6921370..e1c7b5b2d 100644 --- a/src/database-dummy.h +++ b/src/database-dummy.h @@ -1,12 +1,31 @@ +/* +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola + +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 +#include #include "database.h" +#include "irrlichttypes.h" + +class ServerMap; class Database_Dummy : public Database { @@ -14,13 +33,13 @@ public: Database_Dummy(ServerMap *map); virtual void beginSave(); virtual void endSave(); - virtual void saveBlock(MapBlock *block); - virtual MapBlock* loadBlock(v3s16 blockpos); - virtual void listAllLoadableBlocks(std::list &dst); - virtual int Initialized(void); + virtual bool saveBlock(v3s16 blockpos, std::string &data); + virtual std::string loadBlock(v3s16 blockpos); + virtual void listAllLoadableBlocks(std::list &dst); + virtual int Initialized(void); ~Database_Dummy(); private: ServerMap *srvmap; - std::map m_database; + std::map m_database; }; #endif