Go to the documentation of this file.
137 void draw(
const Point& dest,
float scaleFactor,
int layer,
int xPattern,
int yPattern,
int zPattern,
int animationPhase,
int reDrawFlags =
Otc::ReDrawThing,
LightView* lightView =
nullptr);
147 int getExactSize(
int layer = 0,
int xPattern = 0,
int yPattern = 0,
int zPattern = 0,
int animationPhase = 0);
223 bool hasTexture()
const {
return !m_textures.empty(); }
225 static Size getBestTextureDimension(
int w,
int h,
int count);
226 uint getSpriteIndex(
int w,
int h,
int l,
int x,
int y,
int z,
int a);
227 uint getTextureIndex(
int l,
int x,
int y,
int z);
235 Point m_displacement;
238 int m_animationPhases;
241 int m_numPatternX, m_numPatternY, m_numPatternZ;
246 std::string m_customImage;
248 std::vector<int> m_spritesIndex;
249 std::vector<TexturePtr> m_textures;
250 std::vector<std::vector<Rect>> m_texturesFramesRects;
251 std::vector<std::vector<Rect>> m_texturesFramesOriginRects;
252 std::vector<std::vector<Point>> m_texturesFramesOffsets;
254 uint_fast8_t m_countPainterListeningRef;
@ ThingAttrNoMoveAnimation
bool cancelListenerPainter()
void startListenerPainter(float duration)
void unserializeOtml(const OTMLNodePtr &node)
MarketData getMarketData()
void serialize(const FileStreamPtr &fin)
bool hasAttr(ThingAttr attr)
const TexturePtr & getTexture(int animationPhase)
void unserialize(uint16 clientId, ThingCategory category, const FileStreamPtr &fin)
bool has(const Key &k) const
std::vector< int > getSprites()
T get(const Key &k) const
AnimatorPtr getAnimator()
AnimatorPtr getIdleAnimator()
void exportImage(const std::string &fileName)
@ ThingAttrBlockProjectile
void setPathable(bool var)
ThingCategory getCategory()
void draw(const Point &dest, float scaleFactor, int layer, int xPattern, int yPattern, int zPattern, int animationPhase, int reDrawFlags=Otc::ReDrawThing, LightView *lightView=nullptr)
LuaObject, all script-able classes have it as base.
@ ThingAttrFluidContainer
@ ThingAttrNotPreWalkable
int getExactSize(int layer=0, int xPattern=0, int yPattern=0, int zPattern=0, int animationPhase=0)