diff options
author | Paul Gilbert | 2016-05-01 13:56:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:38:00 -0400 |
commit | f01b8e9c45e3349c84346f270c17610b0e5350b0 (patch) | |
tree | f6169ad8205219c3d451c6a81b91b64333525b91 /engines/titanic/support/font.h | |
parent | 21f98fff46e48e79d3e977d4f20edf90022a825a (diff) | |
download | scummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.tar.gz scummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.tar.bz2 scummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.zip |
TITANIC: Fix multi-line text writing
Diffstat (limited to 'engines/titanic/support/font.h')
-rw-r--r-- | engines/titanic/support/font.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/titanic/support/font.h b/engines/titanic/support/font.h index 75c91f3d36..591fb4661c 100644 --- a/engines/titanic/support/font.h +++ b/engines/titanic/support/font.h @@ -31,7 +31,12 @@ namespace Titanic { -enum TextCommand { TEXTCMD_26 = 26, TEXTCMD_SET_COLOR = 27 }; +enum TextCommand { TEXTCMD_NPC = 26, TEXTCMD_SET_COLOR = 27 }; + +enum WriteCharacterResult { + WC_IN_BOUNDS = 0, WC_OUTSIDE_TOP = -1, WC_OUTSIDE_BOTTOM = -2, + WC_OUTSIDE_LEFT = -3, WC_OUTSIDE_RIGHT = -4 +}; class CVideoSurface; @@ -51,7 +56,7 @@ private: /** * Write a character */ - int writeChar(CVideoSurface *surface, unsigned char c, + WriteCharacterResult writeChar(CVideoSurface *surface, unsigned char c, const Common::Point &pt, const Rect &destRect, const Rect *srcRect); /** @@ -87,6 +92,8 @@ public: /** * Write a string to the specified surface + * @returns The index of the last character that was visible + * with the drawing area */ int writeString(CVideoSurface *surface, const Rect &rect1, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor); |