[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.178,1.179
Eugene Sandulenko
sev at users.sourceforge.net
Thu Oct 13 16:28:00 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.236,1.237
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.h,1.38,1.39 game.cpp,1.115,1.116 gfx.cpp,1.68,1.69 ite_introproc.cpp,1.69,1.70 puzzle.cpp,1.16,1.17 saga.cpp,1.143,1.144 saga.h,1.131,1.132
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29932/smush
Modified Files:
smush_player.cpp
Log Message:
Workaround for bug #1310846 "DIG: Text bug in intro". Proper fix maybe
will be never needed not to mention that it will require to add much
logic to code which will be used just once just for single release of the game.
(and if somebody will have patience to watch intro to the end)
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- smush_player.cpp 8 Oct 2005 20:54:05 -0000 1.178
+++ smush_player.cpp 13 Oct 2005 23:27:11 -0000 1.179
@@ -600,6 +600,48 @@
}
}
+ // HACK. This is to prevent bug #1310846. In updated Win95 dig
+ // there is such line:
+ //
+ // ^f01^c001LEAD TESTER
+ // Chris Purvis
+ // ^f01
+ // ^f01^c001WINDOWS COMPATIBILITY
+ // Chip Hinnenberg
+ // ^f01^c001WINDOWS TESTING
+ // Jim Davison
+ // Lynn Selk
+ //
+ // i.e. formatting exists not in the first line only
+ // We just strip that off and assume that neither font
+ // nor font color was altered. Proper fix would be to feed
+ // drawString() with each line sequentally
+ char *string3 = NULL, *sptr2;
+ const char *sptr;
+
+ if (strchr(str, '^')) {
+ string3 = (char *)malloc(strlen(str) + 1);
+
+ for (sptr = str, sptr2 = string3; *sptr;) {
+ if (*sptr == '^') {
+ switch (sptr[1]) {
+ case 'f':
+ sptr += 4;
+ break;
+ case 'c':
+ sptr += 5;
+ break;
+ default:
+ error("invalid escape code in text string");
+ }
+ } else {
+ *sptr2++ = *sptr++;
+ }
+ }
+ *sptr2++ = *sptr++; // copy zero character
+ str = string3;
+ }
+
assert(sf != NULL);
sf->setColor(color);
@@ -643,6 +685,9 @@
if (string != NULL) {
free (string);
}
+ if (string3 != NULL) {
+ free (string3);
+ }
}
const char *SmushPlayer::getString(int id) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.236,1.237
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.h,1.38,1.39 game.cpp,1.115,1.116 gfx.cpp,1.68,1.69 ite_introproc.cpp,1.69,1.70 puzzle.cpp,1.16,1.17 saga.cpp,1.143,1.144 saga.h,1.131,1.132
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list