void WaypointSprite_Load();
void CSQC_Init(void)
{
+ prvm_language = cvar_string("prvm_language");
+
#ifdef USE_FTE
#pragma target ID
__engine_check = checkextension("DP_SV_WRITEPICTURE");
}
#pragma target FTE
#endif
-
+
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
}
return l;
}
+
+// translation helpers
+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);
+}
float vercmp(string v1, string v2);
float u8_strsize(string s);
+
+// translation helpers
+string prvm_language;
+string language_filename(string s);
+string CTX(string s);
+#define ZCTX(s) strzone(CTX(s))
float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
-
-string prvm_language;
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;
me.TR(me); \
me.TD(me, 1, 4, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
DIALOG_HUDPANEL_COMMON_NOTOGGLE()
-
-string language_filename(string s);
-string CTX(string s);
-#define ZCTX(s) strzone(CTX(s))