dxdw.h

来自「本程序是表现一个草地在天空飞行的情景本程序是系列程序的第五步。」· C头文件 代码 · 共 39 行

H
39
字号

#ifndef _DXDW_H
#define _DXDW_H

#include <ddraw.h>
#include <windows.h>
#include <mmsystem.h>

struct tmpXY
{
	int index;
	int x,y;
};

class DX 
{
private:
	void sortXY(tmpXY *txy);
	RECT tRect(int left,int top,int right,int bottom);
	HRESULT CreateBMP(int width,int height,char* filename,LPDIRECTDRAWSURFACE7 &tsurf);
	void BltMan();
	void BltBack();
	void BltMap();
	void BltTree();
	void Flip();
	void Mapmath(int index,int &tx,int &ty);
public:
	bool keydown;
	void Render(); 
	HRESULT InitDX(HWND thWnd,bool tfullscreen=false);
	HRESULT InitBmp();
	int manindex,rowindex;
	DX();
	~DX();
};



#endif

⌨️ 快捷键说明

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