remove glm dependency

This commit is contained in:
Simon Pribylski
2022-10-13 12:24:15 +02:00
parent bba9ef8219
commit 6e0923ac75
20 changed files with 110 additions and 71 deletions

View File

@@ -160,7 +160,7 @@ const Color* World::GetTileColor(TilePtr tile) const {
return nullptr;
}
bool World::CanPlaceLittleTower(const glm::vec2& worldPos, PlayerID playerID) const {
bool World::CanPlaceLittleTower(const Vec2f& worldPos, PlayerID playerID) const {
TilePtr tile = GetTile(worldPos.x, worldPos.y);
const Player& player = m_Game->GetPlayers()[playerID];
@@ -186,7 +186,7 @@ bool World::CanPlaceLittleTower(const glm::vec2& worldPos, PlayerID playerID) co
return false;
}
bool World::CanPlaceBigTower(const glm::vec2& worldPos, PlayerID playerID) const {
bool World::CanPlaceBigTower(const Vec2f& worldPos, PlayerID playerID) const {
if (!CanPlaceLittleTower(worldPos, playerID)) return false;
TilePtr tile = GetTile(worldPos.x, worldPos.y);
@@ -224,7 +224,7 @@ void World::CleanDeadMobs() {
}
}
TowerPtr World::GetTower(const glm::vec2& position) const {
TowerPtr World::GetTower(const Vec2f& position) const {
for (TowerPtr tower : m_Towers) {
if (tower->GetSize() == TowerSize::Big) {
if (tower->GetCenterX() - 2.5f < position.x && tower->GetCenterX() + 2.5f > position.x &&