[Scummvm-cvs-logs] scummvm master -> 9bacb0491814b285a8931a9cf9e53497530e052f
m-kiewitz
m_kiewitz at users.sourceforge.net
Fri Jun 12 18:49:45 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9bacb04918 SHERLOCK: font class
Commit: 9bacb0491814b285a8931a9cf9e53497530e052f
https://github.com/scummvm/scummvm/commit/9bacb0491814b285a8931a9cf9e53497530e052f
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-12T18:48:44+02:00
Commit Message:
SHERLOCK: font class
Changed paths:
engines/sherlock/fonts.cpp
diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp
index 31c44dd..57241bf 100644
--- a/engines/sherlock/fonts.cpp
+++ b/engines/sherlock/fonts.cpp
@@ -104,6 +104,9 @@ int Fonts::stringHeight(const Common::String &str) {
}
int Fonts::charWidth(unsigned char c) {
+ if (!_font)
+ return 0;
+
if (c == ' ')
return 5;
else if (Common::isPrint(c))
@@ -114,6 +117,10 @@ int Fonts::charWidth(unsigned char c) {
int Fonts::charHeight(unsigned char c) {
int idx = c - 33;
+
+ if (!_font)
+ return 0;
+
if (c == ' ')
idx = 0;
else if (c == 225)
More information about the Scummvm-git-logs
mailing list