X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qh;h=3d4e9b9e9ea673d1a30207930b0485b9158d8834;hb=a08620064dbe59abd194f302768d65934b87b6df;hp=2afe65f3735b128b128d99afd2d6070688cc5aa8;hpb=73b5db7874a1916b8d2fff36ab49607314a925dc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 2afe65f37..3d4e9b9e9 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,7 +1,4 @@ -// a dummy macro that prevents the "hanging ;" warning -#define ENDS_WITH_CURLY_BRACE - -#ifdef GMQCC +#ifdef QCC_SUPPORT_ACCUMULATE # define ACCUMULATE_FUNCTION(func,otherfunc) \ [[accumulate]] void func() { otherfunc(); } # define CALL_ACCUMULATED_FUNCTION(func) \ @@ -74,7 +71,7 @@ float median(float a, float b, float c); // 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); @@ -225,7 +222,7 @@ string getcurrentmod(); #ifndef MENUQC #ifdef CSQC -float ReadInt24_t(); +int ReadInt24_t(); vector ReadInt48_t(); vector ReadInt72_t(); #else @@ -236,12 +233,12 @@ void WriteInt72_t(float dest, vector val); #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); @@ -265,7 +262,7 @@ float get_model_parameters_age; 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; @@ -374,16 +371,16 @@ void backtrace(string msg); // 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); @@ -433,8 +430,8 @@ float Announcer_PickNumber(float type, float num); #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)