HitCheckDemoDlg.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:2k
源码类别:

游戏

开发平台:

Visual C++

  1. // HitCheckDemoDlg.h : header file
  2. //
  3. #if !defined(AFX_HITCHECKDEMODLG_H__B019FFE7_E85E_4D9F_8DF8_DDBE01F76F67__INCLUDED_)
  4. #define AFX_HITCHECKDEMODLG_H__B019FFE7_E85E_4D9F_8DF8_DDBE01F76F67__INCLUDED_
  5. #include "cSurface.h" // Added by ClassView
  6. #include "cHitChecker.h" // Added by ClassView
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CHitCheckDemoDlg dialog
  12. class CHitCheckDemoDlg : public CDialog
  13. {
  14. // Construction
  15. public:
  16. void InitDirectX();
  17. CHitCheckDemoDlg(CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CHitCheckDemoDlg)
  20. enum { IDD = IDD_HITCHECKDEMO_DIALOG };
  21. // NOTE: the ClassWizard will add data members here
  22. //}}AFX_DATA
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CHitCheckDemoDlg)
  25. public:
  26. virtual BOOL PreTranslateMessage(MSG* pMsg);
  27. protected:
  28. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  29. //}}AFX_VIRTUAL
  30. public:
  31. cSurface m_surfShipHitted;
  32. cHitChecker m_hcAsteroid;
  33. CPoint m_pAsteroid3;
  34. CPoint m_pAsteroid2;
  35. CPoint m_pAsteroid1;
  36. cHitChecker m_hcShip;
  37. int m_iIncrement;
  38. CPoint pShipPos;
  39. cSurface m_surfShip;
  40. cSurface m_surfAsteroid;
  41. void DrawAsteroids();
  42. void DrawShip();
  43. BOOL m_bStop;
  44. CWinThread* pUpdateFrame;
  45. LPDIRECTDRAW7 m_pDD;
  46. LPDIRECTDRAWSURFACE7 m_pFrontBuffer;
  47. LPDIRECTDRAWSURFACE7 m_pBackBuffer;
  48. // Implementation
  49. protected:
  50. // DirectX variables
  51. HICON m_hIcon;
  52. // Generated message map functions
  53. //{{AFX_MSG(CHitCheckDemoDlg)
  54. virtual BOOL OnInitDialog();
  55. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  56. afx_msg void OnPaint();
  57. afx_msg HCURSOR OnQueryDragIcon();
  58. afx_msg void OnClose();
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. };
  62. //{{AFX_INSERT_LOCATION}}
  63. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  64. #endif // !defined(AFX_HITCHECKDEMODLG_H__B019FFE7_E85E_4D9F_8DF8_DDBE01F76F67__INCLUDED_)