HitCheckDemoDlg.h
上传用户:taoyan1984
上传日期:2010-03-01
资源大小:30k
文件大小: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_xIncrement;
  38. int m_yIncrement;
  39. CPoint pShipPos;
  40. cSurface m_surfShip;
  41. cSurface m_surfAsteroid;
  42. void DrawAsteroids();
  43. void DrawShip();
  44. BOOL m_bStop;
  45. CWinThread* pUpdateFrame;
  46. LPDIRECTDRAW7 m_pDD;
  47. LPDIRECTDRAWSURFACE7 m_pFrontBuffer;
  48. LPDIRECTDRAWSURFACE7 m_pBackBuffer;
  49. // Implementation
  50. protected:
  51. // DirectX variables
  52. HICON m_hIcon;
  53. // Generated message map functions
  54. //{{AFX_MSG(CHitCheckDemoDlg)
  55. virtual BOOL OnInitDialog();
  56. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  57. afx_msg void OnPaint();
  58. afx_msg HCURSOR OnQueryDragIcon();
  59. afx_msg void OnClose();
  60. virtual void OnCancel();
  61. virtual void OnOK();
  62. //}}AFX_MSG
  63. DECLARE_MESSAGE_MAP()
  64. };
  65. //{{AFX_INSERT_LOCATION}}
  66. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  67. #endif // !defined(AFX_HITCHECKDEMODLG_H__B019FFE7_E85E_4D9F_8DF8_DDBE01F76F67__INCLUDED_)