cSprite.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- // CMAIN LIB - APPLICATION AND DIRECT WRAPPER
- //
- // Written by Mauricio Teichmann Ritter
- //
- // Copyright (C) 2002, Brazil. All rights reserved.
- //
- //
- // cSprite.h: interface for the cSprite class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CSPRITE_H__23B9C198_6F61_4BC9_8310_3A96FFF29974__INCLUDED_)
- #define AFX_CSPRITE_H__23B9C198_6F61_4BC9_8310_3A96FFF29974__INCLUDED_
- #include "cSurface.h" // Added by ClassView
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class cSprite
- {
- public:
- void Rewind();
- BOOL IsBegin();
- BOOL IsEnd();
- int m_iSpriteHeight;
- int m_iSpriteWidth;
- void Previous();
- void Next();
- int m_iRows;
- int m_iCols;
- int m_iAbsolutePosition;
- BOOL Create(HINSTANCE hInst, UINT nResource, int iTileWidth, int iTileHeight, COLORREF dwColorKey, int iSpriteWidth,int iSpriteHeight);
- BOOL Draw(LPDIRECTDRAWSURFACE7 lpDest, int iDestX, int iDestY, BOOL bAdvance = TRUE, int iSrcX=0, int iSrcY=0, int iWidth = -1, int iHeight = -1);
- void Destroy();
- cSurface m_surfTile;
- cSprite();
- virtual ~cSprite();
- };
- #endif // !defined(AFX_CSPRITE_H__23B9C198_6F61_4BC9_8310_3A96FFF29974__INCLUDED_)