fix: tidy director/jdraw8/jinput/jfile (locals UPPER_CASE, file_*→Jf::)

This commit is contained in:
2026-05-16 14:57:07 +02:00
parent 35cdd88cbb
commit ae89b252e2
8 changed files with 72 additions and 68 deletions
+7 -7
View File
@@ -30,7 +30,7 @@ auto SDL_AppInit(void** /*appstate*/, int /*argc*/, char* /*argv*/[]) -> SDL_App
srand(unsigned(time(nullptr)));
// Crea la carpeta de configuració i carrega les opcions
file_setconfigfolder("jailgames/aee");
Jf::setConfigFolder("jailgames/aee");
// Ruta absoluta a data/ basada en la ubicació de l'executable.
// SDL_GetBasePath() detecta automàticament si estem dins d'un .app bundle
@@ -39,7 +39,7 @@ auto SDL_AppInit(void** /*appstate*/, int /*argc*/, char* /*argv*/[]) -> SDL_App
std::string resource_pack_path;
if (base_path != nullptr) {
const std::string data_path = std::string(base_path) + "data/";
file_setresourcefolder(data_path.c_str());
Jf::setResourceFolder(data_path.c_str());
resource_pack_path = std::string(base_path) + "resources.pack";
} else {
resource_pack_path = "resources.pack";
@@ -57,17 +57,17 @@ auto SDL_AppInit(void** /*appstate*/, int /*argc*/, char* /*argv*/[]) -> SDL_App
return SDL_APP_FAILURE;
}
Options::setConfigFile(std::string(file_getconfigfolder()) + "config.yaml");
Options::setConfigFile(std::string(Jf::getConfigFolder()) + "config.yaml");
Options::loadFromFile();
// KeyConfig: defaults des de data/input/keys.yaml + overrides de l'usuari
KeyConfig::init("input/keys.yaml",
std::string(file_getconfigfolder()) + "keys.yaml");
std::string(Jf::getConfigFolder()) + "keys.yaml");
#ifndef NDEBUG
// debug.yaml: estat inicial de gameplay per a tests ràpids,
// només en builds de debug.
Options::setDebugFile(std::string(file_getconfigfolder()) + "debug.yaml");
Options::setDebugFile(std::string(Jf::getConfigFolder()) + "debug.yaml");
Options::loadDebugFromFile();
#endif
@@ -84,9 +84,9 @@ auto SDL_AppInit(void** /*appstate*/, int /*argc*/, char* /*argv*/[]) -> SDL_App
Locale::load("locale/ca.yaml");
// Carrega presets de shaders
Options::setPostFXFile(std::string(file_getconfigfolder()) + "postfx.yaml");
Options::setPostFXFile(std::string(Jf::getConfigFolder()) + "postfx.yaml");
Options::loadPostFXFromFile();
Options::setCrtPiFile(std::string(file_getconfigfolder()) + "crtpi.yaml");
Options::setCrtPiFile(std::string(Jf::getConfigFolder()) + "crtpi.yaml");
Options::loadCrtPiFromFile();
Jg::init();