diff --git a/core-legacy/msvc7/sourcemm.sln b/core-legacy/msvc7/sourcemm.sln deleted file mode 100644 index fa8eb75..0000000 --- a/core-legacy/msvc7/sourcemm.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemm", "sourcemm.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug.ActiveCfg = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug.Build.0 = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release.ActiveCfg = Release|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/core-legacy/msvc7/sourcemm.vcproj b/core-legacy/msvc7/sourcemm.vcproj deleted file mode 100644 index 556c859..0000000 --- a/core-legacy/msvc7/sourcemm.vcproj +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core-legacy/msvc8/sourcemm.sln b/core-legacy/msvc8/sourcemm.sln deleted file mode 100644 index b338452..0000000 --- a/core-legacy/msvc8/sourcemm.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemm", "sourcemm.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.Build.0 = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.ActiveCfg = Release|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/core-legacy/msvc8/sourcemm.vcproj b/core-legacy/msvc8/sourcemm.vcproj deleted file mode 100644 index 6430d55..0000000 --- a/core-legacy/msvc8/sourcemm.vcproj +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/msvc9/sourcemm.sln b/core-legacy/msvc9/mm_core-legacy.sln similarity index 82% rename from core/msvc9/sourcemm.sln rename to core-legacy/msvc9/mm_core-legacy.sln index b29443a..fdd8fba 100644 --- a/core/msvc9/sourcemm.sln +++ b/core-legacy/msvc9/mm_core-legacy.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "metamodsource_ep2", "sourcemm.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mm_core-legacy", "mm_core-legacy.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/core-legacy/msvc9/sourcemm.vcproj b/core-legacy/msvc9/mm_core-legacy.vcproj similarity index 75% rename from core-legacy/msvc9/sourcemm.vcproj rename to core-legacy/msvc9/mm_core-legacy.vcproj index 90d6340..a0c540d 100644 --- a/core-legacy/msvc9/sourcemm.vcproj +++ b/core-legacy/msvc9/mm_core-legacy.vcproj @@ -2,9 +2,9 @@ @@ -18,10 +18,9 @@ - - - + + @@ -303,50 +297,50 @@ Name="SourceHook" > diff --git a/core/Makefile b/core/Makefile index 2394b59..cb945b0 100644 --- a/core/Makefile +++ b/core/Makefile @@ -36,6 +36,7 @@ ifeq "$(ENGINE)" "orangebox" HL2SDK = $(HL2SDK_OB) HL2PUB = $(HL2SDK_OB)/public HL2LIB = $(HL2SDK_OB)/lib/linux + CFLAGS += -DSOURCE_ENGINE=3 INCLUDE += -I$(HL2SDK_OB)/public/game/server SRCDS = $(SRCDS_BASE)/orangebox BINARY = metamod.2.ep2.so @@ -45,15 +46,17 @@ ifeq "$(ENGINE)" "left4dead" HL2SDK = $(HL2SDK_L4D) HL2PUB = $(HL2SDK_L4D)/public HL2LIB = $(HL2SDK_L4D)/lib/linux + CFLAGS += -DSOURCE_ENGINE=4 INCLUDE += -I$(HL2SDK_L4D)/public/game/server SRCDS = $(SRCDS_BASE)/l4d_demo - BINARY = metamod2.l4d.so + BINARY = metamod.2.l4d.so override ENGSET = true endif +CFLAGS += -DSE_ORANGEBOX=3 -DSE_LEFT4DEAD=4 + LINK += $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so -static-libgcc - INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \ -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I. -Isourcehook -I../loader diff --git a/core/metamod_console.cpp b/core/metamod_console.cpp index 6683605..66c1a4b 100644 --- a/core/metamod_console.cpp +++ b/core/metamod_console.cpp @@ -97,6 +97,7 @@ bool Command_Meta(IMetamodSourceCommandInfo *info) CONMSG(" DLL Path: %s\n", g_Metamod.GetGameBinaryPath()); CONMSG(" Interface: ServerGameDLL%03d\n", g_Metamod.GetGameDLLVersion()); +#if 0 int engine = g_Metamod.GetSourceEngineBuild(); if (engine == SOURCE_ENGINE_ORIGINAL) { @@ -110,6 +111,13 @@ bool Command_Meta(IMetamodSourceCommandInfo *info) { CONMSG(" Engine: Episode 2 (Orange Box, 2007)\n"); } +#endif + +#if SOURCE_ENGINE == SE_ORANGEBOX + CONMSG(" Engine: Episode 2 (Orange Box, 2007)\n"); +#else + CONMSG(" Engine: Left 4 Dead (2008)\n"); +#endif // Display user messages int messages = g_Metamod.GetUserMessageCount(); diff --git a/core/msvc8/sourcemm.sln b/core/msvc8/sourcemm.sln deleted file mode 100644 index b338452..0000000 --- a/core/msvc8/sourcemm.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemm", "sourcemm.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.Build.0 = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.ActiveCfg = Release|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/core/msvc8/sourcemm.vcproj b/core/msvc8/sourcemm.vcproj deleted file mode 100644 index 4d35750..0000000 --- a/core/msvc8/sourcemm.vcproj +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/msvc9/mm_core.sln b/core/msvc9/mm_core.sln new file mode 100644 index 0000000..e0fcb9a --- /dev/null +++ b/core/msvc9/mm_core.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mm_core", "mm_core.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 + Debug - Orange Box|Win32 = Debug - Orange Box|Win32 + Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 + Release - Orange Box|Win32 = Release - Orange Box|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 + {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/core/msvc9/mm_core.vcproj b/core/msvc9/mm_core.vcproj new file mode 100644 index 0000000..4aa9c00 --- /dev/null +++ b/core/msvc9/mm_core.vcproj @@ -0,0 +1,586 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/msvc9/sourcemm.vcproj b/core/msvc9/sourcemm.vcproj deleted file mode 100644 index e094917..0000000 --- a/core/msvc9/sourcemm.vcproj +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/provider/provider_ep2.cpp b/core/provider/provider_ep2.cpp index 3b31e4d..3e47f47 100644 --- a/core/provider/provider_ep2.cpp +++ b/core/provider/provider_ep2.cpp @@ -360,7 +360,11 @@ const char *BaseProvider::GetGameDescription() int BaseProvider::DetermineSourceEngine(const char *game) { +#if SOURCE_ENGINE == SE_LEFT4DEAD + return SOURCE_ENGINE_LEFT4DEAD; +#else return SOURCE_ENGINE_ORANGEBOX; +#endif } ConVar *BaseProvider::CreateConVar(const char *name, diff --git a/loader/loader.h b/loader/loader.h index 883e674..67446f6 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -8,8 +8,6 @@ #define WINDOWS_LEAN_AND_MEAN #include #define PLATFORM_MAX_PATH MAX_PATH -typedef INTPTR intptr_t; -typedef UINTPTR uintptr_t; #define SH_COMP SH_COMP_MSVC #elif defined __linux__ #include diff --git a/core-legacy/msvc9/sourcemm.sln b/loader/msvc9/mm_loader.sln similarity index 54% rename from core-legacy/msvc9/sourcemm.sln rename to loader/msvc9/mm_loader.sln index 299311a..b1ffb3a 100644 --- a/core-legacy/msvc9/sourcemm.sln +++ b/loader/msvc9/mm_loader.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sourcemm", "sourcemm.vcproj", "{F7D47743-73B3-49B5-9D76-2333C5DFD565}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mm_loader", "mm_loader.vcproj", "{B8EBE5D8-739A-4ED4-83F7-E68CDED09F90}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Debug|Win32.Build.0 = Debug|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.ActiveCfg = Release|Win32 - {F7D47743-73B3-49B5-9D76-2333C5DFD565}.Release|Win32.Build.0 = Release|Win32 + {B8EBE5D8-739A-4ED4-83F7-E68CDED09F90}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8EBE5D8-739A-4ED4-83F7-E68CDED09F90}.Debug|Win32.Build.0 = Debug|Win32 + {B8EBE5D8-739A-4ED4-83F7-E68CDED09F90}.Release|Win32.ActiveCfg = Release|Win32 + {B8EBE5D8-739A-4ED4-83F7-E68CDED09F90}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/loader/msvc9/mm_loader.vcproj b/loader/msvc9/mm_loader.vcproj new file mode 100644 index 0000000..07e14f0 --- /dev/null +++ b/loader/msvc9/mm_loader.vcproj @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +