-// a dummy macro that prevents the "hanging ;" warning
-#define ENDS_WITH_CURLY_BRACE
+#ifndef COMMON_UTIL_H
+#define COMMON_UTIL_H
-#ifdef GMQCC
+#ifdef QCC_SUPPORT_ACCUMULATE
# define ACCUMULATE_FUNCTION(func,otherfunc) \
[[accumulate]] void func() { otherfunc(); }
# define CALL_ACCUMULATED_FUNCTION(func) \
// works for up to 10 decimals!
string ftos_decimals(float number, float decimals);
-float fexists(string f);
+bool fexists(string f);
vector colormapPaletteColor(float c, float isPants);
#ifndef MENUQC
#ifdef CSQC
-float ReadInt24_t();
+int ReadInt24_t();
vector ReadInt48_t();
vector ReadInt72_t();
#else
#endif
// the NULL function
-#ifdef GMQCC
+#ifdef QCC_SUPPORT_NIL
#define func_null nil
#define string_null nil
#else
var void func_null(void);
-var string string_null;
+string string_null;
#endif
float float2range11(float f);
float float2range01(float f);
string get_model_parameters_description;
string get_model_parameters_bone_upperbody;
string get_model_parameters_bone_weapon;
-const float MAX_AIM_BONES = 4;
+const int MAX_AIM_BONES = 4;
string get_model_parameters_bone_aim[MAX_AIM_BONES];
float get_model_parameters_bone_aimweight[MAX_AIM_BONES];
float get_model_parameters_fixbone;
// color code replace, place inside of sprintf and parse the string... defaults described as constants
// foreground/normal colors
-var string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green // primary priority (important names, etc)
-var string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
-var string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue // tertiary priority or relatively inconsequential text
-var string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red // notice/attention grabbing texting
+string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green // primary priority (important names, etc)
+string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
+string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue // tertiary priority or relatively inconsequential text
+string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red // notice/attention grabbing texting
// "kill" colors
-var string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
-var string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
-var string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue // "good" or "beneficial" text (you fragging someone, etc)
+string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
+string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
+string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue // "good" or "beneficial" text (you fragging someone, etc)
// background color
-var string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text
+string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text
string CCR(string input);
#endif
#ifndef MENUQC
-float Mod_Q1BSP_SuperContentsFromNativeContents(float nativecontents);
-float Mod_Q1BSP_NativeContentsFromSuperContents(float supercontents);
+int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents);
+int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents);
#endif
// Quadratic splines (bezier)
#define APPEND_TO_STRING(list,sep,add) ((list) = (((list) != "") ? strcat(list, sep, add) : (add)))
// Returns the correct difference between two always increasing numbers
-#define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from)
\ No newline at end of file
+#define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from)
+#endif