]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/picomodel/pm_lwo.c
Merge branch 'master' into divVerent/farplanedist-sky-fix
[xonotic/netradiant.git] / libs / picomodel / pm_lwo.c
index 09cdde9c5f85b948bbea980cf247181158be52ba..812496ae40fe8c43382367c090771f986cc665dc 100644 (file)
@@ -1,36 +1,36 @@
 /* -----------------------------------------------------------------------------
 
-PicoModel Library 
+   PicoModel Library
 
-Copyright (c) 2002, Randy Reddig & seaw0lf
-All rights reserved.
+   Copyright (c) 2002, Randy Reddig & seaw0lf
+   All rights reserved.
 
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
+   Redistribution and use in source and binary forms, with or without modification,
+   are permitted provided that the following conditions are met:
 
-Redistributions of source code must retain the above copyright notice, this list
-of conditions and the following disclaimer.
+   Redistributions of source code must retain the above copyright notice, this list
+   of conditions and the following disclaimer.
 
-Redistributions in binary form must reproduce the above copyright notice, this
-list of conditions and the following disclaimer in the documentation and/or
-other materials provided with the distribution.
+   Redistributions in binary form must reproduce the above copyright notice, this
+   list of conditions and the following disclaimer in the documentation and/or
+   other materials provided with the distribution.
 
-Neither the names of the copyright holders nor the names of its contributors may
-be used to endorse or promote products derived from this software without
-specific prior written permission. 
+   Neither the names of the copyright holders nor the names of its contributors may
+   be used to endorse or promote products derived from this software without
+   specific prior written permission.
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+   ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
------------------------------------------------------------------------------ */
+   ----------------------------------------------------------------------------- */
 
 /* marker */
 #define PM_LWO_C
@@ -47,32 +47,29 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 
 /* helper functions */
-static const char *lwo_lwIDToStr( unsigned int lwID )
-{
+static const char *lwo_lwIDToStr( unsigned int lwID ){
        static char lwIDStr[5];
 
-       if (!lwID)
-       {
+       if ( !lwID ) {
                return "n/a";
        }
 
-       lwIDStr[ 0 ] = (char)((lwID) >> 24);
-       lwIDStr[ 1 ] = (char)((lwID) >> 16);
-       lwIDStr[ 2 ] = (char)((lwID) >> 8);
-       lwIDStr[ 3 ] = (char)((lwID));
+       lwIDStr[ 0 ] = (char)( ( lwID ) >> 24 );
+       lwIDStr[ 1 ] = (char)( ( lwID ) >> 16 );
+       lwIDStr[ 2 ] = (char)( ( lwID ) >> 8 );
+       lwIDStr[ 3 ] = (char)( ( lwID ) );
        lwIDStr[ 4 ] = '\0';
 
        return lwIDStr;
 }
 
 /*
-_lwo_canload()
-validates a LightWave Object model file. btw, i use the
-preceding underscore cause it's a static func referenced
-by one structure only.
-*/
-static int _lwo_canload( PM_PARAMS_CANLOAD )
-{
+   _lwo_canload()
+   validates a LightWave Object model file. btw, i use the
+   preceding underscore cause it's a static func referenced
+   by one structure only.
+ */
+static int _lwo_canload( PM_PARAMS_CANLOAD ){
        picoMemStream_t *s;
        unsigned int failID = 0;
        int failpos = -1;
@@ -80,8 +77,7 @@ static int _lwo_canload( PM_PARAMS_CANLOAD )
 
        /* create a new pico memorystream */
        s = _pico_new_memstream( (const picoByte_t *)buffer, bufSize );
-       if (s == NULL)
-       {
+       if ( s == NULL ) {
                return PICO_PMV_ERROR_MEMORY;
        }
 
@@ -93,36 +89,35 @@ static int _lwo_canload( PM_PARAMS_CANLOAD )
 }
 
 /*
-_lwo_load()
-loads a LightWave Object model file.
-*/
-static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
-{
-       picoMemStream_t *s;
-       unsigned int    failID = 0;
-       int                             failpos = -1;
-       lwObject                *obj;
-       lwSurface               *surface;
-       lwLayer                 *layer;
-       lwPoint                 *pt;
-       lwPolygon               *pol;
-       lwPolVert               *v;
-       lwVMapPt                *vm;
-       char                    name[ 256 ];
-       int                             i, j, k, numverts;
-
-       picoModel_t             *picoModel;
-       picoSurface_t   *picoSurface;
-       picoShader_t    *picoShader;
-       picoVec3_t              xyz, normal;
-       picoVec2_t              st;
-       picoColor_t             color;
-
-       int                             defaultSTAxis[ 2 ];
-       picoVec2_t              defaultXYZtoSTScale;
+   _lwo_load()
+   loads a LightWave Object model file.
+ */
+static picoModel_t *_lwo_load( PM_PARAMS_LOAD ){
+       picoMemStream_t *s;
+       unsigned int failID = 0;
+       int failpos = -1;
+       lwObject        *obj;
+       lwSurface       *surface;
+       lwLayer         *layer;
+       lwPoint         *pt;
+       lwPolygon       *pol;
+       lwPolVert       *v;
+       lwVMapPt        *vm;
+       char name[ 256 ];
+       int i, j, k, numverts;
+
+       picoModel_t     *picoModel;
+       picoSurface_t   *picoSurface;
+       picoShader_t    *picoShader;
+       picoVec3_t xyz, normal;
+       picoVec2_t st;
+       picoColor_t color;
+
+       int defaultSTAxis[ 2 ];
+       picoVec2_t defaultXYZtoSTScale;
 
        picoVertexCombinationHash_t **hashTable;
-       picoVertexCombinationHash_t     *vertexCombinationHash;
+       picoVertexCombinationHash_t *vertexCombinationHash;
 
 #ifdef DEBUG_PM_LWO
        clock_t load_start, load_finish, convert_start, convert_finish;
@@ -132,16 +127,14 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 #endif
 
        /* do frame check */
-       if( frameNum < 0 || frameNum >= 1 )
-       {
+       if ( frameNum < 0 || frameNum >= 1 ) {
                _pico_printf( PICO_ERROR, "Invalid or out-of-range LWO frame specified" );
                return NULL;
        }
 
        /* create a new pico memorystream */
        s = _pico_new_memstream( (const picoByte_t *)buffer, bufSize );
-       if (s == NULL)
-       {
+       if ( s == NULL ) {
                return NULL;
        }
 
@@ -149,24 +142,23 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
        _pico_free_memstream( s );
 
-       if( !obj ) {
+       if ( !obj ) {
                _pico_printf( PICO_ERROR, "Couldn't load LWO file, failed on ID '%s', position %d", lwo_lwIDToStr( failID ), failpos );
                return NULL;
        }
 
 #ifdef DEBUG_PM_LWO
        convert_start = load_finish = clock();
-       load_elapsed = (double)(load_finish - load_start) / CLOCKS_PER_SEC;
+       load_elapsed = (double)( load_finish - load_start ) / CLOCKS_PER_SEC;
 #endif
 
        /* -------------------------------------------------
-       pico model creation
-       ------------------------------------------------- */
-       
+          pico model creation
+          ------------------------------------------------- */
+
        /* create a new pico model */
        picoModel = PicoNewModel();
-       if (picoModel == NULL)
-       {
+       if ( picoModel == NULL ) {
                _pico_printf( PICO_ERROR, "Unable to allocate a new model" );
                return NULL;
        }
@@ -181,8 +173,7 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
        layer = &obj->layer[0];
 
        /* warn the user that other layers are discarded */
-       if (obj->nlayers > 1)
-       {
+       if ( obj->nlayers > 1 ) {
                _pico_printf( PICO_WARNING, "LWO loader discards any geometry data not in Layer 1 (%d layers found)", obj->nlayers );
        }
 
@@ -190,25 +181,23 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
        normal[ 0 ] = normal[ 1 ] = normal[ 2 ] = 0.f;
 
        /* setup default st map */
-       st[ 0 ] = st[ 1 ] = 0.f;        /* st[0] holds max, st[1] holds max par one */
+       st[ 0 ] = st[ 1 ] = 0.f;    /* st[0] holds max, st[1] holds max par one */
        defaultSTAxis[ 0 ] = 0;
        defaultSTAxis[ 1 ] = 1;
-       for( i = 0; i < 3; i++ )
+       for ( i = 0; i < 3; i++ )
        {
                float min = layer->bbox[ i ];
                float max = layer->bbox[ i + 3 ];
                float size = max - min;
-               
-               if (size > st[ 0 ])
-               {
+
+               if ( size > st[ 0 ] ) {
                        defaultSTAxis[ 1 ] = defaultSTAxis[ 0 ];
                        defaultSTAxis[ 0 ] = i;
 
                        st[ 1 ] = st[ 0 ];
                        st[ 0 ] = size;
                }
-               else if (size > st[ 1 ])
-               {
+               else if ( size > st[ 1 ] ) {
                        defaultSTAxis[ 1 ] = i;
                        st[ 1 ] = size;
                }
@@ -218,12 +207,11 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
        /* LWO surfaces become pico surfaces */
        surface = obj->surf;
-       while (surface)
+       while ( surface )
        {
                /* allocate new pico surface */
                picoSurface = PicoNewSurface( picoModel );
-               if (picoSurface == NULL)
-               {
+               if ( picoSurface == NULL ) {
                        _pico_printf( PICO_ERROR, "Unable to allocate a new model surface" );
                        PicoFreeModel( picoModel );
                        lwFreeObject( obj );
@@ -238,8 +226,7 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
                /* create new pico shader */
                picoShader = PicoNewShader( picoModel );
-               if (picoShader == NULL)
-               {
+               if ( picoShader == NULL ) {
                        _pico_printf( PICO_ERROR, "Unable to allocate a new model shader" );
                        PicoFreeModel( picoModel );
                        lwFreeObject( obj );
@@ -247,7 +234,7 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
                }
 
                /* detox and set shader name */
-               strncpy( name, surface->name, sizeof(name) );
+               strncpy( name, surface->name, sizeof( name ) );
                _pico_first_token( name );
                _pico_setfext( name, "" );
                _pico_unixify( name );
@@ -261,35 +248,33 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
                hashTable = PicoNewVertexCombinationHashTable();
 
-               if (hashTable == NULL)
-               {
+               if ( hashTable == NULL ) {
                        _pico_printf( PICO_ERROR, "Unable to allocate hash table" );
                        PicoFreeModel( picoModel );
                        lwFreeObject( obj );
                        return NULL;
                }
 
-               for( i = 0, pol = layer->polygon.pol; i < layer->polygon.count; i++, pol++ )
+               for ( i = 0, pol = layer->polygon.pol; i < layer->polygon.count; i++, pol++ )
                {
                        /* does this polygon belong to this surface? */
-                       if (pol->surf != surface)
+                       if ( pol->surf != surface ) {
                                continue;
+                       }
 
                        /* we only support polygons of the FACE type */
-                       if (pol->type != ID_FACE)
-                       {
+                       if ( pol->type != ID_FACE ) {
                                _pico_printf( PICO_WARNING, "LWO loader discarded a polygon because it's type != FACE (%s)", lwo_lwIDToStr( pol->type ) );
                                continue;
                        }
 
                        /* NOTE: LWO has support for non-convex polygons, do we want to store them as well? */
-                       if (pol->nverts != 3)
-                       {
+                       if ( pol->nverts != 3 ) {
                                _pico_printf( PICO_WARNING, "LWO loader discarded a polygon because it has != 3 verts (%d)", pol->nverts );
                                continue;
                        }
 
-                       for( j = 0, v = pol->v; j < 3; j++, v++ )
+                       for ( j = 0, v = pol->v; j < 3; j++, v++ )
                        {
                                pt = &layer->point.pt[ v->index ];
 
@@ -300,83 +285,76 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
 /* doom3 lwo data doesn't seem to have smoothing-angle information */
 #if 0
-        if(surface->smooth <= 0)
-        {
-          /* use face normals */
-                                 normal[ 0 ] = v->norm[ 0 ];
-                                 normal[ 1 ] = v->norm[ 2 ];
-                                 normal[ 2 ] = v->norm[ 1 ];
-        }
-        else
+                               if ( surface->smooth <= 0 ) {
+                                       /* use face normals */
+                                       normal[ 0 ] = v->norm[ 0 ];
+                                       normal[ 1 ] = v->norm[ 2 ];
+                                       normal[ 2 ] = v->norm[ 1 ];
+                               }
+                               else
 #endif
-        {
-          /* smooth normals later */
-                                 normal[ 0 ] = 0;
-                                 normal[ 1 ] = 0;
-                                 normal[ 2 ] = 0;
-        }
+                               {
+                                       /* smooth normals later */
+                                       normal[ 0 ] = 0;
+                                       normal[ 1 ] = 0;
+                                       normal[ 2 ] = 0;
+                               }
 
                                st[ 0 ] = xyz[ defaultSTAxis[ 0 ] ] * defaultXYZtoSTScale[ 0 ];
                                st[ 1 ] = xyz[ defaultSTAxis[ 1 ] ] * defaultXYZtoSTScale[ 1 ];
 
-                               color[ 0 ] = (picoByte_t)(surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF);
-                               color[ 1 ] = (picoByte_t)(surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF);
-                               color[ 2 ] = (picoByte_t)(surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF);
+                               color[ 0 ] = (picoByte_t)( surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF );
+                               color[ 1 ] = (picoByte_t)( surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF );
+                               color[ 2 ] = (picoByte_t)( surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF );
                                color[ 3 ] = 0xFF;
 
                                /* set from points */
-                               for( k = 0, vm = pt->vm; k < pt->nvmaps; k++, vm++ )
+                               for ( k = 0, vm = pt->vm; k < pt->nvmaps; k++, vm++ )
                                {
-                                       if (vm->vmap->type == LWID_('T','X','U','V'))
-                                       {
+                                       if ( vm->vmap->type == LWID_( 'T','X','U','V' ) ) {
                                                /* set st coords */
                                                st[ 0 ] = vm->vmap->val[ vm->index ][ 0 ];
                                                st[ 1 ] = 1.f - vm->vmap->val[ vm->index ][ 1 ];
                                        }
-                                       else if (vm->vmap->type == LWID_('R','G','B','A'))
-                                       {
+                                       else if ( vm->vmap->type == LWID_( 'R','G','B','A' ) ) {
                                                /* set rgba */
-                                               color[ 0 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 0 ] * surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF);
-                                               color[ 1 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 1 ] * surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF);
-                                               color[ 2 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 2 ] * surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF);
-                                               color[ 3 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 3 ] * 0xFF);
+                                               color[ 0 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 0 ] * surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF );
+                                               color[ 1 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 1 ] * surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF );
+                                               color[ 2 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 2 ] * surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF );
+                                               color[ 3 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 3 ] * 0xFF );
                                        }
                                }
 
                                /* override with polygon data */
-                               for( k = 0, vm = v->vm; k < v->nvmaps; k++, vm++ )
+                               for ( k = 0, vm = v->vm; k < v->nvmaps; k++, vm++ )
                                {
-                                       if (vm->vmap->type == LWID_('T','X','U','V'))
-                                       {
+                                       if ( vm->vmap->type == LWID_( 'T','X','U','V' ) ) {
                                                /* set st coords */
                                                st[ 0 ] = vm->vmap->val[ vm->index ][ 0 ];
                                                st[ 1 ] = 1.f - vm->vmap->val[ vm->index ][ 1 ];
                                        }
-                                       else if (vm->vmap->type == LWID_('R','G','B','A'))
-                                       {
+                                       else if ( vm->vmap->type == LWID_( 'R','G','B','A' ) ) {
                                                /* set rgba */
-                                               color[ 0 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 0 ] * surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF);
-                                               color[ 1 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 1 ] * surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF);
-                                               color[ 2 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 2 ] * surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF);
-                                               color[ 3 ] = (picoByte_t)(vm->vmap->val[ vm->index ][ 3 ] * 0xFF);
+                                               color[ 0 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 0 ] * surface->color.rgb[ 0 ] * surface->diffuse.val * 0xFF );
+                                               color[ 1 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 1 ] * surface->color.rgb[ 1 ] * surface->diffuse.val * 0xFF );
+                                               color[ 2 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 2 ] * surface->color.rgb[ 2 ] * surface->diffuse.val * 0xFF );
+                                               color[ 3 ] = (picoByte_t)( vm->vmap->val[ vm->index ][ 3 ] * 0xFF );
                                        }
                                }
 
                                /* find vertex in this surface and if we can't find it there create it */
                                vertexCombinationHash = PicoFindVertexCombinationInHashTable( hashTable, xyz, normal, st, color );
 
-                               if (vertexCombinationHash)
-                               {
+                               if ( vertexCombinationHash ) {
                                        /* found an existing one */
-                                       PicoSetSurfaceIndex( picoSurface, (i * 3 + j ), vertexCombinationHash->index );
+                                       PicoSetSurfaceIndex( picoSurface, ( i * 3 + j ), vertexCombinationHash->index );
                                }
                                else
                                {
                                        /* it is a new one */
                                        vertexCombinationHash = PicoAddVertexCombinationToHashTable( hashTable, xyz, normal, st, color, (picoIndex_t) numverts );
 
-                                       if (vertexCombinationHash == NULL)
-                                       {
+                                       if ( vertexCombinationHash == NULL ) {
                                                _pico_printf( PICO_ERROR, "Unable to allocate hash bucket entry table" );
                                                PicoFreeVertexCombinationHashTable( hashTable );
                                                PicoFreeModel( picoModel );
@@ -397,7 +375,7 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
                                        PicoSetSurfaceST( picoSurface, 0, numverts, st );
 
                                        /* set index */
-                                       PicoSetSurfaceIndex( picoSurface, (i * 3 + j ), (picoIndex_t) numverts );
+                                       PicoSetSurfaceIndex( picoSurface, ( i * 3 + j ), (picoIndex_t) numverts );
 
                                        numverts++;
                                }
@@ -407,7 +385,7 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
                /* free the hashtable */
                PicoFreeVertexCombinationHashTable( hashTable );
 
-               /* get next surface */          
+               /* get next surface */
                surface = surface->next;
        }
 
@@ -419,8 +397,8 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 
 #ifdef DEBUG_PM_LWO
        load_finish = clock();
-       load_elapsed += (double)(load_finish - load_start) / CLOCKS_PER_SEC;
-       convert_elapsed = (double)(convert_finish - convert_start) / CLOCKS_PER_SEC;
+       load_elapsed += (double)( load_finish - load_start ) / CLOCKS_PER_SEC;
+       convert_elapsed = (double)( convert_finish - convert_start ) / CLOCKS_PER_SEC;
        _pico_printf( PICO_NORMAL, "Loaded model in in %-.2f second(s) (loading: %-.2fs converting: %-.2fs)\n", load_elapsed + convert_elapsed, load_elapsed, convert_elapsed  );
 #endif
 
@@ -431,15 +409,15 @@ static picoModel_t *_lwo_load( PM_PARAMS_LOAD )
 /* pico file format module definition */
 const picoModule_t picoModuleLWO =
 {
-       "1.0",                                          /* module version string */
-       "LightWave Object",                     /* module display name */
-       "Arnout van Meer",                      /* author's name */
-       "2003 Arnout van Meer, 2000 Ernie Wright",              /* module copyright */
+       "1.0",                      /* module version string */
+       "LightWave Object",         /* module display name */
+       "Arnout van Meer",          /* author's name */
+       "2003 Arnout van Meer, 2000 Ernie Wright",      /* module copyright */
        {
-               "lwo", NULL, NULL, NULL /* default extensions to use */
+               "lwo", NULL, NULL, NULL /* default extensions to use */
        },
-       _lwo_canload,                           /* validation routine */
-       _lwo_load,                                      /* load routine */
-        NULL,                                          /* save validation routine */
-        NULL                                           /* save routine */
+       _lwo_canload,               /* validation routine */
+       _lwo_load,                  /* load routine */
+       NULL,                       /* save validation routine */
+       NULL                        /* save routine */
 };