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.

270 lines
7.2 KiB

  1. //===== Copyright c 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef IMATCHEXT_PORTAL2_H
  8. #define IMATCHEXT_PORTAL2_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 ) / ( 8* sizeof( aStorageType ) ) )
  15. //
  16. //
  17. // WARNING!! WARNING!! WARNING!! WARNING!!
  18. // This structure TitleData1 should remain
  19. // intact after we ship otherwise
  20. // users profiles will be busted.
  21. // You are allowed to add fields at the end
  22. // as long as structure size stays under
  23. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  24. // WARNING!! WARNING!! WARNING!! WARNING!!
  25. //
  26. struct TitleData1
  27. {
  28. uint32 uiSinglePlayerProgressChapter;
  29. struct CoopData_t
  30. {
  31. enum MapBits_t
  32. {
  33. #define CFG( fieldname, ctx, idx, num ) fieldname,
  34. #define CFG_DISABLED( fieldname, ctx, idx, num ) CFG( fieldname )
  35. #include "xlast_portal2/inc_coop_maps.inc"
  36. #undef CFG_DISABLED
  37. #undef CFG
  38. mapbits_last_bit_used,
  39. mapbits_total_basegame = 42,
  40. mapbits_total = 160 // leave room for total 160 maps
  41. };
  42. uint32 mapbits[ STORAGE_COUNT_FOR_BITS( uint32, mapbits_total ) ];
  43. enum TauntBits_t
  44. {
  45. #define CFG( fieldname ) taunt_##fieldname,
  46. #define CFG_DISABLED( fieldname ) CFG( fieldname )
  47. #include "xlast_portal2/inc_coop_taunts.inc"
  48. #undef CFG_DISABLED
  49. #undef CFG
  50. tauntbits_last_bit_used,
  51. tauntbits_total = 48 // leave room for total 48 taunts
  52. };
  53. uint32 tauntbitsOwned[ STORAGE_COUNT_FOR_BITS( uint32, tauntbits_total ) ];
  54. uint32 tauntbitsUsed[ STORAGE_COUNT_FOR_BITS( uint32, tauntbits_total ) ];
  55. enum TauntEquipSlots_t
  56. {
  57. #define CFG( fieldname ) taunt_equipslot_##fieldname,
  58. #define CFG_DISABLED( fieldname ) CFG( fieldname )
  59. #include "xlast_portal2/inc_coop_taunts_equipslots.inc"
  60. #undef CFG_DISABLED
  61. #undef CFG
  62. taunt_equipslots_total
  63. };
  64. uint8 tauntsEquipSlots[taunt_equipslots_total];
  65. };
  66. CoopData_t coop;
  67. struct GameInstructorData_t
  68. {
  69. enum LessonsBits_t
  70. {
  71. #define CFG( fieldname ) lesson_##fieldname,
  72. #define CFG_DISABLED( fieldname ) CFG( fieldname )
  73. #include "xlast_portal2/inc_gameinstructor_lessons.inc"
  74. #undef CFG_DISABLED
  75. #undef CFG
  76. lessonbits_last_bit_used,
  77. lessonbits_total = 48 // leave room for total 48 lessons
  78. };
  79. union LessonInfo_t
  80. {
  81. uint8 u8dummy;
  82. struct
  83. {
  84. uint8 display : 4;
  85. uint8 success : 4;
  86. };
  87. } lessoninfo[ lessonbits_total ];
  88. };
  89. GameInstructorData_t gameinstructor;
  90. };
  91. //
  92. //
  93. // WARNING!! WARNING!! WARNING!! WARNING!!
  94. // This structure TitleData2 should remain
  95. // intact after we ship otherwise
  96. // users profiles will be busted.
  97. // You are allowed to add fields at the end
  98. // as long as structure size stays under
  99. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  100. // WARNING!! WARNING!! WARNING!! WARNING!!
  101. //
  102. struct TitleData2
  103. {
  104. // Achievement component bits
  105. enum AchievementBits_t
  106. {
  107. kAchievementComponentTotalCount = 0
  108. #define CFG( name, compcount, ... ) \
  109. + STORAGE_COUNT_FOR_BITS( uint32, compcount )
  110. #include "xlast_portal2/inc_achievements.inc"
  111. #undef CFG
  112. };
  113. uint32 bitsAchievementsComponents[ kAchievementComponentTotalCount ];
  114. // Add a padding for future progress achievement bits
  115. uint32 bitsAchievementFuture[ 64 ];
  116. // Awards bitfields
  117. enum AwardBits_t
  118. {
  119. #define CFG( award, ... ) bitAward##award,
  120. #include "xlast_portal2/inc_asset_awards.inc"
  121. #undef CFG
  122. bitAward_last_bit_used,
  123. bitAwards_total = 32 // leave room for total 32 awards
  124. };
  125. uint32 awardbits[ STORAGE_COUNT_FOR_BITS( uint32, bitAwards_total ) ];
  126. // Custom achievements data
  127. enum { kAchievement_SpreadTheLove_FriendsHuggedCount = 3 };
  128. uint64 ach_SpreadTheLove_FriendsHugged[ kAchievement_SpreadTheLove_FriendsHuggedCount ];
  129. enum { kAchievement_SpeedRunCoop_QualifiedRunsCount = 3 };
  130. uint16 ach_SpeedRunCoop_MapsQualified[ kAchievement_SpeedRunCoop_QualifiedRunsCount ];
  131. // Add a padding for future custom achievements data
  132. uint32 bitsAchievementDataFuture[ 64 ];
  133. // DLC ownership bits
  134. uint32 dlcbits[2];
  135. };
  136. //
  137. //
  138. // WARNING!! WARNING!! WARNING!! WARNING!!
  139. // This structure TitleData3 should remain
  140. // intact after we ship otherwise
  141. // users profiles will be busted.
  142. // You are allowed to add fields at the end
  143. // as long as structure size stays under
  144. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  145. // WARNING!! WARNING!! WARNING!! WARNING!!
  146. //
  147. // struct TitleData3
  148. // {
  149. // uint64 unused; // unused, free for taking
  150. // };
  151. //
  152. //
  153. //
  154. // WARNING!! WARNING!! WARNING!! WARNING!!
  155. // This structure TitleData3 should remain
  156. // intact after we ship otherwise
  157. // users profiles will be busted.
  158. // You are allowed to add fields at the end
  159. // as long as structure size stays under
  160. // XPROFILE_SETTING_MAX_SIZE = 1000 bytes.
  161. // WARNING!! WARNING!! WARNING!! WARNING!!
  162. //
  163. struct TitleData3
  164. {
  165. uint32 version;
  166. struct ConVarsSystem_t
  167. {
  168. #define CFG( name, scfgType, cppType, ... ) cppType name;
  169. #include "xlast_portal2/inc_gameconsole_settings_sys.inc"
  170. #undef CFG
  171. uint8 unused_uint8[2];
  172. uint32 unused_values[9];
  173. enum Bits_bitfields_t
  174. {
  175. #define CFG( name ) name,
  176. #include "xlast_portal2/inc_gameconsole_settings_sys_bits.inc"
  177. #undef CFG
  178. bit_last
  179. };
  180. uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
  181. uint32 unused[10];
  182. };
  183. ConVarsSystem_t cvSystem;
  184. struct ConVarsUser_t
  185. {
  186. #define CFG( name, scfgType, cppType ) cppType name;
  187. #include "xlast_portal2/inc_gameconsole_settings_usr.inc"
  188. #undef CFG
  189. uint32 unused_values[8];
  190. enum Bits_bitfields_t
  191. {
  192. #define CFG( name ) name,
  193. #include "xlast_portal2/inc_gameconsole_settings_usr_bits.inc"
  194. #undef CFG
  195. bit_last
  196. };
  197. uint32 bitfields[ STORAGE_COUNT_FOR_BITS( uint32, bit_last ) ];
  198. uint32 unused[10];
  199. };
  200. ConVarsUser_t cvUser;
  201. ConVarsUser_t cvUserSS;
  202. struct GameStats_t
  203. {
  204. #define CFG( name, scfgType, cppType ) cppType name;
  205. #include "xlast_portal2/inc_gamestats.inc"
  206. #undef CFG
  207. uint32 unused_values[50];
  208. };
  209. GameStats_t gamestats;
  210. };
  211. #define PORTAL2_LOBBY_CONFIG_COOP( szNetwork, szAccess ) \
  212. " system { " \
  213. " network " szNetwork " " \
  214. " access " szAccess " " \
  215. " } " \
  216. " game { " \
  217. " mode coop " \
  218. " map default " \
  219. " } "
  220. #define PORTAL2_DLCID_RETAIL_DLC1 ( 1ull << 0x01 )
  221. #define PORTAL2_DLCID_RETAIL_DLC2 ( 1ull << 0x02 )
  222. #define PORTAL2_DLCID_COOP_BOT_SKINS ( 1ull << 0x12 )
  223. #define PORTAL2_DLCID_COOP_BOT_HELMETS ( 1ull << 0x13 )
  224. #define PORTAL2_DLCID_COOP_BOT_ANTENNA ( 1ull << 0x14 )
  225. #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 )
  226. #define PORTAL2_DLC_APPID_COOP_BOT_SKINS 651
  227. #define PORTAL2_DLC_APPID_COOP_BOT_HELMETS 652
  228. #define PORTAL2_DLC_APPID_COOP_BOT_ANTENNA 653
  229. #define PORTAL2_DLC_PKGID_COOP_BOT_SKINS 7364
  230. #define PORTAL2_DLC_PKGID_COOP_BOT_HELMETS 7365
  231. #define PORTAL2_DLC_PKGID_COOP_BOT_ANTENNA 7366
  232. #define PORTAL2_DLC_PKGID_PCSTEAMPLAY 7397
  233. #ifdef _WIN32
  234. #pragma warning( pop )
  235. #endif
  236. #endif // IMATCHEXT_PORTAL2_H