mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Remove normal map leftovers (#15609)
leftovers from #10487 / ed22260822
This commit is contained in:
@@ -121,7 +121,6 @@ public:
|
||||
// Shall be called from the main thread.
|
||||
void rebuildImagesAndTextures();
|
||||
|
||||
video::ITexture* getNormalTexture(const std::string &name);
|
||||
video::SColor getTextureAverageColor(const std::string &name);
|
||||
|
||||
private:
|
||||
@@ -488,27 +487,6 @@ void TextureSource::rebuildTexture(video::IVideoDriver *driver, TextureInfo &ti)
|
||||
m_texture_trash.push_back(t_old);
|
||||
}
|
||||
|
||||
video::ITexture* TextureSource::getNormalTexture(const std::string &name)
|
||||
{
|
||||
if (isKnownSourceImage("override_normal.png"))
|
||||
return getTexture("override_normal.png");
|
||||
std::string fname_base = name;
|
||||
static const char *normal_ext = "_normal.png";
|
||||
static const u32 normal_ext_size = strlen(normal_ext);
|
||||
size_t pos = fname_base.find('.');
|
||||
std::string fname_normal = fname_base.substr(0, pos) + normal_ext;
|
||||
if (isKnownSourceImage(fname_normal)) {
|
||||
// look for image extension and replace it
|
||||
size_t i = 0;
|
||||
while ((i = fname_base.find('.', i)) != std::string::npos) {
|
||||
fname_base.replace(i, 4, normal_ext);
|
||||
i += normal_ext_size;
|
||||
}
|
||||
return getTexture(fname_base);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
video::SColor TextureSource::getTextureAverageColor(const std::string &name)
|
||||
{
|
||||
video::IVideoDriver *driver = RenderingEngine::get_video_driver();
|
||||
|
Reference in New Issue
Block a user