]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make Samual's horribilificabilitudinitatibus system compile again.
authorRudolf Polzer <divverent@xonotic.org>
Tue, 1 Oct 2013 08:58:21 +0000 (10:58 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 1 Oct 2013 08:58:21 +0000 (10:58 +0200)
qcsrc/client/hud.qh
qcsrc/common/deathtypes.qh
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/util-pre.qh

index db9405ef6af6039b968176b9de277fb0aae5820b..1fe76b091cc2239684a1a420d1e5ee95108b8a8e 100644 (file)
@@ -132,7 +132,7 @@ float current_player;
                hud_panelent.panel_draw = ##draw_func; \
                ++HUD_PANEL_NUM; \
        } \
-       ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME)
+       ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME);
 
 HUD_PANELS
 #undef HUD_PANEL
index e17cd330e643f16b5e5a720b75c56d5d3f4250ec..cc7154d4b6a8713de9236413ecdb01adcf2d0db1 100644 (file)
@@ -73,14 +73,12 @@ entity deathtypes[DT_MAX];
                deathtypes[(name - DT_FIRST)] = deathent; \
                deathent.classname = "deathtype"; \
                deathent.nent_name = #name; \
-               #if (msg_death != NO_MSG) \
+               if (msg_death != NO_MSG) \
                        deathent.death_msgself = msg_multi_notifs[msg_death - 1]; \
-               #endif \
-               #if (msg_death_by != NO_MSG) \
+               if (msg_death_by != NO_MSG) \
                        deathent.death_msgmurder = msg_multi_notifs[msg_death_by - 1]; \
-               #endif \
        } \
-       ACCUMULATE_FUNCTION(RegisterDeathtypes, RegisterDeathtype_##name)
+       ACCUMULATE_FUNCTION(RegisterDeathtypes, RegisterDeathtype_##name);
 
 DEATHTYPES
 #undef DEATHTYPE
index c2420d4435ba7bdc7ca4647edcbfb015164ba9eb..09c049681819bc62d57ed5b813393b120141af90 100644 (file)
@@ -331,12 +331,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog != ARG_DC) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_SV(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_DC(selected,result)
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                print(sprintf(
@@ -373,12 +382,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog == ARG_CS_SV_HA) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result)
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                                       #define ARG_CASE_ARG_CS(selected,result)
+                                       #define ARG_CASE_ARG_SV(selected,result)
+                                       #define ARG_CASE_ARG_DC(selected,result)
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                print(sprintf(
@@ -415,12 +433,21 @@ string Process_Notif_Args(
 
                                switch(strtolower(selected))
                                {
-                                       #define ARG_CASE(prog,selected,result) \
-                                               #if (prog == ARG_CS_SV_DC) || (prog == ARG_DC) \
-                                                       case selected: { ++sel_num; break; } \
-                                               #endif
+                                       #define ARG_CASE_ARG_CS_SV_HA(selected,result)
+                                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { ++sel_num; break; }
+                                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                                       #define ARG_CASE_ARG_CS(selected,result)
+                                       #define ARG_CASE_ARG_SV(selected,result)
+                                       #define ARG_CASE_ARG_DC(selected,result)       case selected: { ++sel_num; break; }
+                                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                                        NOTIF_ARGUMENT_LIST
                                        #undef ARG_CASE
+                                       #undef ARG_CASE_ARG_DC
+                                       #undef ARG_CASE_ARG_SV
+                                       #undef ARG_CASE_ARG_CS
+                                       #undef ARG_CASE_ARG_CS_SV
+                                       #undef ARG_CASE_ARG_CS_SV_DC
+                                       #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
                                                if(ftos(stof(selected)) != "") { ++sel_num; }
@@ -1183,18 +1210,30 @@ string Local_Notification_sprintf(
                NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #ifdef CSQC \
-                                       #if (prog != ARG_SV) && (prog != ARG_DC) \
-                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                                       #endif \
-                               #else \
-                                       #if (prog != ARG_CS) && (prog != ARG_DC) \
-                                               case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                                       #endif \
-                               #endif
+                       #ifdef CSQC
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #else
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)    case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #endif
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
                }
        }
@@ -1285,12 +1324,21 @@ void Local_Notification_HUD_Notify_Push(
                NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #if (prog == ARG_CS_SV_HA) \
-                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                               #endif
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result)
+                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
                }
        }
@@ -1320,12 +1368,21 @@ void Local_Notification_centerprint_generic(
                NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic")
                switch(strtolower(selected))
                {
-                       #define ARG_CASE(prog,selected,result) \
-                               #if (prog == ARG_CS_SV_DC) || (prog == ARG_DC) \
-                                       case selected: { arg_slot[sel_num] = result; ++sel_num; break; } \
-                               #endif
+                       #define ARG_CASE_ARG_CS_SV_HA(selected,result)
+                       #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE_ARG_CS_SV(selected,result)
+                       #define ARG_CASE_ARG_CS(selected,result)
+                       #define ARG_CASE_ARG_SV(selected,result)
+                       #define ARG_CASE_ARG_DC(selected,result)       case selected: { arg_slot[sel_num] = result; ++sel_num; break; }
+                       #define ARG_CASE(prog,selected,result)         ARG_CASE_##prog(selected,result)
                        NOTIF_ARGUMENT_LIST
                        #undef ARG_CASE
+                       #undef ARG_CASE_ARG_DC
+                       #undef ARG_CASE_ARG_SV
+                       #undef ARG_CASE_ARG_CS
+                       #undef ARG_CASE_ARG_CS_SV
+                       #undef ARG_CASE_ARG_CS_SV_DC
+                       #undef ARG_CASE_ARG_CS_SV_HA
                        default:
                        {
                                if(ftos(stof(selected)) != "") { arg_slot[sel_num] = selected; ++sel_num; }
index 95341c1fa49e0fe1eb73c5121092d65e1edc5d8b..0214ec3d6122c2e596ca84b8e8b8c92f524d2f6a 100644 (file)
@@ -217,15 +217,21 @@ void Send_Notification_WOCOVA(
       If you send a notification with mismatching arguments, Send_Notification() will error.
 */
 
-#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+#define MULTITEAM_ANNCE2(default,prefix,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position)
+#define MULTITEAM_ANNCE3(default,prefix,channel,sound,volume,position) \
        MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
        MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
-       #if teams >= 3 \
-               MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
-       #endif \
-       #if teams >= 4 \
-               MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position) \
-       #endif
+       MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position)
+#define MULTITEAM_ANNCE4(default,prefix,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
+       MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
+#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+       MSG_ANNCE_NOTIF_##teams(default,prefix,channel,sound,volume,position) \
+
 #define MSG_ANNCE_NOTIFICATIONS \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE) \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING,       CH_INFO, "amazing",           VOL_BASEVOICE, ATTEN_NONE) \
@@ -317,15 +323,21 @@ void Send_Notification_WOCOVA(
        MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL,                 CH_INFO, "votecall",          VOL_BASEVOICE, ATTEN_NONE) \
        MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL,                 CH_INFO, "votefail",          VOL_BASEVOICE, ATTEN_NONE)
 
-#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+#define MULTITEAM_INFO2(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_INFO3(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
        MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
        MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-       #if teams >= 3 \
-               MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-       #endif \
-       #if teams >= 4 \
-               MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
-       #endif
+       MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_INFO4(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+       MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+       MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+       MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
+
 #define MSG_INFO_NOTIFICATIONS \
        MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2,                1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \
        MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 2,         2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \
@@ -505,15 +517,21 @@ void Send_Notification_WOCOVA(
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "") 
 
-#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+#define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_CENTER3(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
        MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
-       #if teams >= 3 \
-               MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
-       #endif \
-       #if teams >= 4 \
-               MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
-       #endif
+       MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_CENTER4(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+       MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+       MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+       MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+       MULTITEAM_CENTER##teams(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle)
+
 #define MSG_CENTER_NOTIFICATIONS \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are attacking!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,           0, 0, "",             CPID_ASSAULT_ROLE,   "0 0", _("^BGYou are defending!"), "") \
@@ -644,15 +662,21 @@ void Send_Notification_WOCOVA(
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "")
 
-#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
+       MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+       MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE)
+#define MULTITEAM_MULTI3(default,prefix,anncepre,infopre,centerpre) \
        MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
        MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
-       #if teams >= 3 \
-               MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
-       #endif \
-       #if teams >= 4 \
-               MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK) \
-       #endif
+       MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
+#define MULTITEAM_MULTI4(default,prefix,anncepre,infopre,centerpre) \
+       MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+       MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
+       MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
+       MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK)
+#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+       MULTITEAM_MULTI##teams(default,prefix,anncepre,infopre,centerpre)
+
 #define MSG_MULTI_NOTIFICATIONS \
        MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT,                   NO_MSG,        INFO_DEATH_MURDER_CHEAT,                   NO_MSG) \
        MSG_MULTI_NOTIF(1, DEATH_MURDER_DROWN,                   NO_MSG,        INFO_DEATH_MURDER_DROWN,                   NO_MSG) \
@@ -776,15 +800,21 @@ void Send_Notification_WOCOVA(
        MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SNIPE,              NO_MSG,        INFO_WEAPON_UZI_MURDER_SNIPE,              NO_MSG) \
        MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SPRAY,              NO_MSG,        INFO_WEAPON_UZI_MURDER_SPRAY,              NO_MSG)
 
-#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+#define MULTITEAM_CHOICE2(default,challow,prefix,chtype,optiona,optionb) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE)
+#define MULTITEAM_CHOICE3(default,challow,prefix,chtype,optiona,optionb) \
        MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
        MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
-       #if teams >= 3 \
-               MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
-       #endif \
-       #if teams >= 4 \
-               MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
-       #endif
+       MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW)
+#define MULTITEAM_CHOICE4(default,challow,prefix,chtype,optiona,optionb) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
+       MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK)
+#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+       MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb)
+
 #define MSG_CHOICE_NOTIFICATIONS \
        MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 2,    MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_BROKEN_) \
        MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 2,      MSG_INFO,    INFO_CTF_CAPTURE_,                INFO_CTF_CAPTURE_TIME_) \
@@ -1250,7 +1280,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_INFO_NOTIF(default,name,strnum,flnum,args,hudargs,icon,normal,gentle) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1292,7 +1322,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_CENTER_NOTIF(default,name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1336,7 +1366,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define MSG_MULTI_NOTIF(default,name,anncename,infoname,centername) \
        NOTIF_ADD_AUTOCVAR(name, default) \
@@ -1378,7 +1408,7 @@ float notif_global_error;
                        NO_MSG,   /* optiona     */ \
                        NO_MSG);  /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 #define ACVNN(name) autocvar_notification_##name
 
@@ -1423,7 +1453,7 @@ float notif_global_error;
                        optiona,                                 /* optiona     */ \
                        optionb);                                /* optionb     */ \
        } \
-       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+       ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
 
 void RegisterNotifications_First()
 {
@@ -1466,13 +1496,13 @@ void RegisterNotifications_Done()
 }
 
 // NOW we actually activate the declarations
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First);
 MSG_ANNCE_NOTIFICATIONS
 MSG_INFO_NOTIFICATIONS
 MSG_CENTER_NOTIFICATIONS
 MSG_MULTI_NOTIFICATIONS
 MSG_CHOICE_NOTIFICATIONS
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done);
 #undef MSG_ANNCE_NOTIF
 #undef MSG_INFO_NOTIF
 #undef MSG_CENTER_NOTIF
index e8703fe9242bb961a7f2ff47d14fd6a7f9dbaf09..f39c30c0007cb03165d06d181c6c04e534497e25 100644 (file)
@@ -5,7 +5,7 @@
 
 // FTEQCC can do this
 // #define HAVE_YO_DAWG_CPP
-// No, this is an ex-"feature" and non-C11
+// No, this is an ex-"feature" and non-C11.
 
 #ifndef NOCOMPAT
 //# define WORKAROUND_XON010