Team Fortress 2 Source Code as on 22/4/2020
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.

73 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef MAPVIEW2D_H
  8. #define MAPVIEW2D_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "MapView2DBase.h"
  13. #include "tier1/utlvector.h"
  14. class CMapInstance;
  15. class CMapView2D : public CMapView2DBase
  16. {
  17. protected:
  18. CMapView2D(); // protected constructor used by dynamic creation
  19. virtual ~CMapView2D();
  20. DECLARE_DYNCREATE(CMapView2D)
  21. virtual bool IsLogical() { return false; }
  22. virtual void OnRenderListDirty();
  23. void RenderInstance( CMapInstance *pInstanceClass, CMapClass *pMapClass, Vector &InstanceOrigin, QAngle &InstanceAngles );
  24. private:
  25. void DrawPointFile( CRender2D *pRender );
  26. void AddToRenderLists( CMapClass *pObject );
  27. void Render();
  28. void SetDrawType( DrawType_t drawType );
  29. virtual void ActivateView( bool bActivate );
  30. bool UpdateRenderObjects();
  31. void DrawCullingCircleHelper2D( CRender2D *pRender );
  32. void RenderInstanceMapClass_r( CMapClass *pObject );
  33. // general variables:
  34. bool m_bLastActiveView; // is this the last active view?
  35. CUtlVector<CMapClass *> m_RenderList; // list of current rendered objects
  36. bool m_bUpdateRenderObjects; // if true, update render list on next draw
  37. // Overrides
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(CMapView2D)
  40. protected:
  41. virtual void OnInitialUpdate(); // first time after construct
  42. afx_msg void OnView2dxy();
  43. afx_msg void OnView2dyz();
  44. afx_msg void OnView2dxz();
  45. afx_msg void OnUpdateEditSelection(CCmdUI *pCmdUI);
  46. afx_msg BOOL OnToolsAlign(UINT nID);
  47. afx_msg BOOL OnFlip(UINT nID);
  48. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  49. //}}AFX_MSG
  50. DECLARE_MESSAGE_MAP()
  51. };
  52. inline bool CMapView2D::UpdateRenderObjects()
  53. {
  54. return m_bUpdateRenderObjects;
  55. }
  56. #endif // MAPVIEW2D_H