UFO: Alien Invasion
Loading...
Searching...
No Matches
aselib.cpp File Reference

ASE model loading. More...

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

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)

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

◆ MAX_ASE_ANIMATION_FRAMES

#define MAX_ASE_ANIMATION_FRAMES   512

Definition at line 34 of file aselib.cpp.

Referenced by ASE_GetCurrentMesh(), and ASE_KeyGEOMOBJECT().

◆ MAX_ASE_ANIMATIONS

#define MAX_ASE_ANIMATIONS   32

Definition at line 33 of file aselib.cpp.

◆ MAX_ASE_MATERIALS

#define MAX_ASE_MATERIALS   32

Definition at line 31 of file aselib.cpp.

Referenced by ASE_KeyMATERIAL_LIST().

◆ MAX_ASE_OBJECTS

#define MAX_ASE_OBJECTS   64

Definition at line 32 of file aselib.cpp.

Referenced by ASE_GetCurrentMesh(), and ASE_Process().

◆ VERBOSE

#define VERBOSE ( x)
Value:
{ if (ase.verbose) { Com_Printf x; } }
static ase_t ase
Definition aselib.cpp:101
void Com_Printf(const char *const fmt,...)
Definition common.cpp:428

Definition at line 36 of file aselib.cpp.

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

Typedef Documentation

◆ aseFace_t

typedef int aseFace_t[3]

Definition at line 48 of file aselib.cpp.

Function Documentation

◆ ASE_Free()

void ASE_Free ( void )

Definition at line 131 of file aselib.cpp.

References ase, ASE_FreeGeomObject(), and i.

◆ ASE_FreeGeomObject()

◆ ASE_GetCurrentMesh()

◆ ASE_GetNumSurfaces()

int ASE_GetNumSurfaces ( void )

Definition at line 137 of file aselib.cpp.

References ase.

◆ ASE_GetSurfaceAnimation()

◆ ASE_GetSurfaceName()

const char * ASE_GetSurfaceName ( int which)

◆ ASE_GetToken()

◆ ASE_KeyGEOMOBJECT()

void ASE_KeyGEOMOBJECT ( const char * token)
static

◆ ASE_KeyMAP_DIFFUSE()

void ASE_KeyMAP_DIFFUSE ( const char * token)
static

Definition at line 311 of file aselib.cpp.

References ase, ASE_GetToken(), Com_StripExtension(), len, MAX_QPATH, Q_streq, s_token, VERB_EXTRA, and Verb_Printf().

Referenced by ASE_KeyMATERIAL().

◆ ASE_KeyMATERIAL()

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().

◆ ASE_KeyMATERIAL_LIST()

void ASE_KeyMATERIAL_LIST ( const char * token)
static

◆ ASE_KeyMESH()

◆ ASE_KeyMESH_FACE_LIST()

void ASE_KeyMESH_FACE_LIST ( const char * token)
static

◆ ASE_KeyMESH_TVERTLIST()

void ASE_KeyMESH_TVERTLIST ( const char * token)
static

◆ ASE_KeyMESH_VERTEX_LIST()

void ASE_KeyMESH_VERTEX_LIST ( const char * token)
static

◆ ASE_KeyTFACE_LIST()

void ASE_KeyTFACE_LIST ( const char * token)
static

◆ ASE_Load()

void ASE_Load ( const char * filename,
bool verbose )

◆ ASE_ParseBracedBlock()

void ASE_ParseBracedBlock ( void(* parser )(const char *token))
static

◆ ASE_Process()

◆ ASE_SkipEnclosingBraces()

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().

◆ ASE_SkipRestOfLine()

void ASE_SkipRestOfLine ( void )
static

Definition at line 306 of file aselib.cpp.

References ASE_GetToken().

Referenced by ASE_KeyGEOMOBJECT(), and ASE_Process().

◆ CharIsTokenDelimiter()

int CharIsTokenDelimiter ( int ch)
inlinestatic

Definition at line 229 of file aselib.cpp.

Referenced by ASE_GetToken().

◆ CollapseObjects()

void CollapseObjects ( void )
static

Definition at line 590 of file aselib.cpp.

References ase, ConcatenateObjects(), and i.

Referenced by ASE_Process().

◆ ConcatenateObjects()

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

Definition at line 586 of file aselib.cpp.

Referenced by CollapseObjects().

Variable Documentation

◆ ase

◆ s_token