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.

86 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=============================================================================
  4. #ifndef ITEMTESTAPP_H
  5. #define ITEMTESTAPP_H
  6. #if COMPILER_MSVC
  7. #pragma once
  8. #endif
  9. // Valve includes
  10. #include "appframework/tier3app.h"
  11. //-----------------------------------------------------------------------------
  12. // Forward declarations
  13. //-----------------------------------------------------------------------------
  14. class CAsset;
  15. //=============================================================================
  16. //
  17. //=============================================================================
  18. class CItemTestApp : public CTier3SteamApp
  19. {
  20. typedef CTier3SteamApp BaseClass;
  21. public:
  22. // Methods of IApplication
  23. virtual bool PreInit();
  24. virtual void Destroy() {}
  25. virtual void PostShutdown();
  26. static void PrintHelp();
  27. protected:
  28. enum Flags_t // Should match up to s_pszFlags
  29. {
  30. kHelp,
  31. kSteamId,
  32. kBatch,
  33. kClass,
  34. kName,
  35. kDev,
  36. kNoP4,
  37. kAutoSkin,
  38. kLod,
  39. kListMats,
  40. kMat,
  41. kMatType,
  42. kTex,
  43. kTexType,
  44. kAlphaType,
  45. kView,
  46. kExplore,
  47. kOutput,
  48. kFlagsCount // For compile time assert
  49. };
  50. static void DoDevMode();
  51. static bool ProcessCommandLine( CAsset *pAsset, bool bDoListMats );
  52. static int FindParam( Flags_t nFlag );
  53. static const char *ParmValue( Flags_t nFlag );
  54. static const char *GetParm( int nIndex );
  55. private:
  56. enum FlagData_t
  57. {
  58. kShortFlag,
  59. kLongFlag,
  60. kArgDesc,
  61. kFlagDesc
  62. };
  63. static char s_szName[];
  64. static char s_szDesc[];
  65. static char s_szExample[];
  66. static char *s_pszFlags[][4];
  67. };
  68. #endif // ITEMTESTAPP_H