Generate and upload breakpad symbols if BREAKPAD_SYMBOL_SERVER variable is set. (
bug 5229, r=dvander)
3 * =============================================================================
5 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #ifndef _INCLUDE_SOURCEMOD_MENUVOTING_H_
33 #define _INCLUDE_SOURCEMOD_MENUVOTING_H_
35 #include <IMenuManager.h>
36 #include <IPlayerHelpers.h>
37 #include <sh_vector.h>
38 #include "sm_globals.h"
41 using namespace SourceHook;
42 using namespace SourceMod;
44 class VoteMenuHandler :
47 public IClientListener,
50 public: //SMGlobalClass
51 void OnSourceModAllInitialized();
52 void OnSourceModShutdown();
53 void OnSourceModLevelChange(const char *mapName);
54 public: //IClientListener
55 void OnClientDisconnected(int client);
56 public: //IMenuHandler
57 unsigned int GetMenuAPIVersion2();
58 void OnMenuStart(IBaseMenu *menu);
59 void OnMenuDisplay(IBaseMenu *menu, int client, IMenuPanel *display);
60 void OnMenuSelect(IBaseMenu *menu, int client, unsigned int item);
61 void OnMenuSelect2(IBaseMenu *menu, int client, unsigned int item, unsigned int item_on_page);
62 void OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason);
63 void OnMenuEnd(IBaseMenu *menu, MenuEndReason reason);
64 void OnMenuDrawItem(IBaseMenu *menu, int client, unsigned int item, unsigned int &style);
65 unsigned int OnMenuDisplayItem(IBaseMenu *menu, int client, IMenuPanel *panel, unsigned int item, const ItemDrawInfo &dr);
67 ResultType OnTimer(ITimer *pTimer, void *pData);
68 void OnTimerEnd(ITimer *pTimer, void *pData);
70 bool StartVote(IBaseMenu *menu,
71 unsigned int num_clients,
73 unsigned int max_time,
74 unsigned int flags=0);
75 bool IsVoteInProgress();
77 IBaseMenu *GetCurrentMenu();
79 unsigned int GetRemainingVoteDelay();
80 bool IsClientInVotePool(int client);
81 bool GetClientVoteChoice(int client, unsigned int *pItem);
82 bool RedrawToClient(int client, bool revote);
84 void Reset(IMenuHandler *mh);
85 void DecrementPlayerCount();
88 bool InitializeVoting(IBaseMenu *menu,
89 IMenuHandler *handler,
93 void DrawHintProgress();
94 void BuildVoteLeaders();
96 IMenuHandler *m_pHandler;
97 unsigned int m_Clients;
98 unsigned int m_TotalClients;
100 CVector<unsigned int> m_Votes;
101 IBaseMenu *m_pCurMenu;
104 unsigned int m_NumVotes;
105 unsigned int m_VoteTime;
106 unsigned int m_VoteFlags;
108 unsigned int m_nMenuTime;
109 int m_ClientVotes[256+1];
110 bool m_Revoting[256+1];
111 char m_leaderList[1024];
112 ITimer *m_displayTimer;
115 #endif //_INCLUDE_SOURCEMOD_MENUVOTING_H_