Menu

Commit [r716]  Maximize  Restore  History

Windows XP and later have a font display option called ClearType, but ClearType has a bug in it that affects this game. When the ClearType feature is enabled, it causes display problems in Liberal Crime Squad as well as other Win32 Console Applications, especially if different background colors are used, if you are using a TrueType font like Lucida Console for the display of the game instead of a raster font. The bug in ClearType is visible on the screen as vertical lines in between characters on the screen. This is most visible on the newspaper screens, or if you are going back and forth from the main screen when the main screen has a U.S. flag on it, or especially in the colorful Curses text animations (new news anchor, show about rich and famous, caught on camera of black guy getting beaten, etc.). This bug can only be solved by disabling ClearType (since Microsoft obviously isn't going to offer any more non-security-related fixes for Windows XP). However, ClearType is useful in other programs and a lot of people like it. So, a good solution is to temporarily disable ClearType while Liberal Crime Squad is running, and then re-enable it after the game is over. Of course, people might not have it enabled; they might be using standard font smoothing instead or have font smoothing completely disabled. So, there is a new option in init.txt called "fixcleartype". If this is disabled (and it IS disabled by default), the game does not mess with ClearType or font smoothing settings at all. If it is enabled, the font smoothing settings are backed up when the game starts, and then the game switches Windows to use standard font smoothing, which works well with the TrueType font Lucida Console if you chose that for your console window, and has no effect if you are using a raster font. Then when you exit the game, the backed up settings are restored (so whatever your previous setting was, whether it was ClearType on, standard font smoothing on, or all font smoothing disabled, that previous setting gets restored). Additionally, since ClearType only exists in Windows XP and later, all of the ClearType-related code is ignored by the compiler on non-Win32 platforms such as Linux and Mac OS X, so this does not affect compatibility with those operating systems one bit. Furthermore, if you are on a Win32 operating system and have selected the "fixcleartype" option in init.txt, the game looks at your Windows version, and if it is older than Windows XP (version 5.1), all the ClearType-related code is disabled, to maintain compatibility with older versions of Windows. The only issue with the "fixcleartype" option is that, although the game only temporarily changes your font smoothing settings to be standard font smoothing, if the game crashes or if you terminate it in any way other than exiting through the game's keyboard interface, the code that restores your backed up font smoothing settings does not get executed. For this reason, "fixcleartype" is disabled by default. However, for users who choose a TrueType font like Lucida Console for the console display in Windows XP or later, the "fixcleartype" feature may prove to be a valuable workaround for the aforementioned bug in ClearType that Microsoft refuses to fix.

yetisyny 2013-08-21

changed /trunk/init.txt
changed /trunk/src/externs.h
changed /trunk/src/game.cpp
changed /trunk/src/title/initfile.cpp
changed /trunk/workspaces/Debug/crimesquad.exe
changed /trunk/workspaces/Release/crimesquad.exe
/trunk/init.txt Diff Switch to side-by-side view
Loading...
/trunk/src/externs.h Diff Switch to side-by-side view
Loading...
/trunk/src/game.cpp Diff Switch to side-by-side view
Loading...
/trunk/src/title/initfile.cpp Diff Switch to side-by-side view
Loading...
/trunk/workspaces/Debug/crimesquad.exe
Binary file was changed.
/trunk/workspaces/Release/crimesquad.exe
Binary file was changed.