Skip to content

Commit 4d18f9f

Browse files
fix WorldGenerator
1 parent d4d7957 commit 4d18f9f

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

include/game/WorldChunk.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#pragma once
22

3-
#include <glm/glm.hpp>
4-
#include <vector>
3+
#include <algorithm>
54
#include <cstdint>
65
#include <memory>
6+
#include <vector>
77
#include <unordered_set>
88

9+
#include <glm/glm.hpp>
910
#include <nlohmann/json.hpp>
1011

1112
struct LODConfig;

include/game/WorldGenerator.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#pragma once
22

3-
#include <vector>
3+
#include <algorithm>
4+
#include <cmath>
45
#include <memory>
56
#include <random>
7+
#include <vector>
68

79
#include <glm/glm.hpp>
10+
#include <glm/gtc/noise.hpp>
811

912
#include "game/WorldChunk.hpp"
1013

src/game/WorldChunk.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <algorithm>
2-
31
#include "game/WorldChunk.hpp"
42

53
const float WorldChunk::BLOCK_SIZE = 1.0f;

src/game/WorldGenerator.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
#include <cmath>
2-
#include <algorithm>
3-
#include <glm/gtc/noise.hpp>
4-
51
#include "game/WorldGenerator.hpp"
62

73
// Initialize static members
8-
const float WorldChunk::BLOCK_SIZE = 1.0f;
9-
const float WorldChunk::CHUNK_WIDTH = WorldChunk::CHUNK_SIZE * WorldChunk::BLOCK_SIZE;
4+
//const float WorldChunk::BLOCK_SIZE = 1.0f;
5+
//const float WorldChunk::CHUNK_WIDTH = WorldChunk::CHUNK_SIZE * WorldChunk::BLOCK_SIZE;
106

117
WorldGenerator::WorldGenerator(const GenerationConfig& config)
128
: config_(config), rng_(config.seed), dist_(-1.0f, 1.0f) {

0 commit comments

Comments
 (0)