too many things

This commit is contained in:
2025-07-18 13:11:18 +02:00
parent b788caafa6
commit 6d0e56eb46
26 changed files with 529 additions and 191 deletions

View File

@@ -2,6 +2,11 @@
#include <cstdint>
#include <fpm/fixed.hpp>
#include <td/Maths.h>
namespace sp {
class DataBuffer;
} // namespace sp
namespace td {
@@ -31,7 +36,7 @@ enum class EntityType : std::uint8_t {
Zombie = 0,
Spider,
Pigman,
Skeleton,
Skelon,
Creeper,
Silverfish,
Blaze,
@@ -61,10 +66,7 @@ struct TowerCoords {
std::int16_t y;
};
struct EntityCoords {
FpFloat x;
FpFloat y;
};
using EntityCoords = Vec2<FpFloat>;
using PeerID = std::uint16_t;
@@ -75,4 +77,10 @@ enum class Direction : std::uint8_t {
NegativeY = 1 << 3,
};
sp::DataBuffer& operator<<(sp::DataBuffer& a_Buffer, const EntityCoords& a_Coords);
sp::DataBuffer& operator<<(sp::DataBuffer& a_Buffer, const FpFloat& a_Float);
sp::DataBuffer& operator>>(sp::DataBuffer& a_Buffer, EntityCoords& a_Coords);
sp::DataBuffer& operator>>(sp::DataBuffer& a_Buffer, FpFloat& a_Float);
} // namespace td