diff options
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -74,6 +74,15 @@ class TileAnimation }; /** + * Small struct to reference visible actors and their draw order. + */ +struct FringeActor +{ + int drawOrder; + Actor *actor; +}; + +/** * A map layer. Stores a grid of tiles and their offset, and implements layer * rendering. */ @@ -120,7 +129,7 @@ class MapLayer int startX, int startY, int endX, int endY, int scrollX, int scrollY, - const Actors &actors, + const std::vector<FringeActor> &actors, int debugFlags) const; bool isFringeLayer() const @@ -418,5 +427,8 @@ class Map : public Properties std::map<int, TileAnimation> mTileAnimations; + // Array of visible actors, reused to reduce allocations + std::vector<FringeActor> mVisibleActors; + int mMask = 1; }; |