passant Asset a singleton de tota la vida

This commit is contained in:
2025-05-29 13:39:53 +02:00
parent 5fd987c6a1
commit 2c2685f73c
7 changed files with 196 additions and 173 deletions

View File

@@ -231,7 +231,7 @@ void Screen::renderInfo()
void Screen::loadShaders()
{
const std::string GLSL_FILE = param.game.game_area.rect.h == 256 ? "crtpi_256.glsl" : "crtpi_240.glsl";
std::ifstream f(Asset::get().get(GLSL_FILE).c_str());
std::ifstream f(Asset::get()->get(GLSL_FILE).c_str());
shader_source_ = std::string((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
}