diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:31:19 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-06-01 19:31:19 +0200 |
commit | 6fdbdea4e65b75ac9ebda91320deb656655d3af5 (patch) | |
tree | 409c8a8da5ccdf8b527ffec9632ec3d6fbb9609e /terrain.h | |
parent | 8771dde21514e754a7eb774f7047d17c226d6212 (diff) |
A bunch of network-related changes.
Diffstat (limited to 'terrain.h')
-rw-r--r-- | terrain.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -5,6 +5,7 @@ #include "terrain_cache.h" #include <list> +#include <queue> class Terrain { public: @@ -30,8 +31,10 @@ class Terrain { struct Chunk { Terrain *terrain; Node **nodes; - float x, y, width, height; + float x, y; + int width, height; int h_width, h_height; + int n_width, n_height; float *heights; TerrainCacheObject::p cache_obj; Vector3 *normals; @@ -40,8 +43,9 @@ class Terrain { unsigned int node_count; unsigned int vertices; float init_time; + bool need_normals; - Chunk(Terrain *tree, float x, float y, float width, float height); + Chunk(Terrain *tree, float x, float y); ~Chunk(); float distance(float px, float pz); @@ -51,6 +55,8 @@ class Terrain { }; static const int chunk_size = 32; + //! Chunk size with overhead. + static const int chunk_size_total = chunk_size + 3; std::list<Chunk*> chunks; TerrainCache *tc; |