diff --git a/Readme.txt b/Readme.txt index 7451c90..82dab94 100644 --- a/Readme.txt +++ b/Readme.txt @@ -11,6 +11,14 @@ website at: http://partner.steamgames.com Revision History: +---------------------------------------------------------------- +v1.16 29th July 2011 +---------------------------------------------------------------- +HTTP +* added ISteamHTTP::SetHTTPRequestRawPostBody() to set the raw body of a POST request +Screenshots +* added ISteamScreenshots interface, which enables adding screenshots to the user's screenshot library and tagging them with location data or relevant players that are visible in the screenshot. A game can provide screenshots based on game events using WriteScreenshot, AddScreenshotToLibrary, or TriggerScreenshot. A game can also choose to provide its own screenshots when the Steam screenshot hotkey is pressed by calling HookScreenshots() and listening for the ScreenshotRequested_t callback. + ---------------------------------------------------------------- v1.15 1st June 2011 ---------------------------------------------------------------- diff --git a/SteamworksExample/SpaceWarClient.cpp b/SteamworksExample/SpaceWarClient.cpp index ab9798d..0980bb3 100644 --- a/SteamworksExample/SpaceWarClient.cpp +++ b/SteamworksExample/SpaceWarClient.cpp @@ -49,7 +49,7 @@ CSpaceWarClient::CSpaceWarClient( IGameEngine *pGameEngine ) : //----------------------------------------------------------------------------- -// Purpose: Shared initialization for both constructors +// Purpose: initialize our client for use //----------------------------------------------------------------------------- void CSpaceWarClient::Init( IGameEngine *pGameEngine ) { @@ -78,7 +78,7 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine ) m_pServer = NULL; m_uPlayerShipIndex = 0; m_eConnectedStatus = k_EClientNotConnected; - m_bTransitionedGameState = false; + m_bTransitionedGameState = true; m_rgchErrorText[0] = 0; m_unServerIP = 0; m_usServerPort = 0; @@ -483,7 +483,7 @@ void CSpaceWarClient::SetGameState( EClientGameState eState ) //----------------------------------------------------------------------------- -// Purpose: Used to transition game state +// Purpose: set the error string to display in the UI //----------------------------------------------------------------------------- void CSpaceWarClient::SetConnectionFailureText( const char *pchErrorText ) { @@ -553,7 +553,7 @@ void CSpaceWarClient::InitiateServerConnection( CSteamID steamIDGameServer ) //----------------------------------------------------------------------------- -// Purpose: steam callback, trigger when our connection state changes +// Purpose: steam callback, triggered when our connection to another client fails //----------------------------------------------------------------------------- void CSpaceWarClient::OnP2PSessionConnectFail( P2PSessionConnectFail_t *pCallback ) { @@ -894,10 +894,12 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) { // If we are just opening the find servers screen, then start a refresh m_pServerBrowser->RefreshInternetServers(); + SteamFriends()->SetRichPresence( "status", "Finding an internet game" ); } else if ( m_eGameState == k_EClientFindLANServers ) { m_pServerBrowser->RefreshLANServers(); + SteamFriends()->SetRichPresence( "status", "Finding a LAN game" ); } else if ( m_eGameState == k_EClientCreatingLobby ) { @@ -909,10 +911,12 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) // set the function to call when this completes m_SteamCallResultLobbyCreated.Set( hSteamAPICall, this, &CSpaceWarClient::OnLobbyCreated ); } + SteamFriends()->SetRichPresence( "status", "Creating a lobby" ); } else if ( m_eGameState == k_EClientFindLobby ) { m_pLobbyBrowser->Refresh(); + SteamFriends()->SetRichPresence( "status", "Main menu: finding lobbies" ); } else if ( m_eGameState == k_EClientGameMenu ) { @@ -927,6 +931,8 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) delete m_pServer; m_pServer = NULL; } + + SteamFriends()->SetRichPresence( "status", "Main menu" ); } else if ( m_eGameState == k_EClientGameWinner || m_eGameState == k_EClientGameDraw ) { @@ -937,16 +943,19 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) { // we've switched to the leaderboard menu m_pLeaderboards->Show(); + SteamFriends()->SetRichPresence( "status", "Viewing leaderboards" ); } else if ( m_eGameState == k_EClientGameActive ) { // start voice chat m_pVoiceChat->StartVoiceChat(); + SteamFriends()->SetRichPresence( "status", "In match" ); } else if ( m_eGameState == k_EClientRemoteStorage ) { // we've switched to the remote storage menu m_pRemoteStorage->Show(); + SteamFriends()->SetRichPresence( "status", "Viewing remote storage" ); } } @@ -1026,7 +1035,7 @@ void CSpaceWarClient::OnGameOverlayActivated( GameOverlayActivated_t *callback ) //----------------------------------------------------------------------------- -// Purpose: Handles notification that we are now connected to Steam +// Purpose: Handles notification that we are failed to connected to Steam //----------------------------------------------------------------------------- void CSpaceWarClient::OnSteamServerConnectFailure( SteamServerConnectFailure_t *callback ) { diff --git a/SteamworksExample/SpaceWarServer.cpp b/SteamworksExample/SpaceWarServer.cpp index 050b376..773cffe 100644 --- a/SteamworksExample/SpaceWarServer.cpp +++ b/SteamworksExample/SpaceWarServer.cpp @@ -281,7 +281,7 @@ void CSpaceWarServer::OnClientBeginAuthentication( CSteamID steamIDClient, void } //----------------------------------------------------------------------------- -// Purpose: Handle a new client connecting +// Purpose: A new client that connected has had their authentication processed //----------------------------------------------------------------------------- void CSpaceWarServer::OnAuthCompleted( bool bAuthSuccessful, uint32 iPendingAuthIndex ) { @@ -864,7 +864,7 @@ void CSpaceWarServer::OnSteamServersConnected( SteamServersConnected_t *pLogonSu //----------------------------------------------------------------------------- -// Purpose: Callback from Steam3 when logon is fully completed and VAC secure policy is set +// Purpose: Callback from Steam when logon is fully completed and VAC secure policy is set //----------------------------------------------------------------------------- void CSpaceWarServer::OnPolicyResponse( GSPolicyResponse_t *pPolicyResponse ) { diff --git a/SteamworksExample/stdafx.h b/SteamworksExample/stdafx.h index fe3b047..f436264 100644 --- a/SteamworksExample/stdafx.h +++ b/SteamworksExample/stdafx.h @@ -130,6 +130,7 @@ typedef unsigned char uint8; #define VK_RIGHT 0x27 #define VK_DOWN 0x28 #define VK_SELECT 0x29 +#define VK_F5 0x74 #ifndef VALVE_RECT_DEFINED #define VALVE_RECT_DEFINED diff --git a/glmgr/glmgrbasics.h b/glmgr/glmgrbasics.h index 1c1f569..1805d5c 100644 --- a/glmgr/glmgrbasics.h +++ b/glmgr/glmgrbasics.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "imageformat.h" @@ -36,6 +37,15 @@ // some portability shims to eliminate dependencies on partcular segments of Valve code +typedef int8_t int8; +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; +typedef int64_t int64; +typedef uint64_t uint64; + class CUtlBuffer { public: @@ -152,9 +162,6 @@ private: #define Q_memset(dst,count,val) memset(dst,count,val) -typedef int int32; -typedef unsigned int uint32; - int V_stricmp(const char *s1, const char *s2 ); char const* V_stristr( char const* pStr, char const* pSearch ); @@ -304,7 +311,7 @@ inline void GLMDebugger( void ) { if (GLMDebugChannelMask() & (1<