ScummVM API documentation
screens.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 TWINE_RENDERER_SCREENS_H
23#define TWINE_RENDERER_SCREENS_H
24
25#include "common/scummsys.h"
26#include "graphics/managed_surface.h"
27#include "graphics/palette.h"
28#include "graphics/surface.h"
29#include "twine/twine.h"
30
31namespace TwinE {
32
33class TwinEEngine;
34class Screens {
35private:
36 TwinEEngine *_engine;
37
46 void fadePal(uint8 r, uint8 g, uint8 b, const Graphics::Palette &palette, int32 intensity);
47
48public:
49 Screens(TwinEEngine *engine) : _engine(engine) {}
50
51 int32 mapLba2Palette(int32 palIndex);
52
55
58 Graphics::Palette _palettePcx{0};
59
61 bool _flagBlackPal = false;
62
64 bool _flagFade = false;
65
67 bool _flagPalettePcx = false;
68
71
76 void loadCustomPalette(const TwineResource &resource);
77
79 void loadMenuImage(bool fadeIn = true);
80
87 void loadImage(TwineImage image, bool fadeIn = true);
88
96 bool loadImageDelay(TwineImage image, int32 seconds);
97
98 bool loadBitmapDelay(const char *image, int32 seconds);
99
105 void fadePalToPal(const Graphics::Palette &pal1, const Graphics::Palette &pal2);
106
111 void fadeToBlack(const Graphics::Palette &palette);
112 void fadeWhiteToPal(const Graphics::Palette &ptrpal);
113
118 void fadeToPal(const Graphics::Palette &palette);
119
121 void whiteFade();
122
125
130 void fadeToRed(const Graphics::Palette &palette);
131
136 void fadeRedToPal(const Graphics::Palette &palette);
137
144
146 void clearScreen(); // Cls()
147
150};
151
152} // namespace TwinE
153
154#endif
Definition: managed_surface.h:51
Simple class for handling a palette data.
Definition: palette.h:61
Definition: screens.h:34
void fadeToBlack(const Graphics::Palette &palette)
void choicePalette()
void loadImage(TwineImage image, bool fadeIn=true)
void copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination)
void fadeToPal(const Graphics::Palette &palette)
void setBlackPal()
void fadePalToPal(const Graphics::Palette &pal1, const Graphics::Palette &pal2)
void clearScreen()
bool adelineLogo()
bool loadImageDelay(TwineImage image, int32 seconds)
bool _flagFade
Definition: screens.h:64
void loadMenuImage(bool fadeIn=true)
void loadCustomPalette(const TwineResource &resource)
void fadeToRed(const Graphics::Palette &palette)
void fadeRedToPal(const Graphics::Palette &palette)
bool _flagBlackPal
Definition: screens.h:61
void initPalettes()
Graphics::Palette _ptrPal
Definition: screens.h:57
bool _flagPalettePcx
Definition: screens.h:67
Definition: twine.h:207
Definition: shared.h:697
Definition: shared.h:689