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.

92 lines
3.3 KiB

  1. //====== Copyright � 1996-2004, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: languages definition
  4. //
  5. //=============================================================================
  6. #include "SourceAppInfo.h"
  7. #include "tier0/dbg.h"
  8. // NOTE: This has to be the last file included!
  9. #include "tier0/memdbgon.h"
  10. struct SourceAppInfo_t
  11. {
  12. char *m_pchFullName;
  13. char *m_pchModName;
  14. int m_nSteamAppId;
  15. ESourceApp m_ESourceApp;
  16. };
  17. static SourceAppInfo_t s_SteamAppInfo[] =
  18. {
  19. { "Source SDK Base", "sourcetest", 215, k_App_SDK_BASE },
  20. { "Half-Life 2", "hl2", 220, k_App_HL2 } ,
  21. { "Counter-Strike: Source", "cstrike", 240, k_App_CSS } ,
  22. { "Day of Defeat: Source", "dod", 300, k_App_DODS } ,
  23. { "Half-Life 2: Deathmatch", "hl2mp", 320, k_App_HL2MP } ,
  24. { "Half-Life 2: Lost Coast", "lostcoast", 340, k_App_LOST_COAST } ,
  25. { "Half-Life Deathmatch: Source", "hl1mp", 360, k_App_HL1DM } ,
  26. { "Half-Life 2: Episode One", "episodic", 380, k_App_HL2_EP1 },
  27. { "Portal", "portal", 400, k_App_PORTAL } ,
  28. { "Half-Life 2: Episode Two", "ep2", 420, k_App_HL2_EP2 } ,
  29. { "Team Fortress 2", "tf", 440, k_App_TF2 } ,
  30. #ifdef _DEMO
  31. { "Left 4 Dead Demo", "left4dead", 530, k_App_L4D } ,
  32. #else
  33. { "Left 4 Dead", "left4dead", 500, k_App_L4D } ,
  34. #endif
  35. { "Portal 2", "portal2", 620, k_App_PORTAL2 } ,
  36. { "Counter-Strike: Global Offensive Dev", "csgo", 710, k_App_CSS15_DEV } ,
  37. { "Counter-Strike: Global Offensive", "csgo", 730, k_App_CSS15 } ,
  38. };
  39. //-----------------------------------------------------------------------------
  40. // Purpose: return the short string name used for this language by SteamUI
  41. //-----------------------------------------------------------------------------
  42. const char *GetAppFullName( ESourceApp eSourceApp )
  43. {
  44. Assert( Q_ARRAYSIZE(s_SteamAppInfo) == k_App_MAX );
  45. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  46. {
  47. return s_SteamAppInfo[ eSourceApp ].m_pchFullName;
  48. }
  49. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  50. return s_SteamAppInfo[0].m_pchFullName;
  51. }
  52. //-----------------------------------------------------------------------------
  53. // Purpose: return the short string name used for this language by SteamUI
  54. //-----------------------------------------------------------------------------
  55. const char *GetAppModName( ESourceApp eSourceApp )
  56. {
  57. Assert( Q_ARRAYSIZE(s_SteamAppInfo) >= k_App_MAX ); // the last entry is duplicated
  58. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  59. {
  60. return s_SteamAppInfo[ eSourceApp ].m_pchModName;
  61. }
  62. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  63. return s_SteamAppInfo[0].m_pchModName;
  64. }
  65. //-----------------------------------------------------------------------------
  66. // Purpose: return the short string name used for this language by SteamUI
  67. //-----------------------------------------------------------------------------
  68. const int GetAppSteamAppId( ESourceApp eSourceApp )
  69. {
  70. Assert( Q_ARRAYSIZE( s_SteamAppInfo ) >= k_App_MAX ); // the last entry is duplicated
  71. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  72. {
  73. return s_SteamAppInfo[ eSourceApp ].m_nSteamAppId;
  74. }
  75. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  76. return s_SteamAppInfo[0].m_nSteamAppId;
  77. }