Files
Tower-Defense2/include/td/Types.h
2025-07-16 00:32:40 +02:00

79 lines
981 B
C++

#pragma once
#include <cstdint>
#include <fpm/fixed.hpp>
namespace td {
using FpFloat = fpm::fixed_16_16;
enum class TeamColor : std::int8_t {
None = -1,
Blue,
Red,
};
enum class TowerType : std::uint8_t {
Archer = 0,
Leach,
Artillery,
Mage,
Ice,
Poison,
Quake,
Sorcerer,
Zeus,
Necromancer,
Turret,
};
enum class EntityType : std::uint8_t {
Zombie = 0,
Spider,
Pigman,
Skeleton,
Creeper,
Silverfish,
Blaze,
Witch,
Slime,
Giant,
Wither,
// And passive animals
};
enum class ShopItem : std::uint8_t {
Goldmine = 0,
Inferno,
Meteor,
Zeus,
Freeze,
Speed,
Heal,
};
using TowerID = std::uint16_t;
using PlayerID = std::uint8_t;
using EntityID = std::uint16_t;
struct TowerCoords {
std::int16_t x;
std::int16_t y;
};
struct EntityCoords {
FpFloat x;
FpFloat y;
};
using PeerID = std::uint16_t;
enum class Direction : std::uint8_t {
PositiveX = 1 << 0,
NegativeX = 1 << 1,
PositiveY = 1 << 2,
NegativeY = 1 << 3,
};
} // namespace td