MCPcopy Index your code
hub / github.com/assaultcube/AC / gmode_enum

Function gmode_enum

source/src/protocol.cpp:536–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536char *gmode_enum(int gm, char *buf) // convert mode bitmask to string with sorted list of mode acronyms
537{
538 vector<const char *> mas;
539 loopi(GMODE_NUM) if(gm & (1 << i)) mas.add(modeacronymnames[i + 1]);
540 mas.sort(stringsortignorecase);
541 buf[0] = '\0';
542 loopv(mas) concatformatstring(buf, "%s%s", i ? "|" : "", mas[i]);
543 filtertext(buf, buf, FTXT_TOLOWER);
544 return buf;
545}
546
547int encodepitch(float p) // pitch value quantisation: use double resolution for -30°..30° and half resolution for -90°..-30° and 30°..90°
548{

Callers 6

loadMethod · 0.85
initmapMethod · 0.85
recalcgamesuggestionsMethod · 0.85
loopvFunction · 0.85
entstats_Function · 0.85
modeinfoFunction · 0.85

Calls 6

concatformatstringFunction · 0.85
filtertextFunction · 0.85
sortMethod · 0.80
loopiFunction · 0.70
loopvFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected