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.

81 lines
1.9 KiB

  1. //============ Copyright (c) Valve Corporation, All rights reserved. ============
  2. //
  3. //
  4. //
  5. //===============================================================================
  6. #ifndef IASW_SPAWN_SELECTION_H
  7. #define IASW_SPAWN_SELECTION_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier1/strtools.h"
  12. #include "mathlib/vector.h"
  13. class IASWSpawnDefinitionEntry;
  14. // NOTE: Text version of these enum types is in asw_spawn_selection.cpp!
  15. enum
  16. {
  17. ASW_NPC_SPAWN_TYPE_INVALID = -1,
  18. ASW_NPC_SPAWN_TYPE_ANY = 0,
  19. ASW_NPC_SPAWN_TYPE_FIXED = 1,
  20. ASW_NPC_SPAWN_TYPE_WANDERER,
  21. ASW_NPC_SPAWN_TYPE_SWARM,
  22. ASW_NPC_SPAWN_TYPE_BOSS,
  23. ASW_NPC_SPAWN_TYPE_PROP,
  24. ASW_NPC_SPAWN_TYPE_ARENAWAVE,
  25. ASW_NPC_SPAWN_TYPE_CONSOLE,
  26. ASW_NPC_SPAWN_TYPE_SPAWNER,
  27. ASW_NPC_SPAWN_TYPE_BIFURCATE,
  28. ASW_NPC_SPAWN_TYPE_SPECIAL1,
  29. ASW_NPC_SPAWN_TYPE_SPECIAL2,
  30. // Has to be last.
  31. ASW_NPC_SPAWN_TYPE_COUNT
  32. };
  33. class IASWSpawnDefinitionEntry
  34. {
  35. public:
  36. virtual const char *GetNPCClassname() = 0;
  37. virtual void GetSpawnCountRange( int &nMin, int &nMax ) = 0;
  38. virtual float GetEliteNPCChance( void ) = 0;
  39. virtual bool UseSpawners() = 0;
  40. };
  41. class IASWSpawnDefinition
  42. {
  43. public:
  44. virtual int GetEntryCount() = 0;
  45. virtual IASWSpawnDefinitionEntry *GetEntry( int nEntry ) = 0;
  46. };
  47. class IASWSpawnSelection
  48. {
  49. public:
  50. virtual IASWSpawnDefinition *GetSpawnDefinition( int nSpawnType ) = 0;
  51. virtual bool IsAvailableNPC( const char *szName ) = 0;
  52. virtual void SetCurrentSpawnSet( int iMissionDifficulty ) = 0;
  53. virtual bool SetCurrentSpawnSet( const char *szSetName ) = 0;
  54. virtual void DumpCurrentSpawnSet() = 0;
  55. };
  56. // fixed spawn encounter in the mission
  57. class IASW_Encounter
  58. {
  59. public:
  60. virtual const Vector& GetEncounterPosition() = 0;
  61. virtual int GetNumSpawnDefs() = 0;
  62. virtual IASWSpawnDefinition* GetSpawnDef( int i ) = 0;
  63. virtual float GetEncounterRadius() = 0;
  64. };
  65. #endif // IASW_SPAWN_SELECTION_H