aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-07-23 14:33:57 +0000
committerTorbjörn Andersson2003-07-23 14:33:57 +0000
commite66bdf91b962083abee31c6baf168ec8dcb3cda9 (patch)
treef0d3099e090ecfd816397b325f1ef63ba886daeb /scumm
parenta327f805acdb8bc6b9619c57bea09abc3fd360a6 (diff)
downloadscummvm-rg350-e66bdf91b962083abee31c6baf168ec8dcb3cda9.tar.gz
scummvm-rg350-e66bdf91b962083abee31c6baf168ec8dcb3cda9.tar.bz2
scummvm-rg350-e66bdf91b962083abee31c6baf168ec8dcb3cda9.zip
Allow the sentence line to be 40 printable characters long. The verb part
is padded with '@', which should not be counted. svn-id: r9146
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v2.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 423ce5c945..7b6eba0005 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -987,7 +987,20 @@ void Scumm_v2::o2_drawSentence() {
else
_string[2].color = 13;
- sentence[41] = 0; // Maximal length: 40 characters
+ char *ptr = sentence;
+ int n = 0;
+
+ // Maximum length: 40 printable characters
+ while (*ptr != 0) {
+ if (*ptr != '@')
+ n++;
+ if (n > 40) {
+ *ptr = 0;
+ break;
+ }
+ ptr++;
+ }
+
_messagePtr = (byte*)sentence;
sentenceline.top = virtscr[2].topline;