feat: add random seed

This commit is contained in:
2026-04-06 21:56:15 +08:00
parent f37f458b42
commit 662e3ee798
7 changed files with 48 additions and 21 deletions

View File

@@ -18,7 +18,7 @@ public:
static void window_reshape_callback(GLFWwindow* window, int new_width, int new_height);
static int start_cubed_application(int argc, char** argv);
static unsigned int seed();
static float delte_time();
static float get_fps();
private:
@@ -38,7 +38,7 @@ private:
inline static double fps_time_count = 0.0f;
inline static int frame_count = 0;
inline static int fps = 0;
inline static unsigned int m_seed = 0;
void init();

View File

@@ -30,6 +30,8 @@ public:
Player& get_player(const std::string& name);
void init_world();
bool is_aabb_in_frustum(const glm::vec3& center, const glm::vec3& half_extents);
int get_block(const glm::ivec3& block_pos) const;
bool is_block(const glm::ivec3& block_pos) const;
void need_gen();

View File

@@ -4,7 +4,7 @@
class PerlinNoise {
public:
static void init();
static void init(unsigned int seed);
static float noise(float x, float y, float z);
private:
static inline bool is_init = false;