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.

56 lines
1.4 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef MAPGROUP_H
  7. #define MAPGROUP_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "MapDefs.h"
  12. #include "MapClass.h"
  13. class CMapGroup : public CMapClass
  14. {
  15. public:
  16. DECLARE_MAPCLASS(CMapGroup,CMapClass)
  17. CMapGroup() : m_vecLogicalPosition(COORD_NOTINIT, COORD_NOTINIT) {}
  18. const char* GetDescription(void);
  19. virtual CMapClass *Copy(bool bUpdateDependencies);
  20. virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
  21. virtual bool IsGroup(void) const { return true; }
  22. // Groups have to be treated as logical because they potentially have logical children
  23. virtual bool IsLogical(void) { return true; }
  24. virtual bool IsVisibleLogical(void) { return IsVisible(); }
  25. void AddChild(CMapClass *pChild);
  26. void AddVisGroup(CVisGroup *pVisGroup);
  27. // NOTE: Logical position is in global space
  28. virtual void SetLogicalPosition( const Vector2D &vecPosition );
  29. virtual const Vector2D& GetLogicalPosition( );
  30. virtual void GetRenderLogicalBox( Vector2D &mins, Vector2D &maxs );
  31. //
  32. // Serialization.
  33. //
  34. ChunkFileResult_t LoadVMF(CChunkFile *pFile);
  35. ChunkFileResult_t SaveVMF(CChunkFile *pFile, CSaveInfo *pSaveInfo);
  36. Vector2D m_vecLogicalPosition; // Position in logical space
  37. };
  38. typedef CUtlVector<CMapGroup *> CMapGroupList;
  39. #endif // MAPGROUP_H