summaryrefslogtreecommitdiff
path: root/hammer/mapgroup.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/mapgroup.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'hammer/mapgroup.h')
-rw-r--r--hammer/mapgroup.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/hammer/mapgroup.h b/hammer/mapgroup.h
new file mode 100644
index 0000000..4a36266
--- /dev/null
+++ b/hammer/mapgroup.h
@@ -0,0 +1,56 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//===========================================================================//
+
+#ifndef MAPGROUP_H
+#define MAPGROUP_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "MapDefs.h"
+#include "MapClass.h"
+
+
+class CMapGroup : public CMapClass
+{
+ public:
+ DECLARE_MAPCLASS(CMapGroup,CMapClass)
+
+ CMapGroup() : m_vecLogicalPosition(COORD_NOTINIT, COORD_NOTINIT) {}
+
+ const char* GetDescription(void);
+
+ virtual CMapClass *Copy(bool bUpdateDependencies);
+ virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
+
+ virtual bool IsGroup(void) { return true; }
+
+ // Groups have to be treated as logical because they potentially have logical children
+ virtual bool IsLogical(void) { return true; }
+ virtual bool IsVisibleLogical(void) { return IsVisible(); }
+
+ void AddChild(CMapClass *pChild);
+ void AddVisGroup(CVisGroup *pVisGroup);
+
+ // NOTE: Logical position is in global space
+ virtual void SetLogicalPosition( const Vector2D &vecPosition );
+ virtual const Vector2D& GetLogicalPosition( );
+ virtual void GetRenderLogicalBox( Vector2D &mins, Vector2D &maxs );
+
+ //
+ // Serialization.
+ //
+ ChunkFileResult_t LoadVMF(CChunkFile *pFile);
+ ChunkFileResult_t SaveVMF(CChunkFile *pFile, CSaveInfo *pSaveInfo);
+
+ Vector2D m_vecLogicalPosition; // Position in logical space
+};
+
+
+typedef CUtlVector<CMapGroup *> CMapGroupList;
+
+
+#endif // MAPGROUP_H