|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "mapvoting.qh"#include <client/draw.qh>#include <client/hud/_mod.qh>#include <client/hud/panel/scoreboard.qh>#include <common/mapinfo.qh>#include <common/util.qh>Go to the source code of this file.
Definition at line 645 of file mapvoting.qc.
References argv(), entity(), ftos(), localcmd(), LOG_INFO, mv_pk3list, mv_preview, PreviewExists(), stof(), and TC.
Referenced by LocalCommand_mv_download(), and MapVote_CheckPK3().
| void GameTypeVote_DrawGameTypeItem | ( | vector | pos, |
| float | maxh, | ||
| float | tsize, | ||
| string | gtype, | ||
| string | pic, | ||
| int | _count, | ||
| int | id, | ||
| int | most_votes ) |
Definition at line 115 of file mapvoting.qc.
References alpha, argv(), autocvar_hud_panel_mapvote_highlight_border, drawborderlines(), drawcolorcodedstring, drawfill, DRAWFLAG_NORMAL, drawpic, drawstring, entity(), eX, eY, getWrappedLine(), getWrappedLine_remaining, GTV_AVAILABLE, gtv_text_size, gtv_text_size_small, hud_fontsize, MapVote_FormatMapItem(), MapVote_RGB(), max(), min(), mv_data, mv_desc, MV_FADETIME, mv_flags, mv_flags_start, mv_ownvote, mv_select_lasttime, mv_selection, mv_top2_alpha, next, NULL, panel_fg_alpha, rgb_to_hexcolor(), spawn, sqrt(), strcat(), stringwidth_colors(), TC, time, tokenizebyseparator, and vector.
Referenced by MapVote_Draw().
Definition at line 754 of file mapvoting.qc.
References autocvar_menu_skin, GTV_CUSTOM, MapInfo_Type_Description(), MapInfo_Type_FromString(), MapInfo_Type_ToText(), mv_data, mv_desc, mv_entries, mv_flags, mv_pics, mv_preview, mv_suggester, name, precache_pic(), PreviewExists(), ReadByte(), ReadString, strcat(), strlen, strzone(), and TC.
Referenced by MapVote_Init().
Definition at line 696 of file mapvoting.qc.
References MapVote_CheckPK3(), mv_abstain, mv_num_maps, mv_preview, PreviewExists(), and TC.
Referenced by MapVote_ReadOption().
Definition at line 679 of file mapvoting.qc.
References Cmd_MapVote_MapDownload(), entity(), itos, localcmd(), mv_pk3list, spawn, strcat(), TC, and tokenize_console.
Referenced by MapVote_CheckPic().
| void MapVote_Draw | ( | ) |
Definition at line 425 of file mapvoting.qc.
References bound(), ceil(), chat_posy, chat_sizey, count_seconds, draw_beginBoldFont, draw_endBoldFont, DRAWFLAG_NORMAL, drawstring, gametypevote, GameTypeVote_DrawGameTypeItem(), gtv_text_size, gtv_text_size_small, hud_fontsize, HUD_GetFontsize(), HUD_GetTableSize_BestItemAR(), HUD_Panel_DrawBg, HUD_Panel_LoadCvars(), HUD_Scale_Disable(), mapvote_chosenmap, MapVote_DrawAbstain(), MapVote_DrawMapItem(), MapVote_DrawMapPicture(), MapVote_DrawSuggester(), MapVote_GridVec(), MapVote_Selection(), max(), min(), mv_abstain, mv_active, mv_columns, mv_entries, mv_num_maps, mv_pics, mv_preview, mv_select_lasttime, mv_selection, mv_suggester, mv_tie_winner, mv_timeout, mv_top2_alpha, mv_top2_time, mv_votes, mv_winner, mv_winner_alpha, mv_winner_time, panel_bg_border, panel_bg_padding, panel_fg_alpha, panel_pos, panel_size, sqrt(), stringwidth, time, vec2, vector, vid_conheight, vid_conwidth, void, xmax, xmin, ymax, and ymin.
Definition at line 11 of file mapvoting.qc.
References HUD_Write_Cvar.
Definition at line 338 of file mapvoting.qc.
References DRAWFLAG_NORMAL, drawstring, hud_fontsize, MapVote_FormatMapItem(), MapVote_RGB(), mv_winner, mv_winner_alpha, panel_fg_alpha, stringwidth, and vector.
Referenced by MapVote_Draw().
| void MapVote_DrawMapItem | ( | vector | pos, |
| float | isize, | ||
| float | tsize, | ||
| string | map, | ||
| string | pic, | ||
| int | _count, | ||
| int | id, | ||
| int | most_votes ) |
Definition at line 263 of file mapvoting.qc.
References autocvar_hud_panel_mapvote_highlight_border, drawborderlines(), drawcolorcodedstring, drawfill, DRAWFLAG_NORMAL, GTV_AVAILABLE, hud_fontsize, MapVote_DrawMapPicture(), MapVote_FormatMapItem(), MapVote_RGB(), max(), min(), MV_FADETIME, mv_flags, mv_ownvote, mv_select_lasttime, mv_selection, mv_top2_alpha, mv_winner, mv_winner_alpha, panel_fg_alpha, rgb_to_hexcolor(), sqrt(), strcat(), stringwidth, TC, time, and vector.
Referenced by MapVote_Draw().
Definition at line 250 of file mapvoting.qc.
References drawfill, DRAWFLAG_NORMAL, drawgetimagesize(), drawpic, and vector.
Referenced by MapVote_Draw(), and MapVote_DrawMapItem().
Definition at line 350 of file mapvoting.qc.
References ColorTranslateRGB(), drawcolorcodedstring, DRAWFLAG_NORMAL, GTV_AVAILABLE, hud_fontsize, MV_FADETIME, mv_flags, mv_selection, mv_suggester, mv_suggester_cache, mv_suggester_cachetime, mv_winner, panel_fg_alpha, sqrt(), stringwidth, time, and vector.
Referenced by MapVote_Draw().
| string MapVote_FormatMapItem | ( | int | id, |
| string | map, | ||
| int | _count, | ||
| float | maxwidth, | ||
| vector | fontsize, | ||
| int | most_votes ) |
Definition at line 72 of file mapvoting.qc.
References GTV_AVAILABLE, mv_detail, mv_flags, mv_tie_winner, strcat(), stringwidth, stringwidth_nocolors(), TC, textShortenToWidth(), and vector.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawAbstain(), and MapVote_DrawMapItem().
| void MapVote_Init | ( | ) |
Definition at line 795 of file mapvoting.qc.
References autocvar_hud_cursormode, BIT, boolean, eX, eY, gametypevote, GameTypeVote_ReadOption(), mapvote_chosenmap, MAPVOTE_COUNT, MapVote_ReadMask(), MapVote_ReadOption(), min(), mousepos, mv_abstain, mv_active, mv_detail, mv_flags, mv_flags_start, mv_num_maps, mv_ownvote, mv_pk3list, mv_select_lasttime, mv_selection, mv_selection_keyboard, mv_suggester_cache, mv_suggester_cachetime, mv_timeout, mv_votes, n_ssdirs, NULL, NUM_SSDIRS, ReadByte(), ReadString, ssdirs, string_null, strzone(), vid_conheight, and vid_conwidth.
Referenced by MapVote_Finished(), MapVote_Think(), and NET_HANDLE().
Definition at line 928 of file mapvoting.qc.
References ftos(), hudShiftState, imp, isdemo(), K_ALT, K_CTRL, K_DOWNARROW, K_ENTER, K_KP_0, K_KP_1, K_KP_2, K_KP_3, K_KP_4, K_KP_5, K_KP_6, K_KP_7, K_KP_8, K_KP_9, K_KP_ENTER, K_LEFTARROW, K_MOUSE1, K_MOUSE2, K_RIGHTARROW, K_SHIFT, K_SPACE, K_UPARROW, localcmd(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_SendChoice(), min(), mousepos, mv_active, mv_mouse_selection, mv_num_maps, mv_selection, mv_selection_keyboard, mv_winner, S_ALT, S_CTRL, S_SHIFT, and TC.
Referenced by CSQC_InputEvent().
Definition at line 905 of file mapvoting.qc.
References GTV_AVAILABLE, imp, MapVote_MoveDown(), mv_columns, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent(), and MapVote_MoveDown().
Definition at line 859 of file mapvoting.qc.
References GTV_AVAILABLE, imp, MapVote_MoveLeft(), mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent(), and MapVote_MoveLeft().
Definition at line 871 of file mapvoting.qc.
References GTV_AVAILABLE, imp, MapVote_MoveRight(), mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent(), and MapVote_MoveRight().
Definition at line 883 of file mapvoting.qc.
References ceil(), GTV_AVAILABLE, imp, MapVote_MoveUp(), mv_columns, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent(), and MapVote_MoveUp().
| void MapVote_ReadMask | ( | ) |
Definition at line 711 of file mapvoting.qc.
References BIT, GTV_AVAILABLE, mv_flags, mv_num_maps, and ReadByte().
Referenced by MapVote_Init(), and MapVote_UpdateMask().
Definition at line 739 of file mapvoting.qc.
References bound(), GTV_AVAILABLE, MapVote_CheckPic(), mv_data, mv_entries, mv_flags, mv_pics, mv_preview, mv_suggester, n_ssdirs, ReadByte(), ReadString, ssdirs, strcat(), strzone(), and TC.
Referenced by MapVote_Init().
Definition at line 96 of file mapvoting.qc.
References eZ, GTV_AVAILABLE, MV_FADETIME, mv_flags, mv_ownvote, mv_select_lasttime, mv_selection, sqrt(), TC, time, and vector.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawAbstain(), and MapVote_DrawMapItem().
Definition at line 396 of file mapvoting.qc.
References mousepos, mv_abstain, mv_mouse_selection, mv_num_maps, mv_selection, mv_selection_keyboard, mv_winner, and vector.
Referenced by MapVote_Draw().
Definition at line 853 of file mapvoting.qc.
References ftos(), localcmd(), and TC.
Referenced by MapVote_InputEvent().
| void MapVote_UpdateMask | ( | ) |
Definition at line 1054 of file mapvoting.qc.
References MapVote_ReadMask(), mv_top2_time, and time.
Referenced by NET_HANDLE().
| void MapVote_UpdateVotes | ( | ) |
Definition at line 1060 of file mapvoting.qc.
References GTV_AVAILABLE, mv_detail, mv_flags, mv_num_maps, mv_ownvote, mv_tie_winner, mv_votes, and ReadByte().
Referenced by NET_HANDLE().
| NET_HANDLE | ( | ENT_CLIENT_MAPVOTE | , |
| bool | isnew ) |
Definition at line 1080 of file mapvoting.qc.
References BIT, make_pure, MapVote_Init(), MapVote_UpdateMask(), MapVote_UpdateVotes(), mv_winner, mv_winner_time, ReadByte(), and time.
| NET_HANDLE | ( | TE_CSQC_PICTURE | , |
| bool | isNew ) |
Definition at line 1102 of file mapvoting.qc.
References Net_MapVote_Picture().
| void Net_MapVote_Picture | ( | ) |
Definition at line 1108 of file mapvoting.qc.
References mv_pics, mv_preview, ReadByte(), and strzone().
Referenced by NET_HANDLE().
Definition at line 59 of file mapvoting.qc.
References autocvar_cl_readpicture_force, fexists(), name, and strcat().
Referenced by Cmd_MapVote_MapDownload(), GameTypeVote_ReadOption(), and MapVote_CheckPic().
| bool gametypevote |
Definition at line 48 of file mapvoting.qc.
Referenced by DoNextMapOverride(), GameTypeVote_Finished(), GameTypeVote_Start(), MapVote_Draw(), MapVote_Finished(), MapVote_Init(), MapVote_SendEntity(), and MapVote_Suggest().
| vector gtv_text_size |
Definition at line 50 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Draw().
| vector gtv_text_size_small |
Definition at line 51 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Draw().
| string mapvote_chosenmap |
Definition at line 49 of file mapvoting.qc.
Referenced by MapVote_Draw(), and MapVote_Init().
| bool mv_abstain |
Definition at line 31 of file mapvoting.qc.
Referenced by MapVote_CheckPic(), MapVote_Draw(), MapVote_Init(), and MapVote_Selection().
| int mv_columns |
Definition at line 44 of file mapvoting.qc.
Referenced by MapVote_Draw(), MapVote_MoveDown(), and MapVote_MoveUp().
| string mv_data[MAPVOTE_COUNT] |
Definition at line 22 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), GameTypeVote_ReadOption(), and MapVote_ReadOption().
| string mv_desc[MAPVOTE_COUNT] |
Definition at line 24 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and GameTypeVote_ReadOption().
| int mv_detail |
Definition at line 32 of file mapvoting.qc.
Referenced by MapVote_FormatMapItem(), MapVote_Init(), and MapVote_UpdateVotes().
| string mv_entries[MAPVOTE_COUNT] |
Definition at line 20 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), MapVote_Draw(), and MapVote_ReadOption().
| const float MV_FADETIME = 0.2 |
Definition at line 53 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawMapItem(), MapVote_DrawSuggester(), and MapVote_RGB().
| int mv_flags[MAPVOTE_COUNT] |
Definition at line 27 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), GameTypeVote_ReadOption(), MapVote_DrawMapItem(), MapVote_DrawSuggester(), MapVote_FormatMapItem(), MapVote_Init(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_ReadMask(), MapVote_ReadOption(), MapVote_RGB(), and MapVote_UpdateVotes().
| int mv_flags_start[MAPVOTE_COUNT] |
Definition at line 28 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Init().
| int mv_mouse_selection |
Definition at line 45 of file mapvoting.qc.
Referenced by MapVote_InputEvent(), and MapVote_Selection().
| int mv_num_maps |
Definition at line 17 of file mapvoting.qc.
Referenced by MapVote_CheckPic(), MapVote_Draw(), MapVote_Init(), MapVote_InputEvent(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_ReadMask(), MapVote_Selection(), and MapVote_UpdateVotes().
| int mv_ownvote |
Definition at line 33 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawMapItem(), MapVote_Init(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_RGB(), and MapVote_UpdateVotes().
| string mv_pics[MAPVOTE_COUNT] |
Definition at line 21 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), MapVote_Draw(), MapVote_ReadOption(), and Net_MapVote_Picture().
| entity mv_pk3list |
Definition at line 30 of file mapvoting.qc.
Referenced by Cmd_MapVote_MapDownload(), MapVote_CheckPK3(), and MapVote_Init().
| float mv_preview[MAPVOTE_COUNT] |
Definition at line 25 of file mapvoting.qc.
Referenced by Cmd_MapVote_MapDownload(), GameTypeVote_ReadOption(), MapVote_CheckPic(), MapVote_Draw(), MapVote_ReadOption(), and Net_MapVote_Picture().
| float mv_select_lasttime[MAPVOTE_COUNT] |
Definition at line 29 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_Draw(), MapVote_DrawMapItem(), MapVote_Init(), and MapVote_RGB().
| int mv_selection |
Definition at line 43 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_Draw(), MapVote_DrawMapItem(), MapVote_DrawSuggester(), MapVote_Init(), MapVote_InputEvent(), MapVote_RGB(), and MapVote_Selection().
| bool mv_selection_keyboard |
Definition at line 46 of file mapvoting.qc.
Referenced by MapVote_Init(), MapVote_InputEvent(), and MapVote_Selection().
| string mv_suggester[MAPVOTE_COUNT] |
Definition at line 23 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), MapVote_Draw(), MapVote_DrawSuggester(), and MapVote_ReadOption().
| string mv_suggester_cache |
Definition at line 40 of file mapvoting.qc.
Referenced by MapVote_DrawSuggester(), and MapVote_Init().
| float mv_suggester_cachetime |
Definition at line 41 of file mapvoting.qc.
Referenced by MapVote_DrawSuggester(), and MapVote_Init().
| int mv_tie_winner |
Definition at line 34 of file mapvoting.qc.
Referenced by MapVote_Draw(), MapVote_FormatMapItem(), and MapVote_UpdateVotes().
| float mv_timeout |
Definition at line 35 of file mapvoting.qc.
Referenced by MapVote_Draw(), and MapVote_Init().
| float mv_top2_alpha |
Definition at line 37 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_Draw(), and MapVote_DrawMapItem().
| float mv_top2_time |
Definition at line 36 of file mapvoting.qc.
Referenced by MapVote_Draw(), and MapVote_UpdateMask().
| int mv_votes[MAPVOTE_COUNT] |
Definition at line 26 of file mapvoting.qc.
Referenced by MapVote_Draw(), MapVote_Init(), and MapVote_UpdateVotes().
| float mv_winner_alpha |
Definition at line 39 of file mapvoting.qc.
Referenced by MapVote_Draw(), MapVote_DrawAbstain(), and MapVote_DrawMapItem().
| float mv_winner_time |
Definition at line 38 of file mapvoting.qc.
Referenced by MapVote_Draw(), and NET_HANDLE().
| int n_ssdirs |
Definition at line 57 of file mapvoting.qc.
Referenced by MapVote_Init(), and MapVote_ReadOption().
| const int NUM_SSDIRS = 4 |
Definition at line 55 of file mapvoting.qc.
Referenced by MapVote_Init().
| string ssdirs[NUM_SSDIRS] |
Definition at line 56 of file mapvoting.qc.
Referenced by MapVote_Init(), and MapVote_ReadOption().