[Scummvm-cvs-logs] SF.net SVN: scummvm: [28728] scummvm/trunk/engines/saga/interface.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Aug 25 19:10:31 CEST 2007
Revision: 28728
http://scummvm.svn.sourceforge.net/scummvm/?rev=28728&view=rev
Author: thebluegr
Date: 2007-08-25 10:10:31 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
Properly limit the save title size in IHNM
Modified Paths:
--------------
scummvm/trunk/engines/saga/interface.cpp
Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp 2007-08-25 16:45:06 UTC (rev 28727)
+++ scummvm/trunk/engines/saga/interface.cpp 2007-08-25 17:10:31 UTC (rev 28728)
@@ -1154,6 +1154,10 @@
uint tempWidth;
memset(tempString, 0, SAVE_TITLE_SIZE);
ch[1] = 0;
+ // ITE has a maximum save title size of SAVE_TITLE_SIZE (28), but IHNM has a slightly smaller
+ // save title size (21). We only limit the save title size during text input, to preserve
+ // backwards compatibility with older save games
+ uint save_title_size = _vm->getGameType() == GType_ITE ? SAVE_TITLE_SIZE : SAVE_TITLE_SIZE - 6;
switch (ascii) {
case 13:
@@ -1193,7 +1197,7 @@
((ascii >= '0') && (ascii <='9')) ||
((ascii >= 'A') && (ascii <='Z')) ||
(ascii == ' ') || (ascii == '-') || (ascii == '_')) {
- if (_textInputStringLength < SAVE_TITLE_SIZE - 1) {
+ if (_textInputStringLength < save_title_size - 1) {
ch[0] = ascii;
tempWidth = _vm->_font->getStringWidth(kKnownFontSmall, ch, 0, kFontNormal);
tempWidth += _vm->_font->getStringWidth(kKnownFontSmall, _textInputString, 0, kFontNormal);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list