From 458e0005690ea9d579588a0a12368fc2c2c9a93a Mon Sep 17 00:00:00 2001 From: untodesu Date: Tue, 1 Jul 2025 03:08:39 +0500 Subject: I hyper-focued on refactoring again - I put a cool-sounding "we are number one" remix on repeat and straight up grinded the entire repository to a better state until 03:09 AM. I guess I have something wrong in my brain that makes me do this shit --- src/game/shared/types.hh | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/game/shared/types.hh (limited to 'src/game/shared/types.hh') diff --git a/src/game/shared/types.hh b/src/game/shared/types.hh deleted file mode 100644 index 161ea46..0000000 --- a/src/game/shared/types.hh +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef SHARED_TYPES_HH -#define SHARED_TYPES_HH 1 -#pragma once - -using item_id = std::uint32_t; -constexpr static item_id NULL_ITEM_ID = UINT32_C(0x00000000); -constexpr static item_id MAX_ITEM_ID = UINT32_C(0xFFFFFFFF); - -using voxel_id = std::uint16_t; -constexpr static voxel_id NULL_VOXEL_ID = UINT16_C(0x0000); -constexpr static voxel_id MAX_VOXEL_ID = UINT16_C(0xFFFF); - -using chunk_pos = glm::vec<3, std::int32_t>; -using local_pos = glm::vec<3, std::int16_t>; -using voxel_pos = glm::vec<3, std::int64_t>; - -using chunk_pos_xz = glm::vec<2, chunk_pos::value_type>; -using local_pos_xz = glm::vec<2, local_pos::value_type>; -using voxel_pos_xz = glm::vec<2, local_pos::value_type>; - -template<> -struct std::hash final { - constexpr inline std::size_t operator()(const chunk_pos& cpos) const - { - std::size_t value = 0; - value ^= cpos.x * 73856093; - value ^= cpos.y * 19349663; - value ^= cpos.z * 83492791; - return value; - } -}; - -template<> -struct std::hash final { - constexpr inline std::size_t operator()(const chunk_pos_xz& cwpos) const - { - std::size_t value = 0; - value ^= cwpos.x * 73856093; - value ^= cwpos.y * 19349663; - return value; - } -}; - -#endif // SHARED_TYPES_HH -- cgit