Various tweaks and modifications

Some preliminary testing of map
This commit is contained in:
MitchellHansen
2016-12-10 01:12:30 -08:00
parent c98adefa3a
commit 51a08fc0bb
11 changed files with 296 additions and 48 deletions

View File

@@ -16,6 +16,7 @@
#include <math.h>
#define CHUNK_DIM 32
#define OCT_DIM 64
struct KeyHasher {
std::size_t operator()(const sf::Vector3i& k) const {
@@ -57,6 +58,15 @@ protected:
private:
int64_t generate_children(sf::Vector3i pos, int dim);
int64_t block[1024];
int stack_position = 0;
char getVoxel(sf::Vector3i pos);
char* voxel_data = new char[OCT_DIM * OCT_DIM * OCT_DIM];
std::unordered_map<sf::Vector3i, Chunk, KeyHasher> chunk_map;
double* height_map;