?? surface.h
字號:
#ifndef SURFACE_H
#define SURFACE_H
#include <ddraw.h>
/////////////////////////////////////////////////////////////////
//DDraw離屏頁面類
/////////////////////////////////////////////////////////////////
class Surface
{
public:
void CreateNight();
void FreeSurface();
void Init();
Surface();
Surface( Surface &surf );
Surface &operator = ( Surface &surf );
virtual ~Surface();
bool CreateImageSurface( char *szFileName, bool isSysMemory, bool isColorKey, DWORD ColorKey );
bool CreateNullSurface( int iw, int ih, bool isSysMemory, bool isColorKey, DWORD ColorKey );
bool CreateBmpSurface( char *szFileName, bool isSysMemory, bool isColorKey, DWORD ColorKey );
bool OnCreateSurface( bool isSysMemory, bool isColorKey );
bool GetWH( int *pWidth, int *pHeight );
bool CreateCopySurface();
void Surface::DrawAlphaShadow( int x, int y );
void DrawSurface( int x, int y, RECT *pRect );
void DrawNight( int x, int y, RECT *pRect );
void DrawAutoClip( int x, int y );
void DrawAlphaMMX( int x, int y );
void BltTo( int destX, int destY, Surface *pDestSurf, RECT *rcSrc );
void WriteText( const char *szText, int TextLen, int x, int y, DWORD Color );
void SetSurfaceColorKey( DWORD ColorKey );
int GetWidth(){return m_iWidth;}
int GetHeight(){return m_iHeight;}
bool IsEmpty() { return m_lpDDSurface == NULL; }
bool IsColorKey() {return m_ColorKeyType == DDBLTFAST_SRCCOLORKEY;}
bool Restore();
bool CopySurface( Surface * psurf );
bool CopySurfaceToBmp( char *szBmpName, RECT *pRect );
LPDIRECTDRAWSURFACE7 m_lpDDSurface;
LPDIRECTDRAWSURFACE7 m_lpDDSurfaceCopy;
private:
DWORD m_ColorKeyType; //透明色種類
int m_iWidth, m_iHeight;
static HDC g_hdc;
static HFONT g_hFont;
static RECT g_TextRect;
};
#endif // !defined(AFX_SURFACE_H__1119098C_1750_4105_8F44_5DDF2DCCDC6C__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -