Team Fortress 2 Source Code as on 22/4/2020
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.

80 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: languages definition
  4. //
  5. //=============================================================================
  6. #include "SourceAppInfo.h"
  7. #include "tier0/dbg.h"
  8. struct SourceAppInfo_t
  9. {
  10. const char *m_pchFullName;
  11. const char *m_pchModName;
  12. int m_nSteamAppId;
  13. ESourceApp m_ESourceApp;
  14. };
  15. static const SourceAppInfo_t s_SteamAppInfo[] =
  16. {
  17. { "Source SDK Base", "sourcetest", 215, k_App_SDK_BASE },
  18. { "Half-Life 2", "hl2", 220, k_App_HL2 } ,
  19. { "Counter-Strike: Source", "cstrike", 240, k_App_CSS } ,
  20. { "Day of Defeat: Source", "dod", 300, k_App_DODS } ,
  21. { "Half-Life 2: Deathmatch", "hl2mp", 320, k_App_HL2MP } ,
  22. { "Half-Life 2: Lost Coast", "lostcoast", 340, k_App_LOST_COAST } ,
  23. { "Half-Life Deathmatch: Source", "hl1mp", 360, k_App_HL1DM } ,
  24. { "Half-Life 2: Episode One", "episodic", 380, k_App_HL2_EP1 },
  25. { "Portal", "portal", 400, k_App_PORTAL } ,
  26. { "Half-Life 2: Episode Two", "ep2", 420, k_App_HL2_EP2 } ,
  27. { "Team Fortress 2", "tf", 440, k_App_TF2 } ,
  28. };
  29. //-----------------------------------------------------------------------------
  30. // Purpose: return the short string name used for this language by SteamUI
  31. //-----------------------------------------------------------------------------
  32. const char *GetAppFullName( ESourceApp eSourceApp )
  33. {
  34. Assert( Q_ARRAYSIZE(s_SteamAppInfo) == k_App_MAX );
  35. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  36. {
  37. return s_SteamAppInfo[ eSourceApp ].m_pchFullName;
  38. }
  39. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  40. return s_SteamAppInfo[0].m_pchFullName;
  41. }
  42. //-----------------------------------------------------------------------------
  43. // Purpose: return the short string name used for this language by SteamUI
  44. //-----------------------------------------------------------------------------
  45. const char *GetAppModName( ESourceApp eSourceApp )
  46. {
  47. Assert( Q_ARRAYSIZE(s_SteamAppInfo) == k_App_MAX );
  48. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  49. {
  50. return s_SteamAppInfo[ eSourceApp ].m_pchModName;
  51. }
  52. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  53. return s_SteamAppInfo[0].m_pchModName;
  54. }
  55. //-----------------------------------------------------------------------------
  56. // Purpose: return the short string name used for this language by SteamUI
  57. //-----------------------------------------------------------------------------
  58. const int GetAppSteamAppId( ESourceApp eSourceApp )
  59. {
  60. Assert( Q_ARRAYSIZE(s_SteamAppInfo) == k_App_MAX );
  61. if ( s_SteamAppInfo[ eSourceApp ].m_ESourceApp == eSourceApp )
  62. {
  63. return s_SteamAppInfo[ eSourceApp ].m_nSteamAppId;
  64. }
  65. Assert( !"enum ESourceApp order mismatched from AppInfo_t s_SteamAppInfo, fix it!" );
  66. return s_SteamAppInfo[0].m_nSteamAppId;
  67. }