Update to sdk 1.47

This commit is contained in:
Mr_Goldberg
2019-12-09 12:49:55 -05:00
parent 82eaf4f684
commit 262ee1d18f
42 changed files with 2581 additions and 175 deletions

View File

@ -25,6 +25,7 @@
// General result codes
enum EResult
{
k_EResultNone = 0, // no result
k_EResultOK = 1, // success
k_EResultFail = 2, // generic failure
k_EResultNoConnection = 3, // no/failed network connection
@ -275,6 +276,8 @@ enum EAppOwnershipFlags
k_EAppOwnershipFlags_RentalNotActivated = 0x10000, // Rental hasn't been activated yet
k_EAppOwnershipFlags_Rental = 0x20000, // Is a rental
k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license
k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, // App only owned through Steam's legacy free sub
k_EAppOwnershipFlags_InvalidOSType = 0x100000, // app not supported on current OS version, used to indicate a game is 32-bit on post-catalina. Currently it's own flag so the library will display a notice.
};
@ -298,9 +301,9 @@ enum EAppType
k_EAppType_Franchise = 0x400, // A hub for collections of multiple apps, eg films, series, games
k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc)
k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps
k_EAppType_Music = 0x2000, // Music files
k_EAppType_MusicAlbum = 0x2000, // "Video game soundtrack album"
k_EAppType_Series = 0x4000, // Container app for video series
k_EAppType_Comic = 0x8000, // Comic Book
k_EAppType_Comic_UNUSED = 0x8000, // Comic Book
k_EAppType_Beta = 0x10000, // this is a beta version of a game
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
@ -380,10 +383,7 @@ typedef bool (*PFNLegacyKeyInstalled)();
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
// we allow 3 simultaneous user account instances right now, 1= desktop, 2 = console, 4 = web, 0 = all
const unsigned int k_unSteamUserDesktopInstance = 1;
const unsigned int k_unSteamUserConsoleInstance = 2;
const unsigned int k_unSteamUserWebInstance = 4;
const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
// Special flags for Chat accounts - they go in the top 8 bits
// of the steam ID's "instance", leaving 12 for the actual instances
@ -413,8 +413,8 @@ enum EMarketingMessageFlags
//aggregate flags
k_EMarketingMessageFlagsPlatformRestrictions =
k_EMarketingMessageFlagsPlatformWindows |
k_EMarketingMessageFlagsPlatformMac |
k_EMarketingMessageFlagsPlatformLinux,
k_EMarketingMessageFlagsPlatformMac |
k_EMarketingMessageFlagsPlatformLinux,
};
@ -538,6 +538,7 @@ enum EVRHMDType
k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD
k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset
k_eEVRHMDType_HP_Reverb = 82, // HP Reverb Windows MR headset
k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD
k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset
@ -657,24 +658,35 @@ enum EMarketNotAllowedReasonFlags
// describes XP / progress restrictions to apply for games with duration control /
// anti-indulgence enabled for minor Steam China users.
//
// WARNING: DO NOT RENUMBER
enum EDurationControlProgress
{
k_EDurationControlProgress_Full, // Full progress
k_EDurationControlProgress_Half, // XP or persistent rewards should be halved
k_EDurationControlProgress_None, // XP or persistent rewards should be stopped
k_EDurationControlProgress_Full = 0, // Full progress
k_EDurationControlProgress_Half = 1, // deprecated - XP or persistent rewards should be halved
k_EDurationControlProgress_None = 2, // deprecated - XP or persistent rewards should be stopped
k_EDurationControl_ExitSoon_3h = 3, // allowed 3h time since 5h gap/break has elapsed, game should exit - steam will terminate the game soon
k_EDurationControl_ExitSoon_5h = 4, // allowed 5h time in calendar day has elapsed, game should exit - steam will terminate the game soon
k_EDurationControl_ExitSoon_Night = 5, // game running after day period, game should exit - steam will terminate the game soon
};
//
// describes which notification timer has expired, for steam china duration control feature
//
// WARNING: DO NOT RENUMBER
enum EDurationControlNotification
{
k_EDurationControlNotification_None, // just informing you about progress, no notification to show
k_EDurationControlNotification_1Hour, // "you've been playing for an hour"
k_EDurationControlNotification_3Hours, // "you've been playing for 3 hours; take a break"
k_EDurationControlNotification_HalfProgress, // "your XP / progress is half normal"
k_EDurationControlNotification_NoProgress, // "your XP / progress is zero"
k_EDurationControlNotification_None = 0, // just informing you about progress, no notification to show
k_EDurationControlNotification_1Hour = 1, // "you've been playing for N hours"
k_EDurationControlNotification_3Hours = 2, // deprecated - "you've been playing for 3 hours; take a break"
k_EDurationControlNotification_HalfProgress = 3,// deprecated - "your XP / progress is half normal"
k_EDurationControlNotification_NoProgress = 4, // deprecated - "your XP / progress is zero"
k_EDurationControlNotification_ExitSoon_3h = 5, // allowed 3h time since 5h gap/break has elapsed, game should exit - steam will terminate the game soon
k_EDurationControlNotification_ExitSoon_5h = 6, // allowed 5h time in calendar day has elapsed, game should exit - steam will terminate the game soon
k_EDurationControlNotification_ExitSoon_Night = 7,// game running after day period, game should exit - steam will terminate the game soon
};
@ -721,7 +733,7 @@ public:
CSteamID( uint32 unAccountID, unsigned int unAccountInstance, EUniverse eUniverse, EAccountType eAccountType )
{
#if defined(_SERVER) && defined(Assert)
Assert( ! ( ( k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserWebInstance ) ) ); // enforce that for individual accounts, instance is always 1
Assert( ( k_EAccountTypeIndividual != eAccountType ) || ( unAccountInstance == k_unSteamUserDefaultInstance ) ); // enforce that for individual accounts, instance is always 1
#endif // _SERVER
InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType );
}
@ -763,8 +775,7 @@ public:
}
else
{
// by default we pick the desktop instance
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance;
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance;
}
}
@ -831,7 +842,7 @@ public:
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe
m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance; // Steam2 only knew desktop instances
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance; // Steam2 only knew one instance
}
//-----------------------------------------------------------------------------
@ -1000,8 +1011,7 @@ public:
// simple accessors
void SetAccountID( uint32 unAccountID ) { m_steamid.m_comp.m_unAccountID = unAccountID; }
void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccountInstance = unInstance; }
void ClearIndividualInstance() { if ( BIndividualAccount() ) m_steamid.m_comp.m_unAccountInstance = 0; }
bool HasNoIndividualInstance() const { return BIndividualAccount() && (m_steamid.m_comp.m_unAccountInstance==0); }
AccountID_t GetAccountID() const { return m_steamid.m_comp.m_unAccountID; }
uint32 GetUnAccountInstance() const { return m_steamid.m_comp.m_unAccountInstance; }
EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; }
@ -1071,7 +1081,7 @@ inline bool CSteamID::IsValid() const
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
{
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance > k_unSteamUserWebInstance )
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != k_unSteamUserDefaultInstance )
return false;
}
@ -1166,6 +1176,17 @@ public:
m_gameID.m_nType = k_EGameIDTypeGameMod;
}
CGameID( const CGameID &that )
{
m_ulGameID = that.m_ulGameID;
}
CGameID& operator=( const CGameID & that )
{
m_ulGameID = that.m_ulGameID;
return *this;
}
// Hidden functions used only by Steam
explicit CGameID( const char *pchGameID );
const char *Render() const; // render this Game ID to string
@ -1404,6 +1425,23 @@ enum EPlayerResult_t
k_EPlayerResultCompleted = 5, // player completed game
};
enum ESteamIPv6ConnectivityProtocol
{
k_ESteamIPv6ConnectivityProtocol_Invalid = 0,
k_ESteamIPv6ConnectivityProtocol_HTTP = 1, // because a proxy may make this different than other protocols
k_ESteamIPv6ConnectivityProtocol_UDP = 2, // test UDP connectivity. Uses a port that is commonly needed for other Steam stuff. If UDP works, TCP probably works.
};
// For the above transport protocol, what do we think the local machine's connectivity to the internet over ipv6 is like
enum ESteamIPv6ConnectivityState
{
k_ESteamIPv6ConnectivityState_Unknown = 0, // We haven't run a test yet
k_ESteamIPv6ConnectivityState_Good = 1, // We have recently been able to make a request on ipv6 for the given protocol
k_ESteamIPv6ConnectivityState_Bad = 2, // We failed to make a request, either because this machine has no ipv6 address assigned, or it has no upstream connectivity
};
// Define compile time assert macros to let us validate the structure sizes.
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];