R:/projects/actioncube/_svn/trunk/ac/source/src/rendermodel.cpp File Reference

#include "pch.h"
#include "cube.h"
#include "tristrip.h"
#include "modelcache.h"
#include "vertmodel.h"
#include "md2.h"
#include "md3.h"

Include dependency graph for rendermodel.cpp:


Classes

struct  batchedmodel
struct  modelbatch
struct  translucentmodel

Defines

#define checkmdl   if(!loadingmodel) { conoutf("not loading a model"); return; }
#define ifnoload   if((skin = textureload(path))==notexture)
#define SKINBASE   "packages/models/playermodels"

Functions

 VARP (animationinterpolationtime, 0, 150, 1000)
void mdlcullface (int cullface)
 COMMAND (mdlcullface, ARG_1INT)
void mdlvertexlight (int vertexlight)
 COMMAND (mdlvertexlight, ARG_1INT)
void mdltranslucent (int translucency)
 COMMAND (mdltranslucent, ARG_1INT)
void mdlalphatest (int alphatest)
 COMMAND (mdlalphatest, ARG_1INT)
void mdlscale (int percent)
 COMMAND (mdlscale, ARG_1INT)
void mdltrans (char *x, char *y, char *z)
 COMMAND (mdltrans, ARG_3STR)
void mdlshadowdist (int dist)
 COMMAND (mdlshadowdist, ARG_1INT)
void mdlcachelimit (int limit)
 COMMAND (mdlcachelimit, ARG_1INT)
void mapmodel (char *rad, char *h, char *zoff, char *snap, char *name)
void mapmodelreset ()
mapmodelinfo & getmminfo (int i)
 COMMAND (mapmodel, ARG_5STR)
 COMMAND (mapmodelreset, ARG_NONE)
model * loadmodel (const char *name, int i)
void cleanupmodels ()
 VARP (dynshadow, 0, 40, 100)
 VARP (dynshadowdecay, 0, 1000, 3000)
void startmodelbatches ()
batchedmodel & addbatchedmodel (model *m)
void renderbatchedmodel (model *m, batchedmodel &b)
void renderbatchedmodelshadow (model *m, batchedmodel &b)
static int sortbatchedmodels (const batchedmodel *x, const batchedmodel *y)
static int sorttranslucentmodels (const translucentmodel *x, const translucentmodel *y)
void clearmodelbatches ()
void endmodelbatches (bool flush)
 VAR (dbgmbatch, 0, 0, 1)
void rendermodel (const char *mdl, int anim, int tex, float rad, const vec &o, float yaw, float pitch, float speed, int basetime, playerent *d, modelattach *a, float scale)
int findanim (const char *name)
void loadskin (const char *dir, const char *altdir, Texture *&skin)
void preload_playermodels ()
void preload_entmodels ()
void preload_mapmodels ()
 VAR (dbghbox, 0, 0, 1)
void renderhbox (playerent *d)
void renderclient (playerent *d, const char *mdlname, const char *vwepname, int tex)
 VARP (teamdisplaymode, 0, 1, 2)
 VARP (hidecustomskins, 0, 0, 1)
const char * getclientskin (const char *name, const char *suf)
void updateclientname (playerent *d)
void renderclient (playerent *d)
void renderclients ()

Variables

model * loadingmodel = NULL
vector< mapmodelinfo > mapmodels
hashtable< const char *, model * > mdllookup
static vector< modelbatch * > batches
static vector< modelattach > modelattached
static int numbatches = -1
static cvector playerskinlist

Define Documentation

#define checkmdl   if(!loadingmodel) { conoutf("not loading a model"); return; }

#define ifnoload   if((skin = textureload(path))==notexture)

#define SKINBASE   "packages/models/playermodels"


Function Documentation

batchedmodel& addbatchedmodel ( model *  m  ) 

void cleanupmodels (  ) 

void clearmodelbatches (  ) 

COMMAND ( mapmodelreset  ,
ARG_NONE   
)

COMMAND ( mapmodel  ,
ARG_5STR   
)

COMMAND ( mdlcachelimit  ,
ARG_1INT   
)

COMMAND ( mdlshadowdist  ,
ARG_1INT   
)

COMMAND ( mdltrans  ,
ARG_3STR   
)

COMMAND ( mdlscale  ,
ARG_1INT   
)

COMMAND ( mdlalphatest  ,
ARG_1INT   
)

COMMAND ( mdltranslucent  ,
ARG_1INT   
)

COMMAND ( mdlvertexlight  ,
ARG_1INT   
)

COMMAND ( mdlcullface  ,
ARG_1INT   
)

void endmodelbatches ( bool  flush  ) 

int findanim ( const char *  name  ) 

const char* getclientskin ( const char *  name,
const char *  suf 
)

mapmodelinfo& getmminfo ( int  i  ) 

model* loadmodel ( const char *  name,
int  i 
)

void loadskin ( const char *  dir,
const char *  altdir,
Texture *&  skin 
)

void mapmodel ( char *  rad,
char *  h,
char *  zoff,
char *  snap,
char *  name 
)

void mapmodelreset (  ) 

void mdlalphatest ( int  alphatest  ) 

void mdlcachelimit ( int  limit  ) 

void mdlcullface ( int  cullface  ) 

void mdlscale ( int  percent  ) 

void mdlshadowdist ( int  dist  ) 

void mdltrans ( char *  x,
char *  y,
char *  z 
)

void mdltranslucent ( int  translucency  ) 

void mdlvertexlight ( int  vertexlight  ) 

void preload_entmodels (  ) 

void preload_mapmodels (  ) 

void preload_playermodels (  ) 

void renderbatchedmodel ( model *  m,
batchedmodel &  b 
)

void renderbatchedmodelshadow ( model *  m,
batchedmodel &  b 
)

void renderclient ( playerent *  d  ) 

void renderclient ( playerent *  d,
const char *  mdlname,
const char *  vwepname,
int  tex 
)

void renderclients (  ) 

void renderhbox ( playerent *  d  ) 

void rendermodel ( const char *  mdl,
int  anim,
int  tex,
float  rad,
const vec &  o,
float  yaw,
float  pitch,
float  speed,
int  basetime,
playerent *  d,
modelattach *  a,
float  scale 
)

static int sortbatchedmodels ( const batchedmodel *  x,
const batchedmodel *  y 
) [static]

static int sorttranslucentmodels ( const translucentmodel *  x,
const translucentmodel *  y 
) [static]

void startmodelbatches (  ) 

void updateclientname ( playerent *  d  ) 

VAR ( dbghbox  ,
0  ,
0  ,
1   
)

VAR ( dbgmbatch  ,
0  ,
0  ,
1   
)

VARP ( hidecustomskins  ,
0  ,
0  ,
1   
)

VARP ( teamdisplaymode  ,
0  ,
1  ,
2   
)

VARP ( dynshadowdecay  ,
0  ,
1000  ,
3000   
)

VARP ( dynshadow  ,
0  ,
40  ,
100   
)

VARP ( animationinterpolationtime  ,
0  ,
150  ,
1000   
)


Variable Documentation

vector<modelbatch *> batches [static]

hashtable<const char *, model *> mdllookup

int numbatches = -1 [static]


Generated on Mon Dec 8 21:41:32 2008 for AssaultCube by  doxygen 1.5.7.1