From b3ded48d866f59df3c9e8634eabe6e62596ad2d5 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 21 Dec 2014 08:17:45 +0000 Subject: Popup: changed warning level to w4 git-svn-id: http://svn.miranda-ng.org/main/trunk@11550 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/effects.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'plugins/Popup/src/effects.cpp') 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"); } -- cgit v1.2.3