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 
31 namespace TwinE {
32 
33 class TwinEEngine;
34 class Screens {
35 private:
36  TwinEEngine *_engine;
37 
46  void fadePal(uint8 r, uint8 g, uint8 b, const Graphics::Palette &palette, int32 intensity);
47 
48 public:
49  Screens(TwinEEngine *engine) : _engine(engine) {}
50 
51  int32 mapLba2Palette(int32 palIndex);
52 
54  void choicePalette();
55 
58  Graphics::Palette _palettePcx{0};
59 
61  bool _flagBlackPal = false;
62 
64  bool _flagFade = false;
65 
67  bool _flagPalettePcx = false;
68 
70  bool adelineLogo();
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 
124  void setBlackPal();
125 
130  void fadeToRed(const Graphics::Palette &palette);
131 
136  void fadeRedToPal(const Graphics::Palette &palette);
137 
143  void copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination);
144 
146  void clearScreen(); // Cls()
147 
149  void initPalettes();
150 };
151 
152 } // namespace TwinE
153 
154 #endif
Definition: managed_surface.h:51
Definition: screens.h:34
void copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination)
bool _flagPalettePcx
Definition: screens.h:67
bool _flagBlackPal
Definition: screens.h:61
void setBlackPal()
void fadeRedToPal(const Graphics::Palette &palette)
Definition: shared.h:697
void fadeToBlack(const Graphics::Palette &palette)
bool adelineLogo()
Definition: shared.h:689
void clearScreen()
void loadMenuImage(bool fadeIn=true)
void fadePalToPal(const Graphics::Palette &pal1, const Graphics::Palette &pal2)
void initPalettes()
Definition: twine.h:207
Definition: achievements_tables.h:27
void fadeToRed(const Graphics::Palette &palette)
void loadCustomPalette(const TwineResource &resource)
void fadeToPal(const Graphics::Palette &palette)
void loadImage(TwineImage image, bool fadeIn=true)
Simple class for handling a palette data.
Definition: palette.h:61
bool loadImageDelay(TwineImage image, int32 seconds)
void choicePalette()
Graphics::Palette _ptrPal
Definition: screens.h:57
bool _flagFade
Definition: screens.h:64