Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

262 lines
6.1 KiB

  1. //===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef IMATCHEXT_CSTRIKE15_H
  8. #define IMATCHEXT_CSTRIKE15_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #pragma warning( push )
  12. #pragma warning( disable : 4201 )
  13. #endif
  14. #define STORAGE_COUNT_FOR_BITS( aStorageType, numBits ) ( ( (numBits) + 8*sizeof( aStorageType ) - 1 ) / sizeof( aStorageType ) )
  15. // Matchmaking data for CSS1.5
  16. #define MM_AVG_CONST 100.0f
  17. // MatchmakingDataMode
  18. // We keep seperate matchmaking data for a different kinds of types. Types that
  19. // aren't specific to certain game play rules (like gungame progressive) should
  20. // use the general type.
  21. enum MatchmakingDataType
  22. {
  23. MMDATA_TYPE_GENERAL = 0,
  24. MMDATA_TYPE_GGPROGRESSIVE,
  25. MMDATA_TYPE_COUNT,
  26. };
  27. // MatchmakingDataScope
  28. // There are two kinds of scope for each MatchmakingDataType: Lifetime and Round.
  29. // Lifetime is the user's liifetime matchmaking values serialized to/from the user's
  30. // profile.
  31. // Round is the user's current values accumulated during the current round of game
  32. // play. At the end of the round, the Round values are aggregated with the lifetime
  33. // values according to the formulas specified in the MatchSystem resource file.
  34. enum MatchmakingDataScope
  35. {
  36. MMDATA_SCOPE_LIFETIME = 0,
  37. MMDATA_SCOPE_ROUND,
  38. MMDATA_SCOPE_COUNT,
  39. };
  40. #define MATCHMAKINGDATA_FIELD(name) short name [MMDATA_TYPE_COUNT][MMDATA_SCOPE_COUNT];
  41. // MatchmakingData
  42. // This is the data structure used for matchmaking. Any fields addsed to this structure
  43. // need to be added to all of the appropriate areas where we calculate averages and
  44. // serialize this data.
  45. struct MatchmakingData
  46. {
  47. MATCHMAKINGDATA_FIELD(mContribution);
  48. MATCHMAKINGDATA_FIELD(mMVPs);
  49. MATCHMAKINGDATA_FIELD(mKills);
  50. MATCHMAKINGDATA_FIELD(mDeaths);
  51. MATCHMAKINGDATA_FIELD(mHeadShots);
  52. MATCHMAKINGDATA_FIELD(mDamage);
  53. MATCHMAKINGDATA_FIELD(mShotsFired);
  54. MATCHMAKINGDATA_FIELD(mShotsHit);
  55. MATCHMAKINGDATA_FIELD(mDominations);
  56. MATCHMAKINGDATA_FIELD(mRoundsPlayed);
  57. };
  58. #undef MATCHMAKINGDATA_FIELD
  59. struct PlayerELOBracketInfo_t
  60. {
  61. uint8 m_DisplayBracket : 4; // Bracket displayed to the user for this game mode / input device combo
  62. uint8 m_PreviousBracket : 4; // Bracket we are qualified for based on the last elo change (used in settling code)
  63. uint8 m_NumGamesInBracket; // Count of rounds played in the current bracket (used in settling code).
  64. };
  65. //
  66. //
  67. // WARNING!! WARNING!! WARNING!! WARNING!!
  68. // This structure TitleData1 should remain
  69. // intact after we ship otherwise
  70. // users profiles will be busted.
  71. // You are allowed to add fields at the end
  72. // as long as structure size stays under
  73. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  74. // WARNING!! WARNING!! WARNING!! WARNING!!
  75. //
  76. struct TitleData1
  77. {
  78. uint16 versionNumber;
  79. struct usrStats_t
  80. {
  81. };
  82. usrStats_t usrStats;
  83. };
  84. //
  85. //
  86. // WARNING!! WARNING!! WARNING!! WARNING!!
  87. // This structure TitleData2 should remain
  88. // intact after we ship otherwise
  89. // users profiles will be busted.
  90. // You are allowed to add fields at the end
  91. // as long as structure size stays under
  92. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  93. // WARNING!! WARNING!! WARNING!! WARNING!!
  94. //
  95. struct TitleData2
  96. {
  97. // CSMedalsAwarded: bool for isAchieved
  98. // CSMedalsMedalInfo: if awarded, unlocktime; if not awarded, count
  99. // avoid struct to avoid wasting space with alignment issues
  100. uint16 versionNumber;
  101. };
  102. //
  103. // WARNING!! WARNING!! WARNING!! WARNING!!
  104. // This structure TitleData3 should remain
  105. // intact after we ship otherwise
  106. // users profiles will be busted.
  107. // You are allowed to add fields at the end
  108. // as long as structure size stays under
  109. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  110. // WARNING!! WARNING!! WARNING!! WARNING!!
  111. //
  112. struct TitleData3
  113. {
  114. uint32 version;
  115. uint16 versionNumber;
  116. struct ConVarsSystem_t
  117. {
  118. uint32 unused_values[10];
  119. // enum Bits_bitfields_t
  120. // {
  121. //#define CFG( name ) name,
  122. //#include "xlast_csgo/inc_gameconsole_settings_sys_bits.inc"
  123. //#undef CFG
  124. // bit_last
  125. // };
  126. // uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
  127. //uint32 unused[10];
  128. };
  129. ConVarsSystem_t cvSystem;
  130. struct ConVarsUser_t
  131. {
  132. #if defined( _PS3 )
  133. // Two other sets of button bindings.
  134. struct MoveBindings_t
  135. {
  136. #include "xlast_csgo/inc_gameconsole_device_specific_settings_usr.inc"
  137. };
  138. MoveBindings_t PSMove;
  139. struct SharpShooterBindings_t
  140. {
  141. #include "xlast_csgo/inc_gameconsole_device_specific_settings_usr.inc"
  142. };
  143. SharpShooterBindings_t SharpShooter;
  144. #endif // _PS3
  145. #undef CFG
  146. //uint32 unused_values[10];
  147. // enum Bits_bitfields_t
  148. // {
  149. //#define CFG( name ) name,
  150. //#include "xlast_csgo/inc_gameconsole_settings_usr_bits.inc"
  151. //#undef CFG
  152. // bit_last
  153. // };
  154. // uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
  155. //uint32 unused[10];
  156. };
  157. ConVarsUser_t cvUser;
  158. ConVarsUser_t cvUserSS;
  159. struct JoystickBindings_t
  160. {
  161. #if defined( _PS3 )
  162. // Keyboard bindings.
  163. #include "xlast_csgo/inc_ps3_key_bindings_usr.inc"
  164. // Two other sets of button bindings.
  165. struct MoveBindings_t
  166. {
  167. #include "xlast_csgo/inc_bindings_usr.inc"
  168. };
  169. MoveBindings_t PSMove;
  170. struct SharpShooterBindings_t
  171. {
  172. #include "xlast_csgo/inc_bindings_usr.inc"
  173. };
  174. SharpShooterBindings_t SharpShooter;
  175. #endif
  176. #undef BINDING
  177. #undef ACTION
  178. };
  179. JoystickBindings_t JoystickBindings;
  180. struct GameInstructorData_t
  181. {
  182. enum LessonsBits_t
  183. {
  184. lessonbits_last_bit_used,
  185. lessonbits_total = 48 // leave room for total 48 lessons
  186. };
  187. union LessonInfo_t
  188. {
  189. uint8 u8dummy;
  190. struct
  191. {
  192. uint8 display : 4;
  193. uint8 success : 4;
  194. };
  195. } lessoninfo[ lessonbits_total ];
  196. };
  197. GameInstructorData_t gameinstructor;
  198. //we are using an array so we can pack this info as tight as possible to fit into the 1K block
  199. #if defined( LOCAL_ELO_DATA )
  200. // array of player skill rankings
  201. PlayerELORank_t playerRankingsData[ ELOTitleData360::TOTAL_NUM_ELO_RANKS_STORED ];
  202. PlayerELOBracketInfo_t EloBracketInfo[ ELOTitleData::NUM_GAME_MODES_ELO_RANKED ];
  203. #endif
  204. struct usrMMData_t
  205. {
  206. };
  207. usrMMData_t usrMMData;
  208. };
  209. #ifdef _WIN32
  210. #pragma warning( pop )
  211. #endif
  212. #endif // IMATCHEXT_CSTRIKE15_H