⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screen.h

📁 俄罗斯方块,适于sdk初学者参考学习
💻 H
字号:
//screen.h
//screen 类支持游戏的显示

#if !defined(AFX_SCREEN_H__17DE89E2_E929_4C7C_A31B_FE514F7F8711__INCLUDED_)
#define AFX_SCREEN_H__17DE89E2_E929_4C7C_A31B_FE514F7F8711__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "diamond.h"
#include "draw.h"

class screen  
{
public:
	screen(int left,int top,int width,int height,int scalewidth,int scaleheight,HWND hwnd,HDC memdc,int backcolor);
	virtual ~screen();
    void clear();
    void refresh(const map &,int top,int bottom);
    
	int width() const{ return m_width;};
	int height() const{ return m_height;};
    int scalewidth() const{return m_scalewidth;};
	int scaleheight() const{return m_scaleheight;};
    int getleft() const{return m_left;};
	int gettop() const{return m_top;};
    
	int drawdiamond(const diamond &thediamond);
	int drawfreezediamond(const diamond &thediamond);
	int cleardiamond(const diamond &thediamond);
    void drawdiamondoperate(int x,int y,int color);

	
private:
	draw   *m_draw;
	HWND   m_hwnd;
	HDC    m_memdc;
	int    m_left;
	int    m_top;
	int    m_width;
	int    m_height;
	int    m_scalewidth;
	int    m_scaleheight;
	int    m_unitwidth;
	int    m_unitheight;
    int    m_backcolor;
};

#endif // !defined(AFX_SCREEN_H__17DE89E2_E929_4C7C_A31B_FE514F7F8711__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -