This commit is contained in:
Riley Labrecque
2021-10-06 20:55:02 -07:00
parent 4d415945ac
commit 99411b13b1
80 changed files with 3415 additions and 2286 deletions
+58
View File
@@ -8,6 +8,64 @@ Copyright
Welcome to the Steamworks SDK. For documentation please see our partner
website at: http://partner.steamgames.com
----------------------------------------------------------------
v1.52 14th September 2021
----------------------------------------------------------------
ISteamInput
* Added support for bundling Steam Input API configurations w/ game depots. Allows developers to use the same configuration file across public/private AppIDs, check configurations into their revision control systems, more easily juggle changes between beta branches, and ensure game/config changes are done in-sync.
* Added new glyph API support for SVG glyphs and multiple sizes of PNG files. Note: these images will be added in a subsequent Steam Beta Client release.
* Added support for callbacks for action state changes, controller connect/disconnect, and controller mapping changes.
* Added BNewDataAvailable function to reduce need to manually compare action data between frames.
* Added BWaitForData helper function to wait on an event set when controller data is updated.
* Added functions for getting the localized string for action names (GetStringForDigitalActionName and GetStringForAnalogActionName).
* Added function to poll current Steam Input enable settings by controller type (GetSessionInputConfigurationSettings).
ISteamGameServer
* Renamed EnableHeartbeats to SetAdvertiseServerActive.
* Deprecated the following methods (they have been renamed to *_DEPRECATED and will be removed in a future SDK update):
** SendUserConnectAndAuthenticate
** SendUserDisconnect
** SetMasterServerHeartbeatInterval
** ForceMasterServerHeartbeat
ISteamRemoteStorage
* Added GetLocalFileChangeCount and GetLocalFileChange which allows for iterating over Steam Cloud files that have changed locally after the initial sync on app start, when supported by the app. The callback notification is RemoteStorageLocalFileChange_t.
* Added BeginFileWriteBatch and EndFileWriteBatch to hint to Steam that a set of files should be written to Steam Cloud together (e.g. a game save that requires updating more than one file).
* Removed the following unused callbacks: RemoteStorageAppSyncedClient_t, RemoteStorageAppSyncedServer_t, RemoteStorageAppSyncProgress_t, and RemoteStorageAppSyncStatusCheck_t.
ISteamUGC
* Added ability to sort by "time last updated" (k_EUGCQuery_RankedByLastUpdatedDate).
* Added ShowWorkshopEULA and GetWorkshopEULAStatus, which allows a game to have a separate EULA for the Steam Workshop.
* Added UserSubscribedItemsListChanged_t callback.
* Added WorkshopEULAStatus_t callback, which will be sent asynchronously after calling GetWorkshopEULAStatus.
ISteamUser
* Deprecated InitiateGameConnection and TerminateGameConnection (renamed to *_DEPRECATED). Please migrate to BeginAuthSession and EndAuthSession.
ISteamUtils
* Added IsSteamRunningOnSteamDeck - Can be used to optimize the experience of the game on Steam Deck, such as scaling the UI appropriately, applying performance related settings, etc.
* Added SetGameLauncherMode - In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher.
* Added AppResumingFromSuspend_t callback - Sent after the device returns from sleep/suspend mode.
* Added ShowFloatingGamepadTextInput - Activates the modal gamepad input keyboard which pops up over game content and sends OS keyboard keys directly to the game. Note: Currently this is only implemented in the Steam Deck UI.
* Added FloatingGamepadTextInputDismissed_t callback - Sent after the floating gamepad input keyboard displayed via ShowFloatingGamepadTextInput has been dismissed.
macOS
* Added i386/x86_64/arm64 universal builds of libsdkencryptedappticket.dylib and libsteam_api.dylib
Steamworks Example Project
* Updated project to illustrate new Steam Input changes
* Updated to build properly with macOS 11 SDK for arm64
* Updated Windows project files to Visual Studio 2015
* Windows project files now target Windows 8.1
* Windows project files now set include and library path using DXSDK_DIR
Misc.
* ISteamAppList - Added m_iInstallFolderIndex to SteamAppInstalled_t and SteamAppUninstalled_t callbacks.
* ISteamApps - Removed unused SteamGameServerApps() accessor.
* CSteamGameServerAPIContext - removed SteamApps() accessor.
* Cleanup of types and enums that were unnecessarily in the SDK.
----------------------------------------------------------------
v1.51 8th January 2021
+21 -22
View File
@@ -34,6 +34,8 @@
#ifdef _WIN32
void MiniDumpFunction( unsigned int nExceptionCode, EXCEPTION_POINTERS *pException )
{
MessageBox( nullptr, "Spacewar is crashing now!", "Unhandled Exception", MB_OK );
// You can build and set an arbitrary comment to embed in the minidump here,
// maybe you want to put what level the user was playing, how many players on the server,
// how much memory is free, etc...
@@ -213,27 +215,6 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow )
return EXIT_FAILURE;
}
// We are going to use the controller interface, initialize it, which is a seperate step as it
// create a new thread in the game proc and we don't want to force that on games that don't
// have native Steam controller implementations
char rgchCWD[1024];
if ( !_getcwd( rgchCWD, sizeof( rgchCWD ) ) )
{
strcpy( rgchCWD, "." );
}
char rgchFullPath[1024];
#if defined(_WIN32)
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s\\%s", rgchCWD, "controller.vdf" );
#elif defined(OSX)
// hack for now, because we do not have utility functions available for finding the resource path
// alternatively we could disable the SteamController init on OS X
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/steamworksexample.app/Contents/Resources/%s", rgchCWD, "controller.vdf" );
#else
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/%s", rgchCWD, "controller.vdf" );
#endif
const char *pchServerAddress, *pchLobbyID;
if ( !ParseCommandLine( pchCmdLine, &pchServerAddress, &pchLobbyID ) )
{
@@ -265,12 +246,30 @@ static int RealMain( const char *pchCmdLine, HINSTANCE hInstance, int nCmdShow )
#error Need CreateGameEngine()
#endif
if ( !SteamInput()->Init() )
if ( !SteamInput()->Init( false ) )
{
OutputDebugString( "SteamInput()->Init failed.\n" );
Alert( "Fatal Error", "SteamInput()->Init failed.\n" );
return EXIT_FAILURE;
}
char rgchCWD[1024];
if ( !_getcwd( rgchCWD, sizeof( rgchCWD ) ) )
{
strcpy( rgchCWD, "." );
}
char rgchFullPath[1024];
#if defined(_WIN32)
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s\\%s", rgchCWD, "steam_input_manifest.vdf" );
#elif defined(OSX)
// hack for now, because we do not have utility functions available for finding the resource path
// alternatively we could disable the SteamController init on OS X
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/steamworksexample.app/Contents/Resources/%s", rgchCWD, "steam_input_manifest.vdf" );
#else
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/%s", rgchCWD, "steam_input_manifest.vdf" );
#endif
SteamInput()->SetInputActionManifestFilePath( rgchFullPath );
// This call will block and run until the game exits
RunGameLoop( pGameEngine, pchServerAddress, pchLobbyID );
+86 -37
View File
@@ -171,7 +171,7 @@ CRemoteStorageScreen::CRemoteStorageScreen( IGameEngine *pGameEngine ) : m_pGame
if ( !m_hDisplayFont )
OutputDebugString( "RemoteStorage font was not created properly, text won't draw\n" );
GetFileStats();
GetFileStats();
}
@@ -218,8 +218,60 @@ void CRemoteStorageScreen::Show()
{
GetFileStats();
LoadMessage();
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const int32 width = m_pGameEngine->GetViewportWidth();
const int32 pxColumn1Left = width / 2 - CLOUDDISP_COLUMN_WIDTH / 2;
int32 pxVertOffset = 8 * CLOUDDISP_TEXT_HEIGHT + 4 * ( CLOUDDISP_TEXT_HEIGHT + CLOUDDISP_VERT_SPACING );
SteamUtils()->ShowFloatingGamepadTextInput( k_EFloatingGamepadTextInputModeModeSingleLine, pxColumn1Left, pxVertOffset, CLOUDDISP_COLUMN_WIDTH, CLOUDDISP_TEXT_HEIGHT );
}
}
bool CRemoteStorageScreen::BHandleCancel()
{
// always cancel
m_rgchGreetingNext[0] = 0;
m_bFinished = true;
return true;
}
bool CRemoteStorageScreen::BHandleSelect()
{
int nGreetingNextLength = (int)strlen( m_rgchGreetingNext );
bool bQuotaExceeded = nGreetingNextLength > m_ulBytesQuota;
if ( !bQuotaExceeded )
{
uint64 ulCurrentTickCount = m_pGameEngine->GetGameTickCount();
if ( ulCurrentTickCount - 150 > g_ulLastReturnKeyTick )
{
// global from BaseMenu.h!
g_ulLastReturnKeyTick = ulCurrentTickCount;
// Do it
{
m_bFinished = true;
strncpy( m_rgchGreeting, m_rgchGreetingNext, sizeof( m_rgchGreeting ) );
m_rgchGreetingNext[0] = 0;
// Note: not writing the NULL termination, so won't read it back later either.
bool bRet = m_pSteamRemoteStorage->FileWrite( MESSAGE_FILE_NAME, m_rgchGreeting, (int)strlen( m_rgchGreeting ) );
// Update our stats on stuff
GetFileStats();
if ( !bRet )
{
OutputDebugString( "RemoteStorage: Failed to write file!\n" );
}
return true;
}
}
}
return false;
}
//-----------------------------------------------------------------------------
// Purpose: Render the Remote Storage page
@@ -236,48 +288,28 @@ void CRemoteStorageScreen::Render()
bool bQuotaExceeded = nGreetingNextLength > m_ulBytesQuota;
if ( m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_MenuCancel ) )
{
if ( BHandleCancel() )
return;
}
else if ( m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_MenuSelect ) )
{
if ( BHandleSelect() )
return;
}
while ( m_pGameEngine->BGetFirstKeyDown( &dwVKDown ) )
{
if ( VK_ESCAPE == dwVKDown )
{
// cancel
m_rgchGreetingNext[0] = 0;
m_bFinished = true;
return;
if ( BHandleCancel() )
return;
}
else if ( VK_RETURN == dwVKDown )
{
if ( !bQuotaExceeded )
{
uint64 ulCurrentTickCount = m_pGameEngine->GetGameTickCount();
if ( ulCurrentTickCount - 150 > g_ulLastReturnKeyTick )
{
// global from BaseMenu.h!
g_ulLastReturnKeyTick = ulCurrentTickCount;
// Do it
{
m_bFinished = true;
strncpy( m_rgchGreeting, m_rgchGreetingNext, sizeof( m_rgchGreeting ) );
m_rgchGreetingNext[0] = 0;
// Note: not writing the NULL termination, so won't read it back later either.
bool bRet = m_pSteamRemoteStorage->FileWrite( MESSAGE_FILE_NAME, m_rgchGreeting, (int) strlen( m_rgchGreeting ) );
// Update our stats on stuff
GetFileStats();
if ( !bRet )
{
OutputDebugString( "RemoteStorage: Failed to write file!\n" );
}
return;
}
}
}
if ( BHandleSelect() )
return;
}
else if ( VK_BACK == dwVKDown )
{
@@ -366,7 +398,24 @@ void CRemoteStorageScreen::Render()
rect.right = rect.left + CLOUDDISP_COLUMN_WIDTH;
pxVertOffset = rect.bottom + CLOUDDISP_TEXT_HEIGHT + CLOUDDISP_VERT_SPACING;
sprintf_safe( rgchBuffer, "Hit <ENTER> to save, <ESC> to cancel" );
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchSaveActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuSelect );
const char *rgchCancelActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchSaveActionOrigin, "None" ) == 0 || strcmp( rgchCancelActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Hit <ENTER> to save, <ESC> to cancel. Controller bindings are not setup properly" );
}
else
{
sprintf_safe( rgchBuffer, "Hit <ENTER> or %s to save, <ESC> or %s to cancel", rgchSaveActionOrigin, rgchCancelActionOrigin );
}
}
else
{
sprintf_safe( rgchBuffer, "Hit <ENTER> to save, <ESC> to cancel" );
}
m_pGameEngine->BDrawString( m_hDisplayFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_VCENTER, rgchBuffer );
if ( bQuotaExceeded )
+2
View File
@@ -81,6 +81,8 @@ public:
private:
void GetFileStats();
void LoadMessage();
bool BHandleSelect();
bool BHandleCancel();
// Game engine
IGameEngine *m_pGameEngine;
+72 -11
View File
@@ -1377,7 +1377,8 @@ void CSpaceWarClient::RunFrame()
// Check if escape has been pressed, we'll use that info in a couple places below
bool bEscapePressed = false;
if ( m_pGameEngine->BIsKeyDown( VK_ESCAPE ) ||
m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_PauseMenu ) )
m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_PauseMenu ) ||
m_pGameEngine->BIsControllerActionActive( eControllerDigitalAction_MenuCancel ) )
{
static uint64 m_ulLastESCKeyTick = 0;
uint64 ulCurrentTickCount = m_pGameEngine->GetGameTickCount();
@@ -1516,12 +1517,7 @@ void CSpaceWarClient::RunFrame()
// Check if we've waited too long and should time out the connection
if ( m_pGameEngine->GetGameTickCount() - m_ulStateTransitionTime > MILLISECONDS_CONNECTION_TIMEOUT )
{
if ( m_pP2PAuthedGame )
m_pP2PAuthedGame->EndGame();
if ( m_eConnectedStatus == k_EClientConnectedAndAuthenticated )
{
SteamUser()->TerminateGameConnection( m_unServerIP, m_usServerPort );
}
DisconnectFromServer();
m_GameServerPing.CancelPing();
SetConnectionFailureText( "Timed out connecting to game server" );
SetGameState( k_EClientGameConnectionFailure );
@@ -2026,7 +2022,24 @@ void CSpaceWarClient::DrawInstructions()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.7);
rect.bottom = m_pGameEngine->GetViewportHeight();
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu\n Build ID:%d", SteamApps()->GetAppBuildId() );
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu. No controller button bound\n Build ID:%d", SteamApps()->GetAppBuildId() );
}
else
{
sprintf_safe( rgchBuffer, "Press ESC or '%s' to return the Main Menu\n Build ID:%d", rgchActionOrigin, SteamApps()->GetAppBuildId() );
}
}
else
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu\n Build ID:%d", SteamApps()->GetAppBuildId() );
}
m_pGameEngine->BDrawString( m_hInstructionsFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_TOP, rgchBuffer );
}
@@ -2086,7 +2099,23 @@ void CSpaceWarClient::DrawConnectionFailureText()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.7);
rect.bottom = m_pGameEngine->GetViewportHeight();
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu. No controller button bound" );
}
else
{
sprintf_safe( rgchBuffer, "Press ESC or '%s' to return the Main Menu", rgchActionOrigin );
}
}
else
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
}
m_pGameEngine->BDrawString( m_hInstructionsFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_TOP, rgchBuffer );
}
@@ -2640,7 +2669,23 @@ void CSpaceWarClient::DrawWorkshopItems()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.8);
rect.bottom = m_pGameEngine->GetViewportHeight();
sprintf_safe(rgchBuffer, "Press ESC to return to the Main Menu");
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu. No controller button bound" );
}
else
{
sprintf_safe( rgchBuffer, "Press ESC or '%s' to return the Main Menu", rgchActionOrigin );
}
}
else
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
}
m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer);
}
@@ -2696,6 +2741,22 @@ void CSpaceWarClient::DrawInGameStore()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.8);
rect.bottom = m_pGameEngine->GetViewportHeight();
sprintf_safe(rgchBuffer, "Press ESC to return to the Main Menu");
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu. No controller button bound" );
}
else
{
sprintf_safe( rgchBuffer, "Press ESC or '%s' to return the Main Menu", rgchActionOrigin );
}
}
else
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
}
m_pGameEngine->BDrawString(m_hInstructionsFont, rect, D3DCOLOR_ARGB(255, 25, 200, 25), TEXTPOS_CENTER | TEXTPOS_TOP, rgchBuffer);
}
+1 -6
View File
@@ -73,7 +73,7 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
// We want to actively update the master server with our presence so players can
// find us via the steam matchmaking/server browser interfaces
#ifdef USE_GS_AUTH_API
SteamGameServer()->EnableHeartbeats( true );
SteamGameServer()->SetAdvertiseServerActive( true );
#endif
}
else
@@ -122,11 +122,6 @@ CSpaceWarServer::CSpaceWarServer( IGameEngine *pGameEngine )
//-----------------------------------------------------------------------------
CSpaceWarServer::~CSpaceWarServer()
{
#ifdef USE_GS_AUTH_API
// Notify Steam master server we are going offline
SteamGameServer()->EnableHeartbeats( false );
#endif
delete m_pSun;
for( uint32 i=0; i < MAX_PLAYERS_PER_SERVER; ++i )
+19 -6
View File
@@ -438,6 +438,25 @@ void CStatsAndAchievements::Render()
RECT rect;
char rgchBuffer[256];
if ( m_pGameEngine->BIsSteamInputDeviceActive() )
{
const char *rgchActionOrigin = m_pGameEngine->GetTextStringForControllerOriginDigital( eControllerActionSet_MenuControls, eControllerDigitalAction_MenuCancel );
if ( strcmp( rgchActionOrigin, "None" ) == 0 )
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu. No controller button bound" );
}
else
{
sprintf_safe( rgchBuffer, "Press ESC or '%s' to return the Main Menu", rgchActionOrigin );
}
}
else
{
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
}
if ( !m_bStatsValid )
{
rect.top = 0;
@@ -445,7 +464,6 @@ void CStatsAndAchievements::Render()
rect.left = 0;
rect.right = width;
char rgchBuffer[256];
sprintf_safe( rgchBuffer, "Unable to retrieve data from Steam\n" );
m_pGameEngine->BDrawString( m_hDisplayFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_VCENTER, rgchBuffer );
@@ -455,9 +473,7 @@ void CStatsAndAchievements::Render()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.7);
rect.bottom = m_pGameEngine->GetViewportHeight();
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
m_pGameEngine->BDrawString( m_hDisplayFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_TOP, rgchBuffer );
}
else
{
@@ -561,10 +577,7 @@ void CStatsAndAchievements::Render()
rect.top = LONG(m_pGameEngine->GetViewportHeight() * 0.8);
rect.bottom = m_pGameEngine->GetViewportHeight();
char rgchBuffer[256];
sprintf_safe( rgchBuffer, "Press ESC to return to the Main Menu" );
m_pGameEngine->BDrawString( m_hDisplayFont, rect, D3DCOLOR_ARGB( 255, 25, 200, 25 ), TEXTPOS_CENTER|TEXTPOS_TOP, rgchBuffer );
}
}
+4 -4
View File
@@ -1,9 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SteamworksExample", "SteamworksExample.vcproj", "{F9B80FD0-A31F-443F-9FFF-85813D209141}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SteamworksExample", "SteamworksExample.vcxproj", "{F9B80FD0-A31F-443F-9FFF-85813D209141}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
-623
View File
@@ -1,623 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="SteamworksExample"
ProjectGUID="{F9B80FD0-A31F-443F-9FFF-85813D209141}"
RootNamespace="SteamWorksExample"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\$(ConfigurationName)"
IntermediateDirectory=".\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
Outputs=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\public;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="steam_api.lib sdkencryptedappticket.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="..\redistributable_bin;..\public\steam\lib\win32"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy ..\redistributable_bin\steam_api.dll $(OutDir)&#x0D;&#x0A;copy ..\public\steam\lib\win32\sdkencryptedappticket.dll $(OutDir)&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="win64\$(ConfigurationName)"
IntermediateDirectory="win64\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
Outputs=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\public;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="steam_api64.lib sdkencryptedappticket64.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="..\redistributable_bin\win64;..\public\steam\lib\win64"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy ..\redistributable_bin\win64\steam_api64.dll $(OutDir)&#x0D;&#x0A;copy ..\public\steam\lib\win64\sdkencryptedappticket64.dll $(OutDir)&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\$(ConfigurationName)"
IntermediateDirectory=".\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
Outputs=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\public;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
ExceptionHandling="2"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="steam_api.lib sdkencryptedappticket.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\redistributable_bin;..\public\steam\lib\win32"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy ..\redistributable_bin\steam_api.dll $(OutDir)&#x0D;&#x0A;copy ..\public\steam\lib\win32\sdkencryptedappticket.dll $(OutDir)&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="win64\$(ConfigurationName)"
IntermediateDirectory="win64\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
Outputs=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\public;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
ExceptionHandling="2"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="steam_api64.lib sdkencryptedappticket64.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\redistributable_bin\win64;..\public\steam\lib\win64"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy ..\redistributable_bin\win64\steam_api64.dll $(OutDir)&#x0D;&#x0A;copy ..\public\steam\lib\win64\sdkencryptedappticket64.dll $(OutDir)&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\Main.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
</File>
<Filter
Name="Engine"
>
<File
RelativePath=".\gameenginewin32.cpp"
>
</File>
<File
RelativePath=".\VectorEntity.cpp"
>
</File>
</Filter>
<Filter
Name="Game"
>
<File
RelativePath=".\BaseMenu.cpp"
>
</File>
<File
RelativePath=".\clanchatroom.cpp"
>
</File>
<File
RelativePath=".\connectingmenu.cpp"
>
</File>
<File
RelativePath=".\Friends.cpp"
>
</File>
<File
RelativePath=".\htmlsurface.cpp"
>
</File>
<File
RelativePath=".\Inventory.cpp"
>
</File>
<File
RelativePath=".\Leaderboards.cpp"
>
</File>
<File
RelativePath=".\Lobby.cpp"
>
</File>
<File
RelativePath=".\MainMenu.cpp"
>
</File>
<File
RelativePath=".\musicplayer.cpp"
>
</File>
<File
RelativePath=".\p2pauth.cpp"
>
</File>
<File
RelativePath=".\PhotonBeam.cpp"
>
</File>
<File
RelativePath=".\QuitMenu.cpp"
>
</File>
<File
RelativePath=".\RemotePlay.cpp"
>
</File>
<File
RelativePath=".\RemoteStorage.cpp"
>
</File>
<File
RelativePath=".\ServerBrowser.cpp"
>
</File>
<File
RelativePath=".\Ship.cpp"
>
</File>
<File
RelativePath=".\SpaceWarClient.cpp"
>
</File>
<File
RelativePath=".\SpaceWarEntity.cpp"
>
</File>
<File
RelativePath=".\SpaceWarServer.cpp"
>
</File>
<File
RelativePath=".\StarField.cpp"
>
</File>
<File
RelativePath=".\StatsAndAchievements.cpp"
>
</File>
<File
RelativePath=".\Sun.cpp"
>
</File>
<File
RelativePath=".\voicechat.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\stdafx.h"
>
</File>
<Filter
Name="Engine"
>
<File
RelativePath=".\GameEngine.h"
>
</File>
<File
RelativePath=".\gameenginewin32.h"
>
</File>
<File
RelativePath=".\VectorEntity.h"
>
</File>
</Filter>
<Filter
Name="Game"
>
<File
RelativePath=".\BaseMenu.h"
>
</File>
<File
RelativePath=".\clanchatroom.h"
>
</File>
<File
RelativePath=".\connectingmenu.h"
>
</File>
<File
RelativePath=".\Friends.h"
>
</File>
<File
RelativePath=".\htmlsurface.h"
>
</File>
<File
RelativePath=".\Inventory.h"
>
</File>
<File
RelativePath=".\Leaderboards.h"
>
</File>
<File
RelativePath=".\Lobby.h"
>
</File>
<File
RelativePath=".\MainMenu.h"
>
</File>
<File
RelativePath=".\Messages.h"
>
</File>
<File
RelativePath=".\musicplayer.h"
>
</File>
<File
RelativePath=".\p2pauth.h"
>
</File>
<File
RelativePath=".\PhotonBeam.h"
>
</File>
<File
RelativePath=".\QuitMenu.h"
>
</File>
<File
RelativePath=".\RemotePlay.h"
>
</File>
<File
RelativePath=".\RemoteStorage.h"
>
</File>
<File
RelativePath=".\ServerBrowser.h"
>
</File>
<File
RelativePath=".\ServerBrowserMenu.h"
>
</File>
<File
RelativePath=".\Ship.h"
>
</File>
<File
RelativePath=".\SpaceWar.h"
>
</File>
<File
RelativePath=".\SpaceWarClient.h"
>
</File>
<File
RelativePath=".\SpaceWarEntity.h"
>
</File>
<File
RelativePath=".\SpaceWarServer.h"
>
</File>
<File
RelativePath=".\StarField.h"
>
</File>
<File
RelativePath=".\StatsAndAchievements.h"
>
</File>
<File
RelativePath=".\Sun.h"
>
</File>
<File
RelativePath=".\voicechat.h"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+274
View File
@@ -0,0 +1,274 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F9B80FD0-A31F-443F-9FFF-85813D209141}</ProjectGuid>
<RootNamespace>SteamWorksExample</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>14.0.25431.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>win64\$(Configuration)\</OutDir>
<IntDir>win64\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>win64\$(Configuration)\</OutDir>
<IntDir>win64\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
<Command />
</CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>steam_api.lib;sdkencryptedappticket.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;..\redistributable_bin;..\public\steam\lib\win32\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy ..\redistributable_bin\steam_api.dll $(OutDir)
copy ..\public\steam\lib\win32\sdkencryptedappticket.dll $(OutDir)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CustomBuildStep>
<Command />
</CustomBuildStep>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>steam_api64.lib;sdkencryptedappticket64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;..\redistributable_bin\win64;..\public\steam\lib\win64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy ..\redistributable_bin\win64\steam_api64.dll $(OutDir)
copy ..\public\steam\lib\win64\sdkencryptedappticket64.dll $(OutDir)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CustomBuildStep>
<Command />
</CustomBuildStep>
<ClCompile>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>steam_api.lib;sdkencryptedappticket.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;..\redistributable_bin;..\public\steam\lib\win32\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy ..\redistributable_bin\steam_api.dll $(OutDir)
copy ..\public\steam\lib\win32\sdkencryptedappticket.dll $(OutDir)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CustomBuildStep>
<Command />
</CustomBuildStep>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include;..\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>steam_api64.lib;sdkencryptedappticket64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;..\redistributable_bin\win64;..\public\steam\lib\win64\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy ..\redistributable_bin\win64\steam_api64.dll $(OutDir)
copy ..\public\steam\lib\win64\sdkencryptedappticket64.dll $(OutDir)
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BaseMenu.cpp" />
<ClCompile Include="clanchatroom.cpp" />
<ClCompile Include="connectingmenu.cpp" />
<ClCompile Include="Friends.cpp" />
<ClCompile Include="gameenginewin32.cpp" />
<ClCompile Include="htmlsurface.cpp" />
<ClCompile Include="Inventory.cpp" />
<ClCompile Include="Leaderboards.cpp" />
<ClCompile Include="Lobby.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="MainMenu.cpp" />
<ClCompile Include="musicplayer.cpp" />
<ClCompile Include="p2pauth.cpp" />
<ClCompile Include="PhotonBeam.cpp" />
<ClCompile Include="QuitMenu.cpp" />
<ClCompile Include="RemotePlay.cpp" />
<ClCompile Include="RemoteStorage.cpp" />
<ClCompile Include="ServerBrowser.cpp" />
<ClCompile Include="Ship.cpp" />
<ClCompile Include="SpaceWarClient.cpp" />
<ClCompile Include="SpaceWarEntity.cpp" />
<ClCompile Include="SpaceWarServer.cpp" />
<ClCompile Include="StarField.cpp" />
<ClCompile Include="StatsAndAchievements.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="Sun.cpp" />
<ClCompile Include="VectorEntity.cpp" />
<ClCompile Include="voicechat.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="BaseMenu.h" />
<ClInclude Include="clanchatroom.h" />
<ClInclude Include="connectingmenu.h" />
<ClInclude Include="Friends.h" />
<ClInclude Include="GameEngine.h" />
<ClInclude Include="gameenginewin32.h" />
<ClInclude Include="htmlsurface.h" />
<ClInclude Include="Inventory.h" />
<ClInclude Include="Leaderboards.h" />
<ClInclude Include="Lobby.h" />
<ClInclude Include="MainMenu.h" />
<ClInclude Include="Messages.h" />
<ClInclude Include="musicplayer.h" />
<ClInclude Include="p2pauth.h" />
<ClInclude Include="PhotonBeam.h" />
<ClInclude Include="QuitMenu.h" />
<ClInclude Include="RemotePlay.h" />
<ClInclude Include="RemoteStorage.h" />
<ClInclude Include="ServerBrowser.h" />
<ClInclude Include="ServerBrowserMenu.h" />
<ClInclude Include="Ship.h" />
<ClInclude Include="SpaceWar.h" />
<ClInclude Include="SpaceWarClient.h" />
<ClInclude Include="SpaceWarEntity.h" />
<ClInclude Include="SpaceWarServer.h" />
<ClInclude Include="StarField.h" />
<ClInclude Include="StatsAndAchievements.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="Sun.h" />
<ClInclude Include="VectorEntity.h" />
<ClInclude Include="voicechat.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files\Engine">
<UniqueIdentifier>{4c521d36-b933-4349-8687-1b507ca5e20f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Game">
<UniqueIdentifier>{6a19ec6d-dddf-4a96-a98e-e64f8689fe5f}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Header Files\Engine">
<UniqueIdentifier>{359396a6-2ea2-48ca-87e8-a70db22d0850}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Game">
<UniqueIdentifier>{6d8f438b-6605-40e3-9238-2606b6ea9dd0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="gameenginewin32.cpp">
<Filter>Source Files\Engine</Filter>
</ClCompile>
<ClCompile Include="VectorEntity.cpp">
<Filter>Source Files\Engine</Filter>
</ClCompile>
<ClCompile Include="BaseMenu.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="clanchatroom.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="connectingmenu.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Friends.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="htmlsurface.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Inventory.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Leaderboards.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Lobby.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="MainMenu.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="musicplayer.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="p2pauth.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="PhotonBeam.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="QuitMenu.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="RemotePlay.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="RemoteStorage.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="ServerBrowser.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Ship.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="SpaceWarClient.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="SpaceWarEntity.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="SpaceWarServer.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="StarField.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="StatsAndAchievements.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="Sun.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
<ClCompile Include="voicechat.cpp">
<Filter>Source Files\Game</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GameEngine.h">
<Filter>Header Files\Engine</Filter>
</ClInclude>
<ClInclude Include="gameenginewin32.h">
<Filter>Header Files\Engine</Filter>
</ClInclude>
<ClInclude Include="VectorEntity.h">
<Filter>Header Files\Engine</Filter>
</ClInclude>
<ClInclude Include="BaseMenu.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="clanchatroom.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="connectingmenu.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Friends.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="htmlsurface.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Inventory.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Leaderboards.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Lobby.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="MainMenu.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Messages.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="musicplayer.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="p2pauth.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="PhotonBeam.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="QuitMenu.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="RemotePlay.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="RemoteStorage.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="ServerBrowser.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="ServerBrowserMenu.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Ship.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="SpaceWar.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="SpaceWarClient.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="SpaceWarEntity.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="SpaceWarServer.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="StarField.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="StatsAndAchievements.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="Sun.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
<ClInclude Include="voicechat.h">
<Filter>Header Files\Game</Filter>
</ClInclude>
</ItemGroup>
</Project>
+9 -7
View File
@@ -23,16 +23,18 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 2k or later.
#define WINVER 0x0500 // Change this to the appropriate value to target other versions of Windows.
// Allow use of features specific to Windows 8.1 or later.
// Change this to the appropriate value to target other versions of Windows.
#ifndef WINVER
#define WINVER 0x0602
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows 2k or later.
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0602
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0602
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
+646
View File
@@ -0,0 +1,646 @@
"controller_mappings"
{
"version" "3"
"title" "#title"
"description" "#description"
"controller_type" "controller_steamcontroller_gordon"
"Timestamp" "1529529957"
"actions"
{
"ship_controls"
{
"title" "Ship Controls"
"legacy_set" "0"
"StickPadGyro"
{
"analog_controls"
{
"title" "#AnalogControls"
"input_mode" "joystick_move"
}
}
"Button"
{
"turn_left" "#TurnLeft"
"turn_right" "#TurnRight"
"fire_lasers" "#FireLasers"
"pause_menu" "#PauseMenu"
"forward_thrust" "#ForwardThrust"
"backward_thrust" "#BackwardThrust"
}
"Layers"
{
"thrust_action_layer" "#ThrustLayer"
}
}
"menu_controls"
{
"title" "#MenuControls"
"legacy_set" "0"
"Button"
{
"menu_up" "#MenuUp"
"menu_down" "#MenuDown"
"menu_left" "#MenuLeft"
"menu_right" "#MenuRight"
"menu_select" "#MenuSelect"
"menu_cancel" "#MenuCancel"
}
}
}
"action_layers"
{
"thrust_action_layer"
{
"title" "#ThrustLayer"
"legacy_set" "1"
"set_layer" "1"
"parent_set_name" "ship_controls"
}
}
"localization"
{
"english"
{
"title" "Space War Action Set Config Sample"
"description" "This is an example configuration for using Steamworks Action Sets."
"AnalogControls" "Analog Controls"
"TurnLeft" "Turn Left"
"TurnRight" "Turn Right"
"FireLasers" "Fire Lasers"
"PauseMenu" "Pause Menu"
"BackwardThrust" "Backward Thrust"
"MenuControls" "Menu Controls"
"MenuUp" "Menu Up"
"MenuDown" "Menu Down"
"MenuLeft" "Menu Left"
"MenuRight" "Menu Right"
"MenuSelect" "Menu Select"
"ThrustLayer" "Thrust Layer"
}
}
"group"
{
"id" "0"
"mode" "four_buttons"
"inputs"
{
}
"settings"
{
"button_size" "17988"
"button_dist" "19988"
}
}
"group"
{
"id" "1"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "2"
"mode" "trigger"
"inputs"
{
"edge"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls fire_lasers"
}
"settings"
{
"haptic_intensity" "2"
}
}
}
}
}
}
"group"
{
"id" "3"
"mode" "four_buttons"
"inputs"
{
"button_a"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_select"
}
}
}
}
"button_b"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_cancel"
}
}
}
}
}
"settings"
{
"button_size" "17992"
"button_dist" "19992"
}
}
"group"
{
"id" "4"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "5"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "6"
"mode" "dpad"
"inputs"
{
"dpad_north"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_up"
}
}
}
}
"dpad_south"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_down"
}
}
}
}
"dpad_east"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_right"
}
}
}
}
"dpad_west"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_left"
}
}
}
}
}
"settings"
{
"edge_binding_radius" "24995"
"analog_emulation_period" "29"
}
}
"group"
{
"id" "7"
"mode" "dpad"
"inputs"
{
}
"settings"
{
"edge_binding_radius" "24995"
"analog_emulation_period" "29"
}
}
"group"
{
"id" "8"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24997"
"sensitivity" "98"
}
}
"group"
{
"id" "9"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24997"
"sensitivity" "98"
}
}
"group"
{
"id" "10"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24996"
"sensitivity" "98"
}
}
"group"
{
"id" "11"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "12"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "13"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "14"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "15"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "16"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "17"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "18"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "19"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "20"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "21"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "22"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "23"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "24"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "25"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "26"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24999"
"sensitivity" "99"
}
"gameactions"
{
"ship_controls" "analog_controls"
}
}
"group"
{
"id" "35"
"mode" "four_buttons"
"inputs"
{
"button_a"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls fire_lasers, Fire Lasers"
}
}
}
}
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "36"
"mode" "trigger"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "37"
"mode" "trigger"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "38"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"layer" "1"
}
"gameactions"
{
"ship_controls" "analog_controls"
}
}
"group"
{
"id" "39"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "27"
"mode" "switches"
"inputs"
{
"button_escape"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls pause_menu"
}
}
}
}
}
}
"group"
{
"id" "28"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "29"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "30"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "31"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "32"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "33"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "34"
"mode" "switches"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"preset"
{
"id" "0"
"name" "ship_controls"
"group_source_bindings"
{
"27" "switch active"
"0" "button_diamond active"
"1" "left_trigger active"
"2" "right_trigger active"
"7" "joystick inactive"
"10" "joystick inactive"
"26" "joystick active"
"8" "left_trackpad inactive"
"9" "right_trackpad active"
}
}
"preset"
{
"id" "1"
"name" "menu_controls"
"group_source_bindings"
{
"28" "switch active"
"3" "button_diamond active"
"4" "left_trigger active"
"5" "right_trigger active"
"6" "joystick active"
}
}
"preset"
{
"id" "2"
"name" "thrust_action_layer"
"group_source_bindings"
{
"34" "switch active"
"35" "button_diamond active"
"36" "left_trigger active"
"37" "right_trigger active"
"38" "joystick active"
"39" "right_trackpad active"
}
}
"settings"
{
}
}
@@ -0,0 +1,94 @@
"Action Manifest"
{
"configurations"
{
"controller_xboxone"
{
"0"
{
"path" "xbox_controller.vdf"
}
}
"controller_steamcontroller_gordon"
{
"0"
{
"path" "steam_controller.vdf"
}
}
}
"actions"
{
"ship_controls"
{
"title" "Ship Controls"
"legacy_set" "0"
"StickPadGyro"
{
"analog_controls"
{
"title" "#AnalogControls"
"input_mode" "joystick_move"
}
}
"Button"
{
"turn_left" "#TurnLeft"
"turn_right" "#TurnRight"
"fire_lasers" "#FireLasers"
"pause_menu" "#PauseMenu"
"forward_thrust" "#ForwardThrust"
"backward_thrust" "#BackwardThrust"
}
"Layers"
{
"thrust_action_layer" "#ThrustLayer"
}
}
"menu_controls"
{
"title" "#MenuControls"
"legacy_set" "0"
"Button"
{
"menu_up" "#MenuUp"
"menu_down" "#MenuDown"
"menu_left" "#MenuLeft"
"menu_right" "#MenuRight"
"menu_select" "#MenuSelect"
"menu_cancel" "#MenuCancel"
}
}
}
"action_layers"
{
"thrust_action_layer"
{
"title" "#ThrustLayer"
"legacy_set" "1"
"set_layer" "1"
"parent_set_name" "ship_controls"
}
}
"localization"
{
"english"
{
"title" "Space War Action Set Config Sample"
"description" "This is an example configuration for using Steamworks Action Sets."
"AnalogControls" "Analog Controls"
"TurnLeft" "Turn Left"
"TurnRight" "Turn Right"
"FireLasers" "Fire Lasers"
"PauseMenu" "Pause Menu"
"BackwardThrust" "Backward Thrust"
"MenuControls" "Menu Controls"
"MenuUp" "Menu Up"
"MenuDown" "Menu Down"
"MenuLeft" "Menu Left"
"MenuRight" "Menu Right"
"MenuSelect" "Menu Select"
"ThrustLayer" "Thrust Layer"
}
}
}
+716
View File
@@ -0,0 +1,716 @@
"controller_mappings"
{
"version" "3"
"revision" "8"
"title" "#title"
"description" "#description"
"controller_type" "controller_xboxone"
"major_revision" "0"
"minor_revision" "0"
"Timestamp" "1559770832"
"actions"
{
"ship_controls"
{
"title" "Ship Controls"
"legacy_set" "0"
"StickPadGyro"
{
"analog_controls"
{
"title" "#AnalogControls"
"input_mode" "joystick_move"
}
}
"Button"
{
"turn_left" "#TurnLeft"
"turn_right" "#TurnRight"
"fire_lasers" "#FireLasers"
"pause_menu" "#PauseMenu"
"forward_thrust" "#ForwardThrust"
"backward_thrust" "#BackwardThrust"
}
"Layers"
{
"thrust_action_layer" "#ThrustLayer"
}
}
"menu_controls"
{
"title" "#MenuControls"
"legacy_set" "0"
"Button"
{
"menu_up" "#MenuUp"
"menu_down" "#MenuDown"
"menu_left" "#MenuLeft"
"menu_right" "#MenuRight"
"menu_select" "#MenuSelect"
"menu_cancel" "#MenuCancel"
}
}
}
"action_layers"
{
"thrust_action_layer"
{
"title" "#ThrustLayer"
"legacy_set" "1"
"set_layer" "1"
"parent_set_name" "ship_controls"
}
}
"localization"
{
"english"
{
"title" "Space War Action Set Config Sample"
"description" "This is an example configuration for using Steamworks Action Sets."
"AnalogControls" "Analog Controls"
"TurnLeft" "Turn Left"
"TurnRight" "Turn Right"
"FireLasers" "Fire Lasers"
"PauseMenu" "Pause Menu"
"BackwardThrust" "Backward Thrust"
"MenuControls" "Menu Controls"
"MenuUp" "Menu Up"
"MenuDown" "Menu Down"
"MenuLeft" "Menu Left"
"MenuRight" "Menu Right"
"MenuSelect" "Menu Select"
"ThrustLayer" "Thrust Layer"
}
}
"group"
{
"id" "0"
"mode" "four_buttons"
"inputs"
{
}
"settings"
{
"button_size" "17988"
"button_dist" "19988"
}
}
"group"
{
"id" "1"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "2"
"mode" "trigger"
"inputs"
{
"edge"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls fire_lasers"
}
"settings"
{
"haptic_intensity" "2"
}
}
}
}
}
}
"group"
{
"id" "3"
"mode" "four_buttons"
"inputs"
{
"button_a"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_select"
}
}
}
}
"button_b"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_cancel"
}
}
}
}
}
"settings"
{
"button_size" "17992"
"button_dist" "19992"
}
}
"group"
{
"id" "4"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "5"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "6"
"mode" "dpad"
"inputs"
{
"dpad_north"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_up"
}
}
}
}
"dpad_south"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_down"
}
}
}
}
"dpad_east"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_right"
}
}
}
}
"dpad_west"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_left"
}
}
}
}
}
"settings"
{
"requires_click" "0"
"edge_binding_radius" "24995"
"analog_emulation_period" "29"
}
}
"group"
{
"id" "7"
"mode" "dpad"
"inputs"
{
}
"settings"
{
"requires_click" "0"
"edge_binding_radius" "24995"
"analog_emulation_period" "29"
}
}
"group"
{
"id" "8"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24997"
"sensitivity" "98"
}
}
"group"
{
"id" "9"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24997"
"sensitivity" "98"
}
}
"group"
{
"id" "10"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24996"
"sensitivity" "98"
}
}
"group"
{
"id" "11"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "12"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "13"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "14"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "15"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "16"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "17"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "18"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "19"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "20"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "21"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "22"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "23"
"mode" "four_buttons"
"inputs"
{
}
}
"group"
{
"id" "24"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "25"
"mode" "trigger"
"inputs"
{
}
}
"group"
{
"id" "26"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"virtual_mode" "1"
"edge_binding_radius" "24999"
"sensitivity" "99"
}
"gameactions"
{
"ship_controls" "analog_controls"
}
}
"group"
{
"id" "35"
"mode" "four_buttons"
"inputs"
{
"button_a"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls fire_lasers, Fire Lasers"
}
}
}
}
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "36"
"mode" "trigger"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "37"
"mode" "trigger"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "38"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"layer" "1"
}
"gameactions"
{
"ship_controls" "analog_controls"
}
}
"group"
{
"id" "39"
"mode" "joystick_move"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"group"
{
"id" "40"
"mode" "dpad"
"inputs"
{
"dpad_north"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_up, Menu Up"
}
}
}
}
"dpad_south"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_down, Menu Down"
}
}
}
}
"dpad_east"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_right, Menu Right"
}
}
}
}
"dpad_west"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action menu_controls menu_left, Menu Left"
}
}
}
}
}
"settings"
{
"requires_click" "0"
}
}
"group"
{
"id" "27"
"mode" "switches"
"inputs"
{
"button_escape"
{
"activators"
{
"Full_Press"
{
"bindings"
{
"binding" "game_action ship_controls pause_menu"
}
}
}
}
}
}
"group"
{
"id" "28"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "29"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "30"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "31"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "32"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "33"
"mode" "switches"
"inputs"
{
}
}
"group"
{
"id" "34"
"mode" "switches"
"inputs"
{
}
"settings"
{
"layer" "1"
}
}
"preset"
{
"id" "0"
"name" "ship_controls"
"group_source_bindings"
{
"27" "switch active"
"0" "button_diamond active"
"1" "left_trigger active"
"2" "right_trigger active"
"7" "joystick inactive"
"10" "joystick inactive"
"26" "joystick active"
"8" "dpad inactive"
"9" "right_joystick active"
}
}
"preset"
{
"id" "1"
"name" "menu_controls"
"group_source_bindings"
{
"28" "switch active"
"3" "button_diamond active"
"4" "left_trigger active"
"5" "right_trigger active"
"6" "joystick active"
"40" "dpad active"
}
}
"preset"
{
"id" "2"
"name" "thrust_action_layer"
"group_source_bindings"
{
"34" "switch active"
"35" "button_diamond active"
"36" "left_trigger active"
"37" "right_trigger active"
"38" "joystick active"
"39" "right_joystick active"
}
}
"settings"
{
}
}
+5
View File
@@ -8,6 +8,11 @@
#include "glmdisplay.h"
#include "cglmbuffer.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
// void BindBufferARB(enum target, uint buffer);
// void DeleteBuffersARB(sizei n, const uint *buffers);
// void GenBuffersARB(sizei n, uint *buffers);
+4 -1
View File
@@ -8,7 +8,10 @@
#include "cglmfbo.h"
// #include "../shaderapidx9/dxabstract.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
CGLMFBO::CGLMFBO( GLMContext *ctx )
{
+7 -2
View File
@@ -8,6 +8,11 @@
#include "cglmprogram.h"
#include "dxabstract.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
//===============================================================================
#if 0
@@ -1276,7 +1281,7 @@ void CGLMShaderPairCache::QueryShaderPair( int index, GLMShaderPairInfo *infoOut
if ( (index<0) || ( index >= (m_rows*m_ways) ) )
{
// no such location
memset( infoOut, sizeof(*infoOut), 0 );
memset( infoOut, 0, sizeof(*infoOut) );
infoOut->m_status = -1;
}
@@ -1301,7 +1306,7 @@ void CGLMShaderPairCache::QueryShaderPair( int index, GLMShaderPairInfo *infoOut
else
{
// not
memset( infoOut, sizeof(*infoOut), 0 );
memset( infoOut, 0, sizeof(*infoOut) );
infoOut->m_status = 0;
}
}
+5
View File
@@ -8,6 +8,11 @@
#include "cglmtex.h"
#include "dxabstract.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
//===============================================================================
#define TEXSPACE_LOGGING 0
+5
View File
@@ -5,6 +5,11 @@
#include "dxabstract.h"
#include "dx9asmtogl2.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
void Error( const char *fmt, ... )
{
+4
View File
@@ -18,6 +18,10 @@
#endif
#include <Carbon/Carbon.h>
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
#ifdef USE_ACTUAL_DX
+6 -1
View File
@@ -15,6 +15,11 @@ extern CGameEngineGL *g_engine; // so glmgr (which is C++) can call up to the g
#pragma clang diagnostic warning "-Wint-to-pointer-cast"
#endif
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
//===============================================================================
@@ -1752,7 +1757,7 @@ void GLMContext::QueryShaderPair( int index, GLMShaderPairInfo *infoOut )
}
else
{
memset( infoOut, sizeof( *infoOut ), 0 );
memset( infoOut, 0, sizeof( *infoOut ) );
infoOut->m_status = -1;
}
}
+5
View File
@@ -7,6 +7,11 @@
#include "glmgrbasics.h"
#include "dxabstract.h"
#ifdef OSX
// Debugger - 10.8
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
#if __MAC_OS_X_VERSION_MAX_ALLOWED <= __MAC_10_6
#include <OpenGL/CGLProfiler.h>
#include <OpenGL/CGLProfilerFunctionEnum.h>
+4
View File
@@ -310,7 +310,11 @@ inline void GLMDebugger( void )
{
if (GLMDebugChannelMask() & (1<<eDebugger))
{
#if defined( OSX ) && defined( __aarch64__ )
__builtin_debugtrap();
#else
asm ( "int $3" );
#endif
}
if (GLMDebugChannelMask() & (1<<eGLProfiler))
+4
View File
@@ -17,6 +17,10 @@
//#include "tier1/utllinkedlist.h"
#include "glmgr.h"
// Debugger - 10.8
// CGDisplayModeCopyPixelEncoding - 10.11
// CGDisplayIOServicePort - 10.9
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
//===============================================================================
+13
View File
@@ -8,7 +8,12 @@
#include <float.h>
#include <stdlib.h>
#include <string.h>
#if defined( OSX ) && defined( __aarch64__ )
#include <simd/simd.h>
#else
#include <xmmintrin.h>
#endif
//-----------------------------------------------------------------------------
// macros
@@ -128,16 +133,24 @@ inline void SinCos( float radians, float *sine, float *cosine )
#ifndef FastSqrt
inline float FastSqrt( float x )
{
#if defined( OSX ) && defined( __aarch64__ )
return simd::sqrt( x );
#else
__m128 root = _mm_sqrt_ss( _mm_load_ss( &x ) );
return *( reinterpret_cast<float *>( &root ) );
#endif
}
#endif
inline float FastRSqrtFast( float x )
{
#if defined( OSX ) && defined( __aarch64__ )
return simd::fast::rsqrt( x );
#else
// use intrinsics
__m128 rroot = _mm_rsqrt_ss( _mm_load_ss( &x ) );
return *( reinterpret_cast<float *>( &rroot ) );
#endif
}
// Single iteration NewtonRaphson reciprocal square root:
// 0.5 * rsqrtps * (3 - x * rsqrtps(x) * rsqrtps(x))
+6 -5
View File
@@ -11,7 +11,6 @@
#endif
#include "steam_api_common.h"
#include "steamtypes.h"
//-----------------------------------------------------------------------------
// Purpose: This is a restricted interface that can only be used by previously approved apps,
@@ -51,16 +50,18 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIS
// Purpose: Sent when a new app is installed
//---------------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 )
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app is installed
STEAM_CALLBACK_END( 2 )
//---------------------------------------------------------------------------------
// Purpose: Sent when an app is uninstalled
//---------------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 )
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_END(1)
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app was installed
STEAM_CALLBACK_END(2)
#pragma pack( pop )
-4
View File
@@ -116,10 +116,6 @@ public:
inline ISteamApps *SteamApps();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
// Global accessor for the gameserver client
inline ISteamApps *SteamGameServerApps();
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamApps *, SteamGameServerApps, STEAMAPPS_INTERFACE_VERSION );
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
+1 -1
View File
@@ -1,4 +1,4 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Internal low-level access to Steamworks interfaces.
//
+6 -1
View File
@@ -367,6 +367,11 @@ enum EControllerActionOrigin
k_EControllerActionOrigin_PS5_Gyro_Yaw,
k_EControllerActionOrigin_PS5_Gyro_Roll,
k_EControllerActionOrigin_XBoxOne_LeftGrip_Lower,
k_EControllerActionOrigin_XBoxOne_LeftGrip_Upper,
k_EControllerActionOrigin_XBoxOne_RightGrip_Lower,
k_EControllerActionOrigin_XBoxOne_RightGrip_Upper,
k_EControllerActionOrigin_XBoxOne_Share,
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.
@@ -592,7 +597,7 @@ public:
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
//-----------------------------------------------------------------------------
// Utility functions availible without using the rest of Steam Input API
// Utility functions available without using the rest of Steam Input API
//-----------------------------------------------------------------------------
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
+75 -59
View File
@@ -91,14 +91,23 @@ public:
/// Set name of map to report in the server browser
///
/// @see k_cbMaxGameServerName
/// @see k_cbMaxGameServerMapName
virtual void SetMapName( const char *pszMapName ) = 0;
/// Let people know if your server will require a password
virtual void SetPasswordProtected( bool bPasswordProtected ) = 0;
/// Spectator server. The default value is zero, meaning the service
/// is not used.
/// Spectator server port to advertise. The default value is zero, meaning the
/// service is not used. If your server receives any info requests on the LAN,
/// this is the value that will be placed into the reply for such local queries.
///
/// This is also the value that will be advertised by the master server.
/// The only exception is if your server is using a FakeIP. Then then the second
/// fake port number (index 1) assigned to your server will be listed on the master
/// server as the spectator port, if you set this value to any nonzero value.
///
/// This function merely controls the values that are advertised -- it's up to you to
/// configure the server to actually listen on this port and handle any spectator traffic
virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0;
/// Name of the spectator server. (Only used if spectator port is nonzero.)
@@ -120,8 +129,6 @@ public:
/// Sets a string defining the "gamedata" for this server, this is optional, but if it is set
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value
/// don't set this unless it actually changes, its only uploaded to the master once (when
/// acknowledged)
///
/// @see k_cbMaxGameServerGameData
virtual void SetGameData( const char *pchGameData ) = 0;
@@ -129,42 +136,20 @@ public:
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
virtual void SetRegion( const char *pszRegion ) = 0;
/// Indicate whether you wish to be listed on the master server list
/// and/or respond to server browser / LAN discovery packets.
/// The server starts with this value set to false. You should set all
/// relevant server parameters before enabling advertisement on the server.
///
/// (This function used to be named EnableHeartbeats, so if you are wondering
/// where that function went, it's right here. It does the same thing as before,
/// the old name was just confusing.)
virtual void SetAdvertiseServerActive( bool bActive ) = 0;
//
// Player list management / authentication
// Player list management / authentication.
//
// Handles receiving a new connection from a Steam user. This call will ask the Steam
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
// are off-line, then it will validate the cached ticket itself which will validate app ownership
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
// and must then be sent up to the game server for authentication.
//
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
virtual bool SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
//
// Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()
// when this user leaves the server just like you would for a real user.
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
// Should be called whenever a user leaves our game server, this lets Steam internally
// track which users are currently on which servers for the purposes of preventing a single
// account being logged into multiple servers, showing who is currently on a server, etc.
virtual void SendUserDisconnect( CSteamID steamIDUser ) = 0;
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
// currently connected to the server. For regular users you must call this after you receive a
// GSUserValidationSuccess callback.
//
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
// New auth system APIs - do not mix with the old auth system APIs.
// ----------------------------------------------------------------
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
// pcbTicket retrieves the length of the actual ticket.
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
@@ -199,13 +184,10 @@ public:
// connect to
virtual SteamIPAddress_t GetPublicIP() = 0;
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
// socket to talk to the master server on, it lets the game use its socket to forward messages
// back and forth. This prevents us from requiring server ops to open up yet another port
// in their firewalls.
//
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
// Server browser related query packet processing for shared socket mode. These are used
// when you pass STEAMGAMESERVER_QUERY_PORT_SHARED as the query port to SteamGameServer_Init.
// IP address and port are in host order, i.e 127.0.0.1 == 0x7f000001
// These are used when you've elected to multiplex the game server's UDP socket
// rather than having the master server updater use its own sockets.
//
@@ -223,21 +205,9 @@ public:
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
//
// Control heartbeats / advertisement with master server
// Server clan association
//
// Call this as often as you like to tell the master server updater whether or not
// you want it to be active (default: off).
virtual void EnableHeartbeats( bool bActive ) = 0;
// You usually don't need to modify this.
// Pass -1 to use the default value for iHeartbeatInterval.
// Some mods change this.
virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0;
// Force a heartbeat to steam at the next opportunity
virtual void ForceHeartbeat() = 0;
// associate this game server with this clan for the purposes of computing player compat
STEAM_CALL_RESULT( AssociateWithClanResult_t )
virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0;
@@ -246,9 +216,55 @@ public:
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
// Handles receiving a new connection from a Steam user. This call will ask the Steam
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
// are off-line, then it will validate the cached ticket itself which will validate app ownership
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
// and must then be sent up to the game server for authentication.
//
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
//
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
// Please migrate to BeginAuthSession and related functions.
virtual bool SendUserConnectAndAuthenticate_DEPRECATED( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
//
// Return Value: Returns a SteamID for the user to be tracked with, you should call EndAuthSession()
// when this user leaves the server just like you would for a real user.
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
// Should be called whenever a user leaves our game server, this lets Steam internally
// track which users are currently on which servers for the purposes of preventing a single
// account being logged into multiple servers, showing who is currently on a server, etc.
//
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
// Please migrate to BeginAuthSession and related functions.
virtual void SendUserDisconnect_DEPRECATED( CSteamID steamIDUser ) = 0;
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
// currently connected to the server. For regular users you must call this after you receive a
// GSUserValidationSuccess callback.
//
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
// Deprecated functions. These will be removed in a future version of the SDK.
// If you really need these, please contact us and help us understand what you are
// using them for.
STEAM_PRIVATE_API(
virtual void SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) = 0;
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
)
};
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer013"
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer014"
// Global accessor
inline ISteamGameServer *SteamGameServer();
-1
View File
@@ -201,7 +201,6 @@ public:
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
// You MUST call this in response to a HTML_FileOpenDialog_t callback
STEAM_IGNOREATTR()
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
};
+193 -20
View File
@@ -206,11 +206,11 @@ enum EInputActionOrigin
k_EInputActionOrigin_XBoxOne_DPad_West,
k_EInputActionOrigin_XBoxOne_DPad_East,
k_EInputActionOrigin_XBoxOne_DPad_Move,
k_EInputActionOrigin_XBoxOne_Reserved1,
k_EInputActionOrigin_XBoxOne_Reserved2,
k_EInputActionOrigin_XBoxOne_Reserved3,
k_EInputActionOrigin_XBoxOne_Reserved4,
k_EInputActionOrigin_XBoxOne_Reserved5,
k_EInputActionOrigin_XBoxOne_LeftGrip_Lower,
k_EInputActionOrigin_XBoxOne_LeftGrip_Upper,
k_EInputActionOrigin_XBoxOne_RightGrip_Lower,
k_EInputActionOrigin_XBoxOne_RightGrip_Upper,
k_EInputActionOrigin_XBoxOne_Share, // Xbox Series X controllers only
k_EInputActionOrigin_XBoxOne_Reserved6,
k_EInputActionOrigin_XBoxOne_Reserved7,
k_EInputActionOrigin_XBoxOne_Reserved8,
@@ -450,6 +450,20 @@ enum ESteamControllerPad
k_ESteamControllerPad_Right
};
enum EControllerHapticLocation
{
k_EControllerHapticLocation_Left = ( 1 << k_ESteamControllerPad_Left ),
k_EControllerHapticLocation_Right = ( 1 << k_ESteamControllerPad_Right ),
k_EControllerHapticLocation_Both = ( 1 << k_ESteamControllerPad_Left | 1 << k_ESteamControllerPad_Right ),
};
enum EControllerHapticType
{
k_EControllerHapticType_Off,
k_EControllerHapticType_Tick,
k_EControllerHapticType_Click,
};
enum ESteamInputType
{
k_ESteamInputType_Unknown,
@@ -470,6 +484,16 @@ enum ESteamInputType
k_ESteamInputType_MaximumPossibleValue = 255,
};
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
enum ESteamInputConfigurationEnableType
{
k_ESteamInputConfigurationEnableType_None = 0x0000,
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
k_ESteamInputConfigurationEnableType_Generic = 0x0004,
k_ESteamInputConfigurationEnableType_Switch = 0x0008,
};
// These values are passed into SetLEDColor
enum ESteamInputLEDFlag
{
@@ -479,11 +503,24 @@ enum ESteamInputLEDFlag
k_ESteamInputLEDFlag_RestoreUserDefault
};
// These values are passed into GetGlyphPNGForActionOrigin
enum ESteamInputGlyphSize
{
k_ESteamInputGlyphSize_Small,
k_ESteamInputGlyphSize_Medium,
k_ESteamInputGlyphSize_Large,
};
enum ESteamInputActionEventType
{
ESteamInputActionEventType_DigitalAction,
ESteamInputActionEventType_AnalogAction,
};
// InputHandle_t is used to refer to a specific controller.
// This handle will consistently identify a controller, even if it is disconnected and re-connected
typedef uint64 InputHandle_t;
// These handles are used to refer to a specific in-game action or action set
// All action handles should be queried during initialization for performance reasons
typedef uint64 InputActionSetHandle_t;
@@ -532,8 +569,29 @@ struct InputMotionData_t
float rotVelZ;
};
//-----------------------------------------------------------------------------
// Purpose: when callbacks are enabled this fires each time a controller action
// state changes
//-----------------------------------------------------------------------------
struct SteamInputActionEvent_t
{
InputHandle_t controllerHandle;
ESteamInputActionEventType eEventType;
union {
struct {
InputAnalogActionHandle_t actionHandle;
InputAnalogActionData_t analogActionData;
} analogAction;
struct {
InputDigitalActionHandle_t actionHandle;
InputDigitalActionData_t digitalActionData;
} digitalAction;
};
};
#pragma pack( pop )
typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * );
//-----------------------------------------------------------------------------
// Purpose: Steam Input API
@@ -542,15 +600,33 @@ class ISteamInput
{
public:
// Init and Shutdown must be called when starting/ending use of this interface
virtual bool Init() = 0;
// Init and Shutdown must be called when starting/ending use of this interface.
// if bExplicitlyCallRunFrame is called then you will need to manually call RunFrame
// each frame, otherwise Steam Input will updated when SteamAPI_RunCallbacks() is called
virtual bool Init( bool bExplicitlyCallRunFrame ) = 0;
virtual bool Shutdown() = 0;
// Synchronize API state with the latest Steam Controller inputs available. This
// Set the absolute path to the Input Action Manifest file containing the in-game actions
// and file paths to the official configurations. Used in games that bundle Steam Input
// configurations inside of the game depot instead of using the Steam Workshop
virtual bool SetInputActionManifestFilePath( const char *pchInputActionManifestAbsolutePath ) = 0;
// Synchronize API state with the latest Steam Input action data available. This
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
// possible latency, you call this directly before reading controller state. This must
// be called from somewhere before GetConnectedControllers will return any handles
virtual void RunFrame() = 0;
// possible latency, you call this directly before reading controller state.
// Note: This must be called from somewhere before GetConnectedControllers will
// return any handles
virtual void RunFrame( bool bReservedValue = true ) = 0;
// Waits on an IPC event from Steam sent when there is new data to be fetched from
// the data drop. Returns true when data was recievied before the timeout expires.
// Useful for games with a dedicated input thread
virtual bool BWaitForData( bool bWaitForever, uint32 unTimeout ) = 0;
// Returns true if new data has been received since the last time action data was accessed
// via GetDigitalActionData or GetAnalogActionData. The game will still need to call
// SteamInput()->RunFrame() or SteamAPI_RunCallbacks() before this to update the data stream
virtual bool BNewDataAvailable() = 0;
// Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via
// the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam.
@@ -558,6 +634,32 @@ public:
// Returns the number of handles written to handlesOut
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_COUNT, Receives list of connected controllers ) InputHandle_t *handlesOut ) = 0;
//-----------------------------------------------------------------------------
// CALLBACKS
//-----------------------------------------------------------------------------
// Controller configuration loaded - these callbacks will always fire if you have
// a handler. Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputConfigurationLoaded_t )
// Enable SteamInputDeviceConnected_t and SteamInputDeviceDisconnected_t callbacks.
// Each controller that is already connected will generate a device connected
// callback when you enable them
virtual void EnableDeviceCallbacks() = 0;
// Controller Connected - provides info about a single newly connected controller
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputDeviceConnected_t )
// Controller Disconnected - provides info about a single disconnected controller
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
STEAM_CALL_BACK( SteamInputDeviceDisconnected_t )
// Enable SteamInputActionEvent_t callbacks. Directly calls your callback function
// for lower latency than standard Steam callbacks. Supports one callback at a time.
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
virtual void EnableActionEventCallbacks( SteamInputActionEventCallbackPointer pCallback ) = 0;
//-----------------------------------------------------------------------------
// ACTION SETS
//-----------------------------------------------------------------------------
@@ -575,8 +677,9 @@ public:
virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0;
// Enumerate currently active layers.
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of ControllerActionSetHandle_t handles
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of InputActionSetHandle_t handles
// Returns the number of handles written to handlesOut
virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ACTIVE_LAYERS, Receives list of active layers ) InputActionSetHandle_t *handlesOut ) = 0;
@@ -595,6 +698,9 @@ public:
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
virtual const char *GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle ) = 0;
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
@@ -605,13 +711,22 @@ public:
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
// Get a local path to art for on-screen glyph for a particular origin
virtual const char *GetGlyphForActionOrigin( EInputActionOrigin eOrigin ) = 0;
// Get a local path to a PNG file for the provided origin's glyph.
virtual const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags ) = 0;
// Get a local path to a SVG file for the provided origin's glyph.
virtual const char *GetGlyphSVGForActionOrigin( EInputActionOrigin eOrigin, uint32 unFlags ) = 0;
// Get a local path to an older, Big Picture Mode-style PNG file for a particular origin
virtual const char *GetGlyphForActionOrigin_Legacy( EInputActionOrigin eOrigin ) = 0;
// Returns a localized string (from Steam's language setting) for the specified origin.
virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0;
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
virtual const char *GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle ) = 0;
// Stop analog momentum for the action if it is a mouse action in trackball mode
virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0;
@@ -625,20 +740,26 @@ public:
// Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers
virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
// Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers
virtual void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed ) = 0;
// Send a haptic pulse, works on Steam Deck and Steam Controller devices
virtual void TriggerSimpleHapticEvent( InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB ) = 0;
// Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle
// the behavior on exit of your program so you don't need to try restore the default as you are shutting down
virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
// Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead.
// Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc).
virtual void TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
virtual void Legacy_TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
// Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead.
// nFlags is currently unused and reserved for future use.
virtual void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
virtual void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
//-----------------------------------------------------------------------------
// Utility functions availible without using the rest of Steam Input API
// Utility functions available without using the rest of Steam Input API
//-----------------------------------------------------------------------------
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
@@ -677,12 +798,64 @@ public:
// Get the Steam Remote Play session ID associated with a device, or 0 if there is no session associated with it
// See isteamremoteplay.h for more information on Steam Remote Play sessions
virtual uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) = 0;
// Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.?
// Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration
virtual uint16 GetSessionInputConfigurationSettings() = 0;
};
#define STEAMINPUT_INTERFACE_VERSION "SteamInput002"
#define STEAMINPUT_INTERFACE_VERSION "SteamInput005"
// Global interface accessor
inline ISteamInput *SteamInput();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: called when a new controller has been connected, will fire once
// per controller if multiple new controllers connect in the same frame
//-----------------------------------------------------------------------------
struct SteamInputDeviceConnected_t
{
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
};
//-----------------------------------------------------------------------------
// Purpose: called when a new controller has been connected, will fire once
// per controller if multiple new controllers connect in the same frame
//-----------------------------------------------------------------------------
struct SteamInputDeviceDisconnected_t
{
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
};
//-----------------------------------------------------------------------------
// Purpose: called when a controller configuration has been loaded, will fire once
// per controller per focus change for Steam Input enabled controllers
//-----------------------------------------------------------------------------
struct SteamInputConfigurationLoaded_t
{
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
AppId_t m_unAppID;
InputHandle_t m_ulDeviceHandle; // Handle for device
CSteamID m_ulMappingCreator; // May differ from local user when using
// an unmodified community or official config
uint32 m_unMajorRevision; // Binding revision from In-game Action File.
// Same value as queried by GetDeviceBindingRevision
uint32 m_unMinorRevision;
bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions?
bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings?
};
#pragma pack( pop )
#endif // ISTEAMINPUT_H
-13
View File
@@ -86,12 +86,10 @@ public:
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
// k_EResultFail - ERROR: unknown / generic error
STEAM_METHOD_DESC(Find out the status of an asynchronous inventory result handle.)
virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0;
// Copies the contents of a result set into a flat array. The specific
// contents of the result set depend on which query which was used.
STEAM_METHOD_DESC(Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.)
virtual bool GetResultItems( SteamInventoryResult_t resultHandle,
STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
uint32 *punOutItemsArraySize ) = 0;
@@ -115,17 +113,14 @@ public:
// Returns the server time at which the result was generated. Compare against
// the value of IClientUtils::GetServerRealTime() to determine age.
STEAM_METHOD_DESC(Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.)
virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0;
// Returns true if the result belongs to the target steam ID, false if the
// result does not. This is important when using DeserializeResult, to verify
// that a remote player is not pretending to have a different user's inventory.
STEAM_METHOD_DESC(Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.)
virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0;
// Destroys a result handle and frees all associated memory.
STEAM_METHOD_DESC(Destroys a result handle and frees all associated memory.)
virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
@@ -139,7 +134,6 @@ public:
// cached results if called too frequently. It is suggested that you call
// this function only when you are about to display the user's full inventory,
// or if you expect that the inventory may have changed.
STEAM_METHOD_DESC(Captures the entire state of the current users Steam inventory.)
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
@@ -150,7 +144,6 @@ public:
// For example, you could call GetItemsByID with the IDs of the user's
// currently equipped cosmetic items and serialize this to a buffer, and
// then transmit this buffer to other players upon joining a game.
STEAM_METHOD_DESC(Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.)
virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
@@ -205,7 +198,6 @@ public:
// and grants the items (one time only). On success, the result set will include items which
// were granted, if any. If no items were granted because the user isn't eligible for any
// promotions, this is still considered a success.
STEAM_METHOD_DESC(GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).)
virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0;
// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
@@ -218,7 +210,6 @@ public:
// ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
// Not for the faint of heart - if your game implements item removal at all, a high-friction
// UI confirmation process is highly recommended.
STEAM_METHOD_DESC(ConsumeItem() removes items from the inventory permanently.)
virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0;
// ExchangeItems() is an atomic combination of item generation and consumption.
@@ -245,7 +236,6 @@ public:
//
// Deprecated. Calling this method is not required for proper playtime accounting.
STEAM_METHOD_DESC( Deprecated method. Playtime accounting is performed on the Steam servers. )
virtual void SendItemDropHeartbeat() = 0;
// Playtime credit must be consumed and turned into item drops by your game. Only item
@@ -257,7 +247,6 @@ public:
// to directly control rarity.
// See your Steamworks configuration to set playtime drop rates for individual itemdefs.
// The client library will suppress too-frequent calls to this method.
STEAM_METHOD_DESC(Playtime credit must be consumed and turned into item drops by your game.)
virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
@@ -281,7 +270,6 @@ public:
// Every time new item definitions are available (eg, from the dynamic addition of new
// item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
// callback will be fired.
STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of item definitions.)
virtual bool LoadItemDefinitions() = 0;
// GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
@@ -366,7 +354,6 @@ public:
// Submit the update request by handle
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
STEAM_METHOD_DESC(Look up the given token and return a pseudo-Inventory item.)
virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
};
-1
View File
@@ -1 +0,0 @@
#error "This file isn't used any more"
+30 -11
View File
@@ -15,10 +15,13 @@ class ISteamNetworkingSignalingRecvContext;
/// Lower level networking API.
///
/// - Connection-oriented API (like TCP, not UDP). When sending and receiving
/// messages, a connection handle is used. (For a UDP-style interface, see
/// ISteamNetworkingMessages.) In this TCP-style interface, the "server" will
/// "listen" on a "listen socket." A "client" will "connect" to the server,
/// and the server will "accept" the connection.
/// messages, a connection handle is used. (For a UDP-style interface, where
/// the peer is identified by their address with each send/recv call, see
/// ISteamNetworkingMessages.) The typical pattern is for a "server" to "listen"
/// on a "listen socket." A "client" will "connect" to the server, and the
/// server will "accept" the connection. If you have a symmetric situation
/// where either peer may initiate the connection and server/client roles are
/// not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
/// - But unlike TCP, it's message-oriented, not stream-oriented.
/// - Mix of reliable and unreliable messages
/// - Fragmentation and reassembly
@@ -192,7 +195,23 @@ public:
/// Set connection user data. the data is returned in the following places
/// - You can query it using GetConnectionUserData.
/// - The SteamNetworkingmessage_t structure.
/// - The SteamNetConnectionInfo_t structure. (Which is a member of SteamNetConnectionStatusChangedCallback_t.)
/// - The SteamNetConnectionInfo_t structure.
/// (Which is a member of SteamNetConnectionStatusChangedCallback_t -- but see WARNINGS below!!!!)
///
/// Do you need to set this atomically when the connection is created?
/// See k_ESteamNetworkingConfig_ConnectionUserData.
///
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
/// Callbacks are queued, and the value that you will receive in your
/// callback is the userdata that was effective at the time the callback
/// was queued. There are subtle race conditions that can happen if you
/// don't understand this!
///
/// If any incoming messages for this connection are queued, the userdata
/// field is updated, so that when when you receive messages (e.g. with
/// ReceiveMessagesOnConnection), they will always have the very latest
/// userdata. So the tricky race conditions that can happen with callbacks
/// do not apply to retrieving messages.
///
/// Returns false if the handle is invalid.
virtual bool SetConnectionUserData( HSteamNetConnection hPeer, int64 nUserData ) = 0;
@@ -258,7 +277,7 @@ public:
/// m_pData at your buffer and set the callback to the appropriate function
/// to free it. Note that if you use your own buffer, it MUST remain valid
/// until the callback is executed. And also note that your callback can be
/// invoked at ant time from any thread (perhaps even before SendMessages
/// invoked at any time from any thread (perhaps even before SendMessages
/// returns!), so it MUST be fast and threadsafe.
///
/// You MUST also fill in:
@@ -654,15 +673,15 @@ public:
/// to call ISteamNetworkingUtils::InitRelayNetworkAccess() when your app initializes
virtual bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext *pContext ) = 0;
//
// Certificate provision by the application. On Steam, we normally handle all this automatically
// and you will not need to use these advanced functions.
//
//
// Certificate provision by the application. On Steam, we normally handle all this automatically
// and you will not need to use these advanced functions.
//
/// Get blob that describes a certificate request. You can send this to your game coordinator.
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
/// size. (256 bytes is a very conservative estimate.)
/// size. (512 bytes is a conservative estimate.)
///
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg ) = 0;
+1 -1
View File
@@ -130,7 +130,7 @@ public:
/// currently answer the question for some other reason.
///
/// Do you need to be able to do this from a backend/matchmaking server?
/// You are looking for the "ticketgen" library.
/// You are looking for the "game coordinator" library.
virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2 ) = 0;
/// Same as EstimatePingTime, but assumes that one location is the local host.
+44 -68
View File
@@ -156,6 +156,28 @@ enum EUGCReadAction
k_EUGCRead_Close = 2,
};
enum ERemoteStorageLocalFileChange
{
k_ERemoteStorageLocalFileChange_Invalid = 0,
// The file was updated from another device
k_ERemoteStorageLocalFileChange_FileUpdated = 1,
// The file was deleted by another device
k_ERemoteStorageLocalFileChange_FileDeleted = 2,
};
enum ERemoteStorageFilePathType
{
k_ERemoteStorageFilePathType_Invalid = 0,
// The file is directly accessed by the game and this is the full path
k_ERemoteStorageFilePathType_Absolute = 1,
// The file is accessed via the ISteamRemoteStorage API and this is the filename
k_ERemoteStorageFilePathType_APIFilename = 2,
};
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing, reading and writing files stored remotely
@@ -238,24 +260,6 @@ class ISteamRemoteStorage
virtual int32 GetCachedUGCCount() = 0;
virtual UGCHandle_t GetCachedUGCHandle( int32 iCachedContent ) = 0;
// The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you
// On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget.
#if defined(_SERVER)
// Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback
virtual void GetFileListFromServer() = 0;
// Indicate this file should be downloaded in the next sync
virtual bool FileFetch( const char *pchFile ) = 0;
// Indicate this file should be persisted in the next sync
virtual bool FilePersist( const char *pchFile ) = 0;
// Pull any requested files down from the Cloud - results in a RemoteStorageAppSyncedClient_t callback
virtual bool SynchronizeToClient() = 0;
// Upload any requested files to the Cloud - results in a RemoteStorageAppSyncedServer_t callback
virtual bool SynchronizeToServer() = 0;
// Reset any fetch/persist/etc requests
virtual bool ResetFileRequestState() = 0;
#endif
// publishing UGC
STEAM_CALL_RESULT( RemoteStoragePublishFileProgress_t )
virtual SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType ) = 0;
@@ -305,9 +309,18 @@ class ISteamRemoteStorage
STEAM_CALL_RESULT( RemoteStorageDownloadUGCResult_t )
virtual SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority ) = 0;
// Cloud dynamic state change notification
virtual int32 GetLocalFileChangeCount() = 0;
virtual const char *GetLocalFileChange( int iFile, ERemoteStorageLocalFileChange *pEChangeType, ERemoteStorageFilePathType *pEFilePathType ) = 0;
// Indicate to Steam the beginning / end of a set of local file
// operations - for example, writing a game save that requires updating two files.
virtual bool BeginFileWriteBatch() = 0;
virtual bool EndFileWriteBatch() = 0;
};
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION014"
#define STEAMREMOTESTORAGE_INTERFACE_VERSION "STEAMREMOTESTORAGE_INTERFACE_VERSION016"
// Global interface accessor
inline ISteamRemoteStorage *SteamRemoteStorage();
@@ -322,61 +335,13 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemoteStorage *, SteamRemoteStorage,
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
#endif
//-----------------------------------------------------------------------------
// Purpose: sent when the local file cache is fully synced with the server for an app
// That means that an application can be started and has all latest files
//-----------------------------------------------------------------------------
struct RemoteStorageAppSyncedClient_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 1 };
AppId_t m_nAppID;
EResult m_eResult;
int m_unNumDownloads;
};
//-----------------------------------------------------------------------------
// Purpose: sent when the server is fully synced with the local file cache for an app
// That means that we can shutdown Steam and our data is stored on the server
//-----------------------------------------------------------------------------
struct RemoteStorageAppSyncedServer_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 2 };
AppId_t m_nAppID;
EResult m_eResult;
int m_unNumUploads;
};
//-----------------------------------------------------------------------------
// Purpose: Status of up and downloads during a sync session
//
//-----------------------------------------------------------------------------
struct RemoteStorageAppSyncProgress_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 3 };
char m_rgchCurrentFile[k_cchFilenameMax]; // Current file being transferred
AppId_t m_nAppID; // App this info relates to
uint32 m_uBytesTransferredThisChunk; // Bytes transferred this chunk
double m_dAppPercentComplete; // Percent complete that this app's transfers are
bool m_bUploading; // if false, downloading
};
//
// IMPORTANT! k_iClientRemoteStorageCallbacks + 4 is used, see iclientremotestorage.h
// IMPORTANT! k_iClientRemoteStorageCallbacks 1 through 6 are used, see iclientremotestorage.h
//
//-----------------------------------------------------------------------------
// Purpose: Sent after we've determined the list of files that are out of sync
// with the server.
//-----------------------------------------------------------------------------
struct RemoteStorageAppSyncStatusCheck_t
{
enum { k_iCallback = k_iClientRemoteStorageCallbacks + 5 };
AppId_t m_nAppID;
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Purpose: The result of a call to FileShare()
//-----------------------------------------------------------------------------
@@ -403,6 +368,9 @@ struct RemoteStoragePublishFileResult_t
bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
// k_iClientRemoteStorageCallbacks + 10 is deprecated! Do not reuse
//-----------------------------------------------------------------------------
// Purpose: The result of a call to DeletePublishedFile()
@@ -682,6 +650,14 @@ struct RemoteStorageFileReadAsyncComplete_t
uint32 m_cubRead; // amount read - will the <= the amount requested
};
//-----------------------------------------------------------------------------
// Purpose: one or more files for this app have changed locally after syncing
// to remote session changes
// Note: only posted if this happens DURING the local app session
//-----------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( RemoteStorageLocalFileChange_t, k_iClientRemoteStorageCallbacks + 33 )
STEAM_CALLBACK_END( 0 )
#pragma pack( pop )
+32
View File
@@ -99,6 +99,7 @@ enum EUGCQuery
k_EUGCQuery_RankedByLifetimeAveragePlaytime = 16,
k_EUGCQuery_RankedByPlaytimeSessionsTrend = 17,
k_EUGCQuery_RankedByLifetimePlaytimeSessions = 18,
k_EUGCQuery_RankedByLastUpdatedDate = 19,
};
enum EItemUpdateStatus
@@ -360,6 +361,12 @@ public:
// delete the item without prompting the user
STEAM_CALL_RESULT( DeleteItemResult_t )
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
// Show the app's latest Workshop EULA to the user in an overlay window, where they can accept it or not
virtual bool ShowWorkshopEULA() = 0;
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
};
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION015"
@@ -566,6 +573,31 @@ struct DeleteItemResult_t
PublishedFileId_t m_nPublishedFileId;
};
//-----------------------------------------------------------------------------
// Purpose: signal that the list of subscribed items changed
//-----------------------------------------------------------------------------
struct UserSubscribedItemsListChanged_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 18 };
AppId_t m_nAppID;
};
//-----------------------------------------------------------------------------
// Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA
//-----------------------------------------------------------------------------
struct WorkshopEULAStatus_t
{
enum { k_iCallback = k_iClientUGCCallbacks + 20 };
EResult m_eResult;
AppId_t m_nAppID;
uint32 m_unVersion;
RTime32 m_rtAction;
bool m_bAccepted;
bool m_bNeedsAction;
};
#pragma pack( pop )
#endif // ISTEAMUGC_H
+8 -2
View File
@@ -47,11 +47,17 @@ public:
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
//
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
// Please migrate to BeginAuthSession and related functions.
virtual int InitiateGameConnection_DEPRECATED( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
//
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
// Please migrate to BeginAuthSession and related functions.
virtual void TerminateGameConnection_DEPRECATED( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
+1 -2
View File
@@ -210,8 +210,7 @@ public:
// as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
// if a user doesn't have a leaderboard entry, they won't be included in the result
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
+34 -3
View File
@@ -41,6 +41,14 @@ enum EGamepadTextInputLineMode
k_EGamepadTextInputLineModeMultipleLines = 1
};
enum EFloatingGamepadTextInputMode
{
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
k_EFloatingGamepadTextInputModeModeEmail = 2,
k_EFloatingGamepadTextInputModeModeNumeric = 3,
};
// The context where text filtering is being done
enum ETextFilteringContext
@@ -146,7 +154,7 @@ public:
STEAM_CALL_RESULT( CheckFileSignature_t )
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
// Activates the Big Picture text input dialog which only supports gamepad input
// Activates the full-screen text input dialog which takes a initial text string and returns the text the user has typed
virtual bool ShowGamepadTextInput( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32 unCharMax, const char *pchExistingText ) = 0;
// Returns previously entered text & length
@@ -203,6 +211,16 @@ public:
// Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.
// This does NOT tell you if the Steam client is currently connected to Steam via ipv6.
virtual ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) = 0;
// returns true if currently running on the Steam Deck device
virtual bool IsSteamRunningOnSteamDeck() = 0;
// Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
// The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field
virtual bool ShowFloatingGamepadTextInput( EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight ) = 0;
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
virtual void SetGameLauncherMode( bool bLauncherMode ) = 0;
};
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
@@ -289,7 +307,7 @@ struct CheckFileSignature_t
//-----------------------------------------------------------------------------
// Big Picture gamepad text input has been closed
// Full Screen gamepad text input has been closed
//-----------------------------------------------------------------------------
struct GamepadTextInputDismissed_t
{
@@ -298,7 +316,20 @@ struct GamepadTextInputDismissed_t
uint32 m_unSubmittedText;
};
// k_iSteamUtilsCallbacks + 15 is taken
// k_iSteamUtilsCallbacks + 15 through 35 are taken
STEAM_CALLBACK_BEGIN( AppResumingFromSuspend_t, k_iSteamUtilsCallbacks + 36 )
STEAM_CALLBACK_END(0)
// k_iSteamUtilsCallbacks + 37 is taken
//-----------------------------------------------------------------------------
// The floating on-screen keyboard has been closed
//-----------------------------------------------------------------------------
struct FloatingGamepadTextInputDismissed_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 38 };
};
#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.
File diff suppressed because it is too large Load Diff
+42 -23
View File
@@ -60,8 +60,8 @@ S_API ISteamUser *SteamAPI_SteamUser_v021();
S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self );
S_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self );
S_API uint64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser* self );
S_API int SteamAPI_ISteamUser_InitiateGameConnection( ISteamUser* self, void * pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );
S_API void SteamAPI_ISteamUser_TerminateGameConnection( ISteamUser* self, uint32 unIPServer, uint16 usPortServer );
S_API int SteamAPI_ISteamUser_InitiateGameConnection_DEPRECATED( ISteamUser* self, void * pAuthBlob, int cbMaxAuthBlob, uint64_steamid steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );
S_API void SteamAPI_ISteamUser_TerminateGameConnection_DEPRECATED( ISteamUser* self, uint32 unIPServer, uint16 usPortServer );
S_API void SteamAPI_ISteamUser_TrackAppUsageEvent( ISteamUser* self, uint64_gameid gameID, int eAppUsageEvent, const char * pchExtraInfo );
S_API bool SteamAPI_ISteamUser_GetUserDataFolder( ISteamUser* self, char * pchBuffer, int cubBuffer );
S_API void SteamAPI_ISteamUser_StartVoiceRecording( ISteamUser* self );
@@ -204,6 +204,9 @@ S_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher( ISteamUtils* self );
S_API bool SteamAPI_ISteamUtils_InitFilterText( ISteamUtils* self, uint32 unFilterOptions );
S_API int SteamAPI_ISteamUtils_FilterText( ISteamUtils* self, ETextFilteringContext eContext, uint64_steamid sourceSteamID, const char * pchInputMessage, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText );
S_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState( ISteamUtils* self, ESteamIPv6ConnectivityProtocol eProtocol );
S_API bool SteamAPI_ISteamUtils_IsSteamRunningOnSteamDeck( ISteamUtils* self );
S_API bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUtils* self, EGamepadTextInputLineMode eLineInputMode );
S_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
// ISteamMatchmaking
S_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
@@ -318,7 +321,7 @@ S_API bool SteamAPI_ISteamParties_DestroyBeacon( ISteamParties* self, PartyBeaco
S_API bool SteamAPI_ISteamParties_GetBeaconLocationData( ISteamParties* self, SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut );
// ISteamRemoteStorage
S_API ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v014();
S_API ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v016();
S_API bool SteamAPI_ISteamRemoteStorage_FileWrite( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, int32 cubData );
S_API int32 SteamAPI_ISteamRemoteStorage_FileRead( ISteamRemoteStorage* self, const char * pchFile, void * pvData, int32 cubDataToRead );
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync( ISteamRemoteStorage* self, const char * pchFile, const void * pvData, uint32 cubData );
@@ -374,6 +377,10 @@ S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction( IS
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( ISteamRemoteStorage* self, EWorkshopFileAction eAction, uint32 unStartIndex );
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( ISteamRemoteStorage* self, EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t * pTags, SteamParamStringArray_t * pUserTags );
S_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation( ISteamRemoteStorage* self, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority );
S_API int32 SteamAPI_ISteamRemoteStorage_GetLocalFileChangeCount( ISteamRemoteStorage* self );
S_API const char * SteamAPI_ISteamRemoteStorage_GetLocalFileChange( ISteamRemoteStorage* self, int iFile, ERemoteStorageLocalFileChange * pEChangeType, ERemoteStorageFilePathType * pEFilePathType );
S_API bool SteamAPI_ISteamRemoteStorage_BeginFileWriteBatch( ISteamRemoteStorage* self );
S_API bool SteamAPI_ISteamRemoteStorage_EndFileWriteBatch( ISteamRemoteStorage* self );
// ISteamUserStats
S_API ISteamUserStats *SteamAPI_SteamUserStats_v012();
@@ -425,7 +432,6 @@ S_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat( ISteamUse
// ISteamApps
S_API ISteamApps *SteamAPI_SteamApps_v008();
S_API ISteamApps *SteamAPI_SteamGameServerApps_v008();
S_API bool SteamAPI_ISteamApps_BIsSubscribed( ISteamApps* self );
S_API bool SteamAPI_ISteamApps_BIsLowViolence( ISteamApps* self );
S_API bool SteamAPI_ISteamApps_BIsCybercafe( ISteamApps* self );
@@ -571,11 +577,16 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( ISteamHTTP* self
S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( ISteamHTTP* self, HTTPRequestHandle hRequest, bool * pbWasTimedOut );
// ISteamInput
S_API ISteamInput *SteamAPI_SteamInput_v002();
S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self );
S_API ISteamInput *SteamAPI_SteamInput_v005();
S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self, bool bExplicitlyCallRunFrame );
S_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self );
S_API bool SteamAPI_ISteamInput_SetInputActionManifestFilePath( ISteamInput* self, const char * pchInputActionManifestAbsolutePath );
S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self, bool bReservedValue );
S_API bool SteamAPI_ISteamInput_BWaitForData( ISteamInput* self, bool bWaitForever, uint32 unTimeout );
S_API bool SteamAPI_ISteamInput_BNewDataAvailable( ISteamInput* self );
S_API int SteamAPI_ISteamInput_GetConnectedControllers( ISteamInput* self, InputHandle_t * handlesOut );
S_API void SteamAPI_ISteamInput_EnableDeviceCallbacks( ISteamInput* self );
S_API void SteamAPI_ISteamInput_EnableActionEventCallbacks( ISteamInput* self, SteamInputActionEventCallbackPointer pCallback );
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetActionSetHandle( ISteamInput* self, const char * pszActionSetName );
S_API void SteamAPI_ISteamInput_ActivateActionSet( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
S_API InputActionSetHandle_t SteamAPI_ISteamInput_GetCurrentActionSet( ISteamInput* self, InputHandle_t inputHandle );
@@ -586,17 +597,23 @@ S_API int SteamAPI_ISteamInput_GetActiveActionSetLayers( ISteamInput* self, Inpu
S_API InputDigitalActionHandle_t SteamAPI_ISteamInput_GetDigitalActionHandle( ISteamInput* self, const char * pszActionName );
S_API InputDigitalActionData_t SteamAPI_ISteamInput_GetDigitalActionData( ISteamInput* self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
S_API int SteamAPI_ISteamInput_GetDigitalActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut );
S_API const char * SteamAPI_ISteamInput_GetStringForDigitalActionName( ISteamInput* self, InputDigitalActionHandle_t eActionHandle );
S_API InputAnalogActionHandle_t SteamAPI_ISteamInput_GetAnalogActionHandle( ISteamInput* self, const char * pszActionName );
S_API InputAnalogActionData_t SteamAPI_ISteamInput_GetAnalogActionData( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
S_API int SteamAPI_ISteamInput_GetAnalogActionOrigins( ISteamInput* self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut );
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin );
S_API const char * SteamAPI_ISteamInput_GetGlyphPNGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags );
S_API const char * SteamAPI_ISteamInput_GetGlyphSVGForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin, uint32 unFlags );
S_API const char * SteamAPI_ISteamInput_GetGlyphForActionOrigin_Legacy( ISteamInput* self, EInputActionOrigin eOrigin );
S_API const char * SteamAPI_ISteamInput_GetStringForActionOrigin( ISteamInput* self, EInputActionOrigin eOrigin );
S_API const char * SteamAPI_ISteamInput_GetStringForAnalogActionName( ISteamInput* self, InputAnalogActionHandle_t eActionHandle );
S_API void SteamAPI_ISteamInput_StopAnalogActionMomentum( ISteamInput* self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
S_API InputMotionData_t SteamAPI_ISteamInput_GetMotionData( ISteamInput* self, InputHandle_t inputHandle );
S_API void SteamAPI_ISteamInput_TriggerVibration( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed );
S_API void SteamAPI_ISteamInput_TriggerVibrationExtended( ISteamInput* self, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed );
S_API void SteamAPI_ISteamInput_TriggerSimpleHapticEvent( ISteamInput* self, InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB );
S_API void SteamAPI_ISteamInput_SetLEDColor( ISteamInput* self, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags );
S_API void SteamAPI_ISteamInput_TriggerHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
S_API void SteamAPI_ISteamInput_TriggerRepeatedHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
S_API void SteamAPI_ISteamInput_Legacy_TriggerHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec );
S_API void SteamAPI_ISteamInput_Legacy_TriggerRepeatedHapticPulse( ISteamInput* self, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags );
S_API bool SteamAPI_ISteamInput_ShowBindingPanel( ISteamInput* self, InputHandle_t inputHandle );
S_API ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle( ISteamInput* self, InputHandle_t inputHandle );
S_API InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex( ISteamInput* self, int nIndex );
@@ -607,6 +624,7 @@ S_API EInputActionOrigin SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin( ISt
S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin( ISteamInput* self, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin );
S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor );
S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle );
S_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self );
// ISteamController
S_API ISteamController *SteamAPI_SteamController_v008();
@@ -730,6 +748,8 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_AddAppDependency( ISteamUGC* self, Publi
S_API SteamAPICall_t SteamAPI_ISteamUGC_RemoveAppDependency( ISteamUGC* self, PublishedFileId_t nPublishedFileID, AppId_t nAppID );
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
S_API bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
// ISteamAppList
S_API ISteamAppList *SteamAPI_SteamAppList_v001();
@@ -858,8 +878,8 @@ S_API bool SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser( ISteamNetwork
S_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus );
// ISteamNetworkingSockets
S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009();
S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009();
S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v011();
S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v011();
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & localAddress, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & address, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
@@ -899,10 +919,11 @@ S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSigna
S_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext );
S_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg );
S_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg );
S_API void SteamAPI_ISteamNetworkingSockets_ResetIdentity( ISteamNetworkingSockets* self, const SteamNetworkingIdentity * pIdentity );
S_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self );
// ISteamNetworkingUtils
S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v003();
S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v004();
S_API SteamNetworkingMessage_t * SteamAPI_ISteamNetworkingUtils_AllocateMessage( ISteamNetworkingUtils* self, int cbAllocateBuffer );
S_API void SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess( ISteamNetworkingUtils* self );
S_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus( ISteamNetworkingUtils* self, SteamRelayNetworkStatus_t * pDetails );
@@ -933,15 +954,15 @@ S_API bool SteamAPI_ISteamNetworkingUtils_SetGlobalCallback_MessagesSessionFaile
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void * pArg );
S_API bool SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct( ISteamNetworkingUtils* self, const SteamNetworkingConfigValue_t & opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
S_API ESteamNetworkingGetConfigValueResult SteamAPI_ISteamNetworkingUtils_GetConfigValue( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType * pOutDataType, void * pResult, size_t * cbResult );
S_API bool SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, const char ** pOutName, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope, ESteamNetworkingConfigValue * pOutNextValue );
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue( ISteamNetworkingUtils* self );
S_API const char * SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType * pOutDataType, ESteamNetworkingConfigScope * pOutScope );
S_API ESteamNetworkingConfigValue SteamAPI_ISteamNetworkingUtils_IterateGenericEditableConfigValues( ISteamNetworkingUtils* self, ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars );
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIPAddr & addr, char * buf, uint32 cbBuf, bool bWithPort );
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIPAddr * pAddr, const char * pszStr );
S_API void SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString( ISteamNetworkingUtils* self, const SteamNetworkingIdentity & identity, char * buf, uint32 cbBuf );
S_API bool SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString( ISteamNetworkingUtils* self, SteamNetworkingIdentity * pIdentity, const char * pszStr );
// ISteamGameServer
S_API ISteamGameServer *SteamAPI_SteamGameServer_v013();
S_API ISteamGameServer *SteamAPI_SteamGameServer_v014();
S_API void SteamAPI_ISteamGameServer_SetProduct( ISteamGameServer* self, const char * pszProduct );
S_API void SteamAPI_ISteamGameServer_SetGameDescription( ISteamGameServer* self, const char * pszGameDescription );
S_API void SteamAPI_ISteamGameServer_SetModDir( ISteamGameServer* self, const char * pszModDir );
@@ -965,10 +986,7 @@ S_API void SteamAPI_ISteamGameServer_SetKeyValue( ISteamGameServer* self, const
S_API void SteamAPI_ISteamGameServer_SetGameTags( ISteamGameServer* self, const char * pchGameTags );
S_API void SteamAPI_ISteamGameServer_SetGameData( ISteamGameServer* self, const char * pchGameData );
S_API void SteamAPI_ISteamGameServer_SetRegion( ISteamGameServer* self, const char * pszRegion );
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate( ISteamGameServer* self, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser );
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection( ISteamGameServer* self );
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect( ISteamGameServer* self, uint64_steamid steamIDUser );
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData( ISteamGameServer* self, uint64_steamid steamIDUser, const char * pchPlayerName, uint32 uScore );
S_API void SteamAPI_ISteamGameServer_SetAdvertiseServerActive( ISteamGameServer* self, bool bActive );
S_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket( ISteamGameServer* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket );
S_API EBeginAuthSessionResult SteamAPI_ISteamGameServer_BeginAuthSession( ISteamGameServer* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID );
S_API void SteamAPI_ISteamGameServer_EndAuthSession( ISteamGameServer* self, uint64_steamid steamID );
@@ -980,11 +998,12 @@ S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( ISteamGameSe
S_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self );
S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket( ISteamGameServer* self, const void * pData, int cbData, uint32 srcIP, uint16 srcPort );
S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket( ISteamGameServer* self, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort );
S_API void SteamAPI_ISteamGameServer_EnableHeartbeats( ISteamGameServer* self, bool bActive );
S_API void SteamAPI_ISteamGameServer_SetHeartbeatInterval( ISteamGameServer* self, int iHeartbeatInterval );
S_API void SteamAPI_ISteamGameServer_ForceHeartbeat( ISteamGameServer* self );
S_API SteamAPICall_t SteamAPI_ISteamGameServer_AssociateWithClan( ISteamGameServer* self, uint64_steamid steamIDClan );
S_API SteamAPICall_t SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility( ISteamGameServer* self, uint64_steamid steamIDNewPlayer );
S_API bool SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate_DEPRECATED( ISteamGameServer* self, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser );
S_API uint64_steamid SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection( ISteamGameServer* self );
S_API void SteamAPI_ISteamGameServer_SendUserDisconnect_DEPRECATED( ISteamGameServer* self, uint64_steamid steamIDUser );
S_API bool SteamAPI_ISteamGameServer_BUpdateUserData( ISteamGameServer* self, uint64_steamid steamIDUser, const char * pchPlayerName, uint32 uScore );
// ISteamGameServerStats
S_API ISteamGameServerStats *SteamAPI_SteamGameServerStats_v001();
+25 -2
View File
@@ -310,11 +310,36 @@ enum { k_iClientSTARCallbacks = 5600 };
enum { k_iSteamRemotePlayCallbacks = 5700 };
enum { k_iClientCompatCallbacks = 5800 };
enum { k_iSteamChatCallbacks = 5900 };
enum { k_iClientNetworkingUtilsCallbacks = 6000 };
enum { k_iClientSystemManagerCallbacks = 6100 };
enum { k_iClientStorageDeviceManagerCallbacks = 6200 };
#ifdef _MSVC_VER
#pragma warning( pop )
#endif
// Macros used to annotate various Steamworks interfaces to generate the
// flat API
#ifdef API_GEN
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
#else
# define STEAM_CLANG_ATTR(ATTR)
#endif
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
#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_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
// CSteamAPIContext encapsulates the Steamworks API global accessors into
// a single object.
//
@@ -391,7 +416,6 @@ public:
ISteamHTTP *SteamHTTP() const { return m_pSteamHTTP; }
ISteamInventory *SteamInventory() const { return m_pSteamInventory; }
ISteamUGC *SteamUGC() const { return m_pSteamUGC; }
ISteamApps *SteamApps() const { return m_pSteamApps; }
private:
ISteamClient *m_pSteamClient;
@@ -402,7 +426,6 @@ private:
ISteamHTTP *m_pSteamHTTP;
ISteamInventory *m_pSteamInventory;
ISteamUGC *m_pSteamUGC;
ISteamApps *m_pSteamApps;
};
+11 -8
View File
@@ -23,10 +23,13 @@ enum EServerMode
};
/// Pass to SteamGameServer_Init to indicate that the same UDP port will be used for game traffic
/// UDP queries. In this case, Steam will not open up a socket to handle server browser queries,
/// and you must use ISteamGameServer::HandleIncomingPacket and ISteamGameServer::GetNextOutgoingPacket
/// to handle packets related to server discovery on your socket.
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
/// UDP queries for server browser pings and LAN discovery. In this case, Steam will not open up a
/// socket to handle server browser queries, and you must use ISteamGameServer::HandleIncomingPacket
/// and ISteamGameServer::GetNextOutgoingPacket to handle packets related to server discovery on your socket.
const uint16 STEAMGAMESERVER_QUERY_PORT_SHARED = 0xffff;
// DEPRECATED: This old name was really confusing.
const uint16 MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = STEAMGAMESERVER_QUERY_PORT_SHARED;
// Initialize SteamGameServer client and interface objects, and set server properties which may not be changed.
//
@@ -39,9 +42,10 @@ enum EServerMode
// - usGamePort is the port that clients will connect to for gameplay. You will usually open up your
// own socket bound to this port.
// - usQueryPort is the port that will manage server browser related duties and info
// pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it
// pings from clients. If you pass STEAMGAMESERVER_QUERY_PORT_SHARED for usQueryPort, then it
// will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving
// UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h.
// UDP packets for the master server updater. (See ISteamGameServer::HandleIncomingPacket and
// ISteamGameServer::GetNextOutgoingPacket.)
// - The version string should be in the form x.x.x.x, and is used by the master server to detect when the
// server is out of date. (Only servers with the latest version will be listed.)
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
@@ -89,9 +93,8 @@ inline bool CSteamGameServerAPIContext::Init()
m_pSteamHTTP = ::SteamGameServerHTTP();
m_pSteamInventory = ::SteamGameServerInventory();
m_pSteamUGC = ::SteamGameServerUGC();
m_pSteamApps = ::SteamGameServerApps();
if ( !m_pSteamGameServer || !m_pSteamGameServerUtils || !m_pSteamGameServerNetworking || !m_pSteamGameServerStats
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC || !m_pSteamApps )
|| !m_pSteamHTTP || !m_pSteamInventory || !m_pSteamUGC )
return false;
return true;
+7 -358
View File
@@ -1,23 +1,11 @@
//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============
//
// Purpose:
// Declare common types used by the Steamworks SDK.
//
//=============================================================================
#ifndef STEAMCLIENTPUBLIC_H
#define STEAMCLIENTPUBLIC_H
#ifdef _WIN32
#pragma once
#endif
//lint -save -e1931 -e1927 -e1924 -e613 -e726
// This header file defines the interface between the calling application and the code that
// knows how to communicate with the connection manager (CM) from the Steam service
// This header file is intended to be portable; ideally this 1 header file plus a lib or dll
// is all you need to integrate the client library into some other tree. So please avoid
// including or requiring other header files if possible. This header should only describe the
// interface layer, no need to include anything about the implementation.
#include "steamtypes.h"
#include "steamuniverse.h"
@@ -145,6 +133,9 @@ enum EResult
k_EResultNoLauncherSpecified = 117, // No launcher was specified, but a launcher was needed to choose correct realm for operation.
k_EResultMustAgreeToSSA = 118, // User must agree to china SSA or global SSA before login
k_EResultLauncherMigrated = 119, // The specified launcher type is no longer supported; the user should be directed elsewhere
k_EResultSteamRealmMismatch = 120, // The user's realm does not match the realm of the requested resource
k_EResultInvalidSignature = 121, // signature check did not match
k_EResultParseFailure = 122, // Failed to parse input
};
// Error codes for use with the voice functions
@@ -244,100 +235,6 @@ enum EAccountType
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
enum EAppReleaseState
{
k_EAppReleaseState_Unknown = 0, // unknown, required appinfo or license info is missing
k_EAppReleaseState_Unavailable = 1, // even owners can't see game in library yet, no AppInfo released
k_EAppReleaseState_Prerelease = 2, // app can be purchased and is visible in library, nothing else. Only Common AppInfo section released
k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, but not play it. All AppInfo sections fully released
k_EAppReleaseState_Released = 4, // owners can download and play app.
};
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
enum EAppOwnershipFlags
{
k_EAppOwnershipFlags_None = 0x0000, // unknown
k_EAppOwnershipFlags_OwnsLicense = 0x0001, // owns license for this game
k_EAppOwnershipFlags_FreeLicense = 0x0002, // not paid for game
k_EAppOwnershipFlags_RegionRestricted = 0x0004, // owns app, but not allowed to play in current region
k_EAppOwnershipFlags_LowViolence = 0x0008, // only low violence version
k_EAppOwnershipFlags_InvalidPlatform = 0x0010, // app not supported on current platform
k_EAppOwnershipFlags_SharedLicense = 0x0020, // license was granted by authorized local device
k_EAppOwnershipFlags_FreeWeekend = 0x0040, // owned by a free weekend licenses
k_EAppOwnershipFlags_RetailLicense = 0x0080, // has a retail license for game, (CD-Key etc)
k_EAppOwnershipFlags_LicenseLocked = 0x0100, // shared license is locked (in use) by other user
k_EAppOwnershipFlags_LicensePending = 0x0200, // owns app, but transaction is still pending. Can't install or play
k_EAppOwnershipFlags_LicenseExpired = 0x0400, // doesn't own app anymore since license expired
k_EAppOwnershipFlags_LicensePermanent = 0x0800, // permanent license, not borrowed, or guest or freeweekend etc
k_EAppOwnershipFlags_LicenseRecurring = 0x1000, // Recurring license, user is charged periodically
k_EAppOwnershipFlags_LicenseCanceled = 0x2000, // Mark as canceled, but might be still active if recurring
k_EAppOwnershipFlags_AutoGrant = 0x4000, // Ownership is based on any kind of autogrant license
k_EAppOwnershipFlags_PendingGift = 0x8000, // user has pending gift to redeem
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.
k_EAppOwnershipFlags_TimedTrial = 0x200000, // App is playable only for limited time
};
//-----------------------------------------------------------------------------
// Purpose: designed as flags to allow filters masks
// NOTE: If you add to this, please update PackageAppType (SteamConfig) as well as populatePackageAppType
//-----------------------------------------------------------------------------
enum EAppType
{
k_EAppType_Invalid = 0x000, // unknown / invalid
k_EAppType_Game = 0x001, // playable game, default type
k_EAppType_Application = 0x002, // software application
k_EAppType_Tool = 0x004, // SDKs, editors & dedicated servers
k_EAppType_Demo = 0x008, // game demo
k_EAppType_Media_DEPRECATED = 0x010, // legacy - was used for game trailers, which are now just videos on the web
k_EAppType_DLC = 0x020, // down loadable content
k_EAppType_Guide = 0x040, // game guide, PDF etc
k_EAppType_Driver = 0x080, // hardware driver updater (ATI, Razor etc)
k_EAppType_Config = 0x100, // hidden app used to config Steam features (backpack, sales, etc)
k_EAppType_Hardware = 0x200, // a hardware device (Steam Machine, Steam Controller, Steam Link, etc.)
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_MusicAlbum = 0x2000, // "Video game soundtrack album"
k_EAppType_Series = 0x4000, // Container app for video series
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
k_EAppType_DepotOnly_DEPRECATED = 0x80000000, // there shouldn't be any appinfo for depots
};
//-----------------------------------------------------------------------------
// types of user game stats fields
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN DATABASE
//-----------------------------------------------------------------------------
enum ESteamUserStatType
{
k_ESteamUserStatTypeINVALID = 0,
k_ESteamUserStatTypeINT = 1,
k_ESteamUserStatTypeFLOAT = 2,
// Read as FLOAT, set with count / session length
k_ESteamUserStatTypeAVGRATE = 3,
k_ESteamUserStatTypeACHIEVEMENTS = 4,
k_ESteamUserStatTypeGROUPACHIEVEMENTS = 5,
// max, for sanity checks
k_ESteamUserStatTypeMAX
};
//-----------------------------------------------------------------------------
// Purpose: Chat Entry Types (previously was only friend-to-friend message types)
//-----------------------------------------------------------------------------
@@ -385,9 +282,6 @@ enum EChatRoomEnterResponse
};
typedef void (*PFNLegacyKeyRegistration)( const char *pchCDKey, const char *pchInstallPath );
typedef bool (*PFNLegacyKeyInstalled)();
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
@@ -406,26 +300,6 @@ enum EChatSteamIDInstanceFlags
};
//-----------------------------------------------------------------------------
// Purpose: Marketing message flags that change how a client should handle them
//-----------------------------------------------------------------------------
enum EMarketingMessageFlags
{
k_EMarketingMessageFlagsNone = 0,
k_EMarketingMessageFlagsHighPriority = 1 << 0,
k_EMarketingMessageFlagsPlatformWindows = 1 << 1,
k_EMarketingMessageFlagsPlatformMac = 1 << 2,
k_EMarketingMessageFlagsPlatformLinux = 1 << 3,
//aggregate flags
k_EMarketingMessageFlagsPlatformRestrictions =
k_EMarketingMessageFlagsPlatformWindows |
k_EMarketingMessageFlagsPlatformMac |
k_EMarketingMessageFlagsPlatformLinux,
};
//-----------------------------------------------------------------------------
// Purpose: Possible positions to tell the overlay to show notifications in
//-----------------------------------------------------------------------------
@@ -470,151 +344,6 @@ enum EBroadcastUploadResult
};
//-----------------------------------------------------------------------------
// Purpose: codes for well defined launch options
//-----------------------------------------------------------------------------
enum ELaunchOptionType
{
k_ELaunchOptionType_None = 0, // unknown what launch option does
k_ELaunchOptionType_Default = 1, // runs the game, app, whatever in default mode
k_ELaunchOptionType_SafeMode = 2, // runs the game in safe mode
k_ELaunchOptionType_Multiplayer = 3, // runs the game in multiplayer mode
k_ELaunchOptionType_Config = 4, // runs config tool for this game
k_ELaunchOptionType_OpenVR = 5, // runs game in VR mode using OpenVR
k_ELaunchOptionType_Server = 6, // runs dedicated server for this game
k_ELaunchOptionType_Editor = 7, // runs game editor
k_ELaunchOptionType_Manual = 8, // shows game manual
k_ELaunchOptionType_Benchmark = 9, // runs game benchmark
k_ELaunchOptionType_Option1 = 10, // generic run option, uses description field for game name
k_ELaunchOptionType_Option2 = 11, // generic run option, uses description field for game name
k_ELaunchOptionType_Option3 = 12, // generic run option, uses description field for game name
k_ELaunchOptionType_OculusVR = 13, // runs game in VR mode using the Oculus SDK
k_ELaunchOptionType_OpenVROverlay = 14, // runs an OpenVR dashboard overlay
k_ELaunchOptionType_OSVR = 15, // runs game in VR mode using the OSVR SDK
k_ELaunchOptionType_Dialog = 1000, // show launch options dialog
};
//-----------------------------------------------------------------------------
// Purpose: true if this launch option is any of the vr launching types
//-----------------------------------------------------------------------------
static inline bool BIsVRLaunchOptionType( const ELaunchOptionType eType )
{
return eType == k_ELaunchOptionType_OpenVR
|| eType == k_ELaunchOptionType_OpenVROverlay
|| eType == k_ELaunchOptionType_OculusVR
|| eType == k_ELaunchOptionType_OSVR;
}
//-----------------------------------------------------------------------------
// Purpose: true if this launch option is any of the vr launching types
//-----------------------------------------------------------------------------
static inline bool BIsLaunchOptionTypeExemptFromGameTheater( const ELaunchOptionType eType )
{
return eType == k_ELaunchOptionType_Config
|| eType == k_ELaunchOptionType_Server
|| eType == k_ELaunchOptionType_Editor
|| eType == k_ELaunchOptionType_Manual;
}
//-----------------------------------------------------------------------------
// Purpose: code points for VR HMD vendors and models
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE
//-----------------------------------------------------------------------------
enum EVRHMDType
{
k_eEVRHMDType_None = -1, // unknown vendor and model
k_eEVRHMDType_Unknown = 0, // unknown vendor and model
k_eEVRHMDType_HTC_Dev = 1, // original HTC dev kits
k_eEVRHMDType_HTC_VivePre = 2, // htc vive pre
k_eEVRHMDType_HTC_Vive = 3, // htc vive consumer release
k_eEVRHMDType_HTC_VivePro = 4, // htc vive pro release
k_eEVRHMDType_HTC_ViveCosmos = 5, // HTC Vive Cosmos
k_eEVRHMDType_HTC_Unknown = 20, // unknown htc hmd
k_eEVRHMDType_Oculus_DK1 = 21, // Oculus DK1
k_eEVRHMDType_Oculus_DK2 = 22, // Oculus DK2
k_eEVRHMDType_Oculus_Rift = 23, // Oculus Rift
k_eEVRHMDType_Oculus_RiftS = 24, // Oculus Rift S
k_eEVRHMDType_Oculus_Quest = 25, // Oculus Quest
k_eEVRHMDType_Oculus_Unknown = 40, // // Oculus unknown HMD
k_eEVRHMDType_Acer_Unknown = 50, // Acer unknown HMD
k_eEVRHMDType_Acer_WindowsMR = 51, // Acer QHMD Windows MR headset
k_eEVRHMDType_Dell_Unknown = 60, // Dell unknown HMD
k_eEVRHMDType_Dell_Visor = 61, // Dell Visor Windows MR headset
k_eEVRHMDType_Lenovo_Unknown = 70, // Lenovo unknown HMD
k_eEVRHMDType_Lenovo_Explorer = 71, // Lenovo Explorer Windows MR headset
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_HP_ReverbG2 = 1463, // HP Reverb G2 Windows MR headset
k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD
k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset
k_eEVRHMDType_Unannounced_Unknown = 100, // Unannounced unknown HMD
k_eEVRHMDType_Unannounced_WindowsMR = 101, // Unannounced Windows MR headset
k_eEVRHMDType_vridge = 110, // VRIDGE tool
k_eEVRHMDType_Huawei_Unknown = 120, // Huawei unknown HMD
k_eEVRHMDType_Huawei_VR2 = 121, // Huawei VR2 3DOF headset
k_eEVRHMDType_Huawei_EndOfRange = 129, // end of Huawei HMD range
k_eEVRHmdType_Valve_Unknown = 130, // Valve Unknown HMD
k_eEVRHmdType_Valve_Index = 131, // Valve Index HMD
};
//-----------------------------------------------------------------------------
// Purpose: true if this is from an Oculus HMD
//-----------------------------------------------------------------------------
static inline bool BIsOculusHMD( EVRHMDType eType )
{
return eType == k_eEVRHMDType_Oculus_DK1 || eType == k_eEVRHMDType_Oculus_DK2 || eType == k_eEVRHMDType_Oculus_Rift || eType == k_eEVRHMDType_Oculus_RiftS || eType == k_eEVRHMDType_Oculus_Quest || eType == k_eEVRHMDType_Oculus_Unknown;
}
//-----------------------------------------------------------------------------
// Purpose: true if this is from a Windows MR HMD
//-----------------------------------------------------------------------------
static inline bool BIsWindowsMRHeadset( EVRHMDType eType )
{
return eType >= k_eEVRHMDType_Acer_WindowsMR && eType <= k_eEVRHMDType_Unannounced_WindowsMR;
}
//-----------------------------------------------------------------------------
// Purpose: true if this is from a Hauwei HMD
//-----------------------------------------------------------------------------
static inline bool BIsHuaweiHeadset( EVRHMDType eType )
{
return eType >= k_eEVRHMDType_Huawei_Unknown && eType <= k_eEVRHMDType_Huawei_EndOfRange;
}
//-----------------------------------------------------------------------------
// Purpose: true if this is from an Vive HMD
//-----------------------------------------------------------------------------
static inline bool BIsViveHMD( EVRHMDType eType )
{
return eType == k_eEVRHMDType_HTC_Dev || eType == k_eEVRHMDType_HTC_VivePre || eType == k_eEVRHMDType_HTC_Vive || eType == k_eEVRHMDType_HTC_Unknown || eType == k_eEVRHMDType_HTC_VivePro;
}
//-----------------------------------------------------------------------------
// Purpose: Reasons a user may not use the Community Market.
// Used in MarketEligibilityResponse_t.
@@ -1225,72 +954,6 @@ public:
const char *Render() const; // render this Game ID to string
static const char *Render( uint64 ulGameID ); // static method to render a uint64 representation of a Game ID to a string
// must include checksum_crc.h first to get this functionality
#if defined( CHECKSUM_CRC_H )
CGameID( uint32 nAppID, const char *pchModPath )
{
m_ulGameID = 0;
m_gameID.m_nAppID = nAppID;
m_gameID.m_nType = k_EGameIDTypeGameMod;
char rgchModDir[MAX_PATH];
V_FileBase( pchModPath, rgchModDir, sizeof( rgchModDir ) );
CRC32_t crc32;
CRC32_Init( &crc32 );
CRC32_ProcessBuffer( &crc32, rgchModDir, V_strlen( rgchModDir ) );
CRC32_Final( &crc32 );
// set the high-bit on the mod-id
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
// replacement for appID's
m_gameID.m_nModID = crc32 | (0x80000000);
}
CGameID( const char *pchExePath, const char *pchAppName )
{
m_ulGameID = 0;
m_gameID.m_nAppID = k_uAppIdInvalid;
m_gameID.m_nType = k_EGameIDTypeShortcut;
CRC32_t crc32;
CRC32_Init( &crc32 );
if ( pchExePath )
CRC32_ProcessBuffer( &crc32, pchExePath, V_strlen( pchExePath ) );
if ( pchAppName )
CRC32_ProcessBuffer( &crc32, pchAppName, V_strlen( pchAppName ) );
CRC32_Final( &crc32 );
// set the high-bit on the mod-id
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
// replacement for appID's
m_gameID.m_nModID = crc32 | (0x80000000);
}
#if defined( VSTFILEID_H )
CGameID( VstFileID vstFileID )
{
m_ulGameID = 0;
m_gameID.m_nAppID = k_uAppIdInvalid;
m_gameID.m_nType = k_EGameIDTypeP2P;
CRC32_t crc32;
CRC32_Init( &crc32 );
const char *pchFileId = vstFileID.Render();
CRC32_ProcessBuffer( &crc32, pchFileId, V_strlen( pchFileId ) );
CRC32_Final( &crc32 );
// set the high-bit on the mod-id
// reduces crc32 to 31bits, but lets us use the modID as a guaranteed unique
// replacement for appID's
m_gameID.m_nModID = crc32 | (0x80000000);
}
#endif /* VSTFILEID_H */
#endif /* CHECKSUM_CRC_H */
uint64 ToUint64() const
{
return m_ulGameID;
@@ -1379,9 +1042,9 @@ public:
m_ulGameID = 0;
}
private:
//
// Internal stuff. Use the accessors above if possible
//
enum EGameIDType
{
@@ -1416,26 +1079,12 @@ private:
const int k_cchGameExtraInfoMax = 64;
//-----------------------------------------------------------------------------
// Constants used for query ports.
//-----------------------------------------------------------------------------
#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet.
#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server.
//-----------------------------------------------------------------------------
// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback
// just before minidump file is captured after a crash has occurred. (Allows app to append additional comment data to the dump, etc.)
//-----------------------------------------------------------------------------
typedef void (*PFNPreMinidumpCallback)(void *context);
//-----------------------------------------------------------------------------
// Purpose: Used by ICrashHandler interfaces to reference particular installed crash handlers
//-----------------------------------------------------------------------------
typedef void *BREAKPAD_HANDLE;
#define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0
enum EGameSearchErrorCode_t
{
k_EGameSearchErrorCode_OK = 1,
-286
View File
@@ -1,286 +0,0 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Types and utilities for handling steam datagram tickets. These are
// useful for both the client and the backend ticket generating authority.
//
//=============================================================================
#ifndef STEAMDATAGRAM_TICKETS_H
#define STEAMDATAGRAM_TICKETS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef assert
#include <assert.h>
#endif
#include <string.h>
#include "steamnetworkingtypes.h"
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
#error "Must define VALVE_CALLBACK_PACK_SMALL or VALVE_CALLBACK_PACK_LARGE"
#endif
/// Max length of serialized auth ticket. This is important so that we
/// can ensure that we always fit into a single UDP datagram (along with
/// other certs and signatures) and keep the implementation simple.
const size_t k_cbSteamDatagramMaxSerializedTicket = 512;
/// Network-routable identifier for a service. This is an intentionally
/// opaque byte blob. The relays know how to use this to forward it on
/// to the intended destination, but otherwise clients really should not
/// need to know what's inside. (Indeed, we don't really want them to
/// know, as it could reveal information useful to an attacker.)
struct SteamDatagramHostedAddress
{
// Size of data blob.
int m_cbSize;
// Opaque data
char m_data[ 128 ];
// Reset to empty state
void Clear() { memset( this, 0, sizeof(*this) ); }
// Parse the data center out of the blob.
SteamNetworkingPOPID GetPopID() const { return CalculateSteamNetworkingPOPIDFromString( m_data ); }
/// Set a dummy routing blob with a hardcoded IP:port. You should only use
/// this in a dev environment, since the address is in plaintext!
/// In production this information should come from the server,
/// using ISteamNetworkingSockets::GetHostedDedicatedServerAddress
void SetDevAddress( uint32 nIP, uint16 nPort, SteamNetworkingPOPID popid = 0 )
{
GetSteamNetworkingLocationPOPStringFromID( popid, m_data );
m_cbSize = 4;
m_data[m_cbSize++] = 1;
m_data[m_cbSize++] = 1;
m_data[m_cbSize++] = char(nPort);
m_data[m_cbSize++] = char(nPort>>8);
m_data[m_cbSize++] = char(nIP);
m_data[m_cbSize++] = char(nIP>>8);
m_data[m_cbSize++] = char(nIP>>16);
m_data[m_cbSize++] = char(nIP>>24);
}
/// Convert to/from std::string (or anything that acts like it).
/// Useful for interfacing with google protobuf. It's a template
/// mainly so that we don't have to include <string> in the header.
/// Note: by "string", we don't mean that it's text. It's a binary
/// blob, and it might have zeros in it. (std::string can handle that.)
template <typename T> bool SetFromStdString( const T &str )
{
if ( str.length() >= sizeof(m_data) )
{
m_cbSize = 0;
return false;
}
m_cbSize = (int)str.length();
memcpy( m_data, str.c_str(), m_cbSize );
return true;
}
template <typename T> void GetAsStdString( T *str ) const
{
str->assign( m_data, m_cbSize );
}
};
/// Ticket used to gain access to the relay network.
struct SteamDatagramRelayAuthTicket
{
SteamDatagramRelayAuthTicket() { Clear(); }
/// Reset all fields
void Clear() { memset( this, 0, sizeof(*this) ); m_nRestrictToVirtualPort = -1; }
/// Identity of the gameserver we want to talk to. This is required.
SteamNetworkingIdentity m_identityGameserver;
/// Identity of the person who was authorized. This is required.
SteamNetworkingIdentity m_identityAuthorizedClient;
/// SteamID is authorized to send from a particular public IP. If this
/// is 0, then the sender is not restricted to a particular IP.
///
/// Recommend to leave this set to zero.
uint32 m_unPublicIP;
/// Time when the ticket expires. Recommended: take the current
/// time and add 6 hours, or maybe a bit longer if your gameplay
/// sessions are longer.
///
/// NOTE: relays may reject tickets with expiry times excessively
/// far in the future, so contact us if you wish to use an expiry
/// longer than, say, 24 hours.
RTime32 m_rtimeTicketExpiry;
/// Routing information where the gameserver is listening for
/// relayed traffic. You should fill this in when generating
/// a ticket.
///
/// When generating tickets on your backend:
/// - In production: The gameserver knows the proper routing
/// information, so you need to call
/// ISteamNetworkingSockets::GetHostedDedicatedServerAddress
/// and send the info to your backend.
/// - In development, you will need to provide public IP
/// of the server using SteamDatagramServiceNetID::SetDevAddress.
/// Relays need to be able to send UDP
/// packets to this server. Since it's very likely that
/// your server is behind a firewall/NAT, make sure that
/// the address is the one that the outside world can use.
/// The traffic from the relays will be "unsolicited", so
/// stateful firewalls won't work -- you will probably have
/// to set up an explicit port forward.
/// On the client:
/// - this field will always be blank.
SteamDatagramHostedAddress m_routing;
/// App ID this is for. This is required, and should be the
/// App ID the client is running. (Even if your gameserver
/// uses a different App ID.)
uint32 m_nAppID;
/// Restrict this ticket to be used for a particular virtual port?
/// Set to -1 to allow any virtual port.
///
/// This is useful as a security measure, and also so the client will
/// use the right ticket (which might have extra fields that are useful
/// for proper analytics), if the client happens to have more than one
/// appropriate ticket.
///
/// Note: if a client has more that one acceptable ticket, they will
/// always use the one expiring the latest.
int m_nRestrictToVirtualPort;
//
// Extra fields.
//
// These are collected for backend analytics. For example, you might
// send a MatchID so that all of the records for a particular match can
// be located. Or send a game mode field so that you can compare
// the network characteristics of different game modes.
//
// (At the time of this writing we don't have a way to expose the data
// we collect to partners, but we hope to in the future so that you can
// get visibility into network conditions.)
//
struct ExtraField
{
enum EType
{
k_EType_String,
k_EType_Int, // For most small integral values. Uses google protobuf sint64, so it's small on the wire. WARNING: In some places this value may be transmitted in JSON, in which case precision may be lost in backend analytics. Don't use this for an "identifier", use it for a scalar quantity.
k_EType_Fixed64, // 64 arbitrary bits. This value is treated as an "identifier". In places where JSON format is used, it will be serialized as a string. No aggregation / analytics can be performed on this value.
};
int /* EType */ m_eType;
char m_szName[28];
union {
char m_szStringValue[128];
int64 m_nIntValue;
uint64 m_nFixed64Value;
};
};
enum { k_nMaxExtraFields = 16 };
int m_nExtraFields;
ExtraField m_vecExtraFields[ k_nMaxExtraFields ];
/// Helper to add an extra field in a single call
void AddExtraField_Int( const char *pszName, int64 val )
{
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_Int );
if ( p )
p->m_nIntValue = val;
}
void AddExtraField_Fixed64( const char *pszName, uint64 val )
{
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_Fixed64 );
if ( p )
p->m_nFixed64Value = val;
}
void AddExtraField_String( const char *pszName, const char *val )
{
ExtraField *p = AddExtraField( pszName, ExtraField::k_EType_String );
if ( p )
{
size_t l = strlen( val );
if ( l > sizeof(p->m_szStringValue)-1 )
l = sizeof(p->m_szStringValue)-1;
memcpy( p->m_szStringValue, val, l );
p->m_szStringValue[l] = '\0';
}
}
private:
ExtraField *AddExtraField( const char *pszName, ExtraField::EType eType )
{
if ( m_nExtraFields >= k_nMaxExtraFields )
{
assert( false );
return NULL;
}
ExtraField *p = &m_vecExtraFields[ m_nExtraFields++ ];
p->m_eType = eType;
size_t l = strlen( pszName );
if ( l > sizeof(p->m_szName)-1 )
l = sizeof(p->m_szName)-1;
memcpy( p->m_szName, pszName, l );
p->m_szName[l] = '\0';
return p;
}
};
#pragma pack(pop)
/// Max size of user data blob
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048;
/// Max size of serialized data blob
const size_t k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096;
/// Structure that describes a gameserver attempting to authenticate
/// with your central server allocator / matchmaking service ("game coordinator").
/// This is useful because the game coordinator needs to know:
///
/// - What data center is the gameserver running in?
/// - The routing blob of the gameserver
/// - Is the gameserver actually trusted?
///
/// Using this structure, you can securely communicate this information
/// to your server, and you can do this WITHOUT maintaining any
/// whitelists or tables of IP addresses.
///
/// See ISteamNetworkingSockets::GetGameCoordinatorServerLogin
struct SteamDatagramGameCoordinatorServerLogin
{
/// Server's identity
SteamNetworkingIdentity m_identity;
/// Routing info. Note that this includes the POPID
SteamDatagramHostedAddress m_routing;
/// AppID that the server thinks it is running
AppId_t m_nAppID;
/// Unix timestamp when this was generated
RTime32 m_rtime;
/// Size of application data
int m_cbAppData;
/// Application data. This is any additional information
/// that you need to identify the server not contained above.
/// (E.g. perhaps a public IP as seen by the coordinator service.)
char m_appData[ k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData ];
};
#endif // STEAMDATAGRAM_TICKETS_H
+113 -54
View File
@@ -132,7 +132,7 @@ enum ESteamNetworkingAvailability
enum ESteamNetworkingIdentityType
{
// Dummy/empty/invalid.
// Plese note that if we parse a string that we don't recognize
// Please note that if we parse a string that we don't recognize
// but that appears reasonable, we will NOT use this type. Instead
// we'll use k_ESteamNetworkingIdentityType_UnknownType.
k_ESteamNetworkingIdentityType_Invalid = 0,
@@ -535,13 +535,9 @@ enum ESteamNetConnectionEnd
// - etc
k_ESteamNetConnectionEnd_Remote_BadCert = 4003,
// We couldn't rendezvous with the remote host because
// they aren't logged into Steam
k_ESteamNetConnectionEnd_Remote_NotLoggedIn = 4004,
// We couldn't rendezvous with the remote host because
// they aren't running the right application.
k_ESteamNetConnectionEnd_Remote_NotRunningApp = 4005,
// These will never be returned
//k_ESteamNetConnectionEnd_Remote_NotLoggedIn_DEPRECATED = 4004,
//k_ESteamNetConnectionEnd_Remote_NotRunningApp_DEPRECATED = 4005,
// Something wrong with the protocol version you are using.
// (Probably the code you are running is too old.)
@@ -575,10 +571,7 @@ enum ESteamNetConnectionEnd
// or on their end.
k_ESteamNetConnectionEnd_Misc_Timeout = 5003,
// We're having trouble talking to the relevant relay.
// We don't have enough information to say whether the
// problem is on our end or not.
k_ESteamNetConnectionEnd_Misc_RelayConnectivity = 5004,
//k_ESteamNetConnectionEnd_Misc_RelayConnectivity_DEPRECATED = 5004,
// There's some trouble talking to Steam.
k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005,
@@ -1057,31 +1050,9 @@ enum ESteamNetworkingConfigValue
{
k_ESteamNetworkingConfig_Invalid = 0,
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
/// This is a global option only, since it is applied at a low level
/// where we don't have much context
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
/// [global int32]. Delay all outbound/inbound packets by N ms
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
/// [global float] 0-100 Percentage of packets we will add additional delay
/// to (causing them to be reordered)
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
/// [global int32] Extra delay, in ms, to apply to reordered packets.
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
/// [global float 0--100] Globally duplicate some percentage of packets we send
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
/// (We chose a random delay between 0 and this value)
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
//
// Connection options
//
/// [connection int32] Timeout value (in ms) to use when first connecting
k_ESteamNetworkingConfig_TimeoutInitial = 24,
@@ -1094,6 +1065,41 @@ enum ESteamNetworkingConfigValue
/// Default is 512k (524288 bytes)
k_ESteamNetworkingConfig_SendBufferSize = 9,
/// [connection int64] Get/set userdata as a configuration option.
/// The default value is -1. You may want to set the user data as
/// a config value, instead of using ISteamNetworkingSockets::SetConnectionUserData
/// in two specific instances:
///
/// - You wish to set the userdata atomically when creating
/// an outbound connection, so that the userdata is filled in properly
/// for any callbacks that happen. However, note that this trick
/// only works for connections initiated locally! For incoming
/// connections, multiple state transitions may happen and
/// callbacks be queued, before you are able to service the first
/// callback! Be careful!
///
/// - You can set the default userdata for all newly created connections
/// by setting this value at a higher level (e.g. on the listen
/// socket or at the global level.) Then this default
/// value will be inherited when the connection is created.
/// This is useful in case -1 is a valid userdata value, and you
/// wish to use something else as the default value so you can
/// tell if it has been set or not.
///
/// HOWEVER: once a connection is created, the effective value is
/// then bound to the connection. Unlike other connection options,
/// if you change it again at a higher level, the new value will not
/// be inherited by connections.
///
/// Using the userdata field in callback structs is not advised because
/// of tricky race conditions. Instead, you might try one of these methods:
///
/// - Use a separate map with the HSteamNetConnection as the key.
/// - Fetch the userdata from the connection in your callback
/// using ISteamNetworkingSockets::GetConnectionUserData, to
// ensure you have the current value.
k_ESteamNetworkingConfig_ConnectionUserData = 40,
/// [connection int32] Minimum/maximum send rate clamp, 0 is no limit.
/// This value will control the min/max allowed sending rate that
/// bandwidth estimation is allowed to reach. Default is 0 (no-limit)
@@ -1253,9 +1259,62 @@ enum ESteamNetworkingConfigValue
/// This value should not be read or written in any other context.
k_ESteamNetworkingConfig_LocalVirtualPort = 38,
//
// Callbacks
//
//
// Simulating network conditions
//
// These are global (not per-connection) because they apply at
// a relatively low UDP layer.
//
/// [global float, 0--100] Randomly discard N pct of packets instead of sending/recv
/// This is a global option only, since it is applied at a low level
/// where we don't have much context
k_ESteamNetworkingConfig_FakePacketLoss_Send = 2,
k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3,
/// [global int32]. Delay all outbound/inbound packets by N ms
k_ESteamNetworkingConfig_FakePacketLag_Send = 4,
k_ESteamNetworkingConfig_FakePacketLag_Recv = 5,
/// [global float] 0-100 Percentage of packets we will add additional delay
/// to (causing them to be reordered)
k_ESteamNetworkingConfig_FakePacketReorder_Send = 6,
k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7,
/// [global int32] Extra delay, in ms, to apply to reordered packets.
k_ESteamNetworkingConfig_FakePacketReorder_Time = 8,
/// [global float 0--100] Globally duplicate some percentage of packets we send
k_ESteamNetworkingConfig_FakePacketDup_Send = 26,
k_ESteamNetworkingConfig_FakePacketDup_Recv = 27,
/// [global int32] Amount of delay, in ms, to delay duplicated packets.
/// (We chose a random delay between 0 and this value)
k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28,
/// [global int32] Trace every UDP packet, similar to Wireshark or tcpdump.
/// Value is max number of bytes to dump. -1 disables tracing.
// 0 only traces the info but no actual data bytes
k_ESteamNetworkingConfig_PacketTraceMaxBytes = 41,
// [global int32] Global UDP token bucket rate limits.
// "Rate" refers to the steady state rate. (Bytes/sec, the
// rate that tokens are put into the bucket.) "Burst"
// refers to the max amount that could be sent in a single
// burst. (In bytes, the max capacity of the bucket.)
// Rate=0 disables the limiter entirely, which is the default.
// Burst=0 disables burst. (This is not realistic. A
// burst of at least 4K is recommended; the default is higher.)
k_ESteamNetworkingConfig_FakeRateLimit_Send_Rate = 42,
k_ESteamNetworkingConfig_FakeRateLimit_Send_Burst = 43,
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
//
// Callbacks
//
// On Steam, you may use the default Steam callback dispatch mechanism. If you prefer
// to not use this dispatch mechanism (or you are not running with Steam), or you want
@@ -1320,9 +1379,9 @@ enum ESteamNetworkingConfigValue
/// ISteamNetworkingMessages.
k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206,
//
// P2P settings
//
//
// P2P connection settings
//
// /// [listen socket int32] When you create a P2P listen socket, we will automatically
// /// open up a UDP port to listen for LAN connections. LAN connections can be made
@@ -1353,9 +1412,9 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106,
//k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107,
//
// Settings for SDR relayed connections
//
//
// Settings for SDR relayed connections
//
/// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for
/// a while, and try a different one. Some ISPs and routers may drop the first
@@ -1402,14 +1461,14 @@ enum ESteamNetworkingConfigValue
/// in production.
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
//
// Log levels for debugging information of various subsystems.
// Higher numeric values will cause more stuff to be printed.
// See ISteamNetworkingUtils::SetDebugOutputFunction for more
// information
//
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
//
//
// Log levels for debugging information of various subsystems.
// Higher numeric values will cause more stuff to be printed.
// See ISteamNetworkingUtils::SetDebugOutputFunction for more
// information
//
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
//
k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies
k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv
k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv
+13 -88
View File
@@ -17,26 +17,31 @@
typedef unsigned char uint8;
#endif
#if defined( __GNUC__ ) && !defined(POSIX)
#if defined( __GNUC__ ) && !defined(_WIN32) && !defined(POSIX)
#if __GNUC__ < 4
#error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)"
#endif
#define POSIX 1
#endif
#if defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__)
#if defined(__LP64__) || defined(__x86_64__) || defined(_WIN64) || defined(__aarch64__) || defined(__s390x__)
#define X64BITS
#endif
#if !defined(VALVE_BIG_ENDIAN)
#if defined(_PS3)
// Make sure VALVE_BIG_ENDIAN gets set on PS3, may already be set previously in Valve internal code.
#if !defined(VALVE_BIG_ENDIAN) && defined(_PS3)
#define VALVE_BIG_ENDIAN
#define VALVE_BIG_ENDIAN 1
#endif
#if defined( __GNUC__ ) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define VALVE_BIG_ENDIAN 1
#endif
#endif
typedef unsigned char uint8;
typedef signed char int8;
#if defined( _WIN32 )
#if defined( _WIN32 ) && !defined( __GNUC__ )
typedef __int16 int16;
typedef unsigned __int16 uint16;
@@ -84,102 +89,23 @@ typedef unsigned int uintp;
#endif // else _WIN32
#ifdef API_GEN
# define STEAM_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
#else
# define STEAM_CLANG_ATTR(ATTR)
#endif
#define STEAM_METHOD_DESC(DESC) STEAM_CLANG_ATTR( "desc:" #DESC ";" )
#define STEAM_IGNOREATTR() STEAM_CLANG_ATTR( "ignore" )
#define STEAM_OUT_STRUCT() STEAM_CLANG_ATTR( "out_struct: ;" )
#define STEAM_OUT_STRING() STEAM_CLANG_ATTR( "out_string: ;" )
#define STEAM_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) STEAM_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
#define STEAM_OUT_ARRAY_COUNT(COUNTER, DESC) STEAM_CLANG_ATTR( "out_array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_ARRAY_COUNT(COUNTER) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";" )
#define STEAM_ARRAY_COUNT_D(COUNTER, DESC) STEAM_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
#define STEAM_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
#define STEAM_OUT_BUFFER_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
#define STEAM_OUT_STRING_COUNT(COUNTER) STEAM_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
#define STEAM_DESC(DESC) STEAM_CLANG_ATTR("desc:" #DESC ";")
#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_FLAT_NAME(NAME) STEAM_CLANG_ATTR("flat_name:" #NAME ";")
const int k_cubSaltSize = 8;
typedef uint8 Salt_t[ k_cubSaltSize ];
//-----------------------------------------------------------------------------
// GID (GlobalID) stuff
// This is a globally unique identifier. It's guaranteed to be unique across all
// racks and servers for as long as a given universe persists.
//-----------------------------------------------------------------------------
// NOTE: for GID parsing/rendering and other utils, see gid.h
typedef uint64 GID_t;
const GID_t k_GIDNil = 0xffffffffffffffffull;
// For convenience, we define a number of types that are just new names for GIDs
typedef uint64 JobID_t; // Each Job has a unique ID
typedef GID_t TxnID_t; // Each financial transaction has a unique ID
const GID_t k_TxnIDNil = k_GIDNil;
const GID_t k_TxnIDUnknown = 0;
const JobID_t k_JobIDNil = 0xffffffffffffffffull;
// this is baked into client messages and interfaces as an int,
// make sure we never break this.
typedef uint32 PackageId_t;
const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
typedef uint32 BundleId_t;
const BundleId_t k_uBundleIdInvalid = 0;
// this is baked into client messages and interfaces as an int,
// make sure we never break this.
typedef uint32 AppId_t;
const AppId_t k_uAppIdInvalid = 0x0;
typedef uint64 AssetClassId_t;
const AssetClassId_t k_ulAssetClassIdInvalid = 0x0;
typedef uint32 PhysicalItemId_t;
const PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0;
// this is baked into client messages and interfaces as an int,
// make sure we never break this. AppIds and DepotIDs also presently
// share the same namespace, but since we'd like to change that in the future
// I've defined it seperately here.
// AppIds and DepotIDs also presently share the same namespace
typedef uint32 DepotId_t;
const DepotId_t k_uDepotIdInvalid = 0x0;
// RTime32
// We use this 32 bit time representing real world time.
// It offers 1 second resolution beginning on January 1, 1970 (Unix time)
// RTime32. Seconds elapsed since Jan 1 1970, i.e. unix timestamp.
// It's the same as time_t, but it is always 32-bit and unsigned.
typedef uint32 RTime32;
typedef uint32 CellID_t;
const CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
// handle to a Steam API call
typedef uint64 SteamAPICall_t;
const SteamAPICall_t k_uAPICallInvalid = 0x0;
typedef uint32 AccountID_t;
typedef uint32 PartnerId_t;
const PartnerId_t k_uPartnerIdInvalid = 0;
// ID for a depot content manifest
typedef uint64 ManifestId_t;
const ManifestId_t k_uManifestIdInvalid = 0;
// ID for cafe sites
typedef uint64 SiteId_t;
const SiteId_t k_ulSiteIdInvalid = 0;
// Party Beacon ID
typedef uint64 PartyBeaconID_t;
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
@@ -259,5 +185,4 @@ struct SteamIPAddress_t
#pragma pack( pop )
#endif // STEAMTYPES_H
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.
-96
View File
@@ -1,96 +0,0 @@
"controller_mappings"
{
"buttons"
{
"button_0" ""
"button_1" ""
"button_2" ""
"button_3" ""
"right_trigger" "kb:key_space"
"left_trigger" "kb:key_space"
"right_bumper" ""
"left_bumper" ""
"button_escape" "kb:key_esc"
"button_menu" ""
"backside_left" ""
"backside_right" ""
}
"touchscreen"
{
"touch_button_0" ""
"touch_button_1" ""
"touch_button_2" ""
"touch_button_3" ""
}
"pads"
{
"left_stick_up" ""
"left_stick_right" ""
"left_stick_down" ""
"left_stick_left" ""
"left_stick_click" ""
"left_north" "kb:key_w, W"
"left_northeast" ""
"left_east" "kb:key_d, D"
"left_southeast" ""
"left_south" "kb:key_s, S"
"left_southwest" ""
"left_west" "kb:key_a, A"
"left_northwest" ""
"left_double_tap" ""
"left_outer_edge" ""
"left_click" ""
"right_north" ""
"right_northeast" ""
"right_east" ""
"right_southeast" ""
"right_south" ""
"right_southwest" ""
"right_west" ""
"right_northwest" ""
"right_double_tap" ""
"right_outer_edge" ""
"right_click" ""
// Extra descriptions for pads as a whole rather than just individual directions
pad_rollup_descriptions
{
"left_pad" "Movement"
"right_pad" "Look"
}
}
"settings"
{
"mouse_sensitivity" "9"
}
"mode_overrides"
{
"menu"
{
"left_north" ""
"left_east" ""
"left_south" ""
"left_west" ""
}
}
"metadata"
{
"title" ""
"description" ""
}
}
+34 -16
View File
@@ -15,6 +15,26 @@
#include "glstringosx.h"
#include "gameengineosx.h"
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
#define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define NSWindowStyleMaskTitled NSTitledWindowMask
#define NSWindowStyleMaskClosable NSClosableWindowMask
#define NSWindowStyleMaskResizable NSResizableWindowMask
#define NSEventTypeKeyDown NSKeyDown
#define NSEventTypeKeyUp NSKeyUp
#define NSEventTypeFlagsChanged NSFlagsChanged
#define NSEventModifierFlagShift NSShiftKeyMask
#define NSEventModifierFlagControl NSControlKeyMask
#define NSEventModifierFlagOption NSAlternateKeyMask
#define NSEventMaskAny NSAnyEventMask
#endif
#endif
CGameEngineGL *g_engine; // dxabstract will use this.. it is set by the engine constructor
@@ -295,9 +315,9 @@ bool CGameEngineGL::BInitializeGraphics()
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType( &psn, kProcessTransformToForegroundApplication );
SetFrontProcess( &psn );
uint32_t mask = NSTitledWindowMask | NSClosableWindowMask| NSResizableWindowMask;
[[GLApplication sharedApplication] activateIgnoringOtherApps: YES];
uint32_t mask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable;
GLuint attribs[] =
{
@@ -312,8 +332,6 @@ bool CGameEngineGL::BInitializeGraphics()
NSOpenGLPixelFormat* pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs];
NSApplication *app = [GLApplication sharedApplication];
NSApplicationLoad();
m_view = [[NSOpenGLView alloc] initWithFrame:NSMakeRect( 0, 0, m_nWindowWidth, m_nWindowHeight )
@@ -330,7 +348,7 @@ bool CGameEngineGL::BInitializeGraphics()
[m_window setAcceptsMouseMovedEvents:YES];
GLint swapInt = 1;
[[m_view openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
[[m_view openGLContext] setValues:&swapInt forParameter:NSOpenGLContextParameterSwapInterval];
[[m_view openGLContext] makeCurrentContext];
[m_window setContentView:m_view];
@@ -2118,10 +2136,10 @@ void CGameEngineGL::UpdateKey( uint32_t vkKey, int nDown )
void CGameEngineGL::MessagePump()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSApplication *pApp = [NSApplication sharedApplication];
NSApplication *pApp = [GLApplication sharedApplication];
do
{
NSEvent *event = [pApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
NSEvent *event = [pApp nextEventMatchingMask:NSEventMaskAny untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
if ( event == nil )
break;
@@ -2130,8 +2148,8 @@ void CGameEngineGL::MessagePump()
uint32_t c = 0;
switch ( [event type] )
{
case NSKeyDown:
case NSKeyUp:
case NSEventTypeKeyDown:
case NSEventTypeKeyUp:
c = [[event charactersIgnoringModifiers] characterAtIndex:0];
switch ( c )
@@ -2155,17 +2173,17 @@ void CGameEngineGL::MessagePump()
c = toupper(c);
if ( [event type] == NSKeyDown )
if ( [event type] == NSEventTypeKeyDown )
m_SetKeysDown.insert( c );
else
m_SetKeysDown.erase( c );
continue;
case NSFlagsChanged:
case NSEventTypeFlagsChanged:
c = [event modifierFlags];
UpdateKey( VK_SHIFT, c & NSShiftKeyMask );
UpdateKey( VK_CONTROL, c & NSControlKeyMask );
UpdateKey( VK_SELECT, c & NSAlternateKeyMask );
UpdateKey( VK_SHIFT, c & NSEventModifierFlagShift );
UpdateKey( VK_CONTROL, c & NSEventModifierFlagControl );
UpdateKey( VK_SELECT, c & NSEventModifierFlagOption );
continue;
default:
@@ -2568,7 +2586,7 @@ void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsig
//-----------------------------------------------------------------------------
void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat )
{
SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
SteamInput()->Legacy_TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
}
//-----------------------------------------------------------------------------
+1 -1
View File
@@ -1325,7 +1325,7 @@ void CGameEngineGL::TriggerControllerVibration( unsigned short nLeftSpeed, unsig
//-----------------------------------------------------------------------------
void CGameEngineGL::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat )
{
SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
SteamInput()->Legacy_TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
}
//-----------------------------------------------------------------------------
+1 -1
View File
@@ -2025,7 +2025,7 @@ void CGameEngineWin32::TriggerControllerVibration( unsigned short nLeftSpeed, un
//-----------------------------------------------------------------------------
void CGameEngineWin32::TriggerControllerHaptics( ESteamControllerPad ePad, unsigned short usOnMicroSec, unsigned short usOffMicroSec, unsigned short usRepeat )
{
SteamInput()->TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
SteamInput()->Legacy_TriggerRepeatedHapticPulse( m_ActiveControllerHandle, ePad, usOnMicroSec, usOffMicroSec, usRepeat, 0 );
}
//-----------------------------------------------------------------------------
@@ -57,7 +57,6 @@
BA60B6B81A82EDD200F4AC4F /* Friends.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA60B6B41A82EDD200F4AC4F /* Friends.cpp */; };
BA60B6B91A82EDD200F4AC4F /* Inventory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA60B6B61A82EDD200F4AC4F /* Inventory.cpp */; };
F803305119087F9200344590 /* musicplayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F803305019087F9200344590 /* musicplayer.cpp */; };
F80330831908872600344590 /* controller.vdf in Resources */ = {isa = PBXBuildFile; fileRef = F80330821908872600344590 /* controller.vdf */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -163,6 +162,7 @@
50E77DF713621991000FC072 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
840B386E19BB91C50084B9F1 /* htmlsurface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = htmlsurface.cpp; sourceTree = "<group>"; };
840B386F19BB91C50084B9F1 /* htmlsurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = htmlsurface.h; sourceTree = "<group>"; };
A46ECF6D26BE389800985AA7 /* steamworksexample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = steamworksexample.entitlements; path = osx/steamworksexample.entitlements; sourceTree = "<group>"; };
A4B5A0FC24906974000E9151 /* RemotePlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemotePlay.cpp; sourceTree = "<group>"; };
A4B5A0FE2490698A000E9151 /* RemotePlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemotePlay.h; sourceTree = "<group>"; };
A4B5A0FF249069C9000E9151 /* remotestoragesync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = remotestoragesync.cpp; sourceTree = "<group>"; };
@@ -175,7 +175,6 @@
BA60B6B71A82EDD200F4AC4F /* Inventory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Inventory.h; sourceTree = "<group>"; };
F803304F19087DA600344590 /* musicplayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = musicplayer.h; sourceTree = "<group>"; };
F803305019087F9200344590 /* musicplayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = musicplayer.cpp; sourceTree = "<group>"; };
F80330821908872600344590 /* controller.vdf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = controller.vdf; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -247,9 +246,9 @@
503C6CAC1268F34200B66E3B /* Resources */ = {
isa = PBXGroup;
children = (
A46ECF6D26BE389800985AA7 /* steamworksexample.entitlements */,
504EDCC01269025A00F96D63 /* steam_appid.txt */,
504EDCB4126900D600F96D63 /* steamworksexample-Info.plist */,
F80330821908872600344590 /* controller.vdf */,
);
name = Resources;
sourceTree = "<group>";
@@ -382,6 +381,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 503C6CA31268F34200B66E3B;
@@ -399,7 +399,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F80330831908872600344590 /* controller.vdf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -462,21 +461,25 @@
503C6CC71268F34200B66E3B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_ENTITLEMENTS = osx/steamworksexample.entitlements;
ENABLE_HARDENED_RUNTIME = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_PREPROCESSOR_DEFINITIONS = (
DEBUG,
GL_SILENCE_DEPRECATION,
);
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = (
POSIX,
OSX,
GL_SILENCE_DEPRECATION,
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
MACOSX_DEPLOYMENT_TARGET = 10.11;
OTHER_CODE_SIGN_FLAGS = "--deep";
PREBINDING = NO;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = ../public;
};
@@ -485,19 +488,19 @@
503C6CC81268F34200B66E3B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_ENTITLEMENTS = osx/steamworksexample.entitlements;
ENABLE_HARDENED_RUNTIME = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = (
POSIX,
OSX,
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
MACOSX_DEPLOYMENT_TARGET = 10.11;
OTHER_CODE_SIGN_FLAGS = "--deep";
PREBINDING = NO;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = ../public;
};
@@ -507,13 +510,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_LINK_OBJC_RUNTIME = NO;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
INFOPLIST_FILE = "osx/steamworksexample-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
@@ -524,9 +526,8 @@
"\"$(SRCROOT)/../lib/osx/release\"",
../redistributable_bin/osx/,
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.valvesoftware.steam.steamworksexample;
PRODUCT_NAME = steamworksexample;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Debug;
@@ -535,15 +536,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_LINK_OBJC_RUNTIME = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "osx/steamworksexample-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
@@ -553,9 +552,8 @@
"\"$(SRCROOT)/../lib/osx/release\"",
../redistributable_bin/osx/,
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.valvesoftware.steam.steamworksexample;
PRODUCT_NAME = steamworksexample;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Release;
-54
View File
@@ -1,54 +0,0 @@
==================================================
Using the DRM tool
==================================================
1. Create a steam account just for submitting builds via DRM tool. Set it up with a strong password.
2. Add the account to your Steam publishing group using the steamworks user admin.
3. Give the account access to submit DRM
4. Enter the account user name and password into the drmtool.cfg file that sits with the drmtool.exe
5. run DRM tool using the appropriate path to your exe, app ID, and flags
6. If sign-in fails due to Steam Guard, see the Steam Guard section below
==================================================
Flag values
==================================================
Default: 0
Min compatibility mode: 4
Max compatibility mode: 38
Try it with flag = 0, if that breaks the game, try with flag = 4, if that still breaks the game, try with flag = 38.
==================================================
Steam Guard
==================================================
Steam Guard may block you from authenticating. If so, do the following.
1. Log into the partner site using the build account to force a steamguard code to be sent
2. Take the steam guard code from email and paste it in place of “code” in the cfg file after “auth:”
3. Run the DRM tool
4. Once you’ve successfully signed in and drm’ed an exe, remove the auth line from the cfg file
==================================================
Example usage
==================================================
drmtool.exe -remotedrm build_path\Auslandia.exe 107700 0
==================================================
Example drmtool.cfg file
==================================================
server:partner.steamgames.com
user:ACCOUNT_NAME
pw:VERY_STRONG_PASSWORD
universe:public
auth:STEAM_GUARD_CODE_IF_NECESSARY
==================================================
Note on applying the DRM wrapper on top of other DRM systems
==================================================
If you are applying another DRM technology to the executable, wrap the exe with Steam DRM first in max compatibility mode (38) then apply the additional DRM.
==================================================
Note on .Net executables
==================================================
Note: The DRM tool breaks most .net executables. If you are building a .Net executable, you can skip the DRM wrapper, but please put in your own Steam check using SteamAPI_RestartAppIfNecessary( unOwnAppID ).
-5
View File
@@ -1,5 +0,0 @@
server:partner.steamgames.com
user:account
pw:password
universe:public
auth:code
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.