mirror of
https://github.com/rlabrecque/SteamworksSDK.git
synced 2026-10-10 09:33:04 +08:00
v1.04
This commit is contained in:
+36
@@ -13,6 +13,42 @@ website at: http://partner.steamgames.com
|
||||
|
||||
Revision History:
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.04 9th Mar 2009
|
||||
----------------------------------------------------------------
|
||||
|
||||
Added Peer To Peer Multi-Player Authentication/Authorization:
|
||||
* Allows each peer to verify the unique identity of the peers ( by steam account id ) in their game and determine if that user is allowed access to the game.
|
||||
* Added to the ISteamUser interface: GetAuthSessionTicket(), BeginAuthSession(), EndAuthSession() and CancelAuthTicket()
|
||||
* Additional information can be found in the API Overview on the Steamworks site
|
||||
|
||||
Added support for purchasing downloadable content in game:
|
||||
* Added ISteamApps::BIsDlcInstalled() and the DlcInstalled_t callback, which enable a game to check if downloadable content is owned and installed
|
||||
* Added ISteamFriends::ActivateGameOverlayToStore(), which opens the Steam game overlay to the store page for an appID (can be a game or DLC)
|
||||
|
||||
Gold Master Creation:
|
||||
* It is no longer optional to encrypt depots on a GM
|
||||
* The GM configuration file now supports an included_depots key, which along with the excluded_depots key, allows you to specify exactly which depots are placed on a GM
|
||||
* Simplified the configuration process for the setup application
|
||||
* The documentation for creating a Gold Master has been rewritten and extended. See the Steamworks site for more information.
|
||||
|
||||
Added Leaderboards:
|
||||
* 10k+ leaderboards can now be created programmatically per game, and queried globally or compared to friends
|
||||
* Added to ISteamUserStats interface
|
||||
* See SteamworksExample for a usage example
|
||||
|
||||
Other:
|
||||
* Added SteamShutdown_t callback, which will alert the game when Steam wants to shut down
|
||||
* Added ISteamUtils::IsOverlayEnabled(), which can be used to detect if the user has disabled the overlay in the Steam settings
|
||||
* Added ISteamUserStats::ResetAllStats(), which can be used to reset all stats (and optionally achievements) for a user
|
||||
* Moved SetWarningMessageHook() from ISteamClient to ISteamUtils
|
||||
* Added SteamAPI_SetTryCatchCallbacks, sets whether or not Steam_RunCallbacks() should do a try {} catch (...) {} around calls to issuing callbacks
|
||||
* In CCallResult callback, CCallResult::IsActive() will return false and can now reset the CCallResult
|
||||
* Added support for zero-size depots
|
||||
* Properly strip illegal characters from depot names
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.03 16th Jan 2009
|
||||
----------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
//========= Copyright © 1996-2009, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: Class for tracking leaderboards
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "leaderboards.h"
|
||||
#include <math.h>
|
||||
#include "steam/isteamuserstats.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Menu that shows a leaderboard
|
||||
//-----------------------------------------------------------------------------
|
||||
class CLeaderboardMenu : public CBaseMenu<LeaderboardMenuItem_t>
|
||||
{
|
||||
static const int k_nMaxLeaderboardEntries = 10; // maximum number of leaderboard entries we can display
|
||||
LeaderboardEntry_t m_leaderboardEntries[k_nMaxLeaderboardEntries]; // leaderboard entries we received from DownloadLeaderboardEntries
|
||||
int m_nLeaderboardEntries; // number of leaderboard entries we received
|
||||
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard we are displaying
|
||||
ELeaderboardDataRequest m_eLeaderboardData; // type of data we are displaying
|
||||
bool m_bLoading; // waiting to receive leaderboard results
|
||||
bool m_bIOFailure; // last attempt to retrieve the leaderboard failed
|
||||
|
||||
CCallResult<CLeaderboardMenu, LeaderboardScoresDownloaded_t> m_callResultDownloadEntries;
|
||||
|
||||
public:
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CLeaderboardMenu( CGameEngine *pGameEngine ) : CBaseMenu<LeaderboardMenuItem_t>( pGameEngine )
|
||||
{
|
||||
m_hSteamLeaderboard = 0;
|
||||
m_nLeaderboardEntries = 0;
|
||||
m_bLoading = false;
|
||||
m_bIOFailure = false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Menu that shows a leaderboard
|
||||
//-----------------------------------------------------------------------------
|
||||
void ShowLeaderboard( SteamLeaderboard_t hLeaderboard, ELeaderboardDataRequest eLeaderboardData, int offset )
|
||||
{
|
||||
m_hSteamLeaderboard = hLeaderboard;
|
||||
m_eLeaderboardData = eLeaderboardData;
|
||||
m_bLoading = true;
|
||||
m_bIOFailure = false;
|
||||
|
||||
if ( hLeaderboard )
|
||||
{
|
||||
// load the specified leaderboard data. We only display k_nMaxLeaderboardEntries entries at a time
|
||||
SteamAPICall_t hSteamAPICall = SteamUserStats()->DownloadLeaderboardEntries( hLeaderboard, eLeaderboardData,
|
||||
offset, offset + k_nMaxLeaderboardEntries );
|
||||
|
||||
// Register for the async callback
|
||||
m_callResultDownloadEntries.Set( hSteamAPICall, this, &CLeaderboardMenu::OnLeaderboardDownloadedEntries );
|
||||
}
|
||||
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Creates leaderboard menu
|
||||
//-----------------------------------------------------------------------------
|
||||
void Rebuild()
|
||||
{
|
||||
PushSelectedItem();
|
||||
ClearMenuItems();
|
||||
|
||||
LeaderboardMenuItem_t menuItemEmpty = { 0 };
|
||||
LeaderboardMenuItem_t menuItemBack = { true, false };
|
||||
LeaderboardMenuItem_t menuItemNextLeaderboard = { false, true };
|
||||
|
||||
if ( m_hSteamLeaderboard )
|
||||
{
|
||||
// create a header for the leaderboard
|
||||
|
||||
std::string strName = "Leaderboard: ";
|
||||
strName += SteamUserStats()->GetLeaderboardName( m_hSteamLeaderboard );
|
||||
|
||||
if ( m_eLeaderboardData == k_ELeaderboardDataRequestGlobal )
|
||||
strName += ", Top 10";
|
||||
else if ( m_eLeaderboardData == k_ELeaderboardDataRequestGlobalAroundUser )
|
||||
strName += ", Around User";
|
||||
else if ( m_eLeaderboardData == k_ELeaderboardDataRequestFriends )
|
||||
strName += ", Friends of User";
|
||||
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( strName, menuItemEmpty ) );
|
||||
}
|
||||
|
||||
// create leaderboard
|
||||
if ( !m_hSteamLeaderboard || m_bLoading )
|
||||
{
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( "Loading...", menuItemEmpty ) );
|
||||
}
|
||||
else if ( m_bIOFailure )
|
||||
{
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( "Network failure!", menuItemEmpty ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_nLeaderboardEntries == 0 )
|
||||
{
|
||||
// Requesting for global scores around the user will return successfully with 0 results if the
|
||||
// user does not have an entry on the leaderboard
|
||||
|
||||
std::string strText;
|
||||
if ( m_eLeaderboardData != k_ELeaderboardDataRequestGlobalAroundUser )
|
||||
{
|
||||
strText = "No scores for this leaderboard";
|
||||
}
|
||||
else
|
||||
{
|
||||
strText = SteamFriends()->GetPersonaName();
|
||||
strText += " does not have a score for this leaderboard";
|
||||
}
|
||||
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( strText, menuItemEmpty ) );
|
||||
}
|
||||
|
||||
for ( int index = 0; index < m_nLeaderboardEntries; index++ )
|
||||
{
|
||||
char rgchMenuText[256];
|
||||
const char *pchName = SteamFriends()->GetFriendPersonaName( m_leaderboardEntries[index].m_steamIDUser );
|
||||
_snprintf( rgchMenuText, sizeof( rgchMenuText ), "(%d) %s - %d", m_leaderboardEntries[index].m_nGlobalRank,
|
||||
pchName, m_leaderboardEntries[index].m_nScore );
|
||||
|
||||
AddMenuItem( MenuItem_t( std::string( rgchMenuText ), menuItemEmpty ) );
|
||||
}
|
||||
}
|
||||
|
||||
// navigation buttons
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( "Next leaderboard", menuItemNextLeaderboard ) );
|
||||
AddMenuItem( CLeaderboardMenu::MenuItem_t( "Return to main menu", menuItemBack ) );
|
||||
|
||||
PopSelectedItem();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when SteamUserStats()->DownloadLeaderboardEntries() returns asynchronously
|
||||
//-----------------------------------------------------------------------------
|
||||
void OnLeaderboardDownloadedEntries( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded, bool bIOFailure )
|
||||
{
|
||||
m_bLoading = false;
|
||||
m_bIOFailure = bIOFailure;
|
||||
|
||||
// leaderboard entries handle will be invalid once we return from this function. Copy all data now.
|
||||
m_nLeaderboardEntries = min( pLeaderboardScoresDownloaded->m_cEntryCount, k_nMaxLeaderboardEntries );
|
||||
for ( int index = 0; index < m_nLeaderboardEntries; index++ )
|
||||
{
|
||||
SteamUserStats()->GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries,
|
||||
index, &m_leaderboardEntries[ index ], NULL, 0 );
|
||||
}
|
||||
|
||||
// show our new data
|
||||
Rebuild();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CLeaderboards::CLeaderboards( CGameEngine *pGameEngine ) : m_pGameEngine( pGameEngine )
|
||||
{
|
||||
m_hQuickestWinLeaderboard = 0;
|
||||
m_hFeetTraveledLeaderboard = 0;
|
||||
m_nCurrentLeaderboard = 0;
|
||||
|
||||
m_pLeaderboardMenu = new CLeaderboardMenu( pGameEngine );
|
||||
m_bLoading = false;
|
||||
|
||||
FindLeaderboards();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Run a frame for the CLeaderboards
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::RunFrame()
|
||||
{
|
||||
m_pLeaderboardMenu->RunFrame();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Handles menu actions when viewing a leaderboard
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::OnMenuSelection( LeaderboardMenuItem_t selection )
|
||||
{
|
||||
if ( selection.m_bBack )
|
||||
{
|
||||
SpaceWarClient()->SetGameState( k_EClientGameMenu );
|
||||
}
|
||||
else if ( selection.m_bNextLeaderboard )
|
||||
{
|
||||
m_nCurrentLeaderboard = ++m_nCurrentLeaderboard % 2;
|
||||
Show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Shows / Refreshes the leaderboard
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::Show()
|
||||
{
|
||||
if ( m_nCurrentLeaderboard == 0 )
|
||||
{
|
||||
// we want to show the top 10. To do so, we request global score data beginning at 0
|
||||
m_pLeaderboardMenu->ShowLeaderboard( m_hQuickestWinLeaderboard, k_ELeaderboardDataRequestGlobal, 0 );
|
||||
}
|
||||
else if ( m_nCurrentLeaderboard == 1 )
|
||||
{
|
||||
// we want to show the 10 users around us
|
||||
m_pLeaderboardMenu->ShowLeaderboard( m_hFeetTraveledLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -5 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Gets handles for our leaderboards. If the leaderboards don't exist, creates them.
|
||||
// Each time this is called, we look up another leaderboard.
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::FindLeaderboards()
|
||||
{
|
||||
if ( m_bLoading )
|
||||
return;
|
||||
|
||||
SteamAPICall_t hSteamAPICall = 0;
|
||||
|
||||
if ( !m_hQuickestWinLeaderboard )
|
||||
{
|
||||
// find/create a leaderboard for the quickest win
|
||||
hSteamAPICall = SteamUserStats()->FindOrCreateLeaderboard( LEADERBOARD_QUICKEST_WIN,
|
||||
k_ELeaderboardSortMethodAscending, k_ELeaderboardDisplayTypeTimeSeconds );
|
||||
}
|
||||
else if ( !m_hFeetTraveledLeaderboard )
|
||||
{
|
||||
// find/create a leaderboard for the most feet traveled in 1 round
|
||||
hSteamAPICall = SteamUserStats()->FindOrCreateLeaderboard( LEADERBOARD_FEET_TRAVELED,
|
||||
k_ELeaderboardSortMethodDescending, k_ELeaderboardDisplayTypeNumeric );
|
||||
}
|
||||
|
||||
if ( hSteamAPICall != 0 )
|
||||
{
|
||||
// set the function to call when this API call has completed
|
||||
m_SteamCallResultCreateLeaderboard.Set( hSteamAPICall, this, &CLeaderboards::OnFindLeaderboard );
|
||||
m_bLoading = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when SteamUserStats()->FindOrCreateLeaderboard() returns asynchronously
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::OnFindLeaderboard( LeaderboardFindResult_t *pFindLeaderboardResult, bool bIOFailure )
|
||||
{
|
||||
m_bLoading = false;
|
||||
|
||||
// see if we encountered an error during the call
|
||||
if ( !pFindLeaderboardResult->m_bLeaderboardFound || bIOFailure )
|
||||
return;
|
||||
|
||||
// check to see which leaderboard handle we just retrieved
|
||||
const char *pchName = SteamUserStats()->GetLeaderboardName( pFindLeaderboardResult->m_hSteamLeaderboard );
|
||||
if ( strcmp( pchName, LEADERBOARD_QUICKEST_WIN ) == 0 )
|
||||
m_hQuickestWinLeaderboard = pFindLeaderboardResult->m_hSteamLeaderboard;
|
||||
else if ( strcmp( pchName, LEADERBOARD_FEET_TRAVELED ) == 0 )
|
||||
m_hFeetTraveledLeaderboard = pFindLeaderboardResult->m_hSteamLeaderboard;
|
||||
|
||||
// look up any other leaderboards
|
||||
FindLeaderboards();
|
||||
|
||||
// if the user is currently looking at a leaderboard, it might be one we didn't have a handle for yet. Update the leaderboard.
|
||||
if ( SpaceWarClient()->GetGameState() == k_EClientLeaderboards )
|
||||
Show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Updates leaderboards with stats from our just finished game
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::UpdateLeaderboards( CStatsAndAchievements *pStats )
|
||||
{
|
||||
// if the user won, update the leaderboard with the time it took. If the user's previous time was faster, this time will be thrown out.
|
||||
if ( m_hQuickestWinLeaderboard && SpaceWarClient()->BLocalPlayerWonLastGame() )
|
||||
{
|
||||
SteamAPICall_t hSteamAPICall = SteamUserStats()->UploadLeaderboardScore( m_hQuickestWinLeaderboard, (int)pStats->GetGameDurationSeconds(), NULL, 0 );
|
||||
m_SteamCallResultUploadScore.Set( hSteamAPICall, this, &CLeaderboards::OnUploadScore );
|
||||
}
|
||||
|
||||
// update the leaderboard for the most feet traveled in 1 round. If the user previously traveled farther in a round than this one,
|
||||
// this value will be thrown out
|
||||
if ( m_hFeetTraveledLeaderboard )
|
||||
{
|
||||
SteamUserStats()->UploadLeaderboardScore( m_hFeetTraveledLeaderboard, (int)pStats->GetGameFeetTraveled(), NULL, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Called when SteamUserStats()->UploadLeaderboardScore() returns asynchronously
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLeaderboards::OnUploadScore( LeaderboardScoreUploaded_t *pScoreUploadedResult, bool bIOFailure )
|
||||
{
|
||||
if ( !pScoreUploadedResult->m_bSuccess )
|
||||
{
|
||||
// error
|
||||
}
|
||||
|
||||
if ( pScoreUploadedResult->m_bScoreChanged )
|
||||
{
|
||||
// could display new rank
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//========= Copyright © 1996-2009, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: Class for tracking leaderboards
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef LEADERBOARDS_H
|
||||
#define LEADERBOARDS_H
|
||||
|
||||
#include "SpaceWar.h"
|
||||
#include "GameEngine.h"
|
||||
#include "steam/isteamuserstats.h"
|
||||
#include "StatsAndAchievements.h"
|
||||
#include "SpaceWarClient.h"
|
||||
|
||||
|
||||
class ISteamUser;
|
||||
class CSpaceWarClient;
|
||||
class CLeaderboardMenu;
|
||||
|
||||
class CLeaderboards
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
CLeaderboards( CGameEngine *pGameEngine );
|
||||
|
||||
// Run a frame
|
||||
void RunFrame();
|
||||
|
||||
// shows / refreshes leaderboard
|
||||
void Show();
|
||||
|
||||
// Updates leaderboards with stats from our just finished game
|
||||
void UpdateLeaderboards( CStatsAndAchievements *pStats );
|
||||
|
||||
// handles input from leaderboard menu
|
||||
void OnMenuSelection( LeaderboardMenuItem_t selection );
|
||||
|
||||
private:
|
||||
void FindLeaderboards();
|
||||
|
||||
// Engine
|
||||
CGameEngine *m_pGameEngine;
|
||||
|
||||
// Called when SteamUserStats()->FindOrCreateLeaderboard() returns asynchronously
|
||||
void OnFindLeaderboard( LeaderboardFindResult_t *pFindLearderboardResult, bool bIOFailure );
|
||||
CCallResult<CLeaderboards, LeaderboardFindResult_t> m_SteamCallResultCreateLeaderboard;
|
||||
|
||||
// Called when SteamUserStats()->UploadLeaderboardScore() returns asynchronously
|
||||
void OnUploadScore( LeaderboardScoreUploaded_t *pFindLearderboardResult, bool bIOFailure );
|
||||
CCallResult<CLeaderboards, LeaderboardScoreUploaded_t> m_SteamCallResultUploadScore;
|
||||
|
||||
// handles to our leaderboards
|
||||
SteamLeaderboard_t m_hQuickestWinLeaderboard;
|
||||
SteamLeaderboard_t m_hFeetTraveledLeaderboard;
|
||||
int m_bLoading; // true if we looking up a leaderboard handle
|
||||
|
||||
|
||||
CLeaderboardMenu *m_pLeaderboardMenu; // Displays the current leaderboard
|
||||
int m_nCurrentLeaderboard; // Index for leaderboard the user is currently viewing
|
||||
|
||||
};
|
||||
|
||||
#endif // LEADERBOARDS_H
|
||||
@@ -56,8 +56,12 @@ public:
|
||||
AddMenuItem( CLobbyMenu::MenuItem_t( "Set myself as Ready", menuItem ) );
|
||||
}
|
||||
|
||||
// bugbug taylor make it so we can find out who the lobby owner is
|
||||
bool bLobbyOwner = true;
|
||||
// see if the local user is the owner of this lobby
|
||||
bool bLobbyOwner = false;
|
||||
if ( SteamUser()->GetSteamID() == SteamMatchmaking()->GetLobbyOwner( steamIDLobby ) )
|
||||
{
|
||||
bLobbyOwner = true;
|
||||
}
|
||||
|
||||
// start game
|
||||
if ( bLobbyOwner )
|
||||
|
||||
@@ -22,6 +22,7 @@ CMainMenu::CMainMenu( CGameEngine *pGameEngine ) : CBaseMenu<EClientGameState>(
|
||||
AddMenuItem( MenuItem_t( "Find Lobby", k_EClientFindLobby ) );
|
||||
AddMenuItem( MenuItem_t( "Instructions", k_EClientGameInstructions ) );
|
||||
AddMenuItem( MenuItem_t( "Stats and Achievements", k_EClientStatsAchievements ) );
|
||||
AddMenuItem( MenuItem_t( "Leaderboards", k_EClientLeaderboards ) );
|
||||
AddMenuItem( MenuItem_t( "Remote Storage", k_EClientRemoteStorage ) );
|
||||
AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) );
|
||||
}
|
||||
@@ -77,6 +77,11 @@
|
||||
#define MAX_CLIENT_AND_SERVER_FPS 86
|
||||
|
||||
|
||||
// Leaderboard names
|
||||
#define LEADERBOARD_QUICKEST_WIN "Quickest Win"
|
||||
#define LEADERBOARD_FEET_TRAVELED "Feet Traveled"
|
||||
|
||||
|
||||
// Player colors
|
||||
DWORD const g_rgPlayerColors[ MAX_PLAYERS_PER_SERVER ] =
|
||||
{
|
||||
@@ -109,6 +114,7 @@ enum EClientGameState
|
||||
k_EClientJoiningLobby,
|
||||
k_EClientFindLANServers,
|
||||
k_EClientRemoteStorage,
|
||||
k_EClientLeaderboards,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "stdlib.h"
|
||||
#include "time.h"
|
||||
#include "ServerBrowser.h"
|
||||
#include "Leaderboards.h"
|
||||
#include "Lobby.h"
|
||||
|
||||
CSpaceWarClient *g_pSpaceWarClient = NULL;
|
||||
@@ -24,7 +25,9 @@ CSpaceWarClient* SpaceWarClient() { return g_pSpaceWarClient; }
|
||||
CSpaceWarClient::CSpaceWarClient( CGameEngine *pGameEngine, CSteamID steamIDUser ) :
|
||||
m_SocketStatusCallback( this, &CSpaceWarClient::OnSocketStatusCallback ),
|
||||
m_LobbyGameCreated( this, &CSpaceWarClient::OnLobbyGameCreated ),
|
||||
m_IPCFailureCallback( this, &CSpaceWarClient::OnIPCFailure )
|
||||
m_IPCFailureCallback( this, &CSpaceWarClient::OnIPCFailure ),
|
||||
m_SteamShutdownCallback( this, &CSpaceWarClient::OnSteamShutdown )
|
||||
|
||||
{
|
||||
g_pSpaceWarClient = this;
|
||||
m_pGameEngine = pGameEngine;
|
||||
@@ -78,6 +81,7 @@ CSpaceWarClient::CSpaceWarClient( CGameEngine *pGameEngine, CSteamID steamIDUser
|
||||
|
||||
// Init stats
|
||||
m_pStatsAndAchievements = new CStatsAndAchievements( pGameEngine );
|
||||
m_pLeaderboards = new CLeaderboards( pGameEngine );
|
||||
|
||||
// Remote Storage page
|
||||
m_pRemoteStorage = new CRemoteStorage( pGameEngine );
|
||||
@@ -668,6 +672,15 @@ void CSpaceWarClient::OnMenuSelection( LobbyMenuItem_t selection )
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Handles menu actions when viewing a leaderboard
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarClient::OnMenuSelection( LeaderboardMenuItem_t selection )
|
||||
{
|
||||
m_pLeaderboards->OnMenuSelection( selection );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: does work on transitioning from one game state to another
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -711,6 +724,16 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
|
||||
m_pServer = NULL;
|
||||
}
|
||||
}
|
||||
else if ( m_eGameState == k_EClientGameWinner || m_eGameState == k_EClientGameDraw )
|
||||
{
|
||||
// game over.. update the leaderboard
|
||||
m_pLeaderboards->UpdateLeaderboards( m_pStatsAndAchievements );
|
||||
}
|
||||
else if ( m_eGameState == k_EClientLeaderboards )
|
||||
{
|
||||
// we've switched to the leaderboard menu
|
||||
m_pLeaderboards->Show();
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -730,6 +753,22 @@ void CSpaceWarClient::OnIPCFailure( IPCFailure_t *failure )
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Handles notification of a Steam shutdown request since a Windows
|
||||
// user in a second concurrent session requests to play this game. Shutdown
|
||||
// this process immediately if possible.
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarClient::OnSteamShutdown( SteamShutdown_t *callback )
|
||||
{
|
||||
static bool bExiting = false;
|
||||
if ( !bExiting )
|
||||
{
|
||||
OutputDebugString( "Steam shutdown request, shutting down\n" );
|
||||
m_pGameEngine->Shutdown();
|
||||
bExiting = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Main frame function, updates the state of the world and performs rendering
|
||||
@@ -881,6 +920,14 @@ void CSpaceWarClient::RunFrame()
|
||||
if ( bEscapePressed )
|
||||
SetGameState( k_EClientGameMenu );
|
||||
break;
|
||||
case k_EClientLeaderboards:
|
||||
m_pStarField->Render();
|
||||
m_pLeaderboards->RunFrame();
|
||||
|
||||
if ( bEscapePressed )
|
||||
SetGameState( k_EClientGameMenu );
|
||||
break;
|
||||
|
||||
case k_EClientRemoteStorage:
|
||||
m_pStarField->Render();
|
||||
m_pRemoteStorage->Render();
|
||||
|
||||
@@ -27,6 +27,7 @@ class CSpaceWarServer;
|
||||
class CServerBrowser;
|
||||
class CLobbyBrowser;
|
||||
class CLobby;
|
||||
class CLeaderboards;
|
||||
|
||||
// Height of the HUD font
|
||||
#define HUD_FONT_HEIGHT 18
|
||||
@@ -66,6 +67,13 @@ struct LobbyMenuItem_t
|
||||
bool m_bLeaveLobby;
|
||||
};
|
||||
|
||||
// a leaderboard item
|
||||
struct LeaderboardMenuItem_t
|
||||
{
|
||||
bool m_bBack;
|
||||
bool m_bNextLeaderboard;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CSpaceWarClient
|
||||
@@ -120,6 +128,7 @@ public:
|
||||
}
|
||||
|
||||
void OnMenuSelection( LobbyMenuItem_t selection );
|
||||
void OnMenuSelection( LeaderboardMenuItem_t selection );
|
||||
|
||||
// Set game state
|
||||
void SetGameState( EClientGameState eState );
|
||||
@@ -256,6 +265,8 @@ private:
|
||||
|
||||
CStatsAndAchievements *m_pStatsAndAchievements;
|
||||
|
||||
CLeaderboards *m_pLeaderboards;
|
||||
|
||||
CServerBrowser *m_pServerBrowser;
|
||||
|
||||
CRemoteStorage *m_pRemoteStorage;
|
||||
@@ -284,6 +295,9 @@ private:
|
||||
|
||||
// ipc failure handler
|
||||
STEAM_CALLBACK( CSpaceWarClient, OnIPCFailure, IPCFailure_t, m_IPCFailureCallback );
|
||||
|
||||
// Steam wants to shut down, Game for Windows applications should shutdown too
|
||||
STEAM_CALLBACK( CSpaceWarClient, OnSteamShutdown, SteamShutdown_t, m_SteamShutdownCallback );
|
||||
};
|
||||
|
||||
extern CSpaceWarClient *g_pSpaceWarClient;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Header File for : SpaceWar
|
||||
#define ID_ICON 101
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -52,6 +52,10 @@ public:
|
||||
// Accumulators
|
||||
void AddDistanceTraveled( float flDistance );
|
||||
|
||||
// accessors
|
||||
float GetGameFeetTraveled() { return m_flGameFeetTraveled; }
|
||||
double GetGameDurationSeconds() { return m_flGameDurationSeconds; }
|
||||
|
||||
STEAM_CALLBACK( CStatsAndAchievements, OnUserStatsReceived, UserStatsReceived_t, m_CallbackUserStatsReceived );
|
||||
STEAM_CALLBACK( CStatsAndAchievements, OnUserStatsStored, UserStatsStored_t, m_CallbackUserStatsStored );
|
||||
STEAM_CALLBACK( CStatsAndAchievements, OnAchievementStored, UserAchievementStored_t, m_CallbackAchievementStored );
|
||||
|
||||
@@ -214,6 +214,10 @@
|
||||
RelativePath=".\BaseMenu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Leaderboards.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lobby.cpp"
|
||||
>
|
||||
@@ -296,6 +300,10 @@
|
||||
RelativePath=".\BaseMenu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Leaderboards.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Lobby.h"
|
||||
>
|
||||
|
||||
@@ -24,3 +24,9 @@ SdkContentServerAdrs = "127.0.0.1"
|
||||
# to an SDK content server.
|
||||
#
|
||||
ManifestFingerprintCheck = enable
|
||||
|
||||
|
||||
#
|
||||
# Tell Steam to only connect to your local CS when downloading
|
||||
#
|
||||
CacheServerSessions = 1
|
||||
|
||||
Binary file not shown.
@@ -25,8 +25,21 @@ public:
|
||||
|
||||
// only use this member if you need to check ownership of another game related to yours, a demo for example
|
||||
virtual bool BIsSubscribedApp( AppId_t appID ) = 0;
|
||||
|
||||
// Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed
|
||||
virtual bool BIsDlcInstalled( AppId_t appID ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION003"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DlcInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 5 };
|
||||
AppId_t m_nAppID; // AppID of the DLC
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION002"
|
||||
|
||||
#endif // ISTEAMAPPS_H
|
||||
|
||||
+14
-17
@@ -61,7 +61,7 @@ public:
|
||||
virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
|
||||
|
||||
// used by game servers, create a steam user that won't be shared with anyone else
|
||||
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe ) = 0;
|
||||
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0;
|
||||
|
||||
// removes an allocated user
|
||||
virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
|
||||
@@ -85,9 +85,6 @@ public:
|
||||
// returns the ISteamMatchmaking interface
|
||||
virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamContentServer interface
|
||||
virtual ISteamContentServer *GetISteamContentServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamMasterServerUpdater interface
|
||||
virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
@@ -97,6 +94,18 @@ public:
|
||||
// returns the a generic interface
|
||||
virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamUserStats interface
|
||||
virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns apps interface
|
||||
virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// networking
|
||||
virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// remote storage
|
||||
virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// this needs to be called every frame to process matchmaking results
|
||||
// redundant if you're already calling SteamAPI_RunCallbacks()
|
||||
virtual void RunFrame() = 0;
|
||||
@@ -107,27 +116,15 @@ public:
|
||||
// control how often you do them.
|
||||
virtual uint32 GetIPCCallCount() = 0;
|
||||
|
||||
// returns the ISteamUserStats interface
|
||||
virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns apps interface
|
||||
virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// networking
|
||||
virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// API warning handling
|
||||
// 'int' is the severity; 0 for msg, 1 for warning
|
||||
// 'const char *' is the text of the message
|
||||
// callbacks will occur directly after the API function is called that generated the warning or message
|
||||
virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
|
||||
|
||||
// remote storage
|
||||
virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient007"
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient008"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Base values for callback identifiers, each callback must
|
||||
|
||||
@@ -175,6 +175,9 @@ public:
|
||||
// activates game overlay web browser directly to the specified URL
|
||||
// full address with protocol type is required, e.g. http://www.steamgames.com/
|
||||
virtual void ActivateGameOverlayToWebPage( const char *pchURL ) = 0;
|
||||
|
||||
// activates game overlay to store page for app
|
||||
virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends005"
|
||||
|
||||
@@ -101,6 +101,7 @@ public:
|
||||
// behind NAT and you want to advertise its IP in a lobby for other clients to directly
|
||||
// connect to
|
||||
virtual uint32 GetPublicIP() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer008"
|
||||
|
||||
@@ -25,7 +25,6 @@ struct CallbackMsg_t
|
||||
// reference to a steam call, to filter results by
|
||||
typedef int32 HSteamCall;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing and manipulating a steam account
|
||||
// associated with one client instance
|
||||
@@ -92,9 +91,23 @@ public:
|
||||
// number of bytes written to pDestBuffer. The output format of the data is 16-bit signed at
|
||||
// 11025 samples per second.
|
||||
virtual EVoiceResult DecompressVoice( void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten ) = 0;
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you.
|
||||
// pcbTicket retrieves the length of the actual ticket.
|
||||
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
|
||||
|
||||
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
|
||||
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
|
||||
virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0;
|
||||
|
||||
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
|
||||
virtual void EndAuthSession( CSteamID steamID ) = 0;
|
||||
|
||||
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
|
||||
virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser011"
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser012"
|
||||
|
||||
|
||||
// callbacks
|
||||
@@ -169,4 +182,18 @@ struct IPCFailure_t
|
||||
uint8 m_eFailureType;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// callback for BeginAuthSession
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ValidateAuthTicketResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 43 };
|
||||
CSteamID m_SteamID;
|
||||
EAuthSessionResponse m_eAuthSessionResponse;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//====== Copyright © 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to user account information in Steam
|
||||
// Purpose: interface to stats, achievements, and leaderboards
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
@@ -12,9 +12,59 @@
|
||||
|
||||
#include "isteamclient.h"
|
||||
|
||||
// size limit on stat or achievement name
|
||||
const uint32 k_cchStatNameMax = 128;
|
||||
// size limit on stat or achievement name (UTF-8 encoded)
|
||||
enum { k_cchStatNameMax = 128 };
|
||||
|
||||
// maximum number of bytes for a leaderboard name (UTF-8 encoded)
|
||||
enum { k_cchLeaderboardNameMax = 128 };
|
||||
|
||||
// maximum number of details int32's storable for a single leaderboard entry
|
||||
enum { k_cLeaderboardDetailsMax = 64 };
|
||||
|
||||
// handle to a single leaderboard
|
||||
typedef uint64 SteamLeaderboard_t;
|
||||
|
||||
// handle to a set of downloaded entries in a leaderboard
|
||||
typedef uint64 SteamLeaderboardEntries_t;
|
||||
|
||||
// type of data request, when downloading leaderboard entries
|
||||
enum ELeaderboardDataRequest
|
||||
{
|
||||
k_ELeaderboardDataRequestGlobal = 0,
|
||||
k_ELeaderboardDataRequestGlobalAroundUser = 1,
|
||||
k_ELeaderboardDataRequestFriends = 2,
|
||||
};
|
||||
|
||||
// the sort order of a leaderboard
|
||||
enum ELeaderboardSortMethod
|
||||
{
|
||||
k_ELeaderboardSortMethodNone = 0,
|
||||
k_ELeaderboardSortMethodAscending = 1, // top-score is lowest number
|
||||
k_ELeaderboardSortMethodDescending = 2, // top-score is highest number
|
||||
};
|
||||
|
||||
// the display type (used by the Steam Community web site) for a leaderboard
|
||||
enum ELeaderboardDisplayType
|
||||
{
|
||||
k_ELeaderboardDisplayTypeNone = 0,
|
||||
k_ELeaderboardDisplayTypeNumeric = 1, // simple numerical score
|
||||
k_ELeaderboardDisplayTypeTimeSeconds = 2, // the score represents a time, in seconds
|
||||
k_ELeaderboardDisplayTypeTimeMilliSeconds = 3, // the score represents a time, in milliseconds
|
||||
};
|
||||
|
||||
// a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry()
|
||||
struct LeaderboardEntry_t
|
||||
{
|
||||
CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
|
||||
int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard
|
||||
int32 m_nScore; // score as set in the leaderboard
|
||||
int32 m_cDetails; // number of int32 details available for this entry
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUserStats
|
||||
{
|
||||
public:
|
||||
@@ -62,9 +112,67 @@ public:
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0;
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0;
|
||||
virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0;
|
||||
|
||||
// Reset stats
|
||||
virtual bool ResetAllStats( bool bAchievementsToo ) = 0;
|
||||
|
||||
// Leaderboard functions
|
||||
|
||||
// asks the Steam back-end for a leaderboard by name, and will create it if it's not yet
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0;
|
||||
|
||||
// as above, but won't create the leaderboard if it's not found
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0;
|
||||
|
||||
// returns the name of a leaderboard
|
||||
virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the total number of entries in a leaderboard, as of the last request
|
||||
virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the sort method of the leaderboard
|
||||
virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the display type of the leaderboard
|
||||
virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// Asks the Steam back-end for a set of rows in the leaderboard.
|
||||
// This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t
|
||||
// LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)
|
||||
// You can ask for more entries than exist, and it will return as many as do exist.
|
||||
// k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]
|
||||
// k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate
|
||||
// e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after
|
||||
// k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0;
|
||||
|
||||
// Returns data about a single leaderboard entry
|
||||
// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries
|
||||
// e.g.
|
||||
// void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )
|
||||
// {
|
||||
// for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )
|
||||
// {
|
||||
// LeaderboardEntry_t leaderboardEntry;
|
||||
// int32 details[3]; // we know this is how many we've stored previously
|
||||
// GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );
|
||||
// assert( leaderboardEntry.m_cDetails == 3 );
|
||||
// ...
|
||||
// }
|
||||
// once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid
|
||||
virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0;
|
||||
|
||||
// Uploads a user score to the Steam back-end.
|
||||
// This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t
|
||||
// If the score passed in is no better than the existing score this user has in the leaderboard, then the leaderboard will not be updated.
|
||||
// Details are extra game-defined information regarding how the user got that score
|
||||
// pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
|
||||
virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, int32 nScore, int32 *pScoreDetails, int cScoreDetailsCount ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION004"
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION005"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -108,4 +216,45 @@ struct UserAchievementStored_t
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardFindResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 4 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found
|
||||
uint8 m_bLeaderboardFound; // 0 if no leaderboard found
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoresDownloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 5 };
|
||||
SteamLeaderboard_t m_hSteamLeaderboard;
|
||||
SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries()
|
||||
int m_cEntryCount; // the number of entries downloaded
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore()
|
||||
// use CCallResult<> to map this async result to a member function
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LeaderboardScoreUploaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 6 };
|
||||
uint8 m_bSuccess; // 1 if the call was successful
|
||||
SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was
|
||||
int32 m_nScore; // the score that was attempted to set
|
||||
uint8 m_bScoreChanged; // true if the score in the leaderboard change, false if the existing score was better
|
||||
int m_nGlobalRankNew; // the new global rank of the user in this leaderboard
|
||||
int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMUSER_H
|
||||
|
||||
@@ -25,6 +25,11 @@ enum ESteamAPICallFailure
|
||||
k_ESteamAPICallFailureMismatchedCallback = 3,// GetAPICallResult() was called with the wrong callback type for this API call
|
||||
};
|
||||
|
||||
// function prototype for warning message hook
|
||||
#if defined( POSIX ) && !defined( _CYGWIN )
|
||||
#define __cdecl
|
||||
#endif
|
||||
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to user independent utility functions
|
||||
@@ -72,9 +77,29 @@ public:
|
||||
virtual bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, bool *pbFailed ) = 0;
|
||||
virtual ESteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) = 0;
|
||||
virtual bool GetAPICallResult( SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed ) = 0;
|
||||
|
||||
// this needs to be called every frame to process matchmaking results
|
||||
// redundant if you're already calling SteamAPI_RunCallbacks()
|
||||
virtual void RunFrame() = 0;
|
||||
|
||||
// returns the number of IPC calls made since the last time this function was called
|
||||
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
|
||||
// Every IPC call is at minimum a thread context switch if not a process one so you want to rate
|
||||
// control how often you do them.
|
||||
virtual uint32 GetIPCCallCount() = 0;
|
||||
|
||||
// API warning handling
|
||||
// 'int' is the severity; 0 for msg, 1 for warning
|
||||
// 'const char *' is the text of the message
|
||||
// callbacks will occur directly after the API function is called that generated the warning or message
|
||||
virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
|
||||
|
||||
// Returns true if the overlay is running & the user can access it. The overlay process could take a few seconds to
|
||||
// start & hook the game process, so this function will initially return false while the overlay is loading.
|
||||
virtual bool IsOverlayEnabled() = 0;
|
||||
};
|
||||
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils002"
|
||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils004"
|
||||
|
||||
|
||||
// callbacks
|
||||
@@ -109,6 +134,13 @@ struct SteamAPICallCompleted_t
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// called when Steam wants to shutdown
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamShutdown_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMUTILS_H
|
||||
|
||||
@@ -181,15 +181,15 @@ public:
|
||||
private:
|
||||
virtual void Run( void *pvParam )
|
||||
{
|
||||
(m_pObj->*m_Func)( (P *)pvParam, false );
|
||||
m_hAPICall = 0;
|
||||
(m_pObj->*m_Func)( (P *)pvParam, false );
|
||||
}
|
||||
void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
if ( hSteamAPICall == m_hAPICall )
|
||||
{
|
||||
(m_pObj->*m_Func)( (P *)pvParam, bIOFailure );
|
||||
m_hAPICall = 0;
|
||||
(m_pObj->*m_Func)( (P *)pvParam, bIOFailure );
|
||||
}
|
||||
}
|
||||
int GetCallbackSizeBytes()
|
||||
@@ -302,6 +302,13 @@ S_API const char *SteamAPI_GetSteamInstallPath();
|
||||
// returns the pipe we are communicating to Steam with
|
||||
S_API HSteamPipe SteamAPI_GetHSteamPipe();
|
||||
|
||||
// sets whether or not Steam_RunCallbacks() should do a try {} catch (...) {} around calls to issuing callbacks
|
||||
S_API void SteamAPI_SetTryCatchCallbacks( bool bTryCatchCallbacks );
|
||||
|
||||
// backwards compat export, passes through to SteamAPI_ variants
|
||||
S_API HSteamPipe GetHSteamPipe();
|
||||
S_API HSteamUser GetHSteamUser();
|
||||
|
||||
#ifdef VERSION_SAFE_STEAM_API_INTERFACES
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
// VERSION_SAFE_STEAM_API_INTERFACES uses CSteamAPIContext to provide interfaces to each module in a way that
|
||||
|
||||
@@ -68,6 +68,7 @@ enum EResult
|
||||
k_EResultIgnored = 41, // target is ignoring sender
|
||||
k_EResultNoMatch = 42, // nothing matching the request found
|
||||
k_EResultAccountDisabled = 43,
|
||||
k_EResultServiceReadOnly = 44, // this service is not accepting content changes right now
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
@@ -102,6 +103,36 @@ typedef enum
|
||||
k_EDenySteamOwnerLeftGuestUser = 15,
|
||||
} EDenyReason;
|
||||
|
||||
// return type of GetAuthSessionTicket
|
||||
typedef uint32 HAuthTicket;
|
||||
const HAuthTicket k_HAuthTicketInvalid = 0;
|
||||
|
||||
// results from BeginAuthSession
|
||||
typedef enum
|
||||
{
|
||||
k_EBeginAuthSessionResultOK = 0, // Ticket is valid for this game and this steamID.
|
||||
k_EBeginAuthSessionResultInvalidTicket = 1, // Ticket is not valid.
|
||||
k_EBeginAuthSessionResultDuplicateRequest = 2, // A ticket has already been submitted for this steamID
|
||||
k_EBeginAuthSessionResultInvalidVersion = 3, // Ticket is from an incompatible interface version
|
||||
k_EBeginAuthSessionResultGameMismatch = 4, // Ticket is not for this game
|
||||
k_EBeginAuthSessionResultExpiredTicket = 5, // Ticket has expired
|
||||
} EBeginAuthSessionResult;
|
||||
|
||||
// Callback values for callback ValidateAuthTicketResponse_t which is a response to BeginAuthSession
|
||||
typedef enum
|
||||
{
|
||||
k_EAuthSessionResponseOK = 0, // Steam has verified the user is online, the ticket is valid and ticket has not been reused.
|
||||
k_EAuthSessionResponseUserNotConnectedToSteam = 1, // The user in question is not connected to steam
|
||||
k_EAuthSessionResponseNoLicenseOrExpired = 2, // The license has expired.
|
||||
k_EAuthSessionResponseVACBanned = 3, // The user is VAC banned for this game.
|
||||
k_EAuthSessionResponseLoggedInElseWhere = 4, // The user account has logged in elsewhere and the session containing the game instance has been disconnected.
|
||||
k_EAuthSessionResponseVACCheckTimedOut = 5, // VAC has been unable to perform anti-cheat checks on this user
|
||||
k_EAuthSessionResponseAuthTicketCanceled = 6, // The ticket has been canceled by the issuer
|
||||
k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7, // This ticket has already been used, it is not valid.
|
||||
k_EAuthSessionResponseAuthTicketInvalid = 8, // This ticket is not from a user instance currently connected to steam.
|
||||
} EAuthSessionResponse;
|
||||
|
||||
|
||||
// Steam universes. Each universe is a self-contained Steam instance.
|
||||
enum EUniverse
|
||||
{
|
||||
@@ -491,7 +522,7 @@ public:
|
||||
EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; }
|
||||
EUniverse GetEUniverse() const { return m_steamid.m_comp.m_EUniverse; }
|
||||
void SetEUniverse( EUniverse eUniverse ) { m_steamid.m_comp.m_EUniverse = eUniverse; }
|
||||
bool IsValid() const { return ( m_steamid.m_comp.m_EAccountType != k_EAccountTypeInvalid && m_steamid.m_comp.m_EUniverse != k_EUniverseInvalid ); }
|
||||
bool IsValid() const;
|
||||
|
||||
// this set of functions is hidden, will be moved out of class
|
||||
explicit CSteamID( const char *pchSteamID, EUniverse eDefaultUniverse = k_EUniverseInvalid );
|
||||
@@ -532,6 +563,29 @@ private:
|
||||
} m_steamid;
|
||||
};
|
||||
|
||||
inline bool CSteamID::IsValid() const
|
||||
{
|
||||
if ( m_steamid.m_comp.m_EAccountType <= k_EAccountTypeInvalid || m_steamid.m_comp.m_EAccountType >= k_EAccountTypeMax )
|
||||
return false;
|
||||
|
||||
if ( m_steamid.m_comp.m_EUniverse <= k_EUniverseInvalid || m_steamid.m_comp.m_EUniverse >= k_EUniverseMax )
|
||||
return false;
|
||||
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 1 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeClan )
|
||||
{
|
||||
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != 0 )
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// generic invalid CSteamID
|
||||
const CSteamID k_steamIDNil;
|
||||
|
||||
@@ -738,7 +792,7 @@ public:
|
||||
return m_gameID.m_nAppID != k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000;
|
||||
break;
|
||||
case k_EGameIDTypeShortcut:
|
||||
return m_gameID.m_nAppID == k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000;
|
||||
return (m_gameID.m_nModID & 0x80000000) != 0;
|
||||
break;
|
||||
case k_EGameIDTypeP2P:
|
||||
return m_gameID.m_nAppID == k_uAppIdInvalid && m_gameID.m_nModID & 0x80000000;
|
||||
|
||||
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
"InstallScript"
|
||||
{
|
||||
"Run Process"
|
||||
{
|
||||
"VCRedist"
|
||||
{
|
||||
"process 1" "%INSTALLDIR%\\redist\\vcredist_x86.exe"
|
||||
"command 1" "/q:a"
|
||||
"NoCleanUp" "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
Steam Retail Setup File Overview:
|
||||
---------------------------------
|
||||
|
||||
root\Setup.exe :
|
||||
The main splash screen setup application launched when the customer inserts
|
||||
the disc. Setup detects the current installation state and displays a simple
|
||||
menu to install/play/reinstall or uninstall the game. Setup first loads
|
||||
setup_default.ini, then the setup_<language>.ini for the language chosen by
|
||||
the user, then all other resource files are loaded based on the current
|
||||
language configuration. Setup.exe itself does not require admin rights.
|
||||
|
||||
root\SteamService.exe :
|
||||
Helper application to run all additional 3rd party installers from a single
|
||||
elevated process under Vista. If you don't need to run 3rd party installers,
|
||||
this executable can be removed.
|
||||
|
||||
root\autorun.inf :
|
||||
Tells Windows to run Setup.exe when user inserts disc
|
||||
|
||||
root\splash.tga :
|
||||
Image displayed by Steam while installing files from disk (392x165 pixel)
|
||||
|
||||
root\resources\setup_default.ini :
|
||||
This is the first config file loaded by Setup regardless the chosen
|
||||
language. This file configures any language independent settings for this
|
||||
game like AppID or menu appearance. The syntax is "parameter" "value", a full
|
||||
list of configuration parameters is given later.
|
||||
|
||||
root\resources\setup_<language>.ini :
|
||||
These files configure Setup for the chosen language. The files are Unicode
|
||||
encoded. They are loaded after setup_default.ini and can override any
|
||||
configuration value for this language. Usually they don't need modification.
|
||||
Currently supported language names are: english, german, french, italian,
|
||||
korean, spanish, schinese, tchinese, russian, thai, japanese, portuguese,
|
||||
polish, danish, dutch, finnish, norwegian, swedish, hungarian, czech
|
||||
|
||||
root\resources\SteamInstall_<language>.msi :
|
||||
Steam MSIs that install Steam on the users machine. Can be removed if no
|
||||
matching setup_<language>.ini is provided.
|
||||
|
||||
root\resources\steam.inf :
|
||||
This file configures the Steam installer MSIs. Update the files GameName,
|
||||
RequiredSize and RequiredString according to your game.
|
||||
|
||||
root\resources\installscript.vdf :
|
||||
This is a script file in KeyValues format to run 3rd party installers before
|
||||
Steam and the game are installed. If you don't need to run any other installers,
|
||||
set "ScriptFile" to "" and remove this file and SteamService.exe.
|
||||
|
||||
root\resources\eula.rtf :
|
||||
The end user license agreement shown before the user installs the game. If no
|
||||
EULA is required, set "EulaFile" to "" and remove this file.
|
||||
|
||||
root\resources\setup.bmp :
|
||||
The Setup background image as 640x480 pixel BMP file.
|
||||
|
||||
root\resources\click.wav :
|
||||
Played when a button is click. Delete file to play no sound.
|
||||
|
||||
root\resources\hover.wav :
|
||||
Played when a mouse hovers over a button. Delete file to play no sound.
|
||||
|
||||
root\resources\launch.wav :
|
||||
Played when Setup starts. File can be deleted.
|
||||
|
||||
|
||||
Setup_*.ini configuration values:
|
||||
-------------------------------
|
||||
|
||||
"Game" : game name as it appears in the Setup menu
|
||||
"AppID" : Steam AppID for this game
|
||||
"Language" : overrides current language, usually not needed
|
||||
"ImageFile" : menu background image BMP 640x480. If not set at all,
|
||||
"resources\setup_<language>.bmp" will be used.
|
||||
"EulaFile" : end user license as RTF file, set to "" for none. If not set at
|
||||
all, "resources\eula_<language>.rtf" will be used.
|
||||
"ScriptFile" : script file for 3rd party installers, set to "" for none. If not
|
||||
set at all, "resources\script_<language>.vdf" will be used.
|
||||
"MSIFile" : specifies the SteamInstaller to be used, usually not needed to
|
||||
be set and defaults to "resources\steaminstall_<language>.msi"
|
||||
"URL" : target web URL for technical support button
|
||||
"FontName" : menu Windows font like "Impact" or "Arial"
|
||||
"FontHeight" : menu font height, eg "24"
|
||||
"MenuPos" : menu X and Y coordinates, eg "100 100"
|
||||
"MenuStyle" : menu text style, 0 = align left, 1 = center, 2 = right
|
||||
"ColorDefault" : default menu text color in RGB, eg "255 0 255"
|
||||
"ColorHover" : menu text color for mouse hover event
|
||||
"ColorDown" : menu text color for mouse pressed event
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 900 KiB After Width: | Height: | Size: 900 KiB |
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
[Ident]
|
||||
Version=1.0.0.0
|
||||
PatchVersion=1.0.0.0
|
||||
Title=The Example Game
|
||||
GameName=Example Game
|
||||
RequiredSize=4500000
|
||||
RequiredString=4.5
|
||||
|
||||
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "dutch"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_dutch.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Installeren"
|
||||
"Support" "Technische ondersteuning"
|
||||
"Exit" "Afsluiten"
|
||||
"Continue" "Doorgaan"
|
||||
"Cancel" "Annuleren"
|
||||
"Back" "Terug"
|
||||
"Play" "Spelen"
|
||||
"Install" "Installeren"
|
||||
"Reinstall" "Opnieuw installeren"
|
||||
"Uninstall" "Verwijderen"
|
||||
"Steam" "%s maakt gebruik van Steam om up-to-date te blijven door updates en nieuwe content rechtstreeks naar je computer te sturen."
|
||||
"Click" "Klik op Doorgaan om je aan te melden of een account te maken."
|
||||
"EulaTitle" "Licentieovereenkomst"
|
||||
"AcceptEula" "Ik ga akkoord met de voorwaarden in de licentieovereenkomst"
|
||||
"DenyEula" "Ik ga niet akkoord met de voorwaarden in de licentieovereenkomst"
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game" // product name
|
||||
"Image" "setup.bmp" // backgound image BMP 640x480
|
||||
"FontName" "Impact" // menu font name
|
||||
"FontHeight" "24" // menu font height
|
||||
"MenuPos" "200 324" // postion of menu X Y
|
||||
"MenuStyle" "1" // 0 = align left, 1 = center, 2 = right
|
||||
"ColorDefault" "255 255 255" // default button color RGB
|
||||
"ColorHover" "250 180 60" // button hover color RGB
|
||||
"ColorDown" "0 0 0" // button click color RGB
|
||||
"AppID" "20000" // primary appID
|
||||
"Language" "english"
|
||||
"MSIFile" "SteamInstall.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Install %s"
|
||||
"Support" "Technical Support"
|
||||
"Exit" "Exit"
|
||||
"Continue" "Continue"
|
||||
"Cancel" "Cancel"
|
||||
"Back" "Back"
|
||||
"Play" "Play %s"
|
||||
"Install" "Install"
|
||||
"Reinstall" "Reinstall"
|
||||
"Uninstall" "Uninstall"
|
||||
"Steam" "%s uses Steam to stay up to date, delivering updates and new content straight to your desktop."
|
||||
"Click" "Click Continue to log in or create an Account."
|
||||
"EulaTitle" "License Agreement"
|
||||
"AcceptEula" "I accept the terms in the license agreement"
|
||||
"DenyEula" "I do not accept the terms in the license agreement"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "finnish"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_finnish.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Asenna"
|
||||
"Support" "Tekninen tuki"
|
||||
"Exit" "Lopeta"
|
||||
"Continue" "Jatka"
|
||||
"Cancel" "Peruuta"
|
||||
"Back" "Takaisin"
|
||||
"Play" "Pelaa"
|
||||
"Install" "Asenna"
|
||||
"Reinstall" "Asenna uudelleen"
|
||||
"Uninstall" "Poista pelin asennus"
|
||||
"Steam" "%s pysyy ajan tasalla Steam-palvelulla, joka toimittaa päivityksiä ja uutta sisältöä suoraan tietokoneen työpöydälle."
|
||||
"Click" "Kirjaudu sisään tai luo uusi tili valitsemalla Jatka."
|
||||
"EulaTitle" "Käyttöoikeussopimus"
|
||||
"AcceptEula" "Hyväksyn käyttöoikeussopimuksen"
|
||||
"DenyEula" "En hyväksy käyttöoikeussopimusta"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "french"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_French.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Installer"
|
||||
"Support" "Support technique"
|
||||
"Exit" "Terminer"
|
||||
"Continue" "Continuer"
|
||||
"Cancel" "Annuler"
|
||||
"Back" "Retour"
|
||||
"Play" "Jouer"
|
||||
"Install" "Installer"
|
||||
"Reinstall" "Réinstaller"
|
||||
"Uninstall" "Désinstaller"
|
||||
"Steam" ""%s utilise Steam pour rester à jour, transmettre les mises à jour et les derniers contenus directement sur votre ordinateur."
|
||||
"Click" "Cliquez sur Continuer pour vous inscrire ou pour créer un compte."
|
||||
"EulaTitle" "Accord de souscription"
|
||||
"AcceptEula" "J'accepte les termes de l'accord de souscription"
|
||||
"DenyEula" "Je refuse les termes de l'accord de souscription"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "german"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_German.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Installieren"
|
||||
"Support" "Technischer Support"
|
||||
"Exit" "Beenden"
|
||||
"Continue" "Weiter"
|
||||
"Cancel" "Abbrechen"
|
||||
"Back" "Zurück"
|
||||
"Play" "Spiele"
|
||||
"Install" "Installieren"
|
||||
"Reinstall" "Reinstallieren"
|
||||
"Uninstall" "Deinstallieren"
|
||||
"Steam" "%s uses Steam to stay up to date, delivering updates and new content straight to your desktop."
|
||||
"Click" "Click Continue to log in or create an Account."
|
||||
"EulaTitle" "Lizenzvertrag"
|
||||
"AcceptEula" "Ich akzeptiere den Lizenzvertrag"
|
||||
"DenyEula" "Ich akzeptiere den Lizenzvertrag nicht"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "japanese"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_japanese.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "をインストール"
|
||||
"Support" "テクニカルサポート"
|
||||
"Exit" "終了"
|
||||
"Continue" "続ける"
|
||||
"Cancel" "キャンセル"
|
||||
"Back" "戻る"
|
||||
"Play" "をプレイ"
|
||||
"Install" "インストール"
|
||||
"Reinstall" "を再インストール"
|
||||
"Uninstall" "をアンインストール"
|
||||
"Steam" "%s は Steam を使用してゲームのアップデートや新しいコンテンツをお使いのデスクトップに直接ダウンロードし、ゲームを常に最新の状態に保ちます。"
|
||||
"Click" "[続ける]をクリックしてログインするか、アカウントを作成してください。"
|
||||
"EulaTitle" "使用許諾契約書"
|
||||
"AcceptEula" "使用許諾契約書の内容に同意する"
|
||||
"DenyEula" "使用許諾契約書の内容に同意しない"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "korean"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_korean.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "설치 "
|
||||
"Support" "기술 지원"
|
||||
"Exit" "끝내기"
|
||||
"Continue" "계속하기"
|
||||
"Cancel" "취소"
|
||||
"Back" "후방"
|
||||
"Play" "플레이 "
|
||||
"Install" "설치"
|
||||
"Reinstall" "다시 설치 "
|
||||
"Uninstall" "삭제 "
|
||||
"Steam" "%은(는) Steam을 통해 업데이트와 새로운 컨텐츠를 자동으로 다운로드하여 게임을 항상 최신 상태로 유지합니다."
|
||||
"Click" "로그인하거나 계정을 만들려면 계속을 클릭하십시오."
|
||||
"EulaTitle" "사용권 계약"
|
||||
"AcceptEula" "사용권 계약의 모든 조항에 동의합니다"
|
||||
"DenyEula" "사용권 계약의 조항에 동의하지 않습니다"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "norwegian"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_norwegian.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Installer"
|
||||
"Support" "Kundestøtte"
|
||||
"Exit" "Avslutt"
|
||||
"Continue" "Fortsett"
|
||||
"Cancel" "Avbryt"
|
||||
"Back" "Tilbake"
|
||||
"Play" "Spill"
|
||||
"Install" "Installer"
|
||||
"Reinstall" "Installer på nytt"
|
||||
"Uninstall" "Avinstaller"
|
||||
"Steam" "%s bruker Steam til å holde seg oppdatert og leverer oppdateringer og nytt innhold direkte til skrivebordet."
|
||||
"Click" "Klikk Fortsett for å logge på eller opprette en konto."
|
||||
"EulaTitle" "Lisensavtale"
|
||||
"AcceptEula" "Jeg godtar vilkårene i lisensavtalen"
|
||||
"DenyEula" "Jeg godtar ikke vilkårene i lisensavtalen"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "portuguese"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_portuguese.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Instalar"
|
||||
"Support" "Suporte técnico"
|
||||
"Exit" "Saída"
|
||||
"Continue" "Continuar"
|
||||
"Cancel" "Cancelar"
|
||||
"Back" "Retroceder"
|
||||
"Play" "Jogar"
|
||||
"Install" "Instalar"
|
||||
"Reinstall" "Reinstalar"
|
||||
"Uninstall" "Desinstalar"
|
||||
"Steam" "%s usa o Steam para se manter actualizado, disponibilizando actualizações e conteúdos novos directamente para o seu PC."
|
||||
"Click" "Clique em Continuar para iniciar sessão ou criar uma conta."
|
||||
"EulaTitle" "Acordo de Licença"
|
||||
"AcceptEula" "Aceito os termos do acordo de licença"
|
||||
"DenyEula" "Não aceito os termos do acordo de licença"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "russian"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_russian.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Установить"
|
||||
"Support" "Техподдержка"
|
||||
"Exit" "Выход"
|
||||
"Continue" "Далее"
|
||||
"Cancel" "Отмена"
|
||||
"Back" "Назад"
|
||||
"Play" "Играть в"
|
||||
"Install" "Установить"
|
||||
"Reinstall" "Переустановить"
|
||||
"Uninstall" "Удалить"
|
||||
"Steam" "%s использует Steam для обновления. Новые версии и дополнительные игровые возможности будут загружены прямо на ваш компьютер."
|
||||
"Click" "Щелкните "Далее", чтобы подключиться к существующей учетной записи или создать новую."
|
||||
"EulaTitle" "Лицензионное соглашение"
|
||||
"AcceptEula" "Я принимаю условия лицензионного соглашения"
|
||||
"DenyEula" "Я не принимаю условия лицензионного соглашения"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "schinese"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_schinese.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "安装"
|
||||
"Support" "技术支持"
|
||||
"Exit" "退出"
|
||||
"Continue" "继续"
|
||||
"Cancel" "取消"
|
||||
"Back" "后退"
|
||||
"Play" "开始"
|
||||
"Install" "安装"
|
||||
"Reinstall" "重新安装"
|
||||
"Uninstall" "卸载"
|
||||
"Steam" "%s 通过 Steam 使用程序保持最新,并且将更新和新内容直接发送到您的桌面。"
|
||||
"Click" "单击“继续”以登录,或者创建一个帐户。"
|
||||
"EulaTitle" "许可协议"
|
||||
"AcceptEula" "我接受许可协议中的条款"
|
||||
"DenyEula" "我不接受许可协议中的条款"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Config data, do not localize
|
||||
"Game" "Example Game"
|
||||
"Image" "setup.bmp"
|
||||
"AppID" "20000"
|
||||
"Language" "swedish"
|
||||
"ColorOn" "248 99 0"
|
||||
"ColorOff" "255 255 255"
|
||||
"MSIFile" "SteamInstall_swedish.msi"
|
||||
"URL" "http://support.steampowered.com/"
|
||||
|
||||
// UI text, localize 2nd string. s% is a placeholder for game name
|
||||
"InstallGame" "Installera"
|
||||
"Support" "Teknisk support"
|
||||
"Exit" "Avsluta"
|
||||
"Continue" "Fortsätt"
|
||||
"Cancel" "Avbryt"
|
||||
"Back" "Tillbaka"
|
||||
"Play" "Spela"
|
||||
"Install" "Installera"
|
||||
"Reinstall" "Installera"
|
||||
"Uninstall" "Avinstallera"
|
||||
"Steam" "Steam används i %s till att skicka uppdateringar och nytt innehåll direkt till skrivbordet."
|
||||
"Click" "Klicka på Fortsätt om du vill logga in eller skapa ett konto."
|
||||
"EulaTitle" "Licensavtal"
|
||||
"AcceptEula" "Jag godkänner villkoren i licensavtalet"
|
||||
"DenyEula" "Jag godkänner inte villkoren i licensavtalet"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[Ident]
|
||||
Version=1.0.0.0
|
||||
PatchVersion=1.0.0.0
|
||||
Language=English
|
||||
ShortTitle=EXAMPLE
|
||||
Title=Example Game
|
||||
GameName=Game Example
|
||||
RequiredSize=1800000
|
||||
RequiredString=1.8
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
steam.exe -login <account> <password> -language english -build_install sku_project_example.txt -dest <path>
|
||||
@type build_log.txt
|
||||
@type logs\build_log.txt
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
"sku"
|
||||
{
|
||||
"subscriptionID" "710"
|
||||
"appID" "200"
|
||||
"disk_size_mb" "4700"
|
||||
"appID" 20000
|
||||
"disk_size_mb" 4700
|
||||
|
||||
"included_depots"
|
||||
{
|
||||
"1" 20001
|
||||
"2" 20002
|
||||
}
|
||||
|
||||
"excluded_depots"
|
||||
{
|
||||
|
||||
"1" 20003
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user