diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:57:47 +0100 |
commit | 3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch) | |
tree | c070350db219f2c4241d22bc31949685c7b42fe9 /src/mapsector.h | |
parent | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff) | |
parent | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff) | |
download | dragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/mapsector.h')
-rw-r--r-- | src/mapsector.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mapsector.h b/src/mapsector.h index ff96be498..dede364f6 100644 --- a/src/mapsector.h +++ b/src/mapsector.h @@ -39,16 +39,20 @@ class IGameDef; class MapSector { public: + MapSector(Map *parent, v2s16 pos, IGameDef *gamedef); virtual ~MapSector(); void deleteBlocks(); - v2s16 getPos() { return m_pos; } + v2s16 getPos() + { + return m_pos; + } - MapBlock *getBlockNoCreateNoEx(s16 y); - MapBlock *createBlankBlockNoInsert(s16 y); - MapBlock *createBlankBlock(s16 y); + MapBlock * getBlockNoCreateNoEx(s16 y); + MapBlock * createBlankBlockNoInsert(s16 y); + MapBlock * createBlankBlock(s16 y); void insertBlock(MapBlock *block); @@ -59,8 +63,9 @@ public: bool empty() const { return m_blocks.empty(); } protected: + // The pile of MapBlocks - std::unordered_map<s16, MapBlock *> m_blocks; + std::unordered_map<s16, MapBlock*> m_blocks; Map *m_parent; // Position on parent (in MapBlock widths) @@ -77,4 +82,5 @@ protected: Private methods */ MapBlock *getBlockBuffered(s16 y); + }; |