From 789afd3e473029d1ceaecbd04c1032b1ed5bae35 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 12 Jun 2018 14:26:55 +1000 Subject: [PATCH] Clean up some dangling definitions on the client side --- qcsrc/client/commands/cl_cmd.qc | 14 ++++---------- qcsrc/client/commands/cl_cmd.qh | 1 + qcsrc/client/csqcmodel_hooks.qc | 2 -- qcsrc/client/csqcmodel_hooks.qh | 2 ++ qcsrc/client/hud/hud.qc | 7 +++---- qcsrc/client/hud/hud.qh | 2 -- qcsrc/client/hud/hud_config.qc | 2 -- qcsrc/client/hud/hud_config.qh | 4 ++++ qcsrc/client/hud/panel/ammo.qc | 3 +-- qcsrc/client/hud/panel/infomessages.qc | 1 - qcsrc/client/hud/panel/quickmenu.qc | 3 --- qcsrc/client/hud/panel/quickmenu.qh | 5 +++++ qcsrc/client/hud/panel/radar.qh | 2 ++ qcsrc/client/hud/panel/scoreboard.qc | 6 +----- qcsrc/client/main.qc | 7 ++----- qcsrc/client/main.qh | 8 ++++++++ qcsrc/client/mapvoting.qc | 1 - qcsrc/client/view.qc | 8 ++------ qcsrc/client/view.qh | 8 ++++++++ qcsrc/client/weapons/projectile.qc | 4 ++-- qcsrc/common/minigames/cl_minigames.qh | 8 ++------ qcsrc/common/minigames/cl_minigames_hud.qh | 6 ++++++ qcsrc/common/mutators/mutator/nades/nades.qh | 6 ++++++ qcsrc/common/net_notice.qh | 2 ++ 24 files changed, 61 insertions(+), 51 deletions(-) diff --git a/qcsrc/client/commands/cl_cmd.qc b/qcsrc/client/commands/cl_cmd.qc index 5a53be8e7..034bb6336 100644 --- a/qcsrc/client/commands/cl_cmd.qc +++ b/qcsrc/client/commands/cl_cmd.qc @@ -10,12 +10,16 @@ #include "../autocvars.qh" #include "../defs.qh" #include +#include +#include #include "../main.qh" #include "../mapvoting.qh" #include "../miscfunctions.qh" #include +#include + #include void DrawDebugModel(entity this) @@ -249,16 +253,6 @@ void LocalCommand_handlevote(int request, int argc) } } -bool QuickMenu_IsOpened(); -void QuickMenu_Close(); -bool QuickMenu_Open(string mode, string submenu, string file); - -bool HUD_MinigameMenu_IsOpened(); -void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger); -void HUD_MinigameMenu_Open(); - -void HUD_Radar_Show_Maximized(bool doshow, bool clickable); - void LocalCommand_hud(int request, int argc) { TC(int, request); TC(int, argc); diff --git a/qcsrc/client/commands/cl_cmd.qh b/qcsrc/client/commands/cl_cmd.qh index f1be4315f..f6f96501a 100644 --- a/qcsrc/client/commands/cl_cmd.qh +++ b/qcsrc/client/commands/cl_cmd.qh @@ -2,6 +2,7 @@ void Cmd_Scoreboard_SetFields(int); void Cmd_Scoreboard_Help(); +void ConsoleCommand_macro_init(); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void LocalCommand_macro_write_aliases(int fh); diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 37e18bd8e..d8f6d26a3 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -18,8 +18,6 @@ .float death_time; .int modelflags; -void CSQCModel_Hook_PreDraw(entity this, bool isplayer); - .bool isplayermodel; // FEATURE: LOD diff --git a/qcsrc/client/csqcmodel_hooks.qh b/qcsrc/client/csqcmodel_hooks.qh index 56a3fb4a5..8ed256379 100644 --- a/qcsrc/client/csqcmodel_hooks.qh +++ b/qcsrc/client/csqcmodel_hooks.qh @@ -24,3 +24,5 @@ const int MF_TRACER3 = BIT(7); // purple trail .int csqcmodel_traileffect; void CSQCModel_Effects_Apply(entity this); + +void CSQCModel_Hook_PreDraw(entity this, bool isplayer); diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 55d7ffeaa..2b8eed95f 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -2,6 +2,7 @@ #include #include +#include #include "panel/scoreboard.qh" #include "hud_config.qh" #include "../mapvoting.qh" @@ -13,9 +14,11 @@ #include #include #include +#include #include #include #include +#include #include @@ -395,8 +398,6 @@ Main HUD system ================== */ -void CSQC_BUMBLE_GUN_HUD(); - void HUD_Vehicle() { if(autocvar__hud_configure) return; @@ -485,8 +486,6 @@ bool Hud_Shake_Update() return true; } -entity CSQCModel_server2csqc(int i); -void calc_followmodel_ofs(entity view); void Hud_Dynamic_Frame() { vector ofs = '0 0 0'; diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 496d775ef..950dee17a 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -175,8 +175,6 @@ vector hud_shift; vector hud_shift_current = '0 0 0'; vector hud_scale_center; -float stringwidth_colors(string s, vector theSize); -float stringwidth_nocolors(string s, vector theSize); void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag); .int panel_showflags; diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index 3c93a6d64..e8ec807be 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -660,12 +660,10 @@ void HUD_Panel_Arrow_Action(float nPrimary) } } -void HUD_Panel_EnableMenu(); entity tab_panels[hud_panels_MAX]; entity tab_panel; vector tab_panel_pos; float tab_backward; -void HUD_Panel_FirstInDrawQ(float id); void reset_tab_panels() { for (int i = 0; i < hud_panels_COUNT; ++i) diff --git a/qcsrc/client/hud/hud_config.qh b/qcsrc/client/hud/hud_config.qh index 6ab64f6ae..d91fe370e 100644 --- a/qcsrc/client/hud/hud_config.qh +++ b/qcsrc/client/hud/hud_config.qh @@ -23,3 +23,7 @@ void HUD_Configure_Frame(); void HUD_Configure_PostDraw(); float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary); + +void HUD_Panel_EnableMenu(); + +void HUD_Panel_FirstInDrawQ(float id); diff --git a/qcsrc/client/hud/panel/ammo.qc b/qcsrc/client/hud/panel/ammo.qc index 0636f3f2e..01ce50cdb 100644 --- a/qcsrc/client/hud/panel/ammo.qc +++ b/qcsrc/client/hud/panel/ammo.qc @@ -6,6 +6,7 @@ #include #include #include +#include // Ammo (#1) @@ -19,8 +20,6 @@ void DrawNadeProgressBar(vector myPos, vector mySize, float progress, vector col autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } -void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator - void DrawAmmoItem(vector myPos, vector mySize, int ammoType, bool isCurrent, bool isInfinite) { TC(bool, isCurrent); TC(bool, isInfinite); diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index 1e5a0c9f2..7b7d82b44 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -33,7 +33,6 @@ int img_select(int group_id) return img_cur_msg[group_id]; } -float stringwidth_colors(string s, vector theSize); vector InfoMessages_drawstring(string s, vector pos, vector sz, float a, vector fontsize) { getWrappedLine_remaining = s; diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index b84066b84..29f69b3d4 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -57,8 +57,6 @@ void QuickMenu_Page_ClearEntry(int i) QuickMenu_Page_Command_Type[i] = 0; } -float QuickMenu_Page_Load(string target_submenu, float new_page); -void QuickMenu_Default(string submenu); bool QuickMenu_Open(string mode, string submenu, string file) { int fh = -1; @@ -225,7 +223,6 @@ bool QuickMenu_IsOpened() return (QuickMenu_Page_Entries > 0); } -void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me); bool HUD_Quickmenu_PlayerListEntries_Create(string cmd, int teamplayers, bool without_me) { TC(int, teamplayers); TC(bool, without_me); diff --git a/qcsrc/client/hud/panel/quickmenu.qh b/qcsrc/client/hud/panel/quickmenu.qh index aad86e6bd..694f0d1d7 100644 --- a/qcsrc/client/hud/panel/quickmenu.qh +++ b/qcsrc/client/hud/panel/quickmenu.qh @@ -4,3 +4,8 @@ bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary); bool QuickMenu_IsOpened(); void QuickMenu_Mouse(); +float QuickMenu_Page_Load(string target_submenu, float new_page); +void QuickMenu_Default(string submenu); +void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me); +void QuickMenu_Close(); +bool QuickMenu_Open(string mode, string submenu, string file); diff --git a/qcsrc/client/hud/panel/radar.qh b/qcsrc/client/hud/panel/radar.qh index 6db88c68b..d2fbc8f6b 100644 --- a/qcsrc/client/hud/panel/radar.qh +++ b/qcsrc/client/hud/panel/radar.qh @@ -1,2 +1,4 @@ #pragma once #include "../panel.qh" + +void HUD_Radar_Show_Maximized(bool doshow, bool clickable); diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 96d30aa52..5b8964d0d 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -2,6 +2,7 @@ #include #include +#include #include #include "quickmenu.qh" #include @@ -70,10 +71,6 @@ bool autocvar_hud_panel_scoreboard_spectators_showping = true; bool autocvar_hud_panel_scoreboard_spectators_aligned = false; float autocvar_hud_panel_scoreboard_minwidth = 0.4; - -void drawstringright(vector, string, vector, vector, float, float); -void drawstringcenter(vector, string, vector, vector, float, float); - // wrapper to put all possible scores titles through gettext string TranslateScoresLabel(string l) { @@ -150,7 +147,6 @@ void Scoreboard_InitScores() Cmd_Scoreboard_SetFields(0); } -float SetTeam(entity pl, float Team); //float lastpnum; void Scoreboard_UpdatePlayerTeams() { diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index efb1fa204..3de8cefeb 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -8,11 +8,13 @@ #include #include #include "hud/_mod.qh" +#include "commands/cl_cmd.qh" #include "mapvoting.qh" #include #include "hud/panel/scoreboard.qh" #include "hud/panel/quickmenu.qh" #include "shownames.qh" +#include "view.qh" #include #include "weapons/projectile.qh" #include @@ -90,7 +92,6 @@ void LoadMenuSkinValues() // CSQC_Init : Called every time the CSQC code is initialized (essentially at map load) // Useful for precaching things -void ConsoleCommand_macro_init(); void CSQC_Init() { prvm_language = strzone(cvar_string("prvm_language")); @@ -342,7 +343,6 @@ void Playerchecker_Think(entity this) this.nextthink = time + 0.2; } -void TrueAim_Init(); void PostInit() { entity playerchecker = new_pure(playerchecker); @@ -388,8 +388,6 @@ float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary) // -------------------------------------------------------------------------- // BEGIN OPTIONAL CSQC FUNCTIONS -void Ent_Remove(entity this); - void Ent_RemovePlayerScore(entity this) { if(this.owner) { @@ -946,7 +944,6 @@ void Fog_Force() localcmd(sprintf("\nfog %s\nr_fog_exp2 0\nr_drawfog 1\n", forcefog)); } -void Gamemode_Init(); NET_HANDLE(ENT_CLIENT_SCORES_INFO, bool isnew) { make_pure(this); diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 70189b3a2..a95acd573 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -21,6 +21,14 @@ void draw_cursor(vector pos, vector ofs, string img, vector col, float a); void draw_cursor_normal(vector pos, vector col, float a); void LoadMenuSkinValues(); +void PostInit(); + +void Ent_Remove(entity this); + +void Gamemode_Init(); + +float SetTeam(entity pl, float Team); + vector hud_fontsize; float RANKINGS_RECEIVED_CNT; diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 87b6d585b..8412bd757 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -321,7 +321,6 @@ float MapVote_Selection(vector topleft, vector cellsize, float rows, float colum return mv_mouse_selection; } -vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect); void MapVote_Draw() { string map; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index a1b53fb82..d036bd75d 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -400,7 +402,6 @@ STATIC_INIT(fpscounter_init) showfps_prevfps_time = currentTime; // we must initialize it to avoid an instant low frame sending } -void Porto_Draw(entity this); STATIC_INIT(Porto) { entity e = new_pure(porto); @@ -768,8 +769,6 @@ float TrueAimCheck(entity wepent) return SHOTTYPE_HITWORLD; } -void PostInit(); -void CSQC_Demo_Camera(); float camera_mode; const float CAMERA_FREE = 1; const float CAMERA_CHASE = 2; @@ -1561,12 +1560,9 @@ float oldr_novis; float oldr_useportalculling; float oldr_useinfinitefarclip; -void cl_notice_run(); - float prev_myteam; int lasthud; float vh_notice_time; -void WaypointSprite_Load(); void CSQC_UpdateView(entity this, float w, float h) { TC(int, w); TC(int, h); diff --git a/qcsrc/client/view.qh b/qcsrc/client/view.qh index 0a2c5c0c7..93af4255e 100644 --- a/qcsrc/client/view.qh +++ b/qcsrc/client/view.qh @@ -4,6 +4,14 @@ vector crosshair_getcolor(entity this, float health_stat); +void calc_followmodel_ofs(entity view); + +void Porto_Draw(entity this); + +void CSQC_Demo_Camera(); + +void TrueAim_Init(); + entity viewmodels[MAX_WEAPONSLOTS]; vector viewloc_mousepos; diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 444fb2743..41b976944 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -11,6 +11,8 @@ #include #include +#include + #include #include @@ -50,8 +52,6 @@ void Projectile_DrawTrail(entity this, vector to) } } -bool Projectile_isnade(int proj); // TODO: remove - void Projectile_Draw(entity this) { vector rot; diff --git a/qcsrc/common/minigames/cl_minigames.qh b/qcsrc/common/minigames/cl_minigames.qh index a0f6195d1..415984a2a 100644 --- a/qcsrc/common/minigames/cl_minigames.qh +++ b/qcsrc/common/minigames/cl_minigames.qh @@ -1,5 +1,7 @@ #pragma once +#include "cl_minigames_hud.qh" + // Get a square in the center of the avaliable area // \note macro to pass by reference pos and mySize #define minigame_hud_fitsqare(pos, mySize) \ @@ -92,12 +94,6 @@ void minigame_cmd_workaround(float dummy, string...cmdargc); // (ie: it's their turn and they should get back to the minigame) void minigame_prompt(); -float HUD_MinigameMenu_IsOpened(); -void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger); - -// Adds a game-specific entry to the menu -void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg); - #define FOREACH_MINIGAME_ENTITY(entityvar) \ entityvar=NULL; \ diff --git a/qcsrc/common/minigames/cl_minigames_hud.qh b/qcsrc/common/minigames/cl_minigames_hud.qh index ef44ea025..c14985f62 100644 --- a/qcsrc/common/minigames/cl_minigames_hud.qh +++ b/qcsrc/common/minigames/cl_minigames_hud.qh @@ -2,3 +2,9 @@ float HUD_Minigame_InputEvent(float bInputType, float nPrimary, float nSecondary); void HUD_Minigame_Mouse(); + +float HUD_MinigameMenu_IsOpened(); +void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger); + +// Adds a game-specific entry to the menu +void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_arg); diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index e109fa7a3..2729316a8 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -99,3 +99,9 @@ void nades_GiveBonus(entity player, float score); MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage); #endif + +#ifdef CSQC +bool Projectile_isnade(int proj); // TODO: remove + +void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator +#endif diff --git a/qcsrc/common/net_notice.qh b/qcsrc/common/net_notice.qh index 113420518..0eecd6bdf 100644 --- a/qcsrc/common/net_notice.qh +++ b/qcsrc/common/net_notice.qh @@ -11,4 +11,6 @@ void sv_notice_join(entity _to); #ifdef CSQC void cl_notice_read(); + +void cl_notice_run(); #endif -- 2.39.2