From bccf02982941feaf93ba94a29644eb5559a11655 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sat, 14 Sep 2019 01:10:55 -0400 Subject: World can now generate its own mesh --- src/world.hpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/world.hpp') diff --git a/src/world.hpp b/src/world.hpp index 7a7461f..cea599b 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -28,6 +28,13 @@ #include "texture.hpp" +struct WorldMeshData +{ + float posX, posY, posZ; + float texX, texY; + float transparency; +}; + struct WorldMaterial { bool passable = false; @@ -59,12 +66,12 @@ private: unsigned int height; unsigned int width; - std::vector>> data; + std::vector>> data; - std::unordered_map string_registry; + std::unordered_map string_registry; std::vector registry; - std::vector mesh; + std::basic_string mesh; public: /* VARS */ sol::function generate; @@ -79,10 +86,6 @@ public: data.clear(); } - /* SEED */ - unsigned int getSeed(); - unsigned int setSeed(unsigned int); - /* REGISTRY */ void registerMaterial(std::string, sol::object); @@ -97,6 +100,10 @@ public: /* RENDERING */ void generateMesh(); + + /* SEED */ + unsigned int getSeed(); + unsigned int setSeed(unsigned int); }; /** -- cgit v1.2.3