2009-11-03 22:00:00 +01:00
|
|
|
|
//=======================================================================
|
|
|
|
|
// Copyright XashXT Group 2009 <20>
|
2010-01-08 22:00:00 +01:00
|
|
|
|
// com_export.h - safe calls exports from other libraries
|
2009-11-03 22:00:00 +01:00
|
|
|
|
//=======================================================================
|
2010-01-08 22:00:00 +01:00
|
|
|
|
#ifndef COM_EXPORT_H
|
|
|
|
|
#define COM_EXPORT_H
|
2009-11-03 22:00:00 +01:00
|
|
|
|
|
2010-11-16 22:00:00 +01:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-11-03 22:00:00 +01:00
|
|
|
|
// linked interfaces
|
2010-07-01 22:00:00 +02:00
|
|
|
|
extern stdlib_api_t com;
|
2009-11-03 22:00:00 +01:00
|
|
|
|
|
2010-11-16 22:00:00 +01:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-02-28 22:00:00 +01:00
|
|
|
|
// MD5 Hash
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
uint buf[4];
|
|
|
|
|
uint bits[2];
|
|
|
|
|
byte in[64];
|
|
|
|
|
} MD5Context_t;
|
|
|
|
|
|
2010-12-06 22:00:00 +01:00
|
|
|
|
#define TF_SKY (TF_SKYSIDE|TF_UNCOMPRESSED|TF_NOMIPMAP|TF_NOPICMIP)
|
2010-12-02 22:00:00 +01:00
|
|
|
|
#define TF_FONT (TF_UNCOMPRESSED|TF_NOPICMIP|TF_NOMIPMAP|TF_CLAMP)
|
|
|
|
|
#define TF_IMAGE (TF_UNCOMPRESSED|TF_NOPICMIP|TF_NOMIPMAP)
|
|
|
|
|
#define TF_DECAL (TF_CLAMP|TF_UNCOMPRESSED)
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
TF_STATIC = BIT(0), // don't free until Shader_FreeUnused()
|
|
|
|
|
TF_NOPICMIP = BIT(1), // ignore r_picmip resample rules
|
|
|
|
|
TF_UNCOMPRESSED = BIT(2), // don't compress texture in video memory
|
|
|
|
|
TF_CUBEMAP = BIT(3), // it's cubemap texture
|
|
|
|
|
TF_DEPTHMAP = BIT(4), // custom texture filter used
|
|
|
|
|
TF_INTENSITY = BIT(5),
|
|
|
|
|
TF_LUMINANCE = BIT(6), // force image to grayscale
|
|
|
|
|
TF_SKYSIDE = BIT(7),
|
|
|
|
|
TF_CLAMP = BIT(8),
|
|
|
|
|
TF_NOMIPMAP = BIT(9),
|
|
|
|
|
TF_NEAREST = BIT(10), // disable texfilter
|
2010-12-03 22:00:00 +01:00
|
|
|
|
TF_HAS_LUMA = BIT(11), // sets by GL_UploadTexture
|
|
|
|
|
TF_MAKELUMA = BIT(12), // create luma from quake texture
|
|
|
|
|
TF_NORMALMAP = BIT(13), // is a normalmap
|
2010-12-11 22:00:00 +01:00
|
|
|
|
TF_LIGHTMAP = BIT(14), // is a lightmap
|
2010-12-02 22:00:00 +01:00
|
|
|
|
} texFlags_t;
|
|
|
|
|
|
2010-12-09 22:00:00 +01:00
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
vec3_t position;
|
2011-02-15 22:00:00 +01:00
|
|
|
|
char name[64];
|
|
|
|
|
short entityIndex;
|
2010-12-09 22:00:00 +01:00
|
|
|
|
byte depth;
|
|
|
|
|
byte flags;
|
|
|
|
|
|
|
|
|
|
// this is the surface plane that we hit so that
|
|
|
|
|
// we can move certain decals across
|
|
|
|
|
// transitions if they hit similar geometry
|
|
|
|
|
vec3_t impactPlaneNormal;
|
|
|
|
|
} decallist_t;
|
|
|
|
|
|
2011-02-28 22:00:00 +01:00
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
string name;
|
|
|
|
|
int entnum;
|
|
|
|
|
vec3_t origin;
|
|
|
|
|
float volume;
|
|
|
|
|
float attenuation;
|
|
|
|
|
qboolean looping;
|
|
|
|
|
int pitch;
|
|
|
|
|
} soundlist_t;
|
|
|
|
|
|
2010-11-29 22:00:00 +01:00
|
|
|
|
qboolean R_Init( void );
|
|
|
|
|
void R_Shutdown( void );
|
2010-12-21 22:00:00 +01:00
|
|
|
|
void VID_CheckChanges( void );
|
2010-11-29 22:00:00 +01:00
|
|
|
|
int GL_LoadTexture( const char *name, const byte *buf, size_t size, int flags );
|
|
|
|
|
void GL_FreeImage( const char *name );
|
|
|
|
|
qboolean VID_ScreenShot( const char *filename, int shot_type );
|
|
|
|
|
qboolean VID_CubemapShot( const char *base, uint size, const float *vieworg, qboolean skyshot );
|
|
|
|
|
void VID_RestoreGamma( void );
|
|
|
|
|
void R_BeginFrame( qboolean clearScene );
|
|
|
|
|
void R_RenderFrame( const ref_params_t *fd, qboolean drawWorld );
|
|
|
|
|
void R_EndFrame( void );
|
|
|
|
|
void R_ClearScene( void );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
void R_GetTextureParms( int *w, int *h, int texnum );
|
|
|
|
|
void R_GetSpriteParms( int *frameWidth, int *frameHeight, int *numFrames, int curFrame, const struct model_s *pSprite );
|
2010-11-29 22:00:00 +01:00
|
|
|
|
void R_DrawStretchRaw( float x, float y, float w, float h, int cols, int rows, const byte *data, qboolean dirty );
|
|
|
|
|
void R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, int texnum );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
qboolean R_SpeedsMessage( char *out, size_t size );
|
|
|
|
|
void R_SetupSky( const char *skyboxname );
|
2010-12-14 22:00:00 +01:00
|
|
|
|
qboolean R_CullBox( const vec3_t mins, const vec3_t maxs, uint clipflags );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
qboolean R_WorldToScreen( const vec3_t point, vec3_t screen );
|
|
|
|
|
void R_ScreenToWorld( const vec3_t screen, vec3_t point );
|
2010-12-06 22:00:00 +01:00
|
|
|
|
qboolean R_AddEntity( struct cl_entity_s *pRefEntity, int entityType );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
void Mod_LoadSpriteModel( struct model_s *mod, const void *buffer );
|
|
|
|
|
void Mod_LoadMapSprite( struct model_s *mod, const void *buffer, size_t size );
|
|
|
|
|
void Mod_UnloadSpriteModel( struct model_s *mod );
|
2010-12-06 22:00:00 +01:00
|
|
|
|
void Mod_UnloadStudioModel( struct model_s *mod );
|
|
|
|
|
void Mod_UnloadBrushModel( struct model_s *mod );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
void GL_SetRenderMode( int mode );
|
2010-12-17 22:00:00 +01:00
|
|
|
|
void R_RunViewmodelEvents( void );
|
2010-12-27 22:00:00 +01:00
|
|
|
|
void R_DrawViewModel( void );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
int R_GetSpriteTexture( const struct model_s *m_pSpriteModel, int frame );
|
2010-12-20 22:00:00 +01:00
|
|
|
|
void R_LightForPoint( const vec3_t point, color24 *ambientLight, qboolean invLight, float radius );
|
2010-12-23 22:00:00 +01:00
|
|
|
|
void R_DecalShoot( int textureIndex, int entityIndex, int modelIndex, vec3_t pos, int flags, vec3_t saxis );
|
2010-12-06 22:00:00 +01:00
|
|
|
|
void R_RemoveEfrags( struct cl_entity_s *ent );
|
|
|
|
|
void R_AddEfrags( struct cl_entity_s *ent );
|
2010-12-02 22:00:00 +01:00
|
|
|
|
void R_DecalRemoveAll( int texture );
|
|
|
|
|
byte *Mod_GetCurrentVis( void );
|
2010-12-03 22:00:00 +01:00
|
|
|
|
void R_NewMap( void );
|
2010-10-16 22:00:00 +02:00
|
|
|
|
|
2010-01-08 22:00:00 +01:00
|
|
|
|
#endif//COM_EXPORT_H
|