mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 10:11:04 +00:00
Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before. Also adds an incomplete implementation on PhysFS. git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5c9b921285
commit
7414f29348
78 changed files with 1108 additions and 991 deletions
|
@ -11,6 +11,8 @@
|
|||
#include "compat.h"
|
||||
#include "cache1d.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||
static inline void skipoverws(scriptfile *sf) { if ((sf->textptr < sf->eof) && (!sf->textptr[0])) sf->textptr++; }
|
||||
|
@ -299,8 +301,8 @@ void scriptfile_preparse(scriptfile *sf, char *tx, int32_t flen)
|
|||
|
||||
scriptfile *scriptfile_fromfile(const char *fn)
|
||||
{
|
||||
int32_t fp = kopen4load(fn, 0);
|
||||
if (fp < 0) return nullptr;
|
||||
buildvfs_kfd fp = kopen4load(fn, 0);
|
||||
if (fp == buildvfs_kfd_invalid) return nullptr;
|
||||
|
||||
uint32_t flen = kfilelength(fp);
|
||||
char * tx = (char *)Xmalloc(flen + 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue