This commit is contained in:
Riley Labrecque
2024-06-29 13:38:57 -07:00
parent 02c9873990
commit e7bb839178
54 changed files with 1190 additions and 823 deletions
+13 -5
View File
@@ -23,7 +23,7 @@
extern IGameEngine *CreateGameEngineOSX();
#elif defined(SDL)
#include "GameEngine.h"
extern IGameEngine *CreateGameEngineSDL( );
extern IGameEngine *CreateGameEngineSDL();
#endif
#include "SpaceWarClient.h"
@@ -115,7 +115,7 @@ bool ParseCommandLine( const char *pchCmdLine, const char **ppchServerAddress, c
//-----------------------------------------------------------------------------
// Purpose: Main loop code shared between all platforms
//-----------------------------------------------------------------------------
void RunGameLoop( IGameEngine *pGameEngine, const char *pchServerAddress, const char *pchLobbyID )
void RunGameLoop( IGameEngine *pGameEngine, const char *pchServerAddress, const char *pchLobbyID, bool bShowTimer )
{
// Make sure it initialized ok
if ( pGameEngine->BReadyForUse() )
@@ -123,6 +123,8 @@ void RunGameLoop( IGameEngine *pGameEngine, const char *pchServerAddress, const
// Initialize the game
CSpaceWarClient *pGameClient = new CSpaceWarClient( pGameEngine );
pGameClient->SetShowTimer( bShowTimer );
// Black background
pGameEngine->SetBackgroundColor( 0, 0, 0, 0 );
@@ -196,9 +198,13 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow )
// This will also load the in-game steam overlay dll into your process. That dll is normally
// injected by steam when it launches games, but by calling this you cause it to always load,
// even when not launched via steam.
if ( !SteamAPI_Init() )
SteamErrMsg errMsg = { 0 };
if ( SteamAPI_InitEx( &errMsg ) != k_ESteamAPIInitResult_OK )
{
OutputDebugString( "SteamAPI_Init() failed\n" );
OutputDebugString( "SteamAPI_Init() failed: " );
OutputDebugString( errMsg );
OutputDebugString( "\n" );
Alert( "Fatal Error", "Steam must be running to play this game (SteamAPI_Init() failed).\n" );
return EXIT_FAILURE;
}
@@ -231,6 +237,8 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow )
}
}
bool bShowTimer = !!strstr( pchCmdLine, "-timer" );
// do a DRM self check
Steamworks_SelfCheck();
@@ -271,7 +279,7 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow )
SteamInput()->SetInputActionManifestFilePath( rgchFullPath );
// This call will block and run until the game exits
RunGameLoop( pGameEngine, pchServerAddress, pchLobbyID );
RunGameLoop( pGameEngine, pchServerAddress, pchLobbyID, bShowTimer );
// Shutdown the SteamAPI
SteamAPI_Shutdown();
+8 -1
View File
@@ -52,7 +52,8 @@ public:
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToUser - friendrequestaccept", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToUser, "friendrequestaccept" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToUser - friendrequestignore", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToUser, "friendrequestignore" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToWebPage", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToWebPage, "https://tomb.valve.org/community/actions/buttons/" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToWebPage", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToWebPage, "https://steamcommunity.com/" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToWebPageModal", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToWebPageModal, "https://steamcommunity.com/" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToStore", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToStore, "" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToStore - Add to Cart", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToStore, "addtocart" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "ActivateGameOverlayToStore - Add to Cart & Show", { OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToStore, "addtocartandshow" } ) );
@@ -131,6 +132,12 @@ void COverlayExamples::RunFrame()
}
break;
case OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToWebPageModal:
{
SteamFriends()->ActivateGameOverlayToWebPage( m_delayedCommand.m_pchExtraCommandData, k_EActivateGameOverlayToWebPageMode_Modal );
}
break;
case OverlayExample_t::k_EOverlayExampleItem_ActivateGameOverlayToStore:
{
if ( !strcmp( m_delayedCommand.m_pchExtraCommandData, "addtocart" ) )
+65 -4
View File
@@ -27,6 +27,7 @@
#include "RemotePlay.h"
#include "ItemStore.h"
#include "OverlayExamples.h"
#include "timeline.h"
#ifdef WIN32
#include <direct.h>
#else
@@ -35,6 +36,11 @@
#define _getcwd getcwd
#define _snprintf snprintf
#endif
#if defined(USE_SDL2)
#include <SDL2/SDL.h>
#elif defined(SDL)
#include <SDL3/SDL.h>
#endif
CSpaceWarClient *g_pSpaceWarClient = NULL;
@@ -47,6 +53,21 @@ extern bool ParseCommandLine( const char *pchCmdLine, const char **ppchServerAdd
#endif
//-----------------------------------------------------------------------------
// Purpose: OS-flexible function to get milliseconds of clock time
//-----------------------------------------------------------------------------
uint32 Plat_GetTicks()
{
#if defined(USE_SDL2)
return SDL_GetTicks64();
#elif defined(SDL)
return SDL_GetTicks();
#else
return GetTickCount();
#endif
}
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
@@ -56,7 +77,6 @@ CSpaceWarClient::CSpaceWarClient( IGameEngine *pGameEngine )
}
//-----------------------------------------------------------------------------
// Purpose: initialize our client for use
//-----------------------------------------------------------------------------
@@ -93,7 +113,11 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine )
m_usServerPort = 0;
m_ulPingSentTime = 0;
m_bSentWebOpen = false;
m_bShowTimer = false;
m_unTicksAtLaunch = 0;
m_hTimerFont = 0;
m_hConnServer = k_HSteamNetConnection_Invalid;
m_unTicksAtLaunch = Plat_GetTicks();
// Initialize the peer to peer connection process
SteamNetworkingUtils()->InitRelayNetworkAccess();
@@ -151,6 +175,7 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine )
// Init stats
m_pStatsAndAchievements = new CStatsAndAchievements( pGameEngine );
m_pTimeline = new CTimeline( pGameEngine );
m_pLeaderboards = new CLeaderboards( pGameEngine );
m_pFriendsList = new CFriendsList( pGameEngine );
m_pMusicPlayer = new CMusicPlayer( pGameEngine );
@@ -216,6 +241,9 @@ CSpaceWarClient::~CSpaceWarClient()
if ( m_pStatsAndAchievements )
delete m_pStatsAndAchievements;
if ( m_pTimeline )
delete m_pTimeline;
if ( m_pServerBrowser )
delete m_pServerBrowser;
@@ -549,6 +577,7 @@ void CSpaceWarClient::SetGameState( EClientGameState eState )
// Let the stats handler check the state (so it can detect wins, losses, etc...)
m_pStatsAndAchievements->OnGameStateChange( eState );
m_pTimeline->OnGameStateChange( eState );
// update any rich presence state
UpdateRichPresenceConnectionInfo();
@@ -1270,8 +1299,8 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
if ( pchSteamRichPresenceDisplay != NULL )
{
SteamFriends()->SetRichPresence( "steam_display", bDisplayScoreInRichPresence ? "#StatusWithScore" : "#StatusWithoutScore" );
SteamFriends()->SetRichPresence( "gamestatus", pchSteamRichPresenceDisplay );
SteamFriends()->SetRichPresence( "steam_display", bDisplayScoreInRichPresence ? "#StatusWithScore" : "#StatusWithoutScore" );
}
// steam_player_group defines who the user is playing with. Set it to the steam ID
@@ -1407,6 +1436,7 @@ void CSpaceWarClient::RunOccasionally()
// Service stats and achievements
m_pStatsAndAchievements->RunFrame();
m_pTimeline->RunFrame();
}
@@ -1418,6 +1448,8 @@ void CSpaceWarClient::RunFrame()
// Get any new data off the network to begin with
ReceiveNetworkData();
RenderTimer();
if ( m_eConnectedStatus != k_EClientNotConnected && m_pGameEngine->GetGameTickCount() - m_ulLastNetworkDataReceivedTime > MILLISECONDS_CONNECTION_TIMEOUT )
{
SetConnectionFailureText( "Game server connection failure." );
@@ -1887,6 +1919,35 @@ void CSpaceWarClient::RunFrame()
}
//-----------------------------------------------------------------------------
// Purpose: Draws the timer, if -timer was present on the command line
//-----------------------------------------------------------------------------
void CSpaceWarClient::RenderTimer()
{
if ( !m_bShowTimer )
return;
static const uint32 k_unTimerFontHeight = 48;
if ( !m_hTimerFont )
{
m_hTimerFont = m_pGameEngine->HCreateFont( k_unTimerFontHeight, FW_BOLD, false, "Arial" );
if ( !m_hTimerFont )
OutputDebugString( "Timer font was not created properly, text won't draw\n" );
}
uint32 unSecondsSinceLaunch = ( Plat_GetTicks() - m_unTicksAtLaunch ) / 1000;
char buf[ 128 ];
sprintf_safe( buf, "%u:%02u", unSecondsSinceLaunch / 60, unSecondsSinceLaunch % 60 );
DWORD dwColor = D3DCOLOR_ARGB( 255, 255, 200, 200 );
RECT rectHeader;
rectHeader.top = 5;
rectHeader.bottom = rectHeader.top + k_unTimerFontHeight;
rectHeader.left = 0;
rectHeader.right = m_pGameEngine->GetViewportWidth() - 5;
m_pGameEngine->BDrawString( m_hTimerFont, rectHeader, dwColor, TEXTPOS_RIGHT | TEXTPOS_TOP, buf );
}
//-----------------------------------------------------------------------------
// Purpose: Draws some HUD text indicating game status
//-----------------------------------------------------------------------------
@@ -2349,7 +2410,7 @@ void CSpaceWarClient::OnRequestEncryptedAppTicket( EncryptedAppTicketResponse_t
if ( pEncryptedAppTicketResponse->m_eResult == k_EResultOK )
{
uint8 rgubTicket[1024];
uint8 rgubTicket[4096];
uint32 cubTicket;
SteamUser()->GetEncryptedAppTicket( rgubTicket, sizeof( rgubTicket), &cubTicket );
@@ -2361,7 +2422,7 @@ void CSpaceWarClient::OnRequestEncryptedAppTicket( EncryptedAppTicketResponse_t
// included is the "secret" key for spacewar. normally this is secret
const uint8 rgubKey[k_nSteamEncryptedAppTicketSymmetricKeyLen] = { 0xed, 0x93, 0x86, 0x07, 0x36, 0x47, 0xce, 0xa5, 0x8b, 0x77, 0x21, 0x49, 0x0d, 0x59, 0xed, 0x44, 0x57, 0x23, 0xf0, 0xf6, 0x6e, 0x74, 0x14, 0xe1, 0x53, 0x3b, 0xa3, 0x3c, 0xd8, 0x03, 0xbd, 0xbd };
uint8 rgubDecrypted[1024];
uint8 rgubDecrypted[4096];
uint32 cubDecrypted = sizeof( rgubDecrypted );
if ( !SteamEncryptedAppTicket_BDecryptTicket( rgubTicket, cubTicket, rgubDecrypted, &cubDecrypted, rgubKey, sizeof( rgubKey ) ) )
{
+11
View File
@@ -39,6 +39,7 @@ class CHTMLSurface;
class CRemotePlayList;
class CItemStore;
class COverlayExamples;
class CTimeline;
// Height of the HUD font
#define HUD_FONT_HEIGHT 18
@@ -140,6 +141,7 @@ struct OverlayExample_t
k_EOverlayExampleItem_ActivateGameOverlay,
k_EOverlayExampleItem_ActivateGameOverlayToUser,
k_EOverlayExampleItem_ActivateGameOverlayToWebPage,
k_EOverlayExampleItem_ActivateGameOverlayToWebPageModal,
k_EOverlayExampleItem_ActivateGameOverlayToStore,
// k_EOverlayExampleItem_ActivateGameOverlayRemotePlayTogetherInviteDialog,
k_EOverlayExampleItem_ActivateGameOverlayInviteDialogConnectString,
@@ -169,6 +171,8 @@ public:
// Run a game frame
void RunFrame();
void RenderTimer();
// Service calls that need to happen less frequently than every frame (e.g. every second)
void RunOccasionally();
@@ -250,6 +254,7 @@ public:
void ExecCommandLineConnect( const char *pchServerAddress, const char *pchLobbyID );
void SetShowTimer( bool bShowTimer ) { m_bShowTimer = bShowTimer; }
private:
// Receive a response from the server for a connection attempt
@@ -374,6 +379,11 @@ private:
// keep track of if we opened the overlay for a gamewebcallback
bool m_bSentWebOpen;
// true if we want to show an on-screen timer in our main menu
bool m_bShowTimer;
uint32 m_unTicksAtLaunch;
HGAMEFONT m_hTimerFont;
// simple class to marshal callbacks from pinging a game server
class CGameServerPing : public ISteamMatchmakingPingResponse
{
@@ -448,6 +458,7 @@ private:
std::map<int, HGAMETEXTURE> m_MapSteamImagesToTextures;
CStatsAndAchievements *m_pStatsAndAchievements;
CTimeline *m_pTimeline;
CLeaderboards *m_pLeaderboards;
CFriendsList *m_pFriendsList;
+5 -2
View File
@@ -37,9 +37,12 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
// !FIXME! We need a way to pass the dedicated server flag here!
if ( !SteamGameServer_Init( unIP, SPACEWAR_SERVER_PORT, usMasterServerUpdaterPort, eMode, SPACEWAR_SERVER_VERSION ) )
SteamErrMsg errMsg = { 0 };
if ( SteamGameServer_InitEx( unIP, SPACEWAR_SERVER_PORT, usMasterServerUpdaterPort, eMode, SPACEWAR_SERVER_VERSION, &errMsg ) != k_ESteamAPIInitResult_OK )
{
OutputDebugString( "SteamGameServer_Init call failed\n" );
OutputDebugString( "SteamGameServer_Init call failed: " );
OutputDebugString( errMsg );
OutputDebugString( "\n" );
}
if ( SteamGameServer() )
+18 -6
View File
@@ -7,14 +7,26 @@ TOP=$(cd "${0%/*}" && echo ${PWD})
PROGRAM="${TOP}/SteamworksExampleLinux"
# Steam sets this environment variable when launching games
if [ "$STEAM_RUNTIME" = "" ]; then
export STEAM_RUNTIME="${TOP}/../../tools/linux/runtime/i386"
export LD_LIBRARY_PATH="${STEAM_RUNTIME}/lib/i386-linux-gnu:${STEAM_RUNTIME}/lib:${STEAM_RUNTIME}/usr/lib/i386-linux-gnu:${STEAM_RUNTIME}/usr/lib:${LD_LIBRARY_PATH}"
log () {
( echo "[$$]: $*" >&2 ) || :
}
# Require LDLP scout runtime environment
if [ -n "${STEAM_RUNTIME-}" ]; then
log "Detected scout LDLP runtime."
# continue
else
log "Relaunch under scout LDLP runtime."
log exec "$HOME/.steam/bin/steam-runtime/run.sh" "$0" "$@"
exec "$HOME/.steam/bin/steam-runtime/run.sh" "$0" "$@"
# unreachable
fi
# Add the current directory to the library path to pick up libsteam_api.so
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:."
# The public SDK binary links with -Wl,--rpath=$ORIGIN and doesn't need this,
# But the binary produced in-tree at Valve does
export LD_LIBRARY_PATH=${TOP}:${LD_LIBRARY_PATH-}
cd "${TOP}"
exec "${PROGRAM}" "$@"
+8 -8
View File
@@ -1,31 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
VisualStudioVersion = 16.0.34931.43
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "steamworksexample", "SteamworksExample.vcxproj", "{FC177B29-2631-C58B-D723-530DA88155B4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|Win32.ActiveCfg = Debug|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|Win32.Build.0 = Debug|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|x64.ActiveCfg = Debug|x64
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|x64.Build.0 = Debug|x64
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|Win32.ActiveCfg = Release|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|Win32.Build.0 = Release|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|x86.ActiveCfg = Debug|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Debug|x86.Build.0 = Debug|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|x64.ActiveCfg = Release|x64
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|x64.Build.0 = Release|x64
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|x86.ActiveCfg = Release|Win32
{FC177B29-2631-C58B-D723-530DA88155B4}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {369E9D43-1FBD-44D1-985F-BE511071CD7A}
SolutionGuid = {D30502FB-58C1-4ADF-A153-A9F564A0910A}
EndGlobalSection
EndGlobal
+272 -34
View File
@@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
@@ -24,6 +32,13 @@
<PlatformToolset>v142</PlatformToolset>
<ProtobufVersion>3.15.3</ProtobufVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<TargetName>steamworksexample</TargetName>
<PlatformToolset>v142</PlatformToolset>
<ProtobufVersion>3.15.3</ProtobufVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
@@ -31,15 +46,28 @@
<PlatformToolset>v142</PlatformToolset>
<ProtobufVersion>3.15.3</ProtobufVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<TargetName>steamworksexample</TargetName>
<PlatformToolset>v142</PlatformToolset>
<ProtobufVersion>3.15.3</ProtobufVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
@@ -47,21 +75,41 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreLinkEventUseInBuild>
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreLinkEventUseInBuild>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PostBuildEventUseInBuild>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreBuildEventUseInBuild>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</PreBuildEventUseInBuild>
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreLinkEventUseInBuild>
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</PreLinkEventUseInBuild>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PostBuildEventUseInBuild>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)win64\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)win64\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
@@ -116,7 +164,8 @@
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>$(OutDir)\$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<BaseAddress> </BaseAddress>
<BaseAddress>
</BaseAddress>
<TargetMachine>MachineX86</TargetMachine>
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
@@ -144,6 +193,85 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Xdcmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent />
<CustomBuildStep />
<ClCompile>
<AdditionalOptions> /std:c++17 /bigobj /Zc:__cplusplus</AdditionalOptions>
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions);_DEBUG;_EXTERNAL_DLL_EXT=.dll;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\Steam\main\src\SteamWorksExample;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>
</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
<ObjectFileName>$(IntDir)\</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<CompileAs>CompileAsCpp</CompileAs>
<DisableSpecificWarnings>;4577;4091</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BrowseInformationFile>$(IntDir)\</BrowseInformationFile>
<ErrorReporting>Prompt</ErrorReporting>
</ClCompile>
<PreLinkEvent />
<Link>
<AdditionalOptions> /ignore:4221</AdditionalOptions>
<AdditionalDependencies>;legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)\steamworksexample.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>;$(DXSDK_DIR)Lib\x64;</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;libcd;libcmt</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>$(OutDir)\$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<BaseAddress>
</BaseAddress>
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\steamworksexample.bsc</OutputFile>
</Bscmake>
<PostBuildEvent />
<Proto>
<ProtoBatch>Default</ProtoBatch>
<Service>.</Service>
</Proto>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
<Culture>1033</Culture>
</ResourceCompile>
<Manifest>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalManifestFiles>SteamWorksExample.exe.manifest</AdditionalManifestFiles>
</Manifest>
<Xdcmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Xdcmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
</PreBuildEvent>
@@ -201,7 +329,8 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<BaseAddress> </BaseAddress>
<BaseAddress>
</BaseAddress>
<TargetMachine>MachineX86</TargetMachine>
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
@@ -229,35 +358,110 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Xdcmake>
</ItemDefinitionGroup>
<ItemGroup>
<Library Include="..\public\steam\lib\win32\sdkencryptedappticket.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</Library>
<Library Include="..\public\steam\lib\win32\sdkencryptedappticket.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</Library>
</ItemGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent />
<CustomBuildStep />
<ClCompile>
<AdditionalOptions> /std:c++17 /bigobj /d2Zi+ /Zc:__cplusplus</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions);NDEBUG;_EXTERNAL_DLL_EXT=.dll;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\Steam\main\src\SteamWorksExample;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>
</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OpenMPSupport>false</OpenMPSupport>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)\</AssemblerListingLocation>
<ObjectFileName>$(IntDir)\</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
<BrowseInformation>false</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<CompileAs>CompileAsCpp</CompileAs>
<DisableSpecificWarnings>;4577;4091</DisableSpecificWarnings>
<OmitFramePointers>false</OmitFramePointers>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BrowseInformationFile>$(IntDir)\</BrowseInformationFile>
<ErrorReporting>Prompt</ErrorReporting>
</ClCompile>
<PreLinkEvent />
<Link>
<AdditionalOptions> /ignore:4221</AdditionalOptions>
<AdditionalDependencies>;legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)\steamworksexample.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>;$(DXSDK_DIR)Lib\x64;</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;libcd;libcmtd</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)\$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>$(OutDir)\$(TargetName).map</MapFileName>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<BaseAddress>
</BaseAddress>
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>$(OutDir)\steamworksexample.bsc</OutputFile>
</Bscmake>
<PostBuildEvent />
<Proto>
<ProtoBatch>Default</ProtoBatch>
<Service>.</Service>
</Proto>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
<Culture>1033</Culture>
</ResourceCompile>
<Manifest>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalManifestFiles>SteamWorksExample.exe.manifest</AdditionalManifestFiles>
</Manifest>
<Xdcmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Xdcmake>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="GameEngine.h" />
<ClInclude Include="gameengineosx.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="gameenginesdl.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="gameenginewin32.h" />
<ClInclude Include="glstringosx.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="VectorEntity.h" />
<ClInclude Include="BaseMenu.h" />
@@ -272,7 +476,9 @@
<ClInclude Include="MainMenu.h" />
<ClInclude Include="..\glmgr\mathlite.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="Messages.h" />
<ClInclude Include="musicplayer.h" />
@@ -294,6 +500,7 @@
<ClInclude Include="StarField.h" />
<ClInclude Include="StatsAndAchievements.h" />
<ClInclude Include="Sun.h" />
<ClInclude Include="timeline.h" />
<ClInclude Include="voicechat.h" />
</ItemGroup>
<ItemGroup>
@@ -301,57 +508,81 @@
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="gameenginesdl.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="gameenginewin32.cpp" />
<ClCompile Include="..\tier1\pathmatch.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="VectorEntity.cpp" />
<ClCompile Include="BaseMenu.cpp" />
<ClCompile Include="..\glmgr\cglmbuffer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\cglmfbo.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\cglmprogram.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\cglmquery.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\cglmtex.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="clanchatroom.cpp" />
<ClCompile Include="connectingmenu.cpp" />
<ClCompile Include="..\glmgr\dx9asmtogl2.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\dxabstract.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Friends.cpp" />
<ClCompile Include="..\glmgr\glmgr.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\glmgrbasics.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\glmgr\glmgrext.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="htmlsurface.cpp" />
<ClCompile Include="Inventory.cpp" />
@@ -361,7 +592,9 @@
<ClCompile Include="MainMenu.cpp" />
<ClCompile Include="..\glmgr\mathlite.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="musicplayer.cpp" />
<ClCompile Include="OverlayExamples.cpp" />
@@ -380,44 +613,49 @@
<ClCompile Include="StarField.cpp" />
<ClCompile Include="StatsAndAchievements.cpp" />
<ClCompile Include="Sun.cpp" />
<ClCompile Include="timeline.cpp" />
<ClCompile Include="voicechat.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="SpaceWarRes.rc" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="steamworksexample.vpc">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Running VPC CRC Check - steamworksexample.vpc</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">rem IncrediBuild_AllowOverlap&#x0D;&#x0A;if exist &quot;..\devtools\bin\vpc.exe&quot; &quot;..\devtools\bin\vpc.exe&quot; -crc2 &quot;steamworksexample.vcxproj&quot;&#x0D;&#x0A;if ERRORLEVEL 1 exit /b 1&#x0D;&#x0A;echo crc_complete &gt; D:\dev\Steam\main\src\SteamWorksExample\steamworksexample.vpc.sentinel</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">D:\dev\Steam\main\src\SteamWorksExample\steamworksexample.vpc.sentinel</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Running VPC CRC Check - steamworksexample.vpc</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">rem IncrediBuild_AllowOverlap&#x0D;&#x0A;if exist &quot;..\devtools\bin\vpc.exe&quot; &quot;..\devtools\bin\vpc.exe&quot; -crc2 &quot;steamworksexample.vcxproj&quot;&#x0D;&#x0A;if ERRORLEVEL 1 exit /b 1&#x0D;&#x0A;echo crc_complete &gt; D:\dev\Steam\main\src\SteamWorksExample\steamworksexample.vpc.sentinel</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">D:\dev\Steam\main\src\SteamWorksExample\steamworksexample.vpc.sentinel</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<Library Include="..\public\steam\lib\win32\sdkencryptedappticket.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Library>
<Library Include="..\public\steam\lib\win64\sdkencryptedappticket64.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Library>
<Library Include="..\redistributable_bin\win64\steam_api64.lib">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</Library>
</ItemGroup>
<ItemGroup>
<None Include="gameengineosx.mm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="glstringosx.mm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\glmgr\glmgrcocoa.mm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\vpc_scripts\branch_settings.vpc" />
<None Include="..\vpc_scripts\loadaddress.vpc" />
<None Include="..\vpc_scripts\steam_base.vpc" />
<None Include="..\vpc_scripts\steam_exe_base.vpc" />
<None Include="..\vpc_scripts\steam_exe_win_win32_base.vpc" />
<None Include="..\vpc_scripts\steam_steamapilib_include.vpc" />
<None Include="..\vpc_scripts\steam_win32_base.vpc" />
<None Include="..\vpc_scripts\version.vpc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
@@ -25,21 +25,24 @@
<Filter Include="Source Files\Game">
<UniqueIdentifier>{84F38993-4EB4-8F80-2E2C-37AA0D9C662A}</UniqueIdentifier>
</Filter>
<Filter Include="VPC Scripts">
<UniqueIdentifier>{A40EE377-781A-C6B9-0C7C-B3BE118D248E}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Library Include="..\public\steam\lib\win32\sdkencryptedappticket.lib">
<Filter>Link Libraries</Filter>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<Filter>Link Libraries</Filter>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<Filter>Link Libraries</Filter>
</Library>
<Library Include="..\public\steam\lib\win32\sdkencryptedappticket.lib">
<Filter>Link Libraries</Filter>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<Library Include="..\public\steam\lib\win64\sdkencryptedappticket64.lib">
<Filter>Link Libraries</Filter>
</Library>
<Library Include="..\redistributable_bin\steam_api.lib">
<Library Include="..\redistributable_bin\win64\steam_api64.lib">
<Filter>Link Libraries</Filter>
</Library>
</ItemGroup>
@@ -158,6 +161,9 @@
<ClInclude Include="Sun.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="timeline.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="voicechat.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
@@ -295,6 +301,9 @@
<ClCompile Include="Sun.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="timeline.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="voicechat.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
@@ -304,11 +313,6 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="steamworksexample.vpc">
<Filter>VPC Scripts</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
@@ -321,29 +325,5 @@
<None Include="..\glmgr\glmgrcocoa.mm">
<Filter>Source Files\Game</Filter>
</None>
<None Include="..\vpc_scripts\branch_settings.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\loadaddress.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\steam_base.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\steam_exe_base.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\steam_exe_win_win32_base.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\steam_steamapilib_include.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\steam_win32_base.vpc">
<Filter>VPC Scripts</Filter>
</None>
<None Include="..\vpc_scripts\version.vpc">
<Filter>VPC Scripts</Filter>
</None>
</ItemGroup>
</Project>
+121
View File
@@ -0,0 +1,121 @@
//====== Copyright © 1996-2023 Valve Corporation, All rights reserved. =======
//
// Purpose: Class for adding to the Game Recording Timeline for different game states
//
//=============================================================================
#include "stdafx.h"
#include "timeline.h"
#include "SpaceWarClient.h"
extern uint32 Plat_GetTicks();
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CTimeline::CTimeline( IGameEngine *pGameEngine ) :
m_pGameEngine( pGameEngine ),
m_GameID( SteamUtils()->GetAppID() ),
m_bInGame( false )
{
SteamTimeline()->SetTimelineGameMode( k_ETimelineGameMode_Menus );
m_ulSessionCounter = 0;
m_ulInGameStartTime = 0;
m_unLastTimestampIndexDisplayed = 0;
}
//-----------------------------------------------------------------------------
// Purpose: Game state has changed
//-----------------------------------------------------------------------------
void CTimeline::OnGameStateChange( EClientGameState eNewState )
{
bool bInGameNow = false;
switch ( eNewState )
{
case k_EClientGameWaitingForPlayers:
case k_EClientGameActive:
case k_EClientGameQuitMenu:
case k_EClientGameDraw:
case k_EClientGameWinner:
bInGameNow = true;
break;
case k_EClientStatsAchievements:
case k_EClientGameStartServer:
case k_EClientGameMenu:
case k_EClientGameExiting:
case k_EClientGameInstructions:
case k_EClientGameConnecting:
case k_EClientGameConnectionFailure:
case k_EClientFindInternetServers:
default:
break;
}
// change the timeline bar from gray to blue and add a timeline range covering the game session
if ( m_bInGame != bInGameNow )
{
if ( bInGameNow )
{
SteamTimeline()->SetTimelineGameMode( k_ETimelineGameMode_Playing );
m_unSessionStart = Plat_GetTicks();
// start timers for adding timeline timestamps
m_ulInGameStartTime = m_pGameEngine->GetGameTickCount();
m_unLastTimestampIndexDisplayed = 0;
}
else
{
SteamTimeline()->SetTimelineGameMode( k_ETimelineGameMode_Menus );
uint32 unSessionEnd = Plat_GetTicks();
uint32 unSessionDuration = unSessionEnd - m_unSessionStart;
float flDurationSeconds = (float)unSessionDuration / 1000.f;
float flStartOffsetSeconds = -flDurationSeconds;
SteamTimeline()->AddTimelineEvent( "steam_starburst", "In Match", nullptr, 100, flStartOffsetSeconds, flDurationSeconds, k_ETimelineEventClipPriority_None );
}
m_bInGame = bInGameNow;
}
// add a highlight marker every time the player wins
if ( eNewState == k_EClientGameWinner && SpaceWarClient()->BLocalPlayerWonLastGame() )
{
SteamTimeline()->AddTimelineEvent( "steam_attack", "Winner!", "You won a round!", 10, 0, 0, k_ETimelineEventClipPriority_Standard );
}
else if ( eNewState == k_EClientGameDraw )
{
SteamTimeline()->AddTimelineEvent( "steam_defend", "Draw", "This round was a draw.", 5, 0, 0, k_ETimelineEventClipPriority_None );
}
}
//-----------------------------------------------------------------------------
// Purpose: Run a frame. Does not need to run at full frame rate.
//-----------------------------------------------------------------------------
void CTimeline::RunFrame()
{
if ( m_bInGame )
{
// every 5 minutes, add a new timeline timestamp in the form of "05:00", "10:00", etc.
// Note: we use 5 minutes here for demo purposes, but if appropriate for your game, you
// might want to choose a larger interval to keep the Timeline less cluttered for users
const uint32 k_unMinutesBetweenTimestamps = 5;
const uint64 k_unMaxTimeToDisplayIndex = 95 / k_unMinutesBetweenTimestamps;
uint64 ulSinceStartMS = m_pGameEngine->GetGameTickCount() - m_ulInGameStartTime;
uint32 unTimestampIndex = (int)( ulSinceStartMS / (k_unMinutesBetweenTimestamps * 60 * 1000) );
if ( unTimestampIndex > 0 && unTimestampIndex > m_unLastTimestampIndexDisplayed && unTimestampIndex <= k_unMaxTimeToDisplayIndex )
{
// max string length is "95:00"
char rgchBuffer[ 6 ];
sprintf_safe( rgchBuffer, "%02d:00", unTimestampIndex * k_unMinutesBetweenTimestamps );
SteamTimeline()->SetTimelineStateDescription( rgchBuffer, 0 );
m_unLastTimestampIndexDisplayed = unTimestampIndex;
}
}
}
+33
View File
@@ -0,0 +1,33 @@
//====== Copyright © 1996-2023 Valve Corporation, All rights reserved. =======
//
// Purpose: Class for adding to the Game Recording Timeline for different game states
//
//=============================================================================
#ifndef TIMELINE_H
#define TIMELINE_H
#include "SpaceWar.h"
#include "GameEngine.h"
class CTimeline
{
public:
CTimeline( IGameEngine *pGameEngine );
void RunFrame();
void OnGameStateChange( EClientGameState eNewState );
private:
CGameID m_GameID;
IGameEngine *m_pGameEngine;
bool m_bInGame;
uint64 m_ulInGameStartTime;
uint32 m_unLastTimestampIndexDisplayed;
uint64 m_ulSessionCounter;
uint32 m_unSessionStart;
};
#endif // TIMELINE_H