diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
commit | ad148587dcf5244c2d2011dba339786c765c54c4 (patch) | |
tree | bdd914121cd326da2ed26679838878e3edffc841 /src/gui/guiAnimatedImage.cpp | |
parent | 1145b05ea0bda87dc0827821385810eced08f774 (diff) | |
download | dragonfireclient-ad148587dcf5244c2d2011dba339786c765c54c4.tar.xz |
Make Lint Happy
Diffstat (limited to 'src/gui/guiAnimatedImage.cpp')
-rw-r--r-- | src/gui/guiAnimatedImage.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/guiAnimatedImage.cpp b/src/gui/guiAnimatedImage.cpp index b1447c45f..d8648111f 100644 --- a/src/gui/guiAnimatedImage.cpp +++ b/src/gui/guiAnimatedImage.cpp @@ -9,13 +9,14 @@ #include <vector> GUIAnimatedImage::GUIAnimatedImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, - s32 id, const core::rect<s32> &rectangle, const std::string &texture_name, - s32 frame_count, s32 frame_duration, ISimpleTextureSource *tsrc) : - gui::IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, rectangle), m_tsrc(tsrc) + s32 id, const core::rect<s32> &rectangle, const std::string &texture_name, + s32 frame_count, s32 frame_duration, ISimpleTextureSource *tsrc) : + gui::IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, rectangle), + m_tsrc(tsrc) { m_texture = m_tsrc->getTexture(texture_name); - m_frame_count = std::max(frame_count, 1); + m_frame_count = std::max(frame_count, 1); m_frame_duration = std::max(frame_duration, 0); if (m_texture != nullptr) { @@ -41,8 +42,10 @@ void GUIAnimatedImage::draw() size.Height /= m_frame_count; draw2DImageFilterScaled(driver, m_texture, AbsoluteRect, - core::rect<s32>(core::position2d<s32>(0, size.Height * m_frame_idx), size), - NoClip ? nullptr : &AbsoluteClippingRect, colors, true); + core::rect<s32>(core::position2d<s32>(0, + size.Height * m_frame_idx), + size), + NoClip ? nullptr : &AbsoluteClippingRect, colors, true); } // Step the animation @@ -64,7 +67,6 @@ void GUIAnimatedImage::draw() } } - void GUIAnimatedImage::setFrameIndex(s32 frame) { s32 idx = std::max(frame, 0); |