2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "globaldefs.h"
30 #define MAX_ASE_MATERIALS 32
31 #define MAX_ASE_OBJECTS 64
32 #define MAX_ASE_ANIMATIONS 32
33 #define MAX_ASE_ANIMATION_FRAMES 512
35 #define VERBOSE( x ) { if ( ase.verbose ) { Sys_Printf x ; } }
38 #define strlwr strlower
39 #endif // !GDEF_OS_WINDOWS
53 typedef int aseFace_t[3];
63 aseVertex_t *vertexes;
64 aseTVertex_t *tvertexes;
65 aseFace_t *faces, *tfaces;
67 int currentFace, currentVertex;
73 aseMesh_t frames[MAX_ASE_ANIMATION_FRAMES];
84 ** contains the animate sequence of a single surface
85 ** using a single material
94 aseMeshAnimation_t anim;
101 aseMaterial_t materials[MAX_ASE_MATERIALS];
102 aseGeomObject_t objects[MAX_ASE_OBJECTS];
114 static char s_token[1024];
116 static char gl_filename[1024];
118 static void ASE_Process( void );
119 static void ASE_FreeGeomObject( int ndx );
124 void ASE_Load( const char *filename, qboolean verbose, qboolean grabAnims ){
125 FILE *fp = fopen( filename, "rb" );
128 Error( "File not found '%s'", filename );
131 memset( &ase, 0, sizeof( ase ) );
133 ase.verbose = verbose;
134 ase.grabAnims = grabAnims;
135 ase.len = Q_filelength( fp );
137 ase.curpos = ase.buffer = safe_malloc( ase.len );
139 Sys_Printf( "Processing '%s'\n", filename );
141 if ( fread( ase.buffer, ase.len, 1, fp ) != 1 ) {
143 Error( "fread() != -1 for '%s'", filename );
148 strcpy( gl_filename, filename );
156 void ASE_Free( void ){
159 for ( i = 0; i < ase.currentObject; i++ )
161 ASE_FreeGeomObject( i );
166 ** ASE_GetNumSurfaces
168 int ASE_GetNumSurfaces( void ){
169 return ase.currentObject;
173 ** ASE_GetSurfaceName
175 const char *ASE_GetSurfaceName( int which ){
176 aseGeomObject_t *pObject = &ase.objects[which];
178 if ( !pObject->anim.numFrames ) {
182 return pObject->name;
186 ** ASE_GetSurfaceAnimation
188 ** Returns an animation (sequence of polysets)
190 polyset_t *ASE_GetSurfaceAnimation( int which, int *pNumFrames, int skipFrameStart, int skipFrameEnd, int maxFrames ){
191 aseGeomObject_t *pObject = &ase.objects[which];
193 int numFramesInAnimation;
197 if ( !pObject->anim.numFrames ) {
201 if ( pObject->anim.numFrames > maxFrames && maxFrames != -1 ) {
202 numFramesInAnimation = maxFrames;
206 numFramesInAnimation = pObject->anim.numFrames;
207 if ( maxFrames != -1 ) {
208 Sys_FPrintf( SYS_WRN, "WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation\n" );
212 if ( skipFrameEnd != -1 ) {
213 numFramesToKeep = numFramesInAnimation - ( skipFrameEnd - skipFrameStart + 1 );
216 numFramesToKeep = numFramesInAnimation;
219 *pNumFrames = numFramesToKeep;
221 psets = calloc( sizeof( polyset_t ) * numFramesToKeep, 1 );
223 for ( f = 0, i = 0; i < numFramesInAnimation; i++ )
226 aseMesh_t *pMesh = &pObject->anim.frames[i];
228 if ( skipFrameStart != -1 ) {
229 if ( i >= skipFrameStart && i <= skipFrameEnd ) {
234 strcpy( psets[f].name, pObject->name );
235 strcpy( psets[f].materialname, ase.materials[pObject->materialRef].name );
237 psets[f].triangles = calloc( sizeof( triangle_t ) * pObject->anim.frames[i].numFaces, 1 );
238 psets[f].numtriangles = pObject->anim.frames[i].numFaces;
240 for ( t = 0; t < pObject->anim.frames[i].numFaces; t++ )
244 for ( k = 0; k < 3; k++ )
246 psets[f].triangles[t].verts[k][0] = pMesh->vertexes[pMesh->faces[t][k]].x;
247 psets[f].triangles[t].verts[k][1] = pMesh->vertexes[pMesh->faces[t][k]].y;
248 psets[f].triangles[t].verts[k][2] = pMesh->vertexes[pMesh->faces[t][k]].z;
250 if ( pMesh->tvertexes && pMesh->tfaces ) {
251 psets[f].triangles[t].texcoords[k][0] = pMesh->tvertexes[pMesh->tfaces[t][k]].s;
252 psets[f].triangles[t].texcoords[k][1] = pMesh->tvertexes[pMesh->tfaces[t][k]].t;
264 static void ASE_FreeGeomObject( int ndx ){
265 aseGeomObject_t *pObject;
268 pObject = &ase.objects[ndx];
270 for ( i = 0; i < pObject->anim.numFrames; i++ )
272 if ( pObject->anim.frames[i].vertexes ) {
273 free( pObject->anim.frames[i].vertexes );
275 if ( pObject->anim.frames[i].tvertexes ) {
276 free( pObject->anim.frames[i].tvertexes );
278 if ( pObject->anim.frames[i].faces ) {
279 free( pObject->anim.frames[i].faces );
281 if ( pObject->anim.frames[i].tfaces ) {
282 free( pObject->anim.frames[i].tfaces );
286 memset( pObject, 0, sizeof( *pObject ) );
289 static aseMesh_t *ASE_GetCurrentMesh( void ){
290 aseGeomObject_t *pObject;
292 if ( ase.currentObject >= MAX_ASE_OBJECTS ) {
293 Error( "Too many GEOMOBJECTs" );
294 return 0; // never called
297 pObject = &ase.objects[ase.currentObject];
299 if ( pObject->anim.currentFrame >= MAX_ASE_ANIMATION_FRAMES ) {
300 Error( "Too many MESHes" );
304 return &pObject->anim.frames[pObject->anim.currentFrame];
307 static int CharIsTokenDelimiter( int ch ){
314 static int ASE_GetToken( qboolean restOfLine ){
317 if ( ase.buffer == 0 ) {
321 if ( ( ase.curpos - ase.buffer ) == ase.len ) {
326 while ( ( ( ase.curpos - ase.buffer ) < ase.len ) &&
327 ( *ase.curpos <= 32 ) )
332 while ( ( ase.curpos - ase.buffer ) < ase.len )
334 s_token[i] = *ase.curpos;
339 if ( ( CharIsTokenDelimiter( s_token[i - 1] ) && !restOfLine ) ||
340 ( ( s_token[i - 1] == '\n' ) || ( s_token[i - 1] == '\r' ) ) ) {
351 static void ASE_ParseBracedBlock( void ( *parser )( const char *token ) ){
354 while ( ASE_GetToken( qfalse ) )
356 if ( !strcmp( s_token, "{" ) ) {
359 else if ( !strcmp( s_token, "}" ) ) {
364 else if ( indent < 0 ) {
365 Error( "Unexpected '}'" );
377 static void ASE_SkipEnclosingBraces( void ){
380 while ( ASE_GetToken( qfalse ) )
382 if ( !strcmp( s_token, "{" ) ) {
385 else if ( !strcmp( s_token, "}" ) ) {
390 else if ( indent < 0 ) {
391 Error( "Unexpected '}'" );
397 static void ASE_SkipRestOfLine( void ){
398 ASE_GetToken( qtrue );
401 static void ASE_KeyMAP_DIFFUSE( const char *token ){
406 strcpy( filename, gl_filename );
408 if ( !strcmp( token, "*BITMAP" ) ) {
409 ASE_GetToken( qfalse );
411 // the purpose of this whole chunk of code below is to extract the relative path
412 // from a full path in the ASE
414 strcpy( bitmap, s_token + 1 );
415 if ( strchr( bitmap, '"' ) ) {
416 *strchr( bitmap, '"' ) = 0;
419 /* convert backslash to slash */
422 if ( bitmap[i] == '\\' ) {
428 /* remove filename from path */
429 for ( i = strlen( filename ); i > 0; i-- )
431 if ( filename[i] == '/' ) {
437 /* replaces a relative path with a full path */
438 if ( bitmap[0] == '.' && bitmap[1] == '.' && bitmap[2] == '/' ) {
439 while ( bitmap[0] == '.' && bitmap[1] == '.' && bitmap[2] == '/' )
441 /* remove last item from path */
442 for ( i = strlen( filename ); i > 0; i-- )
444 if ( filename[i] == '/' ) {
449 strcpy( bitmap, &bitmap[3] );
451 strcat( filename, "/" );
452 strcat( filename, bitmap );
453 strcpy( bitmap, filename );
456 if ( strstr( bitmap, gamedir ) ) {
457 strcpy( ase.materials[ase.numMaterials].name, strstr( bitmap, gamedir ) + strlen( gamedir ) );
458 Sys_Printf( "material name: \'%s\'\n", strstr( bitmap, gamedir ) + strlen( gamedir ) );
462 sprintf( ase.materials[ase.numMaterials].name, "(not converted: '%s')", bitmap );
463 Sys_FPrintf( SYS_WRN, "WARNING: illegal material name '%s'\n", bitmap );
471 static void ASE_KeyMATERIAL( const char *token ){
472 if ( !strcmp( token, "*MAP_DIFFUSE" ) ) {
473 ASE_ParseBracedBlock( ASE_KeyMAP_DIFFUSE );
480 static void ASE_KeyMATERIAL_LIST( const char *token ){
481 if ( !strcmp( token, "*MATERIAL_COUNT" ) ) {
482 ASE_GetToken( qfalse );
483 VERBOSE( ( "..num materials: %s\n", s_token ) );
484 if ( atoi( s_token ) > MAX_ASE_MATERIALS ) {
485 Error( "Too many materials!" );
487 ase.numMaterials = 0;
489 else if ( !strcmp( token, "*MATERIAL" ) ) {
490 VERBOSE( ( "..material %d ", ase.numMaterials ) );
491 ASE_ParseBracedBlock( ASE_KeyMATERIAL );
496 static void ASE_KeyMESH_VERTEX_LIST( const char *token ){
497 aseMesh_t *pMesh = ASE_GetCurrentMesh();
499 if ( !strcmp( token, "*MESH_VERTEX" ) ) {
500 ASE_GetToken( qfalse ); // skip number
502 ASE_GetToken( qfalse );
503 pMesh->vertexes[pMesh->currentVertex].y = atof( s_token );
505 ASE_GetToken( qfalse );
506 pMesh->vertexes[pMesh->currentVertex].x = -atof( s_token );
508 ASE_GetToken( qfalse );
509 pMesh->vertexes[pMesh->currentVertex].z = atof( s_token );
511 pMesh->currentVertex++;
513 if ( pMesh->currentVertex > pMesh->numVertexes ) {
514 Error( "pMesh->currentVertex >= pMesh->numVertexes" );
519 Error( "Unknown token '%s' while parsing MESH_VERTEX_LIST", token );
523 static void ASE_KeyMESH_FACE_LIST( const char *token ){
524 aseMesh_t *pMesh = ASE_GetCurrentMesh();
526 if ( !strcmp( token, "*MESH_FACE" ) ) {
527 ASE_GetToken( qfalse ); // skip face number
529 ASE_GetToken( qfalse ); // skip label
530 ASE_GetToken( qfalse ); // first vertex
531 pMesh->faces[pMesh->currentFace][0] = atoi( s_token );
533 ASE_GetToken( qfalse ); // skip label
534 ASE_GetToken( qfalse ); // second vertex
535 pMesh->faces[pMesh->currentFace][2] = atoi( s_token );
537 ASE_GetToken( qfalse ); // skip label
538 ASE_GetToken( qfalse ); // third vertex
539 pMesh->faces[pMesh->currentFace][1] = atoi( s_token );
541 ASE_GetToken( qtrue );
544 if ( ( p = strstr( s_token, "*MESH_MTLID" ) ) != 0 )
546 p += strlen( "*MESH_MTLID" ) + 1;
551 Error( "No *MESH_MTLID found for face!" );
555 pMesh->currentFace++;
559 Error( "Unknown token '%s' while parsing MESH_FACE_LIST", token );
563 static void ASE_KeyTFACE_LIST( const char *token ){
564 aseMesh_t *pMesh = ASE_GetCurrentMesh();
566 if ( !strcmp( token, "*MESH_TFACE" ) ) {
569 ASE_GetToken( qfalse );
571 ASE_GetToken( qfalse );
573 ASE_GetToken( qfalse );
575 ASE_GetToken( qfalse );
578 pMesh->tfaces[pMesh->currentFace][0] = a;
579 pMesh->tfaces[pMesh->currentFace][1] = b;
580 pMesh->tfaces[pMesh->currentFace][2] = c;
582 pMesh->currentFace++;
586 Error( "Unknown token '%s' in MESH_TFACE", token );
590 static void ASE_KeyMESH_TVERTLIST( const char *token ){
591 aseMesh_t *pMesh = ASE_GetCurrentMesh();
593 if ( !strcmp( token, "*MESH_TVERT" ) ) {
594 char u[80], v[80], w[80];
596 ASE_GetToken( qfalse );
598 ASE_GetToken( qfalse );
599 strcpy( u, s_token );
601 ASE_GetToken( qfalse );
602 strcpy( v, s_token );
604 ASE_GetToken( qfalse );
605 strcpy( w, s_token );
607 pMesh->tvertexes[pMesh->currentVertex].s = atof( u );
608 pMesh->tvertexes[pMesh->currentVertex].t = 1.0f - atof( v );
610 pMesh->currentVertex++;
612 if ( pMesh->currentVertex > pMesh->numTVertexes ) {
613 Error( "pMesh->currentVertex > pMesh->numTVertexes" );
618 Error( "Unknown token '%s' while parsing MESH_TVERTLIST", token );
622 static void ASE_KeyMESH( const char *token ){
623 aseMesh_t *pMesh = ASE_GetCurrentMesh();
625 if ( !strcmp( token, "*TIMEVALUE" ) ) {
626 ASE_GetToken( qfalse );
628 pMesh->timeValue = atoi( s_token );
629 VERBOSE( ( ".....timevalue: %d\n", pMesh->timeValue ) );
631 else if ( !strcmp( token, "*MESH_NUMVERTEX" ) ) {
632 ASE_GetToken( qfalse );
634 pMesh->numVertexes = atoi( s_token );
635 VERBOSE( ( ".....TIMEVALUE: %d\n", pMesh->timeValue ) );
636 VERBOSE( ( ".....num vertexes: %d\n", pMesh->numVertexes ) );
638 else if ( !strcmp( token, "*MESH_NUMFACES" ) ) {
639 ASE_GetToken( qfalse );
641 pMesh->numFaces = atoi( s_token );
642 VERBOSE( ( ".....num faces: %d\n", pMesh->numFaces ) );
644 else if ( !strcmp( token, "*MESH_NUMTVFACES" ) ) {
645 ASE_GetToken( qfalse );
647 if ( atoi( s_token ) != pMesh->numFaces ) {
648 Error( "MESH_NUMTVFACES != MESH_NUMFACES" );
651 else if ( !strcmp( token, "*MESH_NUMTVERTEX" ) ) {
652 ASE_GetToken( qfalse );
654 pMesh->numTVertexes = atoi( s_token );
655 VERBOSE( ( ".....num tvertexes: %d\n", pMesh->numTVertexes ) );
657 else if ( !strcmp( token, "*MESH_VERTEX_LIST" ) ) {
658 pMesh->vertexes = calloc( sizeof( aseVertex_t ) * pMesh->numVertexes, 1 );
659 pMesh->currentVertex = 0;
660 VERBOSE( ( ".....parsing MESH_VERTEX_LIST\n" ) );
661 ASE_ParseBracedBlock( ASE_KeyMESH_VERTEX_LIST );
663 else if ( !strcmp( token, "*MESH_TVERTLIST" ) ) {
664 pMesh->currentVertex = 0;
665 pMesh->tvertexes = calloc( sizeof( aseTVertex_t ) * pMesh->numTVertexes, 1 );
666 VERBOSE( ( ".....parsing MESH_TVERTLIST\n" ) );
667 ASE_ParseBracedBlock( ASE_KeyMESH_TVERTLIST );
669 else if ( !strcmp( token, "*MESH_FACE_LIST" ) ) {
670 pMesh->faces = calloc( sizeof( aseFace_t ) * pMesh->numFaces, 1 );
671 pMesh->currentFace = 0;
672 VERBOSE( ( ".....parsing MESH_FACE_LIST\n" ) );
673 ASE_ParseBracedBlock( ASE_KeyMESH_FACE_LIST );
675 else if ( !strcmp( token, "*MESH_TFACELIST" ) ) {
676 pMesh->tfaces = calloc( sizeof( aseFace_t ) * pMesh->numFaces, 1 );
677 pMesh->currentFace = 0;
678 VERBOSE( ( ".....parsing MESH_TFACE_LIST\n" ) );
679 ASE_ParseBracedBlock( ASE_KeyTFACE_LIST );
681 else if ( !strcmp( token, "*MESH_NORMALS" ) ) {
682 ASE_ParseBracedBlock( 0 );
686 static void ASE_KeyMESH_ANIMATION( const char *token ){
687 aseMesh_t *pMesh = ASE_GetCurrentMesh();
689 // loads a single animation frame
690 if ( !strcmp( token, "*MESH" ) ) {
691 VERBOSE( ( "...found MESH\n" ) );
692 assert( pMesh->faces == 0 );
693 assert( pMesh->vertexes == 0 );
694 assert( pMesh->tvertexes == 0 );
695 memset( pMesh, 0, sizeof( *pMesh ) );
697 ASE_ParseBracedBlock( ASE_KeyMESH );
699 if ( ++ase.objects[ase.currentObject].anim.currentFrame == MAX_ASE_ANIMATION_FRAMES ) {
700 Error( "Too many animation frames" );
705 Error( "Unknown token '%s' while parsing MESH_ANIMATION", token );
709 static void ASE_KeyGEOMOBJECT( const char *token ){
710 if ( !strcmp( token, "*NODE_NAME" ) ) {
711 char *name = ase.objects[ase.currentObject].name;
713 ASE_GetToken( qtrue );
714 VERBOSE( ( " %s\n", s_token ) );
715 strcpy( ase.objects[ase.currentObject].name, s_token + 1 );
716 if ( strchr( ase.objects[ase.currentObject].name, '"' ) ) {
717 *strchr( ase.objects[ase.currentObject].name, '"' ) = 0;
720 if ( strstr( name, "tag" ) == name ) {
721 while ( strchr( name, '_' ) != strrchr( name, '_' ) )
723 *strrchr( name, '_' ) = 0;
725 while ( strrchr( name, ' ' ) )
727 *strrchr( name, ' ' ) = 0;
731 else if ( !strcmp( token, "*NODE_PARENT" ) ) {
732 ASE_SkipRestOfLine();
734 // ignore unused data blocks
735 else if ( !strcmp( token, "*NODE_TM" ) ||
736 !strcmp( token, "*TM_ANIMATION" ) ) {
737 ASE_ParseBracedBlock( 0 );
739 // ignore regular meshes that aren't part of animation
740 else if ( !strcmp( token, "*MESH" ) && !ase.grabAnims ) {
742 if ( strstr( ase.objects[ase.currentObject].name, "tag_" ) == ase.objects[ase.currentObject].name )
744 s_forceStaticMesh = true;
745 ASE_ParseBracedBlock( ASE_KeyMESH );
746 s_forceStaticMesh = false;
749 ASE_ParseBracedBlock( ASE_KeyMESH );
750 if ( ++ase.objects[ase.currentObject].anim.currentFrame == MAX_ASE_ANIMATION_FRAMES ) {
751 Error( "Too many animation frames" );
753 ase.objects[ase.currentObject].anim.numFrames = ase.objects[ase.currentObject].anim.currentFrame;
754 ase.objects[ase.currentObject].numAnimations++;
756 // ignore meshes that aren't part of animations if this object isn't a
760 ASE_ParseBracedBlock( 0 );
764 // according to spec these are obsolete
765 else if ( !strcmp( token, "*MATERIAL_REF" ) ) {
766 ASE_GetToken( qfalse );
768 ase.objects[ase.currentObject].materialRef = atoi( s_token );
770 // loads a sequence of animation frames
771 else if ( !strcmp( token, "*MESH_ANIMATION" ) ) {
772 if ( ase.grabAnims ) {
773 VERBOSE( ( "..found MESH_ANIMATION\n" ) );
775 if ( ase.objects[ase.currentObject].numAnimations ) {
776 Error( "Multiple MESH_ANIMATIONS within a single GEOM_OBJECT" );
778 ASE_ParseBracedBlock( ASE_KeyMESH_ANIMATION );
779 ase.objects[ase.currentObject].anim.numFrames = ase.objects[ase.currentObject].anim.currentFrame;
780 ase.objects[ase.currentObject].numAnimations++;
784 ASE_SkipEnclosingBraces();
788 else if ( !strcmp( token, "*PROP_MOTIONBLUR" ) ||
789 !strcmp( token, "*PROP_CASTSHADOW" ) ||
790 !strcmp( token, "*PROP_RECVSHADOW" ) ) {
791 ASE_SkipRestOfLine();
795 static void ConcatenateObjects( aseGeomObject_t *pObjA, aseGeomObject_t *pObjB ){
798 static void CollapseObjects( void ){
800 int numObjects = ase.currentObject;
802 for ( i = 0; i < numObjects; i++ )
807 if ( strstr( ase.objects[i].name, "tag" ) == ase.objects[i].name ) {
811 if ( !ase.objects[i].numAnimations ) {
815 for ( j = i + 1; j < numObjects; j++ )
817 if ( strstr( ase.objects[j].name, "tag" ) == ase.objects[j].name ) {
820 if ( ase.objects[i].materialRef == ase.objects[j].materialRef ) {
821 if ( ase.objects[j].numAnimations ) {
822 ConcatenateObjects( &ase.objects[i], &ase.objects[j] );
832 static void ASE_Process( void ){
833 while ( ASE_GetToken( qfalse ) )
835 if ( !strcmp( s_token, "*3DSMAX_ASCIIEXPORT" ) ||
836 !strcmp( s_token, "*COMMENT" ) ) {
837 ASE_SkipRestOfLine();
839 else if ( !strcmp( s_token, "*SCENE" ) ) {
840 ASE_SkipEnclosingBraces();
842 else if ( !strcmp( s_token, "*MATERIAL_LIST" ) ) {
843 VERBOSE( ( "MATERIAL_LIST\n" ) );
845 ASE_ParseBracedBlock( ASE_KeyMATERIAL_LIST );
847 else if ( !strcmp( s_token, "*GEOMOBJECT" ) ) {
848 VERBOSE( ( "GEOMOBJECT" ) );
850 ASE_ParseBracedBlock( ASE_KeyGEOMOBJECT );
852 if ( strstr( ase.objects[ase.currentObject].name, "Bip" ) ||
853 strstr( ase.objects[ase.currentObject].name, "ignore_" ) ) {
854 ASE_FreeGeomObject( ase.currentObject );
855 VERBOSE( ( "(discarding BIP/ignore object)\n" ) );
857 else if ( ( strstr( ase.objects[ase.currentObject].name, "h_" ) != ase.objects[ase.currentObject].name ) &&
858 ( strstr( ase.objects[ase.currentObject].name, "l_" ) != ase.objects[ase.currentObject].name ) &&
859 ( strstr( ase.objects[ase.currentObject].name, "u_" ) != ase.objects[ase.currentObject].name ) &&
860 ( strstr( ase.objects[ase.currentObject].name, "tag" ) != ase.objects[ase.currentObject].name ) &&
862 VERBOSE( ( "(ignoring improperly labeled object '%s')\n", ase.objects[ase.currentObject].name ) );
863 ASE_FreeGeomObject( ase.currentObject );
867 if ( ++ase.currentObject == MAX_ASE_OBJECTS ) {
868 Error( "Too many GEOMOBJECTs" );
872 else if ( s_token[0] ) {
873 Error( "Unknown token '%s'\n", s_token );
877 if ( !ase.currentObject ) {
878 Error( "No animation data!" );