X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qh;h=a15855753217765d2396f6ab38f89e127a5060dc;hb=59c257eff12dbe51d08f3913b8c73102e3478a6e;hp=77b3e03202817a61ef6325761c764ce0de357aff;hpb=9334cf53b0bdefd6710e84a4ba2f5e4fb97818c9;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 77b3e0320..a15855753 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,3 +1,6 @@ +// a dummy macro that prevents the "hanging ;" warning +#define ENDS_WITH_CURLY_BRACE + #define ACCUMULATE_FUNCTION(func,otherfunc) \ #ifdef func \ void __merge__##otherfunc() { func(); otherfunc(); } \ @@ -139,7 +142,7 @@ string getWrappedLine_remaining; string getWrappedLine(float w, vector size, textLengthUpToWidth_widthFunction_t tw); string getWrappedLineLen(float w, textLengthUpToLength_lenFunction_t tw); -float isGametypeInFilter(float gt, float tp, string pattern); +float isGametypeInFilter(float gt, float tp, float ts, string pattern); typedef void(float i1, float i2, entity pass) swapfunc_t; // is only ever called for i1 < i2 typedef float(float i1, float i2, entity pass) comparefunc_t; // <0 for <, ==0 for ==, >0 for > (like strcmp) @@ -162,7 +165,7 @@ void check_unacceptable_compiler_bugs(); float compressShotOrigin(vector v); vector decompressShotOrigin(float f); -string rankings_reply, lsmaps_reply, lsnewmaps_reply, maplist_reply; // cached replies +string rankings_reply, ladder_reply, lsmaps_reply, lsnewmaps_reply, maplist_reply; // cached replies string records_reply[10]; float RandomSelection_totalweight; @@ -216,7 +219,7 @@ float get_model_parameters(string mod, float skn); // call with string_null to c switch(id) {\ case HUD_PANEL_ENGINEINFO: panel_name = HUD_PANELNAME_ENGINEINFO; break; \ case HUD_PANEL_INFOMESSAGES: panel_name = HUD_PANELNAME_INFOMESSAGES; break; \ -} +} ENDS_WITH_CURLY_BRACE // Get name of specified panel id #define HUD_Panel_GetName(id) \ @@ -242,3 +245,13 @@ vector vec2(vector v); #ifndef MENUQC vector NearestPointOnBox(entity box, vector org); #endif + +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))