X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qh;h=2eee6d74ef1a4d369286c1fcc01a71588ccd130d;hb=6f4349956b11b36ba20e65e34d39b5029a5eb3ac;hp=49afad22d7f19bc62f552b8dcdbf3884f7e8654d;hpb=4aabbcbfcb5d689c7553db92012b7db84b867afa;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 49afad22d..2eee6d74e 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -222,6 +222,7 @@ switch(id) {\ case HUD_PANEL_ENGINEINFO: panel_name = HUD_PANELNAME_ENGINEINFO; break; \ case HUD_PANEL_INFOMESSAGES: panel_name = HUD_PANELNAME_INFOMESSAGES; break; \ case HUD_PANEL_PHYSICS: panel_name = HUD_PANELNAME_PHYSICS; break; \ + case HUD_PANEL_CENTERPRINT: panel_name = HUD_PANELNAME_CENTERPRINT; break; \ } ENDS_WITH_CURLY_BRACE // Get name of specified panel id @@ -258,3 +259,14 @@ string prvm_language; string language_filename(string s); string CTX(string s); #define ZCTX(s) strzone(CTX(s)) + +// x-encoding (encoding as zero length invisible string) +// encodes approx. 14 bits into 5 bytes of color code string +const float XENCODE_MAX = 21295; // 2*22*22*22-1 +const float XENCODE_LEN = 5; +string xencode(float f); +float xdecode(string s); + +#ifndef COMPAT_XON010_CHANNELS +#define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0) +#endif