From 61e5bcef2629e2d68b805a956a96fff264d4f74d Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 28 Jun 2025 01:59:49 +0500 Subject: Restructure dependencies and update to C++20 - Nuked static_assert from almost everywhere in the project - Nuked binary dependency support. Might add one later though - Separated dependency headers into a separate include subdirectory - Grafted a thirdpartylegalnotices.txt generator from RITEG - Pushed development snapshot version to 2126 (26th week of 2025) --- game/server/overworld.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'game/server/overworld.cc') diff --git a/game/server/overworld.cc b/game/server/overworld.cc index 7021717..a280e06 100644 --- a/game/server/overworld.cc +++ b/game/server/overworld.cc @@ -12,7 +12,7 @@ static void compute_tree_feature(unsigned int height, Feature& feature, voxel_id log_voxel, voxel_id leaves_voxel) { // Ensure the tree height is too small - height = cxpr::max(height, 4U); + height = vx::max(height, 4U); // Put down a single piece of dirt feature.push_back({ voxel_pos(0, -1, 0), game_voxels::dirt, true }); @@ -214,14 +214,14 @@ const Overworld_Metadata& Overworld::get_or_create_metadata(const chunk_pos_xz& } auto nvdi_value = 0.5f + 0.5f * fnlGetNoise2D(&m_fnl_nvdi, cpos.x, cpos.y); - auto tree_density = (nvdi_value >= 0.33f) ? cxpr::floor(nvdi_value * 4.0f) : 0U; + auto tree_density = (nvdi_value >= 0.33f) ? vx::floor(nvdi_value * 4.0f) : 0U; for(unsigned int i = 0U; i < tree_density; ++i) { auto lpos = local_pos((twister() % CHUNK_SIZE), (twister() % OW_NUM_TREES), (twister() % CHUNK_SIZE)); auto is_unique = true; for(const auto& check_lpos : metadata.trees) { - if(cxvectors::distance2(check_lpos, lpos) <= 9) { + if(vx::distance2(check_lpos, lpos) <= 9) { is_unique = false; break; } @@ -350,7 +350,7 @@ void Overworld::generate_features(const chunk_pos& cpos, VoxelStorage& voxels) chunk_pos_xz(cpos.x + 1, cpos.z + 1), }; - for(unsigned int i = 0U; i < cxpr::array_size(tree_chunks); ++i) { + for(unsigned int i = 0U; i < vx::array_size(tree_chunks); ++i) { const auto& cpos_xz = tree_chunks[i]; const auto& metadata = get_or_create_metadata(cpos_xz); -- cgit