ScummVM API documentation
graphics.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#ifndef PELROCK_GRAPHICS_H
22#define PELROCK_GRAPHICS_H
23
24#include "pelrock/types.h"
25
26namespace Graphics {
27class Font;
28}
29
30namespace Pelrock {
31
33public:
36
37 // Overlay / palette utilities
38 Common::Point showOverlay(int height, Graphics::ManagedSurface &buf);
39 void fadeToBlack(int stepSize);
40 void fadePaletteToTarget(byte *targetPalette, int stepSize);
41 void clearScreen();
42
43 // Text rendering
44 void drawColoredText(Graphics::ManagedSurface *screen, const Common::String &text, int x, int y, int w, byte &defaultColor, Graphics::Font *font);
45 void drawColoredTexts(Graphics::ManagedSurface *surface, const Common::StringArray &text, int x, int y, int w, int yPadding, Graphics::Font *font);
46
47 // Frame / background management
48 void copyBackgroundToBuffer();
49 void presentFrame();
50
51 // Sticker rendering
52 void placeStickersFirstPass();
53 void placeStickersSecondPass();
54 void placeSticker(Sticker &sticker, byte *pixels);
55
56 // Palette animations
57 void updatePaletteAnimations();
58 void animateFadePalette(PaletteAnim *anim);
59 void animateRotatePalette(PaletteAnim *anim);
60
62 void reflectionEffect(byte *buf, int x, int y, int width, int height);
63
64 // scaling
65 void calculateScalingMasks();
66
71
77 byte *scale(int scaleY, int finalWidth, int finalHeight, byte *buf);
78
79 // Scaling look-up tables initialized by calculateScalingMasks().
80 Common::Array<Common::Array<int>> _widthScalingTable;
81 Common::Array<Common::Array<int>> _heightScalingTable;
82};
83
84} // End of namespace Pelrock
85#endif // PELROCK_GRAPHICS_H
Definition: str.h:59
Definition: font.h:83
Definition: managed_surface.h:51
Definition: graphics.h:32
ScaleCalculation calculateScaling(int yPos, ScalingParams scalingParams)
byte * scale(int scaleY, int finalWidth, int finalHeight, byte *buf)
void reflectionEffect(byte *buf, int x, int y, int width, int height)
Definition: formatinfo.h:28
Definition: rect.h:144
Definition: types.h:467
Definition: types.h:387
Definition: types.h:381
Definition: types.h:449