📄 tileset.h
字号:
// TileSet.h: interface for the CTileSet class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_)
#define AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GDICanvas.h"
#include "DDFuncs.h"
//tileset information structure
struct TILEINFO
{
RECT rcSrc;//source rectangle
POINT ptAnchor;//anchoring point
RECT rcDstExt;//destination extent
};
class CTileSet
{
private:
//number of tiles in tileset
DWORD dwTileCount;
//tile array
TILEINFO* ptiTileList;
//filename from which to reload
LPSTR lpszReload;
//offscreen plain directdrawsurface7
LPDIRECTDRAWSURFACE7 lpddsTileSet;
public:
//constructor
CTileSet();
//destructor
~CTileSet();
//load(initializer)
void Load(LPDIRECTDRAW7 lpdd,LPSTR lpszLoad);
//reload(restore)
void Reload();
//unload(uninitializer)
void Unload();
//get number of tiles
DWORD GetTileCount();
//get tile list
TILEINFO* GetTileList();
//get surface
LPDIRECTDRAWSURFACE7 GetDDS();
//retrieve filename
LPSTR GetFileName();
//blit a tile
void PutTile(LPDIRECTDRAWSURFACE7 lpddsDst,int xDst,int yDst,int iTileNum);
//blit a tile with clipping
void ClipTile(LPDIRECTDRAWSURFACE7 lpddsDst,RECT* prcClip,int xDst,int yDst,int iTileNum);
};
#endif // !defined(AFX_TILESET_H__793CAFA2_45E3_11D4_A1EE_B431B7F27368__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -