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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef COMMON_RENDERMODE_H
24 #define COMMON_RENDERMODE_H
25 
26 #include "common/scummsys.h"
27 
28 namespace Common {
29 
30 /**
31  * @defgroup common_rendermode Render modes
32  * @ingroup common
33  *
34  * @brief API for render modes.
35  *
36  * @{
37  */
38 
39 class String;
40 
41 /**
42  * List of render modes. It specifies which original graphics mode
43  * to use. Some targets used postprocessing dithering routines for
44  * reducing color depth of final image which let it to be rendered on
45  * such low-level adapters as CGA or Hercules.
46  */
47 enum RenderMode {
48 	kRenderDefault = 0,
49 	kRenderVGA = 1,
50 	kRenderEGA = 2,
51 	kRenderCGA = 3,
52 	kRenderHercG = 4,
53 	kRenderHercA = 5,
54 	kRenderAmiga = 6,
55 	kRenderFMTowns = 7,
56 	kRenderPC9821 = 8,
57 	kRenderPC9801 = 9,
58 	kRenderApple2GS = 10,
59 	kRenderAtariST = 11,
60 	kRenderMacintosh = 12,
61 	kRenderMacintoshBW = 13
62 };
63 
64 struct RenderModeDescription {
65 	const char *code;
66 	const char *description;
67 	RenderMode id;
68 };
69 
70 extern const RenderModeDescription g_renderModes[];
71 
72 /** Convert a string containing a render mode name into a RenderingMode enum value. */
73 extern RenderMode parseRenderMode(const String &str);
74 extern const char *getRenderModeCode(RenderMode id);
75 extern const char *getRenderModeDescription(RenderMode id);
76 
77 // TODO: Rename the following to something better; also, document it
78 extern String renderMode2GUIO(RenderMode id);
79 
80 // TODO: Rename the following to something better; also, document it
81 extern String allRenderModesGUIOs();
82 
83 /** @} */
84 
85 } // End of namespace Common
86 
87 #endif
88