mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-03 08:40:59 +00:00
Allow the sentence line to be 40 printable characters long. The verb part
is padded with '@', which should not be counted. svn-id: r9146
This commit is contained in:
parent
a327f805ac
commit
e66bdf91b9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user