ScummVM API documentation
backbuffer.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  * This file is dual-licensed.
22  * In addition to the GPLv3 license mentioned above, this code is also
23  * licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
24  * full text of the license.
25  *
26  */
27 
28 #ifndef GOB_BACKBUFFER_H
29 #define GOB_BACKBUFFER_H
30 
31 #include "common/system.h"
32 
33 namespace Gob {
34 
35 class Surface;
36 
37 class BackBuffer {
38 public:
39  BackBuffer();
40  ~BackBuffer();
41 
42 protected:
43  void trashBuffer();
44  void resizeBuffer(uint16 width, uint16 height);
45 
46  bool saveScreen (const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
47  bool restoreScreen( Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom);
48 
49  bool hasBuffer() const;
50  bool hasSavedBackground() const;
51 
52 private:
53  Surface *_background;
54  bool _saved;
55 
56  int16 _saveLeft;
57  int16 _saveTop;
58  int16 _saveRight;
59  int16 _saveBottom;
60 };
61 
62 } // End of namespace Gob
63 
64 #endif // GOB_BACKBUFFER_H
Definition: backbuffer.h:37
Definition: anifile.h:40
Definition: surface.h:100