ScummVM API documentation
macega.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 GRAPHICS_MACEGA_H
22#define GRAPHICS_MACEGA_H
23
24namespace Graphics {
25
26// Each color has its own 2x2 dithering pattern. This array remaps them to the
27// color indexes for black and white. The order of the pixels is upper left,
28// upper right, lower left, lower right. I don't know if this is the standard
29// method, but it does seem to be what LucasArts used so maybe it's useful for
30// other games as well.
31//
32// One obvious candidate would be the Mac AGI games, though looking at
33// screenshots makes me suspect that they used 3x2 pixels for each color.
34
35const byte macEGADither[16][4] = {
36 { 0, 0, 0, 0 }, // Black
37 { 0, 0, 0, 15 }, // Blue
38 { 0, 0, 15, 0 }, // Green
39 { 0, 0, 15, 15 }, // Cyan
40 { 0, 15, 0, 0 }, // Red
41 { 0, 15, 0, 15 }, // Magenta
42 { 0, 15, 15, 0 }, // Brown
43 { 0, 15, 15, 15 }, // Light Gray
44 { 15, 0, 0, 0 }, // Dark Gray
45 { 15, 0, 0, 15 }, // Bright Blue
46 { 15, 0, 15, 0 }, // Bright Green
47 { 15, 0, 15, 15 }, // Bright Cyan
48 { 15, 15, 0, 0 }, // Bright Red
49 { 15, 15, 0, 15 }, // Bright Magenta
50 { 15, 15, 15, 0 }, // Bright Yellow
51 { 15, 15, 15, 15 } // White
52};
53
54} // end of namespace Graphics
55
56#endif // GRAPHICS_MACEGA_H
Definition: formatinfo.h:28