CamWnd.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. #if !defined(AFX_CAMWND_H__44B4BA03_781B_11D1_B53C_00AA00A410FC__INCLUDED_)
  19. #define AFX_CAMWND_H__44B4BA03_781B_11D1_B53C_00AA00A410FC__INCLUDED_
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif // _MSC_VER >= 1000
  23. // CamWnd.h : header file
  24. //
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CCamWnd window
  27. class CXYWnd;
  28. class CCamWnd : public CWnd
  29. {
  30. DECLARE_DYNCREATE(CCamWnd);
  31. // Construction
  32. public:
  33. CCamWnd();
  34. // Attributes
  35. public:
  36. // Operations
  37. public:
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CCamWnd)
  41. protected:
  42. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. public:
  46. void ShiftTexture_BrushPrimit(face_t *f, int x, int y);
  47. void ReInitGL();
  48. void BenchMark();
  49. CXYWnd* m_pXYFriend;
  50. void SetXYFriend(CXYWnd* pWnd);
  51. virtual ~CCamWnd();
  52. camera_t& Camera(){return m_Camera;};
  53. void Cam_MouseControl(float dtime);
  54. void Cam_ChangeFloor(qboolean up);
  55. protected:
  56. void Cam_Init();
  57. void Cam_BuildMatrix();
  58. void Cam_PositionDrag();
  59. void Cam_MouseDown(int x, int y, int buttons);
  60. void Cam_MouseUp (int x, int y, int buttons);
  61. void Cam_MouseMoved (int x, int y, int buttons);
  62. void InitCull();
  63. qboolean CullBrush (brush_t *b);
  64. void Cam_Draw();
  65. brush_t* m_TransBrushes[MAX_MAP_BRUSHES];
  66. int m_nNumTransBrushes;
  67. camera_t m_Camera;
  68. int m_nCambuttonstate;
  69. CPoint m_ptButton;
  70. CPoint m_ptCursor;
  71. CPoint m_ptLastCursor;
  72. face_t* m_pSide_select;
  73. vec3_t m_vCull1;
  74. vec3_t m_vCull2;
  75. int m_nCullv1[3];
  76. int m_nCullv2[3];
  77. bool m_bClipMode;
  78. // Generated message map functions
  79. protected:
  80. void OriginalMouseDown(UINT nFlags, CPoint point);
  81. void OriginalMouseUp(UINT nFlags, CPoint point);
  82. //{{AFX_MSG(CCamWnd)
  83. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  84. afx_msg void OnPaint();
  85. afx_msg void OnDestroy();
  86. afx_msg void OnClose();
  87. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  88. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  89. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  90. afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
  91. afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
  92. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  93. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  94. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  95. afx_msg void OnSize(UINT nType, int cx, int cy);
  96. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  97. //}}AFX_MSG
  98. DECLARE_MESSAGE_MAP()
  99. };
  100. /////////////////////////////////////////////////////////////////////////////
  101. //{{AFX_INSERT_LOCATION}}
  102. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  103. #endif // !defined(AFX_CAMWND_H__44B4BA03_781B_11D1_B53C_00AA00A410FC__INCLUDED_)