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.

61 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef UPDATEHINT_H
  8. #define UPDATEHINT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class CUpdateHint : public CObject
  13. {
  14. #define MAX_NOTIFY_CODES 16
  15. struct NotifyList_t
  16. {
  17. int nCode;
  18. CMapObjectList Objects;
  19. };
  20. public:
  21. CUpdateHint(void) {}
  22. //
  23. // Called by the code that modifies map objects:
  24. //
  25. inline void PreUpdateObject(CMapClass *pObject);
  26. inline void PreUpdateObjects(CMapObjectList *pObjects);
  27. inline void PostUpdateObject(CMapClass *pObject, int nNotifyCode);
  28. inline void PostUpdateObjects(CMapObjectList *pObjects, int nNotifyCode);
  29. inline BoundBox const &GetUpdateRegion(void);
  30. inline void Reset(void);
  31. inline void UpdateBounds(BoundBox &bbox);
  32. //
  33. // Called by the document when processing an update:
  34. //
  35. inline int GetNotifyCodeCount(void);
  36. inline int GetNotifyCode(int nIndex);
  37. inline POSITION GetHeadPosition(int nIndex);
  38. inline CMapClass *GetNext(int nIndex, POSITION &pos);
  39. protected:
  40. NotifyList_t m_NotifyList[MAX_NOTIFY_CODES]; // Lists of objects with common notification codes.
  41. int m_nListEntries; // Number of items in the notify list.
  42. BoundBox m_UpdateRegion; // 3D map extents that were affected by the change.
  43. };
  44. #endif // UPDATEHINT_H