summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-26 18:49:53 +0000
committerfrosch <frosch@openttd.org>2013-06-26 18:49:53 +0000
commiteb7962a72e8ddd18a97ba1fbdb5a4a4a3d286076 (patch)
treeacac025d1f8e3411eb43044447d5e0641ba8643d /src/gfx.cpp
parentfc5335111ddc5dcf549b890178903ef46f467037 (diff)
downloadopenttd-eb7962a72e8ddd18a97ba1fbdb5a4a4a3d286076.tar.xz
(svn r25476) -Cleanup: Remove unused _max_char_size, _max_char_height, _max_char_width.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 9b65e7670..b42275da6 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -44,9 +44,6 @@ SwitchMode _switch_mode; ///< The next mainloop command.
PauseModeByte _pause_mode;
Palette _cur_palette;
-static Dimension _max_char_size[FS_END]; ///< Cache of the maximum size of any character of a font.
-static int _max_char_height; ///< Cache of the height of the largest font
-static int _max_char_width; ///< Cache of the width of the largest font
static byte _stringwidth_table[FS_END][224]; ///< Cache containing width of often used characters. @see GetCharacterWidth()
DrawPixelInfo *_cur_dpi;
byte _colour_gradient[COLOUR_END][8];
@@ -1158,23 +1155,9 @@ TextColour GetContrastColour(uint8 background)
void LoadStringWidthTable(bool monospace)
{
for (FontSize fs = monospace ? FS_MONO : FS_BEGIN; fs < (monospace ? FS_END : FS_MONO); fs++) {
- _max_char_size[fs].width = 0;
- _max_char_size[fs].height = GetCharacterHeight(fs);
for (uint i = 0; i != 224; i++) {
_stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32);
- _max_char_size[fs].width = max<int>(_max_char_size[fs].width, _stringwidth_table[fs][i]);
}
-
- /* Needed because they need to be 1 more than the widest. */
- _max_char_size[fs].width++;
- _max_char_size[fs].height++;
- }
-
- _max_char_width = 0;
- _max_char_height = 0;
- for (FontSize fs = FS_BEGIN; fs < FS_END; fs++) {
- _max_char_width = max<int>(_max_char_width, _max_char_size[fs].width);
- _max_char_height = max<int>(_max_char_height, _max_char_size[fs].height);
}
ReInitAllWindows();