Pasaeta de include-what-you-use

This commit is contained in:
2024-10-13 21:58:36 +02:00
parent d0a6e4c572
commit 9825c7fb9b
28 changed files with 229 additions and 239 deletions

View File

@@ -62,7 +62,6 @@ bool Texture::loadFromFile(const std::string &path)
if (!data)
{
#ifdef VERBOSE
const std::string file_name = path.substr(path.find_last_of("\\/") + 1);
std::cout << "Loading image failed: " << stbi_failure_reason() << std::endl;
#endif
exit(1);
@@ -240,14 +239,14 @@ SDL_Texture *Texture::getSDLTexture()
}
// Crea una nueva surface
Surface Texture::newSurface(int w, int h)
/*Surface Texture::newSurface(int w, int h)
{
Surface surf = static_cast<Surface>(malloc(sizeof(surface_s)));
surf->w = w;
surf->h = h;
surf->data = static_cast<Uint8 *>(malloc(w * h));
return surf;
}
}*/
// Elimina una surface
void Texture::deleteSurface(Surface surface)
@@ -345,7 +344,7 @@ std::vector<Uint32> Texture::loadPal(const std::string &file_name)
fread(buffer, size, 1, f);
fclose(f);
const auto pal = LoadPalette(buffer);
const auto *pal = LoadPalette(buffer);
if (!pal)
{
return palette;