Skip to content

Commit

Permalink
Revert "steam api v1.60"
Browse files Browse the repository at this point in the history
This reverts commit f3707ba.
  • Loading branch information
BenLubar committed Jun 27, 2024
1 parent 1d70335 commit e614d46
Show file tree
Hide file tree
Showing 24 changed files with 376 additions and 454 deletions.
Binary file modified src/lib/public/steam_api.lib
Binary file not shown.
68 changes: 68 additions & 0 deletions src/public/steam/isteamapplist.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to app data in Steam
//
//=============================================================================

#ifndef ISTEAMAPPLIST_H
#define ISTEAMAPPLIST_H
#ifdef _WIN32
#pragma once
#endif

#include "steam_api_common.h"

//-----------------------------------------------------------------------------
// Purpose: This is a restricted interface that can only be used by previously approved apps,
// contact your Steam Account Manager if you believe you need access to this API.
// This interface lets you detect installed apps for the local Steam client, useful for debugging tools
// to offer lists of apps to debug via Steam.
//-----------------------------------------------------------------------------
class ISteamAppList
{
public:
virtual uint32 GetNumInstalledApps() = 0;
virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;

virtual int GetAppName( AppId_t nAppID, STEAM_OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found
virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found

virtual int GetAppBuildId( AppId_t nAppID ) = 0; // return the buildid of this app, may change at any time based on backend updates to the game
};

#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"

// Global interface accessor
inline ISteamAppList *SteamAppList();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION );

// callbacks
#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: Sent when a new app is installed (not downloaded yet)
//---------------------------------------------------------------------------------
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 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_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app was installed
STEAM_CALLBACK_END(2)


#pragma pack( pop )
#endif // ISTEAMAPPLIST_H
13 changes: 2 additions & 11 deletions src/public/steam/isteamapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ISteamApps
// return the buildid of this app, may change at any time based on backend updates to the game
virtual int GetAppBuildId() = 0;

// Request all proof of purchase keys for the calling appid and associated DLC.
// Request all proof of purchase keys for the calling appid and asociated DLC.
// A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with
// appropriate appid values, ending with a final callback where the m_nAppId
// member is k_uAppIdInvalid (zero).
Expand All @@ -110,16 +110,7 @@ class ISteamApps
virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0;

// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions
virtual bool SetDlcContext( AppId_t nAppID ) = 0;

// returns total number of known app beta branches (including default "public" branch )
virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; //

// return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags)
virtual bool GetBetaInfo( int iBetaIndex, uint32 *punFlags, uint32 *punBuildID, char *pchBetaName, int cchBetaName, char *pchDescription, int cchDescription ) = 0; // iterate through

// select this beta branch for this app as active, might need the game to restart so Steam can update to that branch
virtual bool SetActiveBeta( const char *pchBetaName ) = 0;
virtual bool SetDlcContext( AppId_t nAppID ) = 0;
};

#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
Expand Down
8 changes: 7 additions & 1 deletion src/public/steam/isteamclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,18 @@ class ISteamClient
// Expose HTTP interface
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;

// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )

// Exposes the ISteamController interface - deprecated in favor of Steam Input
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;

// Exposes the ISteamUGC interface
virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;

// returns app list interface, only available on specially registered apps
virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;

// Music Player
virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;

Expand Down Expand Up @@ -156,7 +162,7 @@ class ISteamClient
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )

};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient021"
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"

#ifndef STEAM_API_EXPORTS

Expand Down
1 change: 1 addition & 0 deletions src/public/steam/isteamcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ typedef uint64 ControllerAnalogActionHandle_t;
#define ControllerAnalogActionData_t InputAnalogActionData_t
#define ControllerDigitalActionData_t InputDigitalActionData_t
#define ControllerMotionData_t InputMotionData_t
#define ControllerMotionDataV2_t InputMotionDataV2_t
#else
struct ControllerAnalogActionData_t
{
Expand Down
5 changes: 0 additions & 5 deletions src/public/steam/isteamfriends.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ struct FriendGameInfo_t
};
#pragma pack( pop )

// special values for FriendGameInfo_t::m_usQueryPort
const uint16 k_usFriendGameInfoQueryPort_NotInitialized = 0xFFFF; // We haven't asked the GS for this query port's actual value yet. Was #define QUERY_PORT_NOT_INITIALIZED in older versions of Steamworks SDK.
const uint16 k_usFriendGameInfoQueryPort_Error = 0xFFFE; // We were unable to get the query port for this server. Was #define QUERY_PORT_ERROR in older versions of Steamworks SDK.

// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
// in UTF-8.
Expand Down Expand Up @@ -521,7 +517,6 @@ struct GameOverlayActivated_t
uint8 m_bActive; // true if it's just been activated, false otherwise
bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated
AppId_t m_nAppID; // the appID of the game (should always be the current game)
uint32 m_dwOverlayPID; // used internally
};


Expand Down
52 changes: 52 additions & 0 deletions src/public/steam/isteaminput.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,58 @@ struct InputMotionData_t
float rotVelZ;
};


struct InputMotionDataV2_t
{
//
// Gyro post processing:
//

// Drift Corrected Quaternion is calculated after steam input controller calibration values have been applied.
// Rawest _useful_ version of a quaternion.
// Most camera implementations should use this by comparing last rotation against current rotation, and applying the difference to the in game camera (plus your own sensitivity tweaks)
// It is worth viewing
float driftCorrectedQuatX;
float driftCorrectedQuatY;
float driftCorrectedQuatZ;
float driftCorrectedQuatW;

// Sensor fusion corrects using accelerometer, and "average forward over time" for "forward".
// This can "ouija" your aim, so it's not so appropriate for camera controls (sensor fusion was originally made for racing game steering )
// Same result as from old InputMotionData_t::rotQuatX/Y/Z/W
float sensorFusionQuatX;
float sensorFusionQuatY;
float sensorFusionQuatZ;
float sensorFusionQuatW;

// Deferred Sensor fusion quaternion with deferred correction
// Reduces perception of "ouija" effect by only applying correction when the controller is below "low noise" thresholds,
// while the controller rotates fast - never when the user is attempting precision aim.
float deferredSensorFusionQuatX;
float deferredSensorFusionQuatY;
float deferredSensorFusionQuatZ;
float deferredSensorFusionQuatW;

// Same as accel but values are calibrated such that 1 unit = 1G.
// X = Right
// Y = Forward out through the joystick USB port.
// Z = Up through the joystick axis.
float gravityX;
float gravityY;
float gravityZ;

//
// Same as rotVel values in GetMotionData but values are calibrated to degrees per second.
// Local Space (controller relative)
// X = Pitch = left to right axis
// Y = Roll = axis through charging port
// Z = Yaw = axis through sticks
float degreesPerSecondX;
float degreesPerSecondY;
float degreesPerSecondZ;

};

//-----------------------------------------------------------------------------
// Purpose: when callbacks are enabled this fires each time a controller action
// state changes
Expand Down
11 changes: 6 additions & 5 deletions src/public/steam/isteamnetworkingsockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ISteamNetworkingSockets
/// 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
/// was queued. There are subtle race conditions that can hapen if you
/// don't understand this!
///
/// If any incoming messages for this connection are queued, the userdata
Expand Down Expand Up @@ -397,9 +397,10 @@ class ISteamNetworkingSockets
/// lanes may be sent out of order. Each lane has its own message number
/// sequence. The first message sent on each lane will be assigned the number 1.
///
/// Each lane has a "priority". Lanes with higher numeric values will only be processed
/// when all lanes with lower number values are empty. The magnitudes of the priority
/// values are not relevant, only their sort order.
/// Each lane has a "priority". Lower priority lanes will only be processed
/// when all higher-priority lanes are empty. The magnitudes of the priority
/// values are not relevant, only their sort order. Higher numeric values
/// take priority over lower numeric values.
///
/// Each lane also is assigned a weight, which controls the approximate proportion
/// of the bandwidth that will be consumed by the lane, relative to other lanes
Expand Down Expand Up @@ -828,7 +829,7 @@ class ISteamNetworkingSockets
/// different types of traffic. Because these allocations come from a global
/// namespace, there is a relatively strict limit on the maximum number of
/// ports you may request. (At the time of this writing, the limit is 4.)
/// The port assignments are *not* guaranteed to have any particular order
/// The Port assignments are *not* guaranteed to have any particular order
/// or relationship! Do *not* assume they are contiguous, even though that
/// may often occur in practice.
///
Expand Down
3 changes: 1 addition & 2 deletions src/public/steam/isteamparentalsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ enum EParentalFeature
k_EFeatureLibrary = 11,
k_EFeatureTest = 12,
k_EFeatureSiteLicense = 13,
k_EFeatureKioskMode_Deprecated = 14,
k_EFeatureBlockAlways = 15,
k_EFeatureKioskMode = 14,
k_EFeatureMax
};

Expand Down
10 changes: 2 additions & 8 deletions src/public/steam/isteamremoteplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ enum ESteamDeviceFormFactor
k_ESteamDeviceFormFactorTablet = 2,
k_ESteamDeviceFormFactorComputer = 3,
k_ESteamDeviceFormFactorTV = 4,
k_ESteamDeviceFormFactorVRHeadset = 5,
};

// Steam Remote Play session ID
Expand Down Expand Up @@ -52,17 +51,12 @@ class ISteamRemotePlay
// This is set to 0x0 if the resolution is not available
virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0;

// Start Remote Play Together and optionally show the UI in the overlay
// This returns false if Remote Play Together can't be started or your game is not configured for Remote Play Together
virtual bool BStartRemotePlayTogether( bool bShowOverlay = true ) = 0;

// Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is empty
// This will automatically start Remote Play Together if it hasn't already been started
// This returns false if the invite can't be sent or your game is not configured for Remote Play Together
// This returns false if the invite can't be sent
virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0;
};

#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION002"
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001"

// Global interface accessor
inline ISteamRemotePlay *SteamRemotePlay();
Expand Down
3 changes: 1 addition & 2 deletions src/public/steam/isteamremotestorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ enum EWorkshopFileType
k_EWorkshopFileTypeSteamworksAccessInvite = 13, // internal
k_EWorkshopFileTypeSteamVideo = 14, // Steam video
k_EWorkshopFileTypeGameManagedItem = 15, // managed completely by the game, not the user, and not shown on the web
k_EWorkshopFileTypeClip = 16, // internal

// Update k_EWorkshopFileTypeMax if you add values.
k_EWorkshopFileTypeMax = 17
k_EWorkshopFileTypeMax = 16

};

Expand Down
Loading

0 comments on commit e614d46

Please sign in to comment.