1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-19 08:52:34 +01:00

Add support for Blade Symphony (bug 5948, r=asherkin).

This commit is contained in:
Nicholas Hastings 2013-10-09 08:46:13 -04:00
parent 1af37d530f
commit c8a3fd5959
7 changed files with 23 additions and 8 deletions

View File

@ -51,15 +51,18 @@ class MMS:
self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
'name': 'EYE', 'platform': ['windows'],
'dir': 'hl2sdk-eye'}
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '16',
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '17',
'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
'dir': 'hl2sdk-csgo'}
self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '17',
self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '18',
'name': 'DOTA', 'platform': ['windows'],
'dir': 'hl2sdk-dota'}
self.possibleSdks['portal2'] = {'sdk': 'HL2SDKPORTAL2','ext': '2.portal2', 'def': '15',
'name': 'PORTAL2', 'platform': [],
'dir': 'hl2sdk-portal2'}
self.possibleSdks['blade'] = {'sdk': 'HL2SDKBLADE', 'ext': '2.blade', 'def': '16',
'name': 'BLADE', 'platform': ['windows', 'linux'],
'dir': 'hl2sdk-blade'}
self.sdkInfo = { }
@ -277,9 +280,9 @@ class MMS:
libs = []
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
libs = ['tier1_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
elif sdk in ['l4d', 'nd', 'csgo']:
elif sdk in ['l4d', 'nd', 'blade', 'csgo']:
libs = ['tier1_i486.a', 'libvstdlib.so', 'libtier0.so']
if sdk == 'csgo':
if sdk in ['blade', 'csgo']:
libs.insert(0, 'interfaces_i486.a')
elif sdk == 'sdk2013':
libs = ['tier1.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
@ -312,7 +315,7 @@ class MMS:
job.AddCommand(SymlinkCommand(link, target))
elif AMBuild.target['platform'] == 'windows':
libs = ['tier0', 'tier1', 'vstdlib']
if sdk in ['swarm', 'csgo', 'dota']:
if sdk in ['swarm', 'blade', 'csgo', 'dota']:
libs.append('interfaces')
for lib in libs:
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
@ -326,7 +329,7 @@ class MMS:
else:
builder.AddObjectFiles(['tier1_i486.a'])
if( sdk in ['csgo', 'dota'] ):
if( sdk in ['blade', 'csgo', 'dota'] ):
builder.AddObjectFiles(['interfaces_i486.a'])
def DefaultHL2Compiler(self, path, sdk, noLink = False):
@ -361,7 +364,7 @@ class MMS:
compiler['CDEFINES'].remove('_snprintf=snprintf')
compiler['CDEFINES'].remove('_vsnprintf=vsnprintf')
if sdk in ['swarm', 'csgo', 'dota']:
if sdk in ['swarm', 'blade', 'csgo', 'dota']:
if AMBuild.target['platform'] == 'windows':
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
else:
@ -394,7 +397,7 @@ class MMS:
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'l4d2']:
compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
elif sdk in ['l4d', 'nd', 'csgo']:
elif sdk in ['l4d', 'nd', 'blade', 'csgo']:
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
else:

View File

@ -62,6 +62,7 @@ enum
#define SOURCE_ENGINE_TF2 17 /**< Team Fortress 2 */
#define SOURCE_ENGINE_NUCLEARDAWN 18 /**< Nuclear Dawn */
#define SOURCE_ENGINE_SDK2013 19 /**< Source SDK 2013 */
#define SOURCE_ENGINE_BLADE 20 /**< Blade Symphony */
#define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */

View File

@ -139,6 +139,8 @@ bool Command_Meta(IMetamodSourceCommandInfo *info)
CONMSG(" Engine: E.Y.E. Divine Cybermancy (2011)\n");
#elif SOURCE_ENGINE == SE_PORTAL2
CONMSG(" Engine: Portal 2 (2011)\n");
#elif SOURCE_ENGINE == SE_BLADE
CONMSG(" Engine: Blade Symphony (2013)\n");
#elif SOURCE_ENGINE == SE_CSGO
CONMSG(" Engine: Counter-Strike: Global Offensive (2012)\n");
#elif SOURCE_ENGINE == SE_DOTA

View File

@ -399,6 +399,8 @@ int BaseProvider::DetermineSourceEngine(const char *game)
return SOURCE_ENGINE_EYE;
#elif SOURCE_ENGINE == SE_PORTAL2
return SOURCE_ENGINE_PORTAL2;
#elif SOURCE_ENGINE == SE_BLADE
return SOURCE_ENGINE_BLADE;
#elif SOURCE_ENGINE == SE_CSGO
return SOURCE_ENGINE_CSGO;
#elif SOURCE_ENGINE == SE_DOTA

View File

@ -86,6 +86,7 @@ static const char *backend_names[] =
"2.tf2",
"2.nd",
"2.sdk2013",
"2.blade",
};
#if defined _WIN32
@ -280,6 +281,10 @@ mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name)
else if (engineFactory("VEngineServer022", NULL) != NULL &&
engineFactory("VEngineCvar007", NULL) != NULL)
{
if (strcmp(game_name, "berimbau") == 0)
{
return MMBackend_Blade;
}
if (strcmp(game_name, "portal2") == 0)
{
return MMBackend_Portal2;

View File

@ -98,6 +98,7 @@ enum MetamodBackend
MMBackend_TF2,
MMBackend_NuclearDawn,
MMBackend_SDK2013,
MMBackend_Blade,
MMBackend_UNKNOWN
};

View File

@ -136,6 +136,7 @@ public:
/* AS inserted ClientFullyConnect into vtable, so move entries up on older engines */
if (mm_backend != MMBackend_AlienSwarm
&& mm_backend != MMBackend_Portal2
&& mm_backend != MMBackend_Blade
&& mm_backend != MMBackend_CSGO
&& mm_backend != MMBackend_DOTA)
{