summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 16:45:46 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 16:45:46 +0100
commit3b9e3afd449facf5c98ffee50247c80e293f8545 (patch)
tree34dd4c8a1038ec666b6ccbf69a74d9ff09b2b86c /src/common.hpp
parentb13dc31b08cddf14ecfa6b8cf496cf4e7308083c (diff)
Start adding decorations.
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 1ae3595..f543ca5 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -95,7 +95,6 @@ namespace world {
class world_t {
procgen::prng_t prng;
- procgen::perlin_noise_t perlin;
std::map<sector_index_t, sector_t> sectors;
@@ -106,7 +105,10 @@ namespace world {
friend render::state_t;
public:
- void (*generator)(tile_t*, tile_index_t, procgen::perlin_noise_t*) = 0;
+ procgen::perlin_noise_t perlin;
+
+ void (*generator)(world_t *world, sector_index_t index, sector_t *sector, void *data) = 0;
+ void *generator_data = 0;
world_t(void);
@@ -311,10 +313,8 @@ namespace render {
class state_t {
sf::RenderWindow *window;
- procgen::prng_t prng;
- procgen::perlin_noise_t perlin;
- void render_sector(world::sector_t *sector);
+ void render_sector(world::world_t *world, world::sector_t *sector);
void drender_text(rectf_t rect, std::string str);
void drender_entity(world::entity_t *ent);
public: