summaryrefslogtreecommitdiff
path: root/src/mapblock.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-18 17:46:00 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-18 17:46:00 +0200
commit240499dc2c766c9d022e6df71e770a116a2c95de (patch)
tree3ae7c46b2ab20c226afb0d1ec5c6bddc80f33d48 /src/mapblock.h
parent15a43c5ed02130f1b1e07a0385530da197b0c846 (diff)
downloadminetest-240499dc2c766c9d022e6df71e770a116a2c95de.tar.gz
minetest-240499dc2c766c9d022e6df71e770a116a2c95de.tar.bz2
minetest-240499dc2c766c9d022e6df71e770a116a2c95de.zip
before daynight mesh cache
Diffstat (limited to 'src/mapblock.h')
-rw-r--r--src/mapblock.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/mapblock.h b/src/mapblock.h
index ebc2b52ff..ff36e3a7d 100644
--- a/src/mapblock.h
+++ b/src/mapblock.h
@@ -108,6 +108,7 @@ public:
m_pos(pos),
changed(true),
is_underground(false),
+ m_mesh_expired(false),
m_objects(this)
//is_incomplete(false)
{
@@ -170,6 +171,16 @@ public:
changed = true;
}
+ void setMeshExpired(bool expired)
+ {
+ m_mesh_expired = expired;
+ }
+
+ bool getMeshExpired()
+ {
+ return m_mesh_expired;
+ }
+
v3s16 getPos()
{
return m_pos;
@@ -303,7 +314,7 @@ public:
static FastFace * makeFastFace(TileSpec tile, u8 light, v3f p,
v3s16 dir, v3f scale, v3f posRelative_f);
- u8 getFaceLight(v3s16 p, v3s16 face_dir);
+ u8 getFaceLight(u32 daylight_factor, v3s16 p, v3s16 face_dir);
TileSpec getNodeTile(v3s16 p, v3s16 face_dir);
u8 getNodeContent(v3s16 p);
@@ -313,13 +324,15 @@ public:
translate_dir: unit vector with only one of x, y or z
face_dir: unit vector with only one of x, y or z
*/
- void updateFastFaceRow(v3s16 startpos,
+ void updateFastFaceRow(
+ u32 daylight_factor,
+ v3s16 startpos,
u16 length,
v3s16 translate_dir,
v3s16 face_dir,
core::list<FastFace*> &dest);
- void updateMesh();
+ void updateMesh(u32 daylight_factor);
bool propagateSunlight(core::map<v3s16, bool> & light_sources);
@@ -464,6 +477,8 @@ private:
At least /has been/ used. 8)
*/
bool is_underground;
+
+ bool m_mesh_expired;
MapBlockObjectList m_objects;