This commit is contained in:
Riley Labrecque
2014-01-29 13:14:25 +02:00
parent be7ae58071
commit 69c3f2c4ba
29 changed files with 86 additions and 6 deletions
+18
View File
@@ -11,6 +11,24 @@ website at: http://partner.steamgames.com
Revision History:
----------------------------------------------------------------
v1.14 16th May 2011
----------------------------------------------------------------
Stats and Achievements
* Added a set of functions for accessing global achievement unlock percentages
** RequestGlobalAchievementPercentages() to request the completion percentages from the backend
** GetMostAchievedAchievementInfo() and GetNextMostAchievedAchievementInfo() to iterate achievement completion percentages
** GetAchievementAchievedPercent() to query the global unlock percentage for a specific achievement
* Added a set of functions for accessing global stats values. To enable a global stats set stats as "aggregated" from the Steamworks admin page.
** RequestGlobalStats() to request the global stats data from the backend
** GetGlobalStat() to get the global total for a stat
** GetGlobalStatHistory() to get per day totals for a stat
HTTP
* added ISteamHTTP::GetHTTPDownloadProgressPct() get the progress of an HTTP request
----------------------------------------------------------------
v1.13 26th April 2011
----------------------------------------------------------------
BIN
View File
Binary file not shown.
+5
View File
@@ -85,6 +85,11 @@ public:
// Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t
// callback and finishing using the response.
virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0;
// Gets progress on downloading the body for the request. This will be zero unless a response header has already been
// received which included a content-length field. For responses that contain no content-length it will report
// zero for the duration of the request as the size is unknown until the connection closes.
virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0;
};
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION001"
+60 -4
View File
@@ -212,6 +212,41 @@ public:
// This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0;
// Requests that Steam fetch data on the percentage of players who have received each achievement
// for the game globally.
// This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0;
// Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch
// the next most achieved afterwards. Will return -1 if there is no data on achievement
// percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).
virtual int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0;
// Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another
// GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last
// achievement has been iterated.
virtual int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0;
// Returns the percentage of users who have achieved the specified achievement.
virtual bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) = 0;
// Requests global stats data, which is available for stats marked as "aggregated".
// This call is asynchronous, with the results returned in GlobalStatsReceived_t.
// nHistoryDays specifies how many days of day-by-day history to retrieve in addition
// to the overall totals. The limit is 60.
virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0;
// Gets the lifetime totals for an aggregated stat
virtual bool GetGlobalStat( const char *pchStatName, int64 *pData ) = 0;
virtual bool GetGlobalStat( const char *pchStatName, double *pData ) = 0;
// Gets history for an aggregated stat. pData will be filled with daily values, starting with today.
// So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,
// etc. cubData is the size in bytes of the pubData buffer. Returns the number of
// elements actually set.
virtual int32 GetGlobalStatHistory( const char *pchStatName, int64 *pData, uint32 cubData ) = 0;
virtual int32 GetGlobalStatHistory( const char *pchStatName, double *pData, uint32 cubData ) = 0;
#ifdef _PS3
// Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t
// callback.
@@ -233,7 +268,7 @@ public:
#endif
};
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION009"
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION010"
// callbacks
#pragma pack( push, 8 )
@@ -353,9 +388,18 @@ struct UserAchievementIconFetched_t
int m_nIconHandle; // Handle to the image, which can be used in ClientUtils()->GetImageRGBA(), 0 means no image is set for the achievement
};
//
// IMPORTANT! k_iSteamUserStatsCallbacks + 10 is used, see iclientuserstats.h
//
//-----------------------------------------------------------------------------
// Purpose: Callback indicating that global achievement percentages are fetched
//-----------------------------------------------------------------------------
struct GlobalAchievementPercentagesReady_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 10 };
uint64 m_nGameID; // Game this is for
EResult m_eResult; // Result of the operation
};
//-----------------------------------------------------------------------------
// Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC()
@@ -380,6 +424,18 @@ struct PS3TrophiesInstalled_t
};
//-----------------------------------------------------------------------------
// Purpose: callback indicating global stats have been received.
// Returned as a result of RequestGlobalStats()
//-----------------------------------------------------------------------------
struct GlobalStatsReceived_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 12 };
uint64 m_nGameID; // Game global stats were requested for
EResult m_eResult; // The result of the request
};
#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.
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.
+3 -2
View File
@@ -287,8 +287,8 @@ bool CGameEngineGL::BInitializeAudio()
bool CGameEngineGL::BInitializeGraphics()
{
m_nWindowWidth = 800;
m_nWindowHeight = 600;
m_nWindowWidth = 1024;
m_nWindowHeight = 768;
AutoReleasePool pool;
@@ -328,6 +328,7 @@ bool CGameEngineGL::BInitializeGraphics()
[app setDelegate: app];
[m_window setDelegate: app];
[m_window setAcceptsMouseMovedEvents:YES];
GLint swapInt = 1;
[[m_view openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
Binary file not shown.