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

📄 graphics.h

📁 一个类似坦克大战的小小游戏
💻 H
字号:

/**************************************************************************************
	Project  Name			: Map Edit of my game
	Module Name				: Graphics
	File Name				: Graphics.h: interface for the CGraphics class.
	Create					: 2007-7-6, by Vigame
	Update					: 
	Copyright				: 
	Reference				: 
	Abstrct					: This part is used to draw the objects in the game.
 **************************************************************************************/

#if !defined(AFX_GRAPHICS_H__2C025041_813D_4FF1_9FA8_0870E246E0F0__INCLUDED_)
#define AFX_GRAPHICS_H__2C025041_813D_4FF1_9FA8_0870E246E0F0__INCLUDED_

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

#include "myd3d.h"

class CGraphics  
{
public:
	CGraphics();
	virtual ~CGraphics();

public:
	BOOL InitD3D(HWND inhWnd);
	void Release();

//	BOOL CreateSprite();	// Deleted by vigame, 2007-7-9
	LPDIRECT3DDEVICE9 &Getd3dDevice();
	LPD3DXSPRITE &GetSprite();

	// DrawObject() fuction must be used only between BeginScene() and EndScene()
	void DrawObject(LPDIRECT3DTEXTURE9 pTexture,	
			int x, int y, int width, int height, DWORD diffuse);
	
	BOOL BeginScene();
	void EndScene();
	void Render();

public:
	LPD3DXSPRITE m_pSprite;

private:
	LPDIRECT3D9 m_pD3D;
	LPDIRECT3DDEVICE9 m_pd3dDevice;
};

#endif // !defined(AFX_GRAPHICS_H__2C025041_813D_4FF1_9FA8_0870E246E0F0__INCLUDED_)

⌨️ 快捷键说明

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