sprite_object.h
资源名称:hge181.rar [点击查看]
上传用户:jnfxsk
上传日期:2022-06-16
资源大小:3675k
文件大小:1k
源码类别:
游戏引擎
开发平台:
Visual C++
- #ifndef SPRITE_OBJECT_H
- #define SPRITE_OBJECT_H
- #include "gfx_object.h"
- #include "....includehgesprite.h"
- class CSpriteObject : public CGfxObject
- {
- public:
- CSpriteObject(hgeSprite *_spr, char *_name, int _resgroup, bool _owned);
- ~CSpriteObject();
- virtual int GetWidth() const { return spr ? int(spr->GetWidth()) : 0; }
- virtual int GetHeight() const { return spr ? int(spr->GetHeight()) : 0; }
- virtual HTEXTURE GetTexture() { return spr ? spr->GetTexture() : 0; }
- virtual void GetSourcePos(int *_x, int *_y);
- virtual bool SaveDescription(FILE *fp, char *texname);
- private:
- hgeSprite *spr;
- bool owned;
- };
- #endif