[Scummvm-cvs-logs] SF.net SVN: scummvm: [23171] scummvm/trunk/engines/scumm/he
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Jun 18 12:46:35 CEST 2006
Revision: 23171
Author: kirben
Date: 2006-06-18 03:46:22 -0700 (Sun, 18 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23171&view=rev
Log Message:
-----------
Add alternative method to prevent debug code of scripts been triggered in lost. Fixes regressions when convertFilePath() is used by some HE games
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v60he.cpp
scummvm/trunk/engines/scumm/he/script_v72he.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v60he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v60he.cpp 2006-06-18 10:46:22 UTC (rev 23170)
+++ scummvm/trunk/engines/scumm/he/script_v60he.cpp 2006-06-18 10:46:22 UTC (rev 23171)
@@ -423,12 +423,13 @@
// Strip path
int r = 0;
- if (dst[0] == '.' && dst[1] == '/') { // './'
+ if (dst[0] == '.' && dst[1] == '/') {
r = 2;
- } else if (dst[0] == 'c' && dst[1] == ':' && dst[3] == 'h') { // 'c:/hegames/'
- r = 11;
- } else if (dst[0] == 'c' && dst[1] == ':' && dst[3] == 'w') { // 'c:/windows/'
- r = 11;
+ } else if (dst[0] == 'c' && dst[1] == ':') {
+ for (r = len; r != 0; r--) {
+ if (dst[r - 1] == '/')
+ break;
+ }
}
debug(1, "convertFilePath: converted filePath is %s", dst + r);
Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-06-18 10:46:22 UTC (rev 23170)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-06-18 10:46:22 UTC (rev 23171)
@@ -1087,6 +1087,8 @@
if (!a)
return;
+ printf("o72_actorOps: Actor %d subOp %d\n", a->_number, subOp);
+
switch (subOp) {
case 21: // HE 80+
k = getStackList(args, ARRAYSIZE(args));
@@ -1721,6 +1723,14 @@
const char *filename = (char *)buffer + convertFilePath(buffer);
debug(1, "Final filename to %s", filename);
+ // Work around for lost, to avoid debug code been triggered.
+ // The 'TEST.FYL' file is always deleted after been created
+ // but we currently don't support deleting files.
+ if (!strcmp(filename, "TEST.FYL")) {
+ push(-1);
+ return;
+ }
+
slot = -1;
for (i = 1; i < 17; i++) {
if (_hInFileTable[i] == 0 && _hOutFileTable[i] == 0) {
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