diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:05:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:05:24 +0000 |
commit | 8d1e74202626993f8966ec09731f521f24024a7c (patch) | |
tree | a1b205b5d34541b1a0da77f6f5faf7654d8fd40e /plugins/SmileyAdd/src/anim.cpp | |
parent | 4d23915ea7824ad36f5ea2acce8adda234c26de1 (diff) |
- custom bkstring class removed
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6852 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src/anim.cpp')
-rw-r--r-- | plugins/SmileyAdd/src/anim.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
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;
}
|