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 
22 #ifndef TUCKER_GRAPHICS_H
23 #define TUCKER_GRAPHICS_H
24 
25 #include "common/util.h"
26 
27 namespace Tucker {
28 
29 enum CharsetType {
30  kCharsetTypeDefault,
31  kCharsetTypeEng,
32  kCharsetTypeCredits
33 };
34 
35 struct Charset {
36  int _charW;
37  int _charH;
38  int _xCount;
39  int _yCount;
40 };
41 
42 class Graphics {
43 public:
44  static int encodeRLE(const uint8 *src, uint8 *dst, int w, int h);
45  static int encodeRAW(const uint8 *src, uint8 *dst, int w, int h);
46 
47  static void decodeRLE(uint8 *dst, const uint8 *src, int w, int h);
48  static void decodeRLE_224(uint8 *dst, const uint8 *src, int w, int h);
49  static void decodeRLE_248(uint8 *dst, const uint8 *src, int w, int h, int y1, int y2, bool xflip, const int *whitelistReservedColors = nullptr);
50  static void decodeRLE_320(uint8 *dst, const uint8 *src, int w, int h);
51 
52  static void copyRect(uint8 *dst, int dstPitch, uint8 *src, int srcPitch, int w, int h);
53 
54  static void drawStringChar(uint8 *dst, int xDst, int yDst, int pitch, uint8 chr, uint8 chrColor, const uint8 *src);
55 
56  static void setCharset(CharsetType type);
57 
58  static Charset _charset;
59  static CharsetType _charsetType;
60 };
61 
62 } // namespace Tucker
63 
64 #endif
Definition: graphics.h:35
Definition: console.h:27
Definition: formatinfo.h:28