diff options
Diffstat (limited to 'game/client/world')
| -rw-r--r-- | game/client/world/chunk_mesher.cc | 12 | ||||
| -rw-r--r-- | game/client/world/chunk_renderer.cc | 3 | ||||
| -rw-r--r-- | game/client/world/chunk_visibility.cc | 1 | ||||
| -rw-r--r-- | game/client/world/voxel_anims.cc | 6 | ||||
| -rw-r--r-- | game/client/world/voxel_atlas.cc | 5 |
5 files changed, 17 insertions, 10 deletions
diff --git a/game/client/world/chunk_mesher.cc b/game/client/world/chunk_mesher.cc index 53c4882..e2f1e10 100644 --- a/game/client/world/chunk_mesher.cc +++ b/game/client/world/chunk_mesher.cc @@ -97,8 +97,8 @@ public: private: bool vis_test(voxel_id voxel, const world::VoxelInfo* info, const local_pos& lpos) const; void push_quad_a(const world::VoxelInfo* info, const glm::fvec3& pos, const glm::fvec2& size, world::voxel_face face); - void push_quad_v( - const world::VoxelInfo* info, const glm::fvec3& pos, const glm::fvec2& size, world::voxel_face face, std::size_t entropy); + void push_quad_v(const world::VoxelInfo* info, const glm::fvec3& pos, const glm::fvec2& size, world::voxel_face face, + std::size_t entropy); void make_cube(voxel_id voxel, const world::VoxelInfo* info, const local_pos& lpos, world::voxel_vis vis, std::size_t entropy); void cache_chunk(const chunk_pos& cpos); @@ -304,8 +304,8 @@ void GL_MeshingTask::push_quad_a(const world::VoxelInfo* info, const glm::fvec3& } } -void GL_MeshingTask::push_quad_v( - const world::VoxelInfo* info, const glm::fvec3& pos, const glm::fvec2& size, world::voxel_face face, std::size_t entropy) +void GL_MeshingTask::push_quad_v(const world::VoxelInfo* info, const glm::fvec3& pos, const glm::fvec2& size, world::voxel_face face, + std::size_t entropy) { const world::voxel_facing facing = get_facing(face, info->type); const world::VoxelTexture& vtex = info->textures[static_cast<std::size_t>(face)]; @@ -319,8 +319,8 @@ void GL_MeshingTask::push_quad_v( } } -void GL_MeshingTask::make_cube( - voxel_id voxel, const world::VoxelInfo* info, const local_pos& lpos, world::voxel_vis vis, std::size_t entropy) +void GL_MeshingTask::make_cube(voxel_id voxel, const world::VoxelInfo* info, const local_pos& lpos, world::voxel_vis vis, + std::size_t entropy) { const glm::fvec3 fpos = glm::fvec3(lpos); const glm::fvec2 fsize = glm::fvec2(1.0f, 1.0f); diff --git a/game/client/world/chunk_renderer.cc b/game/client/world/chunk_renderer.cc index fe3a42e..23ce4ec 100644 --- a/game/client/world/chunk_renderer.cc +++ b/game/client/world/chunk_renderer.cc @@ -4,6 +4,7 @@ #include "core/config/boolean.hh" #include "core/config/number.hh" + #include "core/io/config_map.hh" #include "shared/world/chunk.hh" @@ -12,7 +13,9 @@ #include "shared/coord.hh" #include "client/entity/camera.hh" + #include "client/gui/settings.hh" + #include "client/world/chunk_mesher.hh" #include "client/world/chunk_quad.hh" #include "client/world/outline.hh" diff --git a/game/client/world/chunk_visibility.cc b/game/client/world/chunk_visibility.cc index 8f76755..871c04b 100644 --- a/game/client/world/chunk_visibility.cc +++ b/game/client/world/chunk_visibility.cc @@ -3,6 +3,7 @@ #include "client/world/chunk_visibility.hh" #include "core/config/number.hh" + #include "core/math/vectors.hh" #include "shared/world/chunk.hh" diff --git a/game/client/world/voxel_anims.cc b/game/client/world/voxel_anims.cc index 9e5e035..e4d9cf6 100644 --- a/game/client/world/voxel_anims.cc +++ b/game/client/world/voxel_anims.cc @@ -3,7 +3,9 @@ #include "client/world/voxel_anims.hh" #include "core/config/number.hh" + #include "core/io/config_map.hh" + #include "core/math/constexpr.hh" #include "client/globals.hh" @@ -24,8 +26,8 @@ void world::voxel_anims::init(void) void world::voxel_anims::update(void) { if(globals::curtime >= world::voxel_anims::nextframe) { - world::voxel_anims::nextframe = - globals::curtime + static_cast<std::uint64_t>(1000000.0 / static_cast<float>(base_framerate.get_value())); + world::voxel_anims::nextframe = globals::curtime + + static_cast<std::uint64_t>(1000000.0 / static_cast<float>(base_framerate.get_value())); world::voxel_anims::frame += 1U; } } diff --git a/game/client/world/voxel_atlas.cc b/game/client/world/voxel_atlas.cc index 1018747..512a06a 100644 --- a/game/client/world/voxel_atlas.cc +++ b/game/client/world/voxel_atlas.cc @@ -4,6 +4,7 @@ #include "core/math/constexpr.hh" #include "core/math/crc64.hh" + #include "core/resource/image.hh" #include "core/resource/resource.hh" @@ -71,8 +72,8 @@ static world::AtlasStrip* plane_new_strip(AtlasPlane& plane, const std::vector<s } const std::size_t offset = strip.offset + i; - glTexSubImage3D( - GL_TEXTURE_2D_ARRAY, 0, 0, 0, offset, image->size.x, image->size.y, 1, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels); + glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, offset, image->size.x, image->size.y, 1, GL_RGBA, GL_UNSIGNED_BYTE, + image->pixels); } } |
