summaryrefslogtreecommitdiffstats
path: root/game/shared/coord.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-06-28 01:59:49 +0500
committeruntodesu <kirill@untode.su>2025-06-28 01:59:49 +0500
commit61e5bcef2629e2d68b805a956a96fff264d4f74d (patch)
treebca3a94bac79d34e3c0db57c77604f5a823ecbda /game/shared/coord.hh
parent88c01588aa0830e219eaa62588839e4d1e2883ce (diff)
downloadvoxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.tar.bz2
voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.zip
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)
Diffstat (limited to 'game/shared/coord.hh')
-rw-r--r--game/shared/coord.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/game/shared/coord.hh b/game/shared/coord.hh
index 4a11e60..f1a2e70 100644
--- a/game/shared/coord.hh
+++ b/game/shared/coord.hh
@@ -53,9 +53,9 @@ inline constexpr chunk_pos coord::to_chunk(const voxel_pos& vpos)
inline constexpr local_pos coord::to_local(const voxel_pos& vpos)
{
return local_pos {
- static_cast<local_pos::value_type>(cxpr::mod_signed<voxel_pos::value_type>(vpos.x, CHUNK_SIZE)),
- static_cast<local_pos::value_type>(cxpr::mod_signed<voxel_pos::value_type>(vpos.y, CHUNK_SIZE)),
- static_cast<local_pos::value_type>(cxpr::mod_signed<voxel_pos::value_type>(vpos.z, CHUNK_SIZE)),
+ static_cast<local_pos::value_type>(vx::mod_signed<voxel_pos::value_type>(vpos.x, CHUNK_SIZE)),
+ static_cast<local_pos::value_type>(vx::mod_signed<voxel_pos::value_type>(vpos.y, CHUNK_SIZE)),
+ static_cast<local_pos::value_type>(vx::mod_signed<voxel_pos::value_type>(vpos.z, CHUNK_SIZE)),
};
}
@@ -118,7 +118,8 @@ inline constexpr glm::fvec3 coord::to_relative(const chunk_pos& pivot_cpos, cons
};
}
-inline constexpr glm::fvec3 coord::to_relative(const chunk_pos& pivot_cpos, const glm::fvec3& pivot_fvec, const chunk_pos& cpos, const glm::fvec3& fvec)
+inline constexpr glm::fvec3 coord::to_relative(
+ const chunk_pos& pivot_cpos, const glm::fvec3& pivot_fvec, const chunk_pos& cpos, const glm::fvec3& fvec)
{
return glm::fvec3 {
static_cast<float>((cpos.x - pivot_cpos.x) << CHUNK_BITSHIFT) + (fvec.x - pivot_fvec.x),