2007-06-21 22:00:00 +02:00
|
|
|
|
//=======================================================================
|
|
|
|
|
// Copyright XashXT Group 2007 <20>
|
2008-11-21 22:00:00 +01:00
|
|
|
|
// utils.h - shared utilities
|
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
|
2008-10-19 22:00:00 +02:00
|
|
|
|
#define ALIGN( a ) a = (byte *)((int)((byte *)a + 3) & ~ 3)
|
|
|
|
|
|
2007-11-11 22:00:00 +01:00
|
|
|
|
extern byte *basepool;
|
|
|
|
|
extern byte *zonepool;
|
2008-11-22 22:00:00 +01:00
|
|
|
|
extern bool enable_log;
|
2007-11-30 22:00:00 +01:00
|
|
|
|
extern stdlib_api_t com;
|
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;
|
2008-11-21 22:00:00 +01:00
|
|
|
|
extern string gs_basedir;
|
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
|
|
|
|
|
2008-11-21 22:00:00 +01:00
|
|
|
|
typedef enum
|
2007-12-20 22:00:00 +01:00
|
|
|
|
{
|
|
|
|
|
QC_SPRITEGEN = 1,
|
|
|
|
|
QC_STUDIOMDL,
|
|
|
|
|
QC_ROQLIB,
|
|
|
|
|
QC_WADLIB
|
2008-11-21 22:00:00 +01:00
|
|
|
|
} qctype_t;
|
2007-12-20 22:00:00 +01:00
|
|
|
|
|
2008-11-21 22:00:00 +01:00
|
|
|
|
bool Com_ValidScript( const char *token, qctype_t script_type );
|
|
|
|
|
float ColorNormalize( const vec3_t in, vec3_t out );
|
2007-12-20 22:00:00 +01:00
|
|
|
|
|
2007-11-10 22:00:00 +01:00
|
|
|
|
// misc
|
2008-11-21 22:00:00 +01:00
|
|
|
|
bool CompileStudioModel( byte *mempool, const char *name, byte parms );
|
|
|
|
|
bool CompileSpriteModel( byte *mempool, const char *name, byte parms );
|
|
|
|
|
bool CompileWad3Archive( byte *mempool, const char *name, byte parms );
|
2008-12-04 22:00:00 +01:00
|
|
|
|
bool CompileDPVideo( byte *mempool, const char *name, byte parms );
|
2008-11-21 22:00:00 +01:00
|
|
|
|
bool PrepareBSPModel( const char *dir, const char *name );
|
|
|
|
|
bool CompileBSPModel( void );
|
|
|
|
|
|
2007-09-14 22:00:00 +02:00
|
|
|
|
#endif//UTILS_H
|