ScummVM API documentation
screen.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 LURE_SCREEN_H
23 #define LURE_SCREEN_H
24 
25 
26 #include "engines/engine.h"
27 #include "lure/luredefs.h"
28 #include "lure/palette.h"
29 #include "lure/disk.h"
30 #include "lure/memory.h"
31 #include "lure/surface.h"
32 
33 namespace Lure {
34 
35 class Screen {
36 private:
37  OSystem &_system;
38  Disk &_disk;
39  Surface *_screen;
40  Palette *_palette;
41 
42  void setSystemPalette(Palette *p, uint16 start, uint16 num);
43 public:
44  Screen(OSystem &system);
45  ~Screen();
46  static Screen &getReference();
47 
48  void setPaletteEmpty(int numEntries = RES_PALETTE_ENTRIES);
49  void setPalette(Palette *p);
50  void setPalette(Palette *p, uint16 start, uint16 num);
51  Palette &getPalette() { return *_palette; }
52  void paletteFadeIn(Palette *p);
53  void paletteFadeOut(int numEntries = RES_PALETTE_ENTRIES);
54  void resetPalette();
55  void empty();
56  void update();
57  void updateArea(uint16 x, uint16 y, uint16 w, uint16 h);
58 
59  Surface &screen() { return *_screen; }
60  uint8 *screen_raw() { return _screen->data().data(); }
61  uint8 *pixel_raw(uint16 x, uint16 y) { return screen_raw() + (y * FULL_SCREEN_WIDTH) + x; }
62 };
63 
64 } // End of namespace Lure
65 
66 #endif
Definition: palette.h:33
Definition: screen.h:35
Definition: disk.h:42
Definition: animseq.h:27
Definition: system.h:161
Definition: surface.h:35