From 8d1e74202626993f8966ec09731f521f24024a7c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Nov 2013 10:05:24 +0000 Subject: - custom bkstring class removed - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6852 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/anim.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'plugins/SmileyAdd/src/anim.cpp') diff --git a/plugins/SmileyAdd/src/anim.cpp b/plugins/SmileyAdd/src/anim.cpp index 0fbf663346..d84afa5bab 100644 --- a/plugins/SmileyAdd/src/anim.cpp +++ b/plugins/SmileyAdd/src/anim.cpp @@ -38,8 +38,7 @@ void Animate::StartAnimation(void) { m_img = m_sml->CreateCachedImage(); - if (m_img && m_img->IsAnimated()) - { + if (m_img && m_img->IsAnimated()) { m_img->SelectFrame(m_nFramePosition); long frtm = m_img->GetFrameDelay(); m_counter = frtm / 10 + ((frtm % 10) >= 5); @@ -49,8 +48,7 @@ void Animate::StartAnimation(void) void Animate::ProcessTimerTick(HWND hwnd) { - if (m_running && m_img->IsAnimated() && --m_counter <= 0) - { + if (m_running && m_img->IsAnimated() && --m_counter <= 0) { m_nFramePosition = m_img->SelectNextFrame(m_nFramePosition); long frtm = m_img->GetFrameDelay(); @@ -82,8 +80,7 @@ void Animate::DrawFrame(HDC hdc) void Animate::Draw(HDC hdc) { - if (m_running) - { + if (m_running) { m_img->Draw(hdc, m_cliprect, m_clip); if (m_sel) @@ -102,16 +99,14 @@ void Animate::SetOffset(int off, int wsize) m_offset = off; m_running = m_cliprect.top >= 0 && m_cliprect.top < wsize; - if (m_running) - { - if (m_img == NULL) - { + if (m_running) { + if (m_img == NULL) { StartAnimation(); - if (m_img == NULL) m_running = false; + if (m_img == NULL) + m_running = false; } } - else - { + else { if (m_img) m_img->Release(); m_img = NULL; } @@ -120,8 +115,7 @@ void Animate::SetOffset(int off, int wsize) void Animate::SetSel(int x, int y) { - m_sel = x >= m_cliprect.left && x < m_cliprect.right && - y >= m_cliprect.top && y < m_cliprect.bottom; + m_sel = x >= m_cliprect.left && x < m_cliprect.right && y >= m_cliprect.top && y < m_cliprect.bottom; } -- cgit v1.2.3