diff options
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com> +Minetest +Copyright (C) 2010-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 @@ -46,6 +46,8 @@ class MapBlock; class NodeMetadata; class IGameDef; class IRollbackReportSink; +class EmergeManager; +class BlockMakeData; /* @@ -300,6 +302,7 @@ public: virtual void PrintInfo(std::ostream &out); void transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks); + void transformLiquidsFinite(core::map<v3s16, MapBlock*> & modified_blocks); /* Node metadata @@ -328,6 +331,9 @@ public: Variables */ + void transforming_liquid_add(v3s16 p); + s32 transforming_liquid_size(); + protected: std::ostream &m_dout; // A bit deprecated, could be removed @@ -377,8 +383,8 @@ public: /* Blocks are generated by using these and makeBlock(). */ - void initBlockMake(BlockMakeData *data, v3s16 blockpos); - MapBlock* finishBlockMake(BlockMakeData *data, + bool initBlockMake(BlockMakeData *data, v3s16 blockpos); + MapBlock *finishBlockMake(BlockMakeData *data, core::map<v3s16, MapBlock*> &changed_blocks); // A non-threaded wrapper to the above - DEFUNCT @@ -515,6 +521,9 @@ private: sqlite3_stmt *m_database_list; }; +#define VMANIP_BLOCK_DATA_INEXIST 1 +#define VMANIP_BLOCK_CONTAINS_CIGNORE 2 + class MapVoxelManipulator : public VoxelManipulator { public: @@ -530,14 +539,14 @@ public: virtual void emerge(VoxelArea a, s32 caller_id=-1); void blitBack(core::map<v3s16, MapBlock*> & modified_blocks); - -protected: - Map *m_map; + /* key = blockpos - value = block existed when loaded + value = flags describing the block */ - core::map<v3s16, bool> m_loaded_blocks; + core::map<v3s16, u8> m_loaded_blocks; +protected: + Map *m_map; }; class ManualMapVoxelManipulator : public MapVoxelManipulator |