From 7a74c92167fd2ec2511517b02160035ab0ea9d80 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 14 Oct 2007 18:53:29 +0000 Subject: [PATCH] various build fixes and vcproj changes --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401553 --- core/ChatTriggers.cpp | 13 +- core/ChatTriggers.h | 1 + core/ConVarManager.h | 3 +- core/HalfLife2.cpp | 2 + core/msvc8/sourcemod_mm.sln | 20 +- core/msvc8/sourcemod_mm.vcproj | 339 +++++++++++++++++++++++++-------- core/sm_srvcmds.h | 1 + core/smn_console.cpp | 4 - 8 files changed, 288 insertions(+), 95 deletions(-) diff --git a/core/ChatTriggers.cpp b/core/ChatTriggers.cpp index dcda7f33..e3841ee1 100644 --- a/core/ChatTriggers.cpp +++ b/core/ChatTriggers.cpp @@ -35,17 +35,22 @@ #include "ConCmdManager.h" #include -/* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does */ +/* :HACKHACK: We can't SH_DECL here because ConCmdManager.cpp does. + * While the OB build only runs on MM:S 1.6.0+ (SH 5+), the older one + * can technically be compiled against any MM:S version after 1.4.2. + */ #if defined ORANGEBOX_BUILD extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate1); extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate1); #else extern bool __SourceHook_FHRemoveConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); -#if SH_IMPL_VERSION >= 4 +#if SH_IMPL_VERSION >= 5 +extern int __SourceHook_FHAddConCommandDispatch(void *, ISourceHook::AddHookMode, bool, class fastdelegate::FastDelegate0); +#elif SH_IMPL_VERSION == 4 extern int __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); -#else +#elif SH_IMPL_VERSION == 3 extern bool __SourceHook_FHAddConCommandDispatch(void *, bool, class fastdelegate::FastDelegate0); -#endif //SH_IMPL_VERSION >= 4 +#endif //SH_IMPL_VERSION #endif //ORANGEBOX_BUILD ChatTriggers g_ChatTriggers; diff --git a/core/ChatTriggers.h b/core/ChatTriggers.h index ddfbecf7..c4adbb4a 100644 --- a/core/ChatTriggers.h +++ b/core/ChatTriggers.h @@ -35,6 +35,7 @@ #include "sm_globals.h" #include "sourcemm_api.h" #include +#include class ChatTriggers : public SMGlobalClass { diff --git a/core/ConVarManager.h b/core/ConVarManager.h index 5ffd7a80..98d92c7f 100644 --- a/core/ConVarManager.h +++ b/core/ConVarManager.h @@ -40,6 +40,7 @@ #include #include #include +#include using namespace SourceHook; @@ -51,7 +52,7 @@ struct ConVarInfo Handle_t handle; /**< Handle to convar */ bool sourceMod; /**< Determines whether or not convar was created by a SourceMod plugin */ IChangeableForward *pChangeForward; /**< Forward associated with convar */ - FnChangeCallback_t origCallback; /**< The original callback function */ + FnChangeCallback_t origCallback; /**< The original callback function */ #if PLAPI_VERSION < 12 const char *name; /**< Name of convar */ #endif diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index 18c2bebc..0a8ac2cb 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -34,6 +34,8 @@ #include "sourcemm_api.h" #include "UserMessages.h" #include "PlayerManager.h" +#include "sm_stringutil.h" +#include CHalfLife2 g_HL2; bool g_IsOriginalEngine = false; diff --git a/core/msvc8/sourcemod_mm.sln b/core/msvc8/sourcemod_mm.sln index e103b70d..980aa0c5 100644 --- a/core/msvc8/sourcemod_mm.sln +++ b/core/msvc8/sourcemod_mm.sln @@ -6,22 +6,34 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CrazyDebug|Win32 = CrazyDebug|Win32 + Debug - Episode 1|Win32 = Debug - Episode 1|Win32 + Debug - Old Metamod|Win32 = Debug - Old Metamod|Win32 Debug - Orange Box|Win32 = Debug - Orange Box|Win32 Debug|Win32 = Debug|Win32 + Release - Episode 1|Win32 = Release - Episode 1|Win32 + Release - Old Metamod|Win32 = Release - Old Metamod|Win32 Release - Orange Box|Win32 = Release - Orange Box|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug|Win32.ActiveCfg = CrazyDebug|Win32 {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.CrazyDebug|Win32.Build.0 = CrazyDebug|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.ActiveCfg = Debug - Episode 1|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Episode 1|Win32.Build.0 = Debug - Episode 1|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.ActiveCfg = Debug - Old Metamod|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Old Metamod|Win32.Build.0 = Debug - Old Metamod|Win32 {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.Build.0 = Debug|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.ActiveCfg = CrazyDebug|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Debug|Win32.Build.0 = CrazyDebug|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.ActiveCfg = Release - Episode 1|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Episode 1|Win32.Build.0 = Release - Episode 1|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.ActiveCfg = Release - Old Metamod|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Old Metamod|Win32.Build.0 = Release - Old Metamod|Win32 {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.ActiveCfg = Release|Win32 - {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.Build.0 = Release|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.ActiveCfg = Debug - Old Metamod|Win32 + {E39527CD-7CAB-4420-97CC-DA1B93B260BC}.Release|Win32.Build.0 = Debug - Old Metamod|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/core/msvc8/sourcemod_mm.vcproj b/core/msvc8/sourcemod_mm.vcproj index 6e4b8348..0c083ba3 100644 --- a/core/msvc8/sourcemod_mm.vcproj +++ b/core/msvc8/sourcemod_mm.vcproj @@ -16,7 +16,88 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -463,7 +629,7 @@ RelativePath="..\Database.cpp" > + + + #include +#include #include "sm_trie.h" using namespace SourceMod; diff --git a/core/smn_console.cpp b/core/smn_console.cpp index d88ccd2a..95b2d580 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -623,10 +623,6 @@ static cell_t sm_RegAdminCmd(IPluginContext *pContext, const cell_t *params) return 1; } -LOL BUILD IS STILL BROKEN -LOL -Seriously. Don't compile it. - static cell_t sm_GetCmdArgs(IPluginContext *pContext, const cell_t *params) { const CCommand *pCmd = g_HL2.PeekCommandStack();