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 
55  Graphics::Palette _palettePcx{0};
56 
58  bool _flagBlackPal = false;
59 
61  bool _flagFade = false;
62 
64  bool _flagPalettePcx = false;
65 
67  bool adelineLogo();
68 
73  void loadCustomPalette(const TwineResource &resource);
74 
76  void loadMenuImage(bool fadeIn = true);
77 
84  void loadImage(TwineImage image, bool fadeIn = true);
85 
93  bool loadImageDelay(TwineImage image, int32 seconds);
94 
95  bool loadBitmapDelay(const char *image, int32 seconds);
96 
102  void fadePalToPal(const Graphics::Palette &pal1, const Graphics::Palette &pal2);
103 
108  void fadeToBlack(const Graphics::Palette &palette);
109  void fadeWhiteToPal(const Graphics::Palette &ptrpal);
110 
115  void fadeToPal(const Graphics::Palette &palette);
116 
118  void whiteFade();
119 
121  void setBlackPal();
122 
127  void fadeToRed(const Graphics::Palette &palette);
128 
133  void fadeRedToPal(const Graphics::Palette &palette);
134 
140  void copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination);
141 
143  void clearScreen();
144 
146  void initPalettes();
147 };
148 
149 } // namespace TwinE
150 
151 #endif
Definition: managed_surface.h:51
Definition: screens.h:34
void copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination)
bool _flagPalettePcx
Definition: screens.h:64
bool _flagBlackPal
Definition: screens.h:58
void setBlackPal()
void fadeRedToPal(const Graphics::Palette &palette)
Definition: shared.h:691
void fadeToBlack(const Graphics::Palette &palette)
bool adelineLogo()
Definition: shared.h:683
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:45
bool loadImageDelay(TwineImage image, int32 seconds)
Graphics::Palette _ptrPal
Definition: screens.h:54
bool _flagFade
Definition: screens.h:61