Misc patches

This commit is contained in:
Er2
2024-03-28 14:39:40 +03:00
parent c9b4449bac
commit b8c01e085f
119 changed files with 1414 additions and 794 deletions

View File

@@ -19,11 +19,17 @@ int Textures::loadTexture(const std::string& name, bool bIsRequired)
Texture t = m_pPlatform->loadTexture(name, bIsRequired);
int result = -1;
if (t.m_pixels)
result = assignTexture(name, t);
return result;
if (!t.m_pixels)
{
t.field_C = 1;
t.field_D = 0;
t.m_width = 2;
t.m_height = 2;
t.m_pixels = new uint32_t[t.m_width * t.m_height];
t.m_pixels[0] = t.m_pixels[2] = 0xfff800f8;
t.m_pixels[1] = t.m_pixels[3] = 0xff000000;
}
return assignTexture(name, t);
}
int Textures::assignTexture(const std::string& name, Texture& texture)