Now the spatialmap determines the 'wiggle factor' when there's multiple entities in a cell, which staggers them visually. Closes #78.

This commit is contained in:
Zed A. Shaw 2025-08-03 01:56:34 -04:00
parent 694ee210d6
commit 9c02fb846b
4 changed files with 35 additions and 21 deletions

View file

@ -10,10 +10,16 @@ struct CollisionData {
bool collision = false;
};
struct EntityDistance {
int dist_square=0;
DinkyECS::Entity entity=DinkyECS::NONE;
float wiggle=0.0f;
};
// Point's has is in point.hpp
using EntityList = std::vector<DinkyECS::Entity>;
using PointEntityMap = std::unordered_multimap<Point, CollisionData>;
using SortedEntities = std::vector<std::pair<int, DinkyECS::Entity>>;
using SortedEntities = std::vector<EntityDistance>;
struct FoundEntities {
bool found;