#pragma once #include "olcUTIL_Geometry2D.h" struct XMLTag; enum MapName{ CAMPAIGN_1_1, CAMPAIGN_1_2, BOSS_1, WORLD_MAP }; struct TileCollisionData{ geom2d::rectcollision; }; struct TilesetData{ Renderable*tileset=nullptr; std::mapforegroundTiles; std::mapupperForegroundTiles; std::mapcollision; std::mapstaircaseTiles; std::map>> animationData; }; struct TileRenderData{ Decal*tileset; vi2d pos; vi2d tileSheetPos; int layerID; }; struct TileGroup{ private: geom2d::rectrange; std::vectortiles; int minX=0,minY=0,maxX=0,maxY=0; public: static float FADE_TIME; //0-255. 255 indicates fully invisible. static uint8_t FADE_AMT; geom2d::rectGetRange(); //The fade range is the bounds in which this tile group will be considered "in range" of a player, one tile in each direction further than its actual range. geom2d::rectGetFadeRange(); std::vector&GetTiles(); void InsertTile(TileRenderData tile); bool playerBehind=false; float fadeFactor=0.f; };