DUDEVIEW.H
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:3k
源码类别:
游戏
开发平台:
Visual C++
- // dudeView.h : interface of the DudeView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #include <glgl.h>
- #include "glglu.h"
- #include "launch.h"
- enum KeyControl
- {
- V1,
- V2,
- V3,
- V4,
- V5,
- V6,
- V7,
- V8,
- V9,
- V0,
- FOWARD,
- BACK,
- LEFT,
- RIGHT,
- HIT,
- BLOCK,
- NOKEYHIT
- };
- extern KeyControl keyboardcontrol;
- class DudeView : public CView
- {
- protected: // create from serialization only
- DudeView();
- DECLARE_DYNCREATE(DudeView)
- // Attributes
- public:
- DudeDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(DudeView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
- virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
- protected:
- virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
- virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
- virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
- virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
- virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
- //}}AFX_VIRTUAL
- void LaunchGame();
- // Implementation
- public:
- virtual ~DudeView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- //{{AFX_MSG(DudeView)
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDestroy();
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnNewGame();
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- float m_fRadius;
- CPalette m_cPalette;
- CRect m_oldRect;
- CClientDC *m_pDC;
- BOOL bSetupPixelFormat();
- void SetupLogicalPalette();
- unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift);
- private:
- HDC hdc;
- };
- #ifndef _DEBUG // debug version in dudeView.cpp
- inline DudeDoc* DudeView::GetDocument()
- { return (DudeDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////