summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/effects.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-21 08:17:45 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-21 08:17:45 +0000
commitb3ded48d866f59df3c9e8634eabe6e62596ad2d5 (patch)
treea7a9f2cdd1a9846b7445e8ec6babbecee79c8c0b /plugins/Popup/src/effects.cpp
parentb2ba573600e650273800774c7fad23268019a353 (diff)
Popup: changed warning level to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11550 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/effects.cpp')
-rw-r--r--plugins/Popup/src/effects.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/Popup/src/effects.cpp b/plugins/Popup/src/effects.cpp
index 1d1b329af9..88b680a009 100644
--- a/plugins/Popup/src/effects.cpp
+++ b/plugins/Popup/src/effects.cpp
@@ -2,9 +2,9 @@
Popup Plus plugin for Miranda IM
Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+© 2004-2007 Victor Pavlychko
+© 2010 MPK
+© 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class MyTestEffect;
-class MyTestEffect: public IPopupPlusEffect
+class MyTestEffect : public IPopupPlusEffect
{
protected:
int w, h;
@@ -48,11 +48,12 @@ public:
virtual void beginFrame(int frame)
{
this->frame = frame;
- stage = (frame*2 > frameCount) ? 1 : 0;
+ stage = (frame * 2 > frameCount) ? 1 : 0;
if (stage == 0)
{
alpha = alpha0 + (alpha1 - alpha0) * frame * 2 / frameCount;
- } else
+ }
+ else
{
alpha = alpha0 + (alpha1 - alpha0) * (frame * 2 - frameCount) / frameCount;
}
@@ -61,11 +62,12 @@ public:
{
if (stage == 0)
{
- if ((x/16+y/16) % 2) return alpha0;
+ if ((x / 16 + y / 16) % 2) return alpha0;
return alpha;
- } else
+ }
+ else
{
- if ((x/16+y/16) % 2) return alpha;
+ if ((x / 16 + y / 16) % 2) return alpha;
return alpha1;
}
}
@@ -79,6 +81,6 @@ static INT_PTR svcCreateEffect_MyTestEffect(WPARAM, LPARAM) { return (INT_PTR)(n
void PopupEfectsInitialize()
{
CreateServiceFunction(MS_POPUP_CREATEVFX LPGEN("Square fading"), svcCreateEffect_MyTestEffect);
-
+
CallService(MS_POPUP_REGISTERVFX, 0, (LPARAM)"Square fading");
}