diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/updatehint.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/updatehint.h')
| -rw-r--r-- | hammer/updatehint.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/hammer/updatehint.h b/hammer/updatehint.h new file mode 100644 index 0000000..cb238fd --- /dev/null +++ b/hammer/updatehint.h @@ -0,0 +1,61 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef UPDATEHINT_H +#define UPDATEHINT_H +#ifdef _WIN32 +#pragma once +#endif + + + +class CUpdateHint : public CObject +{ + #define MAX_NOTIFY_CODES 16 + + struct NotifyList_t + { + int nCode; + CMapObjectList Objects; + }; + + public: + + CUpdateHint(void) {} + + // + // Called by the code that modifies map objects: + // + inline void PreUpdateObject(CMapClass *pObject); + inline void PreUpdateObjects(CMapObjectList *pObjects); + + inline void PostUpdateObject(CMapClass *pObject, int nNotifyCode); + inline void PostUpdateObjects(CMapObjectList *pObjects, int nNotifyCode); + + inline BoundBox const &GetUpdateRegion(void); + inline void Reset(void); + inline void UpdateBounds(BoundBox &bbox); + + // + // Called by the document when processing an update: + // + inline int GetNotifyCodeCount(void); + inline int GetNotifyCode(int nIndex); + + inline POSITION GetHeadPosition(int nIndex); + inline CMapClass *GetNext(int nIndex, POSITION &pos); + + protected: + + NotifyList_t m_NotifyList[MAX_NOTIFY_CODES]; // Lists of objects with common notification codes. + int m_nListEntries; // Number of items in the notify list. + + BoundBox m_UpdateRegion; // 3D map extents that were affected by the change. +}; + + +#endif // UPDATEHINT_H |