From e92238edc831a34081790e71249f1459e997974c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 1 Feb 2011 16:17:55 +0200 Subject: This map generator is starting to look pretty good now... also, disabled loading player position from disk because map is regenerated always. --- src/mapchunk.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/mapchunk.h') 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 -- cgit v1.2.3