2007-06-21 22:00:00 +02:00
|
|
|
|
//=======================================================================
|
|
|
|
|
// Copyright XashXT Group 2007 <20>
|
2007-09-14 22:00:00 +02:00
|
|
|
|
// utils.h - shared engine utility
|
2007-06-21 22:00:00 +02:00
|
|
|
|
//=======================================================================
|
2007-09-14 22:00:00 +02:00
|
|
|
|
#ifndef UTILS_H
|
|
|
|
|
#define UTILS_H
|
2007-06-21 22:00:00 +02:00
|
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
2007-11-11 22:00:00 +01:00
|
|
|
|
// bsplib compile flags
|
|
|
|
|
#define BSP_ONLYENTS 0x01
|
|
|
|
|
#define BSP_ONLYVIS 0x02
|
|
|
|
|
#define BSP_ONLYRAD 0x04
|
|
|
|
|
#define BSP_FULLCOMPILE 0x08
|
2008-10-19 22:00:00 +02:00
|
|
|
|
#define ALIGN( a ) a = (byte *)((int)((byte *)a + 3) & ~ 3)
|
|
|
|
|
|
2007-11-10 22:00:00 +01:00
|
|
|
|
extern int com_argc;
|
|
|
|
|
extern char **com_argv;
|
2007-11-11 22:00:00 +01:00
|
|
|
|
extern byte *basepool;
|
|
|
|
|
extern byte *zonepool;
|
2007-10-08 22:00:00 +02:00
|
|
|
|
|
2007-11-30 22:00:00 +01:00
|
|
|
|
extern stdlib_api_t com;
|
2008-06-04 22:00:00 +02:00
|
|
|
|
extern vprogs_exp_t *PRVM;
|
2007-09-12 22:00:00 +02:00
|
|
|
|
|
2008-05-18 22:00:00 +02:00
|
|
|
|
#define Sys_Error com.error
|
2008-11-06 22:00:00 +01:00
|
|
|
|
#define Malloc(size) Mem_Alloc( basepool, size )
|
2007-06-21 22:00:00 +02:00
|
|
|
|
|
2008-01-05 22:00:00 +01:00
|
|
|
|
extern string gs_filename;
|
2007-06-21 22:00:00 +02:00
|
|
|
|
extern char gs_basedir[ MAX_SYSPATH ];
|
2008-08-07 22:00:00 +02:00
|
|
|
|
extern byte *error_bmp;
|
|
|
|
|
extern size_t error_bmp_size;
|
2007-06-21 22:00:00 +02:00
|
|
|
|
|
|
|
|
|
extern byte *studiopool;
|
|
|
|
|
|
2007-12-20 22:00:00 +01:00
|
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
QC_SPRITEGEN = 1,
|
|
|
|
|
QC_STUDIOMDL,
|
|
|
|
|
QC_ROQLIB,
|
|
|
|
|
QC_WADLIB
|
|
|
|
|
};
|
|
|
|
|
|
2008-11-01 22:00:00 +01:00
|
|
|
|
bool Com_ValidScript( const char *token, int scripttype );
|
2007-12-20 22:00:00 +01:00
|
|
|
|
|
2007-11-10 22:00:00 +01:00
|
|
|
|
// misc
|
2007-06-29 22:00:00 +02:00
|
|
|
|
bool CompileStudioModel ( byte *mempool, const char *name, byte parms );
|
|
|
|
|
bool CompileSpriteModel ( byte *mempool, const char *name, byte parms );
|
2007-09-19 22:00:00 +02:00
|
|
|
|
bool ConvertImagePixels ( byte *mempool, const char *name, byte parms );
|
2007-12-20 22:00:00 +01:00
|
|
|
|
bool CompileWad3Archive ( byte *mempool, const char *name, byte parms );
|
2007-12-02 22:00:00 +01:00
|
|
|
|
bool CompileROQVideo( byte *mempool, const char *name, byte parms );
|
2007-06-29 22:00:00 +02:00
|
|
|
|
bool PrepareBSPModel ( const char *dir, const char *name, byte params );
|
|
|
|
|
bool CompileBSPModel ( void );
|
2007-09-14 22:00:00 +02:00
|
|
|
|
#endif//UTILS_H
|