This commit is contained in:
nephacks
2025-06-04 03:22:50 +02:00
parent f234f23848
commit f12416cffd
14243 changed files with 6446499 additions and 26 deletions

View File

@@ -0,0 +1,262 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHEXT_CSTRIKE15_H
#define IMATCHEXT_CSTRIKE15_H
#ifdef _WIN32
#pragma once
#pragma warning( push )
#pragma warning( disable : 4201 )
#endif
#define STORAGE_COUNT_FOR_BITS( aStorageType, numBits ) ( ( (numBits) + 8*sizeof( aStorageType ) - 1 ) / sizeof( aStorageType ) )
// Matchmaking data for CSS1.5
#define MM_AVG_CONST 100.0f
// MatchmakingDataMode
// We keep seperate matchmaking data for a different kinds of types. Types that
// aren't specific to certain game play rules (like gungame progressive) should
// use the general type.
enum MatchmakingDataType
{
MMDATA_TYPE_GENERAL = 0,
MMDATA_TYPE_GGPROGRESSIVE,
MMDATA_TYPE_COUNT,
};
// MatchmakingDataScope
// There are two kinds of scope for each MatchmakingDataType: Lifetime and Round.
// Lifetime is the user's liifetime matchmaking values serialized to/from the user's
// profile.
// Round is the user's current values accumulated during the current round of game
// play. At the end of the round, the Round values are aggregated with the lifetime
// values according to the formulas specified in the MatchSystem resource file.
enum MatchmakingDataScope
{
MMDATA_SCOPE_LIFETIME = 0,
MMDATA_SCOPE_ROUND,
MMDATA_SCOPE_COUNT,
};
#define MATCHMAKINGDATA_FIELD(name) short name [MMDATA_TYPE_COUNT][MMDATA_SCOPE_COUNT];
// MatchmakingData
// This is the data structure used for matchmaking. Any fields addsed to this structure
// need to be added to all of the appropriate areas where we calculate averages and
// serialize this data.
struct MatchmakingData
{
MATCHMAKINGDATA_FIELD(mContribution);
MATCHMAKINGDATA_FIELD(mMVPs);
MATCHMAKINGDATA_FIELD(mKills);
MATCHMAKINGDATA_FIELD(mDeaths);
MATCHMAKINGDATA_FIELD(mHeadShots);
MATCHMAKINGDATA_FIELD(mDamage);
MATCHMAKINGDATA_FIELD(mShotsFired);
MATCHMAKINGDATA_FIELD(mShotsHit);
MATCHMAKINGDATA_FIELD(mDominations);
MATCHMAKINGDATA_FIELD(mRoundsPlayed);
};
#undef MATCHMAKINGDATA_FIELD
struct PlayerELOBracketInfo_t
{
uint8 m_DisplayBracket : 4; // Bracket displayed to the user for this game mode / input device combo
uint8 m_PreviousBracket : 4; // Bracket we are qualified for based on the last elo change (used in settling code)
uint8 m_NumGamesInBracket; // Count of rounds played in the current bracket (used in settling code).
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData1 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData1
{
uint16 versionNumber;
struct usrStats_t
{
};
usrStats_t usrStats;
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData2 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData2
{
// CSMedalsAwarded: bool for isAchieved
// CSMedalsMedalInfo: if awarded, unlocktime; if not awarded, count
// avoid struct to avoid wasting space with alignment issues
uint16 versionNumber;
};
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData3 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData3
{
uint32 version;
uint16 versionNumber;
struct ConVarsSystem_t
{
uint32 unused_values[10];
// enum Bits_bitfields_t
// {
//#define CFG( name ) name,
//#include "xlast_csgo/inc_gameconsole_settings_sys_bits.inc"
//#undef CFG
// bit_last
// };
// uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
//uint32 unused[10];
};
ConVarsSystem_t cvSystem;
struct ConVarsUser_t
{
#if defined( _PS3 )
// Two other sets of button bindings.
struct MoveBindings_t
{
#include "xlast_csgo/inc_gameconsole_device_specific_settings_usr.inc"
};
MoveBindings_t PSMove;
struct SharpShooterBindings_t
{
#include "xlast_csgo/inc_gameconsole_device_specific_settings_usr.inc"
};
SharpShooterBindings_t SharpShooter;
#endif // _PS3
#undef CFG
//uint32 unused_values[10];
// enum Bits_bitfields_t
// {
//#define CFG( name ) name,
//#include "xlast_csgo/inc_gameconsole_settings_usr_bits.inc"
//#undef CFG
// bit_last
// };
// uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
//uint32 unused[10];
};
ConVarsUser_t cvUser;
ConVarsUser_t cvUserSS;
struct JoystickBindings_t
{
#if defined( _PS3 )
// Keyboard bindings.
#include "xlast_csgo/inc_ps3_key_bindings_usr.inc"
// Two other sets of button bindings.
struct MoveBindings_t
{
#include "xlast_csgo/inc_bindings_usr.inc"
};
MoveBindings_t PSMove;
struct SharpShooterBindings_t
{
#include "xlast_csgo/inc_bindings_usr.inc"
};
SharpShooterBindings_t SharpShooter;
#endif
#undef BINDING
#undef ACTION
};
JoystickBindings_t JoystickBindings;
struct GameInstructorData_t
{
enum LessonsBits_t
{
lessonbits_last_bit_used,
lessonbits_total = 48 // leave room for total 48 lessons
};
union LessonInfo_t
{
uint8 u8dummy;
struct
{
uint8 display : 4;
uint8 success : 4;
};
} lessoninfo[ lessonbits_total ];
};
GameInstructorData_t gameinstructor;
//we are using an array so we can pack this info as tight as possible to fit into the 1K block
#if defined( LOCAL_ELO_DATA )
// array of player skill rankings
PlayerELORank_t playerRankingsData[ ELOTitleData360::TOTAL_NUM_ELO_RANKS_STORED ];
PlayerELOBracketInfo_t EloBracketInfo[ ELOTitleData::NUM_GAME_MODES_ELO_RANKED ];
#endif
struct usrMMData_t
{
};
usrMMData_t usrMMData;
};
#ifdef _WIN32
#pragma warning( pop )
#endif
#endif // IMATCHEXT_CSTRIKE15_H

View File

@@ -0,0 +1,86 @@
#ifndef _IDATACENTER_H_
#define _IDATACENTER_H_
class IDatacenter;
class IDatacenterCmdBatch;
#include "imatchsystem.h"
abstract_class IDatacenter
{
public:
//
// GetStats
// retrieves the last received datacenter stats
//
virtual KeyValues * GetStats() = 0;
//
// CreateCmdBatch
// creates a new instance of cmd batch to communicate
// with datacenter backend
//
virtual IDatacenterCmdBatch * CreateCmdBatch( bool bMustSupportPII ) = 0;
//
// CanReachDatacenter
// returns true if we were able to establish a connection with the
// datacenter backend regardless if it returned valid data or not.
virtual bool CanReachDatacenter() = 0;
};
abstract_class IDatacenterCmdBatch
{
public:
//
// AddCommand
// enqueues a command in command batch queue
//
virtual void AddCommand( KeyValues *pCommand ) = 0;
//
// IsFinished
// whether command batch queue has finished running / error occurred
//
virtual bool IsFinished() = 0;
//
// GetNumResults
// returns number of results retrieved for which data is available
//
virtual int GetNumResults() = 0;
//
// GetResult
// returns the result by index
//
virtual KeyValues * GetResult( int idx ) = 0;
//
// Destroy
// destroys the command batch object and all contained results
//
virtual void Destroy() = 0;
//
// SetDestroyWhenFinished
// destroys the command batch object automatically after
// it finishes communication with datacenter
//
virtual void SetDestroyWhenFinished( bool bDestroyWhenFinished ) = 0;
//
// SetNumRetriesAllowedPerCmd
// configures retry attempts per command
//
virtual void SetNumRetriesAllowedPerCmd( int numRetriesAllowed ) = 0;
//
// SetRetryCmdTimeout
// configures retry timeout per command
//
virtual void SetRetryCmdTimeout( float flRetryCmdTimeout ) = 0;
};
#endif // _IDATACENTER_H_

View File

@@ -0,0 +1,25 @@
#ifndef _IDLCMANAGER_H_
#define _IDLCMANAGER_H_
class IDlcManager;
#include "imatchsystem.h"
abstract_class IDlcManager
{
public:
//
// RequestDlcUpdate
// requests a background DLC update
//
virtual void RequestDlcUpdate() = 0;
virtual bool IsDlcUpdateFinished( bool bWaitForFinish = false ) = 0;
//
// GetDataInfo
// retrieves the last acquired dlc information
//
virtual KeyValues * GetDataInfo() = 0;
};
#endif // _IDLCMANAGER_H_

View File

@@ -0,0 +1,63 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHASYNC_H
#define IMATCHASYNC_H
#ifdef _WIN32
#pragma once
#endif
//
// Describes possible states of an async operation
//
enum AsyncOperationState_t
{
AOS_RUNNING,
AOS_ABORTING,
AOS_ABORTED,
AOS_FAILED,
AOS_SUCCEEDED,
};
//
// Interface of an async operation
//
abstract_class IMatchAsyncOperation
{
public:
// Poll if operation has completed
virtual bool IsFinished() = 0;
// Operation state
virtual AsyncOperationState_t GetState() = 0;
// Retrieve a generic completion result for simple operations
// that return simple results upon success,
// results are operation-specific, may result in undefined behavior
// if operation is still in progress.
virtual uint64 GetResult() = 0;
virtual uint64 GetResultExtraInfo() { return 0; }
// Request operation to be aborted
virtual void Abort() = 0;
// Release the operation interface and all resources
// associated with the operation. Operation callbacks
// will not be called after Release. Operation object
// cannot be accessed after Release.
virtual void Release() = 0;
};
abstract_class IMatchAsyncOperationCallback
{
public:
// Signals when operation has finished
virtual void OnOperationFinished( IMatchAsyncOperation *pOperation ) = 0;
};
#endif // IMATCHASYNC_H

View File

@@ -0,0 +1,259 @@
//===== Copyright © 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
//===========================================================================//
#ifndef IMATCHEVENTS_H
#define IMATCHEVENTS_H
#ifdef _WIN32
#pragma once
#endif
abstract_class IMatchEventsSink
{
public:
virtual void OnEvent( KeyValues *pEvent ) {}
//
// List of events
//
/*
"OnSysStorageDevicesChanged"
Signalled when system storage device change is detected.
params:
void
"OnSysSigninChange"
Signalled when one or more users sign out.
params:
string "action" - signin change event: "signin", "signout"
int "numUsers" - how many users signed in/out (defines valid user0 - userN-1 fields)
int "mask" - bitmask of controllers affected
int "user%d" - controller index affected
"OnSysXUIEvent"
Signalled when an XUI event occurs.
params:
string "action" - XUI action type: "opening", "closed"
"OnSysMuteListChanged"
Signalled when system mute list change occurs.
params:
void
"OnSysInputDevicesChanged"
Signalled when input device disconnection is detected.
params:
int "mask" - bitmask of which slot's controller was disconnected [0-1]
"OnEngineLevelLoadingStarted"
Signalled when a level starts loading.
params:
string "name" - level name
"OnEngineListenServerStarted"
Signalled when a listen server level loads enough to accept client connections.
params:
void
"OnEngineLevelLoadingTick"
Signalled periodically while a level is loading,
after loading started and before loading finished.
params:
void
"OnEngineLevelLoadingFinished"
Signalled when a level is finished loading.
params:
int "error" - whether an extended error occurred
string "reason" - reason description
"OnEngineClientSignonStateChange"
Signalled when client's signon state is changing.
params:
int "slot" - client ss slot
int "old" - old state
int "new" - new state
int "count" - count
"OnEngineDisconnectReason"
Signalled before a disconnect is going to occur and a reason
for disconnect is available.
params:
string "reason" - reason description
"OnEngineEndGame"
Signalled before a disconnect is going to occur and notifies the members
of the game that the game has reached a conclusion or a vote to end the
game has passed and the game should terminate and return to lobby if possible.
params:
string "reason" - reason description
"OnMatchPlayerMgrUpdate"
Signalled when a player manager update occurs.
params:
string "update" = - update type
"searchstarted" - search started
"searchfinished" - search finished
"friend" - friend details updated
uint64 "xuid" - xuid of a player if applicable
"OnMatchPlayerMgrReset"
Signalled when the game needs to go into attract mode.
params:
string "reason" - one of the following reasons:
"GuestSignedIn" - guest user signed in
"GameUserSignedOut" - user involved in game has signed out
"OnMatchServerMgrUpdate"
Signalled when a server manager update occurs.
params:
string "update" = - update type
"searchstarted" - search started
"searchfinished" - search finished
"server" - server details updated
uint64 "xuid" - xuid of a server if applicable
"OnMatchSessionUpdate"
Signalled when a session changes.
params:
strings "state" = - new state of the session
"ready" - session is completely initialized and ready
"updated" - session settings have been updated
"OnNetLanConnectionlessPacket"
Signalled when a lan network packet is received.
params:
string "from" - netadr of sender as recorded by network layer
subkey - packet message
"OnProfilesChanged"
Signalled when new number of game users are set for the game.
params:
int "numProfiles" - number of game users set for the game
"OnProfileDataLoaded"
Signalled when a user profile title data is loaded.
params:
int "iController" - index of controller whose title data is now loaded
"OnProfileStorageAvailable"
Signalled when a user profile storage device is selected.
params:
int "iController" - index of controller whose storage device is now selected
"OnProfileUnavailable"
Signalled when a user profile is detected as unavailable.
params:
int "iController" - index of controller whose profile was detected as unavailable
"OnPlayerUpdated"
Signalled when information about a player changes.
params:
uint64 "xuid" - XUID of the player updated
"OnPlayerRemoved"
Signalled when a player is removed from the game.
params:
uint64 "xuid" - XUID of the player removed
"OnPlayerMachinesConnected"
Signalled when new machines become part of the session, they will be last
in the list of connected machines.
params:
int "numMachines" - number of new machines connected
"OnPlayerActivity"
Signalled when a player activity is detected.
params:
uint64 "xuid" - XUID of the player
string "act" - type of activity:
"voice" - player is voice chatting
"OnMuteChanged"
Signalled when a mute list is updated.
params:
void
"OnInvite"
Signalled when game invite event occurs.
params:
int "user" - controller index accepting the invite or causing invite error
string "sessioninfo" - session info of the invite host
string "action" = - invite action
"accepted" - when an invite is accepted by user
"storage" - when a storage device needs to be validated
"error" - when an error occurs that prevents invite from being accepted
"join" - when destructive actions or storage devices are confirmed by user
"deny" - when invite is rejected by user
string "error" - error description: "NotOnline", "NoMultiplayer", etc.
ptr int "confirmed" - handler should set pointed int to 0 if confirmation is pending
and send a "join" action OnInvite event after destructive
actions are confirmed by user, storage devices are mounted, etc.
*/
};
abstract_class IMatchEventsSubscription
{
public:
virtual void Subscribe( IMatchEventsSink *pSink ) = 0;
virtual void Unsubscribe( IMatchEventsSink *pSink ) = 0;
virtual void BroadcastEvent( KeyValues *pEvent ) = 0;
virtual void RegisterEventData( KeyValues *pEventData ) = 0;
virtual KeyValues * GetEventData( char const *szEventDataKey ) = 0;
};
//
// Renamer for the match events event-handler function
// Usage:
// class MyClass : public CMatchEventsSinkFn< MyClass >
// {
// public:
// MyClass() : MatchEventsSinkFnClass( &MyClass::HandleMatchSinkEvent ) {}
// void HandleMatchSinkEvent( KeyValues *pEvent );
// };
//
template < typename TDerived >
class CMatchEventsSinkFn : public IMatchEventsSink
{
protected:
typedef TDerived DerivedClass;
typedef void ( TDerived::*PFnDerivedHandler_t )( KeyValues *pEvent );
typedef CMatchEventsSinkFn< TDerived > MatchEventsSinkFnClass;
protected:
explicit CMatchEventsSinkFn( PFnDerivedHandler_t pfn ) : m_pfnDerived( pfn ) {}
public:
virtual void OnEvent( KeyValues *pEvent )
{
( static_cast< TDerived * >( this )->*m_pfnDerived )( pEvent );
}
private:
PFnDerivedHandler_t m_pfnDerived;
};
#endif // IMATCHEVENTS_H

View File

@@ -0,0 +1,28 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHEXTENSIONS_H
#define IMATCHEXTENSIONS_H
#ifdef _WIN32
#pragma once
#endif
abstract_class IMatchExtensions
{
public:
// Registers an extension interface
virtual void RegisterExtensionInterface( char const *szInterfaceString, void *pvInterface ) = 0;
// Unregisters an extension interface
virtual void UnregisterExtensionInterface( char const *szInterfaceString, void *pvInterface ) = 0;
// Gets a pointer to a registered extension interface
virtual void * GetRegisteredExtensionInterface( char const *szInterfaceString ) = 0;
};
#endif // IMATCHEXTENSIONS_H

View File

@@ -0,0 +1,123 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHFRAMEWORK_H
#define IMATCHFRAMEWORK_H
#ifdef _WIN32
#pragma once
#endif
#define CONTEAMMATCH
class IMatchFramework;
class IMatchSession;
#include "appframework/iappsystem.h"
#include "tier1/interface.h"
#include "keyvalues.h"
#if !defined( _X360 )
#include "xbox/xboxstubs.h"
#endif
#include "inetchannel.h"
#include "imatchasync.h"
#include "imatchtitle.h"
#include "imatchnetworkmsg.h"
#include "imatchextensions.h"
#include "imatchevents.h"
#include "imatchsystem.h"
#include "iplayermanager.h"
#include "iplayer.h"
#include "iservermanager.h"
#include "imatchvoice.h"
#include "isearchmanager.h"
#include "idatacenter.h"
#include "idlcmanager.h"
typedef void (*RankedMatchStartCallback)( KeyValues *pSettings, uint32 volatile *pResult );
abstract_class IMatchFramework : public IAppSystem
{
public:
// Run frame of the matchmaking framework
virtual void RunFrame() = 0;
// Get matchmaking extensions
virtual IMatchExtensions * GetMatchExtensions() = 0;
// Get events container
virtual IMatchEventsSubscription * GetEventsSubscription() = 0;
// Get the matchmaking title interface
virtual IMatchTitle * GetMatchTitle() = 0;
// Get the match session interface of the current match framework type
virtual IMatchSession * GetMatchSession() = 0;
// Get the network msg encode/decode factory
virtual IMatchNetworkMsgController * GetMatchNetworkMsgController() = 0;
// Get the match system
virtual IMatchSystem * GetMatchSystem() = 0;
// Send the key values back to the server
virtual void ApplySettings( KeyValues* keyValues ) = 0;
// Entry point to create session
virtual void CreateSession( KeyValues *pSettings ) = 0;
// Entry point to match into a session
virtual void MatchSession( KeyValues *pSettings ) = 0;
// Accept invite
virtual void AcceptInvite( int iController ) = 0;
// Close the session
virtual void CloseSession() = 0;
// Checks to see if the current game is being played online ( as opposed to locally against bots )
virtual bool IsOnlineGame( void ) = 0;
// Called by the client to notify matchmaking that it should update matchmaking properties based
// on player distribution among the teams.
virtual void UpdateTeamProperties( KeyValues *pTeamProperties ) = 0;
};
#define IMATCHFRAMEWORK_VERSION_STRING "MATCHFRAMEWORK_001"
abstract_class IMatchSession
{
public:
// Get an internal pointer to session system-specific data
virtual KeyValues * GetSessionSystemData() = 0;
// Get an internal pointer to session settings
virtual KeyValues * GetSessionSettings() = 0;
// Update session settings, only changing keys and values need
// to be passed and they will be updated
virtual void UpdateSessionSettings( KeyValues *pSettings ) = 0;
// Issue a session command
virtual void Command( KeyValues *pCommand ) = 0;
// Get the lobby or XSession ID
virtual uint64 GetSessionID() = 0;
// Callback when team changes
virtual void UpdateTeamProperties( KeyValues *pTeamProperties ) = 0;
};
#endif // IMATCHFRAMEWORK_H

View File

@@ -0,0 +1,49 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHNETWORKMSG_H
#define IMATCHNETWORKMSG_H
#ifdef _WIN32
#pragma once
#endif
struct MM_QOS_t
{
int nPingMsMin; // Minimum round-trip time in ms
int nPingMsMed; // Median round-trip time in ms
float flBwUpKbs; // Bandwidth upstream in kilobytes/s
float flBwDnKbs; // Bandwidth downstream in kilobytes/s
float flLoss; // Average packet loss in percents
};
struct MM_GameDetails_QOS_t
{
void *m_pvData; // Encoded game details
int m_numDataBytes; // Length of game details
int m_nPing; // Average ping in ms
};
abstract_class IMatchNetworkMsgController
{
public:
// To determine host Quality-of-Service
virtual MM_QOS_t GetQOS() = 0;
virtual KeyValues * GetActiveServerGameDetails( KeyValues *pRequest ) = 0;
virtual KeyValues * UnpackGameDetailsFromQOS( MM_GameDetails_QOS_t const *pvQosReply ) = 0;
virtual KeyValues * UnpackGameDetailsFromSteamLobby( uint64 uiLobbyID ) = 0;
virtual void PackageGameDetailsForQOS( KeyValues *pSettings, CUtlBuffer &buf ) = 0;
virtual KeyValues * PackageGameDetailsForReservation( KeyValues *pSettings ) = 0;
};
#endif // IMATCHNETWORKMSG_H

View File

@@ -0,0 +1,31 @@
//========= Copyright © 1996-2009, Valve Corporation, All rights reserved. ============//
#ifndef _IMATCHSYSTEM_H_
#define _IMATCHSYSTEM_H_
class IPlayerManager;
class IGameManager;
class IServerManager;
class ISearchManager;
class IMatchVoice;
class IDatacenter;
class IDlcManager;
class IMatchSystem
{
public:
virtual IPlayerManager * GetPlayerManager() = 0;
virtual IMatchVoice * GetMatchVoice() = 0;
virtual IServerManager * GetUserGroupsServerManager() = 0;
virtual ISearchManager * CreateGameSearchManager( KeyValues *pParams ) = 0;
virtual IDatacenter * GetDatacenter() = 0;
virtual IDlcManager * GetDlcManager() = 0;
};
#endif

View File

@@ -0,0 +1,247 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHTITLE_H
#define IMATCHTITLE_H
#ifdef _WIN32
#pragma once
#endif
#if defined ( _PS3 )
#define TITLE_DATA_PREFIX "PS3."
#define TITLE_DATA_DEVICE_MOVE_PREFIX "MOVE."
#define TITLE_DATA_DEVICE_SHARP_SHOOTER_PREFIX "SHARP_SHOOTER."
#else
#define TITLE_DATA_PREFIX ""
#endif
struct TitleDataFieldsDescription_t
{
enum DataType_t
{
DT_0 = 0,
DT_uint8 = 8,
DT_BITFIELD = 9,
DT_uint16 = 16,
DT_uint32 = 32,
DT_float = 33,
DT_uint64 = 64
};
enum DataBlock_t
{
DB_TD1 = 0,
DB_TD2 = 1,
DB_TD3 = 2,
DB_TD_COUNT = 3
};
char const *m_szFieldName;
DataBlock_t m_iTitleDataBlock;
DataType_t m_eDataType;
union
{
int m_numBytesOffset;
int m_nUserDataValue0;
};
};
struct TitleAchievementsDescription_t
{
char const *m_szAchievementName; // Name by which achievement can be awarded and queried
int m_idAchievement; // Achievement ID on the platform
int m_numComponents; // Number of achievement component title data bits
};
struct TitleAvatarAwardsDescription_t
{
char const *m_szAvatarAwardName; // Name by which avatar award can be awarded and queried
int m_idAvatarAward; // Avatar award ID on the platform
char const *m_szTitleDataBitfieldStatName; // Name of a bitfield in title data storage representing whether avatar award has been earned
};
struct TitleDlcDescription_t
{
uint64 m_uiLicenseMaskId;
int m_idDlcAppId;
int m_idDlcPackageId;
char const *m_szTitleDataBitfieldStatName; // Name of a bitfield in title data storage representing whether dlc has been discovered installed
};
enum TitleSettingsFlags_t
{
MATCHTITLE_SETTING_MULTIPLAYER = ( 1 << 0 ), // Title wants network sockets initialization
MATCHTITLE_SETTING_NODEDICATED = ( 1 << 1 ), // Title doesn't support dedicated servers
MATCHTITLE_PLAYERMGR_DISABLED = ( 1 << 2 ), // Title doesn't need friends presence poll
MATCHTITLE_SERVERMGR_DISABLED = ( 1 << 3 ), // Title doesn't need group servers poll
MATCHTITLE_INVITE_ONLY_SINGLE_USER = ( 1 << 4 ), // Accepted game invite forcefully disables splitscreen (e.g.: 1-on-1 games)
MATCHTITLE_VOICE_INGAME = ( 1 << 5 ), // When in active gameplay lobby system doesn't transmit voice
MATCHTITLE_XLSPPATCH_SUPPORTED = ( 1 << 6 ), // Title supports xlsp patch containers
MATCHTITLE_PLAYERMGR_ALLFRIENDS = ( 1 << 7 ), // Player manager by default fetches only friends for same game, this will force all friends to be fetched
MATCHTITLE_PLAYERMGR_FRIENDREQS = ( 1 << 8 ), // Player manager by default fetches only real friends, this will force friend requests to also be fetched
};
abstract_class IMatchTitle
{
public:
// Title ID
virtual uint64 GetTitleID() = 0;
// Service ID for XLSP
virtual uint64 GetTitleServiceID() = 0;
// Describe title settings using a bitwise combination of flags
virtual uint64 GetTitleSettingsFlags() = 0;
// Prepare network startup params for the title
virtual void PrepareNetStartupParams( void *pNetStartupParams ) = 0;
// Get total number of players supported by the title
virtual int GetTotalNumPlayersSupported() = 0;
// Get a guest player name
virtual char const * GetGuestPlayerName( int iUserIndex ) = 0;
// Decipher title data fields
virtual TitleDataFieldsDescription_t const * DescribeTitleDataStorage() = 0;
// Title achievements
virtual TitleAchievementsDescription_t const * DescribeTitleAchievements() = 0;
// Title avatar awards
virtual TitleAvatarAwardsDescription_t const * DescribeTitleAvatarAwards() = 0;
// Title leaderboards
virtual KeyValues * DescribeTitleLeaderboard( char const *szLeaderboardView ) = 0;
// Sets up all necessary client-side convars and user info before
// connecting to server
virtual void PrepareClientForConnect( KeyValues *pSettings ) = 0;
// Start up a listen server with the given settings
virtual bool StartServerMap( KeyValues *pSettings ) = 0;
// Title DLC description
virtual TitleDlcDescription_t const * DescribeTitleDlcs() = 0;
// Run every frame
virtual void RunFrame() = 0;
};
//
// Matchmaking title settings extension interface
//
abstract_class IMatchTitleGameSettingsMgr
{
public:
// Extends server game details
virtual void ExtendServerDetails( KeyValues *pDetails, KeyValues *pRequest ) = 0;
// Adds the essential part of game details to be broadcast
virtual void ExtendLobbyDetailsTemplate( KeyValues *pDetails, char const *szReason, KeyValues *pFullSettings ) = 0;
// Extends game settings update packet for lobby transition,
// either due to a migration or due to an endgame condition
virtual void ExtendGameSettingsForLobbyTransition( KeyValues *pSettings, KeyValues *pSettingsUpdate, bool bEndGame ) = 0;
// Adds data for datacenter reporting
virtual void ExtendDatacenterReport( KeyValues *pReportMsg, char const *szReason ) = 0;
// Rolls up game details for matches grouping
// valid pDetails, null pRollup
// returns a rollup representation of pDetails to be used as an indexing key
// valid pDetails, valid pRollup (usually called second time)
// rolls the details into the rollup, aggregates some values, when
// the aggregate values are missing in pRollup, then this is the first
// details entry being aggregated and would establish the first rollup
// returns pRollup
// null pDetails, valid pRollup
// tries to determine if the rollup should remain even though no details
// matched it, adjusts pRollup to represent no aggregated data
// returns null to drop pRollup, returns pRollup to keep rollup
virtual KeyValues * RollupGameDetails( KeyValues *pDetails, KeyValues *pRollup, KeyValues *pQuery ) = 0;
// Defines session search keys for matchmaking
virtual KeyValues * DefineSessionSearchKeys( KeyValues *pSettings ) = 0;
// Defines dedicated server search key
virtual KeyValues * DefineDedicatedSearchKeys( KeyValues *pSettings, bool bNeedOfficialServer, int nSearchPass ) = 0;
// Initializes full game settings from potentially abbreviated game settings
virtual void InitializeGameSettings( KeyValues *pSettings, char const *szReason ) = 0;
// Sets the bspname key given a mapgroup
virtual void SetBspnameFromMapgroup( KeyValues *pSettings ) = 0;
// Extends game settings update packet before it gets merged with
// session settings and networked to remote clients
virtual void ExtendGameSettingsUpdateKeys( KeyValues *pSettings, KeyValues *pUpdateDeleteKeys ) = 0;
virtual KeyValues * ExtendTeamLobbyToGame( KeyValues *pSettings ) = 0;
// Prepares system for session creation
virtual KeyValues * PrepareForSessionCreate( KeyValues *pSettings ) = 0;
// Executes the command on the session settings, this function on host
// is allowed to modify Members/Game subkeys and has to fill in modified players KeyValues
// When running on a remote client "ppPlayersUpdated" is NULL and players cannot
// be modified
virtual void ExecuteCommand( KeyValues *pCommand, KeyValues *pSessionSystemData, KeyValues *pSettings, KeyValues **ppPlayersUpdated ) = 0;
// Prepares the host lobby for game or adjust settings of new players who
// join a game in progress, this function is allowed to modify
// Members/Game subkeys and has to fill in modified players KeyValues
virtual void PrepareLobbyForGame( KeyValues *pSettings, KeyValues **ppPlayersUpdated ) = 0;
// Prepares the host team lobby for game adjusting the game settings
// this function is allowed to prepare modification package to update
// Game subkeys.
// Returns the update/delete package to be applied to session settings
// and pushed to dependent two sesssion of the two teams.
virtual KeyValues * PrepareTeamLinkForGame( KeyValues *pSettingsLocal, KeyValues *pSettingsRemote ) = 0;
// Prepares the client lobby for migration
// this function is called when the client session is still in the state
// of "client" while handling the original host disconnection and decision
// has been made that local machine will be elected as new "host"
// Returns NULL if migration should proceed normally
// Returns [ kvroot { "error" "n/a" } ] if migration should be aborted.
virtual KeyValues * PrepareClientLobbyForMigration( KeyValues *pSettingsLocal, KeyValues *pMigrationInfo ) = 0;
// Prepares the session for server disconnect
// this function is called when the session is still in the active gameplay
// state and while localhost is handling the disconnection from game server.
// Returns NULL to allow default flow
// Returns [ kvroot { "disconnecthdlr" "<opt>" } ] where <opt> can be:
// "destroy" : to trigger a disconnection error and destroy the session
// "lobby" : to initiate a "salvaging" lobby transition
virtual KeyValues * PrepareClientLobbyForGameDisconnect( KeyValues *pSettingsLocal, KeyValues *pDisconnectInfo ) = 0;
// Validates if client profile can set a stat or get awarded an achievement
virtual bool AllowClientProfileUpdate( KeyValues *kvUpdate ) = 0;
// Retrieves the indexed formula from the match system settings file. (MatchSystem.360.res)
virtual char const * GetFormulaAverage( int index ) = 0;
// Called by the client to notify matchmaking that it should update matchmaking properties based
// on player distribution among the teams.
virtual void UpdateTeamProperties( KeyValues *pCurrentSettings, KeyValues *pTeamProperties ) = 0;
};
#endif // IMATCHTITLE_H

View File

@@ -0,0 +1,38 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHVOICE_H
#define IMATCHVOICE_H
#ifdef _WIN32
#pragma once
#endif
abstract_class IMatchVoice
{
public:
// Whether remote player talking can be visualized / audible
virtual bool CanPlaybackTalker( XUID xuidTalker ) = 0;
// Whether we are explicitly muting a remote player
virtual bool IsTalkerMuted( XUID xuidTalker ) = 0;
// Whether we are muting any player on the player's machine
virtual bool IsMachineMuted( XUID xuidPlayer ) = 0;
// Whether voice recording mode is currently active
virtual bool IsVoiceRecording() = 0;
// Enable or disable voice recording
virtual void SetVoiceRecording( bool bRecordingEnabled ) = 0;
// Enable or disable voice mute for a given talker
virtual void MuteTalker( XUID xuidTalker, bool bMute ) = 0;
};
#endif

View File

@@ -0,0 +1,101 @@
//========= Copyright © 1996-2009, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=====================================================================================//
#ifndef _IPLAYER_H_
#define _IPLAYER_H_
#include "tier1/keyvalues.h"
struct UserProfileData
{
float reputation;
int32 difficulty;
int32 sensitivity;
int32 yaxis;
int32 vibration;
int32 color1, color2;
int32 action_autoaim;
int32 action_autocenter;
int32 action_movementcontrol;
int32 region;
int32 achearned;
int32 cred;
int32 zone;
int32 titlesplayed;
int32 titleachearned;
int32 titlecred;
};
//Players are a wrapper or a networked player, as such they may not have all the information current, particularly when first created.
abstract_class IPlayer
{
public:
enum OnlineState_t
{
STATE_OFFLINE,
STATE_NO_MULTIPLAYER,
STATE_ONLINE,
};
public:
//Info
virtual XUID GetXUID() = 0;
virtual int GetPlayerIndex() = 0;
virtual char const * GetName() = 0;
virtual OnlineState_t GetOnlineState() = 0;
};
abstract_class IPlayerFriend : public IPlayer
{
public:
virtual wchar_t const * GetRichPresence() = 0;
virtual KeyValues *GetGameDetails() = 0;
virtual KeyValues *GetPublishedPresence() = 0;
virtual bool IsJoinable() = 0;
virtual void Join() = 0;
virtual uint64 GetTitleID() = 0;
virtual uint32 GetGameServerIP() = 0;
};
struct MatchmakingData;
class IPlayerRankingDataStore;
abstract_class IPlayerLocal : public IPlayer
{
public:
virtual const UserProfileData& GetPlayerProfileData() = 0;
virtual MatchmakingData * GetPlayerMatchmakingData( void ) = 0;
virtual void UpdatePlayerMatchmakingData( int mmDataType ) = 0;
virtual void ResetPlayerMatchmakingData( int mmDataScope ) = 0;
virtual const void * GetPlayerTitleData( int iTitleDataIndex ) = 0;
virtual void UpdatePlayerTitleData( TitleDataFieldsDescription_t const *fdKey, const void *pvNewTitleData, int numNewBytes ) = 0;
virtual void GetLeaderboardData( KeyValues *pLeaderboardInfo ) = 0;
virtual void UpdateLeaderboardData( KeyValues *pLeaderboardInfo ) = 0;
virtual void GetAwardsData( KeyValues *pAwardsData ) = 0;
virtual void UpdateAwardsData( KeyValues *pAwardsData ) = 0;
virtual void SetNeedsSave( void ) = 0;
#if defined ( _X360 )
virtual bool IsTitleDataValid( void ) = 0;
virtual bool IsTitleDataBlockValid( int blockId ) = 0;
virtual void SetIsTitleDataValid( bool isValid ) = 0;
virtual bool IsFreshPlayerProfile( void ) = 0;
virtual void ClearBufTitleData( void ) = 0;
#endif
virtual bool IsTitleDataStorageConnected( void ) = 0;
};
#endif

View File

@@ -0,0 +1,46 @@
//========= Copyright © 1996-2009, Valve Corporation, All rights reserved. ============//
#ifndef _IPLAYERMANAGER_H_
#define _IPLAYERMANAGER_H_
class IPlayer;
class IPlayerFriend;
class IPlayerLocal;
abstract_class IPlayerManager
{
public:
//
// EnableServersUpdate
// controls whether friends data is being updated in the background
//
virtual void EnableFriendsUpdate( bool bEnable ) = 0;
//
// GetLocalPlayer
// returns a local player interface for a given controller index
//
virtual IPlayerLocal * GetLocalPlayer( int iController ) = 0;
//
// GetNumFriends
// returns number of friends discovered and for which data is available
//
virtual int GetNumFriends() = 0;
//
// GetFriend
// returns player interface to the given friend or NULL if friend not found or not available
//
virtual IPlayerFriend * GetFriendByIndex( int index ) = 0;
virtual IPlayerFriend * GetFriendByXUID( XUID xuid ) = 0;
//
// FindPlayer
// returns player interface by player's XUID or NULL if player not found or not available
//
virtual IPlayer * FindPlayer( XUID xuid ) = 0;
};
#endif

View File

@@ -0,0 +1,9 @@
//========= Copyright © 1996-2011, Valve Corporation, All rights reserved. ============//
//
// Purpose: Holds ELO data on Xbox
//
//=====================================================================================//
#ifndef _IPLAYERRANKINGDATA_H_
#define _IPLAYERRANKINGDATA_H_
#endif // _IPLAYERRANKINGDATA_H_

View File

@@ -0,0 +1,62 @@
#ifndef _ISEARCHMANAGER_H_
#define _ISEARCHMANAGER_H_
class IMatchSearchResult;
class ISearchManager;
#include "imatchsystem.h"
abstract_class IMatchSearchResult
{
public:
//
// GetOnlineId
// returns result online id to store as reference
//
virtual XUID GetOnlineId() = 0;
//
// GetGameDetails
// returns result game details
//
virtual KeyValues *GetGameDetails() = 0;
//
// IsJoinable and Join
// returns whether result is joinable and initiates join to the result
//
virtual bool IsJoinable() = 0;
virtual void Join() = 0;
};
abstract_class ISearchManager
{
public:
//
// EnableResultsUpdate
// controls whether server data is being updated in the background
//
virtual void EnableResultsUpdate( bool bEnable, KeyValues *pSearchParams = NULL ) = 0;
//
// GetNumResults
// returns number of results discovered and for which data is available
//
virtual int GetNumResults() = 0;
//
// GetResultByIndex / GetResultByOnlineId
// returns result interface to the given result or NULL if result not found or not available
//
virtual IMatchSearchResult* GetResultByIndex( int iResultIdx ) = 0;
virtual IMatchSearchResult* GetResultByOnlineId( XUID xuidResultOnline ) = 0;
//
// Destroy
// destroys the search manager and all its results
//
virtual void Destroy() = 0;
};
#endif // _ISEARCHMANAGER_H_

View File

@@ -0,0 +1,56 @@
#ifndef _ISERVERMANAGER_H_
#define _ISERVERMANAGER_H_
class IServer;
class IServerManager;
#include "imatchsystem.h"
abstract_class IMatchServer
{
public:
//
// GetOnlineId
// returns server online id to store as reference
//
virtual XUID GetOnlineId() = 0;
//
// GetGameDetails
// returns server game details
//
virtual KeyValues *GetGameDetails() = 0;
//
// IsJoinable and Join
// returns whether server is joinable and initiates join to the server
//
virtual bool IsJoinable() = 0;
virtual void Join() = 0;
};
abstract_class IServerManager
{
public:
//
// EnableServersUpdate
// controls whether server data is being updated in the background
//
virtual void EnableServersUpdate( bool bEnable ) = 0;
//
// GetNumServers
// returns number of servers discovered and for which data is available
//
virtual int GetNumServers() = 0;
//
// GetServerByIndex / GetServerByOnlineId
// returns server interface to the given server or NULL if server not found or not available
//
virtual IMatchServer* GetServerByIndex( int iServerIdx ) = 0;
virtual IMatchServer* GetServerByOnlineId( XUID xuidServerOnline ) = 0;
};
#endif // _ISERVERMANAGER_H_

View File

@@ -0,0 +1,270 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHEXT_PORTAL2_H
#define IMATCHEXT_PORTAL2_H
#ifdef _WIN32
#pragma once
#pragma warning( push )
#pragma warning( disable : 4201 )
#endif
#define STORAGE_COUNT_FOR_BITS( aStorageType, numBits ) ( ( (numBits) + 8*sizeof( aStorageType ) - 1 ) / ( 8* sizeof( aStorageType ) ) )
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData1 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData1
{
uint32 uiSinglePlayerProgressChapter;
struct CoopData_t
{
enum MapBits_t
{
#define CFG( fieldname, ctx, idx, num ) fieldname,
#define CFG_DISABLED( fieldname, ctx, idx, num ) CFG( fieldname )
#include "xlast_portal2/inc_coop_maps.inc"
#undef CFG_DISABLED
#undef CFG
mapbits_last_bit_used,
mapbits_total_basegame = 42,
mapbits_total = 160 // leave room for total 160 maps
};
uint32 mapbits[ STORAGE_COUNT_FOR_BITS( uint32, mapbits_total ) ];
enum TauntBits_t
{
#define CFG( fieldname ) taunt_##fieldname,
#define CFG_DISABLED( fieldname ) CFG( fieldname )
#include "xlast_portal2/inc_coop_taunts.inc"
#undef CFG_DISABLED
#undef CFG
tauntbits_last_bit_used,
tauntbits_total = 48 // leave room for total 48 taunts
};
uint32 tauntbitsOwned[ STORAGE_COUNT_FOR_BITS( uint32, tauntbits_total ) ];
uint32 tauntbitsUsed[ STORAGE_COUNT_FOR_BITS( uint32, tauntbits_total ) ];
enum TauntEquipSlots_t
{
#define CFG( fieldname ) taunt_equipslot_##fieldname,
#define CFG_DISABLED( fieldname ) CFG( fieldname )
#include "xlast_portal2/inc_coop_taunts_equipslots.inc"
#undef CFG_DISABLED
#undef CFG
taunt_equipslots_total
};
uint8 tauntsEquipSlots[taunt_equipslots_total];
};
CoopData_t coop;
struct GameInstructorData_t
{
enum LessonsBits_t
{
#define CFG( fieldname ) lesson_##fieldname,
#define CFG_DISABLED( fieldname ) CFG( fieldname )
#include "xlast_portal2/inc_gameinstructor_lessons.inc"
#undef CFG_DISABLED
#undef CFG
lessonbits_last_bit_used,
lessonbits_total = 48 // leave room for total 48 lessons
};
union LessonInfo_t
{
uint8 u8dummy;
struct
{
uint8 display : 4;
uint8 success : 4;
};
} lessoninfo[ lessonbits_total ];
};
GameInstructorData_t gameinstructor;
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData2 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData2
{
// Achievement component bits
enum AchievementBits_t
{
kAchievementComponentTotalCount = 0
#define CFG( name, compcount, ... ) \
+ STORAGE_COUNT_FOR_BITS( uint32, compcount )
#include "xlast_portal2/inc_achievements.inc"
#undef CFG
};
uint32 bitsAchievementsComponents[ kAchievementComponentTotalCount ];
// Add a padding for future progress achievement bits
uint32 bitsAchievementFuture[ 64 ];
// Awards bitfields
enum AwardBits_t
{
#define CFG( award, ... ) bitAward##award,
#include "xlast_portal2/inc_asset_awards.inc"
#undef CFG
bitAward_last_bit_used,
bitAwards_total = 32 // leave room for total 32 awards
};
uint32 awardbits[ STORAGE_COUNT_FOR_BITS( uint32, bitAwards_total ) ];
// Custom achievements data
enum { kAchievement_SpreadTheLove_FriendsHuggedCount = 3 };
uint64 ach_SpreadTheLove_FriendsHugged[ kAchievement_SpreadTheLove_FriendsHuggedCount ];
enum { kAchievement_SpeedRunCoop_QualifiedRunsCount = 3 };
uint16 ach_SpeedRunCoop_MapsQualified[ kAchievement_SpeedRunCoop_QualifiedRunsCount ];
// Add a padding for future custom achievements data
uint32 bitsAchievementDataFuture[ 64 ];
// DLC ownership bits
uint32 dlcbits[2];
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData3 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
// struct TitleData3
// {
// uint64 unused; // unused, free for taking
// };
//
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData3 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData3
{
uint32 version;
struct ConVarsSystem_t
{
#define CFG( name, scfgType, cppType, ... ) cppType name;
#include "xlast_portal2/inc_gameconsole_settings_sys.inc"
#undef CFG
uint8 unused_uint8[2];
uint32 unused_values[9];
enum Bits_bitfields_t
{
#define CFG( name ) name,
#include "xlast_portal2/inc_gameconsole_settings_sys_bits.inc"
#undef CFG
bit_last
};
uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
uint32 unused[10];
};
ConVarsSystem_t cvSystem;
struct ConVarsUser_t
{
#define CFG( name, scfgType, cppType ) cppType name;
#include "xlast_portal2/inc_gameconsole_settings_usr.inc"
#undef CFG
uint32 unused_values[8];
enum Bits_bitfields_t
{
#define CFG( name ) name,
#include "xlast_portal2/inc_gameconsole_settings_usr_bits.inc"
#undef CFG
bit_last
};
uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
uint32 unused[10];
};
ConVarsUser_t cvUser;
ConVarsUser_t cvUserSS;
struct GameStats_t
{
#define CFG( name, scfgType, cppType ) cppType name;
#include "xlast_portal2/inc_gamestats.inc"
#undef CFG
uint32 unused_values[50];
};
GameStats_t gamestats;
};
#define PORTAL2_LOBBY_CONFIG_COOP( szNetwork, szAccess ) \
" system { " \
" network " szNetwork " " \
" access " szAccess " " \
" } " \
" game { " \
" mode coop " \
" map default " \
" } "
#define PORTAL2_DLCID_RETAIL_DLC1 ( 1ull << 0x01 )
#define PORTAL2_DLCID_RETAIL_DLC2 ( 1ull << 0x02 )
#define PORTAL2_DLCID_COOP_BOT_SKINS ( 1ull << 0x12 )
#define PORTAL2_DLCID_COOP_BOT_HELMETS ( 1ull << 0x13 )
#define PORTAL2_DLCID_COOP_BOT_ANTENNA ( 1ull << 0x14 )
#define PORTAL2_DLC_ALLMASK ( PORTAL2_DLCID_RETAIL_DLC1 | PORTAL2_DLCID_RETAIL_DLC2 | PORTAL2_DLCID_COOP_BOT_SKINS | PORTAL2_DLCID_COOP_BOT_HELMETS | PORTAL2_DLCID_COOP_BOT_ANTENNA )
#define PORTAL2_DLC_APPID_COOP_BOT_SKINS 651
#define PORTAL2_DLC_APPID_COOP_BOT_HELMETS 652
#define PORTAL2_DLC_APPID_COOP_BOT_ANTENNA 653
#define PORTAL2_DLC_PKGID_COOP_BOT_SKINS 7364
#define PORTAL2_DLC_PKGID_COOP_BOT_HELMETS 7365
#define PORTAL2_DLC_PKGID_COOP_BOT_ANTENNA 7366
#define PORTAL2_DLC_PKGID_PCSTEAMPLAY 7397
#ifdef _WIN32
#pragma warning( pop )
#endif
#endif // IMATCHEXT_PORTAL2_H

View File

@@ -0,0 +1,83 @@
//===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef IMATCHEXT_SWARM_H
#define IMATCHEXT_SWARM_H
#ifdef _WIN32
#pragma once
#endif
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData1 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData1
{
uint64 unused;
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData2 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData2
{
// Achievement Counters
uint8 iCountXxx; // ACHIEVEMENT_XXX
uint8 iCountYyy; // ACHIEVEMENT_YYY
// Achievement Component Bitfields
uint8 iCompXxx; // ACHIEVEMENT_XXX
};
//
//
// WARNING!! WARNING!! WARNING!! WARNING!!
// This structure TitleData3 should remain
// intact after we ship otherwise
// users profiles will be busted.
// You are allowed to add fields at the end
// as long as structure size stays under
// XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
// WARNING!! WARNING!! WARNING!! WARNING!!
//
struct TitleData3
{
uint64 unused; // unused, free for taking
};
abstract_class IMatchExtSwarm
{
public:
// Get server map information for the session settings
virtual KeyValues * GetAllMissions() = 0;
virtual KeyValues * GetMapInfo( KeyValues *pSettings, KeyValues **ppMissionInfo = NULL ) = 0;
virtual KeyValues * GetMapInfoByBspName( KeyValues *pSettings, char const *szBspMapName, KeyValues **ppMissionInfo = NULL ) = 0;
};
#define IMATCHEXT_SWARM_INTERFACE "IMATCHEXT_SWARM_INTERFACE_001"
// #define SWARM_DLC_NUMBER_XXX 20
#endif // IMATCHEXT_L4D_H