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.

56 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: The application object.
  4. //
  5. //=============================================================================//
  6. #ifndef IHAMMER_H
  7. #define IHAMMER_H
  8. #include "appframework/IAppSystem.h"
  9. typedef struct tagMSG MSG;
  10. class IStudioDataCache;
  11. //-----------------------------------------------------------------------------
  12. // Return values for RequestNewConfig
  13. //-----------------------------------------------------------------------------
  14. enum RequestRetval_t
  15. {
  16. REQUEST_OK = 0,
  17. REQUEST_QUIT
  18. };
  19. //-----------------------------------------------------------------------------
  20. // Interface used to drive hammer
  21. //-----------------------------------------------------------------------------
  22. #define INTERFACEVERSION_HAMMER "Hammer001"
  23. class IHammer : public IAppSystem
  24. {
  25. public:
  26. virtual bool HammerPreTranslateMessage( MSG * pMsg ) = 0;
  27. virtual bool HammerIsIdleMessage( MSG * pMsg ) = 0;
  28. virtual bool HammerOnIdle( long count ) = 0;
  29. virtual void RunFrame() = 0;
  30. // Returns the mod and the game to initially start up
  31. virtual const char *GetDefaultMod() = 0;
  32. virtual const char *GetDefaultGame() = 0;
  33. virtual bool InitSessionGameConfig( const char *szGameDir ) = 0;
  34. // Request a new config from hammer's config system
  35. virtual RequestRetval_t RequestNewConfig() = 0;
  36. // Returns the full path to the mod and the game to initially start up
  37. virtual const char *GetDefaultModFullPath() = 0;
  38. virtual int MainLoop() = 0;
  39. };
  40. #endif // IHAMMER_H