From 6fdbdea4e65b75ac9ebda91320deb656655d3af5 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 1 Jun 2011 19:31:19 +0200 Subject: A bunch of network-related changes. --- terrain.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'terrain.h') diff --git a/terrain.h b/terrain.h index 6fa39b3..cca01b7 100644 --- a/terrain.h +++ b/terrain.h @@ -5,6 +5,7 @@ #include "terrain_cache.h" #include +#include 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 chunks; TerrainCache *tc; -- cgit v1.2.3