fixed various linux compilation problems

added menus to the makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40784
This commit is contained in:
David Anderson 2007-05-13 04:43:52 +00:00
parent 76b0554f2e
commit 530a5aad80
6 changed files with 10 additions and 11 deletions

View File

@ -23,7 +23,7 @@ OBJECTS = AdminCache.cpp CDataPack.cpp ConCmdManager.cpp ConVarManager.cpp CoreC
Database.cpp DebugReporter.cpp EventManager.cpp GameConfigs.cpp HalfLife2.cpp Logger.cpp \ Database.cpp DebugReporter.cpp EventManager.cpp GameConfigs.cpp HalfLife2.cpp Logger.cpp \
MemoryUtils.cpp PlayerManager.cpp TextParsers.cpp TimerSys.cpp Translator.cpp UserMessages.cpp \ MemoryUtils.cpp PlayerManager.cpp TextParsers.cpp TimerSys.cpp Translator.cpp UserMessages.cpp \
sm_autonatives.cpp sm_memtable.cpp sm_srvcmds.cpp sm_stringutil.cpp sm_trie.cpp \ sm_autonatives.cpp sm_memtable.cpp sm_srvcmds.cpp sm_stringutil.cpp sm_trie.cpp \
sourcemm_api.cpp sourcemod.cpp sourcemm_api.cpp sourcemod.cpp MenuStyle_Base.cpp MenuStyle_Valve.cpp MenuManager.cpp
OBJECTS += smn_admin.cpp smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \ OBJECTS += smn_admin.cpp smn_bitbuffer.cpp smn_console.cpp smn_core.cpp \
smn_datapacks.cpp smn_entities.cpp smn_events.cpp smn_fakenatives.cpp \ smn_datapacks.cpp smn_entities.cpp smn_events.cpp smn_fakenatives.cpp \
smn_filesystem.cpp smn_float.cpp smn_functions.cpp smn_gameconfigs.cpp smn_halflife.cpp smn_handles.cpp smn_keyvalues.cpp \ smn_filesystem.cpp smn_float.cpp smn_functions.cpp smn_gameconfigs.cpp smn_halflife.cpp smn_handles.cpp smn_keyvalues.cpp \

View File

@ -513,7 +513,6 @@ skip_search:
if (exitButton || (displayNext || displayPrev)) if (exitButton || (displayNext || displayPrev))
{ {
/* Add spacers so we can pad to the end */ /* Add spacers so we can pad to the end */
unsigned int null_pos = 0;
for (unsigned int i=0; i<padding; i++) for (unsigned int i=0; i<padding; i++)
{ {
position = display->DrawItem(padItem); position = display->DrawItem(padItem);

View File

@ -421,7 +421,7 @@ CBaseMenu::~CBaseMenu()
bool CBaseMenu::AppendItem(const char *info, const ItemDrawInfo &draw) bool CBaseMenu::AppendItem(const char *info, const ItemDrawInfo &draw)
{ {
if (m_Pagination == MENU_NO_PAGINATION if (m_Pagination == (unsigned)MENU_NO_PAGINATION
&& m_items.size() >= m_pStyle->GetMaxPageItems()) && m_items.size() >= m_pStyle->GetMaxPageItems())
{ {
return false; return false;
@ -444,7 +444,7 @@ bool CBaseMenu::AppendItem(const char *info, const ItemDrawInfo &draw)
bool CBaseMenu::InsertItem(unsigned int position, const char *info, const ItemDrawInfo &draw) bool CBaseMenu::InsertItem(unsigned int position, const char *info, const ItemDrawInfo &draw)
{ {
if (m_Pagination == MENU_NO_PAGINATION if (m_Pagination == (unsigned)MENU_NO_PAGINATION
&& m_items.size() >= m_pStyle->GetMaxPageItems()) && m_items.size() >= m_pStyle->GetMaxPageItems())
{ {
return false; return false;

View File

@ -111,12 +111,12 @@ public:
protected: protected:
String m_Title; String m_Title;
IMenuStyle *m_pStyle; IMenuStyle *m_pStyle;
BaseStringTable m_Strings;
unsigned int m_Pagination; unsigned int m_Pagination;
CVector<CItem> m_items; CVector<CItem> m_items;
BaseStringTable m_Strings;
bool m_ExitButton; bool m_ExitButton;
bool m_bCancelling;
bool m_bShouldDelete; bool m_bShouldDelete;
bool m_bCancelling;
}; };
#endif //_INCLUDE_MENUSTYLE_BASE_H #endif //_INCLUDE_MENUSTYLE_BASE_H

View File

@ -22,8 +22,8 @@
SH_DECL_HOOK4_void(IServerPluginHelpers, CreateMessage, SH_NOATTRIB, false, edict_t *, DIALOG_TYPE, KeyValues *, IServerPluginCallbacks *); SH_DECL_HOOK4_void(IServerPluginHelpers, CreateMessage, SH_NOATTRIB, false, edict_t *, DIALOG_TYPE, KeyValues *, IServerPluginCallbacks *);
ValveMenuStyle g_ValveMenuStyle; ValveMenuStyle g_ValveMenuStyle;
const char *g_OptionNumTable[]; extern const char *g_OptionNumTable[];
const char *g_OptionCmdTable[]; extern const char *g_OptionCmdTable[];
IServerPluginCallbacks *g_pVSPHandle = NULL; IServerPluginCallbacks *g_pVSPHandle = NULL;
CallClass<IServerPluginHelpers> *g_pSPHCC = NULL; CallClass<IServerPluginHelpers> *g_pSPHCC = NULL;
@ -378,12 +378,12 @@ bool CValveMenu::SetExitButton(bool set)
return false; return false;
} }
static const char *g_OptionNumTable[11] = const char *g_OptionNumTable[] =
{ {
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"
}; };
static const char *g_OptionCmdTable[11] = const char *g_OptionCmdTable[] =
{ {
"sm_vmenuselect 0", /* INVALID! */ "sm_vmenuselect 0", /* INVALID! */
"sm_vmenuselect 1", "sm_vmenuselect 1",

View File

@ -183,8 +183,8 @@ public:
private: private:
size_t m_Size; size_t m_Size;
unsigned int m_FirstLink; unsigned int m_FirstLink;
unsigned int m_LastLink;
unsigned int m_FreeNodes; unsigned int m_FreeNodes;
unsigned int m_LastLink;
unsigned int m_MaxSize; unsigned int m_MaxSize;
FastLinkNode *m_Nodes; FastLinkNode *m_Nodes;
}; };