UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
aselib.cpp File Reference

ASE model loading. More...

#include "aselib.h"
#include "../bsp.h"
#include "shared.h"

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
 

Macros

#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, bool 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) More...
 
static aseMesh_tASE_GetCurrentMesh (void)
 
static int CharIsTokenDelimiter (int ch)
 
static int ASE_GetToken (bool 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.cpp.

Macro Definition Documentation

#define MAX_ASE_ANIMATION_FRAMES   512

Definition at line 34 of file aselib.cpp.

Referenced by ASE_GetCurrentMesh(), and ASE_KeyGEOMOBJECT().

#define MAX_ASE_ANIMATIONS   32

Definition at line 33 of file aselib.cpp.

#define MAX_ASE_MATERIALS   32

Definition at line 31 of file aselib.cpp.

Referenced by ASE_KeyMATERIAL_LIST().

#define MAX_ASE_OBJECTS   64

Definition at line 32 of file aselib.cpp.

Referenced by ASE_GetCurrentMesh(), and ASE_Process().

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

Definition at line 36 of file aselib.cpp.

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.cpp.

Function Documentation

void ASE_Free ( void  )

Definition at line 131 of file aselib.cpp.

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

int ASE_GetNumSurfaces ( void  )

Definition at line 137 of file aselib.cpp.

References ase_t::currentObject.

const char* ASE_GetSurfaceName ( int  which)
static void ASE_KeyMAP_DIFFUSE ( const char *  token)
static
static void ASE_KeyMATERIAL ( const char *  token)
static

Definition at line 329 of file aselib.cpp.

References ASE_KeyMAP_DIFFUSE(), ASE_ParseBracedBlock(), and Q_streq.

Referenced by ASE_KeyMATERIAL_LIST().

static void ASE_KeyMATERIAL_LIST ( 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,
bool  verbose 
)
static void ASE_ParseBracedBlock ( void(*)(const char *token)  parser)
static
static void ASE_SkipEnclosingBraces ( void  )
static

Definition at line 289 of file aselib.cpp.

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

Referenced by ASE_KeyGEOMOBJECT(), and ASE_Process().

static void ASE_SkipRestOfLine ( void  )
static

Definition at line 306 of file aselib.cpp.

References ASE_GetToken().

Referenced by ASE_KeyGEOMOBJECT(), and ASE_Process().

static int CharIsTokenDelimiter ( int  ch)
inlinestatic

Definition at line 229 of file aselib.cpp.

Referenced by ASE_GetToken().

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

Definition at line 586 of file aselib.cpp.

Referenced by CollapseObjects().

Variable Documentation

ase_t ase
static

Definition at line 101 of file aselib.cpp.