Initial
This commit is contained in:
71
pop/SPRITE.HPP
Normal file
71
pop/SPRITE.HPP
Normal file
@@ -0,0 +1,71 @@
|
||||
#ifndef _SPRITE_PURESPRITE_HPP_
|
||||
#define _SPRITE_PURESPRITE_HPP_
|
||||
#ifndef _COMMON_WINDOW_HPP_
|
||||
#include <common/window.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_POINT_HPP_
|
||||
#include <common/point.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_PUREBITMAP_HPP_
|
||||
#include <common/purebmp.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BITMAP_HPP_
|
||||
#include <common/bitmap.hpp>
|
||||
#endif
|
||||
|
||||
class PureSprite
|
||||
{
|
||||
public:
|
||||
PureSprite(void);
|
||||
virtual ~PureSprite();
|
||||
void moveSprite(const Point &newPos);
|
||||
void setDevice(PureDevice &pureDevice);
|
||||
void width(WORD width);
|
||||
WORD width(void)const;
|
||||
void height(WORD height);
|
||||
WORD height(void)const;
|
||||
protected:
|
||||
virtual operator PureBitmap&(void);
|
||||
private:
|
||||
Point mPrevPoint;
|
||||
PureDevice mDisplayDevice;
|
||||
PureBitmap mBitmapBkGnd;
|
||||
PureBitmap mBitmapNothing;
|
||||
WORD mWidth;
|
||||
WORD mHeight;
|
||||
};
|
||||
|
||||
inline
|
||||
void PureSprite::setDevice(PureDevice &pureDevice)
|
||||
{
|
||||
mDisplayDevice=pureDevice;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureSprite::width(WORD width)
|
||||
{
|
||||
mWidth=width;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PureSprite::width(void)const
|
||||
{
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureSprite::height(WORD height)
|
||||
{
|
||||
mHeight=height;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PureSprite::height(void)const
|
||||
{
|
||||
return mHeight;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user