ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
enhancements.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 ENGINES_ENHANCEMENTS_H
23 #define ENGINES_ENHANCEMENTS_H
24 
25 /* Game enhancements */
26 
27 /* "How should I mark an enhancement?" - A practical guide for the developer:
28  *
29  * Hi! If you're here it means that you are probably trying to make up
30  * your mind about how to correctly mark your brand new game enhancement:
31  * if that's the case... congratulations, you've come to the right place! :-)
32  *
33  * Marking a piece of code as an enhancement is as simple as guarding it with
34  * a conditional check using the enhancementEnabled(<class>) function.
35  * For example:
36  *
37  * if (enhancementEnabled(<kMyBeautifulEnhancementClass>)) {
38  * // Piece of code which makes Guybrush hair white
39  * }
40  *
41  * That's it! :-)
42  *
43  * You've probably noticed that the function above needs a class in order to work.
44  * Of course there is no one kind of enhancement: each of them might tackle
45  * different aspect of the game, from the graphics to the gameplay itself.
46  * So it all comes to identifying the correct class for your enhancement.
47  *
48  * We identify nine different enhancement classes:
49  *
50  * --- Gamebreaking Bug Fixes ---
51  *
52  * This is a class of enhancements which is ALWAYS active; it encapsulates
53  * code changes which were not in the original game but which are absolutely
54  * necessary in order to avoid deadlocks or even crashes! Being able to differentiate
55  * between original code and these enhancements can be quite useful for future
56  * developers and their research (e.g. "why is this code different from the disassembly?",
57  * "why did they change it like that?").
58  *
59  * --- Minor Bug Fixes ---
60  *
61  * Did the original developers blit a green pixel on a blue tinted background
62  * and YOU'RE ABSOLUTELY SURE that they didn't do that on purpose? Is one of the
63  * voice files playing as garbled noise instead of sounding like normal speech?
64  * Is the game looking like there is something which is clearly wrong with it?
65  * This is the class you're looking for, then!
66  *
67  * --- Text and Localization Fixes ---
68  *
69  * If you spot any issues which pertain texts (accents not being rendered properly
70  * on localizations, placeholder lines forgotten by the developers, obvious typos), and
71  * which are NOT about the format of the subtitle (color, position) or the content,
72  * then this is the class you should be using.
73  * Do not use this class when changing an already grammatically correct line to another
74  * line for the purpose of matching the text to the speech line!
75  * Use "Subtitle Format/Content Changes" instead.
76  *
77  * --- Visual Changes ---
78  *
79  * Any graphical change which is not classifiable as a "fix" but is, as a matter of fact,
80  * a deliberate change which strays away from the original intentions, should be marked
81  * with this class. Some examples of this are enhancements which modify palettes and add
82  * or edit graphical elements in order to better match a particular "reference" version.
83  *
84  * --- Audio Changes ---
85  *
86  * Like above, but for anything sound related.
87  *
88  * --- Timing Adjustments ---
89  *
90  * Are you making a scene slower or faster for any reason? Are you changing the framerate
91  * of an in-game situation? Choose this class!
92  *
93  * --- Subtitles Format/Content Changes ---
94  *
95  * Any changes to the subtitles format should be classified under this class.
96  * This also includes changes to the subtitles content when not under the "fix" umbrella,
97  * for example when you are changing an already grammatically and graphically correct line
98  * to match it with the corresponding speech file.
99  *
100  * --- Restored Cut Content ---
101  *
102  * Have you found any line of dialog, a graphical element or even a piece of music which
103  * is in the game data but is not being used? Go nuts with this enhancement class then! :-)
104  *
105  * --- UI/UX Enhancements ---
106  *
107  * These old games are beautiful. But sometimes they can be so clunky... :-)
108  * If you make any changes in order to yield a slightly-less-clunky user experience
109  * you should classify them under this class. Here's a couple of real use cases:
110  * - SAMNMAX: the CD version of the game begins with what seems to be a fake loading
111  * screen for the sounds. We have an enhancement which just skips that :-)
112  * - Early games: some early titles use a save menu screen which is piloted by SCUMM scripts,
113  * and therefore run at an in-game framerate. This causes lag and lost keypresses
114  * from your keyboard when attempting to write the names of your savegames.
115  * We remove the framerate cap so that writing is not painful anymore... :-P
116  *
117  */
118 
119 enum {
120  kEnhGameBreakingBugFixes = 1 << 0, // Gamebreaking Bug Fixes
121  kEnhMinorBugFixes = 1 << 1, // Minor Bug Fixes
122  kEnhTextLocFixes = 1 << 2, // Text and Localization Fixes
123  kEnhVisualChanges = 1 << 3, // Visual Changes
124  kEnhAudioChanges = 1 << 4, // Audio Changes
125  kEnhTimingChanges = 1 << 5, // Timing Adjustments
126  kEnhSubFmtCntChanges = 1 << 6, // Subtitles Format/Content Changes
127  kEnhRestoredContent = 1 << 7, // Restored Cut Content
128  kEnhUIUX = 1 << 8, // UI/UX Enhancements
129 };
130 
131 /* "How are the enhancements grouped?" - A practical guide to follow if you're lost:
132  *
133  * GROUP 1: Fix original bugs
134  *
135  * This category includes both game-breaking bugs which cause the game to crash/deadlock and
136  * minor bug fixes (e.g. text and localization issues). Enhancements in this category should
137  * pertain stuff which is very clearly a bug (for example a badly shaped walkbox, a wrong accent
138  * in a word from the subtitles, a strip of pixels which is very clearly out of place/with the
139  * wrong palette, AND NOT include things like subtitles and boxes color changes, enhancements
140  * which make a version similar to another, etc.). Basically when this and only this is active,
141  * the game should not have deadlock situations and the immersiveness should not be broken by
142  * very evident graphical glitches, charset issues, etc.
143  *
144  * GROUP 2: Audio-visual improvements
145  *
146  * This category comprises visual and audio changes as well as timing adjustments. This is the
147  * category in which we can basically put everything which I said not to put in the previous
148  * category. This includes: changing the spacing of the font from the original, changing colors
149  * of subtitles for consistency, changes to the subtitles content in order to match the speech
150  * or to fix the localization, music changes (like the ones in COMI and FT), graphic changes
151  * which are not as essential as the ones from the previous category, etc.
152  *
153  * GROUP 3: Restored content
154  *
155  * This category reintroduces content cut or unused which was not in the original. This
156  * can include content which was somehow masked by mistake by the scripts.
157  *
158  * GROUP 4: Modern UI/UX adjustments
159  *
160  * This category pertains to all enhancements to the user interface and user experience:
161  * e.g. the artificial loading screen at the beginning of Sam&Max, speeding up the framerate
162  * in old original menus to have a decent keyboard polling rate.
163  *
164  */
165 
166 enum {
167  kEnhGrp1 = (kEnhMinorBugFixes | kEnhTextLocFixes),
168  kEnhGrp2 = (kEnhVisualChanges | kEnhAudioChanges | kEnhTimingChanges | kEnhSubFmtCntChanges),
169  kEnhGrp3 = (kEnhRestoredContent),
170  kEnhGrp4 = (kEnhUIUX)
171 };
172 
173 #endif