From a8a04412fe63d3cb67cf94e473b45fc16b804925 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 1 Mar 2013 00:27:27 -0500 Subject: [PATCH] Shrink function definitions --- qcsrc/common/notifications.qc | 31 ++++++++++++++++++++++--------- qcsrc/common/notifications.qh | 21 +++++++++++++++++---- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index a77d1f42a..78a9c4ea8 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -49,7 +49,9 @@ string Notification_CheckArgs_TypeName(float net_type, float net_name) } #ifdef SVQC -string Notification_CheckArgs(float broadcast, entity client, float net_type, float net_name) +string Notification_CheckArgs( + float broadcast, entity client, + float net_type, float net_name) { // check supplied broadcast, target, type, and name for errors string checkargs = Notification_CheckArgs_TypeName(net_type, net_name); @@ -740,7 +742,8 @@ void Notification_GetCvars() // Frontend Notification Pushing // =============================== -string Local_Notification_sprintf(string input, string args, +string Local_Notification_sprintf( + string input, string args, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4) { @@ -785,7 +788,9 @@ string Local_Notification_sprintf(string input, string args, } #ifdef CSQC -void Local_Notification_HUD_Notify_Push(string icon, string hudargs, string s1, string s2, string s3, string s4) +void Local_Notification_HUD_Notify_Push( + string icon, string hudargs, + string s1, string s2, string s3, string s4) { string selected; float sel_num; @@ -818,7 +823,9 @@ void Local_Notification_HUD_Notify_Push(string icon, string hudargs, string s1, HUD_Notify_Push(icon, arg_slot[0], arg_slot[1]); } -void Local_Notification_centerprint_generic(string input, string durcnt, float cpid, float f1, float f2) +void Local_Notification_centerprint_generic( + string input, string durcnt, + float cpid, float f1, float f2) { string selected; float sel_num; @@ -996,7 +1003,8 @@ void Local_Notification(float net_type, float net_name, ...count) } // WOVA = Without Variable Arguments -void Local_Notification_WOVA(float net_type, float net_name, +void Local_Notification_WOVA( + float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4) @@ -1198,7 +1206,9 @@ float Net_Write_Notification(entity client, float sf) return send; } -void Kill_Notification(float broadcast, entity client, float net_type, float net_name) +void Kill_Notification( + float broadcast, entity client, + float net_type, float net_name) { string checkargs = Notification_CheckArgs(broadcast, client, 1, 1); if(checkargs != "") { backtrace(sprintf("Incorrect usage of Kill_Notification: %s\n", checkargs)); return; } @@ -1247,8 +1257,10 @@ void Kill_Notification(float broadcast, entity client, float net_type, float net } } -void Send_Notification(float broadcast, entity client, - float net_type, float net_name, ...count) +void Send_Notification( + float broadcast, entity client, + float net_type, float net_name, + ...count) { // check supplied broadcast, target, type, and name for errors string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name); @@ -1340,7 +1352,8 @@ void Send_Notification(float broadcast, entity client, } // WOVA = Without Variable Arguments -void Send_Notification_WOVA(float broadcast, entity client, +void Send_Notification_WOVA( + float broadcast, entity client, float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 130a57f89..f62716128 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -62,7 +62,11 @@ void Create_Notification_Entity( void Dump_Notifications(float fh, float alsoprint); void Local_Notification(float net_type, float net_name, ...count); -void Local_Notification_WOVA(float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4); +void Local_Notification_WOVA( + float net_type, float net_name, + float stringcount, float floatcount, + string s1, string s2, string s3, string s4, + float f1, float f2, float f3, float f4); #ifdef CSQC // CLIENT ONLY void Read_Notification(float is_new); @@ -79,9 +83,18 @@ void Read_Notification(float is_new); #define IFSTR(num) ((num < notif.nent_stringcount) ? ...(num, string) : "") #define IFFL(num) ((((notif.nent_stringcount-1) + num) < count) ? ...(((notif.nent_stringcount-1) + num), float) : 0) -void Kill_Notification(float broadcast, entity client, float net_type, float net_name); -void Send_Notification(float broadcast, entity client, float net_type, float net_name, ...count); -void Send_Notification_WOVA(float broadcast, entity client, float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4); +void Kill_Notification( + float broadcast, entity client, + float net_type, float net_name); +void Send_Notification( + float broadcast, entity client, + float net_type, float net_name, + ...count); +void Send_Notification_WOVA( + float broadcast, entity client, + float net_type, float net_name, + string s1, string s2, string s3, string s4, + float f1, float f2, float f3, float f4); // legacy stuff void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num); -- 2.39.2