[Scummvm-cvs-logs] CVS: scummvm/scumm script_v72he.cpp,2.83,2.84 string.cpp,1.250,1.251
Travis Howell
kirben at users.sourceforge.net
Sun Sep 12 21:17:04 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.387,1.388
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.242,2.243 script_v7he.cpp,2.76,2.77 script_v80he.cpp,2.15,2.16 script_v90he.cpp,2.27,2.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17809/scumm
Modified Files:
script_v72he.cpp string.cpp
Log Message:
Debug code strings should use string num, not var num.
Updated work around for loading datafiles.
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.83
retrieving revision 2.84
diff -u -d -r2.83 -r2.84
--- script_v72he.cpp 13 Sep 2004 02:24:28 -0000 2.83
+++ script_v72he.cpp 13 Sep 2004 04:16:22 -0000 2.84
@@ -550,23 +550,14 @@
len = resStrLen(string) + 1;
}
- // The boot script in some HE games just set data file name
- // to a bunch to spaces for some odd reason.
- // We work around that.
- if (!strcmp((char *)string,"%s.he3")) {
- memset(string, 0, sizeof(string));
- sprintf((char *)string, "%s.he3", _gameName.c_str());
- len = resStrLen(string);
- }
-
while (len--) {
chr = string[num++];
if (chr == 0x25) {
chr = string[num++];
if (chr == 0x64)
- dst += snprintf((char *)dst, 5, "%d", args[val++]);
+ dst += snprintf((char *)dst, 10, "%d", args[val++]);
else if (chr == 0x73)
- dst += addStringToStack(dst, 1024, args[val++]);
+ dst += addStringToStack(dst, 512, args[val++]);
continue;
}
*dst++ = chr;
@@ -1455,6 +1446,16 @@
mode = pop();
copyScriptString(filename);
+ // The boot script in some HE games doen't set the
+ // complete data file name. So we work around that.
+ if (!strcmp((char *)filename,".he3")) {
+ memset(filename, 0, sizeof(filename));
+ sprintf((char *)filename, "%s.he3", _gameName.c_str());
+ } else if (!strcmp((char *)filename,".he7")) {
+ memset(filename, 0, sizeof(filename));
+ sprintf((char *)filename, "%s.he7", _gameName.c_str());
+ }
+
debug(1,"File %s", filename);
for (r = strlen((char*)filename); r != 0; r--) {
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- string.cpp 12 Sep 2004 06:00:56 -0000 1.250
+++ string.cpp 13 Sep 2004 04:16:22 -0000 1.251
@@ -627,7 +627,7 @@
return i;
}
- if (_version == 3 || _version >= 6)
+ if (_version == 3 || (_version >= 6 && _heversion < 72))
var = readVar(var);
if (var) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.387,1.388
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.242,2.243 script_v7he.cpp,2.76,2.77 script_v80he.cpp,2.15,2.16 script_v90he.cpp,2.27,2.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list