diff options
Diffstat (limited to 'plugins/Popup/src/effects.cpp')
-rw-r--r-- | plugins/Popup/src/effects.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/Popup/src/effects.cpp b/plugins/Popup/src/effects.cpp index 88b680a009..c0c6763ab3 100644 --- a/plugins/Popup/src/effects.cpp +++ b/plugins/Popup/src/effects.cpp @@ -50,24 +50,20 @@ public: this->frame = frame;
stage = (frame * 2 > frameCount) ? 1 : 0;
if (stage == 0)
- {
alpha = alpha0 + (alpha1 - alpha0) * frame * 2 / frameCount;
- }
else
- {
alpha = alpha0 + (alpha1 - alpha0) * (frame * 2 - frameCount) / frameCount;
- }
}
virtual int getPixelAlpha(int x, int y)
{
- if (stage == 0)
- {
- if ((x / 16 + y / 16) % 2) return alpha0;
+ if (stage == 0) {
+ if ((x / 16 + y / 16) % 2)
+ return alpha0;
return alpha;
}
- else
- {
- if ((x / 16 + y / 16) % 2) return alpha;
+ else {
+ if ((x / 16 + y / 16) % 2)
+ return alpha;
return alpha1;
}
}
|