Add files via upload
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "DefaultWorldGenerator.h"
|
||||
#include "WorldGenerator.h"
|
||||
#include "voxel.h"
|
||||
#include "Chunk.h"
|
||||
#include "Block.h"
|
||||
@@ -120,7 +119,7 @@ int generate_tree(fnl_state *noise,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WorldGenerator::generate(voxel* voxels, int cx, int cz, int seed){
|
||||
void DefaultWorldGenerator::generate(voxel* voxels, int cx, int cz, int seed){
|
||||
const int treesTile = 12;
|
||||
fnl_state noise = fnlCreateState();
|
||||
noise.noise_type = FNL_NOISE_OPENSIMPLEX2;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
#ifndef VOXELS_WORLDGENERATOR_H_
|
||||
#define VOXELS_WORLDGENERATOR_H_
|
||||
#ifndef VOXELS_DEFAULTWORLDGENERATOR_H_
|
||||
#define VOXELS_DEFAULTWORLDGENERATOR_H_
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include "../voxels/WorldGenerator.h"
|
||||
#include <string>
|
||||
|
||||
struct voxel;
|
||||
class Content;
|
||||
|
||||
class DefaultWorldGenerator : WorldGenerator {
|
||||
public:
|
||||
|
||||
DefaultWorldGenerator(const Content* content) : WorldGenerator(content) {}
|
||||
|
||||
void generate(voxel* voxels, int x, int z, int seed) override;
|
||||
void generate(voxel* voxels, int x, int z, int seed);
|
||||
};
|
||||
|
||||
#endif /* VOXELS_WORLDGENERATOR_H_ */
|
||||
#endif /* VOXELS_DEFAULTWORLDGENERATOR_H_ */
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
|
||||
FlatWorldGenerator(const Content* content) : WorldGenerator(content) {}
|
||||
|
||||
void generate(voxel* voxels, int x, int z, int seed) override;
|
||||
void generate(voxel* voxels, int x, int z, int seed);
|
||||
};
|
||||
|
||||
#endif /* VOXELS_FLATWORLDGENERATOR_H_ */
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "WorldGenerator.h"
|
||||
#include "voxel.h"
|
||||
#include "Chunk.h"
|
||||
#include "Block.h"
|
||||
|
||||
#include "../content/Content.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ protected:
|
||||
public:
|
||||
WorldGenerator(const Content* content);
|
||||
|
||||
virtual void generate(voxel* voxels, int x, int z, int seed);
|
||||
virtual void generate(voxel* voxels, int x, int z, int seed) = 0;
|
||||
};
|
||||
|
||||
#endif /* VOXELS_WORLDGENERATOR_H_ */
|
||||
Reference in New Issue
Block a user