From c707e00195f1035ae535f3fc8697af42e73190c0 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 29 Nov 2010 10:52:07 +0200 Subject: sitä sun tätä tekeillä, toimii kivasti MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test.cpp | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src/test.cpp') diff --git a/src/test.cpp b/src/test.cpp index 8cdd84426..ce00306a6 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -1,6 +1,5 @@ #include "test.h" #include "common_irrlicht.h" - #include "debug.h" #include "map.h" #include "player.h" @@ -10,6 +9,7 @@ #include "connection.h" #include "utility.h" #include "serialization.h" +#include "voxel.h" #include #ifdef _WIN32 @@ -125,6 +125,45 @@ struct TestMapNode } }; +struct TestVoxelManipulator +{ + void Run() + { + VoxelArea a(v3s16(-1,-1,-1), v3s16(1,1,1)); + assert(a.index(0,0,0) == 1*3*3 + 1*3 + 1); + assert(a.index(-1,-1,-1) == 0); + + VoxelManipulator v; + + v.print(dstream); + + dstream<<"*** Setting (-1,0,-1)=2 ***"<