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

📄 bitmap.h

📁 经典游戏超级玛丽的C++实现
💻 H
字号:
//-----------------------------------------------------------------------------
//
// Copyright (C) July 24, 2000 by Zhang Yong
// Email: z-meng@yeah.net
// This source is available for distribution and/or modification
// only under the terms of the GPL license.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// FITNESS FOR A PARTICULAR PURPOSE. See the GPL.txt for more details.
//
//-----------------------------------------------------------------------------

#ifndef _BITMAP_H
#define _BITMAP_H

#ifdef _WIN32
#include <ddraw.h>
#else
#include "type.h"
#endif


class CBitmap
{
public:
	CBitmap();
	~CBitmap(){ Release(); }

	void Release();
	void Restore( char *filename );
	BOOL Load( char *filename );
	void SetColorKey();
	void Draw( int x, int y, RECT &rc );
	
private:

#ifdef _WIN32
	LPDIRECTDRAWSURFACE m_pdds;
#else
	int	m_width, m_height;
	BYTE *m_bits;
#endif
};


#endif

⌨️ 快捷键说明

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