diff options
author | Strangerke | 2016-04-10 00:27:59 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 09:54:21 +0200 |
commit | f1738f457f5b3a3c67612f3aa77bf8a1c9a4b129 (patch) | |
tree | 19ee49eb5cb71e19b7a5932e614c81c35c056665 /engines/gnap/gamesys.cpp | |
parent | 66f5610c74710a298ae6a4166b37f438d25882bd (diff) | |
download | scummvm-rg350-f1738f457f5b3a3c67612f3aa77bf8a1c9a4b129.tar.gz scummvm-rg350-f1738f457f5b3a3c67612f3aa77bf8a1c9a4b129.tar.bz2 scummvm-rg350-f1738f457f5b3a3c67612f3aa77bf8a1c9a4b129.zip |
GNAP: Add savegames (not fully working yet)
Diffstat (limited to 'engines/gnap/gamesys.cpp')
-rw-r--r-- | engines/gnap/gamesys.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp index 6bdeb81f24..fd53005d27 100644 --- a/engines/gnap/gamesys.cpp +++ b/engines/gnap/gamesys.cpp @@ -300,6 +300,18 @@ void GameSys::drawTextToSurface(Graphics::Surface *surface, int x, int y, byte r } +int GameSys::getTextHeight(const char *text) { + byte height = 0; + for (const char *cp = text; *cp != 0; ++cp) { + byte c = *cp; + if (c < 32 || c > 127) + c = (byte)'_'; + c -= 32; + height = MAX(height, _dejaVuSans9ptCharDescriptors[c]._width); + } + return height; +} + int GameSys::getTextWidth(const char *text) { int width = 0; for (const char *cp = text; *cp != 0; ++cp) { |