1 /* ResidualVM - A 3D game interpreter 2 * 3 * ResidualVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the AUTHORS 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef STARK_VISUAL_EFFECTS_EFFECT_H 24 #define STARK_VISUAL_EFFECTS_EFFECT_H 25 26 #include "engines/stark/visual/visual.h" 27 28 #include "common/rect.h" 29 30 #include "graphics/pixelformat.h" 31 32 namespace Graphics { 33 struct Surface; 34 } 35 36 namespace Stark { 37 38 namespace Gfx { 39 class Driver; 40 class SurfaceRenderer; 41 class Texture; 42 } 43 44 /** 45 * A 2D visual effect overlay 46 * 47 * The backing surface is alpha blended on top of the scene 48 */ 49 class VisualEffect : public Visual { 50 public: 51 explicit VisualEffect(VisualType type, const Common::Point &size, Gfx::Driver *gfx); 52 ~VisualEffect() override; 53 54 protected: 55 Gfx::Driver *_gfx; 56 Gfx::SurfaceRenderer *_surfaceRenderer; 57 Gfx::Texture *_texture; 58 Graphics::Surface *_surface; 59 60 uint _timeBetweenTwoUpdates; 61 int _timeRemainingUntilNextUpdate; 62 Common::Point _size; 63 }; 64 65 } // End of namespace Stark 66 67 #endif // STARK_VISUAL_EFFECTS_EFFECT_H 68