Implement SteamFriends and add CSteamID wrapper.

This commit is contained in:
Michael Dirks
2015-06-07 03:31:10 +02:00
parent ab4b03b2c2
commit 071a776a9e
12 changed files with 1079 additions and 321 deletions
+279 -215
View File
@@ -1,20 +1,20 @@
; BlitzSteam - Steam wrapper for Blitz.
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
; Steam -------------------------------------------------------------------------
; BlitzSteam - Steam wrapper for Blitz.
; Copyright (C) 2015 Project Kube (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
; Steam -------------------------------------------------------------------------
Const BLITZSTEAM_ENUM_CALLBACK_SteamAppListCallbacks = 3900
Const BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks = 1000
Const BLITZSTEAM_ENUM_CALLBACK_SteamBillingCallbacks = 400
@@ -45,7 +45,7 @@ Const BLITZSTEAM_ENUM_CALLBACK_ClientDepotBuilderCallbacks = 1400
Const BLITZSTEAM_ENUM_CALLBACK_ClientDeviceAuthCallbacks = 3000
Const BLITZSTEAM_ENUM_CALLBACK_ClientFriendsCallbacks = 800
Const BLITZSTEAM_ENUM_CALLBACK_ClientHTTPCallbacks = 2100
Const BLITZSTEAM_ENUM_CALLBACK_ClientInventoryCallbacks = 4700
Const BLITZSTEAM_ENUM_CALLBACK_ClientInventoryCallbacks = 4700
Const BLITZSTEAM_ENUM_CALLBACK_ClientMusicCallbacks = 3200
Const BLITZSTEAM_ENUM_CALLBACK_ClientNetworkDeviceManagerCallbacks = 3100
Const BLITZSTEAM_ENUM_CALLBACK_ClientParentalSettingsCallbacks = 2900
@@ -61,21 +61,21 @@ Const BLITZSTEAM_ENUM_CALLBACK_ClientUnifiedMessagesCallbacks = 2500
Const BLITZSTEAM_ENUM_CALLBACK_ClientUserCallbacks = 900
Const BLITZSTEAM_ENUM_CALLBACK_ClientUtilsCallbacks = 1600
Const BLITZSTEAM_ENUM_CALLBACK_ClientVideoCallbacks = 4600
Const BLITZSTEAM_ENUM_CALLBACK_ClientVRCallbacks = 4200
; SteamAppList ------------------------------------------------------------------
Const BLITZSTEAM_CALLBACK_APPINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppListCallbacks + 1
Const BLITZSTEAM_CALLBACK_APPUNINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppListCallbacks + 2
; SteamApps ---------------------------------------------------------------------
Const BLITZSTEAM_CALLBACK_DLCINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 5
Const BLITZSTEAM_CALLBACK_APPPROOFOFPURCHASEKEYRESPONSE = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 13
Const BLITZSTEAM_CALLBACK_NEWLAUNCHQUERYPARAMETERS = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 14
; The following things are PS3 only:
; ERegisterActivationCodeResult
; RegisterActivationCodeResponse_t
; SteamClient -------------------------------------------------------------------
Const BLITZSTEAM_ENUM_CALLBACK_ClientVRCallbacks = 4200
; SteamAppList ------------------------------------------------------------------
Const BLITZSTEAM_CALLBACK_APPINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppListCallbacks + 1
Const BLITZSTEAM_CALLBACK_APPUNINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppListCallbacks + 2
; SteamApps ---------------------------------------------------------------------
Const BLITZSTEAM_CALLBACK_DLCINSTALLED = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 5
Const BLITZSTEAM_CALLBACK_APPPROOFOFPURCHASEKEYRESPONSE = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 13
Const BLITZSTEAM_CALLBACK_NEWLAUNCHQUERYPARAMETERS = BLITZSTEAM_ENUM_CALLBACK_SteamAppsCallbacks + 14
; The following things are PS3 only:
; ERegisterActivationCodeResult
; RegisterActivationCodeResponse_t
; SteamClient -------------------------------------------------------------------
Const BLITZSTEAM_EACCOUNTYPE_INVALID = 0
Const BLITZSTEAM_EACCOUNTYPE_INDIVIDUAL = 1
Const BLITZSTEAM_EACCOUNTYPE_MULTISEAT = 2
@@ -88,185 +88,249 @@ Const BLITZSTEAM_EACCOUNTYPE_CHAT = 8
;Const BLITZSTEAM_EACCOUNTYPE_CONSOLEUSER = 9
Const BLITZSTEAM_EACCOUNTYPE_ANONUSER = 10
; SteamController ---------------------------------------------------------------
Const BLITZSTEAM_RIGHT_TRIGGER_MASK = $00000001
Const BLITZSTEAM_LEFT_TRIGGER_MASK = $00000002
Const BLITZSTEAM_RIGHT_BUMPER_MASK = $00000004
Const BLITZSTEAM_LEFT_BUMPER_MASK = $00000008
Const BLITZSTEAM_BUTTON_0_MASK = $00000010
Const BLITZSTEAM_BUTTON_1_MASK = $00000020
Const BLITZSTEAM_BUTTON_2_MASK = $00000040
Const BLITZSTEAM_BUTTON_3_MASK = $00000080
Const BLITZSTEAM_TOUCH_0_MASK = $00000100
Const BLITZSTEAM_TOUCH_1_MASK = $00000200
Const BLITZSTEAM_TOUCH_2_MASK = $00000400
Const BLITZSTEAM_TOUCH_3_MASK = $00000800
Const BLITZSTEAM_BUTTON_MENU_MASK = $0001000
Const BLITZSTEAM_BUTTON_STEAM_MASK = $0002000
Const BLITZSTEAM_BUTTON_ESCAPE_MASK = $0004000
Const BLITZSTEAM_BUTTON_BACK_LEFT_MASK = $0008000
Const BLITZSTEAM_BUTTON_BACK_RIGHT_MASK = $0010000
Const BLITZSTEAM_BUTTON_LEFTPAD_CLICKED_MASK = $0020000
Const BLITZSTEAM_BUTTON_RIGHTPAD_CLICKED_MASK = $0040000
Const BLITZSTEAM_LEFTPAD_FINGERDOWN_MASK = $0080000
Const BLITZSTEAM_RIGHTPAD_FINGERDOWN_MASK = $0100000
Const BLITZSTEAM_JOYSTICK_BUTTON_MASK = $0400000
Const BLITZSTEAM_ESTEAMCONTROLLERPAD_LEFT = 0
Const BLITZSTEAM_ESTEAMCONTROLLERPAD_RIGHT = 1
Type BlitzSteamControllerState
Field unPacketNum%
Field ulButtonsL%, ulButtonsR%
Field sLeftPadXY // Left/High = X, Right/Low = Y
Field sRightPadXY // Left/High = X, Right/Low = Y
End Type
;----------------------------------------------------------------
;-- Enumerations
;----------------------------------------------------------------
Const EResultOK = 1; ; success
Const EResultFail = 2; ; generic failure
Const EResultNoConnection = 3; ; no/failed network connection
Const EResultInvalidPassword = 5; ; password/ticket is invalid
Const EResultLoggedInElsewhere = 6; ; same user logged in elsewhere
Const EResultInvalidProtocolVer = 7; ; protocol version is incorrect
Const EResultInvalidParam = 8; ; a parameter is incorrect
Const EResultFileNotFound = 9; ; file was not found
Const EResultBusy = 10; ; called method busy - action not taken
Const EResultInvalidState = 11; ; called object was in an invalid state
Const EResultInvalidName = 12; ; name is invalid
Const EResultInvalidEmail = 13; ; email is invalid
Const EResultDuplicateName = 14; ; name is not unique
Const EResultAccessDenied = 15; ; access is denied
Const EResultTimeout = 16; ; operation timed out
Const EResultBanned = 17; ; VAC2 banned
Const EResultAccountNotFound = 18; ; account not found
Const EResultInvalidSteamID = 19; ; steamID is invalid
Const EResultServiceUnavailable = 20; ; The requested service is currently unavailable
Const EResultNotLoggedOn = 21; ; The user is not logged on
Const EResultPending = 22; ; Request is pending (may be in process; or waiting on third party)
Const EResultEncryptionFailure = 23; ; Encryption or Decryption failed
Const EResultInsufficientPrivilege = 24; ; Insufficient privilege
Const EResultLimitExceeded = 25; ; Too much of a good thing
Const EResultRevoked = 26; ; Access has been revoked (used for revoked guest passes)
Const EResultExpired = 27; ; License/Guest pass the user is trying to access is expired
Const EResultAlreadyRedeemed = 28; ; Guest pass has already been redeemed by account; cannot be acked again
Const EResultDuplicateRequest = 29; ; The request is a duplicate and the action has already occurred in the past; ignored this time
Const EResultAlreadyOwned = 30; ; All the games in this guest pass redemption request are already owned by the user
Const EResultIPNotFound = 31; ; IP address not found
Const EResultPersistFailed = 32; ; failed to write change to the data store
Const EResultLockingFailed = 33; ; failed to acquire access lock for this operation
Const EResultLogonSessionReplaced = 34;
Const EResultConnectFailed = 35;
Const EResultHandshakeFailed = 36;
Const EResultIOFailure = 37;
Const EResultRemoteDisconnect = 38;
Const EResultShoppingCartNotFound = 39; ; failed to find the shopping cart requested
Const EResultBlocked = 40; ; a user didn't allow it
Const EResultIgnored = 41; ; target is ignoring sender
Const EResultNoMatch = 42; ; nothing matching the request found
Const EResultAccountDisabled = 43;
Const EResultServiceReadOnly = 44; ; this service is not accepting content changes right now
Const EResultAccountNotFeatured = 45; ; account doesn't have value; so this feature isn't available
Const EResultAdministratorOK = 46; ; allowed to take this action; but only because requester is admin
Const EResultContentVersion = 47; ; A Version mismatch in content transmitted within the Steam protocol.
Const EResultTryAnotherCM = 48; ; The current CM can't service the user making a request; user should try another.
Const EResultPasswordRequiredToKickSession = 49;; You are already logged in elsewhere; this cached credential login has failed.
Const EResultAlreadyLoggedInElsewhere = 50; ; You are already logged in elsewhere; you must wait
Const EResultSuspended = 51; ; Long running operation (content download) suspended/paused
Const EResultCancelled = 52; ; Operation canceled (typically by user: content download)
Const EResultDataCorruption = 53; ; Operation canceled because data is ill formed or unrecoverable
Const EResultDiskFull = 54; ; Operation canceled - not enough disk space.
Const EResultRemoteCallFailed = 55; ; an remote call or IPC call failed
Const EResultPasswordUnset = 56; ; Password could not be verified as it's unset server side
Const EResultExternalAccountUnlinked = 57; ; External account (PSN; Facebook...) is not linked to a Steam account
Const EResultPSNTicketInvalid = 58; ; PSN ticket was invalid
Const EResultExternalAccountAlreadyLinked = 59; ; External account (PSN; Facebook...) is already linked to some other account; must explicitly request to replace/delete the link first
Const EResultRemoteFileConflict = 60; ; The sync cannot resume due to a conflict between the local and remote files
Const EResultIllegalPassword = 61; ; The requested new password is not legal
Const EResultSameAsPreviousValue = 62; ; new value is the same as the old one ( secret question and answer )
Const EResultAccountLogonDenied = 63; ; account login denied due to 2nd factor authentication failure
Const EResultCannotUseOldPassword = 64; ; The requested new password is not legal
Const EResultInvalidLoginAuthCode = 65; ; account login denied due to auth code invalid
Const EResultAccountLogonDeniedNoMail = 66; ; account login denied due to 2nd factor auth failure - and no mail has been sent
Const EResultHardwareNotCapableOfIPT = 67; ;
Const EResultIPTInitError = 68; ;
Const EResultParentalControlRestricted = 69; ; operation failed due to parental control restrictions for current user
Const EResultFacebookQueryError = 70; ; Facebook query returned an error
Const EResultExpiredLoginAuthCode = 71; ; account login denied due to auth code expired
Const EResultIPLoginRestrictionFailed = 72;
Const EResultAccountLockedDown = 73;
Const EResultAccountLogonDeniedVerifiedEmailRequired = 74;
Const EResultNoMatchingURL = 75;
Const EResultBadResponse = 76; ; parse failure; missing field; etc.
Const EResultRequirePasswordReEntry = 77; ; The user cannot complete the action until they re-enter their password
Const EResultValueOutOfRange = 78; ; the value entered is outside the acceptable range
Const EResultUnexpectedError = 79; ; something happened that we didn't expect to ever happen
Const EResultDisabled = 80; ; The requested service has been configured to be unavailable
Const EResultInvalidCEGSubmission = 81; ; The set of files submitted to the CEG server are not valid !
Const EResultRestrictedDevice = 82; ; The device being used is not allowed to perform this action
Const EResultRegionLocked = 83; ; The action could not be complete because it is region restricted
Const EResultRateLimitExceeded = 84; ; Temporary rate limit exceeded; try again later; different from k_EResultLimitExceeded which may be permanent
Const EResultAccountLoginDeniedNeedTwoFactor = 85; ; Need two-factor code to login
Const EResultItemDeleted = 86; ; The thing we're trying to access has been deleted
Const EResultAccountLoginDeniedThrottle = 87; ; login attempt failed; try to throttle response to possible attacker
Const EResultTwoFactorCodeMismatch = 88; ; two factor code mismatch
Const EResultTwoFactorActivationCodeMismatch = 89; ; activation code for two-factor didn't match
Const EResultAccountAssociatedToMultiplePartners = 90; ; account has been associated with multiple partners
Const EResultNotModified = 91; ; data not modified
Const EResultNoMobileDevice = 92; ; the account does not have a mobile device associated with it
Const EResultTimeNotSynced = 93; ; the time presented is out of range or tolerance
Const EResultSmsCodeFailed = 94; ; SMS code failure (no match; none pending; etc.)
Const EResultAccountLimitExceeded = 95; ; Too many accounts access this resource
Const EResultAccountActivityLimitExceeded = 96; ; Too many changes to this account
Const EResultPhoneActivityLimitExceeded = 97; ; Too many changes to this phone
Const EVoiceResultOK = 0;
Const EVoiceResultNotInitialized = 1;
Const EVoiceResultNotRecording = 2;
Const EVoiceResultNoData = 3;
Const EVoiceResultBufferTooSmall = 4;
Const EVoiceResultDataCorrupted = 5;
Const EVoiceResultRestricted = 6;
Const EVoiceResultUnsupportedCodec = 7;
Const EVoiceResultReceiverOutOfDate = 8;
Const EVoiceResultReceiverDidNotAnswer = 9;
Const EDenyInvalid = 0;
Const EDenyInvalidVersion = 1;
Const EDenyGeneric = 2;
Const EDenyNotLoggedOn = 3;
Const EDenyNoLicense = 4;
Const EDenyCheater = 5;
Const EDenyLoggedInElseWhere = 6;
Const EDenyUnknownText = 7;
Const EDenyIncompatibleAnticheat = 8;
Const EDenyMemoryCorruption = 9;
Const EDenyIncompatibleSoftware = 10;
Const EDenySteamConnectionLost = 11;
Const EDenySteamConnectionError = 12;
Const EDenySteamResponseTimedOut = 13;
Const EDenySteamValidationStalled = 14;
Const EDenySteamOwnerLeftGuestUser = 15;
Const EBeginAuthSessionResultOK = 0; ; Ticket is valid for this game and this steamID.
Const EBeginAuthSessionResultInvalidTicket = 1; ; Ticket is not valid.
Const EBeginAuthSessionResultDuplicateRequest = 2; ; A ticket has already been submitted for this steamID
Const EBeginAuthSessionResultInvalidVersion = 3; ; Ticket is from an incompatible interface version
Const EBeginAuthSessionResultGameMismatch = 4; ; Ticket is not for this game
Const EBeginAuthSessionResultExpiredTicket = 5; ; Ticket has expired
Const EAuthSessionResponseOK = 0; ; Steam has verified the user is online; the ticket is valid and ticket has not been reused.
Const EAuthSessionResponseUserNotConnectedToSteam = 1; ; The user in question is not connected to steam
Const EAuthSessionResponseNoLicenseOrExpired = 2; ; The license has expired.
Const EAuthSessionResponseVACBanned = 3; ; The user is VAC banned for this game.
Const EAuthSessionResponseLoggedInElseWhere = 4; ; The user account has logged in elsewhere and the session containing the game instance has been disconnected.
Const EAuthSessionResponseVACCheckTimedOut = 5; ; VAC has been unable to perform anti-cheat checks on this user
Const EAuthSessionResponseAuthTicketCanceled = 6; ; The ticket has been canceled by the issuer
Const EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7; ; This ticket has already been used; it is not valid.
Const EAuthSessionResponseAuthTicketInvalid = 8; ; This ticket is not from a user instance currently connected to steam.
Const EAuthSessionResponsePublisherIssuedBan = 9; ; The user is banned for this game. The ban came via the web api and not VAC
Const EUserHasLicenseResultHasLicense = 0; ; User has a license for specified app
Const EUserHasLicenseResultDoesNotHaveLicense = 1; ; User does not have a license for the specified app
Const EUserHasLicenseResultNoAuth = 2; ; User has not been authenticated
; SteamController ---------------------------------------------------------------
Const BLITZSTEAM_MASK_RIGHT_TRIGGER = $00000001
Const BLITZSTEAM_MASK_LEFT_TRIGGER = $00000002
Const BLITZSTEAM_MASK_RIGHT_BUMPER = $00000004
Const BLITZSTEAM_MASK_LEFT_BUMPER = $00000008
Const BLITZSTEAM_MASK_BUTTON_0 = $00000010
Const BLITZSTEAM_MASK_BUTTON_1 = $00000020
Const BLITZSTEAM_MASK_BUTTON_2 = $00000040
Const BLITZSTEAM_MASK_BUTTON_3 = $00000080
Const BLITZSTEAM_MASK_TOUCH_0 = $00000100
Const BLITZSTEAM_MASK_TOUCH_1 = $00000200
Const BLITZSTEAM_MASK_TOUCH_2 = $00000400
Const BLITZSTEAM_MASK_TOUCH_3 = $00000800
Const BLITZSTEAM_MASK_BUTTON_MENU = $0001000
Const BLITZSTEAM_MASK_BUTTON_STEAM = $0002000
Const BLITZSTEAM_MASK_BUTTON_ESCAPE = $0004000
Const BLITZSTEAM_MASK_BUTTON_BACK_LEFT = $0008000
Const BLITZSTEAM_MASK_BUTTON_BACK_RIGHT = $0010000
Const BLITZSTEAM_MASK_BUTTON_LEFTPAD_CLICKED = $0020000
Const BLITZSTEAM_MASK_BUTTON_RIGHTPAD_CLICKED = $0040000
Const BLITZSTEAM_MASK_LEFTPAD_FINGERDOWN = $0080000
Const BLITZSTEAM_MASK_RIGHTPAD_FINGERDOWN = $0100000
Const BLITZSTEAM_MASK_JOYSTICK_BUTTON = $0400000
Const BLITZSTEAM_ESTEAMCONTROLLERPAD_LEFT = 0
Const BLITZSTEAM_ESTEAMCONTROLLERPAD_RIGHT = 1
Type BlitzSteamControllerState
Field unPacketNum%
Field ulButtonsL%, ulButtonsR%
Field sLeftPadXY ; Left/High = X, Right/Low = Y
Field sRightPadXY ; Left/High = X, Right/Low = Y
End Type
; SteamFriends ------------------------------------------------------------------
Const BLITZSTEAM_EFriendRelationShip_None = 0
Const BLITZSTEAM_EFriendRelationShip_Blocked = 1
Const BLITZSTEAM_EFriendRelationShip_RequestRecipient = 2
Const BLITZSTEAM_EFriendRelationShip_Friend = 3
Const BLITZSTEAM_EFriendRelationShip_RequestInitiator = 4
Const BLITZSTEAM_EFriendRelationShip_Ignored = 5
Const BLITZSTEAM_EFriendRelationShip_IgnoredFriend = 6
Const BLITZSTEAM_EFriendRelationShip_Suggested = 7
Const BLITZSTEAM_EPersonaState_Offline = 0
Const BLITZSTEAM_EPersonaState_Online = 1
Const BLITZSTEAM_EPersonaState_Busy = 2
Const BLITZSTEAM_EPersonaState_Away = 3
Const BLITZSTEAM_EPersonaState_Snooze = 4
Const BLITZSTEAM_EPersonaState_LookingToTrade = 5
Const BLITZSTEAM_EPersonaState_LookingToPlay = 6
Const BLITZSTEAM_EFriendFlags_None = $00000000
Const BLITZSTEAM_EFriendFlags_Blocked = $00000001
Const BLITZSTEAM_EFriendFlags_FriendshipRequested = $00000002
Const BLITZSTEAM_EFriendFlags_Immediate = $00000004
Const BLITZSTEAM_EFriendFlags_ClanMember = $00000008
Const BLITZSTEAM_EFriendFlags_OnGameServer = $00000010
Const BLITZSTEAM_EFriendFlags_RequestingFriendship = $00000080
Const BLITZSTEAM_EFriendFlags_RequestingInfo = $00000100
Const BLITZSTEAM_EFriendFlags_Ignored = $00000200
Const BLITZSTEAM_EFriendFlags_IgnoredFriend = $00000400
Const BLITZSTEAM_EFriendFlags_Suggested = $00000800
Const BLITZSTEAM_EFriendFlags_All = $0000FFFF
Const BLITZSTEAM_cchMaxFriendsGroupName = 64
Const BLITZSTEAM_cFriendsGroupLimit = 100
Const BLITZSTEAM_FriendsGroupID_Invalid = -1
Const BLITZSTEAM_cEnumerateFollowersMax = 50
Const BLITZSTEAM_cchPersonaNameMax = 128
Const BLITZSTEAM_cwchPersonaNameMax = 32
Type BlitzSteamFriendGameInfo
Field m_gameID%
Field m_unGameIP%
Field m_usGamePortQueryPort% ; Left/High GamePort, Right/Low QueryPort
Field m_steamIDLobby%
End Type
Const BLITZSTEAM_EUserRestrictionNone = 0
Const BLITZSTEAM_EUserRestrictionUnknown = 1
Const BLITZSTEAM_EUserRestrictionAnyChat = 2
Const BLITZSTEAM_EUserRestrictionVoiceChat = 4
Const BLITZSTEAM_EUserRestrictionGroupChat = 8
Const BLITZSTEAM_EUserRestrictionRating = 16
Const BLITZSTEAM_EUserRestrictionGameInvites = 32
Const BLITZSTEAM_EUserRestrictionTrading = 64
Type BlitzSteamFriendSessionStateInfo
Field m_uiOnlineSessionInstances
Field m_uiPublishedToFriendsSessionInstance
End Type
Const BLITZSTEAM_cubChatMetadataMax = 8192
Const BLITZSTEAM_cchMaxRichPresenceKeys = 20
Const BLITZSTEAM_cchMaxRichPresenceKeyLength = 64
Const BLITZSTEAM_cchMaxRichPresenceValueLength = 256
Const BLITZSTEAM_EOverlayToStoreFlag_None = 0
Const BLITZSTEAM_EOverlayToStoreFlag_AddToCart = 1
Const BLITZSTEAM_EOverlayToStoreFlag_AddToCartAndShow = 2
;----------------------------------------------------------------
;-- Enumerations
;----------------------------------------------------------------
Const EResultOK = 1; ; success
Const EResultFail = 2; ; generic failure
Const EResultNoConnection = 3; ; no/failed network connection
Const EResultInvalidPassword = 5; ; password/ticket is invalid
Const EResultLoggedInElsewhere = 6; ; same user logged in elsewhere
Const EResultInvalidProtocolVer = 7; ; protocol version is incorrect
Const EResultInvalidParam = 8; ; a parameter is incorrect
Const EResultFileNotFound = 9; ; file was not found
Const EResultBusy = 10; ; called method busy - action not taken
Const EResultInvalidState = 11; ; called object was in an invalid state
Const EResultInvalidName = 12; ; name is invalid
Const EResultInvalidEmail = 13; ; email is invalid
Const EResultDuplicateName = 14; ; name is not unique
Const EResultAccessDenied = 15; ; access is denied
Const EResultTimeout = 16; ; operation timed out
Const EResultBanned = 17; ; VAC2 banned
Const EResultAccountNotFound = 18; ; account not found
Const EResultInvalidSteamID = 19; ; steamID is invalid
Const EResultServiceUnavailable = 20; ; The requested service is currently unavailable
Const EResultNotLoggedOn = 21; ; The user is not logged on
Const EResultPending = 22; ; Request is pending (may be in process; or waiting on third party)
Const EResultEncryptionFailure = 23; ; Encryption or Decryption failed
Const EResultInsufficientPrivilege = 24; ; Insufficient privilege
Const EResultLimitExceeded = 25; ; Too much of a good thing
Const EResultRevoked = 26; ; Access has been revoked (used for revoked guest passes)
Const EResultExpired = 27; ; License/Guest pass the user is trying to access is expired
Const EResultAlreadyRedeemed = 28; ; Guest pass has already been redeemed by account; cannot be acked again
Const EResultDuplicateRequest = 29; ; The request is a duplicate and the action has already occurred in the past; ignored this time
Const EResultAlreadyOwned = 30; ; All the games in this guest pass redemption request are already owned by the user
Const EResultIPNotFound = 31; ; IP address not found
Const EResultPersistFailed = 32; ; failed to write change to the data store
Const EResultLockingFailed = 33; ; failed to acquire access lock for this operation
Const EResultLogonSessionReplaced = 34;
Const EResultConnectFailed = 35;
Const EResultHandshakeFailed = 36;
Const EResultIOFailure = 37;
Const EResultRemoteDisconnect = 38;
Const EResultShoppingCartNotFound = 39; ; failed to find the shopping cart requested
Const EResultBlocked = 40; ; a user didn't allow it
Const EResultIgnored = 41; ; target is ignoring sender
Const EResultNoMatch = 42; ; nothing matching the request found
Const EResultAccountDisabled = 43;
Const EResultServiceReadOnly = 44; ; this service is not accepting content changes right now
Const EResultAccountNotFeatured = 45; ; account doesn't have value; so this feature isn't available
Const EResultAdministratorOK = 46; ; allowed to take this action; but only because requester is admin
Const EResultContentVersion = 47; ; A Version mismatch in content transmitted within the Steam protocol.
Const EResultTryAnotherCM = 48; ; The current CM can't service the user making a request; user should try another.
Const EResultPasswordRequiredToKickSession = 49;; You are already logged in elsewhere; this cached credential login has failed.
Const EResultAlreadyLoggedInElsewhere = 50; ; You are already logged in elsewhere; you must wait
Const EResultSuspended = 51; ; Long running operation (content download) suspended/paused
Const EResultCancelled = 52; ; Operation canceled (typically by user: content download)
Const EResultDataCorruption = 53; ; Operation canceled because data is ill formed or unrecoverable
Const EResultDiskFull = 54; ; Operation canceled - not enough disk space.
Const EResultRemoteCallFailed = 55; ; an remote call or IPC call failed
Const EResultPasswordUnset = 56; ; Password could not be verified as it's unset server side
Const EResultExternalAccountUnlinked = 57; ; External account (PSN; Facebook...) is not linked to a Steam account
Const EResultPSNTicketInvalid = 58; ; PSN ticket was invalid
Const EResultExternalAccountAlreadyLinked = 59; ; External account (PSN; Facebook...) is already linked to some other account; must explicitly request to replace/delete the link first
Const EResultRemoteFileConflict = 60; ; The sync cannot resume due to a conflict between the local and remote files
Const EResultIllegalPassword = 61; ; The requested new password is not legal
Const EResultSameAsPreviousValue = 62; ; new value is the same as the old one ( secret question and answer )
Const EResultAccountLogonDenied = 63; ; account login denied due to 2nd factor authentication failure
Const EResultCannotUseOldPassword = 64; ; The requested new password is not legal
Const EResultInvalidLoginAuthCode = 65; ; account login denied due to auth code invalid
Const EResultAccountLogonDeniedNoMail = 66; ; account login denied due to 2nd factor auth failure - and no mail has been sent
Const EResultHardwareNotCapableOfIPT = 67; ;
Const EResultIPTInitError = 68; ;
Const EResultParentalControlRestricted = 69; ; operation failed due to parental control restrictions for current user
Const EResultFacebookQueryError = 70; ; Facebook query returned an error
Const EResultExpiredLoginAuthCode = 71; ; account login denied due to auth code expired
Const EResultIPLoginRestrictionFailed = 72;
Const EResultAccountLockedDown = 73;
Const EResultAccountLogonDeniedVerifiedEmailRequired = 74;
Const EResultNoMatchingURL = 75;
Const EResultBadResponse = 76; ; parse failure; missing field; etc.
Const EResultRequirePasswordReEntry = 77; ; The user cannot complete the action until they re-enter their password
Const EResultValueOutOfRange = 78; ; the value entered is outside the acceptable range
Const EResultUnexpectedError = 79; ; something happened that we didn't expect to ever happen
Const EResultDisabled = 80; ; The requested service has been configured to be unavailable
Const EResultInvalidCEGSubmission = 81; ; The set of files submitted to the CEG server are not valid !
Const EResultRestrictedDevice = 82; ; The device being used is not allowed to perform this action
Const EResultRegionLocked = 83; ; The action could not be complete because it is region restricted
Const EResultRateLimitExceeded = 84; ; Temporary rate limit exceeded; try again later; different from k_EResultLimitExceeded which may be permanent
Const EResultAccountLoginDeniedNeedTwoFactor = 85; ; Need two-factor code to login
Const EResultItemDeleted = 86; ; The thing we're trying to access has been deleted
Const EResultAccountLoginDeniedThrottle = 87; ; login attempt failed; try to throttle response to possible attacker
Const EResultTwoFactorCodeMismatch = 88; ; two factor code mismatch
Const EResultTwoFactorActivationCodeMismatch = 89; ; activation code for two-factor didn't match
Const EResultAccountAssociatedToMultiplePartners = 90; ; account has been associated with multiple partners
Const EResultNotModified = 91; ; data not modified
Const EResultNoMobileDevice = 92; ; the account does not have a mobile device associated with it
Const EResultTimeNotSynced = 93; ; the time presented is out of range or tolerance
Const EResultSmsCodeFailed = 94; ; SMS code failure (no match; none pending; etc.)
Const EResultAccountLimitExceeded = 95; ; Too many accounts access this resource
Const EResultAccountActivityLimitExceeded = 96; ; Too many changes to this account
Const EResultPhoneActivityLimitExceeded = 97; ; Too many changes to this phone
Const EVoiceResultOK = 0;
Const EVoiceResultNotInitialized = 1;
Const EVoiceResultNotRecording = 2;
Const EVoiceResultNoData = 3;
Const EVoiceResultBufferTooSmall = 4;
Const EVoiceResultDataCorrupted = 5;
Const EVoiceResultRestricted = 6;
Const EVoiceResultUnsupportedCodec = 7;
Const EVoiceResultReceiverOutOfDate = 8;
Const EVoiceResultReceiverDidNotAnswer = 9;
Const EDenyInvalid = 0;
Const EDenyInvalidVersion = 1;
Const EDenyGeneric = 2;
Const EDenyNotLoggedOn = 3;
Const EDenyNoLicense = 4;
Const EDenyCheater = 5;
Const EDenyLoggedInElseWhere = 6;
Const EDenyUnknownText = 7;
Const EDenyIncompatibleAnticheat = 8;
Const EDenyMemoryCorruption = 9;
Const EDenyIncompatibleSoftware = 10;
Const EDenySteamConnectionLost = 11;
Const EDenySteamConnectionError = 12;
Const EDenySteamResponseTimedOut = 13;
Const EDenySteamValidationStalled = 14;
Const EDenySteamOwnerLeftGuestUser = 15;
Const EBeginAuthSessionResultOK = 0; ; Ticket is valid for this game and this steamID.
Const EBeginAuthSessionResultInvalidTicket = 1; ; Ticket is not valid.
Const EBeginAuthSessionResultDuplicateRequest = 2; ; A ticket has already been submitted for this steamID
Const EBeginAuthSessionResultInvalidVersion = 3; ; Ticket is from an incompatible interface version
Const EBeginAuthSessionResultGameMismatch = 4; ; Ticket is not for this game
Const EBeginAuthSessionResultExpiredTicket = 5; ; Ticket has expired
Const EAuthSessionResponseOK = 0; ; Steam has verified the user is online; the ticket is valid and ticket has not been reused.
Const EAuthSessionResponseUserNotConnectedToSteam = 1; ; The user in question is not connected to steam
Const EAuthSessionResponseNoLicenseOrExpired = 2; ; The license has expired.
Const EAuthSessionResponseVACBanned = 3; ; The user is VAC banned for this game.
Const EAuthSessionResponseLoggedInElseWhere = 4; ; The user account has logged in elsewhere and the session containing the game instance has been disconnected.
Const EAuthSessionResponseVACCheckTimedOut = 5; ; VAC has been unable to perform anti-cheat checks on this user
Const EAuthSessionResponseAuthTicketCanceled = 6; ; The ticket has been canceled by the issuer
Const EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7; ; This ticket has already been used; it is not valid.
Const EAuthSessionResponseAuthTicketInvalid = 8; ; This ticket is not from a user instance currently connected to steam.
Const EAuthSessionResponsePublisherIssuedBan = 9; ; The user is banned for this game. The ban came via the web api and not VAC
Const EUserHasLicenseResultHasLicense = 0; ; User has a license for specified app
Const EUserHasLicenseResultDoesNotHaveLicense = 1; ; User does not have a license for the specified app
Const EUserHasLicenseResultNoAuth = 2; ; User has not been authenticated
+143 -41
View File
@@ -16,36 +16,45 @@
.lib "BlitzSteam.dll"
; Helpers -----------------------------------------------------------------------
; -- Int64
BlitzSteamInt64_New%()
BlitzSteamInt64_Copy%(other%)
BlitzSteamInt64_Destroy(this%)
BlitzSteamInt64_SetP(this%, other%)
BlitzSteamInt64_SetV(this%, left%, right%)
BlitzSteamInt64_AddP(this%, other%)
BlitzSteamInt64_AddV(this%, left%, right%)
BlitzSteamInt64_SubP(this%, other%)
BlitzSteamInt64_SubV(this%, left%, right%)
BlitzSteamInt64_MulP(this%, other%)
BlitzSteamInt64_MulV(this%, left%, right%)
BlitzSteamInt64_DivP(this%, other%)
BlitzSteamInt64_DivV(this%, left%, right%)
BlitzSteamInt64_EqualsP%(this%, other%)
BlitzSteamInt64_EqualsV%(this%, left%, right%)
BlitzSteamInt64_GreaterP%(this%, other%)
BlitzSteamInt64_GreaterV%(this%, left%, right%)
BlitzSteamInt64_GEqualsP%(this%, other%)
BlitzSteamInt64_GEqualsV%(this%, left%, right%)
BlitzSteamInt64_SmallerP%(this%, other%)
BlitzSteamInt64_SmallerV%(this%, left%, right%)
BlitzSteamInt64_SEqualsP%(this%, other%)
BlitzSteamInt64_SEqualsV%(this%, left%, right%)
BlitzSteamInt64_ToString$(this%)
BlitzSteamInt64_ValueL%(this%)
BlitzSteamInt64_ValueR%(this%)
BlitzSteamInt64_FromFloat%(value#)
BlitzSteamInt64_ToFloat#(this%)
BlitzSteamInt64_ToDouble%(this%)
; -- CSteamID
BlitzSteamCSteamID_New%()
BlitzSteamCSteamID_FromID%(unAccountID%, eUniverse%, eAccountType%)
BlitzSteamCSteamID_FromIDInstance%(unAccountID%, unInstance%, eUniverse%, eAccountType%)
BlitzSteamCSteamID_FromSteamID%(ulSteamID%)
BlitzSteamCSteamID_Copy%(pSteamID%)
BlitzSteamCSteamID_Destroy(pSteamID%)
BlitzSteamCSteamID_Set(pSteamID%, unAccountID%, eUniverse%, eAccountType%)
BlitzSteamCSteamID_InstancedSet(pSteamID%, unAccountID%, unInstance%, eUniverse%, eAccountType%)
BlitzSteamCSteamID_FullSet(pSteamID%, ulIdentifier%, eUniverse%, eAccountType%)
BlitzSteamCSteamID_SetFromUInt64(pSteamID%, ulSteamID%)
BlitzSteamCSteamID_Clear(pSteamID%)
BlitzSteamCSteamID_ConvertToUInt64%(pSteamID%)
BlitzSteamCSteamID_GetStaticAccountKey%(pSteamID%)
BlitzSteamCSteamID_CreateBlankAnonLogon(pSteamID%, eUniverse%)
BlitzSteamCSteamID_CreateBlankAnonUserLogon(pSteamID%, eUniverse%)
BlitzSteamCSteamID_BlankAnonAccount%(pSteamID%)
BlitzSteamCSteamID_GameServerAccount%(pSteamID%)
BlitzSteamCSteamID_PersistentGameServerAccount%(pSteamID%)
BlitzSteamCSteamID_AnonGameServerAccount%(pSteamID%)
BlitzSteamCSteamID_ContentServerAccount%(pSteamID%)
BlitzSteamCSteamID_ClanAccount%(pSteamID%)
BlitzSteamCSteamID_ChatAccount%(pSteamID%)
BlitzSteamCSteamID_IsLobby%(pSteamID%)
BlitzSteamCSteamID_IndividualAccount%(pSteamID%)
BlitzSteamCSteamID_AnonAccount%(pSteamID%)
BlitzSteamCSteamID_AnonUserAccount%(pSteamID%)
BlitzSteamCSteamID_ConsoleUserAccount%(pSteamID%)
BlitzSteamCSteamID_SetAccountID(pSteamID%, unAccountID%)
BlitzSteamCSteamID_SetAccountInstance(pSteamID, unInstance%)
BlitzSteamCSteamID_ClearIndividualInstance(pSteamID%)
BlitzSteamCSteamID_HasNoIndividualInstance%(pSteamID%)
BlitzSteamCSteamID_GetAccountID%(pSteamID%)
BlitzSteamCSteamID_GetAccountInstance%(pSteamID%)
BlitzSteamCSteamID_GetEAccountType%(pSteamID%)
BlitzSteamCSteamID_GetEUniverse%(pSteamID%)
BlitzSteamCSteamID_SetEUniverse(pSteamID%, eUniverse%)
BlitzSteamCSteamID_IsValid%(pSteamID%)
BlitzSteamCSteamID_Compare%(pSteamID%, pSteamIDOther%)
; -- Double
BlitzSteamDouble_New%()
BlitzSteamDouble_Copy%(other%)
@@ -60,22 +69,36 @@ BlitzSteamDouble_MulP(this%, other%)
BlitzSteamDouble_MulV(this%, left%, right%)
BlitzSteamDouble_DivP(this%, other%)
BlitzSteamDouble_DivV(this%, left%, right%)
BlitzSteamDouble_EqualsP%(this%, other%)
BlitzSteamDouble_EqualsV%(this%, left%, right%)
BlitzSteamDouble_GreaterP%(this%, other%)
BlitzSteamDouble_GreaterV%(this%, left%, right%)
BlitzSteamDouble_GEqualsP%(this%, other%)
BlitzSteamDouble_GEqualsV%(this%, left%, right%)
BlitzSteamDouble_SmallerP%(this%, other%)
BlitzSteamDouble_SmallerV%(this%, left%, right%)
BlitzSteamDouble_SEqualsP%(this%, other%)
BlitzSteamDouble_SEqualsV%(this%, left%, right%)
BlitzSteamDouble_CompareP%(this%, other%)
BlitzSteamDouble_CompareF%(this%, other#)
BlitzSteamDouble_ToString$(this%)
BlitzSteamDouble_ToFloat#(this%)
BlitzSteamDouble_FromFloat%(value#)
BlitzSteamDouble_ToInt32%(this%)
BlitzSteamDouble_FromInt32%(value%)
BlitzSteamDouble_ToInt64%(this%)
; -- Int64
BlitzSteamInt64_New%()
BlitzSteamInt64_Copy%(other%)
BlitzSteamInt64_Destroy(this%)
BlitzSteamInt64_SetP(this%, other%)
BlitzSteamInt64_SetV(this%, left%, right%)
BlitzSteamInt64_AddP(this%, other%)
BlitzSteamInt64_AddV(this%, left%, right%)
BlitzSteamInt64_SubP(this%, other%)
BlitzSteamInt64_SubV(this%, left%, right%)
BlitzSteamInt64_MulP(this%, other%)
BlitzSteamInt64_MulV(this%, left%, right%)
BlitzSteamInt64_DivP(this%, other%)
BlitzSteamInt64_DivV(this%, left%, right%)
BlitzSteamInt64_CompareP%(this%, other%)
BlitzSteamInt64_CompareV%(this%, left%, right%)
BlitzSteamInt64_ToString$(this%)
BlitzSteamInt64_ValueL%(this%)
BlitzSteamInt64_ValueR%(this%)
BlitzSteamInt64_FromFloat%(value#)
BlitzSteamInt64_ToFloat#(this%)
BlitzSteamInt64_ToDouble%(this%)
; Steam -------------------------------------------------------------------------
BlitzSteam_Init%()
@@ -202,4 +225,83 @@ BlitzSteamController_RunFrame(lpSteamController%)
BlitzSteamController_GetControllerStateEx%(lpSteamController%, unControllerIndex%, pState%) : "BlitzSteamController_GetControllerState"
BlitzSteamController_GetControllerState%(lpSteamController%, unControllerIndex%, pState*)
BlitzSteamController_TriggerHapticPulse(lpSteamController%, unControllerIndex%, eTargetPad%, usDurationMicroSec%)
BlitzSteamController_SetOverrideMode(lpSteamController%, pchMode$)
BlitzSteamController_SetOverrideMode(lpSteamController%, pchMode$)
; SteamFriends ------------------------------------------------------------------
BlitzSteamFriends_GetPersonaName$(lpSteamFriends%)
BlitzSteamFriends_SetPersonaName%(lpSteamFriends%, pchPersonaName$)
BlitzSteamFriends_GetPersonaState%(lpSteamFriends%)
BlitzSteamFriends_GetFriendCount%(lpSteamFriends%, iFriendFlags%)
BlitzSteamFriends_GetFriendByIndex%(lpSteamFriends%, iFriend%, iFriendFlags%)
BlitzSteamFriends_GetFriendRelationship%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendPersonaState%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendPersonaName$(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendGamePlayedEx%(lpSteamFriends%, steamIDFriend%, pFriendGameInfo%) : "BlitzSteamFriends_GetFriendGamePlayed"
BlitzSteamFriends_GetFriendGamePlayed%(lpSteamFriends%, steamIDFriend%, pFriendGameInfo*)
BlitzSteamFriends_GetFriendPersonaNameHistory$(lpSteamFriends%, steamIDFriend%, iPersonaName%)
BlitzSteamFriends_GetFriendSteamLevel%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetPlayerNickname$(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendsGroupCount%(lpSteamFriends%)
BlitzSteamFriends_GetFriendsGroupIDByIndex%(lpSteamFriends%, friendsGroupID%)
BlitzSteamFriends_GetFriendsGroupName$(lpSteamFriends%, friendsGroupID%)
BlitzSteamFriends_GetFriendsGroupMembersCount%(lpSteamFriends%, friendsGroupID%)
BlitzSteamFriends_GetFriendsGroupMembersListEx(lpSteamFriends%, friendsGroupID%, pOutSteamIDMembers%, nMembersCount%) : "BlitzSteamFriends_GetFriendsGroupMembersList"
BlitzSteamFriends_GetFriendsGroupMembersList(lpSteamFriends%, friendsGroupID%, pOutSteamIDMembers*, nMembersCount%)
BlitzSteamFriends_HasFriend(lpSteamFriends%, steamIDFriend%, iFriendFlags%)
BlitzSteamFriends_GetClanCount%(lpSteamFriends%)
BlitzSteamFriends_GetClanByIndex%(lpSteamFriends%, iClan%)
BlitzSteamFriends_GetClanName$(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanTag$(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanActivityCountsEx%(lpSteamFriends%, steamIDClan%, pnOnline%, pnInGame%, pnChatting%) : "BlitzSteamFriends_GetClanActivityCounts"
BlitzSteamFriends_GetClanActivityCounts%(lpSteamFriends%, steamIDClan%, pnOnline*, pnInGame*, pnChatting*)
BlitzSteamFriends_DownloadClanActivityCounts%(lpSteamFriends%, steamIDClan%, cClansToRequest%)
BlitzSteamFriends_GetFriendCountFromSource%(lpSteamFriends%, steamIDSource%)
BlitzSteamFriends_GetFriendFromSourceByIndex%(lpSteamFriends%, steamIDSource%, iFriend%)
BlitzSteamFriends_IsUserInSource%(lpSteamFriends%, steamIDUser%, steamIDSource%)
BlitzSteamFriends_SetInGameVoiceSpeaking(lpSteamFriends%, steamIDUser%, bSpeaking%)
BlitzSteamFriends_ActivateGameOverlay(lpSteamFriends%, pchDialog$)
BlitzSteamFriends_ActivateGameOverlayToUser(lpSteamFriends%, pchDialog$, steamID%)
BlitzSteamFriends_ActivateGameOverlayToWebPage(lpSteamFriends%, pchURL$)
BlitzSteamFriends_ActivateGameOverlayToStore(lpSteamFriends%, nAppID%, eFlag%)
BlitzSteamFriends_SetPlayedWith(lpSteamFriends%, steamIDUserPlayedWith%)
BlitzSteamFriends_ActivateGameOverlayInviteDialog(lpSteamFriends%, steamIDLobby%)
BlitzSteamFriends_GetSmallFriendAvatar%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetMediumFriendAvatar%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetLargeFriendAvatar%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_RequestUserInformation%(lpSteamFriends%, steamIDUser%, bRequireNameOnly%)
BlitzSteamFriends_RequestClanOfficerList%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanOwner%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanOfficerCount%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanOfficerByIndex%(lpSteamFriends%, steamIDClan%, iOfficer%)
BlitzSteamFriends_GetUserRestrictions%(lpSteamFriends%)
BlitzSteamFriends_SetRichPresence%(lpSteamFriends%, pchKey$, pchValue$)
BlitzSteamFriends_ClearRichPresence(lpSteamFriends%)
BlitzSteamFriends_GetFriendRichPresence$(lpSteamFriends%, steamIDFriend%, pchKey$)
BlitzSteamFriends_GetFriendRichPresenceKeyCount%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendRichPresenceKeyByIndex$(lpSteamFriends%, steamIDFriend%, iKey%)
BlitzSteamFriends_RequestFriendRichPresence(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_InviteUserToGame%(lpSteamFriends%, steamIDFriend%, pchConnectString%)
BlitzSteamFriends_GetCoplayFriendCount%(lpSteamFriends%)
BlitzSteamFriends_GetCoplayFriend%(lpSteamFriends%, iCoplayFriend%)
BlitzSteamFriends_GetFriendCoplayTime%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_GetFriendCoplayGame%(lpSteamFriends%, steamIDFriend%)
BlitzSteamFriends_JoinClanChatRoom%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_LeaveClanChatRoom%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetClanChatMemberCount%(lpSteamFriends%, steamIDClan%)
BlitzSteamFriends_GetChatMemberByIndex%(lpSteamFriends%, steamIDClan%, iUser%)
BlitzSteamFriends_SendClanChatMessage%(lpSteamFriends%, steamIDClanChat%, pchText$)
BlitzSteamFriends_GetClanChatMessageEx%(lpSteamFriends%, steamIDClanChat%, iMessage%, prgchText%, cchTextMax%, peChatEntryType%, psteamidChatter%) : "BlitzSteamFriends_GetClanChatMessage"
BlitzSteamFriends_GetClanChatMessage%(lpSteamFriends%, steamIDClanChat%, iMessage%, prgchText*, cchTextMax%, peChatEntryType*, psteamidChatter*)
BlitzSteamFriends_IsClanChatAdmin%(lpSteamFriends%, steamIDClanChat%, steamIDUser%)
BlitzSteamFriends_IsClanChatWindowOpenInSteam%(lpSteamFriends%, steamIDClanChat%)
BlitzSteamFriends_OpenClanChatWindowInSteam%(lpSteamFriends%, steamIDClanChat%)
BlitzSteamFriends_CloseClanChatWindowInSteam%(lpSteamFriends%, steamIDClanChat%)
BlitzSteamFriends_SetListenForFriendsMessages%(lpSteamFriends%, bInterceptEnabled%)
BlitzSteamFriends_ReplyToFriendMessage%(lpSteamFriends%, steamIDFriend%, pchMsgToSend$)
BlitzSteamFriends_GetFriendMessageEx%(lpSteamFriends%, steamIDFriend%, iMessageID%, pvData%, cubData%, peChatEntryType%) : "BlitzSteamFriends_GetFriendMessage"
BlitzSteamFriends_GetFriendMessage%(lpSteamFriends%, steamIDFriend%, iMessageID%, pvData*, cubData%, peChatEntryType*)
BlitzSteamFriends_GetFollowerCount%(lpSteamFriends%, steamID%)
BlitzSteamFriends_IsFollowing%(lpSteamFriends%, steamID%)
BlitzSteamFriends_EnumerateFollowingList%(lpSteamFriends%, unStartIndex%)
; SteamGameServer ---------------------------------------------------------------
+61 -13
View File
@@ -54,13 +54,26 @@ Type BSU_Depot
Field DepotId%
End Type
Type BSU_DLCDownloadProgress
Field unBytesDownloaded_L
Field unBytesDownloaded_R
Field unBytesTotal_L
Field unBytesTotal_R
Type BSU_Friend
Field SteamID_L, SteamID_R
Field Name$
Field NickName$
Field Index%
Field Relationship%
Field State%
Field SteamLevel%
End Type
;----------------------------------------------------------------
; -- Globals
;----------------------------------------------------------------
Global BSU_AppCount
Global BSU_DLCCount
Global BSU_DepotCount
Global BSU_FriendCount
;----------------------------------------------------------------
; -- Functions
;----------------------------------------------------------------
@@ -197,10 +210,10 @@ Function BSUAppList_GetInstalledApps(BankAppIdsStorage=0, BankAppNameStorage=0,
EndIf
; Request installed apps from Steam.
AppCount = BlitzSteamAppList_GetInstalledApps(BSUAppList, BankAppIds, BankAppIdsSz)
BSU_AppCount = BlitzSteamAppList_GetInstalledApps(BSUAppList, BankAppIds, BankAppIdsSz)
; We don't need to do this if we don't actually have any apps returned.
If AppCount > 0 Then
If BSU_AppCount > 0 Then
If BankAppNameStorage = 0 Then
; Create temporary storage for name.
BankAppName = CreateBank(BankAppNameSz)
@@ -218,7 +231,7 @@ Function BSUAppList_GetInstalledApps(BankAppIdsStorage=0, BankAppNameStorage=0,
; Index all apps.
Local AppIndex
For AppIndex = 1 To AppCount
For AppIndex = 0 To BSU_AppCount - 1
InstalledApp.BSU_App = New BSU_App
InstalledApp\AppId = PeekInt(BankAppIds, AppIndex * 4)
InstalledApp\Name = BSUAppList_GetAppName(InstalledApp\AppId, BankAppName)
@@ -300,8 +313,8 @@ Function BSUApps_GetDLCData(BankAppIdStorage=0, BankAvailableStorage=0, BankName
If BSUInitialized Then
Delete Each BSU_DLC
DLCCount = BlitzSteamApps_GetDLCCount(BSUApps)
If DLCCount > 0
BSU_DLCCount = BlitzSteamApps_GetDLCCount(BSUApps)
If BSU_DLCCount > 0
If BankAppIdStorage = 0 Then
; Create temporary storage for AppId.
BankAppId = CreateBank(4)
@@ -328,7 +341,7 @@ Function BSUApps_GetDLCData(BankAppIdStorage=0, BankAvailableStorage=0, BankName
EndIf
Local DLCIndex%
For DLCIndex = 0 To DLCCount - 1
For DLCIndex = 0 To BSU_DLCCount - 1
BSUApps_GetDLCDataByIndex(DLCIndex, BankAppId, BankAvailable, BankName)
Next
@@ -435,11 +448,11 @@ Function BSUApps_GetInstalledDepots(nAppID%, BankDepotStorage=0)
EndIf
; Request depots from Steam.
DepotCount = BlitzSteamApps_GetInstalledDepots(BSUApps, nAppID, BankDepot, BankDepotSz)
BSU_DepotCount = BlitzSteamApps_GetInstalledDepots(BSUApps, nAppID, BankDepot, BankDepotSz)
; Read returned depots into objects.
Local DepotIndex
For DepotIndex = 0 To DepotCount - 1
For DepotIndex = 0 To BSU_DepotCount - 1
Local Depot.BSU_Depot = New BSU_Depot
Depot\DepotId = PeekInt(BankDepot, DepotIndex * 4)
Next
@@ -504,5 +517,40 @@ Function BSUApps_GetDLCDownloadProgress#(nAppID%)
Return Progress
End Function
; -- SteamFriends
Function BSUFriends_GetFriends(iFriendFlags=BLITZSTEAM_EFriendFlags_All)
If BSUInitialized Then
Delete Each BSU_Friend
BSU_FriendCount = BlitzSteamFriends_GetFriendCount(BSUFriends, iFriendFlags)
If BSU_FriendCount > 0 Then
Local FriendIndex
For FriendIndex = 0 To BSU_FriendCount - 1
Local CSteamID = BlitzSteamFriends_GetFriendByIndex(BSUFriends, FriendIndex, iFriendFlags)
Local Friend.BSU_Friend = New BSU_Friend
; Store a 'native' version of the SteamID
Local SteamID64 = BlitzSteamCSteamID_ConvertToUInt64(CSteamID)
Friend\SteamID_L = BlitzSteamInt64_ValueL(SteamID64)
Friend\SteamID_R = BlitzSteamInt64_ValueR(SteamID64)
BlitzSteamInt64_Destroy(SteamID64)
; Names
Friend\Name = BlitzSteamFriends_GetFriendPersonaName(BSUFriends, CSteamID)
Friend\NickName = BlitzSteamFriends_GetPlayerNickname(BSUFriends, CSteamID)
; Other Stuff
Friend\Index = FriendIndex
Friend\Relationship = BlitzSteamFriends_GetFriendRelationship(BSUFriends, CSteamID)
Friend\State = BlitzSteamFriends_GetFriendPersonaState(BSUFriends, CSteamID)
Friend\SteamLevel = BlitzSteamFriends_GetFriendSteamLevel(BSUFriends, CSteamID)
BlitzSteamCSteamID_Destroy(CSteamID)
Next
EndIf
EndIf
End Function
;~IDEal Editor Parameters:
;~F#52#67#80#9F#BD#FA#116#133#163#195#1B1#1D0#1EB
;~C#Blitz3D