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.

66 lines
2.7 KiB

  1. //============ Copyright (c) Valve Corporation, All rights reserved. ============
  2. //
  3. // Interface to the runtime map (VMF) building class
  4. //
  5. //===============================================================================
  6. #ifndef IASW_MAP_BUILDER_H
  7. #define IASW_MAP_BUILDER_H
  8. #if defined( COMPILER_MSVC )
  9. #pragma once
  10. #endif
  11. class KeyValues;
  12. class IASW_Map_Builder
  13. {
  14. public:
  15. //-----------------------------------------------------------------------------
  16. // Ticks the map builder and updates progress.
  17. //-----------------------------------------------------------------------------
  18. virtual void Update( float flEngineTime ) = 0;
  19. // @TODO: clean up these entrypoints to be more consistent. It's confusing
  20. // and convoluted right now because of the sheer number of different ways
  21. // to build a map.
  22. //-----------------------------------------------------------------------------
  23. // Schedules the random generation and BSP build of a map from its description
  24. // or a pre-defined layout file.
  25. //-----------------------------------------------------------------------------
  26. virtual void ScheduleMapGeneration(
  27. const char *pMapName,
  28. float flTime,
  29. KeyValues *pMissionSettings,
  30. KeyValues *pMissionDefinition ) = 0;
  31. //-----------------------------------------------------------------------------
  32. // Schedules the VMF export and BSP build of a .layout file.
  33. //-----------------------------------------------------------------------------
  34. virtual void ScheduleMapBuild(
  35. const char *pMapName,
  36. const float flTime ) = 0;
  37. //-----------------------------------------------------------------------------
  38. // Gets a map build progress value in the range [0.0f, 1.0f] inclusive.
  39. //-----------------------------------------------------------------------------
  40. virtual float GetProgress() = 0;
  41. //-----------------------------------------------------------------------------
  42. // Gets a string which describes the current status of the map builder.
  43. //-----------------------------------------------------------------------------
  44. virtual const char *GetStatusMessage() = 0;
  45. //-----------------------------------------------------------------------------
  46. // Gets the name of the map being currently built.
  47. //-----------------------------------------------------------------------------
  48. virtual const char *GetMapName() = 0;
  49. //-----------------------------------------------------------------------------
  50. // Gets a value indicating whether a map build is scheduled or in progress.
  51. //-----------------------------------------------------------------------------
  52. virtual bool IsBuildingMission() = 0;
  53. };
  54. #endif // IASW_MAP_BUILDER_H