Preparing for additional materials
Drawing basic light streams is fairly nifty. But let's face it, we want to do more than that! Any additional processing is going to require further material information about the surfaces we're working with. As far as storing those materials goes, the Map
class needs to allocate additional space for textures that will be used for this purpose:
class Map : ..., public LightUser { public: ... void Draw(MaterialMapContainer& l_materials, Window& l_window, int l_layer); protected: ... std::array<sf::RenderTexture, Sheet::Num_Layers> m_textures; std::array<sf::RenderTexture, Sheet::Num_Layers> m_normals; std::array<sf::RenderTexture, Sheet::Num_Layers> m_speculars; std::array<sf::RenderTexture, Sheet::Num_Layers> m_heightMap; ... };
These textures will also need to be checked for incorrect sizes and adjusted if it ever comes to that:
void Map::CheckTextureSizes(int l_fromZ, int l_toZ) { auto realMapSize...