Merge branch 'experimental' into dev
This commit is contained in:
@@ -2,13 +2,19 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <fpm/fixed.hpp>
|
||||
#include <td/Maths.h>
|
||||
|
||||
namespace sp {
|
||||
class DataBuffer;
|
||||
} // namespace sp
|
||||
|
||||
namespace td {
|
||||
|
||||
using FpFloat = fpm::fixed_16_16;
|
||||
|
||||
enum class Team : std::uint8_t {
|
||||
Blue = 0,
|
||||
enum class TeamColor : std::int8_t {
|
||||
None = -1,
|
||||
Blue,
|
||||
Red,
|
||||
};
|
||||
|
||||
@@ -30,7 +36,7 @@ enum class EntityType : std::uint8_t {
|
||||
Zombie = 0,
|
||||
Spider,
|
||||
Pigman,
|
||||
Skeleton,
|
||||
Skelon,
|
||||
Creeper,
|
||||
Silverfish,
|
||||
Blaze,
|
||||
@@ -60,12 +66,22 @@ struct TowerCoords {
|
||||
std::int16_t y;
|
||||
};
|
||||
|
||||
struct EntityCoords {
|
||||
FpFloat x;
|
||||
FpFloat y;
|
||||
};
|
||||
using EntityCoords = Vec2<FpFloat>;
|
||||
|
||||
using PeerID = std::uint16_t;
|
||||
using StepsType = std::uint16_t;
|
||||
|
||||
enum class Direction : std::uint8_t {
|
||||
PositiveX = 1 << 0,
|
||||
NegativeX = 1 << 1,
|
||||
PositiveY = 1 << 2,
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user