This commit is contained in:
Riley Labrecque
2025-03-30 17:07:09 -07:00
parent e7bb839178
commit 1b9765621f
41 changed files with 780 additions and 289 deletions
+20
View File
@@ -9,6 +9,26 @@ Welcome to the Steamworks SDK. For documentation please see our partner
website at: http://partner.steamgames.com website at: http://partner.steamgames.com
----------------------------------------------------------------
v1.61 8th November 2024
----------------------------------------------------------------
ISteamTimeline:
* Renamed Set/ClearTimelineStateDescription to Set/ClearTimelineTooltip to make it more clear where the text will appear.
* Renamed AddTimelineEvent to AddInstantaneousTimelineEvent and removed the duration parameter.
* Added AddRangeTimelineEvent for adding a a timeline event that happens over a period of time.
* Added Start/Update/EndRangeTimelineEvent calls for situations where the caller doesn't know when the event will end before creating it.
* Added RemoveTimelineEvent to let the game remove an event it previously added
* Added DoesEventRecordingExist/OpenOverlayToTimelineEvent, which allow the game to show an event in the Steam overlay
* Added Start/EndGamePhase, along with some supporting functions, to let the game identify meaningful time ranges like multiplayer matches or chapters in a single player game. See the Timeline documentation for more information.
ISteamUserStats:
* RequestCurrentStats is no longer necessary and has been removed. The Steam Client will synchronize this data before your game launches.
ISteamInput:
* Added glyph support for the Wireless HORIPAD for Steam
---------------------------------------------------------------- ----------------------------------------------------------------
v1.60 19th June 2024 v1.60 19th June 2024
---------------------------------------------------------------- ----------------------------------------------------------------
+15
View File
@@ -23,6 +23,7 @@ enum EMessage
k_EMsgServerUpdateWorld = k_EMsgServerBegin+4, k_EMsgServerUpdateWorld = k_EMsgServerBegin+4,
k_EMsgServerExiting = k_EMsgServerBegin+5, k_EMsgServerExiting = k_EMsgServerBegin+5,
k_EMsgServerPingResponse = k_EMsgServerBegin+6, k_EMsgServerPingResponse = k_EMsgServerBegin+6,
k_EMsgServerPlayerHitSun = k_EMsgServerBegin+7,
// Client messages // Client messages
k_EMsgClientBegin = 500, k_EMsgClientBegin = 500,
@@ -204,6 +205,20 @@ private:
CSteamID from_steamID; CSteamID from_steamID;
}; };
// A notification to the client that this player collided with the sun
struct MsgServerPlayerHitSun_t
{
MsgServerPlayerHitSun_t() : m_dwMessageType( LittleDWord( k_EMsgServerPlayerHitSun ) ) {}
DWORD GetMessageType() const { return LittleDWord( m_dwMessageType ); }
void SetSteamID( CSteamID steamID ) { from_steamID = steamID; }
CSteamID GetSteamID() const { return from_steamID; }
private:
const DWORD m_dwMessageType;
CSteamID from_steamID;
};
#pragma pack( pop ) #pragma pack( pop )
#endif // MESSAGES_H #endif // MESSAGES_H
+58 -1
View File
@@ -68,6 +68,15 @@ public:
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Set Notification Position: Bottom Left", { OverlayExample_t::k_EOverlayExampleItem_Notification_SetPosition, "2" } ) ); AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Set Notification Position: Bottom Left", { OverlayExample_t::k_EOverlayExampleItem_Notification_SetPosition, "2" } ) );
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Set Notification Position: Bottom Right", { OverlayExample_t::k_EOverlayExampleItem_Notification_SetPosition, "3" } ) ); AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Set Notification Position: Bottom Right", { OverlayExample_t::k_EOverlayExampleItem_Notification_SetPosition, "3" } ) );
if ( m_pOverlayExamples->BHasLastGamePhase() )
{
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Show last match", { OverlayExample_t::k_EOverlayExampleItem_Timeline_OpenOverlayToGamePhase } ) );
}
if ( m_pOverlayExamples->BHasLastTimelineEvent() )
{
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Show last crash into sun", { OverlayExample_t::k_EOverlayExampleItem_Timeline_OpenOverlayToTimelineEvent } ) );
}
AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Return to main menu", { OverlayExample_t::k_EOverlayExampleItem_BackToMenu, NULL } ) ); AddMenuItem( COverlayExamplesMenu::MenuItem_t( "Return to main menu", { OverlayExample_t::k_EOverlayExampleItem_BackToMenu, NULL } ) );
PopSelectedItem(); PopSelectedItem();
@@ -195,6 +204,13 @@ void COverlayExamples::RunFrame()
SteamUtils()->SetOverlayNotificationPosition( (ENotificationPosition)atoi( m_delayedCommand.m_pchExtraCommandData ) ); SteamUtils()->SetOverlayNotificationPosition( (ENotificationPosition)atoi( m_delayedCommand.m_pchExtraCommandData ) );
break; break;
case OverlayExample_t::k_EOverlayExampleItem_Timeline_OpenOverlayToGamePhase:
SteamTimeline()->OpenOverlayToGamePhase( m_strLastGamePhaseIDToShow.c_str() );
break;
case OverlayExample_t::k_EOverlayExampleItem_Timeline_OpenOverlayToTimelineEvent:
SteamTimeline()->OpenOverlayToTimelineEvent( m_ulLastCrashIntoSunEventIDToShow );
break;
default: default:
break; break;
} }
@@ -218,6 +234,20 @@ void COverlayExamples::OnMenuSelection( OverlayExample_t selection )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void COverlayExamples::Show() void COverlayExamples::Show()
{ {
if ( SpaceWarClient()->GetLastGamePhaseID() )
{
SteamAPICall_t hSteamAPICall = SteamTimeline()->DoesGamePhaseRecordingExist( std::to_string( SpaceWarClient()->GetLastGamePhaseID() ).c_str() );
m_SteamCallResultDoesGamePhaseRecordingExist.Set( hSteamAPICall, this, &COverlayExamples::OnDoesGamePhaseRecordingExist );
}
m_strLastGamePhaseIDToShow.erase();
if ( SpaceWarClient()->GetLastCrashIntoSunEvent() )
{
SteamAPICall_t hSteamAPICall = SteamTimeline()->DoesEventRecordingExist( SpaceWarClient()->GetLastCrashIntoSunEvent() );
m_SteamCallResultDoesEventRecordingExist.Set( hSteamAPICall, this, &COverlayExamples::OnDoesEventRecordingExist );
}
m_pMenu->Rebuild(); m_pMenu->Rebuild();
} }
@@ -229,4 +259,31 @@ void COverlayExamples::OnScreenshotRequested( ScreenshotRequested_t *pCallback )
void COverlayExamples::OnSteamScreenshotReady( ScreenshotReady_t *pCallback ) void COverlayExamples::OnSteamScreenshotReady( ScreenshotReady_t *pCallback )
{ {
} }
void COverlayExamples::OnDoesEventRecordingExist( SteamTimelineEventRecordingExists_t *pCallback, bool bIOFailure )
{
if ( bIOFailure || !pCallback->m_bRecordingExists )
{
// nothing to do here. We didn't show these items when showing the menu
return;
}
m_ulLastCrashIntoSunEventIDToShow = pCallback->m_ulEventID;
m_pMenu->Rebuild();
}
void COverlayExamples::OnDoesGamePhaseRecordingExist( SteamTimelineGamePhaseRecordingExists_t *pCallback, bool bIOFailure )
{
if ( bIOFailure || ( pCallback->m_ulRecordingMS == 0 && pCallback->m_unClipCount == 0 ) )
{
// nothing to do here. We didn't show these items when showing the menu
return;
}
m_strLastGamePhaseIDToShow = pCallback->m_rgchPhaseID;
m_pMenu->Rebuild();
}
+14 -1
View File
@@ -29,7 +29,10 @@ public:
// handles input from menu // handles input from menu
void OnMenuSelection( OverlayExample_t selection ); void OnMenuSelection( OverlayExample_t selection );
bool BHasLastGamePhase() const { return !m_strLastGamePhaseIDToShow.empty(); }
bool BHasLastTimelineEvent() const { return m_ulLastCrashIntoSunEventIDToShow != 0; }
private: private:
// Engine // Engine
@@ -37,9 +40,19 @@ private:
COverlayExamplesMenu *m_pMenu; COverlayExamplesMenu *m_pMenu;
OverlayExample_t m_delayedCommand; OverlayExample_t m_delayedCommand;
std::string m_strLastGamePhaseIDToShow;
uint64 m_ulLastCrashIntoSunEventIDToShow = 0;
STEAM_CALLBACK( COverlayExamples, OnScreenshotRequested, ScreenshotRequested_t ); STEAM_CALLBACK( COverlayExamples, OnScreenshotRequested, ScreenshotRequested_t );
STEAM_CALLBACK( COverlayExamples, OnSteamScreenshotReady, ScreenshotReady_t ); STEAM_CALLBACK( COverlayExamples, OnSteamScreenshotReady, ScreenshotReady_t );
// callback for when we ask about an event having recordings
void OnDoesEventRecordingExist( SteamTimelineEventRecordingExists_t *pCallback, bool bIOFailure );
CCallResult<COverlayExamples, SteamTimelineEventRecordingExists_t> m_SteamCallResultDoesEventRecordingExist;
// callback for when we ask about a phase having recordings
void OnDoesGamePhaseRecordingExist( SteamTimelineGamePhaseRecordingExists_t *pCallback, bool bIOFailure );
CCallResult<COverlayExamples, SteamTimelineGamePhaseRecordingExists_t> m_SteamCallResultDoesGamePhaseRecordingExist;
}; };
#endif // OVERLAYEXAMPLES_H #endif // OVERLAYEXAMPLES_H
+75
View File
@@ -292,6 +292,12 @@ void CSpaceWarClient::DisconnectFromServer()
SteamUser()->BSetDurationControlOnlineState( k_EDurationControlOnlineState_Offline ); SteamUser()->BSetDurationControlOnlineState( k_EDurationControlOnlineState_Offline );
m_eConnectedStatus = k_EClientNotConnected; m_eConnectedStatus = k_EClientNotConnected;
UpdateScoreInGamePhase( true );
SteamTimeline()->EndGamePhase();
m_unLastGamePhaseID = m_unGamePhaseID;
m_unGamePhaseID = 0;
} }
if ( m_pP2PAuthedGame ) if ( m_pP2PAuthedGame )
{ {
@@ -454,9 +460,15 @@ void CSpaceWarClient::OnReceiveServerUpdate( ServerSpaceWarUpdateData_t *pUpdate
} }
// Update scores // Update scores
bool bScoresChanged = false;
for( int i=0; i < MAX_PLAYERS_PER_SERVER; ++i ) for( int i=0; i < MAX_PLAYERS_PER_SERVER; ++i )
{ {
m_rguPlayerScores[i] = pUpdateData->GetPlayerScore(i); m_rguPlayerScores[i] = pUpdateData->GetPlayerScore(i);
bScoresChanged = bScoresChanged || m_rguPlayerScores[ i ] != pUpdateData->GetPlayerScore( i );
}
if ( bScoresChanged )
{
UpdateScoreInGamePhase( false );
} }
// Update who won last // Update who won last
@@ -678,6 +690,12 @@ void CSpaceWarClient::InitiateServerConnection( CSteamID steamIDGameServer )
// Update when we last retried the connection, as well as the last packet received time so we won't timeout too soon, // Update when we last retried the connection, as well as the last packet received time so we won't timeout too soon,
// and so we will retry at appropriate intervals if packets drop // and so we will retry at appropriate intervals if packets drop
m_ulLastNetworkDataReceivedTime = m_ulLastConnectionAttemptRetryTime = m_pGameEngine->GetGameTickCount(); m_ulLastNetworkDataReceivedTime = m_ulLastConnectionAttemptRetryTime = m_pGameEngine->GetGameTickCount();
SteamTimeline()->StartGamePhase();
// When you call this function for real, you should use an ID that you'll refer back to
m_unGamePhaseID = Plat_GetTicks();
//SteamTimeline()->SetGamePhaseID( std::to_string( m_unGamePhaseID ).c_str() );
} }
@@ -839,6 +857,15 @@ void CSpaceWarClient::ReceiveNetworkData()
m_pP2PAuthedGame->HandleP2PSendingTicket( message->GetData() ); m_pP2PAuthedGame->HandleP2PSendingTicket( message->GetData() );
break; break;
case k_EMsgServerPlayerHitSun:
{
TimelineEventHandle_t ulEvent = SteamTimeline()->StartRangeTimelineEvent( "Hit Sun", "This description will be replaced", "steam_8", 8, 0, k_ETimelineEventClipPriority_None );
SteamTimeline()->UpdateRangeTimelineEvent( ulEvent, nullptr, "It was too hot to handle", "steam_starburst", 10, k_ETimelineEventClipPriority_Standard );
SteamTimeline()->EndRangeTimelineEvent( ulEvent, 3.f );
m_ulLastCrashIntoSunEvent = 0;
}
break;
default: default:
OutputDebugString("Unhandled message from server\n"); OutputDebugString("Unhandled message from server\n");
break; break;
@@ -1224,6 +1251,7 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
pchSteamRichPresenceDisplay = SetInGameRichPresence(); pchSteamRichPresenceDisplay = SetInGameRichPresence();
bDisplayScoreInRichPresence = true; bDisplayScoreInRichPresence = true;
UpdateScoreInGamePhase( true );
} }
else if ( m_eGameState == k_EClientLeaderboards ) else if ( m_eGameState == k_EClientLeaderboards )
{ {
@@ -1318,6 +1346,7 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Handles notification of a steam ipc failure // Purpose: Handles notification of a steam ipc failure
// we may get multiple callbacks, one for each IPC operation we attempted // we may get multiple callbacks, one for each IPC operation we attempted
@@ -2778,3 +2807,49 @@ void CSpaceWarClient::DrawWorkshopItems()
} }
m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer); m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer);
} }
//-----------------------------------------------------------------------------
// Purpose: Draws PublishFileID, title & description for each subscribed Workshop item
//-----------------------------------------------------------------------------
void CSpaceWarClient::UpdateScoreInGamePhase( bool bFinal )
{
std::string strScores;
uint32 unHighScore = 0;
for ( int i = 0; i < MAX_PLAYERS_PER_SERVER; i++ )
{
if ( !strScores.empty() )
strScores += " / ";
strScores += std::to_string( m_rguPlayerScores[ i ] );
unHighScore = unHighScore < m_rguPlayerScores[ i ] ? m_rguPlayerScores[ i ] : unHighScore;
}
uint32 unCountAtHighScore = 0;
for ( int i = 0; i < MAX_PLAYERS_PER_SERVER; i++ )
{
if ( m_rguPlayerScores[ i ] == unHighScore )
unCountAtHighScore++;
}
std::string strPlayerScore = "0";
SteamTimeline()->SetGamePhaseAttribute( "Scores", strScores.c_str(), 1 );
SteamTimeline()->SetGamePhaseAttribute( "Player Score", strPlayerScore.c_str(), 2 );
if ( BLocalPlayerWonLastGame() )
{
SteamTimeline()->AddGamePhaseTag( "Won", "steam_ribbon", "Game Outcome", 3 );
}
else if ( unCountAtHighScore == 1 && unHighScore > 0 )
{
SteamTimeline()->AddGamePhaseTag( "Lost", "steam_death", "Game Outcome", 3 );
}
else if ( unCountAtHighScore > 1 && unHighScore > 0 )
{
SteamTimeline()->AddGamePhaseTag( "Tied", "steam_triangle", "Game Outcome", 3 );
}
else
{
SteamTimeline()->AddGamePhaseTag( "Stalemate", "steam_minus", "Game Outcome", 3 );
}
}
+11
View File
@@ -149,6 +149,8 @@ struct OverlayExample_t
k_EOverlayExampleItem_RequestKeyboard, k_EOverlayExampleItem_RequestKeyboard,
k_EOverlayExampleItem_Notification_SetInset, k_EOverlayExampleItem_Notification_SetInset,
k_EOverlayExampleItem_Notification_SetPosition, k_EOverlayExampleItem_Notification_SetPosition,
k_EOverlayExampleItem_Timeline_OpenOverlayToTimelineEvent,
k_EOverlayExampleItem_Timeline_OpenOverlayToGamePhase,
}; };
EOverlayExampleItem m_eItem; EOverlayExampleItem m_eItem;
@@ -255,6 +257,9 @@ public:
void ExecCommandLineConnect( const char *pchServerAddress, const char *pchLobbyID ); void ExecCommandLineConnect( const char *pchServerAddress, const char *pchLobbyID );
void SetShowTimer( bool bShowTimer ) { m_bShowTimer = bShowTimer; } void SetShowTimer( bool bShowTimer ) { m_bShowTimer = bShowTimer; }
uint32 GetLastGamePhaseID() const { return m_unLastGamePhaseID; }
uint64 GetLastCrashIntoSunEvent() const { return m_ulLastCrashIntoSunEvent; }
private: private:
// Receive a response from the server for a connection attempt // Receive a response from the server for a connection attempt
@@ -310,6 +315,9 @@ private:
// return the value that should go in steam_display // return the value that should go in steam_display
const char *SetInGameRichPresence() const; const char *SetInGameRichPresence() const;
// Sets the player scores in the game phase
void UpdateScoreInGamePhase( bool bFinal );
// load a workshop item from file // load a workshop item from file
bool LoadWorkshopItem( PublishedFileId_t workshopItemID ); bool LoadWorkshopItem( PublishedFileId_t workshopItemID );
CWorkshopItem *LoadWorkshopItemFromFile( const char *pszFileName ); CWorkshopItem *LoadWorkshopItemFromFile( const char *pszFileName );
@@ -459,6 +467,9 @@ private:
CStatsAndAchievements *m_pStatsAndAchievements; CStatsAndAchievements *m_pStatsAndAchievements;
CTimeline *m_pTimeline; CTimeline *m_pTimeline;
uint32 m_unGamePhaseID = 0;
uint32 m_unLastGamePhaseID = 0;
uint64 m_ulLastCrashIntoSunEvent = 0;
CLeaderboards *m_pLeaderboards; CLeaderboards *m_pLeaderboards;
CFriendsList *m_pFriendsList; CFriendsList *m_pFriendsList;
+6
View File
@@ -847,6 +847,12 @@ void CSpaceWarServer::CheckForCollisions()
if ( m_rgpShips[i]->BCollidesWith( m_pSun ) ) if ( m_rgpShips[i]->BCollidesWith( m_pSun ) )
{ {
{
MsgServerPlayerHitSun_t msg;
msg.SetSteamID( m_rgClientData[ i ].m_SteamIDUser );
BSendDataToClient( i, ( char * )&msg, sizeof( msg ) );
}
rgbExplodingShips[i] |= 1; rgbExplodingShips[i] |= 1;
} }
+19 -65
View File
@@ -42,7 +42,6 @@ CStatsAndAchievements::CStatsAndAchievements( IGameEngine *pGameEngine )
m_pSteamUser( NULL ), m_pSteamUser( NULL ),
m_pSteamUserStats( NULL ), m_pSteamUserStats( NULL ),
m_GameID( SteamUtils()->GetAppID() ), m_GameID( SteamUtils()->GetAppID() ),
m_CallbackUserStatsReceived( this, &CStatsAndAchievements::OnUserStatsReceived ),
m_CallbackUserStatsStored( this, &CStatsAndAchievements::OnUserStatsStored ), m_CallbackUserStatsStored( this, &CStatsAndAchievements::OnUserStatsStored ),
m_CallbackAchievementStored( this, &CStatsAndAchievements::OnAchievementStored ), m_CallbackAchievementStored( this, &CStatsAndAchievements::OnAchievementStored ),
m_CallbackPS3TrophiesInstalled( this, &CStatsAndAchievements::OnPS3TrophiesInstalled ) m_CallbackPS3TrophiesInstalled( this, &CStatsAndAchievements::OnPS3TrophiesInstalled )
@@ -50,7 +49,6 @@ CStatsAndAchievements::CStatsAndAchievements( IGameEngine *pGameEngine )
m_pSteamUser = SteamUser(); m_pSteamUser = SteamUser();
m_pSteamUserStats = SteamUserStats(); m_pSteamUserStats = SteamUserStats();
m_bRequestedStats = false;
m_bStatsValid = false; m_bStatsValid = false;
m_bStoreStats = false; m_bStoreStats = false;
@@ -102,29 +100,9 @@ void CStatsAndAchievements::RunFrame()
m_bStartedPS3TrophyInstall = true; m_bStartedPS3TrophyInstall = true;
#endif #endif
} }
else if ( !m_bRequestedStats )
{
// Is Steam Loaded? if no, can't get stats, done
if ( NULL == m_pSteamUserStats || NULL == m_pSteamUser )
{
m_bRequestedStats = true;
return;
}
LoadUserStatsOnPS3();
// If yes, request our stats
bool bSuccess = m_pSteamUserStats->RequestCurrentStats();
// This function should only return false if we weren't logged in, and we already checked that.
// But handle it being false again anyway, just ask again later.
m_bRequestedStats = bSuccess;
}
if ( !m_bStatsValid ) if ( !m_bStatsValid )
return; LoadUserStats();
// Get info from sources
// Evaluate achievements // Evaluate achievements
for ( int iAch = 0; iAch < ARRAYSIZE( g_rgAchievements ); ++iAch ) for ( int iAch = 0; iAch < ARRAYSIZE( g_rgAchievements ); ++iAch )
@@ -290,49 +268,29 @@ void CStatsAndAchievements::StoreStatsIfNecessary()
// Purpose: We have stats data from Steam. It is authoritative, so update // Purpose: We have stats data from Steam. It is authoritative, so update
// our data with those results now. // our data with those results now.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CStatsAndAchievements::OnUserStatsReceived( UserStatsReceived_t *pCallback ) void CStatsAndAchievements::LoadUserStats()
{ {
if ( !m_pSteamUserStats ) if ( !m_pSteamUserStats )
return; return;
// we may get callbacks for other games' stats arriving, ignore them // load achievements
if ( m_GameID.ToUint64() == pCallback->m_nGameID ) for ( int iAch = 0; iAch < ARRAYSIZE( g_rgAchievements ); ++iAch )
{ {
if ( k_EResultOK == pCallback->m_eResult ) Achievement_t &ach = g_rgAchievements[iAch];
{ m_pSteamUserStats->GetAchievement( ach.m_pchAchievementID, &ach.m_bAchieved );
OutputDebugString( "Received stats and achievements from Steam\n" ); sprintf_safe( ach.m_rgchName, "%s", m_pSteamUserStats->GetAchievementDisplayAttribute( ach.m_pchAchievementID, "name" ) );
sprintf_safe( ach.m_rgchDescription, "%s", m_pSteamUserStats->GetAchievementDisplayAttribute( ach.m_pchAchievementID, "desc" ) );
m_bStatsValid = true;
// load achievements
for ( int iAch = 0; iAch < ARRAYSIZE( g_rgAchievements ); ++iAch )
{
Achievement_t &ach = g_rgAchievements[iAch];
m_pSteamUserStats->GetAchievement( ach.m_pchAchievementID, &ach.m_bAchieved );
sprintf_safe( ach.m_rgchName, "%s",
m_pSteamUserStats->GetAchievementDisplayAttribute( ach.m_pchAchievementID, "name" ) );
sprintf_safe( ach.m_rgchDescription, "%s",
m_pSteamUserStats->GetAchievementDisplayAttribute( ach.m_pchAchievementID, "desc" ) );
}
// load stats
m_pSteamUserStats->GetStat( "NumGames", &m_nTotalGamesPlayed );
m_pSteamUserStats->GetStat( "NumWins", &m_nTotalNumWins );
m_pSteamUserStats->GetStat( "NumLosses", &m_nTotalNumLosses );
m_pSteamUserStats->GetStat( "FeetTraveled", &m_flTotalFeetTraveled );
m_pSteamUserStats->GetStat( "MaxFeetTraveled", &m_flMaxFeetTraveled );
m_pSteamUserStats->GetStat( "AverageSpeed", &m_flAverageSpeed );
SaveUserStatsOnPS3();
}
else
{
char buffer[128];
sprintf_safe( buffer, "RequestStats - failed, %d\n", pCallback->m_eResult );
buffer[ sizeof(buffer) - 1 ] = 0;
OutputDebugString( buffer );
}
} }
// load stats
m_pSteamUserStats->GetStat( "NumGames", &m_nTotalGamesPlayed );
m_pSteamUserStats->GetStat( "NumWins", &m_nTotalNumWins );
m_pSteamUserStats->GetStat( "NumLosses", &m_nTotalNumLosses );
m_pSteamUserStats->GetStat( "FeetTraveled", &m_flTotalFeetTraveled );
m_pSteamUserStats->GetStat( "MaxFeetTraveled", &m_flMaxFeetTraveled );
m_pSteamUserStats->GetStat( "AverageSpeed", &m_flAverageSpeed );
m_bStatsValid = true;
} }
@@ -354,11 +312,7 @@ void CStatsAndAchievements::OnUserStatsStored( UserStatsStored_t *pCallback )
// One or more stats we set broke a constraint. They've been reverted, // One or more stats we set broke a constraint. They've been reverted,
// and we should re-iterate the values now to keep in sync. // and we should re-iterate the values now to keep in sync.
OutputDebugString( "StoreStats - some failed to validate\n" ); OutputDebugString( "StoreStats - some failed to validate\n" );
// Fake up a callback here so that we re-load the values. LoadUserStats();
UserStatsReceived_t callback;
callback.m_eResult = k_EResultOK;
callback.m_nGameID = m_GameID.ToUint64();
OnUserStatsReceived( &callback );
} }
else else
{ {
+3 -4
View File
@@ -56,14 +56,14 @@ public:
float GetGameFeetTraveled() { return m_flGameFeetTraveled; } float GetGameFeetTraveled() { return m_flGameFeetTraveled; }
double GetGameDurationSeconds() { return m_flGameDurationSeconds; } double GetGameDurationSeconds() { return m_flGameDurationSeconds; }
STEAM_CALLBACK( CStatsAndAchievements, OnUserStatsReceived, UserStatsReceived_t, m_CallbackUserStatsReceived );
STEAM_CALLBACK( CStatsAndAchievements, OnUserStatsStored, UserStatsStored_t, m_CallbackUserStatsStored ); STEAM_CALLBACK( CStatsAndAchievements, OnUserStatsStored, UserStatsStored_t, m_CallbackUserStatsStored );
STEAM_CALLBACK( CStatsAndAchievements, OnAchievementStored, UserAchievementStored_t, m_CallbackAchievementStored ); STEAM_CALLBACK( CStatsAndAchievements, OnAchievementStored, UserAchievementStored_t, m_CallbackAchievementStored );
STEAM_CALLBACK( CStatsAndAchievements, OnPS3TrophiesInstalled, PS3TrophiesInstalled_t, m_CallbackPS3TrophiesInstalled ); STEAM_CALLBACK( CStatsAndAchievements, OnPS3TrophiesInstalled, PS3TrophiesInstalled_t, m_CallbackPS3TrophiesInstalled );
private: private:
void LoadUserStats();
// Determine if we get this achievement now // Determine if we get this achievement now
void EvaluateAchievement( Achievement_t &achievement ); void EvaluateAchievement( Achievement_t &achievement );
void UnlockAchievement( Achievement_t &achievement ); void UnlockAchievement( Achievement_t &achievement );
@@ -96,7 +96,6 @@ private:
HGAMEFONT m_hDisplayFont; HGAMEFONT m_hDisplayFont;
// Did we get the stats from Steam? // Did we get the stats from Steam?
bool m_bRequestedStats;
bool m_bStatsValid; bool m_bStatsValid;
// Should we store stats this frame? // Should we store stats this frame?
@@ -120,4 +119,4 @@ private:
bool m_bInstalledPS3Trophies; bool m_bInstalledPS3Trophies;
}; };
#endif // STATS_AND_ACHIEVEMENTS_H #endif // STATS_AND_ACHIEVEMENTS_H
+4 -4
View File
@@ -76,7 +76,7 @@ void CTimeline::OnGameStateChange( EClientGameState eNewState )
float flDurationSeconds = (float)unSessionDuration / 1000.f; float flDurationSeconds = (float)unSessionDuration / 1000.f;
float flStartOffsetSeconds = -flDurationSeconds; float flStartOffsetSeconds = -flDurationSeconds;
SteamTimeline()->AddTimelineEvent( "steam_starburst", "In Match", nullptr, 100, flStartOffsetSeconds, flDurationSeconds, k_ETimelineEventClipPriority_None ); SteamTimeline()->AddRangeTimelineEvent( "In Match", nullptr, "steam_starburst", 100, flStartOffsetSeconds, flDurationSeconds, k_ETimelineEventClipPriority_None );
} }
m_bInGame = bInGameNow; m_bInGame = bInGameNow;
@@ -85,11 +85,11 @@ void CTimeline::OnGameStateChange( EClientGameState eNewState )
// add a highlight marker every time the player wins // add a highlight marker every time the player wins
if ( eNewState == k_EClientGameWinner && SpaceWarClient()->BLocalPlayerWonLastGame() ) if ( eNewState == k_EClientGameWinner && SpaceWarClient()->BLocalPlayerWonLastGame() )
{ {
SteamTimeline()->AddTimelineEvent( "steam_attack", "Winner!", "You won a round!", 10, 0, 0, k_ETimelineEventClipPriority_Standard ); SteamTimeline()->AddInstantaneousTimelineEvent( "Winner!", "You won a round!", "steam_attack", 10, 0, k_ETimelineEventClipPriority_Standard );
} }
else if ( eNewState == k_EClientGameDraw ) else if ( eNewState == k_EClientGameDraw )
{ {
SteamTimeline()->AddTimelineEvent( "steam_defend", "Draw", "This round was a draw.", 5, 0, 0, k_ETimelineEventClipPriority_None ); SteamTimeline()->AddInstantaneousTimelineEvent( "Draw", "This round was a draw.", "steam_defend", 5, 0, k_ETimelineEventClipPriority_None );
} }
} }
@@ -113,7 +113,7 @@ void CTimeline::RunFrame()
// max string length is "95:00" // max string length is "95:00"
char rgchBuffer[ 6 ]; char rgchBuffer[ 6 ];
sprintf_safe( rgchBuffer, "%02d:00", unTimestampIndex * k_unMinutesBetweenTimestamps ); sprintf_safe( rgchBuffer, "%02d:00", unTimestampIndex * k_unMinutesBetweenTimestamps );
SteamTimeline()->SetTimelineStateDescription( rgchBuffer, 0 ); SteamTimeline()->SetTimelineTooltip( rgchBuffer, 0 );
m_unLastTimestampIndexDisplayed = unTimestampIndex; m_unLastTimestampIndexDisplayed = unTimestampIndex;
} }
+5 -5
View File
@@ -2805,6 +2805,7 @@ bool GLMDetectGDB( void ) // aka AmIBeingDebugged()
size = sizeof(info); size = sizeof(info);
junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
(void)junk;
assert(junk == 0); assert(junk == 0);
@@ -2817,9 +2818,6 @@ bool GLMDetectGDB( void ) // aka AmIBeingDebugged()
} }
static uint g_glmDebugChannelMask = 0; // which output channels are available (can be more than one)
static uint g_glmDebugFlavorMask = 0; // which message flavors are enabled for output (can be more than one)
uint GLMDetectAvailableChannels( void ) uint GLMDetectAvailableChannels( void )
{ {
uint result = 0; uint result = 0;
@@ -2845,10 +2843,12 @@ uint GLMDetectAvailableChannels( void )
} }
static bool g_debugInitDone = false;
#if GLMDEBUG #if GLMDEBUG
static bool g_debugInitDone = false;
static uint g_glmDebugChannelMask = 0; // which output channels are available (can be more than one)
static uint g_glmDebugFlavorMask = 0; // which message flavors are enabled for output (can be more than one)
// following funcs vanish if GLMDEBUG not set // following funcs vanish if GLMDEBUG not set
void GLMDebugInitialize( bool forceReinit ) void GLMDebugInitialize( bool forceReinit )
+1 -1
View File
@@ -112,7 +112,7 @@ public:
// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions // set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions
virtual bool SetDlcContext( AppId_t nAppID ) = 0; virtual bool SetDlcContext( AppId_t nAppID ) = 0;
// returns total number of known app beta branches (including default "public" branch ) // returns total number of known app branches (including default "public" branch ). nAvailable is number of available betas
virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; // virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; //
// return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags) // return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags)
+5
View File
@@ -458,6 +458,11 @@ enum EControllerActionOrigin
k_EControllerActionOrigin_PS5_LeftFn, k_EControllerActionOrigin_PS5_LeftFn,
k_EControllerActionOrigin_PS5_RightFn, k_EControllerActionOrigin_PS5_RightFn,
k_EControllerActionOrigin_Horipad_M1,
k_EControllerActionOrigin_Horipad_M2,
k_EControllerActionOrigin_Horipad_L4,
k_EControllerActionOrigin_Horipad_R4,
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
}; };
+1
View File
@@ -750,6 +750,7 @@ struct EquippedProfileItems_t
bool m_bHasProfileModifier; bool m_bHasProfileModifier;
bool m_bHasProfileBackground; bool m_bHasProfileBackground;
bool m_bHasMiniProfileBackground; bool m_bHasMiniProfileBackground;
bool m_bFromCache;
}; };
#pragma pack( pop ) #pragma pack( pop )
+29 -7
View File
@@ -482,6 +482,11 @@ enum EInputActionOrigin
k_EInputActionOrigin_SteamDeck_Reserved19, k_EInputActionOrigin_SteamDeck_Reserved19,
k_EInputActionOrigin_SteamDeck_Reserved20, k_EInputActionOrigin_SteamDeck_Reserved20,
k_EInputActionOrigin_Horipad_M1,
k_EInputActionOrigin_Horipad_M2,
k_EInputActionOrigin_Horipad_L4,
k_EInputActionOrigin_Horipad_R4,
k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
}; };
@@ -643,21 +648,38 @@ struct InputDigitalActionData_t
struct InputMotionData_t struct InputMotionData_t
{ {
// Sensor-fused absolute rotation; will drift in heading toward average // Gyro Quaternion:
// Absolute rotation of the controller since wakeup, using the Accelerometer reading at startup to determine the first value.
// This means real world "up" is know, but heading is not known.
// Every rotation packet is integrated using sensor time delta, and that change is used to update this quaternion.
// A Quaternion Identity ( x:0, y:0, z:0, w:1 ) will be sent in the first few packets while the controller's IMU is still waking up;
// some controllers have a short "warmup" period before these values should be used.
// After the first time GetMotionData is called per controller handle, the IMU will be active until your app is closed.
// The exception is the Sony Dualshock, which will stay on until the controller has been turned off.
// Filtering: When rotating the controller at low speeds, low level noise is filtered out without noticeable latency. High speed movement is always unfiltered.
// Drift: Gyroscopic "Drift" can be fixed using the Steam Input "Gyro Calibration" button. Users will have to be informed of this feature.
float rotQuatX; float rotQuatX;
float rotQuatY; float rotQuatY;
float rotQuatZ; float rotQuatZ;
float rotQuatW; float rotQuatW;
// Positional acceleration // Positional acceleration
float posAccelX; // This represents only the latest hardware packet's state.
float posAccelY; // Values range from -SHRT_MAX..SHRT_MAX
float posAccelZ; // This represents -2G..+2G along each axis
float posAccelX; // +tive when controller's Right hand side is pointed toward the sky.
float posAccelY; // +tive when controller's charging port (forward side of controller) is pointed toward the sky.
float posAccelZ; // +tive when controller's sticks point toward the sky.
// Angular velocity // Angular velocity
float rotVelX; // Values range from -SHRT_MAX..SHRT_MAX
float rotVelY; // These values map to a real world range of -2000..+2000 degrees per second on each axis (SDL standard)
float rotVelZ; // This represents only the latest hardware packet's state.
float rotVelX; // Local Pitch
float rotVelY; // Local Roll
float rotVelZ; // Local Yaw
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
+162 -19
View File
@@ -1,4 +1,4 @@
//====== Copyright © Valve Corporation, All rights reserved. ======= //====== Copyright � Valve Corporation, All rights reserved. =======
// //
// Purpose: interface to Steam Timeline // Purpose: interface to Steam Timeline
// //
@@ -47,8 +47,14 @@ enum ETimelineEventClipPriority
k_ETimelineEventClipPriority_Featured = 3, k_ETimelineEventClipPriority_Featured = 3,
}; };
const uint32 k_unMaxTimelinePriority = 1000; const uint32 k_unMaxTimelinePriority = 1000;
const uint32 k_unTimelinePriority_KeepCurrentValue = 1000000; // Use with UpdateRangeTimelineEvent to not change the priority
const float k_flMaxTimelineEventDuration = 600.f; const float k_flMaxTimelineEventDuration = 600.f;
const uint32 k_cchMaxPhaseIDLength = 64;
typedef uint64 TimelineEventHandle_t;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Steam Timeline API // Purpose: Steam Timeline API
@@ -60,58 +66,195 @@ public:
// Sets a description for the current game state in the timeline. These help the user to find specific // Sets a description for the current game state in the timeline. These help the user to find specific
// moments in the timeline when saving clips. Setting a new state description replaces any previous // moments in the timeline when saving clips. Setting a new state description replaces any previous
// description. // description.
// //
// Examples could include: // Examples could include:
// * Where the user is in the world in a single player game // * Where the user is in the world in a single player game
// * Which round is happening in a multiplayer game // * Which round is happening in a multiplayer game
// * The current score for a sports game // * The current score for a sports game
// //
// Parameters: // Parameters:
// - pchDescription: provide a localized string in the language returned by SteamUtils()->GetSteamUILanguage() // - pchDescription: provide a localized string in the language returned by SteamUtils()->GetSteamUILanguage()
// - flTimeDelta: The time offset in seconds to apply to this event. Negative times indicate an // - flTimeDelta: The time offset in seconds to apply to this event. Negative times indicate an
// event that happened in the past. // event that happened in the past.
virtual void SetTimelineStateDescription( const char *pchDescription, float flTimeDelta ) = 0; virtual void SetTimelineTooltip( const char *pchDescription, float flTimeDelta ) = 0;
virtual void ClearTimelineStateDescription( float flTimeDelta ) = 0; virtual void ClearTimelineTooltip( float flTimeDelta ) = 0;
// Use this to mark an event on the Timeline. The event can be instantaneous or take some amount of time // Changes the color of the timeline bar. See ETimelineGameMode comments for how to use each value
// to complete, depending on the value passed in flDurationSeconds virtual void SetTimelineGameMode( ETimelineGameMode eMode ) = 0;
//
// Examples could include: /******************* Timeline Events *******************/
// The following functions add events and/or tags to the timeline. There are helpers to add simple events or tags in a single call.
// or you can use StartEvent and CloseEvent to customize what gets added.
//
// Examples of events to add could include:
// * a boss battle // * a boss battle
// * a cut scene // * a cut scene
// * a large team fight // * a large team fight
// * picking up a new weapon or ammunition // * picking up a new weapon or ammunition
// * scoring a goal // * scoring a goal
// //
// Parameters: // Adding an event and a time range with the simple API:
// // SteamTimeline()->AddSimpleTimelineEvent( "steam_heart", Localize( "#user healed" ), Localize( "#health_amount", 27 ), 15, 0, 0, k_ETimelineEventClipPriority_None );
// SteamTimeline()->AddTaggedTimeRange( Localize( "#player_resting" ), "steam_flag", /* don't show filter */nullptr, 15, /* start now */0, 10 );
// SteamTimeline()->AddTaggedTimeRange( Localize( "#player_cast_light" ), "steam_starburst", Localize( "#player_spells" ), 10, /* start 10 sec ago */ -10, 5 );
//
// Adding a marker and time range in one event:
// TimelineEventHandle_t event = SteamTimeline()->StartEvent( /* start now */ 0 );
// SteamTimeline()->ShowEventOnTimeline( event, "steam_heart", Localize( "#player_healed" ), Localize( "#player_healed_amount", 27 ), 15 );
// SteamTimeline()->AddEventTag( event, Localize( "#player_cast_heal" ), "steam_heart", Localize( "#player_, 15, /* start now */0, 10 );
// ... // time passes
// SteamTimeline()->CloseEvent( event );
//
// Parameters used by the event functions:
//
// - ulOpenEvent: An event returned by StartEvent that has not yet had CancelEvent or CloseEvent called on it
// - ulEvent: An event that has had CloseEvent called on it, or an event returned from AddSimpleTimelineEvent or AddTaggedTimeRange (which
// are closed automatically.)
// - pchIcon: specify the name of the icon uploaded through the Steamworks Partner Site for your title // - pchIcon: specify the name of the icon uploaded through the Steamworks Partner Site for your title
// or one of the provided icons that start with steam_ // or one of the provided icons that start with steam_
// - pchTitle & pchDescription: provide a localized string in the language returned by // - pchTitle & pchDescription: provide a localized string in the language returned by
// SteamUtils()->GetSteamUILanguage() // SteamUtils()->GetSteamUILanguage()
// - unPriority: specify how important this range is compared to other markers provided by the game. // - unIconPriority: specify how important this range is compared to other markers provided by the game.
// Ranges with larger priority values will be displayed more prominently in the UI. This value // Ranges with larger priority values will be displayed more prominently in the UI. This value
// may be between 0 and k_unMaxTimelinePriority. // may be between 0 and k_unMaxTimelinePriority.
// - flStartOffsetSeconds: The time that this range started relative to now. Negative times // - flStartOffsetSeconds: The time that this range started relative to now. Negative times
// indicate an event that happened in the past. // indicate an event that happened in the past.
// - flDurationSeconds: How long the time range should be in seconds. For instantaneous events, this // - flDurationSeconds: How long the time range should be in seconds. For instantaneous events, this
// should be 0 // should be 0
// - ePossibleClip: By setting this parameter to Featured or Standard, the game indicates to Steam that it // - ePossibleClip: By setting this parameter to Featured or Standard, the game indicates to Steam that it
// would be appropriate to offer this range as a clip to the user. For instantaneous events, the // would be appropriate to offer this range as a clip to the user. For instantaneous events, the
// suggested clip will be for a short time before and after the event itself. // suggested clip will be for a short time before and after the event itself.
virtual void AddTimelineEvent( const char *pchIcon, const char *pchTitle, const char *pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip ) = 0; // - pchTagIcon: specify an icon name that will be used next to the tag name in the UI
// - pchTagName: The localized name of the tag to show in the UI.
// - pchTagGroup: The localized name of the tag group to show in the UI. If this is not specified, users will not be able to filter by this tag
// - unTagPriority: specify how important this tag is compared to other tags provided by the game.
// Returns:
// A TimelineEventHandle_t that can be used to make subsequent calls to refer to the timeline event. This event handle is invalid
// after the game exits.
// quick helpers that add to the timeline in one call
virtual TimelineEventHandle_t AddInstantaneousTimelineEvent( const char *pchTitle, const char *pchDescription, const char *pchIcon, uint32 unIconPriority, float flStartOffsetSeconds = 0.f, ETimelineEventClipPriority ePossibleClip = k_ETimelineEventClipPriority_None ) = 0;
virtual TimelineEventHandle_t AddRangeTimelineEvent( const char *pchTitle, const char *pchDescription, const char *pchIcon, uint32 unIconPriority, float flStartOffsetSeconds = 0.f, float flDuration = 0.f, ETimelineEventClipPriority ePossibleClip = k_ETimelineEventClipPriority_None ) = 0;
// Starts a timeline event at a the current time, plus an offset in seconds. This event must be ended with EndRangeTimelineEvent.
// Any timeline events that have not been ended when the game exits will be discarded.
virtual TimelineEventHandle_t StartRangeTimelineEvent( const char *pchTitle, const char *pchDescription, const char *pchIcon, uint32 unPriority, float flStartOffsetSeconds, ETimelineEventClipPriority ePossibleClip ) = 0;
// Updates fields on a range timeline event that was started with StartRangeTimelineEvent, and which has not been ended.
virtual void UpdateRangeTimelineEvent( TimelineEventHandle_t ulEvent, const char *pchTitle, const char *pchDescription, const char *pchIcon, uint32 unPriority, ETimelineEventClipPriority ePossibleClip ) = 0;
// Ends a range timeline event and shows it in the UI.
virtual void EndRangeTimelineEvent( TimelineEventHandle_t ulEvent, float flEndOffsetSeconds ) = 0;
// delete the event from the timeline. This can be called on a timeline event from AddInstantaneousTimelineEvent,
// AddRangeTimelineEvent, or StartRangeTimelineEvent/EndRangeTimelineEvent. The timeline event handle must be from the
// current game process.
virtual void RemoveTimelineEvent( TimelineEventHandle_t ulEvent ) = 0;
// add a tag to whatever time range is represented by the event
STEAM_CALL_RESULT( SteamTimelineEventRecordingExists_t )
virtual SteamAPICall_t DoesEventRecordingExist( TimelineEventHandle_t ulEvent ) = 0;
/******************* Game Phases *******************/
// Game phases allow the user to navigate their background recordings and clips. Exactly what a game phase means will vary game to game, but
// the game phase should be a section of gameplay that is usually between 10 minutes and a few hours in length, and should be the
// main way a user would think to divide up the game. These are presented to the user in a UI that shows the date the game was played,
// with one row per game slice. Game phases should be used to mark sections of gameplay that the user might be interested in watching.
//
// Examples could include:
// * A single match in a multiplayer PvP game
// * A chapter of a story-based singleplayer game
// * A single run in a roguelike
//
// Game phases are started with StartGamePhase, and while a phase is still happening, they can have tags and attributes added to them.
//
// Phase attributes represent generic text fields that can be updated throughout the duration of the phase. They are meant
// to be used for phase metadata that is not part of a well defined set of options. For example, a KDA attribute that starts
// with the value "0/0/0" and updates as the phase progresses, or something like a played-entered character name. Attributes
// can be set as many times as the game likes with SetGamePhaseAttribute, and only the last value will be shown to the user.
//
// Phase tags represent data with a well defined set of options, which could be data such as match resolution, hero played,
// game mode, etc. Tags can have an icon in addition to a text name. Multiple tags within the same group may be added per phase
// and all will be remembered. For example, AddGamePhaseTag may be called multiple times for a "Bosses Defeated" group, with
// different names and icons for each boss defeated during the phase, all of which will be shown to the user.
//
// The phase will continue until the game exits, until the game calls EndGamePhase, or until the game calls
// StartGamePhase to start a new phase.
//
// The game phase functions take these parameters:
// - pchTagIcon: The name of a game provided timeline icon or builtin "steam_" icon.
// - pchPhaseID: A game-provided persistent ID for a game phase. This could be a the match ID in a multiplayer game, a chapter name in a
// single player game, the ID of a character, etc.
// - pchTagName: The localized name of the tag in the language returned by SteamUtils()->GetSteamUILanguage().
// - pchTagGroup: The localized name of the tag group.
// - pchAttributeValue: The localized name of the attribute.
// - pchAttributeGroup: The localized name of the attribute group.
// - unPriority: Used to order tags and attributes in the UI displayed to the user, with higher priority values leading
// to more prominent positioning. In contexts where there is limited space, lower priority items may be hidden.
virtual void StartGamePhase() = 0;
virtual void EndGamePhase() = 0;
// Games can set a phase ID so they can refer back to a phase in OpenOverlayToPhase
virtual void SetGamePhaseID( const char *pchPhaseID ) = 0;
STEAM_CALL_RESULT( SteamTimelineGamePhaseRecordingExists_t )
virtual SteamAPICall_t DoesGamePhaseRecordingExist( const char *pchPhaseID ) = 0;
// Add a tag that applies to the entire phase
virtual void AddGamePhaseTag( const char *pchTagName, const char *pchTagIcon, const char *pchTagGroup, uint32 unPriority ) = 0;
// Add a text attribute that applies to the entire phase
virtual void SetGamePhaseAttribute( const char *pchAttributeGroup, const char *pchAttributeValue, uint32 unPriority ) = 0;
/******************* Opening the overlay *******************/
// Opens the Steam overlay to a game phase.
//
// Parameters:
// - pchPhaseID: The ID of a phase that was previously provided by the game in SetGamePhaseID.
virtual void OpenOverlayToGamePhase( const char *pchPhaseID ) = 0;
// Opens the Steam overlay to a timeline event.
//
// Parameters:
// - ulEventID: The ID of a timeline event returned by StartEvent or AddSimpleTimelineEvent
virtual void OpenOverlayToTimelineEvent( const TimelineEventHandle_t ulEvent ) = 0;
// Changes the color of the timeline bar. See ETimelineGameMode comments for how to use each value
virtual void SetTimelineGameMode( ETimelineGameMode eMode ) = 0;
}; };
#define STEAMTIMELINE_INTERFACE_VERSION "STEAMTIMELINE_INTERFACE_V001" #define STEAMTIMELINE_INTERFACE_VERSION "STEAMTIMELINE_INTERFACE_V004"
// Global interface accessor // Global interface accessor
inline ISteamTimeline *SteamTimeline(); inline ISteamTimeline *SteamTimeline();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamTimeline *, SteamTimeline, STEAMTIMELINE_INTERFACE_VERSION ); STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamTimeline *, SteamTimeline, STEAMTIMELINE_INTERFACE_VERSION );
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
//-----------------------------------------------------------------------------
struct SteamTimelineGamePhaseRecordingExists_t
{
enum { k_iCallback = k_iSteamTimelineCallbacks + 1 };
char m_rgchPhaseID[ k_cchMaxPhaseIDLength ];
uint64 m_ulRecordingMS;
uint64 m_ulLongestClipMS;
uint32 m_unClipCount;
uint32 m_unScreenshotCount;
};
//-----------------------------------------------------------------------------
// Purpose: Callback for querying UGC
//-----------------------------------------------------------------------------
struct SteamTimelineEventRecordingExists_t
{
enum { k_iCallback = k_iSteamTimelineCallbacks + 2 };
uint64 m_ulEventID;
bool m_bRecordingExists;
};
#pragma pack( pop ) #pragma pack( pop )
+6 -4
View File
@@ -88,9 +88,11 @@ struct LeaderboardEntry_t
class ISteamUserStats class ISteamUserStats
{ {
public: public:
// Ask the server to send down this user's data and achievements for this game
STEAM_CALL_BACK( UserStatsReceived_t ) // Note: this call is no longer required as it is managed by the Steam client
virtual bool RequestCurrentStats() = 0; // The game stats and achievements will be synchronized with Steam before
// the game process begins.
// virtual bool RequestCurrentStats() = 0;
// Data accessors // Data accessors
STEAM_FLAT_NAME( GetStatInt32 ) STEAM_FLAT_NAME( GetStatInt32 )
@@ -303,7 +305,7 @@ public:
}; };
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012" #define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION013"
// Global interface accessor // Global interface accessor
inline ISteamUserStats *SteamUserStats(); inline ISteamUserStats *SteamUserStats();
+7
View File
@@ -60,6 +60,13 @@ STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iSteamVideoCallbacks + 24 )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID ) STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_END(2) STEAM_CALLBACK_END(2)
STEAM_CALLBACK_BEGIN( BroadcastUploadStart_t, k_iSteamVideoCallbacks + 4 )
STEAM_CALLBACK_MEMBER( 0, bool, m_bIsRTMP )
STEAM_CALLBACK_END( 1 )
STEAM_CALLBACK_BEGIN( BroadcastUploadStop_t, k_iSteamVideoCallbacks + 5 )
STEAM_CALLBACK_MEMBER( 0, EBroadcastUploadResult, m_eResult )
STEAM_CALLBACK_END( 1 )
#pragma pack( pop ) #pragma pack( pop )
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+210 -51
View File
@@ -319,7 +319,8 @@
{ "fieldname":"m_bHasAvatarFrame", "fieldtype":"bool" }, { "fieldname":"m_bHasAvatarFrame", "fieldtype":"bool" },
{ "fieldname":"m_bHasProfileModifier", "fieldtype":"bool" }, { "fieldname":"m_bHasProfileModifier", "fieldtype":"bool" },
{ "fieldname":"m_bHasProfileBackground", "fieldtype":"bool" }, { "fieldname":"m_bHasProfileBackground", "fieldtype":"bool" },
{ "fieldname":"m_bHasMiniProfileBackground", "fieldtype":"bool" } { "fieldname":"m_bHasMiniProfileBackground", "fieldtype":"bool" },
{ "fieldname":"m_bFromCache", "fieldtype":"bool" }
], ],
"struct": "EquippedProfileItems_t" "struct": "EquippedProfileItems_t"
}, },
@@ -1663,6 +1664,25 @@
], ],
"struct": "SteamInventoryRequestPricesResult_t" "struct": "SteamInventoryRequestPricesResult_t"
}, },
{
"callback_id": 6001,
"fields": [
{ "fieldname":"m_rgchPhaseID", "fieldtype":"char [64]" },
{ "fieldname":"m_ulRecordingMS", "fieldtype":"uint64" },
{ "fieldname":"m_ulLongestClipMS", "fieldtype":"uint64" },
{ "fieldname":"m_unClipCount", "fieldtype":"uint32" },
{ "fieldname":"m_unScreenshotCount", "fieldtype":"uint32" }
],
"struct": "SteamTimelineGamePhaseRecordingExists_t"
},
{
"callback_id": 6002,
"fields": [
{ "fieldname":"m_ulEventID", "fieldtype":"uint64" },
{ "fieldname":"m_bRecordingExists", "fieldtype":"bool" }
],
"struct": "SteamTimelineEventRecordingExists_t"
},
{ {
"callback_id": 4611, "callback_id": 4611,
"fields": [ "fields": [
@@ -1680,6 +1700,20 @@
], ],
"struct": "GetOPFSettingsResult_t" "struct": "GetOPFSettingsResult_t"
}, },
{
"callback_id": 4604,
"fields": [
{ "fieldname":"m_bIsRTMP", "fieldtype":"bool" }
],
"struct": "BroadcastUploadStart_t"
},
{
"callback_id": 4605,
"fields": [
{ "fieldname":"m_eResult", "fieldtype":"EBroadcastUploadResult" }
],
"struct": "BroadcastUploadStop_t"
},
{ {
"callback_id": 5001, "callback_id": 5001,
"fields": [], "fields": [],
@@ -1933,7 +1967,9 @@
{ "constname":"k_SteamInventoryResultInvalid", "consttype":"SteamInventoryResult_t", "constval":"- 1" }, { "constname":"k_SteamInventoryResultInvalid", "consttype":"SteamInventoryResult_t", "constval":"- 1" },
{ "constname":"k_SteamInventoryUpdateHandleInvalid", "consttype":"SteamInventoryUpdateHandle_t", "constval":"0xffffffffffffffffull" }, { "constname":"k_SteamInventoryUpdateHandleInvalid", "consttype":"SteamInventoryUpdateHandle_t", "constval":"0xffffffffffffffffull" },
{ "constname":"k_unMaxTimelinePriority", "consttype":"uint32", "constval":"1000" }, { "constname":"k_unMaxTimelinePriority", "consttype":"uint32", "constval":"1000" },
{ "constname":"k_unTimelinePriority_KeepCurrentValue", "consttype":"uint32", "constval":"1000000" },
{ "constname":"k_flMaxTimelineEventDuration", "consttype":"float", "constval":"600.f" }, { "constname":"k_flMaxTimelineEventDuration", "consttype":"float", "constval":"600.f" },
{ "constname":"k_cchMaxPhaseIDLength", "consttype":"uint32", "constval":"64" },
{ "constname":"k_HSteamNetConnection_Invalid", "consttype":"HSteamNetConnection", "constval":"0" }, { "constname":"k_HSteamNetConnection_Invalid", "consttype":"HSteamNetConnection", "constval":"0" },
{ "constname":"k_HSteamListenSocket_Invalid", "consttype":"HSteamListenSocket", "constval":"0" }, { "constname":"k_HSteamListenSocket_Invalid", "consttype":"HSteamListenSocket", "constval":"0" },
{ "constname":"k_HSteamNetPollGroup_Invalid", "consttype":"HSteamNetPollGroup", "constval":"0" }, { "constname":"k_HSteamNetPollGroup_Invalid", "consttype":"HSteamNetPollGroup", "constval":"0" },
@@ -2125,7 +2161,8 @@
{ "name":"k_EResultCachedCredentialInvalid", "value":"126" }, { "name":"k_EResultCachedCredentialInvalid", "value":"126" },
{ "name":"K_EResultPhoneNumberIsVOIP", "value":"127" }, { "name":"K_EResultPhoneNumberIsVOIP", "value":"127" },
{ "name":"k_EResultNotSupported", "value":"128" }, { "name":"k_EResultNotSupported", "value":"128" },
{ "name":"k_EResultFamilySizeLimitExceeded", "value":"129" } { "name":"k_EResultFamilySizeLimitExceeded", "value":"129" },
{ "name":"k_EResultOfflineAppCacheInvalid", "value":"130" }
] ]
}, },
{ {
@@ -3341,7 +3378,11 @@
{ "name":"k_EInputActionOrigin_SteamDeck_Reserved18", "value":"403" }, { "name":"k_EInputActionOrigin_SteamDeck_Reserved18", "value":"403" },
{ "name":"k_EInputActionOrigin_SteamDeck_Reserved19", "value":"404" }, { "name":"k_EInputActionOrigin_SteamDeck_Reserved19", "value":"404" },
{ "name":"k_EInputActionOrigin_SteamDeck_Reserved20", "value":"405" }, { "name":"k_EInputActionOrigin_SteamDeck_Reserved20", "value":"405" },
{ "name":"k_EInputActionOrigin_Count", "value":"406" }, { "name":"k_EInputActionOrigin_Horipad_M1", "value":"406" },
{ "name":"k_EInputActionOrigin_Horipad_M2", "value":"407" },
{ "name":"k_EInputActionOrigin_Horipad_L4", "value":"408" },
{ "name":"k_EInputActionOrigin_Horipad_R4", "value":"409" },
{ "name":"k_EInputActionOrigin_Count", "value":"410" },
{ "name":"k_EInputActionOrigin_MaximumPossibleValue", "value":"32767" } { "name":"k_EInputActionOrigin_MaximumPossibleValue", "value":"32767" }
] ]
}, },
@@ -3856,7 +3897,11 @@
{ "name":"k_EControllerActionOrigin_PS5_RightGrip", "value":"383" }, { "name":"k_EControllerActionOrigin_PS5_RightGrip", "value":"383" },
{ "name":"k_EControllerActionOrigin_PS5_LeftFn", "value":"384" }, { "name":"k_EControllerActionOrigin_PS5_LeftFn", "value":"384" },
{ "name":"k_EControllerActionOrigin_PS5_RightFn", "value":"385" }, { "name":"k_EControllerActionOrigin_PS5_RightFn", "value":"385" },
{ "name":"k_EControllerActionOrigin_Count", "value":"386" }, { "name":"k_EControllerActionOrigin_Horipad_M1", "value":"386" },
{ "name":"k_EControllerActionOrigin_Horipad_M2", "value":"387" },
{ "name":"k_EControllerActionOrigin_Horipad_L4", "value":"388" },
{ "name":"k_EControllerActionOrigin_Horipad_R4", "value":"389" },
{ "name":"k_EControllerActionOrigin_Count", "value":"390" },
{ "name":"k_EControllerActionOrigin_MaximumPossibleValue", "value":"32767" } { "name":"k_EControllerActionOrigin_MaximumPossibleValue", "value":"32767" }
] ]
}, },
@@ -4084,7 +4129,6 @@
{ "name":"k_ESteamNetworkingIdentityType_SteamID", "value":"16" }, { "name":"k_ESteamNetworkingIdentityType_SteamID", "value":"16" },
{ "name":"k_ESteamNetworkingIdentityType_XboxPairwiseID", "value":"17" }, { "name":"k_ESteamNetworkingIdentityType_XboxPairwiseID", "value":"17" },
{ "name":"k_ESteamNetworkingIdentityType_SonyPSN", "value":"18" }, { "name":"k_ESteamNetworkingIdentityType_SonyPSN", "value":"18" },
{ "name":"k_ESteamNetworkingIdentityType_GoogleStadia", "value":"19" },
{ "name":"k_ESteamNetworkingIdentityType_IPAddress", "value":"1" }, { "name":"k_ESteamNetworkingIdentityType_IPAddress", "value":"1" },
{ "name":"k_ESteamNetworkingIdentityType_GenericString", "value":"2" }, { "name":"k_ESteamNetworkingIdentityType_GenericString", "value":"2" },
{ "name":"k_ESteamNetworkingIdentityType_GenericBytes", "value":"3" }, { "name":"k_ESteamNetworkingIdentityType_GenericBytes", "value":"3" },
@@ -4200,10 +4244,17 @@
{ "name":"k_ESteamNetworkingConfig_LocalVirtualPort", "value":"38" }, { "name":"k_ESteamNetworkingConfig_LocalVirtualPort", "value":"38" },
{ "name":"k_ESteamNetworkingConfig_DualWifi_Enable", "value":"39" }, { "name":"k_ESteamNetworkingConfig_DualWifi_Enable", "value":"39" },
{ "name":"k_ESteamNetworkingConfig_EnableDiagnosticsUI", "value":"46" }, { "name":"k_ESteamNetworkingConfig_EnableDiagnosticsUI", "value":"46" },
{ "name":"k_ESteamNetworkingConfig_SendTimeSincePreviousPacket", "value":"59" },
{ "name":"k_ESteamNetworkingConfig_FakePacketLoss_Send", "value":"2" }, { "name":"k_ESteamNetworkingConfig_FakePacketLoss_Send", "value":"2" },
{ "name":"k_ESteamNetworkingConfig_FakePacketLoss_Recv", "value":"3" }, { "name":"k_ESteamNetworkingConfig_FakePacketLoss_Recv", "value":"3" },
{ "name":"k_ESteamNetworkingConfig_FakePacketLag_Send", "value":"4" }, { "name":"k_ESteamNetworkingConfig_FakePacketLag_Send", "value":"4" },
{ "name":"k_ESteamNetworkingConfig_FakePacketLag_Recv", "value":"5" }, { "name":"k_ESteamNetworkingConfig_FakePacketLag_Recv", "value":"5" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Send_Avg", "value":"53" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Send_Max", "value":"54" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Send_Pct", "value":"55" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Recv_Avg", "value":"56" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Recv_Max", "value":"57" },
{ "name":"k_ESteamNetworkingConfig_FakePacketJitter_Recv_Pct", "value":"58" },
{ "name":"k_ESteamNetworkingConfig_FakePacketReorder_Send", "value":"6" }, { "name":"k_ESteamNetworkingConfig_FakePacketReorder_Send", "value":"6" },
{ "name":"k_ESteamNetworkingConfig_FakePacketReorder_Recv", "value":"7" }, { "name":"k_ESteamNetworkingConfig_FakePacketReorder_Recv", "value":"7" },
{ "name":"k_ESteamNetworkingConfig_FakePacketReorder_Time", "value":"8" }, { "name":"k_ESteamNetworkingConfig_FakePacketReorder_Time", "value":"8" },
@@ -7451,19 +7502,12 @@
{ {
"kind": "user", "kind": "user",
"name": "SteamUserStats", "name": "SteamUserStats",
"name_flat": "SteamAPI_SteamUserStats_v012" "name_flat": "SteamAPI_SteamUserStats_v013"
} }
], ],
"classname": "ISteamUserStats", "classname": "ISteamUserStats",
"fields": [], "fields": [],
"methods": [ "methods": [
{
"callback": "UserStatsReceived_t",
"methodname": "RequestCurrentStats",
"methodname_flat": "SteamAPI_ISteamUserStats_RequestCurrentStats",
"params": [],
"returntype": "bool"
},
{ {
"methodname": "GetStat", "methodname": "GetStat",
"methodname_flat": "SteamAPI_ISteamUserStats_GetStatInt32", "methodname_flat": "SteamAPI_ISteamUserStats_GetStatInt32",
@@ -7887,7 +7931,7 @@
"returntype": "bool" "returntype": "bool"
} }
], ],
"version_string": "STEAMUSERSTATS_INTERFACE_VERSION012" "version_string": "STEAMUSERSTATS_INTERFACE_VERSION013"
}, },
{ {
"accessors": [ "accessors": [
@@ -8135,7 +8179,6 @@
"methodname": "GetNumBetas", "methodname": "GetNumBetas",
"methodname_flat": "SteamAPI_ISteamApps_GetNumBetas", "methodname_flat": "SteamAPI_ISteamApps_GetNumBetas",
"params": [ "params": [
{ "paramname":"unAppID", "paramtype":"AppId_t" },
{ "paramname":"pnAvailable", "paramtype":"int *" }, { "paramname":"pnAvailable", "paramtype":"int *" },
{ "paramname":"pnPrivate", "paramtype":"int *" } { "paramname":"pnPrivate", "paramtype":"int *" }
], ],
@@ -8145,7 +8188,6 @@
"methodname": "GetBetaInfo", "methodname": "GetBetaInfo",
"methodname_flat": "SteamAPI_ISteamApps_GetBetaInfo", "methodname_flat": "SteamAPI_ISteamApps_GetBetaInfo",
"params": [ "params": [
{ "paramname":"unAppID", "paramtype":"AppId_t" },
{ "paramname":"iBetaIndex", "paramtype":"int" }, { "paramname":"iBetaIndex", "paramtype":"int" },
{ "paramname":"punFlags", "paramtype":"uint32 *" }, { "paramname":"punFlags", "paramtype":"uint32 *" },
{ "paramname":"punBuildID", "paramtype":"uint32 *" }, { "paramname":"punBuildID", "paramtype":"uint32 *" },
@@ -8160,7 +8202,6 @@
"methodname": "SetActiveBeta", "methodname": "SetActiveBeta",
"methodname_flat": "SteamAPI_ISteamApps_SetActiveBeta", "methodname_flat": "SteamAPI_ISteamApps_SetActiveBeta",
"params": [ "params": [
{ "paramname":"unAppID", "paramtype":"AppId_t" },
{ "paramname":"pchBetaName", "paramtype":"const char *" } { "paramname":"pchBetaName", "paramtype":"const char *" }
], ],
"returntype": "bool" "returntype": "bool"
@@ -11751,15 +11792,15 @@
{ {
"kind": "user", "kind": "user",
"name": "SteamTimeline", "name": "SteamTimeline",
"name_flat": "SteamAPI_SteamTimeline_v001" "name_flat": "SteamAPI_SteamTimeline_v004"
} }
], ],
"classname": "ISteamTimeline", "classname": "ISteamTimeline",
"fields": [], "fields": [],
"methods": [ "methods": [
{ {
"methodname": "SetTimelineStateDescription", "methodname": "SetTimelineTooltip",
"methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineStateDescription", "methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineTooltip",
"params": [ "params": [
{ "paramname":"pchDescription", "paramtype":"const char *" }, { "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"flTimeDelta", "paramtype":"float" } { "paramname":"flTimeDelta", "paramtype":"float" }
@@ -11767,27 +11808,13 @@
"returntype": "void" "returntype": "void"
}, },
{ {
"methodname": "ClearTimelineStateDescription", "methodname": "ClearTimelineTooltip",
"methodname_flat": "SteamAPI_ISteamTimeline_ClearTimelineStateDescription", "methodname_flat": "SteamAPI_ISteamTimeline_ClearTimelineTooltip",
"params": [ "params": [
{ "paramname":"flTimeDelta", "paramtype":"float" } { "paramname":"flTimeDelta", "paramtype":"float" }
], ],
"returntype": "void" "returntype": "void"
}, },
{
"methodname": "AddTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_AddTimelineEvent",
"params": [
{ "paramname":"pchIcon", "paramtype":"const char *" },
{ "paramname":"pchTitle", "paramtype":"const char *" },
{ "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"unPriority", "paramtype":"uint32" },
{ "paramname":"flStartOffsetSeconds", "paramtype":"float" },
{ "paramname":"flDurationSeconds", "paramtype":"float" },
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
],
"returntype": "void"
},
{ {
"methodname": "SetTimelineGameMode", "methodname": "SetTimelineGameMode",
"methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineGameMode", "methodname_flat": "SteamAPI_ISteamTimeline_SetTimelineGameMode",
@@ -11795,9 +11822,154 @@
{ "paramname":"eMode", "paramtype":"ETimelineGameMode" } { "paramname":"eMode", "paramtype":"ETimelineGameMode" }
], ],
"returntype": "void" "returntype": "void"
},
{
"methodname": "AddInstantaneousTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_AddInstantaneousTimelineEvent",
"params": [
{ "paramname":"pchTitle", "paramtype":"const char *" },
{ "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"pchIcon", "paramtype":"const char *" },
{ "paramname":"unIconPriority", "paramtype":"uint32" },
{ "paramname":"flStartOffsetSeconds", "paramtype":"float" },
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
],
"returntype": "TimelineEventHandle_t"
},
{
"methodname": "AddRangeTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_AddRangeTimelineEvent",
"params": [
{ "paramname":"pchTitle", "paramtype":"const char *" },
{ "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"pchIcon", "paramtype":"const char *" },
{ "paramname":"unIconPriority", "paramtype":"uint32" },
{ "paramname":"flStartOffsetSeconds", "paramtype":"float" },
{ "paramname":"flDuration", "paramtype":"float" },
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
],
"returntype": "TimelineEventHandle_t"
},
{
"methodname": "StartRangeTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_StartRangeTimelineEvent",
"params": [
{ "paramname":"pchTitle", "paramtype":"const char *" },
{ "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"pchIcon", "paramtype":"const char *" },
{ "paramname":"unPriority", "paramtype":"uint32" },
{ "paramname":"flStartOffsetSeconds", "paramtype":"float" },
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
],
"returntype": "TimelineEventHandle_t"
},
{
"methodname": "UpdateRangeTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_UpdateRangeTimelineEvent",
"params": [
{ "paramname":"ulEvent", "paramtype":"TimelineEventHandle_t" },
{ "paramname":"pchTitle", "paramtype":"const char *" },
{ "paramname":"pchDescription", "paramtype":"const char *" },
{ "paramname":"pchIcon", "paramtype":"const char *" },
{ "paramname":"unPriority", "paramtype":"uint32" },
{ "paramname":"ePossibleClip", "paramtype":"ETimelineEventClipPriority" }
],
"returntype": "void"
},
{
"methodname": "EndRangeTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_EndRangeTimelineEvent",
"params": [
{ "paramname":"ulEvent", "paramtype":"TimelineEventHandle_t" },
{ "paramname":"flEndOffsetSeconds", "paramtype":"float" }
],
"returntype": "void"
},
{
"methodname": "RemoveTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_RemoveTimelineEvent",
"params": [
{ "paramname":"ulEvent", "paramtype":"TimelineEventHandle_t" }
],
"returntype": "void"
},
{
"callresult": "SteamTimelineEventRecordingExists_t",
"methodname": "DoesEventRecordingExist",
"methodname_flat": "SteamAPI_ISteamTimeline_DoesEventRecordingExist",
"params": [
{ "paramname":"ulEvent", "paramtype":"TimelineEventHandle_t" }
],
"returntype": "SteamAPICall_t"
},
{
"methodname": "StartGamePhase",
"methodname_flat": "SteamAPI_ISteamTimeline_StartGamePhase",
"params": [],
"returntype": "void"
},
{
"methodname": "EndGamePhase",
"methodname_flat": "SteamAPI_ISteamTimeline_EndGamePhase",
"params": [],
"returntype": "void"
},
{
"methodname": "SetGamePhaseID",
"methodname_flat": "SteamAPI_ISteamTimeline_SetGamePhaseID",
"params": [
{ "paramname":"pchPhaseID", "paramtype":"const char *" }
],
"returntype": "void"
},
{
"callresult": "SteamTimelineGamePhaseRecordingExists_t",
"methodname": "DoesGamePhaseRecordingExist",
"methodname_flat": "SteamAPI_ISteamTimeline_DoesGamePhaseRecordingExist",
"params": [
{ "paramname":"pchPhaseID", "paramtype":"const char *" }
],
"returntype": "SteamAPICall_t"
},
{
"methodname": "AddGamePhaseTag",
"methodname_flat": "SteamAPI_ISteamTimeline_AddGamePhaseTag",
"params": [
{ "paramname":"pchTagName", "paramtype":"const char *" },
{ "paramname":"pchTagIcon", "paramtype":"const char *" },
{ "paramname":"pchTagGroup", "paramtype":"const char *" },
{ "paramname":"unPriority", "paramtype":"uint32" }
],
"returntype": "void"
},
{
"methodname": "SetGamePhaseAttribute",
"methodname_flat": "SteamAPI_ISteamTimeline_SetGamePhaseAttribute",
"params": [
{ "paramname":"pchAttributeGroup", "paramtype":"const char *" },
{ "paramname":"pchAttributeValue", "paramtype":"const char *" },
{ "paramname":"unPriority", "paramtype":"uint32" }
],
"returntype": "void"
},
{
"methodname": "OpenOverlayToGamePhase",
"methodname_flat": "SteamAPI_ISteamTimeline_OpenOverlayToGamePhase",
"params": [
{ "paramname":"pchPhaseID", "paramtype":"const char *" }
],
"returntype": "void"
},
{
"methodname": "OpenOverlayToTimelineEvent",
"methodname_flat": "SteamAPI_ISteamTimeline_OpenOverlayToTimelineEvent",
"params": [
{ "paramname":"ulEvent", "paramtype":"const TimelineEventHandle_t" }
],
"returntype": "void"
} }
], ],
"version_string": "STEAMTIMELINE_INTERFACE_V001" "version_string": "STEAMTIMELINE_INTERFACE_V004"
}, },
{ {
"accessors": [ "accessors": [
@@ -13886,20 +14058,6 @@
"params": [], "params": [],
"returntype": "uint64" "returntype": "uint64"
}, },
{
"methodname": "SetStadiaID",
"methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetStadiaID",
"params": [
{ "paramname":"id", "paramtype":"uint64" }
],
"returntype": "void"
},
{
"methodname": "GetStadiaID",
"methodname_flat": "SteamAPI_SteamNetworkingIdentity_GetStadiaID",
"params": [],
"returntype": "uint64"
},
{ {
"methodname": "SetIPAddr", "methodname": "SetIPAddr",
"methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetIPAddr", "methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetIPAddr",
@@ -14245,6 +14403,7 @@
{ "typedef":"SteamItemDef_t", "type":"int" }, { "typedef":"SteamItemDef_t", "type":"int" },
{ "typedef":"SteamInventoryResult_t", "type":"int" }, { "typedef":"SteamInventoryResult_t", "type":"int" },
{ "typedef":"SteamInventoryUpdateHandle_t", "type":"unsigned long long" }, { "typedef":"SteamInventoryUpdateHandle_t", "type":"unsigned long long" },
{ "typedef":"TimelineEventHandle_t", "type":"unsigned long long" },
{ "typedef":"RemotePlaySessionID_t", "type":"unsigned int" }, { "typedef":"RemotePlaySessionID_t", "type":"unsigned int" },
{ "typedef":"FnSteamNetConnectionStatusChanged", "type":"void (*)(SteamNetConnectionStatusChangedCallback_t *)" }, { "typedef":"FnSteamNetConnectionStatusChanged", "type":"void (*)(SteamNetConnectionStatusChangedCallback_t *)" },
{ "typedef":"FnSteamNetAuthenticationStatusChanged", "type":"void (*)(SteamNetAuthenticationStatus_t *)" }, { "typedef":"FnSteamNetAuthenticationStatusChanged", "type":"void (*)(SteamNetAuthenticationStatus_t *)" },
+24 -13
View File
@@ -427,10 +427,9 @@ S_API bool SteamAPI_ISteamRemoteStorage_EndFileWriteBatch( ISteamRemoteStorage*
// ISteamUserStats // ISteamUserStats
// A versioned accessor is exported by the library // A versioned accessor is exported by the library
S_API ISteamUserStats *SteamAPI_SteamUserStats_v012(); S_API ISteamUserStats *SteamAPI_SteamUserStats_v013();
// Inline, unversioned accessor to get the current version. Essentially the same as SteamUserStats(), but using this ensures that you are using a matching library. // Inline, unversioned accessor to get the current version. Essentially the same as SteamUserStats(), but using this ensures that you are using a matching library.
inline ISteamUserStats *SteamAPI_SteamUserStats() { return SteamAPI_SteamUserStats_v012(); } inline ISteamUserStats *SteamAPI_SteamUserStats() { return SteamAPI_SteamUserStats_v013(); }
S_API bool SteamAPI_ISteamUserStats_RequestCurrentStats( ISteamUserStats* self );
S_API bool SteamAPI_ISteamUserStats_GetStatInt32( ISteamUserStats* self, const char * pchName, int32 * pData ); S_API bool SteamAPI_ISteamUserStats_GetStatInt32( ISteamUserStats* self, const char * pchName, int32 * pData );
S_API bool SteamAPI_ISteamUserStats_GetStatFloat( ISteamUserStats* self, const char * pchName, float * pData ); S_API bool SteamAPI_ISteamUserStats_GetStatFloat( ISteamUserStats* self, const char * pchName, float * pData );
S_API bool SteamAPI_ISteamUserStats_SetStatInt32( ISteamUserStats* self, const char * pchName, int32 nData ); S_API bool SteamAPI_ISteamUserStats_SetStatInt32( ISteamUserStats* self, const char * pchName, int32 nData );
@@ -512,9 +511,9 @@ S_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * psz
S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self ); S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self );
S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed ); S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed );
S_API bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID ); S_API bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID );
S_API int SteamAPI_ISteamApps_GetNumBetas( ISteamApps* self, AppId_t unAppID, int * pnAvailable, int * pnPrivate ); S_API int SteamAPI_ISteamApps_GetNumBetas( ISteamApps* self, int * pnAvailable, int * pnPrivate );
S_API bool SteamAPI_ISteamApps_GetBetaInfo( ISteamApps* self, AppId_t unAppID, int iBetaIndex, uint32 * punFlags, uint32 * punBuildID, char * pchBetaName, int cchBetaName, char * pchDescription, int cchDescription ); S_API bool SteamAPI_ISteamApps_GetBetaInfo( ISteamApps* self, int iBetaIndex, uint32 * punFlags, uint32 * punBuildID, char * pchBetaName, int cchBetaName, char * pchDescription, int cchDescription );
S_API bool SteamAPI_ISteamApps_SetActiveBeta( ISteamApps* self, AppId_t unAppID, const char * pchBetaName ); S_API bool SteamAPI_ISteamApps_SetActiveBeta( ISteamApps* self, const char * pchBetaName );
// ISteamNetworking // ISteamNetworking
@@ -957,13 +956,27 @@ S_API bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* self, SteamInv
// ISteamTimeline // ISteamTimeline
// A versioned accessor is exported by the library // A versioned accessor is exported by the library
S_API ISteamTimeline *SteamAPI_SteamTimeline_v001(); S_API ISteamTimeline *SteamAPI_SteamTimeline_v004();
// Inline, unversioned accessor to get the current version. Essentially the same as SteamTimeline(), but using this ensures that you are using a matching library. // Inline, unversioned accessor to get the current version. Essentially the same as SteamTimeline(), but using this ensures that you are using a matching library.
inline ISteamTimeline *SteamAPI_SteamTimeline() { return SteamAPI_SteamTimeline_v001(); } inline ISteamTimeline *SteamAPI_SteamTimeline() { return SteamAPI_SteamTimeline_v004(); }
S_API void SteamAPI_ISteamTimeline_SetTimelineStateDescription( ISteamTimeline* self, const char * pchDescription, float flTimeDelta ); S_API void SteamAPI_ISteamTimeline_SetTimelineTooltip( ISteamTimeline* self, const char * pchDescription, float flTimeDelta );
S_API void SteamAPI_ISteamTimeline_ClearTimelineStateDescription( ISteamTimeline* self, float flTimeDelta ); S_API void SteamAPI_ISteamTimeline_ClearTimelineTooltip( ISteamTimeline* self, float flTimeDelta );
S_API void SteamAPI_ISteamTimeline_AddTimelineEvent( ISteamTimeline* self, const char * pchIcon, const char * pchTitle, const char * pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip );
S_API void SteamAPI_ISteamTimeline_SetTimelineGameMode( ISteamTimeline* self, ETimelineGameMode eMode ); S_API void SteamAPI_ISteamTimeline_SetTimelineGameMode( ISteamTimeline* self, ETimelineGameMode eMode );
S_API TimelineEventHandle_t SteamAPI_ISteamTimeline_AddInstantaneousTimelineEvent( ISteamTimeline* self, const char * pchTitle, const char * pchDescription, const char * pchIcon, uint32 unIconPriority, float flStartOffsetSeconds, ETimelineEventClipPriority ePossibleClip );
S_API TimelineEventHandle_t SteamAPI_ISteamTimeline_AddRangeTimelineEvent( ISteamTimeline* self, const char * pchTitle, const char * pchDescription, const char * pchIcon, uint32 unIconPriority, float flStartOffsetSeconds, float flDuration, ETimelineEventClipPriority ePossibleClip );
S_API TimelineEventHandle_t SteamAPI_ISteamTimeline_StartRangeTimelineEvent( ISteamTimeline* self, const char * pchTitle, const char * pchDescription, const char * pchIcon, uint32 unPriority, float flStartOffsetSeconds, ETimelineEventClipPriority ePossibleClip );
S_API void SteamAPI_ISteamTimeline_UpdateRangeTimelineEvent( ISteamTimeline* self, TimelineEventHandle_t ulEvent, const char * pchTitle, const char * pchDescription, const char * pchIcon, uint32 unPriority, ETimelineEventClipPriority ePossibleClip );
S_API void SteamAPI_ISteamTimeline_EndRangeTimelineEvent( ISteamTimeline* self, TimelineEventHandle_t ulEvent, float flEndOffsetSeconds );
S_API void SteamAPI_ISteamTimeline_RemoveTimelineEvent( ISteamTimeline* self, TimelineEventHandle_t ulEvent );
S_API SteamAPICall_t SteamAPI_ISteamTimeline_DoesEventRecordingExist( ISteamTimeline* self, TimelineEventHandle_t ulEvent );
S_API void SteamAPI_ISteamTimeline_StartGamePhase( ISteamTimeline* self );
S_API void SteamAPI_ISteamTimeline_EndGamePhase( ISteamTimeline* self );
S_API void SteamAPI_ISteamTimeline_SetGamePhaseID( ISteamTimeline* self, const char * pchPhaseID );
S_API SteamAPICall_t SteamAPI_ISteamTimeline_DoesGamePhaseRecordingExist( ISteamTimeline* self, const char * pchPhaseID );
S_API void SteamAPI_ISteamTimeline_AddGamePhaseTag( ISteamTimeline* self, const char * pchTagName, const char * pchTagIcon, const char * pchTagGroup, uint32 unPriority );
S_API void SteamAPI_ISteamTimeline_SetGamePhaseAttribute( ISteamTimeline* self, const char * pchAttributeGroup, const char * pchAttributeValue, uint32 unPriority );
S_API void SteamAPI_ISteamTimeline_OpenOverlayToGamePhase( ISteamTimeline* self, const char * pchPhaseID );
S_API void SteamAPI_ISteamTimeline_OpenOverlayToTimelineEvent( ISteamTimeline* self, const TimelineEventHandle_t ulEvent );
// ISteamVideo // ISteamVideo
@@ -1251,8 +1264,6 @@ S_API bool SteamAPI_SteamNetworkingIdentity_SetXboxPairwiseID( SteamNetworkingId
S_API const char * SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID( SteamNetworkingIdentity* self ); S_API const char * SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID( SteamNetworkingIdentity* self );
S_API void SteamAPI_SteamNetworkingIdentity_SetPSNID( SteamNetworkingIdentity* self, uint64 id ); S_API void SteamAPI_SteamNetworkingIdentity_SetPSNID( SteamNetworkingIdentity* self, uint64 id );
S_API uint64 SteamAPI_SteamNetworkingIdentity_GetPSNID( SteamNetworkingIdentity* self ); S_API uint64 SteamAPI_SteamNetworkingIdentity_GetPSNID( SteamNetworkingIdentity* self );
S_API void SteamAPI_SteamNetworkingIdentity_SetStadiaID( SteamNetworkingIdentity* self, uint64 id );
S_API uint64 SteamAPI_SteamNetworkingIdentity_GetStadiaID( SteamNetworkingIdentity* self );
S_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr ); S_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr );
S_API const SteamNetworkingIPAddr * SteamAPI_SteamNetworkingIdentity_GetIPAddr( SteamNetworkingIdentity* self ); S_API const SteamNetworkingIPAddr * SteamAPI_SteamNetworkingIdentity_GetIPAddr( SteamNetworkingIdentity* self );
S_API void SteamAPI_SteamNetworkingIdentity_SetIPv4Addr( SteamNetworkingIdentity* self, uint32 nIPv4, uint16 nPort ); S_API void SteamAPI_SteamNetworkingIdentity_SetIPv4Addr( SteamNetworkingIdentity* self, uint32 nIPv4, uint16 nPort );
-29
View File
@@ -307,32 +307,3 @@ enum { k_iSteamTimelineCallbacks = 6000 };
#define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";") #define STEAM_CALL_RESULT(RESULT_TYPE) STEAM_CLANG_ATTR("callresult:" #RESULT_TYPE ";")
#define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";") #define STEAM_CALL_BACK(RESULT_TYPE) STEAM_CLANG_ATTR("callback:" #RESULT_TYPE ";")
#define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";") #define STEAM_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
class CSteamGameServerAPIContext
{
public:
CSteamGameServerAPIContext() { Clear(); }
inline void Clear() { memset( this, 0, sizeof(*this) ); }
inline bool Init(); // NOTE: This is defined in steam_gameserver.h, to avoid this file having to include everything
ISteamClient *SteamClient() const { return m_pSteamClient; }
ISteamGameServer *SteamGameServer() const { return m_pSteamGameServer; }
ISteamUtils *SteamGameServerUtils() const { return m_pSteamGameServerUtils; }
ISteamNetworking *SteamGameServerNetworking() const { return m_pSteamGameServerNetworking; }
ISteamGameServerStats *SteamGameServerStats() const { return m_pSteamGameServerStats; }
ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; }
ISteamInventory *SteamInventory() const { return m_pSteamInventory; }
ISteamUGC *SteamUGC() const { return m_pSteamUGC; }
private:
ISteamClient *m_pSteamClient;
ISteamGameServer *m_pSteamGameServer;
ISteamUtils *m_pSteamGameServerUtils;
ISteamNetworking *m_pSteamGameServerNetworking;
ISteamGameServerStats *m_pSteamGameServerStats;
ISteamHTTP *m_pSteamHTTP;
ISteamInventory *m_pSteamInventory;
ISteamUGC *m_pSteamUGC;
};
+2 -25
View File
@@ -74,8 +74,8 @@ S_API bool SteamGameServer_BSecure();
S_API uint64 SteamGameServer_GetSteamID(); S_API uint64 SteamGameServer_GetSteamID();
// Older SDKs exported this global pointer, but it is no longer supported. // Older SDKs exported this global pointer, but it is no longer supported.
// You should use SteamGameServerClient() or CSteamGameServerAPIContext to // You should use SteamGameServerClient() to safely access the ISteamClient
// safely access the ISteamClient APIs from your game server application. // APIs from your game server application.
//S_API ISteamClient *g_pSteamClientGameServer; //S_API ISteamClient *g_pSteamClientGameServer;
// SteamGameServer_InitSafe has been replaced with SteamGameServer_Init and // SteamGameServer_InitSafe has been replaced with SteamGameServer_Init and
@@ -88,29 +88,6 @@ S_API uint64 SteamGameServer_GetSteamID();
// //
//============================================================================= //=============================================================================
#ifndef STEAM_API_EXPORTS
// This function must be declared inline in the header so the module using steam_api.dll gets the version names they want.
inline bool CSteamGameServerAPIContext::Init()
{
m_pSteamClient = ::SteamGameServerClient();
if ( !m_pSteamClient )
return false;
m_pSteamGameServer = ::SteamGameServer();
m_pSteamGameServerUtils = ::SteamGameServerUtils();
m_pSteamGameServerNetworking = ::SteamGameServerNetworking();
m_pSteamGameServerStats = ::SteamGameServerStats();
m_pSteamHTTP = ::SteamGameServerHTTP();
m_pSteamInventory = ::SteamGameServerInventory();
m_pSteamUGC = ::SteamGameServerUGC();
if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC )
return false;
return true;
}
#endif
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_GameServer_Init_V2( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg ); S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_GameServer_Init_V2( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg ) inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg )
{ {
+1
View File
@@ -143,6 +143,7 @@ enum EResult
K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number
k_EResultNotSupported = 128, // The data being accessed is not supported by this API k_EResultNotSupported = 128, // The data being accessed is not supported by this API
k_EResultFamilySizeLimitExceeded = 129, // Reached the maximum size of the family k_EResultFamilySizeLimitExceeded = 129, // Reached the maximum size of the family
k_EResultOfflineAppCacheInvalid = 130, // The local data for the offline mode cache is insufficient to login
}; };
// Error codes for use with the voice functions // Error codes for use with the voice functions
+53 -14
View File
@@ -143,10 +143,6 @@ enum ESteamNetworkingIdentityType
k_ESteamNetworkingIdentityType_SteamID = 16, // 64-bit CSteamID k_ESteamNetworkingIdentityType_SteamID = 16, // 64-bit CSteamID
k_ESteamNetworkingIdentityType_XboxPairwiseID = 17, // Publisher-specific user identity, as string k_ESteamNetworkingIdentityType_XboxPairwiseID = 17, // Publisher-specific user identity, as string
k_ESteamNetworkingIdentityType_SonyPSN = 18, // 64-bit ID k_ESteamNetworkingIdentityType_SonyPSN = 18, // 64-bit ID
k_ESteamNetworkingIdentityType_GoogleStadia = 19, // 64-bit ID
//k_ESteamNetworkingIdentityType_NintendoNetworkServiceAccount,
//k_ESteamNetworkingIdentityType_EpicGameStore
//k_ESteamNetworkingIdentityType_WeGame
// //
// Special identifiers. // Special identifiers.
@@ -281,9 +277,6 @@ struct SteamNetworkingIdentity
void SetPSNID( uint64 id ); void SetPSNID( uint64 id );
uint64 GetPSNID() const; // Returns 0 if not PSN uint64 GetPSNID() const; // Returns 0 if not PSN
void SetStadiaID( uint64 id );
uint64 GetStadiaID() const; // Returns 0 if not Stadia
void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port
const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address. const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address.
void SetIPv4Addr( uint32 nIPv4, uint16 nPort ); // Set to specified IPv4:port void SetIPv4Addr( uint32 nIPv4, uint16 nPort ); // Set to specified IPv4:port
@@ -339,7 +332,6 @@ struct SteamNetworkingIdentity
union { union {
uint64 m_steamID64; uint64 m_steamID64;
uint64 m_PSNID; uint64 m_PSNID;
uint64 m_stadiaID;
char m_szGenericString[ k_cchMaxGenericString ]; char m_szGenericString[ k_cchMaxGenericString ];
char m_szXboxPairwiseID[ k_cchMaxXboxPairwiseID ]; char m_szXboxPairwiseID[ k_cchMaxXboxPairwiseID ];
uint8 m_genericBytes[ k_cbMaxGenericBytes ]; uint8 m_genericBytes[ k_cbMaxGenericBytes ];
@@ -1389,6 +1381,17 @@ enum ESteamNetworkingConfigValue
/// generic platform UI. (Only available on Steam.) /// generic platform UI. (Only available on Steam.)
k_ESteamNetworkingConfig_EnableDiagnosticsUI = 46, k_ESteamNetworkingConfig_EnableDiagnosticsUI = 46,
/// [connection int32] Send of time-since-previous-packet values in each UDP packet.
/// This add a small amount of packet overhead but allows for detailed jitter measurements
/// to be made by the receiver.
///
/// - 0: disables the sending
/// - 1: enables sending
/// - -1: (the default) Use the default for the connection type. For plain UDP connections,
/// this is disabled, and for relayed connections, it is enabled. Note that relays
/// always send the value.
k_ESteamNetworkingConfig_SendTimeSincePreviousPacket = 59,
// //
// Simulating network conditions // Simulating network conditions
// //
@@ -1406,15 +1409,53 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_FakePacketLag_Send = 4, k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5, k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
/// [global float] 0-100 Percentage of packets we will add additional delay /// Simulated jitter/clumping.
/// to (causing them to be reordered) ///
/// For each packet, a jitter value is determined (which may
/// be zero). This amount is added as extra delay to the
/// packet. When a subsequent packet is queued, it receives its
/// own random jitter amount from the current time. if this would
/// result in the packets being delivered out of order, the later
/// packet queue time is adjusted to happen after the first packet.
/// Thus simulating jitter by itself will not reorder packets, but it
/// can "clump" them.
///
/// - Avg: A random jitter time is generated using an exponential
/// distribution using this value as the mean (ms). The default
/// is zero, which disables random jitter.
/// - Max: Limit the random jitter time to this value (ms).
/// - Pct: odds (0-100) that a random jitter value for the packet
/// will be generated. Otherwise, a jitter value of zero
/// is used, and the packet will only be delayed by the jitter
/// system if necessary to retain order, due to the jitter of a
/// previous packet.
///
/// All values are [global float]
///
/// Fake jitter is simulated after fake lag, but before reordering.
k_ESteamNetworkingConfig_FakePacketJitter_Send_Avg = 53,
k_ESteamNetworkingConfig_FakePacketJitter_Send_Max = 54,
k_ESteamNetworkingConfig_FakePacketJitter_Send_Pct = 55,
k_ESteamNetworkingConfig_FakePacketJitter_Recv_Avg = 56,
k_ESteamNetworkingConfig_FakePacketJitter_Recv_Max = 57,
k_ESteamNetworkingConfig_FakePacketJitter_Recv_Pct = 58,
/// [global float] 0-100 Percentage of packets we will add additional
/// delay to. If other packet(s) are sent/received within this delay
/// window (that doesn't also randomly receive the same extra delay),
/// then the packets become reordered.
///
/// This mechanism is primarily intended to generate out-of-order
/// packets. To simulate random jitter, use the FakePacketJitter.
/// Fake packet reordering is applied after fake lag and jitter
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6, k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7, k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
/// [global int32] Extra delay, in ms, to apply to reordered packets. /// [global int32] Extra delay, in ms, to apply to reordered
/// packets. The same time value is used for sending and receiving.
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8, k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
/// [global float 0--100] Globally duplicate some percentage of packets we send /// [global float 0--100] Globally duplicate some percentage of packets.
k_ESteamNetworkingConfig_FakePacketDup_Send = 26, k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27, k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
@@ -1855,8 +1896,6 @@ inline bool SteamNetworkingIdentity::SetXboxPairwiseID( const char *pszString )
inline const char *SteamNetworkingIdentity::GetXboxPairwiseID() const { return m_eType == k_ESteamNetworkingIdentityType_XboxPairwiseID ? m_szXboxPairwiseID : NULL; } inline const char *SteamNetworkingIdentity::GetXboxPairwiseID() const { return m_eType == k_ESteamNetworkingIdentityType_XboxPairwiseID ? m_szXboxPairwiseID : NULL; }
inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_SonyPSN; m_cbSize = sizeof( m_PSNID ); m_PSNID = id; } inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_SonyPSN; m_cbSize = sizeof( m_PSNID ); m_PSNID = id; }
inline uint64 SteamNetworkingIdentity::GetPSNID() const { return m_eType == k_ESteamNetworkingIdentityType_SonyPSN ? m_PSNID : 0; } inline uint64 SteamNetworkingIdentity::GetPSNID() const { return m_eType == k_ESteamNetworkingIdentityType_SonyPSN ? m_PSNID : 0; }
inline void SteamNetworkingIdentity::SetStadiaID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_GoogleStadia; m_cbSize = sizeof( m_stadiaID ); m_stadiaID = id; }
inline uint64 SteamNetworkingIdentity::GetStadiaID() const { return m_eType == k_ESteamNetworkingIdentityType_GoogleStadia ? m_stadiaID : 0; }
inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; } inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; }
inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; } inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; }
inline void SteamNetworkingIdentity::SetIPv4Addr( uint32 nIPv4, uint16 nPort ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv4( nIPv4, nPort ); } inline void SteamNetworkingIdentity::SetIPv4Addr( uint32 nIPv4, uint16 nPort ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv4( nIPv4, nPort ); }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46 -46
View File
@@ -23,12 +23,12 @@ CGameEngineGL *g_engine; // dxabstract will use this.. it is set by the engine
IGameEngine *CreateGameEngineSDL( ) IGameEngine *CreateGameEngineSDL( )
{ {
static CGameEngineGL* s_pGameEngine = NULL; static CGameEngineGL* s_pGameEngine = NULL;
if (!s_pGameEngine) if (!s_pGameEngine)
{ {
s_pGameEngine = new CGameEngineGL( ); s_pGameEngine = new CGameEngineGL( );
} }
return s_pGameEngine; return s_pGameEngine;
} }
@@ -43,24 +43,24 @@ struct Packet_t
void *pData; void *pData;
}; };
class CVoiceContext class CVoiceContext
{ {
public: public:
CVoiceContext() CVoiceContext()
{ {
alGenBuffers( ARRAYSIZE(m_buffers), m_buffers ); alGenBuffers( ARRAYSIZE(m_buffers), m_buffers );
alGenSources( 1, &m_nSource ); alGenSources( 1, &m_nSource );
alSourcei( m_nSource, AL_LOOPING, AL_FALSE ); alSourcei( m_nSource, AL_LOOPING, AL_FALSE );
for (int i = 0; i < ARRAYSIZE(m_buffers); i++ ) for (int i = 0; i < ARRAYSIZE(m_buffers); i++ )
alSourcei( m_nSource, AL_BUFFER, m_buffers[i] ); alSourcei( m_nSource, AL_BUFFER, m_buffers[i] );
m_nNextFreeBuffer = 0; m_nNextFreeBuffer = 0;
} }
virtual ~CVoiceContext() virtual ~CVoiceContext()
{ {
// //
} }
ALuint m_buffers[4]; ALuint m_buffers[4];
@@ -87,7 +87,7 @@ power_of_two(int input)
CGameEngineGL::CGameEngineGL( ) CGameEngineGL::CGameEngineGL( )
{ {
g_engine = this; g_engine = this;
m_bEngineReadyForUse = false; m_bEngineReadyForUse = false;
m_bShuttingDown = false; m_bShuttingDown = false;
m_window = NULL; m_window = NULL;
@@ -220,7 +220,7 @@ void CGameEngineGL::Shutdown()
m_MapStrings.clear(); m_MapStrings.clear();
m_MapTextures.clear(); m_MapTextures.clear();
m_dwLinesToFlush = 0; m_dwLinesToFlush = 0;
m_dwPointsToFlush = 0; m_dwPointsToFlush = 0;
m_dwQuadsToFlush = 0; m_dwQuadsToFlush = 0;
@@ -233,7 +233,7 @@ void CGameEngineGL::Shutdown()
bool CGameEngineGL::BInitializeAudio() bool CGameEngineGL::BInitializeAudio()
{ {
m_palDevice = alcOpenDevice(NULL); m_palDevice = alcOpenDevice(NULL);
if ( m_palDevice ) if ( m_palDevice )
{ {
m_palContext = alcCreateContext( m_palDevice, NULL ); m_palContext = alcCreateContext( m_palDevice, NULL );
alcMakeContextCurrent( m_palContext ); alcMakeContextCurrent( m_palContext );
@@ -285,7 +285,7 @@ bool CGameEngineGL::BInitializeGraphics()
OutputDebugString( "\n" ); OutputDebugString( "\n" );
return false; return false;
} }
GLenum err = glewInit(); GLenum err = glewInit();
if( err != GLEW_OK ) if( err != GLEW_OK )
{ {
@@ -326,13 +326,13 @@ bool CGameEngineGL::BInitializeGraphics()
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();
glTranslatef( 0, 0, 0 ); glTranslatef( 0, 0, 0 );
glMatrixMode( GL_TEXTURE ); glMatrixMode( GL_TEXTURE );
glLoadIdentity(); glLoadIdentity();
glTranslatef( 0, 0, 0 ); glTranslatef( 0, 0, 0 );
glDepthRange( 0.0f, 1.0f ); glDepthRange( 0.0f, 1.0f );
AdjustViewport(); AdjustViewport();
return true; return true;
@@ -348,7 +348,7 @@ void CGameEngineGL::AdjustViewport()
glLoadIdentity(); glLoadIdentity();
glOrtho( 0, m_nWindowWidth, m_nWindowHeight, 0, -1.0f, 1.0f ); glOrtho( 0, m_nWindowWidth, m_nWindowHeight, 0, -1.0f, 1.0f );
glTranslatef( 0, 0, 0 ); glTranslatef( 0, 0, 0 );
// View port has changed as well // View port has changed as well
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glLoadIdentity();
@@ -427,7 +427,7 @@ void CGameEngineGL::SetBackgroundColor( short a, short r, short g, short b )
bool CGameEngineGL::StartFrame() bool CGameEngineGL::StartFrame()
{ {
AdjustViewport(); AdjustViewport();
// Pump system callbacks // Pump system callbacks
MessagePump(); MessagePump();
@@ -470,7 +470,7 @@ void CGameEngineGL::EndFrame()
// Swap buffers now that everything is flushed // Swap buffers now that everything is flushed
SDL_GL_SwapWindow( m_window ); SDL_GL_SwapWindow( m_window );
RunAudio(); RunAudio();
} }
@@ -484,7 +484,7 @@ bool CGameEngineGL::BDrawLine( float xPos0, float yPos0, DWORD dwColor0, float x
return false; return false;
// Check if we are out of room and need to flush the buffer // Check if we are out of room and need to flush the buffer
if ( m_dwLinesToFlush == LINE_BUFFER_TOTAL_SIZE ) if ( m_dwLinesToFlush == LINE_BUFFER_TOTAL_SIZE )
{ {
BFlushLineBuffer(); BFlushLineBuffer();
} }
@@ -543,7 +543,7 @@ bool CGameEngineGL::BDrawPoint( float xPos, float yPos, DWORD dwColor )
return false; return false;
// Check if we are out of room and need to flush the buffer // Check if we are out of room and need to flush the buffer
if ( m_dwPointsToFlush == POINT_BUFFER_TOTAL_SIZE ) if ( m_dwPointsToFlush == POINT_BUFFER_TOTAL_SIZE )
{ {
BFlushPointBuffer(); BFlushPointBuffer();
} }
@@ -558,7 +558,7 @@ bool CGameEngineGL::BDrawPoint( float xPos, float yPos, DWORD dwColor )
m_rgflPointsColorData[dwOffset+1] = COLOR_GREEN( dwColor ); m_rgflPointsColorData[dwOffset+1] = COLOR_GREEN( dwColor );
m_rgflPointsColorData[dwOffset+2] = COLOR_BLUE( dwColor ); m_rgflPointsColorData[dwOffset+2] = COLOR_BLUE( dwColor );
m_rgflPointsColorData[dwOffset+3] = COLOR_ALPHA( dwColor ); m_rgflPointsColorData[dwOffset+3] = COLOR_ALPHA( dwColor );
++m_dwPointsToFlush; ++m_dwPointsToFlush;
return true; return true;
@@ -581,7 +581,7 @@ bool CGameEngineGL::BFlushPointBuffer()
m_dwPointsToFlush = 0; m_dwPointsToFlush = 0;
} }
return true; return true;
} }
@@ -622,7 +622,7 @@ bool CGameEngineGL::BDrawTexturedRect( float xPos0, float yPos0, float xPos1, fl
// Check if we are out of room and need to flush the buffer, or if our texture is changing // Check if we are out of room and need to flush the buffer, or if our texture is changing
// then we also need to flush the buffer. // then we also need to flush the buffer.
if ( m_dwQuadsToFlush == QUAD_BUFFER_TOTAL_SIZE || m_hLastTexture != hTexture ) if ( m_dwQuadsToFlush == QUAD_BUFFER_TOTAL_SIZE || m_hLastTexture != hTexture )
{ {
BFlushQuadBuffer(); BFlushQuadBuffer();
} }
@@ -698,7 +698,7 @@ bool CGameEngineGL::BDrawTexturedQuad( float xPos0, float yPos0, float xPos1, fl
// Check if we are out of room and need to flush the buffer, or if our texture is changing // Check if we are out of room and need to flush the buffer, or if our texture is changing
// then we also need to flush the buffer. // then we also need to flush the buffer.
if ( m_dwQuadsToFlush == QUAD_BUFFER_TOTAL_SIZE || m_hLastTexture != hTexture ) if ( m_dwQuadsToFlush == QUAD_BUFFER_TOTAL_SIZE || m_hLastTexture != hTexture )
{ {
BFlushQuadBuffer(); BFlushQuadBuffer();
} }
@@ -784,7 +784,7 @@ bool CGameEngineGL::BFlushQuadBuffer()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Creates a new texture // Purpose: Creates a new texture
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
HGAMETEXTURE CGameEngineGL::HCreateTexture( byte *pRGBAData, uint32 uWidth, uint32 uHeight, ETEXTUREFORMAT eTextureFormat ) HGAMETEXTURE CGameEngineGL::HCreateTexture( byte *pRGBAData, uint32 uWidth, uint32 uHeight, ETEXTUREFORMAT eTextureFormat )
{ {
@@ -826,7 +826,7 @@ bool CGameEngineGL::UpdateTexture( HGAMETEXTURE texture, byte *pRGBAData, uint32
{ {
if ( m_bShuttingDown ) if ( m_bShuttingDown )
return false; return false;
std::map<HGAMETEXTURE, TextureData_t>::iterator iter; std::map<HGAMETEXTURE, TextureData_t>::iterator iter;
iter = m_MapTextures.find( texture ); iter = m_MapTextures.find( texture );
if ( iter == m_MapTextures.end() ) if ( iter == m_MapTextures.end() )
@@ -834,14 +834,14 @@ bool CGameEngineGL::UpdateTexture( HGAMETEXTURE texture, byte *pRGBAData, uint32
OutputDebugString( "BDrawTexturedQuad called with invalid hTexture value\n" ); OutputDebugString( "BDrawTexturedQuad called with invalid hTexture value\n" );
return false; return false;
} }
glEnable( GL_TEXTURE_2D ); glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, iter->second.m_uTextureID ); glBindTexture( GL_TEXTURE_2D, iter->second.m_uTextureID );
// build our texture mipmaps // build our texture mipmaps
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, uWidth, uHeight, 0, eTextureFormat == eTextureFormat_RGBA ? GL_RGBA : GL_BGRA, GL_UNSIGNED_BYTE, (void *)pRGBAData ); glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, uWidth, uHeight, 0, eTextureFormat == eTextureFormat_RGBA ? GL_RGBA : GL_BGRA, GL_UNSIGNED_BYTE, (void *)pRGBAData );
glDisable( GL_TEXTURE_2D ); glDisable( GL_TEXTURE_2D );
return true; return true;
} }
@@ -853,7 +853,7 @@ HGAMEFONT CGameEngineGL::HCreateFont( int nHeight, int nFontWeight, bool bItalic
{ {
// For this sample we include a single font // For this sample we include a single font
pchFont = "DejaVuSans.ttf"; pchFont = "DejaVuSans.ttf";
TTF_Font *font = TTF_OpenFont( pchFont, nHeight ); TTF_Font *font = TTF_OpenFont( pchFont, nHeight );
if ( !font ) if ( !font )
{ {
@@ -1019,7 +1019,7 @@ void CGameEngineGL::MessagePump()
{ {
if ( SDL_PollEvent(&event) <= 0 ) if ( SDL_PollEvent(&event) <= 0 )
break; break;
if ( event.type == SDL_EVENT_KEY_DOWN || event.type == SDL_EVENT_KEY_UP ) if ( event.type == SDL_EVENT_KEY_DOWN || event.type == SDL_EVENT_KEY_UP )
{ {
DWORD dwVK = 0; DWORD dwVK = 0;
@@ -1103,15 +1103,15 @@ bool CGameEngineGL::BGetFirstKeyDown( DWORD *pdwVK )
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
HGAMEVOICECHANNEL CGameEngineGL::HCreateVoiceChannel() HGAMEVOICECHANNEL CGameEngineGL::HCreateVoiceChannel()
{ {
m_unVoiceChannelCount++; m_unVoiceChannelCount++;
CVoiceContext* pVoiceContext = new CVoiceContext; CVoiceContext* pVoiceContext = new CVoiceContext;
m_MapVoiceChannel[m_unVoiceChannelCount] = pVoiceContext; m_MapVoiceChannel[m_unVoiceChannelCount] = pVoiceContext;
return m_unVoiceChannelCount; return m_unVoiceChannelCount;
} }
@@ -1127,27 +1127,27 @@ void CGameEngineGL::RunAudio()
ALint nQueued, nProcessed; ALint nQueued, nProcessed;
alGetSourcei( pVoice->m_nSource, AL_BUFFERS_QUEUED, &nQueued ); alGetSourcei( pVoice->m_nSource, AL_BUFFERS_QUEUED, &nQueued );
alGetSourcei( pVoice->m_nSource, AL_BUFFERS_PROCESSED, &nProcessed ); alGetSourcei( pVoice->m_nSource, AL_BUFFERS_PROCESSED, &nProcessed );
if ( ( nQueued == nBufferCount ) && ( nProcessed == 0 ) ) if ( ( nQueued == nBufferCount ) && ( nProcessed == 0 ) )
{ // No room at the inn { // No room at the inn
continue; continue;
} }
ALuint nBufferID; ALuint nBufferID;
for ( int i = 0; i < nProcessed; i++ ) for ( int i = 0; i < nProcessed; i++ )
alSourceUnqueueBuffers( pVoice->m_nSource, 1, &nBufferID ); alSourceUnqueueBuffers( pVoice->m_nSource, 1, &nBufferID );
int nMaxToQueue = nBufferCount - nQueued + nProcessed; int nMaxToQueue = nBufferCount - nQueued + nProcessed;
bool bQueued = false; bool bQueued = false;
while ( nMaxToQueue && !pVoice->m_pending.empty() ) while ( nMaxToQueue && !pVoice->m_pending.empty() )
{ {
Packet_t &packet = pVoice->m_pending.front(); Packet_t &packet = pVoice->m_pending.front();
nBufferID = pVoice->m_buffers[ pVoice->m_nNextFreeBuffer ]; nBufferID = pVoice->m_buffers[ pVoice->m_nNextFreeBuffer ];
alBufferData( nBufferID, AL_FORMAT_MONO16, packet.pData, packet.unSize, VOICE_OUTPUT_SAMPLE_RATE_IDEAL ); alBufferData( nBufferID, AL_FORMAT_MONO16, packet.pData, packet.unSize, VOICE_OUTPUT_SAMPLE_RATE_IDEAL );
pVoice->m_nNextFreeBuffer = (pVoice->m_nNextFreeBuffer + 1 ) % nBufferCount; pVoice->m_nNextFreeBuffer = (pVoice->m_nNextFreeBuffer + 1 ) % nBufferCount;
alSourceQueueBuffers( pVoice->m_nSource, 1, &nBufferID); alSourceQueueBuffers( pVoice->m_nSource, 1, &nBufferID);
nMaxToQueue--; nMaxToQueue--;
@@ -1155,7 +1155,7 @@ void CGameEngineGL::RunAudio()
pVoice->m_pending.pop(); pVoice->m_pending.pop();
bQueued = true; bQueued = true;
} }
if ( bQueued && ( (nQueued-nProcessed) == 0 ) ) if ( bQueued && ( (nQueued-nProcessed) == 0 ) )
{ {
alSourcePlay( pVoice->m_nSource ); alSourcePlay( pVoice->m_nSource );
@@ -1165,7 +1165,7 @@ void CGameEngineGL::RunAudio()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CGameEngineGL::DestroyVoiceChannel( HGAMEVOICECHANNEL hChannel ) void CGameEngineGL::DestroyVoiceChannel( HGAMEVOICECHANNEL hChannel )
{ {
@@ -1174,7 +1174,7 @@ void CGameEngineGL::DestroyVoiceChannel( HGAMEVOICECHANNEL hChannel )
if ( iter != m_MapVoiceChannel.end() ) if ( iter != m_MapVoiceChannel.end() )
{ {
CVoiceContext* pVoiceContext = iter->second; CVoiceContext* pVoiceContext = iter->second;
// free outstanding voice packets // free outstanding voice packets
while( !pVoiceContext->m_pending.empty() ) while( !pVoiceContext->m_pending.empty() )
@@ -1221,7 +1221,7 @@ bool CGameEngineGL::BIsSteamInputDeviceActive( )
{ {
return true; return true;
} }
return false; return false;
} }
@@ -1263,7 +1263,7 @@ void CGameEngineGL::FindActiveSteamInputDevice( )
// a controller disconnecting and a different one reconnecting. Handles are guaranteed to be unique for // a controller disconnecting and a different one reconnecting. Handles are guaranteed to be unique for
// a given controller, even across power cycles. // a given controller, even across power cycles.
// See how many Steam Controllers are active. // See how many Steam Controllers are active.
ControllerHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT]; ControllerHandle_t pHandles[STEAM_CONTROLLER_MAX_COUNT];
int nNumActive = SteamInput()->GetConnectedControllers( pHandles ); int nNumActive = SteamInput()->GetConnectedControllers( pHandles );
@@ -1387,7 +1387,7 @@ bool CGameEngineGL::BIsControllerActionActive( ECONTROLLERDIGITALACTION dwAction
// Actions are only 'active' when they're assigned to a control in an action set, and that action set is active. // Actions are only 'active' when they're assigned to a control in an action set, and that action set is active.
if ( digitalData.bActive ) if ( digitalData.bActive )
return digitalData.bState; return digitalData.bState;
return false; return false;
} }
@@ -7,6 +7,7 @@
"SetLive" "AlphaTest" // set this build live on beta branch AlphaTest "SetLive" "AlphaTest" // set this build live on beta branch AlphaTest
"ContentRoot" "..\content\" // content root folder relative to this script file "ContentRoot" "..\content\" // content root folder relative to this script file
"BuildOutput" "D:\build_output\" // put build cache and log files on different drive for better performance "BuildOutput" "D:\build_output\" // put build cache and log files on different drive for better performance
"verbose" "0" // spew more build details in console
"Depots" "Depots"
{ {
// file mapping instructions for each depot are in separate script files // file mapping instructions for each depot are in separate script files
@@ -2,6 +2,8 @@
{ {
"AppID" "1000" // your AppID "AppID" "1000" // your AppID
"Desc" "This is a simple build script" // internal description for this build "Desc" "This is a simple build script" // internal description for this build
"verbose" "0" // spew more build details in console
"preview" "0" // make this a preview build only, nothing is uploaded
"ContentRoot" "..\content\" // root content folder, relative to location of this file "ContentRoot" "..\content\" // root content folder, relative to location of this file
"BuildOutput" "..\output\" // build output folder for build logs and build cache files "BuildOutput" "..\output\" // build output folder for build logs and build cache files