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 VOYEUR_GRAPHICS_H
23#define VOYEUR_GRAPHICS_H
24
25#include "common/scummsys.h"
26#include "common/array.h"
27#include "common/rect.h"
28#include "common/serializer.h"
29#include "graphics/screen.h"
30
31namespace Voyeur {
32
33#define SCREEN_WIDTH 320
34#define SCREEN_HEIGHT 200
35
36class VoyeurEngine;
37class Screen;
38class DisplayResource;
39class PictureResource;
40class ViewPortResource;
41class ViewPortListResource;
42class FontResource;
43class FontInfoResource;
44class CMapResource;
45
46class DrawInfo {
47public:
48 int _penColor;
49 Common::Point _pos;
50public:
51 DrawInfo(int penColor, const Common::Point &pos);
52};
53
54typedef void (Screen::*ScreenMethodPtr)();
55typedef void (Screen::*ViewPortSetupPtr)(ViewPortResource *);
56typedef void (Screen::*ViewPortAddPtr)(ViewPortResource *, int idx, const Common::Rect &bounds);
57typedef void (Screen::*ViewPortRestorePtr)(ViewPortResource *);
58
59class Screen: public Graphics::Screen {
60public:
61 byte _VGAColors[Graphics::PALETTE_SIZE];
62 PictureResource *_backgroundPage;
63 int _SVGAMode;
64 ViewPortListResource *_viewPortListPtr;
65 ViewPortResource *_vPort;
66 bool _saveBack;
67 Common::Rect *_clipPtr;
68 uint _planeSelect;
69 CMapResource *_backColors;
70 FontInfoResource *_fontPtr;
71 PictureResource *_fontChar;
72 DrawInfo *_drawPtr;
73 DrawInfo _defaultDrawInfo;
74private:
75 VoyeurEngine *_vm;
76
77 void restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount,
78 PictureResource *srcPic, PictureResource *destPic);
79public:
81 ~Screen() override;
82
83 void sInitGraphics();
84
85 void setupMCGASaveRect(ViewPortResource *viewPort);
86 void addRectOptSaveRect(ViewPortResource *viewPort, int idx, const Common::Rect &bounds);
87 void restoreMCGASaveRect(ViewPortResource *viewPort);
88 void addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds);
89
90 void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &initialOffset);
91 void fillPic(DisplayResource *display, byte onOff);
92 void sDisplayPic(PictureResource *pic);
93 void drawANumber(DisplayResource *display, int num, const Common::Point &pt);
94 void flipPage();
95 void setPalette(const byte *palette, int start, int count);
96 void setPalette128(const byte *palette, int start, int count);
97 void resetPalette();
98 void setColor(int idx, byte r, byte g, byte b);
99 void setOneColor(int idx, byte r, byte g, byte b);
100 void setColors(int start, int count, const byte *pal);
101 void screenReset();
102 void fadeDownICF1(int steps);
103 void fadeUpICF1(int steps = 0);
104 void fadeDownICF(int steps);
105 void drawDot();
106
111};
112
113} // End of namespace Voyeur
114
115#endif /* VOYEUR_GRAPHICS_H */
Definition: serializer.h:80
Definition: screen.h:47
Definition: files.h:421
Definition: files.h:249
Definition: screen.h:46
Definition: files.h:395
Definition: files.h:279
Definition: screen.h:59
void synchronize(Common::Serializer &s)
Definition: files.h:368
Definition: files.h:319
Definition: voyeur.h:78
Definition: animation.h:38
Definition: rect.h:144
Definition: rect.h:536
Definition: atari-screen.h:58