summaryrefslogtreecommitdiff
path: root/src/mapchunk.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-02-01 16:17:55 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-02-01 16:17:55 +0200
commite92238edc831a34081790e71249f1459e997974c (patch)
tree5406e23bb8fd7895f7ac741ad49085a217b7b758 /src/mapchunk.h
parent56320f7e8de3cf31cbaf11492528016c4446d8f4 (diff)
downloadminetest-e92238edc831a34081790e71249f1459e997974c.tar.gz
minetest-e92238edc831a34081790e71249f1459e997974c.tar.bz2
minetest-e92238edc831a34081790e71249f1459e997974c.zip
This map generator is starting to look pretty good now... also, disabled loading player position from disk because map is regenerated always.
Diffstat (limited to 'src/mapchunk.h')
-rw-r--r--src/mapchunk.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/mapchunk.h b/src/mapchunk.h
index 284eebe60..1f89b38a7 100644
--- a/src/mapchunk.h
+++ b/src/mapchunk.h
@@ -22,14 +22,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/*
MapChunk contains map-generation-time metadata for an area of
- some MapSectors. (something like 64x64)
+ some MapSectors. (something like 16x16)
*/
+enum{
+ GENERATED_FULLY = 0,
+ GENERATED_PARTLY = 10,
+ GENERATED_NOT = 20
+};
+
class MapChunk
{
public:
MapChunk():
- m_is_volatile(true)
+ //m_is_volatile(true)
+ m_generation_level(GENERATED_NOT)
{
}
@@ -40,11 +47,21 @@ public:
It is set to false when all the 8 neighboring chunks have
been generated.
*/
- bool getIsVolatile(){ return m_is_volatile; }
- void setIsVolatile(bool is){ m_is_volatile = is; }
+ /*bool getIsVolatile(){ return m_is_volatile; }
+ void setIsVolatile(bool is){ m_is_volatile = is; }*/
+
+ /*
+ Generation level. Possible values:
+ GENERATED_FULLY = 0 = fully generated
+ GENERATED_PARTLY = partly generated
+ GENERATED_NOT = not generated
+ */
+ u16 getGenLevel(){ return m_generation_level; }
+ void setGenLevel(u16 lev){ m_generation_level = lev; }
private:
- bool m_is_volatile;
+ //bool m_is_volatile;
+ u16 m_generation_level;
};
#endif