/*
* Input area
*/
- vg_ui.textbuf_on_up = _vg_console_on_up;
- vg_ui.textbuf_on_down = _vg_console_on_down;
- vg_ui.textbuf_on_change = _vg_console_on_update;
- vg_ui.textbuf_on_enter = _vg_console_on_enter;
+
+ struct ui_textbox_callbacks callbacks = {
+ .up = _vg_console_on_up,
+ .down = _vg_console_on_down,
+ .change = _vg_console_on_update,
+ .enter = _vg_console_on_enter
+ };
ui_textbox( rect_input, vg_console.input, vg_list_size(vg_console.input),
- UI_TEXTBOX_AUTOFOCUS );
+ UI_TEXTBOX_AUTOFOCUS, &callbacks );
/*
* suggestions
* 1. layout is defined by subdividing
* 2. a parent node should never be resized by the content after creation
* 3. when the ui is in an interactive state, no controls should ever move
+ * 4. controls directly reference a memory location and use that as their
+ * unique id
+ * 5. a maximum of ONE control per memory location can be drawn at any given
+ * point.
*/
#ifndef VG_IMGUI_H
int cursor_user, cursor_pos;
u32 len;
u32 flags;
+
+ struct ui_textbox_callbacks{
+ void (*enter)( char *, u32 ),
+ (*up)( char *, u32 ),
+ (*down)( char *, u32 ),
+ (*change)( char *, u32 );
+ }
+ callbacks;
}
textbox;
-
- void (*textbuf_on_enter) ( char *buf, u32 len );
- void (*textbuf_on_up) ( char *buf, u32 len );
- void (*textbuf_on_down) ( char *buf, u32 len );
- void (*textbuf_on_change)( char *buf, u32 len );
GLuint tex_glyphs, vao, vbo, ebo;
}
}
else{
- if( vg_ui.textbuf_on_up ){
- vg_ui.textbuf_on_up( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.up ){
+ vg_ui.textbox.callbacks.up( vg_ui.textbuf, vg_ui.textbox.len );
}
}
}
vg_ui.textbox.cursor_pos = line_below_begin+offset;
}
else{
- if( vg_ui.textbuf_on_down ){
- vg_ui.textbuf_on_down( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.down ){
+ vg_ui.textbox.callbacks.down( vg_ui.textbuf, vg_ui.textbox.len );
}
}
}
vg_ui.textbox.cursor_user = _ui_textbox_delete_char( -1 );
vg_ui.textbox.cursor_pos = vg_ui.textbox.cursor_user;
- if( vg_ui.textbuf_on_change )
- vg_ui.textbuf_on_change( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.change ){
+ vg_ui.textbox.callbacks.change( vg_ui.textbuf, vg_ui.textbox.len );
+ }
}
}
vg_ui.textbox.cursor_user = _ui_textbox_delete_char( 1 );
vg_ui.textbox.cursor_pos = vg_ui.textbox.cursor_user;
- if( vg_ui.textbuf_on_change )
- vg_ui.textbuf_on_change( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.change ){
+ vg_ui.textbox.callbacks.change( vg_ui.textbuf, vg_ui.textbox.len );
+ }
}
}
ui_defocus_all();
}
- if( vg_ui.textbuf_on_enter ){
- vg_ui.textbuf_on_enter( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.enter ){
+ vg_ui.textbox.callbacks.enter( vg_ui.textbuf, vg_ui.textbox.len );
}
}
}
return printed_chars+1;
}
-static int ui_textbox( ui_rect rect, char *buf, u32 len, u32 flags )
+static int ui_textbox( ui_rect rect, char *buf, u32 len, u32 flags,
+ struct ui_textbox_callbacks *callbacks )
{
int clickup= ui_click_up(UI_MOUSE_LEFT),
click = ui_clicking(UI_MOUSE_LEFT) | clickup,
vg_ui.textbox.cursor_pos = 0;
vg_ui.textbox.cursor_user = 0;
+ if( callbacks ){
+ vg_ui.textbox.callbacks = *callbacks;
+ }
+ else{
+ vg_ui.textbox.callbacks.change = NULL;
+ vg_ui.textbox.callbacks.down = NULL;
+ vg_ui.textbox.callbacks.up = NULL;
+ vg_ui.textbox.callbacks.enter = NULL;
+ }
+
SDL_StartTextInput();
}
}
ptr ++;
}
- if( vg_ui.textbuf_on_change ){
- vg_ui.textbuf_on_change( vg_ui.textbuf, vg_ui.textbox.len );
+ if( vg_ui.textbox.callbacks.change ){
+ vg_ui.textbox.callbacks.change( vg_ui.textbuf, vg_ui.textbox.len );
}
}
}
#define _TINYDIR_FREE(_size)
#include "submodules/tinydir/tinydir.h"
-
#include <sys/stat.h>
+
+/*
+ * Create directory and silently ignore errors for already exists
+ */
VG_STATIC int vg_mkdir( const char *path )
{
if( mkdir( path, S_IRWXU|S_IRWXG|S_IWOTH|S_IXOTH ) ){
+ if( errno == EEXIST )
+ return 1;
+
vg_error( "Failed to create directory: %s\n", path );
return 0;
}
#pragma pack( push, 8 )
#endif
-typedef i32 HSteamPipe;
-typedef i32 HSteamUser;
+typedef i32 HSteamPipe;
+typedef i32 HSteamUser;
typedef int E_iCallBack_t;
-typedef u64 u64_steamid;
+typedef u64 u64_steamid;
typedef u64 SteamAPICall_t;
typedef u32 AppId_t;
typedef u32 RTime32;
typedef u32 AccountID_t;
+typedef i8 steamapi_bool;
enum { k_iSteamUserCallbacks = 100 };
enum { k_iSteamGameServerCallbacks = 200 };
// General result codes
typedef enum EResult
{
- k_EResultNone = 0, // no result
- k_EResultOK = 1, // success
- k_EResultFail = 2, // generic failure
- k_EResultNoConnection = 3, // no/failed network connection
-// k_EResultNoConnectionRetry = 4, // OBSOLETE - removed
- k_EResultInvalidPassword = 5, // password/ticket is invalid
- k_EResultLoggedInElsewhere = 6, // same user logged in elsewhere
- k_EResultInvalidProtocolVer = 7, // protocol version is incorrect
- k_EResultInvalidParam = 8, // a parameter is incorrect
- k_EResultFileNotFound = 9, // file was not found
- k_EResultBusy = 10, // called method busy - action not taken
- k_EResultInvalidState = 11, // called object was in an invalid state
- k_EResultInvalidName = 12, // name is invalid
- k_EResultInvalidEmail = 13, // email is invalid
- k_EResultDuplicateName = 14, // name is not unique
- k_EResultAccessDenied = 15, // access is denied
- k_EResultTimeout = 16, // operation timed out
- k_EResultBanned = 17, // VAC2 banned
- k_EResultAccountNotFound = 18, // account not found
- k_EResultInvalidSteamID = 19, // steamID is invalid
- k_EResultServiceUnavailable = 20,// The requested service is currently
+ k_EResultNone = 0, // no result
+ k_EResultOK = 1, // success
+ k_EResultFail = 2, // generic failure
+ k_EResultNoConnection = 3, // no/failed network connection
+// k_EResultNoConnectionRetry = 4, // OBSOLETE - removed
+ k_EResultInvalidPassword = 5, // password/ticket is invalid
+ k_EResultLoggedInElsewhere = 6, // same user logged in elsewhere
+ k_EResultInvalidProtocolVer = 7, // protocol version is incorrect
+ k_EResultInvalidParam = 8, // a parameter is incorrect
+ k_EResultFileNotFound = 9, // file was not found
+ k_EResultBusy = 10, // called method busy - action not taken
+ k_EResultInvalidState = 11, // called object was in an invalid state
+ k_EResultInvalidName = 12, // name is invalid
+ k_EResultInvalidEmail = 13, // email is invalid
+ k_EResultDuplicateName = 14, // name is not unique
+ k_EResultAccessDenied = 15, // access is denied
+ k_EResultTimeout = 16, // operation timed out
+ k_EResultBanned = 17, // VAC2 banned
+ k_EResultAccountNotFound = 18, // account not found
+ k_EResultInvalidSteamID = 19, // steamID is invalid
+ k_EResultServiceUnavailable = 20,// The requested service is currently
// unavailable
- k_EResultNotLoggedOn = 21, // The user is not logged on
- k_EResultPending = 22, // Request is pending (may be in process, or
+ k_EResultNotLoggedOn = 21, // The user is not logged on
+ k_EResultPending = 22, // Request is pending (may be in process, or
// waiting on third party)
- k_EResultEncryptionFailure = 23, // Encryption or Decryption failed
- k_EResultInsufficientPrivilege = 24,// Insufficient privilege
- k_EResultLimitExceeded = 25, // Too much of a good thing
- k_EResultRevoked = 26, // Access has been revoked (used for revoked
+ k_EResultEncryptionFailure = 23, // Encryption or Decryption failed
+ k_EResultInsufficientPrivilege = 24,// Insufficient privilege
+ k_EResultLimitExceeded = 25, // Too much of a good thing
+ k_EResultRevoked = 26, // Access has been revoked (used for revoked
// guest passes)
- k_EResultExpired = 27, // License/Guest pass the user is trying to
+ k_EResultExpired = 27, // License/Guest pass the user is trying to
// access is expired
- k_EResultAlreadyRedeemed = 28, // Guest pass has already been redeemed by
+ k_EResultAlreadyRedeemed = 28, // Guest pass has already been redeemed by
// account, cannot be acked again
- k_EResultDuplicateRequest = 29, // The request is a duplicate and the action
+ k_EResultDuplicateRequest = 29, // The request is a duplicate and the action
// has already occurred in the past, ignored
// this time
- k_EResultAlreadyOwned = 30, // All the games in this guest pass
+ k_EResultAlreadyOwned = 30, // All the games in this guest pass
// redemption request are already owned by
// the user
- k_EResultIPNotFound = 31, // IP address not found
- k_EResultPersistFailed = 32, // failed to write change to the data store
- k_EResultLockingFailed = 33, // failed to acquire access lock for this
+ k_EResultIPNotFound = 31, // IP address not found
+ k_EResultPersistFailed = 32, // failed to write change to the data store
+ k_EResultLockingFailed = 33, // failed to acquire access lock for this
// operation
- k_EResultLogonSessionReplaced = 34,
- k_EResultConnectFailed = 35,
- k_EResultHandshakeFailed = 36,
- k_EResultIOFailure = 37,
- k_EResultRemoteDisconnect = 38,
- k_EResultShoppingCartNotFound = 39, // failed to find the shopping cart
+ k_EResultLogonSessionReplaced = 34,
+ k_EResultConnectFailed = 35,
+ k_EResultHandshakeFailed = 36,
+ k_EResultIOFailure = 37,
+ k_EResultRemoteDisconnect = 38,
+ k_EResultShoppingCartNotFound = 39, // failed to find the shopping cart
// requested
- k_EResultBlocked = 40, // a user didn't allow it
- k_EResultIgnored = 41, // target is ignoring sender
- k_EResultNoMatch = 42, // nothing matching the request found
- k_EResultAccountDisabled = 43,
- k_EResultServiceReadOnly = 44, // this service is not accepting content
+ k_EResultBlocked = 40, // a user didn't allow it
+ k_EResultIgnored = 41, // target is ignoring sender
+ k_EResultNoMatch = 42, // nothing matching the request found
+ k_EResultAccountDisabled = 43,
+ k_EResultServiceReadOnly = 44, // this service is not accepting content
// changes right now
- k_EResultAccountNotFeatured = 45, // account doesn't have value, so this
+ k_EResultAccountNotFeatured = 45, // account doesn't have value, so this
// feature isn't available
- k_EResultAdministratorOK = 46, // allowed to take this action, but only
+ k_EResultAdministratorOK = 46, // allowed to take this action, but only
// because requester is admin
- k_EResultContentVersion = 47, // A Version mismatch in content
+ k_EResultContentVersion = 47, // A Version mismatch in content
// transmitted within the Steam protocol.
- k_EResultTryAnotherCM = 48, // The current CM can't service the user
+ k_EResultTryAnotherCM = 48, // The current CM can't service the user
// making a request, user should try
// another.
- k_EResultPasswordRequiredToKickSession = 49, // You are already logged in
+ k_EResultPasswordRequiredToKickSession = 49, // You are already logged in
// elsewhere, this cached credential
// login has failed.
- k_EResultAlreadyLoggedInElsewhere = 50, // You are already logged in
+ k_EResultAlreadyLoggedInElsewhere = 50, // You are already logged in
// elsewhere, you must wait
- k_EResultSuspended = 51, // Long running operation (content download)
+ k_EResultSuspended = 51, // Long running operation (content download)
// suspended/paused
- k_EResultCancelled = 52, // Operation canceled (typically by user:
+ k_EResultCancelled = 52, // Operation canceled (typically by user:
// content download)
- k_EResultDataCorruption = 53, // Operation canceled because data is ill
+ k_EResultDataCorruption = 53, // Operation canceled because data is ill
// formed or unrecoverable
- k_EResultDiskFull = 54, // Operation canceled - not enough disk space.
- k_EResultRemoteCallFailed = 55, // an remote call or IPC call failed
- k_EResultPasswordUnset = 56, // Password could not be verified as it's
+ k_EResultDiskFull = 54, // Operation canceled - not enough disk space.
+ k_EResultRemoteCallFailed = 55, // an remote call or IPC call failed
+ k_EResultPasswordUnset = 56, // Password could not be verified as it's
// unset server side
- k_EResultExternalAccountUnlinked = 57, // External account (PSN, Facebook...)
+ k_EResultExternalAccountUnlinked = 57, // External account (PSN, Facebook...)
// is not linked to a Steam account
- k_EResultPSNTicketInvalid = 58, // PSN ticket was invalid
- k_EResultExternalAccountAlreadyLinked = 59, // External account (PSN,
+ k_EResultPSNTicketInvalid = 58, // PSN ticket was invalid
+ k_EResultExternalAccountAlreadyLinked = 59, // External account (PSN,
// Facebook...) is already linked to some other account,
// must explicitly request to replace/delete the link first
- k_EResultRemoteFileConflict = 60, // The sync cannot resume due to a conflict
+ k_EResultRemoteFileConflict = 60, // The sync cannot resume due to a conflict
// between the local and remote files
- k_EResultIllegalPassword = 61, // The requested new password is not legal
- k_EResultSameAsPreviousValue = 62,// new value is the same as the old one (
+ k_EResultIllegalPassword = 61, // The requested new password is not legal
+ k_EResultSameAsPreviousValue = 62,// new value is the same as the old one (
// secret question and answer )
- k_EResultAccountLogonDenied = 63, // account login denied due to 2nd factor
+ k_EResultAccountLogonDenied = 63, // account login denied due to 2nd factor
// authentication failure
- k_EResultCannotUseOldPassword = 64, // The requested new password is not
+ k_EResultCannotUseOldPassword = 64, // The requested new password is not
// legal
- k_EResultInvalidLoginAuthCode = 65, // account login denied due to auth code
+ k_EResultInvalidLoginAuthCode = 65, // account login denied due to auth code
// invalid
- k_EResultAccountLogonDeniedNoMail = 66, // account login denied due to 2nd
+ k_EResultAccountLogonDeniedNoMail = 66, // account login denied due to 2nd
// factor auth failure - and no mail
// has been sent
- k_EResultHardwareNotCapableOfIPT = 67,
- k_EResultIPTInitError = 68,
- k_EResultParentalControlRestricted = 69,// operation failed due to parental
+ k_EResultHardwareNotCapableOfIPT = 67,
+ k_EResultIPTInitError = 68,
+ k_EResultParentalControlRestricted = 69,// operation failed due to parental
// control restrictions for current
// user
- k_EResultFacebookQueryError = 70, // Facebook query returned an error
- k_EResultExpiredLoginAuthCode = 71, // account login denied due to auth
+ k_EResultFacebookQueryError = 70, // Facebook query returned an error
+ k_EResultExpiredLoginAuthCode = 71, // account login denied due to auth
// code expired
- k_EResultIPLoginRestrictionFailed = 72,
- k_EResultAccountLockedDown = 73,
- k_EResultAccountLogonDeniedVerifiedEmailRequired = 74,
- k_EResultNoMatchingURL = 75,
- k_EResultBadResponse = 76, // parse failure, missing field, etc.
- k_EResultRequirePasswordReEntry = 77, // The user cannot complete the action
+ k_EResultIPLoginRestrictionFailed = 72,
+ k_EResultAccountLockedDown = 73,
+ k_EResultAccountLogonDeniedVerifiedEmailRequired = 74,
+ k_EResultNoMatchingURL = 75,
+ k_EResultBadResponse = 76, // parse failure, missing field, etc.
+ k_EResultRequirePasswordReEntry = 77, // The user cannot complete the action
// until they re-enter their password
- k_EResultValueOutOfRange = 78, // the value entered is outside the
+ k_EResultValueOutOfRange = 78, // the value entered is outside the
// acceptable range
- k_EResultUnexpectedError = 79, // something happened that we didn't expect
+ k_EResultUnexpectedError = 79, // something happened that we didn't expect
// to ever happen
- k_EResultDisabled = 80, // The requested service has been configured
+ k_EResultDisabled = 80, // The requested service has been configured
// to be unavailable
- k_EResultInvalidCEGSubmission = 81, // The set of files submitted to the CEG
+ k_EResultInvalidCEGSubmission = 81, // The set of files submitted to the CEG
// server are not valid !
- k_EResultRestrictedDevice = 82, // The device being used is not allowed
+ k_EResultRestrictedDevice = 82, // The device being used is not allowed
// to perform this action
- k_EResultRegionLocked = 83, // The action could not be complete
+ k_EResultRegionLocked = 83, // The action could not be complete
// because it is region restricted
- k_EResultRateLimitExceeded = 84, // Temporary rate limit exceeded, try
+ k_EResultRateLimitExceeded = 84, // Temporary rate limit exceeded, try
// again later, different from
// k_EResultLimitExceeded which may be
// permanent
- k_EResultAccountLoginDeniedNeedTwoFactor = 85, // Need two-factor code to
+ k_EResultAccountLoginDeniedNeedTwoFactor = 85, // Need two-factor code to
// login
- k_EResultItemDeleted = 86, // The thing we're trying to access has been
+ k_EResultItemDeleted = 86, // The thing we're trying to access has been
// deleted
- k_EResultAccountLoginDeniedThrottle = 87, // login attempt failed, try to
+ k_EResultAccountLoginDeniedThrottle = 87, // login attempt failed, try to
// throttle response to possible
// attacker
- k_EResultTwoFactorCodeMismatch = 88, // two factor code mismatch
- k_EResultTwoFactorActivationCodeMismatch = 89, // activation code for
+ k_EResultTwoFactorCodeMismatch = 88, // two factor code mismatch
+ k_EResultTwoFactorActivationCodeMismatch = 89, // activation code for
// two-factor didn't match
- k_EResultAccountAssociatedToMultiplePartners = 90, // account has been
+ k_EResultAccountAssociatedToMultiplePartners = 90, // account has been
// associated with multiple partners
- k_EResultNotModified = 91, // data not modified
- k_EResultNoMobileDevice = 92, // the account does not have a mobile
+ k_EResultNotModified = 91, // data not modified
+ k_EResultNoMobileDevice = 92, // the account does not have a mobile
// device associated with it
- k_EResultTimeNotSynced = 93, // the time presented is out of range or
+ k_EResultTimeNotSynced = 93, // the time presented is out of range or
// tolerance
- k_EResultSmsCodeFailed = 94, // SMS code failure (no match, none pending,
+ k_EResultSmsCodeFailed = 94, // SMS code failure (no match, none pending,
// etc.)
- k_EResultAccountLimitExceeded = 95, // Too many accounts access this resource
- k_EResultAccountActivityLimitExceeded = 96,// Too many changes to
+ k_EResultAccountLimitExceeded = 95, // Too many accounts access this resource
+ k_EResultAccountActivityLimitExceeded = 96,// Too many changes to
// this account
- k_EResultPhoneActivityLimitExceeded = 97, // Too many changes to this phone
- k_EResultRefundToWallet = 98, // Cannot refund to payment method, must use
+ k_EResultPhoneActivityLimitExceeded = 97, // Too many changes to this phone
+ k_EResultRefundToWallet = 98, // Cannot refund to payment method, must use
// wallet
- k_EResultEmailSendFailure = 99, // Cannot send an email
- k_EResultNotSettled = 100, // Can't perform operation till payment
+ k_EResultEmailSendFailure = 99, // Cannot send an email
+ k_EResultNotSettled = 100, // Can't perform operation till payment
// has settled
- k_EResultNeedCaptcha = 101,// Needs to provide a valid captcha
- k_EResultGSLTDenied = 102, // a game server login token owned by this token's
+ k_EResultNeedCaptcha = 101,// Needs to provide a valid captcha
+ k_EResultGSLTDenied = 102, // a game server login token owned by this token's
// owner has been banned
- k_EResultGSOwnerDenied = 103, // game server owner is denied for other reason
+ k_EResultGSOwnerDenied = 103, // game server owner is denied for other reason
// (account lock, community ban, vac ban, missing phone)
- k_EResultInvalidItemType = 104,// the type of thing we were requested to act
+ k_EResultInvalidItemType = 104,// the type of thing we were requested to act
// on is invalid
- k_EResultIPBanned = 105,// the ip address has been banned from taking this
+ k_EResultIPBanned = 105,// the ip address has been banned from taking this
// action
- k_EResultGSLTExpired = 106,// this token has expired from disuse; can be
+ k_EResultGSLTExpired = 106,// this token has expired from disuse; can be
// reset for use
- k_EResultInsufficientFunds = 107,// user doesn't have enough wallet funds to
+ k_EResultInsufficientFunds = 107,// user doesn't have enough wallet funds to
// complete the action
- k_EResultTooManyPending = 108, // There are too many of this thing pending
+ k_EResultTooManyPending = 108, // There are too many of this thing pending
// already
- k_EResultNoSiteLicensesFound = 109, // No site licenses found
- k_EResultWGNetworkSendExceeded = 110,// the WG couldn't send a response
+ k_EResultNoSiteLicensesFound = 109, // No site licenses found
+ k_EResultWGNetworkSendExceeded = 110,// the WG couldn't send a response
// because we exceeded max network send size
- k_EResultAccountNotFriends = 111, // the user is not mutually friends
- k_EResultLimitedUserAccount = 112,// the user is limited
- k_EResultCantRemoveItem = 113, // item can't be removed
- k_EResultAccountDeleted = 114, // account has been deleted
- k_EResultExistingUserCancelledLicense = 115,
+ k_EResultAccountNotFriends = 111, // the user is not mutually friends
+ k_EResultLimitedUserAccount = 112,// the user is limited
+ k_EResultCantRemoveItem = 113, // item can't be removed
+ k_EResultAccountDeleted = 114, // account has been deleted
+ k_EResultExistingUserCancelledLicense = 115,
// A license for this already exists, but cancelled
- k_EResultCommunityCooldown = 116, // access is denied because of a
+ k_EResultCommunityCooldown = 116, // access is denied because of a
// community cooldown (probably from support profile data resets)
- k_EResultNoLauncherSpecified = 117, // No launcher was specified, but a
+ 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
+ k_EResultMustAgreeToSSA = 118,// User must agree to china SSA or global SSA
// before login
- k_EResultLauncherMigrated = 119, // The specified launcher type is no longer
+ 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
+ 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
- k_EResultNoVerifiedPhone = 123, // account does not have a verified phone
+ k_EResultInvalidSignature = 121, // signature check did not match
+ k_EResultParseFailure = 122, // Failed to parse input
+ k_EResultNoVerifiedPhone = 123, // account does not have a verified phone
// number
} EResult;
typedef struct {
- HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
- int m_iCallback;
- u8 *m_pubParam; // Points to the callback structure
- int m_cubParam; // Size of the data pointed to by m_pubParam
-
+ HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
+ int m_iCallback;
+ u8 *m_pubParam; // Points to the callback structure
+ int m_cubParam; // Size of the data pointed to by m_pubParam
+
} CallbackMsg_t;
typedef struct {
- SteamAPICall_t m_hAsyncCall;
- int m_iCallback;
- u32 m_cubParam;
-
+ SteamAPICall_t m_hAsyncCall;
+ int m_iCallback;
+ u32 m_cubParam;
+
} SteamAPICallCompleted_t;
-
enum { k_iSteamAPICallCompleted = k_iSteamUtilsCallbacks + 3 };
// Steam universes. Each universe is a self-contained Steam instance.
-typedef enum {
- k_EUniverseInvalid = 0,
- k_EUniversePublic = 1,
- k_EUniverseBeta = 2,
- k_EUniverseInternal = 3,
- k_EUniverseDev = 4,
- // k_EUniverseRC = 5, // no such universe anymore
- k_EUniverseMax
+typedef enum EUniverse {
+ k_EUniverseInvalid = 0,
+ k_EUniversePublic = 1,
+ k_EUniverseBeta = 2,
+ k_EUniverseInternal = 3,
+ k_EUniverseDev = 4,
+ // k_EUniverseRC = 5, // no such universe anymore
+ k_EUniverseMax
} EUniverse_t;
+#pragma pack( push, 1 )
struct SteamIDComponent_t
{
#ifdef VALVE_BIG_ENDIAN
- EUniverse_t m_EUniverse : 8
- unsigned int m_EAccountType : 4;
- unsigned int m_unAccountInstance : 20;
- u32 m_unAccountID : 32;
+ EUniverse_t m_EUniverse : 8
+ unsigned int m_EAccountType : 4;
+ unsigned int m_unAccountInstance : 20;
+ u32 m_unAccountID : 32;
#else
- u32 m_unAccountID : 32;
- unsigned int m_unAccountInstance : 20;
- unsigned int m_EAccountType : 4;
- EUniverse_t m_EUniverse : 8;
+ u32 m_unAccountID : 32;
+ unsigned int m_unAccountInstance : 20;
+ unsigned int m_EAccountType : 4;
+ EUniverse_t m_EUniverse : 8;
#endif
};
typedef struct
{
- // 64 bits total
- union
+ // 64 bits total
+ union
{
struct SteamIDComponent_t m_comp;
- u64 m_unAll64Bits;
- };
+ u64 m_unAll64Bits;
+ };
}
CSteamID;
typedef struct GameID_t
{
#ifdef VALVE_BIG_ENDIAN
- unsigned int m_nModID : 32;
- unsigned int m_nType : 8;
- unsigned int m_nAppID : 24;
+ unsigned int m_nModID : 32;
+ unsigned int m_nType : 8;
+ unsigned int m_nAppID : 24;
#else
- unsigned int m_nAppID : 24;
- unsigned int m_nType : 8;
- unsigned int m_nModID : 32;
+ unsigned int m_nAppID : 24;
+ unsigned int m_nType : 8;
+ unsigned int m_nModID : 32;
#endif
} CGameID;
-
+#pragma pack( pop )
#pragma pack( pop )
/*
typedef enum EServerMode EServerMode;
enum EServerMode
{
- eServerModeInvalid = 0,
- eServerModeNoAuthentication = 1,
- eServerModeAuthentication = 2,
- eServerModeAuthenticationAndSecure = 3,
+ eServerModeInvalid = 0,
+ eServerModeNoAuthentication = 1,
+ eServerModeAuthentication = 2,
+ eServerModeAuthenticationAndSecure = 3,
};
int SteamInternal_GameServer_Init( u32 unIP, u16 usLegacySteamPort,
HSteamPipe SteamAPI_GetHSteamPipe(void);
HSteamPipe SteamGameServer_GetHSteamPipe(void);
HSteamUser SteamAPI_GetHSteamUser(void);
-void SteamAPI_ManualDispatch_Init(void);
-void SteamAPI_ManualDispatch_RunFrame( HSteamPipe hSteamPipe );
-int SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe,
+void SteamAPI_ManualDispatch_Init(void);
+void SteamAPI_ManualDispatch_RunFrame( HSteamPipe hSteamPipe );
+steamapi_bool SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe,
CallbackMsg_t *pCallbackMsg );
-void SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hSteamPipe );
-int SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe,
+void SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hSteamPipe );
+steamapi_bool SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe,
SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback,
- int iCallbackExpected, int *pbFailed );
+ int iCallbackExpected, steamapi_bool *pbFailed );
-void SteamAPI_ReleaseCurrentThreadMemory(void);
+void SteamAPI_ReleaseCurrentThreadMemory(void);
static void steamworks_process_api_call( HSteamPipe pipe,
CallbackMsg_t *callback )
SteamAPICallCompleted_t *pCallCompleted =
(SteamAPICallCompleted_t *)callback->m_pubParam;
- int bFailed;
+ steamapi_bool bFailed;
void *call_data = alloca( pCallCompleted->m_cubParam );
if( SteamAPI_ManualDispatch_GetAPICallResult(
{
k_ESteamAPICallFailureNone = -1,
k_ESteamAPICallFailureSteamGone = 0,
- k_ESteamAPICallFailureNetworkFailure = 1,
+ k_ESteamAPICallFailureNetworkFailure = 1,
k_ESteamAPICallFailureInvalidHandle = 2,
k_ESteamAPICallFailureMismatchedCallback = 3,
}
static void steamworks_event_loop( HSteamPipe pipe )
{
- SteamAPI_ManualDispatch_RunFrame( pipe );
- CallbackMsg_t callback;
-
- while( SteamAPI_ManualDispatch_GetNextCallback( pipe, &callback ) ){
- vg_low( "steamworks_event::callback( %i )\n", callback.m_iCallback );
-
- /* Check for dispatching API call results */
- if( callback.m_iCallback == k_iSteamAPICallCompleted ){
+ SteamAPI_ManualDispatch_RunFrame( pipe );
+ CallbackMsg_t callback;
+
+ while( SteamAPI_ManualDispatch_GetNextCallback( pipe, &callback ) ){
+ vg_low( "steamworks_event::callback( %i )\n", callback.m_iCallback );
+
+ /* Check for dispatching API call results */
+ if( callback.m_iCallback == k_iSteamAPICallCompleted ){
steamworks_process_api_call( pipe, &callback );
- }
- else {
- /*
+ }
+ else {
+ /*
* Look at callback.m_iCallback to see what kind of callback it is,
- * and dispatch to appropriate handler(s)
- * void *data = callback.m_pubParam;
+ * and dispatch to appropriate handler(s)
+ * void *data = callback.m_pubParam;
*/
for( int i=0; i<vg_steam.callback_handler_count; i++ ){
break;
}
}
- }
-
- SteamAPI_ManualDispatch_FreeLastCallback( pipe );
- }
+ }
+
+ SteamAPI_ManualDispatch_FreeLastCallback( pipe );
+ }
}
/*
SteamAPICall_t SteamAPI_ISteamUser_RequestEncryptedAppTicket(
ISteamUser *self, void *pDataToInclude, int cbDataToInclude );
-int SteamAPI_ISteamUser_GetEncryptedAppTicket(
+steamapi_bool SteamAPI_ISteamUser_GetEncryptedAppTicket(
ISteamUser *self, void *pTicket,
int cbMaxTicket, u32 *pcbTicket );
+u64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser *self );
+
/*
* Application symetric-key ticket method (Server)
enum { k_nSteamEncryptedAppTicketSymmetricKeyLen = 32 };
-int SteamEncryptedAppTicket_BDecryptTicket( u8 *rgubTicketEncrypted,
+steamapi_bool SteamEncryptedAppTicket_BDecryptTicket( u8 *rgubTicketEncrypted,
u32 cubTicketEncrypted, u8 *rgubTicketDecrypted,
u32 *pcubTicketDecrypted,
u8 rgubKey[k_nSteamEncryptedAppTicketSymmetricKeyLen],
int cubKey );
-int SteamEncryptedAppTicket_BIsTicketForApp( u8 *rgubTicketDecrypted,
+steamapi_bool SteamEncryptedAppTicket_BIsTicketForApp( u8 *rgubTicketDecrypted,
u32 cubTicketDecrypted, AppId_t nAppID );
RTime32 SteamEncryptedAppTicket_GetTicketIssueTime( u8 *rgubTicketDecrypted,
AppId_t SteamEncryptedAppTicket_GetTicketAppID( u8 *rgubTicketDecrypted,
u32 cubTicketDecrypted );
-int SteamEncryptedAppTicket_BUserOwnsAppInTicket( u8 *rgubTicketDecrypted,
- u32 cubTicketDecrypted, AppId_t nAppID );
+steamapi_bool SteamEncryptedAppTicket_BUserOwnsAppInTicket(
+ u8 *rgubTicketDecrypted, u32 cubTicketDecrypted, AppId_t nAppID );
-int SteamEncryptedAppTicket_BUserIsVacBanned( u8 *rgubTicketDecrypted,
- u32 cubTicketDecrypted );
+steamapi_bool SteamEncryptedAppTicket_BUserIsVacBanned(
+ u8 *rgubTicketDecrypted, u32 cubTicketDecrypted );
-int SteamEncryptedAppTicket_BGetAppDefinedValue( u8 *rgubTicketDecrypted,
- u32 cubTicketDecrypted, u32 *pValue );
+steamapi_bool SteamEncryptedAppTicket_BGetAppDefinedValue(
+ u8 *rgubTicketDecrypted, u32 cubTicketDecrypted, u32 *pValue );
u8 *SteamEncryptedAppTicket_GetUserVariableData( u8 *rgubTicketDecrypted,
u32 cubTicketDecrypted, u32 *pcubUserData );
-int SteamEncryptedAppTicket_BIsTicketSigned( u8 *rgubTicketDecrypted,
+steamapi_bool SteamEncryptedAppTicket_BIsTicketSigned( u8 *rgubTicketDecrypted,
u32 cubTicketDecrypted, u8 *pubRSAKey, u32 cubRSAKey );
-int SteamEncryptedAppTicket_BIsLicenseBorrowed( u8 *rgubTicketDecrypted,
- u32 cubTicketDecrypted );
+steamapi_bool SteamEncryptedAppTicket_BIsLicenseBorrowed(
+ u8 *rgubTicketDecrypted, u32 cubTicketDecrypted );
-int SteamEncryptedAppTicket_BIsLicenseTemporary( u8 *rgubTicketDecrypted,
- u32 cubTicketDecrypted );
+steamapi_bool SteamEncryptedAppTicket_BIsLicenseTemporary(
+ u8 *rgubTicketDecrypted, u32 cubTicketDecrypted );
static u8 vg_char_base16( char c )
{
typedef struct GameOverlayActivated_t GameOverlayActivated_t;
struct GameOverlayActivated_t
{
- u8 m_bActive; // true if it's just been activated, false otherwise
+ steamapi_bool m_bActive;
};
enum { k_iGameOverlayActivated = k_iSteamFriendsCallbacks + 31 };
{
HTTPRequestHandle m_hRequest;
u64 m_ulContextValue;
- int m_bRequestSuccessful;
+ steamapi_bool m_bRequestSuccessful;
EHTTPStatusCode m_eStatusCode;
u32 m_unBodySize;
};
HTTPRequestHandle SteamAPI_ISteamHTTP_CreateHTTPRequest(
void *self, EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL );
-int SteamAPI_ISteamHTTP_SendHTTPRequest( void* self, HTTPRequestHandle hRequest,
- SteamAPICall_t * pCallHandle );
+steamapi_bool SteamAPI_ISteamHTTP_SendHTTPRequest( void *self,
+ HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle );
-int SteamAPI_ISteamHTTP_ReleaseHTTPRequest( void *self,
+steamapi_bool SteamAPI_ISteamHTTP_ReleaseHTTPRequest( void *self,
HTTPRequestHandle hRequest );
-int SteamAPI_ISteamHTTP_GetHTTPResponseBodySize( void *self,
+steamapi_bool SteamAPI_ISteamHTTP_GetHTTPResponseBodySize( void *self,
HTTPRequestHandle hRequest, u32 *unBodySize );
-int SteamAPI_ISteamHTTP_GetHTTPResponseBodyData( void* self,
+steamapi_bool SteamAPI_ISteamHTTP_GetHTTPResponseBodyData( void* self,
HTTPRequestHandle hRequest, u8 *pBodyDataBuffer, u32 unBufferSize );
#endif /* VG_STEAM_HTTP_H */
u32 nIP, u16 nPort );
/* Return true if IP is mapped IPv4 */
-int SteamAPI_SteamNetworkingIPAddr_IsIPv4( SteamNetworkingIPAddr* self );
+steamapi_bool
+SteamAPI_SteamNetworkingIPAddr_IsIPv4( SteamNetworkingIPAddr *self );
/*
* Returns IP in host byte order (e.g. aa.bb.cc.dd as 0xaabbccdd).
* Return true if this identity is localhost.
* (Either IPv6 ::1, or IPv4 127.0.0.1)
*/
-int SteamAPI_SteamNetworkingIPAddr_IsLocalHost( SteamNetworkingIPAddr* self );
+steamapi_bool SteamAPI_SteamNetworkingIPAddr_IsLocalHost(
+ SteamNetworkingIPAddr* self );
/*
* Print to a string, with or without the port. Mapped IPv4 addresses are
* See also SteamNetworkingIdentityRender
*/
void SteamAPI_SteamNetworkingIPAddr_ToString( SteamNetworkingIPAddr* self,
- char *buf, u32 cbBuf, int bWithPort );
+ char *buf, u32 cbBuf, steamapi_bool bWithPort );
/*
* Parse an IP address and optional port. If a port is not present, it is set
* to 0.
* (This means that you cannot tell if a zero port was explicitly specified.)
*/
-int SteamAPI_SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr* self,
- const char *pszStr );
+steamapi_bool SteamAPI_SteamNetworkingIPAddr_ParseString(
+ SteamNetworkingIPAddr* self, const char *pszStr );
/* See if two addresses are identical */
-int SteamAPI_SteamNetworkingIPAddr_IsEqualTo( SteamNetworkingIPAddr* self,
- SteamNetworkingIPAddr *x );
+steamapi_bool SteamAPI_SteamNetworkingIPAddr_IsEqualTo(
+ SteamNetworkingIPAddr *self, SteamNetworkingIPAddr *x );
/*
* Classify address as FakeIP. This function never returns
SteamNetworkingIPAddr* self );
/* Return true if we are a FakeIP */
-int SteamAPI_SteamNetworkingIPAddr_IsFakeIP( SteamNetworkingIPAddr* self );
+steamapi_bool SteamAPI_SteamNetworkingIPAddr_IsFakeIP( SteamNetworkingIPAddr* self );
/*
* In a few places we need to set configuration options on listen sockets and
ISteamNetworkingSockets *self,
HSteamNetConnection hConn );
-int SteamAPI_ISteamNetworkingSockets_CloseConnection(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_CloseConnection(
ISteamNetworkingSockets *self,
HSteamNetConnection hPeer, int nReason, const char *pszDebug,
- int bEnableLinger );
+ steamapi_bool bEnableLinger );
-int SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress(
ISteamNetworkingSockets *self, HSteamListenSocket hSocket,
SteamNetworkingIPAddr *address );
-int SteamAPI_ISteamNetworkingSockets_CloseConnection(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_CloseConnection(
ISteamNetworkingSockets *self,
HSteamNetConnection hPeer, int nReason, const char *pszDebug,
- int bEnableLinger );
+ steamapi_bool bEnableLinger );
-int SteamAPI_ISteamNetworkingSockets_CloseListenSocket(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_CloseListenSocket(
ISteamNetworkingSockets *self, HSteamListenSocket hSocket );
EResult SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
HSteamNetPollGroup SteamAPI_ISteamNetworkingSockets_CreatePollGroup(
ISteamNetworkingSockets *self );
-int SteamAPI_ISteamNetworkingSockets_DestroyPollGroup(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_DestroyPollGroup(
ISteamNetworkingSockets *self,
HSteamNetPollGroup hPollGroup );
-int SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup(
ISteamNetworkingSockets *self,
HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup );
* Returns basic information about the high-level state of the connection.
* Returns false if the connection handle is invalid.
*/
-int SteamAPI_ISteamNetworkingSockets_GetConnectionInfo(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_GetConnectionInfo(
ISteamNetworkingSockets* self,
HSteamNetConnection hConn, SteamNetConnectionInfo_t * pInfo );
ISteamNetworkingSockets* self,
HSteamNetConnection hConn, char *pszBuf, int cbBuf );
-int SteamAPI_ISteamNetworkingSockets_SetConnectionUserData(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_SetConnectionUserData(
ISteamNetworkingSockets* self, HSteamNetConnection hPeer, i64 nUserData );
i64 SteamAPI_ISteamNetworkingSockets_GetConnectionUserData(
ISteamNetworkingSockets* self, HSteamNetConnection hPeer );
-int SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress(
+steamapi_bool SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress(
ISteamNetworkingSockets* self,
HSteamListenSocket hSocket, SteamNetworkingIPAddr *address );
#pragma pack( pop )
/* A handle to a piece of user generated content */
+typedef void ISteamRemoteStorage;
typedef u64 UGCHandle_t;
typedef u64 PublishedFileUpdateHandle_t;
typedef u64 PublishedFileId_t;
struct RemoteStoragePublishFileResult_t{
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
- int m_bUserNeedsToAcceptWorkshopLegalAgreement;
+ steamapi_bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
enum { k_iRemoteStoragePublushFileResult = k_iSteamRemoteStorageCallbacks + 9 };
EResult m_eResult;
i32 m_nResultsReturned;
i32 m_nTotalResultCount;
- PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
+ PublishedFileId_t m_rgPublishedFileId[k_unEnumeratePublishedFilesMaxResults];
u32 m_rgRTimeSubscribed[ k_unEnumeratePublishedFilesMaxResults ];
};
enum { k_iRemoteStorageEnumerateUserSubscribedFilesResult =
struct RemoteStorageUpdatePublishedFileResult_t{
EResult m_eResult;
PublishedFileId_t m_nPublishedFileId;
- int m_bUserNeedsToAcceptWorkshopLegalAgreement;
+ steamapi_bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
enum { k_iRemoteStorageUpdatePublishedFileResult =
k_iSteamRemoteStorageCallbacks + 16 };
u32 m_rtimeCreated;
u32 m_rtimeUpdated;
ERemoteStoragePublishedFileVisibility m_eVisibility;
- int m_bBanned;
+ steamapi_bool m_bBanned;
char m_rgchTags[k_cchTagListMax];
- int m_bTagsTruncated;
+ steamapi_bool m_bTagsTruncated;
char m_pchFileName[k_cchFilenameMax];
i32 m_nFileSize;
i32 m_nPreviewFileSize;
char m_rgchURL[k_cchPublishedFileURLMax];
EWorkshopFileType m_eFileType;
- int m_bAcceptedForUse;
+ steamapi_bool m_bAcceptedForUse;
};
enum { k_iRemoteStorageGetPublishedFileDetailsResult =
k_iSteamRemoteStorageCallbacks + 18 };
EResult m_eResult;
i32 m_nResultsReturned;
i32 m_nTotalResultCount;
- PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
+ PublishedFileId_t m_rgPublishedFileId[k_unEnumeratePublishedFilesMaxResults];
float m_rgScore[ k_unEnumeratePublishedFilesMaxResults ];
AppId_t m_nAppId;
u32 m_unStartIndex;
EWorkshopFileAction m_eAction;
i32 m_nResultsReturned;
i32 m_nTotalResultCount;
- PublishedFileId_t m_rgPublishedFileId[ k_unEnumeratePublishedFilesMaxResults ];
+ PublishedFileId_t m_rgPublishedFileId[k_unEnumeratePublishedFilesMaxResults];
u32 m_rgRTimeUpdated[ k_unEnumeratePublishedFilesMaxResults ];
};
enum { k_iRemoteStorageEnumeratePublishedFilesByUserActionResult_t =
RemoteStoragePublishFileProgress_t;
struct RemoteStoragePublishFileProgress_t{
double m_dPercentFile;
- int m_bPreview;
+ steamapi_bool m_bPreview;
};
enum { k_iRemoteStoragePublishFileProgress_t =
k_iSteamRemoteStorageCallbacks + 29 };
#pragma pack( pop )
+ISteamRemoteStorage *SteamAPI_SteamRemoteStorage_v016();
+ISteamRemoteStorage *SteamAPI_SteamRemoteStorage(){
+ return SteamAPI_SteamRemoteStorage_v016();
+}
+
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileWrite( ISteamRemoteStorage* self,
+ const char * pchFile, const void * pvData, i32 cubData );
+i32 SteamAPI_ISteamRemoteStorage_FileRead( ISteamRemoteStorage* self,
+ const char * pchFile, void * pvData, i32 cubDataToRead );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileWriteAsync(
+ ISteamRemoteStorage* self, const char * pchFile, const void * pvData,
+ u32 cubData );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileReadAsync(
+ ISteamRemoteStorage* self, const char * pchFile, u32 nOffset,
+ u32 cubToRead );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete(
+ ISteamRemoteStorage* self, SteamAPICall_t hReadCall, void * pvBuffer,
+ u32 cubToRead );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileForget(
+ ISteamRemoteStorage *self, const char * pchFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileDelete(
+ ISteamRemoteStorage *self, const char * pchFile );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_FileShare(
+ ISteamRemoteStorage* self, const char * pchFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_SetSyncPlatforms(
+ ISteamRemoteStorage* self, const char * pchFile,
+ ERemoteStoragePlatform eRemoteStoragePlatform );
+UGCFileWriteStreamHandle_t SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen(
+ ISteamRemoteStorage* self, const char * pchFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk(
+ ISteamRemoteStorage* self, UGCFileWriteStreamHandle_t writeHandle,
+ const void * pvData, i32 cubData );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileWriteStreamClose(
+ ISteamRemoteStorage* self, UGCFileWriteStreamHandle_t writeHandle );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel(
+ ISteamRemoteStorage* self, UGCFileWriteStreamHandle_t writeHandle );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FileExists(
+ ISteamRemoteStorage* self, const char * pchFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_FilePersisted(
+ ISteamRemoteStorage* self, const char * pchFile );
+i32 SteamAPI_ISteamRemoteStorage_GetFileSize( ISteamRemoteStorage* self,
+ const char * pchFile );
+i64 SteamAPI_ISteamRemoteStorage_GetFileTimestamp( ISteamRemoteStorage* self,
+ const char * pchFile );
+ERemoteStoragePlatform SteamAPI_ISteamRemoteStorage_GetSyncPlatforms(
+ ISteamRemoteStorage* self, const char * pchFile );
+i32 SteamAPI_ISteamRemoteStorage_GetFileCount( ISteamRemoteStorage* self );
+const char * SteamAPI_ISteamRemoteStorage_GetFileNameAndSize(
+ ISteamRemoteStorage* self, int iFile, i32 * pnFileSizeInBytes );
+steamapi_bool SteamAPI_ISteamRemoteStorage_GetQuota( ISteamRemoteStorage* self,
+ u64 * pnTotalBytes, u64 * puAvailableBytes );
+steamapi_bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount(
+ ISteamRemoteStorage* self );
+steamapi_bool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp(
+ ISteamRemoteStorage* self );
+void SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp(
+ ISteamRemoteStorage* self, steamapi_bool bEnabled );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownload(
+ ISteamRemoteStorage* self, UGCHandle_t hContent, u32 unPriority );
+steamapi_bool SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress(
+ ISteamRemoteStorage* self, UGCHandle_t hContent, i32 * pnBytesDownloaded,
+ i32 * pnBytesExpected );
+steamapi_bool SteamAPI_ISteamRemoteStorage_GetUGCDetails(
+ ISteamRemoteStorage* self,
+ UGCHandle_t hContent, AppId_t * pnAppID, char ** ppchName,
+ i32 * pnFileSizeInBytes, CSteamID * pSteamIDOwner );
+i32 SteamAPI_ISteamRemoteStorage_UGCRead( ISteamRemoteStorage* self,
+ UGCHandle_t hContent, void * pvData, i32 cubDataToRead, u32 cOffset,
+ EUGCReadAction eAction );
+i32 SteamAPI_ISteamRemoteStorage_GetCachedUGCCount( ISteamRemoteStorage* self );
+UGCHandle_t SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle(
+ ISteamRemoteStorage* self, i32 iCachedContent );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_PublishWorkshopFile(
+ ISteamRemoteStorage* self, const char * pchFile,
+ const char * pchPreviewFile, AppId_t nConsumerAppId,
+ const char * pchTitle, const char * pchDescription,
+ ERemoteStoragePublishedFileVisibility eVisibility,
+ SteamParamStringArray_t * pTags, EWorkshopFileType eWorkshopFileType );
+PublishedFileUpdateHandle_t
+SteamAPI_ISteamRemoteStorage_CreatePublishedFileUpdateRequest(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileFile(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ const char * pchFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFilePreviewFile(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ const char * pchPreviewFile );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTitle(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ const char * pchTitle );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileDescription(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ const char * pchDescription );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileVisibility(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ ERemoteStoragePublishedFileVisibility eVisibility );
+steamapi_bool SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTags(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ SteamParamStringArray_t * pTags );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_CommitPublishedFileUpdate(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetPublishedFileDetails(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId,
+ u32 unMaxSecondsOld );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_DeletePublishedFile(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserPublishedFiles(
+ ISteamRemoteStorage* self, u32 unStartIndex );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_SubscribePublishedFile(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserSubscribedFiles(
+ ISteamRemoteStorage* self, u32 unStartIndex );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_UnsubscribePublishedFile(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+steamapi_bool
+SteamAPI_ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription(
+ ISteamRemoteStorage* self, PublishedFileUpdateHandle_t updateHandle,
+ const char * pchChangeDescription );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetPublishedItemVoteDetails(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_UpdateUserPublishedItemVote(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId,
+ steamapi_bool bVoteUp );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_GetUserPublishedItemVoteDetails(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles(
+ ISteamRemoteStorage* self, u64_steamid steamId, u32 unStartIndex,
+ SteamParamStringArray_t * pRequiredTags,
+ SteamParamStringArray_t * pExcludedTags );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_PublishVideo(
+ ISteamRemoteStorage* self, EWorkshopVideoProvider eVideoProvider,
+ const char * pchVideoAccount, const char * pchVideoIdentifier,
+ const char * pchPreviewFile, AppId_t nConsumerAppId,
+ const char * pchTitle, const char * pchDescription,
+ ERemoteStoragePublishedFileVisibility eVisibility,
+ SteamParamStringArray_t * pTags );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction(
+ ISteamRemoteStorage* self, PublishedFileId_t unPublishedFileId,
+ EWorkshopFileAction eAction );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction(
+ ISteamRemoteStorage* self, EWorkshopFileAction eAction,
+ u32 unStartIndex );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles(
+ ISteamRemoteStorage* self, EWorkshopEnumerationType eEnumerationType,
+ u32 unStartIndex, u32 unCount, u32 unDays,
+ SteamParamStringArray_t * pTags, SteamParamStringArray_t * pUserTags );
+SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation(
+ ISteamRemoteStorage* self, UGCHandle_t hContent,
+ const char * pchLocation, u32 unPriority );
+i32 SteamAPI_ISteamRemoteStorage_GetLocalFileChangeCount(
+ ISteamRemoteStorage* self );
+const char * SteamAPI_ISteamRemoteStorage_GetLocalFileChange(
+ ISteamRemoteStorage* self, int iFile,
+ ERemoteStorageLocalFileChange * pEChangeType,
+ ERemoteStorageFilePathType * pEFilePathType );
+steamapi_bool SteamAPI_ISteamRemoteStorage_BeginFileWriteBatch(
+ ISteamRemoteStorage *self );
+steamapi_bool SteamAPI_ISteamRemoteStorage_EndFileWriteBatch(
+ ISteamRemoteStorage *self );
+
#endif /* VG_STEAM_REMOTE_STORAGE_H */
* applicable) */
u32 m_rtimeAddedToUserList;
ERemoteStoragePublishedFileVisibility m_eVisibility; /* visibility */
- int m_bBanned; /* whether the file was banned */
+ steamapi_bool m_bBanned; /* whether the file was banned */
/* developer has specifically flagged this item as accepted in the Workshop*/
- int m_bAcceptedForUse;
+ steamapi_bool m_bAcceptedForUse;
/* whether the list of tags was too long to be returned in the provided
* buffer */
- int m_bTagsTruncated;
+ steamapi_bool m_bTagsTruncated;
/* comma separated list of all tags associated with this file */
char m_rgchTags[k_cchTagListMax];
u32 m_unTotalMatchingResults;
/* indicates whether this data was retrieved from the local on-disk cache */
- int m_bCachedData;
+ steamapi_bool m_bCachedData;
/* If a paging cursor was used, then this will be the next cursor to get the
* next result set. */
SteamUGCDetails_t m_details;
/* indicates whether this data was retrieved from the local on-disk cache */
- int m_bCachedData;
+ steamapi_bool m_bCachedData;
};
enum { k_iSteamUGCRequestUGCDetailsResult = k_iSteamUGCCallbacks + 2 };
/* new item got this UGC PublishFileID */
PublishedFileId_t m_nPublishedFileId;
- int m_bUserNeedsToAcceptWorkshopLegalAgreement;
+ steamapi_bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
};
enum { k_iCreateItemResult = k_iSteamUGCCallbacks + 3 };
typedef struct SubmitItemUpdateResult_t SubmitItemUpdateResult_t;
struct SubmitItemUpdateResult_t{
EResult m_eResult;
- int m_bUserNeedsToAcceptWorkshopLegalAgreement;
+ steamapi_bool m_bUserNeedsToAcceptWorkshopLegalAgreement;
PublishedFileId_t m_nPublishedFileId;
};
enum { k_iSubmitItemUpdateResult = k_iSteamUGCCallbacks + 4 };
struct UserFavoriteItemsListChanged_t{
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
- int m_bWasAddRequest;
+ steamapi_bool m_bWasAddRequest;
};
enum { k_iUserFavoriteItemsListChanged = k_iSteamUGCCallbacks + 7 };
struct SetUserItemVoteResult_t{
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
- int m_bVoteUp;
+ steamapi_bool m_bVoteUp;
};
enum { k_iSetUserItemVoteResult = k_iSteamUGCCallbacks + 8 };
struct GetUserItemVoteResult_t{
PublishedFileId_t m_nPublishedFileId;
EResult m_eResult;
- int m_bVotedUp;
- int m_bVotedDown;
- int m_bVoteSkipped;
+ steamapi_bool m_bVotedUp;
+ steamapi_bool m_bVotedDown;
+ steamapi_bool m_bVoteSkipped;
};
enum { k_iGetUserItemVoteResult = k_iSteamUGCCallbacks + 9 };
AppId_t m_nAppID;
u32 m_unVersion;
RTime32 m_rtAction;
- int m_bAccepted;
- int m_bNeedsAction;
+ steamapi_bool m_bAccepted;
+ steamapi_bool m_bNeedsAction;
};
enum { k_iWorkshopEULAStatus = k_iSteamUGCCallbacks + 20 };
SteamAPICall_t SteamAPI_ISteamUGC_SendQueryUGCRequest( ISteamUGC* self,
UGCQueryHandle_t handle );
-int SteamAPI_ISteamUGC_GetQueryUGCResult(
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCResult(
ISteamUGC *self, UGCQueryHandle_t handle, u32 index,
SteamUGCDetails_t *pDetails );
u32 SteamAPI_ISteamUGC_GetQueryUGCNumTags( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index );
-int SteamAPI_ISteamUGC_GetQueryUGCTag(
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCTag(
ISteamUGC* self, UGCQueryHandle_t handle, u32 index, u32 indexTag,
char * pchValue, u32 cchValueSize );
-int SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, u32 indexTag, char * pchValue,
u32 cchValueSize );
-int SteamAPI_ISteamUGC_GetQueryUGCPreviewURL( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCPreviewURL( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, char * pchURL, u32 cchURLSize );
-int SteamAPI_ISteamUGC_GetQueryUGCMetadata( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCMetadata( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, char * pchMetadata,
u32 cchMetadatasize );
-int SteamAPI_ISteamUGC_GetQueryUGCChildren( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCChildren( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index,
PublishedFileId_t *pvecPublishedFileID, u32 cMaxEntries );
-int SteamAPI_ISteamUGC_GetQueryUGCStatistic( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCStatistic( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, EItemStatistic eStatType,
u64 *pStatValue );
u32 SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index );
-int SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, u32 previewIndex,
char *pchURLOrVideoID, u32 cchURLSize, char *pchOriginalFileName,
u32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType );
u32 SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index );
-int SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, u32 keyValueTagIndex, char *pchKey,
u32 cchKeySize, char * pchValue, u32 cchValueSize );
-int SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag( ISteamUGC* self,
UGCQueryHandle_t handle, u32 index, const char *pchKey, char *pchValue,
u32 cchValueSize );
-int SteamAPI_ISteamUGC_ReleaseQueryUGCRequest( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest( ISteamUGC* self,
UGCQueryHandle_t handle );
-int SteamAPI_ISteamUGC_AddRequiredTag( ISteamUGC* self, UGCQueryHandle_t handle,
- const char * pTagName );
+steamapi_bool SteamAPI_ISteamUGC_AddRequiredTag( ISteamUGC* self,
+ UGCQueryHandle_t handle, const char * pTagName );
-int SteamAPI_ISteamUGC_AddRequiredTagGroup( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_AddRequiredTagGroup( ISteamUGC* self,
UGCQueryHandle_t handle, const SteamParamStringArray_t * pTagGroups );
-int SteamAPI_ISteamUGC_AddExcludedTag( ISteamUGC* self, UGCQueryHandle_t handle,
- const char * pTagName );
+steamapi_bool SteamAPI_ISteamUGC_AddExcludedTag( ISteamUGC* self,
+ UGCQueryHandle_t handle, const char * pTagName );
-int SteamAPI_ISteamUGC_SetReturnOnlyIDs( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnOnlyIDs );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnOnlyIDs( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnOnlyIDs );
-int SteamAPI_ISteamUGC_SetReturnKeyValueTags( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnKeyValueTags );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnKeyValueTags( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnKeyValueTags );
-int SteamAPI_ISteamUGC_SetReturnLongDescription( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnLongDescription );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnLongDescription( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnLongDescription );
-int SteamAPI_ISteamUGC_SetReturnMetadata( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnMetadata );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnMetadata( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnMetadata );
-int SteamAPI_ISteamUGC_SetReturnChildren( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnChildren );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnChildren( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnChildren );
-int SteamAPI_ISteamUGC_SetReturnAdditionalPreviews( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnAdditionalPreviews );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnAdditionalPreviews( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnAdditionalPreviews );
-int SteamAPI_ISteamUGC_SetReturnTotalOnly( ISteamUGC* self,
- UGCQueryHandle_t handle, int bReturnTotalOnly );
+steamapi_bool SteamAPI_ISteamUGC_SetReturnTotalOnly( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bReturnTotalOnly );
-int SteamAPI_ISteamUGC_SetReturnPlaytimeStats( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetReturnPlaytimeStats( ISteamUGC* self,
UGCQueryHandle_t handle, u32 unDays );
-int SteamAPI_ISteamUGC_SetLanguage( ISteamUGC* self, UGCQueryHandle_t handle,
- const char * pchLanguage );
+steamapi_bool SteamAPI_ISteamUGC_SetLanguage( ISteamUGC* self,
+ UGCQueryHandle_t handle, const char * pchLanguage );
-int SteamAPI_ISteamUGC_SetAllowCachedResponse( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetAllowCachedResponse( ISteamUGC* self,
UGCQueryHandle_t handle, u32 unMaxAgeSeconds );
-int SteamAPI_ISteamUGC_SetCloudFileNameFilter( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetCloudFileNameFilter( ISteamUGC* self,
UGCQueryHandle_t handle, const char * pMatchCloudFileName );
-int SteamAPI_ISteamUGC_SetMatchAnyTag( ISteamUGC* self, UGCQueryHandle_t handle,
- int bMatchAnyTag );
+steamapi_bool SteamAPI_ISteamUGC_SetMatchAnyTag( ISteamUGC* self,
+ UGCQueryHandle_t handle, steamapi_bool bMatchAnyTag );
-int SteamAPI_ISteamUGC_SetSearchText( ISteamUGC* self, UGCQueryHandle_t handle,
- const char * pSearchText );
+steamapi_bool SteamAPI_ISteamUGC_SetSearchText( ISteamUGC* self,
+ UGCQueryHandle_t handle, const char * pSearchText );
-int SteamAPI_ISteamUGC_SetRankedByTrendDays( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetRankedByTrendDays( ISteamUGC* self,
UGCQueryHandle_t handle, u32 unDays );
-int SteamAPI_ISteamUGC_SetTimeCreatedDateRange( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetTimeCreatedDateRange( ISteamUGC* self,
UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd );
-int SteamAPI_ISteamUGC_SetTimeUpdatedDateRange( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetTimeUpdatedDateRange( ISteamUGC* self,
UGCQueryHandle_t handle, RTime32 rtStart, RTime32 rtEnd );
-int SteamAPI_ISteamUGC_AddRequiredKeyValueTag( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_AddRequiredKeyValueTag( ISteamUGC* self,
UGCQueryHandle_t handle, const char * pKey, const char * pValue );
SteamAPICall_t SteamAPI_ISteamUGC_RequestUGCDetails( ISteamUGC* self,
UGCUpdateHandle_t SteamAPI_ISteamUGC_StartItemUpdate( ISteamUGC* self,
AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID );
-int SteamAPI_ISteamUGC_SetItemTitle( ISteamUGC* self, UGCUpdateHandle_t handle,
- const char * pchTitle );
+steamapi_bool SteamAPI_ISteamUGC_SetItemTitle( ISteamUGC* self,
+ UGCUpdateHandle_t handle, const char * pchTitle );
-int SteamAPI_ISteamUGC_SetItemDescription( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemDescription( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pchDescription );
-int SteamAPI_ISteamUGC_SetItemUpdateLanguage( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemUpdateLanguage( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pchLanguage );
-int SteamAPI_ISteamUGC_SetItemMetadata( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemMetadata( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pchMetaData );
-int SteamAPI_ISteamUGC_SetItemVisibility( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemVisibility( ISteamUGC* self,
UGCUpdateHandle_t handle,
ERemoteStoragePublishedFileVisibility eVisibility );
-int SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self,
UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags );
-int SteamAPI_ISteamUGC_SetItemContent( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemContent( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pszContentFolder );
-int SteamAPI_ISteamUGC_SetItemPreview( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_SetItemPreview( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pszPreviewFile );
-int SteamAPI_ISteamUGC_SetAllowLegacyUpload( ISteamUGC* self,
- UGCUpdateHandle_t handle, int bAllowLegacyUpload );
+steamapi_bool SteamAPI_ISteamUGC_SetAllowLegacyUpload( ISteamUGC* self,
+ UGCUpdateHandle_t handle, steamapi_bool bAllowLegacyUpload );
-int SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags( ISteamUGC* self,
UGCUpdateHandle_t handle );
-int SteamAPI_ISteamUGC_RemoveItemKeyValueTags( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_RemoveItemKeyValueTags( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pchKey );
-int SteamAPI_ISteamUGC_AddItemKeyValueTag( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_AddItemKeyValueTag( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pchKey, const char * pchValue );
-int SteamAPI_ISteamUGC_AddItemPreviewFile( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_AddItemPreviewFile( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pszPreviewFile,
EItemPreviewType type );
-int SteamAPI_ISteamUGC_AddItemPreviewVideo( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_AddItemPreviewVideo( ISteamUGC* self,
UGCUpdateHandle_t handle, const char * pszVideoID );
-int SteamAPI_ISteamUGC_UpdateItemPreviewFile( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_UpdateItemPreviewFile( ISteamUGC* self,
UGCUpdateHandle_t handle, u32 index, const char * pszPreviewFile );
-int SteamAPI_ISteamUGC_UpdateItemPreviewVideo( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_UpdateItemPreviewVideo( ISteamUGC* self,
UGCUpdateHandle_t handle, u32 index, const char * pszVideoID );
-int SteamAPI_ISteamUGC_RemoveItemPreview( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_RemoveItemPreview( ISteamUGC* self,
UGCUpdateHandle_t handle, u32 index );
SteamAPICall_t SteamAPI_ISteamUGC_SubmitItemUpdate( ISteamUGC* self,
UGCUpdateHandle_t handle, u64 * punBytesProcessed, u64 * punBytesTotal );
SteamAPICall_t SteamAPI_ISteamUGC_SetUserItemVote( ISteamUGC* self,
- PublishedFileId_t nPublishedFileID, int bVoteUp );
+ PublishedFileId_t nPublishedFileID, steamapi_bool bVoteUp );
SteamAPICall_t SteamAPI_ISteamUGC_GetUserItemVote( ISteamUGC* self,
PublishedFileId_t nPublishedFileID );
u32 SteamAPI_ISteamUGC_GetItemState( ISteamUGC* self,
PublishedFileId_t nPublishedFileID );
-int SteamAPI_ISteamUGC_GetItemInstallInfo( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetItemInstallInfo( ISteamUGC* self,
PublishedFileId_t nPublishedFileID, u64 * punSizeOnDisk, char * pchFolder,
u32 cchFolderSize, u32 * punTimeStamp );
-int SteamAPI_ISteamUGC_GetItemDownloadInfo( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_GetItemDownloadInfo( ISteamUGC* self,
PublishedFileId_t nPublishedFileID, u64 * punBytesDownloaded,
u64 * punBytesTotal );
-int SteamAPI_ISteamUGC_DownloadItem( ISteamUGC* self,
- PublishedFileId_t nPublishedFileID, int bHighPriority );
+steamapi_bool SteamAPI_ISteamUGC_DownloadItem( ISteamUGC* self,
+ PublishedFileId_t nPublishedFileID, steamapi_bool bHighPriority );
-int SteamAPI_ISteamUGC_BInitWorkshopForGameServer( ISteamUGC* self,
+steamapi_bool SteamAPI_ISteamUGC_BInitWorkshopForGameServer( ISteamUGC* self,
DepotId_t unWorkshopDepotID, const char * pszFolder );
-void SteamAPI_ISteamUGC_SuspendDownloads( ISteamUGC* self, int bSuspend );
+void SteamAPI_ISteamUGC_SuspendDownloads( ISteamUGC* self,
+ steamapi_bool bSuspend );
SteamAPICall_t SteamAPI_ISteamUGC_StartPlaytimeTracking( ISteamUGC* self,
PublishedFileId_t * pvecPublishedFileID, u32 unNumPublishedFileIDs );
SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self,
PublishedFileId_t nPublishedFileID );
-int SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
+steamapi_bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
#include "vg_steam.h"
#if defined( VALVE_CALLBACK_PACK_SMALL )
+;
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
return SteamAPI_SteamUserStats_v012();
}
-int SteamAPI_ISteamUserStats_RequestCurrentStats( ISteamUserStats* self );
-
-int SteamAPI_ISteamUserStats_GetAchievement( ISteamUserStats *self,
+steamapi_bool
+SteamAPI_ISteamUserStats_RequestCurrentStats( ISteamUserStats* self );
+steamapi_bool
+SteamAPI_ISteamUserStats_GetAchievement( ISteamUserStats *self,
const char *pchName,
- int *pbAchieved );
-
-int SteamAPI_ISteamUserStats_SetAchievement( ISteamUserStats *self,
+ steamapi_bool *pbAchieved );
+steamapi_bool
+SteamAPI_ISteamUserStats_SetAchievement( ISteamUserStats *self,
const char *pchName );
-
-int SteamAPI_ISteamUserStats_ClearAchievement( ISteamUserStats *self,
+steamapi_bool
+SteamAPI_ISteamUserStats_ClearAchievement( ISteamUserStats *self,
const char *pchName );
-
-int SteamAPI_ISteamUserStats_StoreStats( ISteamUserStats* self );
+steamapi_bool SteamAPI_ISteamUserStats_StoreStats( ISteamUserStats* self );
#endif /* VG_STEAM_USER_STATS_H */
return SteamAPI_SteamUtils_v010();
}
-int SteamAPI_ISteamUtils_SetWarningMessageHook(
+steamapi_bool SteamAPI_ISteamUtils_SetWarningMessageHook(
ISteamUtils *self, void( *fn_print )(int, const char *) );
k_ESteamInputType_MaximumPossibleValue = 255,
};
-int SteamAPI_ISteamInput_Init( ISteamInput* self, int bExplicitlyCallRunFrame );
-int SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
+steamapi_bool SteamAPI_ISteamInput_Init( ISteamInput *self,
+ steamapi_bool bExplicitlyCallRunFrame );
+steamapi_bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex(
ISteamInput* self, int nIndex );
ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle(
ISteamInput* self, InputHandle_t inputHandle );
-void SteamAPI_ISteamInput_RunFrame( ISteamInput* self, int bReservedValue );
+void SteamAPI_ISteamInput_RunFrame( ISteamInput* self,
+ steamapi_bool bReservedValue );
#endif /* VG_STEAM_UTILS_H */
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "vg/submodules/stb/stb_image_write.h"
+/* its a sad day. */
+#if 0
+#define STBI_MALLOC(X)
+#define STBI_REALLOC(X,Y)
+#define STBI_FREE(X)
+#endif
+
+#define STBI_ONLY_JPEG
+#define STB_IMAGE_IMPLEMENTATION
+#include "vg/submodules/stb/stb_image.h"
+
struct vg_sprite
{
v4f uv_xywh;