- fixed writable tiles.

This commit is contained in:
Christoph Oelckers 2020-05-28 18:42:26 +02:00
parent 5e93b8f3e7
commit f6ca5fa650

View file

@ -379,8 +379,9 @@ inline bool tileLoad(int tileNum)
inline uint8_t* tileData(int num)
{
auto tex = TileFiles.tiledata[num].texture;
auto p = dynamic_cast<FWritableTile*>(tex->GetTexture());
auto tex = dynamic_cast<FImageTexture*>(TileFiles.tiledata[num].texture->GetTexture());
if (!tex) return nullptr;
auto p = dynamic_cast<FWritableTile*>(tex->GetImage());
return p ? p->GetRawData() : nullptr;
}