diff --git a/SCsub b/SCsub index b163097b..7e0be3fc 100644 --- a/SCsub +++ b/SCsub @@ -12,6 +12,8 @@ env_voxel = env_modules.Clone() voxel_files = [ "*.cpp", + "constants/*.cpp", + "meshers/blocky/*.cpp", "meshers/transvoxel/*.cpp", "meshers/dmc/*.cpp", diff --git a/cube_tables.cpp b/constants/cube_tables.cpp similarity index 100% rename from cube_tables.cpp rename to constants/cube_tables.cpp diff --git a/cube_tables.h b/constants/cube_tables.h similarity index 98% rename from cube_tables.h rename to constants/cube_tables.h index 88c168c1..f8926b58 100644 --- a/cube_tables.h +++ b/constants/cube_tables.h @@ -1,7 +1,7 @@ #ifndef CUBE_TABLES_H #define CUBE_TABLES_H -#include "util/math/vector3i.h" +#include "../util/math/vector3i.h" #include namespace Cube { diff --git a/octree_tables.h b/constants/octree_tables.h similarity index 100% rename from octree_tables.h rename to constants/octree_tables.h diff --git a/voxel_constants.h b/constants/voxel_constants.h similarity index 100% rename from voxel_constants.h rename to constants/voxel_constants.h diff --git a/voxel_string_names.cpp b/constants/voxel_string_names.cpp similarity index 100% rename from voxel_string_names.cpp rename to constants/voxel_string_names.cpp diff --git a/voxel_string_names.h b/constants/voxel_string_names.h similarity index 95% rename from voxel_string_names.h rename to constants/voxel_string_names.h index 4116683e..420382d3 100644 --- a/voxel_string_names.h +++ b/constants/voxel_string_names.h @@ -1,7 +1,7 @@ #ifndef VOXEL_STRING_NAMES_H #define VOXEL_STRING_NAMES_H -#include "core/string_name.h" +#include class VoxelStringNames { private: diff --git a/generators/voxel_generator.cpp b/generators/voxel_generator.cpp index 33ffd73d..5c21b65d 100644 --- a/generators/voxel_generator.cpp +++ b/generators/voxel_generator.cpp @@ -1,5 +1,5 @@ #include "voxel_generator.h" -#include "../voxel_string_names.h" +#include "../constants/voxel_string_names.h" VoxelGenerator::VoxelGenerator() { } diff --git a/generators/voxel_generator_script.cpp b/generators/voxel_generator_script.cpp index 11ae76f1..90325cff 100644 --- a/generators/voxel_generator_script.cpp +++ b/generators/voxel_generator_script.cpp @@ -1,6 +1,6 @@ #include "voxel_generator_script.h" +#include "../constants/voxel_string_names.h" #include "../util/godot/funcs.h" -#include "../voxel_string_names.h" VoxelGeneratorScript::VoxelGeneratorScript() { } diff --git a/meshers/blocky/voxel.h b/meshers/blocky/voxel.h index 4d2ee08a..f6405d0d 100644 --- a/meshers/blocky/voxel.h +++ b/meshers/blocky/voxel.h @@ -1,7 +1,7 @@ #ifndef VOXEL_TYPE_H #define VOXEL_TYPE_H -#include "../../cube_tables.h" +#include "../../constants/cube_tables.h" #include "../../util/fixed_array.h" #include diff --git a/meshers/blocky/voxel_mesher_blocky.cpp b/meshers/blocky/voxel_mesher_blocky.cpp index 36ca6996..451ba506 100644 --- a/meshers/blocky/voxel_mesher_blocky.cpp +++ b/meshers/blocky/voxel_mesher_blocky.cpp @@ -1,5 +1,5 @@ #include "voxel_mesher_blocky.h" -#include "../../cube_tables.h" +#include "../../constants/cube_tables.h" #include "../../storage/voxel_buffer.h" #include "../../util/array_slice.h" #include "../../util/funcs.h" diff --git a/meshers/dmc/voxel_mesher_dmc.cpp b/meshers/dmc/voxel_mesher_dmc.cpp index bdbdf9f8..aba47c73 100644 --- a/meshers/dmc/voxel_mesher_dmc.cpp +++ b/meshers/dmc/voxel_mesher_dmc.cpp @@ -1,6 +1,6 @@ #include "voxel_mesher_dmc.h" -#include "../../cube_tables.h" -#include "../../octree_tables.h" +#include "../../constants/cube_tables.h" +#include "../../constants/octree_tables.h" #include "marching_cubes_tables.h" #include "mesh_builder.h" #include diff --git a/meshers/transvoxel/voxel_mesher_transvoxel.h b/meshers/transvoxel/voxel_mesher_transvoxel.h index dace34c9..fcad6640 100644 --- a/meshers/transvoxel/voxel_mesher_transvoxel.h +++ b/meshers/transvoxel/voxel_mesher_transvoxel.h @@ -1,7 +1,7 @@ #ifndef VOXEL_MESHER_TRANSVOXEL_H #define VOXEL_MESHER_TRANSVOXEL_H -#include "../../cube_tables.h" +#include "../../constants/cube_tables.h" #include "../../util/fixed_array.h" #include "../voxel_mesher.h" #include diff --git a/meshers/voxel_mesher.h b/meshers/voxel_mesher.h index 278610b4..05b131c1 100644 --- a/meshers/voxel_mesher.h +++ b/meshers/voxel_mesher.h @@ -1,7 +1,7 @@ #ifndef VOXEL_MESHER_H #define VOXEL_MESHER_H -#include "../cube_tables.h" +#include "../constants/cube_tables.h" #include "../util/fixed_array.h" #include diff --git a/register_types.cpp b/register_types.cpp index 09c1f238..4f4ad5ee 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -39,9 +39,9 @@ #ifdef VOXEL_FAST_NOISE_2_SUPPORT #include "util/noise/fast_noise_2.h" #endif +#include "constants/voxel_string_names.h" #include "util/noise/fast_noise_lite.h" #include "util/noise/fast_noise_lite_gradient.h" -#include "voxel_string_names.h" #include diff --git a/server/voxel_server.cpp b/server/voxel_server.cpp index d631dd24..97057773 100644 --- a/server/voxel_server.cpp +++ b/server/voxel_server.cpp @@ -1,9 +1,9 @@ #include "voxel_server.h" +#include "../constants/voxel_constants.h" #include "../meshers/transvoxel/voxel_mesher_transvoxel.h" #include "../util/funcs.h" #include "../util/macros.h" #include "../util/profiling.h" -#include "../voxel_constants.h" #include #include #include diff --git a/storage/voxel_buffer.h b/storage/voxel_buffer.h index e7f36a98..799a8d87 100644 --- a/storage/voxel_buffer.h +++ b/storage/voxel_buffer.h @@ -1,10 +1,10 @@ #ifndef VOXEL_BUFFER_H #define VOXEL_BUFFER_H +#include "../constants/voxel_constants.h" #include "../util/array_slice.h" #include "../util/fixed_array.h" #include "../util/math/rect3i.h" -#include "../voxel_constants.h" #include #include diff --git a/streams/instance_data.cpp b/streams/instance_data.cpp index f3208157..cde8e0fc 100644 --- a/streams/instance_data.cpp +++ b/streams/instance_data.cpp @@ -1,8 +1,8 @@ #include "instance_data.h" +#include "../constants/voxel_constants.h" #include "../util/array_slice.h" #include "../util/math/funcs.h" #include "../util/serialization.h" -#include "../voxel_constants.h" #include namespace { diff --git a/streams/voxel_stream.cpp b/streams/voxel_stream.cpp index 8a003647..e2035992 100644 --- a/streams/voxel_stream.cpp +++ b/streams/voxel_stream.cpp @@ -1,5 +1,4 @@ #include "voxel_stream.h" -#include "../voxel_string_names.h" #include VoxelStream::VoxelStream() { diff --git a/streams/voxel_stream_script.cpp b/streams/voxel_stream_script.cpp index 0a03aecb..ebff87ea 100644 --- a/streams/voxel_stream_script.cpp +++ b/streams/voxel_stream_script.cpp @@ -1,6 +1,6 @@ #include "voxel_stream_script.h" +#include "../constants/voxel_string_names.h" #include "../util/godot/funcs.h" -#include "../voxel_string_names.h" VoxelStream::Result VoxelStreamScript::emerge_block(Ref out_buffer, Vector3i origin_in_voxels, int lod) { ERR_FAIL_COND_V(out_buffer.is_null(), RESULT_ERROR); diff --git a/terrain/lod_octree.h b/terrain/lod_octree.h index 0db8b7e1..3bbcd391 100644 --- a/terrain/lod_octree.h +++ b/terrain/lod_octree.h @@ -1,9 +1,9 @@ #ifndef LOD_OCTREE_H #define LOD_OCTREE_H -#include "../octree_tables.h" +#include "../constants/octree_tables.h" +#include "../constants/voxel_constants.h" #include "../util/math/vector3i.h" -#include "../voxel_constants.h" // Octree designed to handle level of detail. class LodOctree { diff --git a/terrain/voxel_block.cpp b/terrain/voxel_block.cpp index 173e5096..e679c6d0 100644 --- a/terrain/voxel_block.cpp +++ b/terrain/voxel_block.cpp @@ -1,7 +1,8 @@ #include "voxel_block.h" +#include "../constants/voxel_string_names.h" #include "../util/macros.h" #include "../util/profiling.h" -#include "../voxel_string_names.h" + #include #include diff --git a/terrain/voxel_block.h b/terrain/voxel_block.h index 667d49a1..2873c901 100644 --- a/terrain/voxel_block.h +++ b/terrain/voxel_block.h @@ -1,7 +1,7 @@ #ifndef VOXEL_BLOCK_H #define VOXEL_BLOCK_H -#include "../cube_tables.h" +#include "../constants/cube_tables.h" #include "../storage/voxel_buffer.h" #include "../util/godot/direct_mesh_instance.h" #include "../util/godot/direct_static_body.h" diff --git a/terrain/voxel_lod_terrain.cpp b/terrain/voxel_lod_terrain.cpp index 82a43d34..cbc3bfdc 100644 --- a/terrain/voxel_lod_terrain.cpp +++ b/terrain/voxel_lod_terrain.cpp @@ -1,4 +1,5 @@ #include "voxel_lod_terrain.h" +#include "../constants/voxel_string_names.h" #include "../edition/voxel_tool_lod_terrain.h" #include "../meshers/transvoxel/voxel_mesher_transvoxel.h" #include "../server/voxel_server.h" @@ -8,7 +9,6 @@ #include "../util/math/rect3i.h" #include "../util/profiling.h" #include "../util/profiling_clock.h" -#include "../voxel_string_names.h" #include "instancing/voxel_instancer.h" #include "voxel_map.h" diff --git a/terrain/voxel_map.cpp b/terrain/voxel_map.cpp index 999678f2..35cb90fc 100644 --- a/terrain/voxel_map.cpp +++ b/terrain/voxel_map.cpp @@ -1,5 +1,5 @@ #include "voxel_map.h" -#include "../cube_tables.h" +#include "../constants/cube_tables.h" #include "../util/macros.h" #include "voxel_block.h" #include diff --git a/terrain/voxel_terrain.cpp b/terrain/voxel_terrain.cpp index 6c447270..3a15bed2 100644 --- a/terrain/voxel_terrain.cpp +++ b/terrain/voxel_terrain.cpp @@ -1,4 +1,6 @@ #include "voxel_terrain.h" +#include "../constants/voxel_constants.h" +#include "../constants/voxel_string_names.h" #include "../edition/voxel_tool_terrain.h" #include "../server/voxel_server.h" #include "../util/funcs.h" @@ -6,8 +8,6 @@ #include "../util/macros.h" #include "../util/profiling.h" #include "../util/profiling_clock.h" -#include "../voxel_constants.h" -#include "../voxel_string_names.h" #include "voxel_block.h" #include "voxel_map.h"