diff options
author | lolbot-iichan | 2018-08-27 00:52:14 +0300 |
---|---|---|
committer | Filippos Karapetis | 2020-01-11 18:05:39 +0200 |
commit | 767913d2d5c7e83e715886910a99dba619b3aeb7 (patch) | |
tree | 44aa9b4eb6dabf07affa2ad384425c2ac2171d9a /engines | |
parent | 1754aed61dc69d1ff16739935ff87ebd9b503e25 (diff) | |
download | scummvm-rg350-767913d2d5c7e83e715886910a99dba619b3aeb7.tar.gz scummvm-rg350-767913d2d5c7e83e715886910a99dba619b3aeb7.tar.bz2 scummvm-rg350-767913d2d5c7e83e715886910a99dba619b3aeb7.zip |
WINTERMUTE: Add FoxTail text spacing hack
FoxTail fork of WME seems to have hard-coded modifications for getting inter-line and inter-character spaces smaller.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/font/base_font_bitmap.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp index c33b48d085..fd36de4915 100644 --- a/engines/wintermute/base/font/base_font_bitmap.cpp +++ b/engines/wintermute/base/font/base_font_bitmap.cpp @@ -28,6 +28,7 @@ #include "engines/wintermute/base/font/base_font_bitmap.h" #include "engines/wintermute/utils/string_util.h" +#include "engines/wintermute/base/base_engine.h" #include "engines/wintermute/base/base_parser.h" #include "engines/wintermute/base/base_frame.h" #include "engines/wintermute/base/gfx/base_surface.h" @@ -141,6 +142,9 @@ int BaseFontBitmap::textHeightDraw(const byte *text, int x, int y, int width, TT bool done = false; bool newLine = false; bool longLine = false; +#ifdef ENABLE_FOXTAIL + bool minimizeSpacing = BaseEngine::instance().isFoxTail(); +#endif if (draw) { _gameRef->_renderer->startSpriteBatch(); @@ -211,6 +215,11 @@ int BaseFontBitmap::textHeightDraw(const byte *text, int x, int y, int width, TT startX += getCharWidth(str[i]); } y += _tileHeight; +#ifdef ENABLE_FOXTAIL + if (minimizeSpacing) { + y -= 3; + } +#endif last_end = end; if (longLine) { end--; @@ -489,6 +498,14 @@ bool BaseFontBitmap::loadBuffer(char *buffer) { } } +#ifdef ENABLE_FOXTAIL + if (BaseEngine::instance().isFoxTail()) { + for (i = lastWidth; i < NUM_CHARACTERS; i++) { + _widths[i]--; + } + } +#endif + return STATUS_OK; } |