int buf_load(string filename);
void buf_save(int buf, string filename);
+// adding just 0.4 for race times so it rounds down in the .5 case (matching the timer display)
+// FIXME it doesn't round properly
#define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
string format_time(float seconds);
string mmsss(float t);
#define TIME_ENCODED_TOSTRING(n) mmssss(n)
#define RACE_RECORD "/race100record/"
#define CTS_RECORD "/cts100record/"
+#define CTF_RECORD "/ctf100record/"
#define TIME_ENCODE(t) TIME_TO_NTHS(t, TIME_FACTOR)
#define TIME_DECODE(n) ((n) / TIME_FACTOR)
float almost_equals(float a, float b);
float almost_in_bounds(float a, float b, float c);
-float power2of(float e);
-float log2of(float x);
-
-vector rgb_to_hsl(vector rgb);
-vector hsl_to_rgb(vector hsl);
-vector rgb_to_hsv(vector rgb);
-vector hsv_to_rgb(vector hsv);
-string rgb_to_hexcolor(vector rgb);
-
float boxesoverlap(vector m1, vector m2, vector m3, vector m4);
float boxinsidebox(vector smins, vector smaxs, vector bmins, vector bmaxs);
string getcurrentmod();
-#ifdef GAMEQC
-#ifdef CSQC
-int ReadInt24_t();
-#else
-void WriteInt24_t(float dest, float val);
-void WriteInt48_t(float dest, vector val);
-void WriteInt72_t(float dest, vector val);
-#endif
-#endif
-
float float2range11(float f);
float float2range01(float f);
// f(1) = 1
// f'(0) = startspeedfactor
// f'(1) = endspeedfactor
-float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float x);
+float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float spd);
// checks whether f'(x) = 0 anywhere from 0 to 1
// because if this is the case, the function is not usable for platforms
#define fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__))
#define bprintf(...) bprint(sprintf(__VA_ARGS__))
+#ifdef GAMEQC
string CCR(string input);
+#endif
#ifdef GAMEQC
#ifdef CSQC