Jeck - CommonRes transparently finds themed versions of files. Use JRenderer::LoadTexture for unthemed files, and CommonRes::LoadTexture for themed files. Res/graphics/back.jpg renamed to Res/graphics/backdrop.jpg due to collision with sets/back.jpg.

This commit is contained in:
wagic.jeck
2009-08-27 05:58:26 +00:00
parent c6406737c5
commit 5e14efed3c
25 changed files with 527 additions and 286 deletions
+1 -20
View File
@@ -34,6 +34,7 @@ const string Options::INTERRUPTMYSPELLS = "interruptMySpells";
const string Options::INTERRUPTMYABILITIES = "interruptMyAbilities";
const string Options::OSD = "displayOSD";
const string Options::ACTIVE_THEME = "Theme";
const string Options::ACTIVE_MODE = "Mode";
//Global options
const string Options::ACTIVE_PROFILE = "_gProfile";
const string Options::DIFFICULTY_MODE_UNLOCKED = "_gprx_handler"; //huhu
@@ -278,26 +279,6 @@ string GameSettings::profileFile(string filename, string fallback,bool sanity, b
return buf;
}
string GameSettings::themeGraphic(string filename)
{
char buf[4096];
string theme = (*this)[Options::ACTIVE_THEME].str;
if(theme == "" || theme == "default"){
sprintf(buf,"graphics/%s",filename.c_str());
return buf;
}
sprintf(buf,RESPATH"/themes/%s/%s",theme.c_str(),filename.c_str());
if(fileExists(buf)){
sprintf(buf,"themes/%s/%s",theme.c_str(),filename.c_str());
return buf;
}
sprintf(buf,"graphics/%s",filename.c_str());
return buf;
}
void GameSettings::checkProfile(){