diff options
author | Paul Gilbert | 2016-06-04 15:56:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-15 19:19:28 -0400 |
commit | 66efdc239c88124296acdcb45427d83793934e91 (patch) | |
tree | 2d4056d49580b7b2537c1ce5e98347a41c1ae826 /engines/titanic/support | |
parent | ebb60288716bc4876183989d04d7bb2208b9fceb (diff) | |
download | scummvm-rg350-66efdc239c88124296acdcb45427d83793934e91.tar.gz scummvm-rg350-66efdc239c88124296acdcb45427d83793934e91.tar.bz2 scummvm-rg350-66efdc239c88124296acdcb45427d83793934e91.zip |
TITANIC: gcc compilation fixes
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/font.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/support/string.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index c960e2fa9e..f4466def31 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -112,7 +112,7 @@ int STFont::stringWidth(const CString &text) const { const char *srcP = text.c_str(); int total = 0; char c; - while (c = *srcP++) { + while (c = (*srcP++)) { if (c == 26) { // Skip over command parameter bytes srcP += 3; @@ -265,7 +265,7 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons else if (*srcPtr == TEXTCMD_SET_COLOR) srcPtr += 4; else - totalWidth += _chars[*srcPtr]._width; + totalWidth += _chars[(byte)*srcPtr]._width; } if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) { diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index 86dc0be0b0..d85fcfc515 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -32,9 +32,7 @@ CString::CString(char c, uint32 len) : Common::String() { } CString::CString(int val) : Common::String() { - char buffer[16]; - itoa(val, buffer, 10); - *this += buffer; + *this = CString::format("%d", val); } CString CString::left(uint count) const { |