1 module derelict.steamworks.structs; 2 3 import derelict.steamworks.enums; 4 import derelict.steamworks.types; 5 6 align(1): 7 8 struct FriendGameInfo_t 9 { 10 CGameID m_gameID; 11 uint32 m_unGameIP; 12 uint16 m_usGamePort; 13 uint16 m_usQueryPort; 14 CSteamID m_steamIDLobby; 15 } 16 17 struct LeaderboardEntry_t 18 { 19 CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info 20 int32 m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard 21 int32 m_nScore; // score as set in the leaderboard 22 int32 m_cDetails; // number of int32 details available for this entry 23 UGCHandle_t m_hUGC; // handle for UGC attached to the entry 24 } 25 26 struct SteamControllerState001_t 27 { 28 // If packet num matches that on your prior call, then the controller state hasn't been changed since 29 // your last call and there is no need to process it 30 uint32 unPacketNum; 31 32 // bit flags for each of the buttons 33 uint64 ulButtons; 34 35 // Left pad coordinates 36 short sLeftPadX; 37 short sLeftPadY; 38 39 // Right pad coordinates 40 short sRightPadX; 41 short sRightPadY; 42 43 } 44 45 struct SteamUGCDetails_t 46 { 47 PublishedFileId_t m_nPublishedFileId; 48 EResult m_eResult; // The result of the operation. 49 EWorkshopFileType m_eFileType; // Type of the file 50 AppId_t m_nCreatorAppID; // ID of the app that created this file. 51 AppId_t m_nConsumerAppID; // ID of the app that will consume this file. 52 char[k_cchPublishedDocumentTitleMax] m_rgchTitle; // title of document 53 char[k_cchPublishedDocumentDescriptionMax] m_rgchDescription; // description of document 54 uint64 m_ulSteamIDOwner; // Steam ID of the user who created this content. 55 uint32 m_rtimeCreated; // time when the published file was created 56 uint32 m_rtimeUpdated; // time when the published file was last updated 57 uint32 m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable) 58 ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility 59 bool m_bBanned; // whether the file was banned 60 bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop 61 bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer 62 char[k_cchTagListMax] m_rgchTags; // comma separated list of all tags associated with this file 63 // file/url information 64 UGCHandle_t m_hFile; // The handle of the primary file 65 UGCHandle_t m_hPreviewFile; // The handle of the preview file 66 char[k_cchFilenameMax] m_pchFileName; // The cloud filename of the primary file 67 int32 m_nFileSize; // Size of the primary file 68 int32 m_nPreviewFileSize; // Size of the preview file 69 char[k_cchPublishedFileURLMax] m_rgchURL; // URL (for a video or a website) 70 // voting information 71 uint32 m_unVotesUp; // number of votes up 72 uint32 m_unVotesDown; // number of votes down 73 float m_flScore; // calculated score 74 // collection details 75 uint32 m_unNumChildren; 76 } 77 78 struct SteamItemDetails_t 79 { 80 SteamItemInstanceID_t m_itemId; 81 SteamItemDef_t m_iDefinition; 82 uint16 m_unQuantity; 83 uint16 m_unFlags; // see ESteamItemFlags 84 } 85 86 struct servernetadr_t 87 { 88 uint16 m_usConnectionPort; // (in HOST byte order) 89 uint16 m_usQueryPort; 90 uint32 m_unIP; 91 } 92 93 struct gameserveritem_t 94 { 95 servernetadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server 96 int m_nPing; ///< current ping time in milliseconds 97 bool m_bHadSuccessfulResponse; ///< server has responded successfully in the past 98 bool m_bDoNotRefresh; ///< server is marked as not responding and should no longer be refreshed 99 char[k_cbMaxGameServerGameDir] m_szGameDir; ///< current game directory 100 char[k_cbMaxGameServerMapName] m_szMap; ///< current map 101 char[k_cbMaxGameServerGameDescription] m_szGameDescription; ///< game description 102 uint32 m_nAppID; ///< Steam App ID of this server 103 int m_nPlayers; ///< total number of players currently on the server. INCLUDES BOTS!! 104 int m_nMaxPlayers; ///< Maximum players that can join this server 105 int m_nBotPlayers; ///< Number of bots (i.e simulated players) on this server 106 bool m_bPassword; ///< true if this server needs a password to join 107 bool m_bSecure; ///< Is this server protected by VAC 108 uint32 m_ulTimeLastPlayed; ///< time (in unix time) when this server was last played on (for favorite/history servers) 109 int m_nServerVersion; ///< server version as reported to Steam 110 char[k_cbMaxGameServerName] m_szServerName; 111 char[k_cbMaxGameServerTags] m_szGameTags; 112 CSteamID m_steamID; 113 } 114 115 struct MatchMakingKeyValuePair_t 116 { 117 char[ 256 ] m_szKey; 118 char[ 256 ] m_szValue; 119 } 120 121 struct SteamParamStringArray_t 122 { 123 const(char)** m_ppStrings; 124 int32 m_nNumStrings; 125 } 126 127 struct P2PSessionState_t 128 { 129 uint8 m_bConnectionActive; // true if we've got an active open connection 130 uint8 m_bConnecting; // true if we're currently trying to establish a connection 131 uint8 m_eP2PSessionError; // last error recorded (see enum above) 132 uint8 m_bUsingRelay; // true if it's going through a relay server (TURN) 133 int32 m_nBytesQueuedForSend; 134 int32 m_nPacketsQueuedForSend; 135 uint32 m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server. 136 uint16 m_nRemotePort; // Only exists for compatibility with older authentication api's 137 } 138 139 struct LobbyMatchList_t 140 { 141 enum k_iCallback = k_iSteamMatchmakingCallbacks + 10; 142 uint32 m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for 143 } 144 145 struct NumberOfCurrentPlayers_t 146 { 147 enum k_iCallback = k_iSteamUserStatsCallbacks + 7; 148 uint8 m_bSuccess; // 1 if the call was successful 149 int32 m_cPlayers; // Number of players currently playing 150 }