Big changes

This commit is contained in:
Kirill Yurkin
2025-03-07 16:54:27 +03:00
parent dd05797b95
commit 719171e7d8
21 changed files with 817 additions and 285 deletions

View File

@@ -67,10 +67,10 @@ void TexturesManager::Init()
void TexturesManager::Shutdown()
{
if (!m_textures.empty()) {
Msg("--- unfreed textures ---");
LogMsg("--- unfreed textures ---");
for (std::vector<Texture2D*>::iterator it = m_textures.begin(); it != m_textures.end(); ++it) {
Msg("%s", (*it)->m_textureFileName.c_str());
LogMsg("%s", (*it)->m_textureFileName.c_str());
delete* it;
*it = NULL;
}
@@ -99,7 +99,7 @@ Texture2D* TexturesManager::CreateManual2D(const char* name, int width, int heig
texture->m_textureFileName = name;
if (useAsRenderTarget)
Msg("Created rt texture [%s]", name);
LogMsg("Created rt texture [%s]", name);
return texture;
}
@@ -179,12 +179,12 @@ Texture2D* TexturesManager::LoadTexture2D(const char* texturename, bool useMipma
if (useMipmaps)
texture->GenerateMipmaps();
Msg("loaded %s", fs::getFilenameWithoutPathAndExtension(texturename).c_str());
LogMsg("loaded %s", fs::getFilenameWithoutPathAndExtension(texturename).c_str());
m_textures.push_back(texture);
return texture;
}
else if (texnamebuf.empty() && m_notex) {
Msg("not found %s", fs::getFilenameWithoutPathAndExtension(texturename).c_str());
LogMsg("not found %s", fs::getFilenameWithoutPathAndExtension(texturename).c_str());
return m_notex;
}