float updateCompression()
{
- float fh;
float have_dds, have_jpg, have_tga;
float can_dds;
- if((have_dds = ((fh = fopen("dds/particles/particlefont.dds", FILE_READ)) >= 0)))
- fclose(fh);
- if((have_jpg = ((fh = fopen("particles/particlefont.jpg", FILE_READ)) >= 0)))
- fclose(fh);
- if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
- fclose(fh);
+ have_dds = (fexists("dds/particles/particlefont.dds"));
+ have_dds = (fexists("particles/particlefont.jpg"));
+ have_dds = (fexists("particles/particlefont.tga"));
can_dds = GL_Have_TextureCompression();
if(have_dds && (have_jpg || have_tga))
{
return i;
}
-string language_filename(string s)
-{
- string fn;
- float fh;
- fn = prvm_language;
- if(fn == "" || fn == "dump")
- return s;
- fn = strcat(s, ".", fn);
- if((fh = fopen(fn, FILE_READ)) >= 0)
- {
- fclose(fh);
- return fn;
- }
- return s;
-}
-string CTX(string s)
-{
- float p = strstrofs(s, "^", 0);
- if(p < 0)
- return s;
- return substring(s, p+1, -1);
-}
-
void dialog_hudpanel_common_notoggle(entity me, string panelname)
{
float i;