aselib.c File Reference

ASE model loading. More...

#include "../bsp.h"
#include "shared.h"
#include "aselib.h"
Include dependency graph for aselib.c:

Go to the source code of this file.

Data Structures

struct  aseVertex_t
struct  aseTVertex_t
struct  aseMesh_t
struct  aseMeshAnimation_t
struct  aseMaterial_t
struct  aseGeomObject_t
 contains the animate sequence of a single surface using a single material More...
struct  ase_t

Defines

#define MAX_ASE_MATERIALS   32
#define MAX_ASE_OBJECTS   64
#define MAX_ASE_ANIMATIONS   32
#define MAX_ASE_ANIMATION_FRAMES   512
#define VERBOSE(x)   { if (ase.verbose) { Com_Printf x; } }

Typedefs

typedef int aseFace_t [3]

Functions

static void ASE_Process (void)
static void ASE_FreeGeomObject (int ndx)
void ASE_Load (const char *filename, qboolean verbose)
void ASE_Free (void)
int ASE_GetNumSurfaces (void)
const char * ASE_GetSurfaceName (int which)
polyset_tASE_GetSurfaceAnimation (int whichSurface)
 Returns an animation (sequence of polysets).
static aseMesh_tASE_GetCurrentMesh (void)
static int CharIsTokenDelimiter (int ch)
static int ASE_GetToken (qboolean restOfLine)
static void ASE_ParseBracedBlock (void(*parser)(const char *token))
static void ASE_SkipEnclosingBraces (void)
static void ASE_SkipRestOfLine (void)
static void ASE_KeyMAP_DIFFUSE (const char *token)
static void ASE_KeyMATERIAL (const char *token)
static void ASE_KeyMATERIAL_LIST (const char *token)
static void ASE_KeyMESH_VERTEX_LIST (const char *token)
static void ASE_KeyMESH_FACE_LIST (const char *token)
static void ASE_KeyTFACE_LIST (const char *token)
static void ASE_KeyMESH_TVERTLIST (const char *token)
static void ASE_KeyMESH (const char *token)
static void ASE_KeyGEOMOBJECT (const char *token)
static void ConcatenateObjects (aseGeomObject_t *pObjA, aseGeomObject_t *pObjB)
static void CollapseObjects (void)

Variables

static char s_token [1024]
static ase_t ase

Detailed Description

ASE model loading.

Definition in file aselib.c.


Define Documentation

#define MAX_ASE_ANIMATION_FRAMES   512

Definition at line 34 of file aselib.c.

Referenced by ASE_GetCurrentMesh(), and ASE_KeyGEOMOBJECT().

#define MAX_ASE_ANIMATIONS   32

Definition at line 33 of file aselib.c.

#define MAX_ASE_MATERIALS   32

Definition at line 31 of file aselib.c.

Referenced by ASE_KeyMATERIAL_LIST().

#define MAX_ASE_OBJECTS   64

Definition at line 32 of file aselib.c.

Referenced by ASE_GetCurrentMesh(), and ASE_Process().

#define VERBOSE (  )     { if (ase.verbose) { Com_Printf x; } }

Definition at line 36 of file aselib.c.

Referenced by ASE_KeyGEOMOBJECT(), ASE_KeyMATERIAL_LIST(), ASE_KeyMESH(), and ASE_Process().


Typedef Documentation

typedef int aseFace_t[3]

Definition at line 48 of file aselib.c.


Function Documentation

void ASE_Free ( void   ) 

Definition at line 135 of file aselib.c.

References ASE_FreeGeomObject(), ase_t::currentObject, and i.

static void ASE_FreeGeomObject ( int  ndx  )  [static]
static aseMesh_t* ASE_GetCurrentMesh ( void   )  [static]
int ASE_GetNumSurfaces ( void   ) 

Definition at line 143 of file aselib.c.

References ase_t::currentObject.

polyset_t* ASE_GetSurfaceAnimation ( int  whichSurface  ) 
const char* ASE_GetSurfaceName ( int  which  ) 
static int ASE_GetToken ( qboolean  restOfLine  )  [static]
static void ASE_KeyGEOMOBJECT ( const char *  token  )  [static]
static void ASE_KeyMAP_DIFFUSE ( const char *  token  )  [static]
static void ASE_KeyMATERIAL ( const char *  token  )  [static]

Definition at line 342 of file aselib.c.

References ASE_KeyMAP_DIFFUSE(), and ASE_ParseBracedBlock().

Referenced by ASE_KeyMATERIAL_LIST().

static void ASE_KeyMATERIAL_LIST ( const char *  token  )  [static]
static void ASE_KeyMESH ( const char *  token  )  [static]
static void ASE_KeyMESH_FACE_LIST ( const char *  token  )  [static]
static void ASE_KeyMESH_TVERTLIST ( const char *  token  )  [static]
static void ASE_KeyMESH_VERTEX_LIST ( const char *  token  )  [static]
static void ASE_KeyTFACE_LIST ( const char *  token  )  [static]
void ASE_Load ( const char *  filename,
qboolean  verbose 
)
static void ASE_ParseBracedBlock ( void(*)(const char *token)  parser  )  [static]
static void ASE_Process ( void   )  [static]
static void ASE_SkipEnclosingBraces ( void   )  [static]

Definition at line 302 of file aselib.c.

References ASE_GetToken(), qfalse, s_token, and Sys_Error().

Referenced by ASE_KeyGEOMOBJECT(), and ASE_Process().

static void ASE_SkipRestOfLine ( void   )  [static]

Definition at line 319 of file aselib.c.

References ASE_GetToken(), and qtrue.

Referenced by ASE_KeyGEOMOBJECT(), and ASE_Process().

static int CharIsTokenDelimiter ( int  ch  )  [inline, static]

Definition at line 242 of file aselib.c.

Referenced by ASE_GetToken().

static void CollapseObjects ( void   )  [static]
static void ConcatenateObjects ( aseGeomObject_t pObjA,
aseGeomObject_t pObjB 
) [static]

Definition at line 597 of file aselib.c.

Referenced by CollapseObjects().


Variable Documentation

ase_t ase [static]

Definition at line 101 of file aselib.c.

char s_token[1024] [static]

Generated by  doxygen 1.6.2