From: Mattia Basaglia Date: Thu, 9 Jul 2015 07:23:28 +0000 (+0200) Subject: Keep only declarations regarding the buplic interface in the mapvoting headers X-Git-Tag: xonotic-v0.8.1~43^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dd34fe52da928d4e5eb9f43883964cb32e12a156;p=xonotic%2Fxonotic-data.pk3dir.git Keep only declarations regarding the buplic interface in the mapvoting headers --- diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 665f1b885..869efe5e9 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -9,6 +9,40 @@ #include "../dpdefs/keycodes.qh" + +int mv_num_maps; + +float mv_active; +string mv_maps[MAPVOTE_COUNT]; +string mv_pics[MAPVOTE_COUNT]; +string mv_pk3[MAPVOTE_COUNT]; +float mv_preview[MAPVOTE_COUNT]; +float mv_votes[MAPVOTE_COUNT]; +float mv_avail[MAPVOTE_COUNT]; +float mv_avail_start[MAPVOTE_COUNT]; +entity mv_pk3list; +float mv_abstain; +float mv_ownvote; +float mv_detail; +float mv_timeout; +float mv_top2_time; +float mv_top2_alpha; + +vector mv_mousepos; +int mv_selection; +int mv_columns; +int mv_mouse_selection; +int mv_selection_keyboard; + +float gametypevote; +string mapvote_chosenmap; +vector gtv_text_size; +vector gtv_text_size_small; + +const int NUM_SSDIRS = 4; +string ssdirs[NUM_SSDIRS]; +int n_ssdirs; + string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize) { string pre, post; diff --git a/qcsrc/client/mapvoting.qh b/qcsrc/client/mapvoting.qh index cb7b4c645..9c7086efc 100644 --- a/qcsrc/client/mapvoting.qh +++ b/qcsrc/client/mapvoting.qh @@ -2,81 +2,12 @@ #define MAPVOTING_H #include "../common/constants.qh" - -int mv_num_maps; - -float mv_active; -string mv_maps[MAPVOTE_COUNT]; -string mv_pics[MAPVOTE_COUNT]; -string mv_pk3[MAPVOTE_COUNT]; -float mv_preview[MAPVOTE_COUNT]; -float mv_votes[MAPVOTE_COUNT]; -float mv_avail[MAPVOTE_COUNT]; -float mv_avail_start[MAPVOTE_COUNT]; -entity mv_pk3list; -float mv_abstain; -float mv_ownvote; -float mv_detail; -float mv_timeout; -float mv_top2_time; -float mv_top2_alpha; - -vector mv_mousepos; -int mv_selection; -int mv_columns; -int mv_mouse_selection; -int mv_selection_keyboard; - -float gametypevote; -string mapvote_chosenmap; -vector gtv_text_size; -vector gtv_text_size_small; - -string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, vector fontsize); - -string GameTypeVote_DescriptionByID(int id); - -vector MapVote_RGB(int id); - -void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, int id); - -void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, int id); - -void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int id); - -vector MapVote_GridVec(vector gridspec, int i, int m); - -float MapVote_Selection(vector topleft, vector cellsize, float rows, float columns); - void MapVote_Draw(); void Cmd_MapVote_MapDownload(float argc); -void MapVote_CheckPK3(string pic, string pk3, int id); - -void MapVote_CheckPic(string pic, string pk3, int id); - -void MapVote_ReadMask(); - -const int NUM_SSDIRS = 4; -string ssdirs[NUM_SSDIRS]; -int n_ssdirs; -void MapVote_Init(); - -void MapVote_SendChoice(float index); - -int MapVote_MoveLeft(int pos); -int MapVote_MoveRight(int pos); -int MapVote_MoveUp(int pos); - -int MapVote_MoveDown(int pos); - float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary); -void MapVote_UpdateMask(); - -void MapVote_UpdateVotes(); - void Ent_MapVote(); void Net_MapVote_Picture(); diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 104478120..12564938f 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -9,6 +9,35 @@ #include "../common/playerstats.qh" #include "../common/util.qh" + +// definitions + +float mapvote_nextthink; +float mapvote_keeptwotime; +float mapvote_timeout; +string mapvote_message; +const float MAPVOTE_SCREENSHOT_DIRS_COUNT = 4; +string mapvote_screenshot_dirs[MAPVOTE_SCREENSHOT_DIRS_COUNT]; +float mapvote_screenshot_dirs_count; + +float mapvote_count; +float mapvote_count_real; +string mapvote_maps[MAPVOTE_COUNT]; +float mapvote_maps_screenshot_dir[MAPVOTE_COUNT]; +string mapvote_maps_pakfile[MAPVOTE_COUNT]; +float mapvote_maps_suggested[MAPVOTE_COUNT]; +string mapvote_suggestions[MAPVOTE_COUNT]; +float mapvote_suggestion_ptr; +float mapvote_voters; +float mapvote_selections[MAPVOTE_COUNT]; +float mapvote_maps_availability[MAPVOTE_COUNT]; +float mapvote_run; +float mapvote_detail; +float mapvote_abstain; +.float mapvote; + +entity mapvote_ent; + /** * Returns the gamtype ID from its name, if type_name isn't a real gametype it * checks for sv_vote_gametype_(type_name)_type diff --git a/qcsrc/server/mapvoting.qh b/qcsrc/server/mapvoting.qh index 18194b7b6..e4e6b0b52 100644 --- a/qcsrc/server/mapvoting.qh +++ b/qcsrc/server/mapvoting.qh @@ -1,8 +1,6 @@ #ifndef MAPVOTING_H #define MAPVOTING_H -#include "../common/constants.qh" - // definitions for functions used outside mapvoting.qc void MapVote_Start(); void MapVote_Spawn(); @@ -12,34 +10,7 @@ float GameTypeVote_Start(); float GameTypeVote_Finished(float pos); string GameTypeVote_MapInfo_FixName(string m); -// definitions float gametypevote; string getmapname_stored; float mapvote_initialized; - -float mapvote_nextthink; -float mapvote_keeptwotime; -float mapvote_timeout; -string mapvote_message; -const float MAPVOTE_SCREENSHOT_DIRS_COUNT = 4; -string mapvote_screenshot_dirs[MAPVOTE_SCREENSHOT_DIRS_COUNT]; -float mapvote_screenshot_dirs_count; - -float mapvote_count; -float mapvote_count_real; -string mapvote_maps[MAPVOTE_COUNT]; -float mapvote_maps_screenshot_dir[MAPVOTE_COUNT]; -string mapvote_maps_pakfile[MAPVOTE_COUNT]; -float mapvote_maps_suggested[MAPVOTE_COUNT]; -string mapvote_suggestions[MAPVOTE_COUNT]; -float mapvote_suggestion_ptr; -float mapvote_voters; -float mapvote_selections[MAPVOTE_COUNT]; -float mapvote_maps_availability[MAPVOTE_COUNT]; -float mapvote_run; -float mapvote_detail; -float mapvote_abstain; -.float mapvote; - -entity mapvote_ent; #endif