2012-03-26 22:03:20 +00:00
|
|
|
//
|
|
|
|
// Definitions of common non-engine data structures/functions
|
|
|
|
// (and declarations of data appearing in both)
|
|
|
|
// for EDuke32 and Mapster32
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef EDUKE32_COMMON_H_
|
|
|
|
#define EDUKE32_COMMON_H_
|
|
|
|
|
2012-03-26 22:05:23 +00:00
|
|
|
#include "scriptfile.h"
|
2012-03-28 19:41:57 +00:00
|
|
|
#include "cache1d.h"
|
2012-03-26 22:05:23 +00:00
|
|
|
|
2012-03-26 22:03:20 +00:00
|
|
|
|
|
|
|
//// TYPES
|
|
|
|
struct strllist
|
|
|
|
{
|
|
|
|
struct strllist *next;
|
|
|
|
char *str;
|
|
|
|
};
|
|
|
|
|
2012-03-26 22:05:23 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const char *text;
|
|
|
|
int32_t tokenid;
|
|
|
|
}
|
|
|
|
tokenlist;
|
|
|
|
|
2012-03-28 19:41:57 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
CACHE1D_FIND_REC *finddirs, *findfiles;
|
|
|
|
int32_t numdirs, numfiles;
|
|
|
|
}
|
|
|
|
fnlist_t;
|
|
|
|
|
|
|
|
#define FNLIST_INITIALIZER { NULL, NULL, 0, 0 }
|
|
|
|
|
2012-03-26 22:05:23 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
T_EOF = -2,
|
|
|
|
T_ERROR = -1,
|
|
|
|
};
|
|
|
|
|
2012-03-26 22:03:20 +00:00
|
|
|
|
|
|
|
//// EXTERN DECLS
|
|
|
|
extern struct strllist *CommandPaths, *CommandGrps;
|
|
|
|
|
|
|
|
|
|
|
|
//// FUNCTIONS
|
|
|
|
void G_AddGroup(const char *buffer);
|
|
|
|
void G_AddPath(const char *buffer);
|
|
|
|
|
2012-03-26 22:05:23 +00:00
|
|
|
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens);
|
|
|
|
|
2012-03-28 19:41:39 +00:00
|
|
|
int32_t check_file_exist(const char *fn);
|
|
|
|
|
2012-03-28 19:41:57 +00:00
|
|
|
void fnlist_clearnames(fnlist_t *fnl);
|
|
|
|
int32_t fnlist_getnames(fnlist_t *fnl, const char *dirname, const char *pattern,
|
|
|
|
int32_t dirflags, int32_t fileflags);
|
|
|
|
|
|
|
|
void G_LoadGroupsInDir(const char *dirname);
|
|
|
|
void G_DoAutoload(const char *dirname);
|
|
|
|
|
2012-03-26 22:03:20 +00:00
|
|
|
#endif
|