From e6a93a799a660e699266a0b108373500aa30b07c Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Thu, 14 Oct 2010 18:27:37 -0500 Subject: [PATCH] Added support for L4D2 on Mac OS X (bug 4647, r=fyren). --- AMBuildScript | 4 ++-- core/convar_sm_l4d.h | 2 +- gamedata/core.games/engine.l4d2.txt | 2 ++ gamedata/sdktools.games/engine.l4d2.txt | 30 +++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 3c60bff7..94604416 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -18,7 +18,7 @@ class SM: self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '5', 'name': 'LEFT4DEAD', 'platform': ['windows', 'linux']} self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '6', - 'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux']} + 'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin']} self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2', 'name': 'DARKMESSIAH', 'platform': ['windows']} self.sdkInfo['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '7', @@ -31,6 +31,7 @@ class SM: #Detect variables envvars = { 'MMSOURCE18': 'mmsource-1.8', 'HL2SDKOBVALVE': 'hl2sdk-ob-valve', + 'HL2SDKL4D2': 'hl2sdk-l4d2', 'MYSQL5': 'mysql-5.0' } @@ -38,7 +39,6 @@ class SM: envvars['HL2SDK'] = 'hl2sdk' envvars['HL2SDKOB'] = 'hl2sdk-ob' envvars['HL2SDKL4D'] = 'hl2sdk-l4d' - envvars['HL2SDKL4D2'] = 'hl2sdk-l4d2' #Dark Messiah is Windows-only if AMBuild.target['platform'] == 'windows': diff --git a/core/convar_sm_l4d.h b/core/convar_sm_l4d.h index 2e569da1..b25098f9 100644 --- a/core/convar_sm_l4d.h +++ b/core/convar_sm_l4d.h @@ -24,7 +24,7 @@ #ifdef _WIN32 #define FORCEINLINE_CVAR FORCEINLINE -#elif _LINUX +#elif defined _LINUX || defined __APPLE__ #define FORCEINLINE_CVAR inline #else #error "implement me" diff --git a/gamedata/core.games/engine.l4d2.txt b/gamedata/core.games/engine.l4d2.txt index c5195516..e46645b0 100644 --- a/gamedata/core.games/engine.l4d2.txt +++ b/gamedata/core.games/engine.l4d2.txt @@ -31,6 +31,7 @@ { "windows" "4" "linux" "4" + "mac" "4" } } @@ -45,6 +46,7 @@ { "library" "server" "linux" "@gEntList" + "mac" "@gEntList" } } } diff --git a/gamedata/sdktools.games/engine.l4d2.txt b/gamedata/sdktools.games/engine.l4d2.txt index c61cee57..681f690c 100644 --- a/gamedata/sdktools.games/engine.l4d2.txt +++ b/gamedata/sdktools.games/engine.l4d2.txt @@ -41,16 +41,19 @@ { "windows" "4" "linux" "4" + "mac" "4" } "GetTENext" { "windows" "8" "linux" "8" + "mac" "8" } "TE_GetServerClass" { "windows" "0" "linux" "0" + "mac" "0" } } @@ -65,6 +68,7 @@ { "library" "server" "linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE" + "mac" "@_ZN15CBaseTempEntity15s_pTempEntitiesE" } } } @@ -83,12 +87,14 @@ { "library" "server" "linux" "@_Z13DispatchSpawnP11CBaseEntityb" + "mac" "@_Z13DispatchSpawnP11CBaseEntityb" "windows" "\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x2A\x8B\xCB" } "CreateEntityByName" { "library" "server" "linux" "@_Z18CreateEntityByNamePKcib" + "mac" "@_Z18CreateEntityByNamePKcib" "windows" "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x2A\x56\xFF\xD2" } } @@ -110,6 +116,7 @@ "library" "server" "windows" "\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03" "linux" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc" + "mac" "@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc" } } } @@ -150,6 +157,7 @@ { "library" "server" "linux" "@g_pGameRules" + "mac" "@g_pGameRules" } } } @@ -186,6 +194,7 @@ { "library" "engine" "linux" "@sv" + "mac" "@sv" } } } @@ -200,6 +209,7 @@ "library" "server" "windows" "\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3" "linux" "@_Z23EntityFactoryDictionaryv" + "mac" "@_Z23EntityFactoryDictionaryv" } } } @@ -218,6 +228,7 @@ "library" "server" "windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6" "linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" + "mac" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f" } } } @@ -238,6 +249,7 @@ /* Not 100% sure on this, why would windows change and not linux - TEST ME */ "windows" "17" "linux" "63" + "mac" "63" } /** * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made. @@ -251,6 +263,7 @@ { "windows" "176" "linux" "176" + "mac" "176" } } } @@ -264,86 +277,103 @@ { "windows" "506" "linux" "507" + "mac" "507" } "RemovePlayerItem" { "windows" "288" "linux" "289" + "mac" "289" } "Weapon_GetSlot" { "windows" "286" "linux" "287" + "mac" "287" } "Ignite" { "windows" "221" "linux" "222" + "mac" "222" } "Extinguish" { "windows" "224" "linux" "225" + "mac" "225" } "Teleport" { "windows" "117" "linux" "118" + "mac" "118" } "CommitSuicide" { "windows" "474" "linux" "474" + "mac" "474" } "GetVelocity" { "windows" "149" "linux" "150" + "mac" "150" } "EyeAngles" { "windows" "140" "linux" "141" + "mac" "141" } "AcceptInput" { "windows" "43" "linux" "44" + "mac" "44" } "DispatchKeyValue" { "windows" "33" "linux" "32" + "mac" "32" } "DispatchKeyValueFloat" { "windows" "32" "linux" "33" + "mac" "33" } "DispatchKeyValueVector" { "windows" "31" "linux" "34" + "mac" "34" } "SetEntityModel" { "windows" "26" "linux" "27" + "mac" "27" } "WeaponEquip" { "windows" "279" "linux" "280" + "mac" "280" } "Activate" { "windows" "35" "linux" "36" + "mac" "36" } "PlayerRunCmd" { "windows" "452" "linux" "453" + "mac" "453" } } }