📄 tericsview.h
字号:
// TericsView.h : interface of the CTericsView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TERICSVIEW_H__7ACBE1AE_FB16_40B4_A3F1_B60514702C7B__INCLUDED_)
#define AFX_TERICSVIEW_H__7ACBE1AE_FB16_40B4_A3F1_B60514702C7B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TericsDoc.h"
class CTericsView : public CView
{
protected: // create from serialization only
CTericsView();
DECLARE_DYNCREATE(CTericsView)
// Attributes
public:
CTericsDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTericsView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
int score;
void DrawPreBlock();
void PreBlock();
void DrawAll();
void DrawCurrent(bool erase);
void DrawOne(int x,int y,bool erase);
int m_level;
void FlashDown();
void right();
void left();
void rotate();
bool down();
void remove();
bool IsOver();
int canvas[12][20];
typedef struct position
{
int x;
int y;
}position;
position posi[4];
position PrePosi[4];
int style;
int PreStyle;
CBitmap bitmap[8];
void NewBlock();
virtual ~CTericsView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
HANDLE hThread;
DWORD ThreadID;
//{{AFX_MSG(CTericsView)
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnNew();
afx_msg void OnLevel1();
afx_msg void OnLevel2();
afx_msg void OnLevel3();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnStop();
afx_msg void OnUpdateLevel1(CCmdUI* pCmdUI);
afx_msg void OnUpdateLevel2(CCmdUI* pCmdUI);
afx_msg void OnUpdateLevel3(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in TericsView.cpp
inline CTericsDoc* CTericsView::GetDocument()
{ return (CTericsDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TERICSVIEW_H__7ACBE1AE_FB16_40B4_A3F1_B60514702C7B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -