From: Rudolf Polzer Date: Tue, 1 Oct 2013 08:29:33 +0000 (+0200) Subject: We can't use YO_DAWG_CPP any more. X-Git-Tag: xonotic-v0.8.0~314 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc76d0be2ecfd130f00964cbc9bf541df58347e0;p=xonotic%2Fxonotic-data.pk3dir.git We can't use YO_DAWG_CPP any more. fteqcc and gmqcc both dropped it - for a good reason, as it's non-C11 and we want the QC language go towards a more standard-like dialect to help new coders. --- diff --git a/qcsrc/common/items.qh b/qcsrc/common/items.qh index 45510437f..35cc00232 100644 --- a/qcsrc/common/items.qh +++ b/qcsrc/common/items.qh @@ -136,7 +136,7 @@ void register_weapons_done(); #include "../server/w_all.qc" #undef REGISTER_WEAPON -ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done) +ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done); string W_FixWeaponOrder(string order, float complete); diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index c288b008e..40fea4fc2 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -33,49 +33,49 @@ entity MapInfo_Type_last; #define IS_GAMETYPE(NAME) \ (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME) -REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30 leadlimit=0") +REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30 leadlimit=0"); #define g_dm IS_GAMETYPE(DEATHMATCH) -REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0") +REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0"); #define g_lms IS_GAMETYPE(LMS) -REGISTER_GAMETYPE(_("Arena"),arena,g_arena,ARENA,"timelimit=20 pointlimit=10 leadlimit=0") +REGISTER_GAMETYPE(_("Arena"),arena,g_arena,ARENA,"timelimit=20 pointlimit=10 leadlimit=0"); #define g_arena IS_GAMETYPE(ARENA) -REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0") +REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0"); #define g_race IS_GAMETYPE(RACE) -REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1") +REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1"); #define g_cts IS_GAMETYPE(CTS) -REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0") +REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0"); #define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH) -REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0") +REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0"); #define g_ctf IS_GAMETYPE(CTF) -REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0") +REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0"); #define g_ca IS_GAMETYPE(CA) -REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,"timelimit=20 pointlimit=200 teams=2 leadlimit=0") +REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,"timelimit=20 pointlimit=200 teams=2 leadlimit=0"); #define g_domination IS_GAMETYPE(DOMINATION) -REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0") +REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0"); #define g_keyhunt IS_GAMETYPE(KEYHUNT) -REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20") +REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20"); #define g_assault IS_GAMETYPE(ASSAULT) -REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20") +REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20"); #define g_onslaught IS_GAMETYPE(ONSLAUGHT) -REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0") +REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0"); #define g_nexball IS_GAMETYPE(NEXBALL) -REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0") +REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0"); #define g_freezetag IS_GAMETYPE(FREEZETAG) -REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30") +REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30"); #define g_keepaway IS_GAMETYPE(KEEPAWAY) const float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 3912773fb..e8703fe92 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -4,7 +4,8 @@ #endif // FTEQCC can do this -#define HAVE_YO_DAWG_CPP +// #define HAVE_YO_DAWG_CPP +// No, this is an ex-"feature" and non-C11 #ifndef NOCOMPAT //# define WORKAROUND_XON010 diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 1150dbbaa..d575bbfdd 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -24,7 +24,7 @@ func() #else # define ACCUMULATE_FUNCTION(func,otherfunc) \ - .void _ACCUMULATE_##func##__##otherfunc; + .float _ACCUMULATE_##func##__##otherfunc void ACCUMULATE_call(string func) { float i;