dxdw.h
来自「本程序适合处学习使用vc++编写游戏的人」· C头文件 代码 · 共 52 行
H
52 行
#ifndef _DXDW_H
#define _DXDW_H
//这个程序就这么一个ddraw.h文件w
#include <ddraw.h>
#include <windows.h>
#include <mmsystem.h>
struct tmpXY
{
int index;
int x,y;
};
struct tmpXYc
{
int index;
int x,y;
int rowindex;
int manindex;
DWORD t1;
DWORD t2;
int DelayT1;
int DelayT2;
};
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 Bltc();
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 + -
显示快捷键?