diff options
Diffstat (limited to 'game/shared')
| -rw-r--r-- | game/shared/const.hh | 4 | ||||
| -rw-r--r-- | game/shared/coord.hh | 8 | ||||
| -rw-r--r-- | game/shared/entity/collision.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/factory.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/gravity.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/head.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/player.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/stasis.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/transform.hh | 4 | ||||
| -rw-r--r-- | game/shared/entity/velocity.hh | 4 | ||||
| -rw-r--r-- | game/shared/globals.hh | 4 | ||||
| -rw-r--r-- | game/shared/pch.hh | 4 | ||||
| -rw-r--r-- | game/shared/protocol.hh | 4 | ||||
| -rw-r--r-- | game/shared/splash.hh | 4 | ||||
| -rw-r--r-- | game/shared/types.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/chunk.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/dimension.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/feature.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/item_registry.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/voxel_registry.hh | 4 | ||||
| -rw-r--r-- | game/shared/world/voxel_storage.hh | 4 |
21 files changed, 2 insertions, 86 deletions
diff --git a/game/shared/const.hh b/game/shared/const.hh index 0755848..187962a 100644 --- a/game/shared/const.hh +++ b/game/shared/const.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_CONST_HH -#define SHARED_CONST_HH 1 #pragma once #include "core/math/constexpr.hh" @@ -43,5 +41,3 @@ constexpr static glm::vec<2, T> ZERO_VEC2 = glm::vec<2, T>(0, 0); template<typename T> constexpr static glm::vec<3, T> ZERO_VEC3 = glm::vec<3, T>(0, 0, 0); - -#endif // SHARED_CONST_HH diff --git a/game/shared/coord.hh b/game/shared/coord.hh index 18d45b5..9d9be18 100644 --- a/game/shared/coord.hh +++ b/game/shared/coord.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_COORD_HH -#define SHARED_COORD_HH 1 #pragma once #include "shared/const.hh" @@ -118,8 +116,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), @@ -145,5 +143,3 @@ inline constexpr glm::fvec3 coord::to_fvec3(const chunk_pos& cpos, const glm::fv fpos.z + static_cast<float>(cpos.z << CHUNK_BITSHIFT), }; } - -#endif // SHARED_COORD_HH diff --git a/game/shared/entity/collision.hh b/game/shared/entity/collision.hh index 536a066..33ddaac 100644 --- a/game/shared/entity/collision.hh +++ b/game/shared/entity/collision.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_COLLISION_HH -#define SHARED_ENTITY_COLLISION_HH 1 #pragma once #include "core/math/aabb.hh" @@ -21,5 +19,3 @@ public: static void fixed_update(world::Dimension* dimension); }; } // namespace entity - -#endif // SHARED_ENTITY_COLLISION_HH diff --git a/game/shared/entity/factory.hh b/game/shared/entity/factory.hh index c0e0716..e709060 100644 --- a/game/shared/entity/factory.hh +++ b/game/shared/entity/factory.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_FACTORY_HH -#define SHARED_ENTITY_FACTORY_HH 1 #pragma once namespace world @@ -11,5 +9,3 @@ namespace entity::shared { void create_player(world::Dimension* dimension, entt::entity entity); } // namespace entity::shared - -#endif // SHARED_ENTITY_FACTORY_HH diff --git a/game/shared/entity/gravity.hh b/game/shared/entity/gravity.hh index 064f92d..21f4582 100644 --- a/game/shared/entity/gravity.hh +++ b/game/shared/entity/gravity.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_GRAVITY_HH -#define SHARED_ENTITY_GRAVITY_HH 1 #pragma once namespace world @@ -14,5 +12,3 @@ public: static void fixed_update(world::Dimension* dimension); }; } // namespace entity - -#endif // SHARED_ENTITY_GRAVITY_HH diff --git a/game/shared/entity/head.hh b/game/shared/entity/head.hh index 1437207..3f5d6d1 100644 --- a/game/shared/entity/head.hh +++ b/game/shared/entity/head.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_HEAD_HH -#define SHARED_ENTITY_HEAD_HH 1 #pragma once namespace entity @@ -16,5 +14,3 @@ namespace entity::client struct HeadIntr final : public Head {}; struct HeadPrev final : public Head {}; } // namespace entity::client - -#endif // SHARED_ENTITY_HEAD_HH diff --git a/game/shared/entity/player.hh b/game/shared/entity/player.hh index 3c8be32..4bd0217 100644 --- a/game/shared/entity/player.hh +++ b/game/shared/entity/player.hh @@ -1,10 +1,6 @@ -#ifndef SHARED_ENTITY_PLAYER_HH -#define SHARED_ENTITY_PLAYER_HH 1 #pragma once namespace entity { struct Player final {}; } // namespace entity - -#endif // SHARED_ENTITY_PLAYER_HH diff --git a/game/shared/entity/stasis.hh b/game/shared/entity/stasis.hh index 27c0131..e6cb9e4 100644 --- a/game/shared/entity/stasis.hh +++ b/game/shared/entity/stasis.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_STASIS_HH -#define SHARED_ENTITY_STASIS_HH 1 #pragma once namespace world @@ -16,5 +14,3 @@ public: static void fixed_update(world::Dimension* dimension); }; } // namespace entity - -#endif // SHARED_ENTITY_STASIS_HH diff --git a/game/shared/entity/transform.hh b/game/shared/entity/transform.hh index b1fdcf4..2b357f8 100644 --- a/game/shared/entity/transform.hh +++ b/game/shared/entity/transform.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_TRANSFORM_HH -#define SHARED_ENTITY_TRANSFORM_HH 1 #pragma once #include "shared/types.hh" @@ -30,5 +28,3 @@ namespace entity::client struct TransformIntr final : public Transform {}; struct TransformPrev final : public Transform {}; } // namespace entity::client - -#endif // SHARED_ENTITY_TRANSFORM_HH diff --git a/game/shared/entity/velocity.hh b/game/shared/entity/velocity.hh index 5d4ec03..c8a1c91 100644 --- a/game/shared/entity/velocity.hh +++ b/game/shared/entity/velocity.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ENTITY_VELOCITY_HH -#define SHARED_ENTITY_VELOCITY_HH 1 #pragma once namespace world @@ -19,5 +17,3 @@ public: static void fixed_update(world::Dimension* dimension); }; } // namespace entity - -#endif // SHARED_VELOCITY_HH diff --git a/game/shared/globals.hh b/game/shared/globals.hh index bfaf6cb..39a12a7 100644 --- a/game/shared/globals.hh +++ b/game/shared/globals.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_GLOBALS_HH -#define SHARED_GLOBALS_HH 1 #pragma once namespace globals @@ -19,5 +17,3 @@ namespace globals { extern std::uint64_t curtime; } // namespace globals - -#endif // SHARED_GLOBALS_HH diff --git a/game/shared/pch.hh b/game/shared/pch.hh index 95ee6d0..e978e0f 100644 --- a/game/shared/pch.hh +++ b/game/shared/pch.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_PCH_HH -#define SHARED_PCH_HH 1 #pragma once #include <core/pch.hh> // inherit dependent includes from core.lib @@ -19,5 +17,3 @@ #include <spdlog/sinks/basic_file_sink.h> #include <spdlog/sinks/stdout_color_sinks.h> - -#endif // SHARED_PCH_HH diff --git a/game/shared/protocol.hh b/game/shared/protocol.hh index 0b6038b..21f9da9 100644 --- a/game/shared/protocol.hh +++ b/game/shared/protocol.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_PROTOCOL_HH -#define SHARED_PROTOCOL_HH 1 #pragma once #include "shared/world/chunk.hh" @@ -212,5 +210,3 @@ struct protocol::DimensionInfo final : public protocol::Base<0x0012> { std::string name; float gravity; }; - -#endif // SHARED_PROTOCOL_HH diff --git a/game/shared/splash.hh b/game/shared/splash.hh index 2857621..be80cd6 100644 --- a/game/shared/splash.hh +++ b/game/shared/splash.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_SPLASH_HH -#define SHARED_SPLASH_HH 1 #pragma once namespace splash @@ -8,5 +6,3 @@ void init_client(void); void init_server(void); std::string_view get(void); } // namespace splash - -#endif // SHARED_SPLASH_HH diff --git a/game/shared/types.hh b/game/shared/types.hh index 161ea46..792ed0f 100644 --- a/game/shared/types.hh +++ b/game/shared/types.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_TYPES_HH -#define SHARED_TYPES_HH 1 #pragma once using item_id = std::uint32_t; @@ -40,5 +38,3 @@ struct std::hash<chunk_pos_xz> final { return value; } }; - -#endif // SHARED_TYPES_HH diff --git a/game/shared/world/chunk.hh b/game/shared/world/chunk.hh index 4f70453..439694c 100644 --- a/game/shared/world/chunk.hh +++ b/game/shared/world/chunk.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_CHUNK_HH -#define SHARED_CHUNK_HH 1 #pragma once #include "shared/world/voxel_storage.hh" @@ -42,5 +40,3 @@ private: unsigned int m_biome; }; } // namespace world - -#endif // SHARED_CHUNK_HH diff --git a/game/shared/world/dimension.hh b/game/shared/world/dimension.hh index 3a383ac..8b6691d 100644 --- a/game/shared/world/dimension.hh +++ b/game/shared/world/dimension.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_DIMENSION_HH -#define SHARED_DIMENSION_HH 1 #pragma once #include "shared/const.hh" @@ -100,5 +98,3 @@ struct VoxelSetEvent final { Chunk* chunk; }; } // namespace world - -#endif // SHARED_DIMENSION_HH diff --git a/game/shared/world/feature.hh b/game/shared/world/feature.hh index e8465e3..5008223 100644 --- a/game/shared/world/feature.hh +++ b/game/shared/world/feature.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_FEATURE_HH -#define SHARED_FEATURE_HH 1 #pragma once #include "shared/types.hh" @@ -22,5 +20,3 @@ public: void place(const voxel_pos& vpos, const chunk_pos& cpos, VoxelStorage& voxels) const; }; } // namespace world - -#endif // SHARED_FEATURE_HH diff --git a/game/shared/world/item_registry.hh b/game/shared/world/item_registry.hh index 7508f2a..74bd60a 100644 --- a/game/shared/world/item_registry.hh +++ b/game/shared/world/item_registry.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_ITEM_REGISTRY_HH -#define SHARED_ITEM_REGISTRY_HH 1 #pragma once #include "core/resource/resource.hh" @@ -64,5 +62,3 @@ namespace world::item_registry { std::uint64_t calculate_checksum(void); } // namespace world::item_registry - -#endif // SHARED_ITEM_REGISTRY_HH diff --git a/game/shared/world/voxel_registry.hh b/game/shared/world/voxel_registry.hh index 9a7e206..6ab8c97 100644 --- a/game/shared/world/voxel_registry.hh +++ b/game/shared/world/voxel_registry.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_VOXEL_REGISTRY_HH -#define SHARED_VOXEL_REGISTRY_HH 1 #pragma once #include "shared/types.hh" @@ -149,5 +147,3 @@ namespace world::voxel_registry { std::uint64_t calculate_checksum(void); } // namespace world::voxel_registry - -#endif // SHARED_VOXEL_REGISTRY_HH diff --git a/game/shared/world/voxel_storage.hh b/game/shared/world/voxel_storage.hh index fdb6e33..ac7f03d 100644 --- a/game/shared/world/voxel_storage.hh +++ b/game/shared/world/voxel_storage.hh @@ -1,5 +1,3 @@ -#ifndef SHARED_VOXEL_STORAGE_HH -#define SHARED_VOXEL_STORAGE_HH 1 #pragma once #include "shared/const.hh" @@ -20,5 +18,3 @@ public: void deserialize(io::ReadBuffer& buffer); }; } // namespace world - -#endif // SHARED_VOXEL_STORAGE_HH |
