From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/gui/guiAnimatedImage.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/gui/guiAnimatedImage.cpp') diff --git a/src/gui/guiAnimatedImage.cpp b/src/gui/guiAnimatedImage.cpp index d8648111f..b1447c45f 100644 --- a/src/gui/guiAnimatedImage.cpp +++ b/src/gui/guiAnimatedImage.cpp @@ -9,14 +9,13 @@ #include GUIAnimatedImage::GUIAnimatedImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, - s32 id, const core::rect &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 &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) { @@ -42,10 +41,8 @@ void GUIAnimatedImage::draw() size.Height /= m_frame_count; draw2DImageFilterScaled(driver, m_texture, AbsoluteRect, - core::rect(core::position2d(0, - size.Height * m_frame_idx), - size), - NoClip ? nullptr : &AbsoluteClippingRect, colors, true); + core::rect(core::position2d(0, size.Height * m_frame_idx), size), + NoClip ? nullptr : &AbsoluteClippingRect, colors, true); } // Step the animation @@ -67,6 +64,7 @@ void GUIAnimatedImage::draw() } } + void GUIAnimatedImage::setFrameIndex(s32 frame) { s32 idx = std::max(frame, 0); -- cgit v1.2.3