git-svn-id: https://svn.eduke32.com/eduke32@544 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-05-01 04:35:27 +00:00
parent 4ec4aac70f
commit fecd0c6e44

View file

@ -10,6 +10,7 @@
#include "baselayer.h" #include "baselayer.h"
#include "scriptfile.h" #include "scriptfile.h"
#include "cache1d.h" #include "cache1d.h"
#include "kplib.h"
enum { enum {
T_EOF = -2, T_EOF = -2,
@ -296,11 +297,16 @@ static int defsparser(scriptfile *script)
if (scriptfile_getstring(script,&fn)) break; if (scriptfile_getstring(script,&fn)) break;
i = pathsearchmode; i = pathsearchmode;
pathsearchmode = 1; pathsearchmode = 1;
if (!findfrompath(fn,&tfn)) { if (findfrompath(fn,&tfn) < 0) {
initprintf("Error: file '%s' does not exist\n",fn); char buf[BMAX_PATH];
pathsearchmode = i;
break; Bstrcpy(buf,fn);
kzfindfilestart(buf);
if (!kzfindfile(buf)) {
initprintf("Error: file '%s' does not exist\n",fn);
break;
}
} else Bfree(tfn); } else Bfree(tfn);
pathsearchmode = i; pathsearchmode = i;
@ -319,9 +325,15 @@ static int defsparser(scriptfile *script)
if (scriptfile_getstring(script,&fn[i])) break; //grab the 6 faces if (scriptfile_getstring(script,&fn[i])) break; //grab the 6 faces
ii = pathsearchmode; ii = pathsearchmode;
pathsearchmode = 1; pathsearchmode = 1;
if (!findfrompath(fn[i],&tfn)) { if (findfrompath(fn[i],&tfn) < 0) {
initprintf("Error: file '%s' does not exist\n",fn[i]); char buf[BMAX_PATH];
happy = 0;
Bstrcpy(buf,fn[i]);
kzfindfilestart(buf);
if (!kzfindfile(buf)) {
initprintf("Error: file '%s' does not exist\n",fn[i]);
happy = 0;
}
} else Bfree(tfn); } else Bfree(tfn);
pathsearchmode = ii; pathsearchmode = ii;
} }
@ -1072,9 +1084,15 @@ static int defsparser(scriptfile *script)
if (!fn[i]) initprintf("Error: missing '%s filename' for skybox definition near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0; if (!fn[i]) initprintf("Error: missing '%s filename' for skybox definition near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
ii = pathsearchmode; ii = pathsearchmode;
pathsearchmode = 1; pathsearchmode = 1;
if (!findfrompath(fn[i],&tfn)) { if (findfrompath(fn[i],&tfn) < 0) {
initprintf("Error: file '%s' does not exist\n",fn[i]); char buf[BMAX_PATH];
happy = 0;
Bstrcpy(buf,fn[i]);
kzfindfilestart(buf);
if (!kzfindfile(buf)) {
initprintf("Error: file '%s' does not exist\n",fn[i]);
happy = 0;
}
} else Bfree(tfn); } else Bfree(tfn);
pathsearchmode = ii; pathsearchmode = ii;
} }
@ -1163,9 +1181,15 @@ static int defsparser(scriptfile *script)
i = pathsearchmode; i = pathsearchmode;
pathsearchmode = 1; pathsearchmode = 1;
if (!findfrompath(fn,&tfn)) { if (findfrompath(fn,&tfn) < 0) {
initprintf("Error: file '%s' does not exist\n",fn); char buf[BMAX_PATH];
break;
Bstrcpy(buf,fn);
kzfindfilestart(buf);
if (!kzfindfile(buf)) {
initprintf("Error: file '%s' does not exist\n",fn);
break;
}
} else Bfree(tfn); } else Bfree(tfn);
pathsearchmode = i; pathsearchmode = i;
xscale = 1.0f / xscale; xscale = 1.0f / xscale;
@ -1204,11 +1228,16 @@ static int defsparser(scriptfile *script)
} }
i = pathsearchmode; i = pathsearchmode;
pathsearchmode = 1; pathsearchmode = 1;
if (!findfrompath(fn,&tfn)) { if (findfrompath(fn,&tfn) < 0) {
initprintf("Error: file '%s' does not exist\n",fn); char buf[BMAX_PATH];
pathsearchmode = i;
break; Bstrcpy(buf,fn);
kzfindfilestart(buf);
if (!kzfindfile(buf)) {
initprintf("Error: file '%s' does not exist\n",fn);
break;
}
} else Bfree(tfn); } else Bfree(tfn);
pathsearchmode = i; pathsearchmode = i;