ScummVM API documentation
graphics_effect.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef GRAPHICS_EFFECT_H_INCLUDED
23 #define GRAPHICS_EFFECT_H_INCLUDED
24 
25 #include "common/rect.h"
26 #include "common/list.h"
27 #include "graphics/surface.h"
28 
29 #include "zvision/zvision.h"
30 
31 namespace ZVision {
32 
33 class ZVision;
34 
36 public:
37 
38  GraphicsEffect(ZVision *engine, uint32 key, Common::Rect region, bool ported) : _engine(engine), _key(key), _region(region), _ported(ported) {
39  _surface.create(_region.width(), _region.height(), _engine->_resourcePixelFormat);
40  }
41  virtual ~GraphicsEffect() {}
42 
43  uint32 getKey() {
44  return _key;
45  }
46 
47  Common::Rect getRegion() {
48  return _region;
49  }
50 
51  bool isPort() {
52  return _ported;
53  }
54 
55  virtual const Graphics::Surface *draw(const Graphics::Surface &srcSubRect) {
56  return &_surface;
57  }
58 
59  virtual void update() {}
60 
61 protected:
62  ZVision *_engine;
63  uint32 _key;
64  Common::Rect _region;
65  bool _ported;
66  Graphics::Surface _surface;
67 
68 // Static member functions
69 public:
70 
71 };
72 
73 struct EffectMapUnit {
74  uint32 count;
75  bool inEffect;
76 };
77 
79 
80 } // End of namespace ZVision
81 
82 #endif // GRAPHICS_EFFECT_H_INCLUDED
Definition: surface.h:67
Definition: list.h:44
Definition: rect.h:144
Definition: graphics_effect.h:35
Definition: clock.h:29
int16 width() const
Definition: rect.h:191
Definition: graphics_effect.h:73
void create(int16 width, int16 height, const PixelFormat &format)
int16 height() const
Definition: rect.h:192