| 1 |
/* ----------------------------------------------------------------------------- |
| 2 |
|
| 3 |
PicoModel Library |
| 4 |
|
| 5 |
Copyright (c) 2002, Randy Reddig & seaw0lf |
| 6 |
All rights reserved. |
| 7 |
|
| 8 |
Redistribution and use in source and binary forms, with or without modification, |
| 9 |
are permitted provided that the following conditions are met: |
| 10 |
|
| 11 |
Redistributions of source code must retain the above copyright notice, this list |
| 12 |
of conditions and the following disclaimer. |
| 13 |
|
| 14 |
Redistributions in binary form must reproduce the above copyright notice, this |
| 15 |
list of conditions and the following disclaimer in the documentation and/or |
| 16 |
other materials provided with the distribution. |
| 17 |
|
| 18 |
Neither the names of the copyright holders nor the names of its contributors may |
| 19 |
be used to endorse or promote products derived from this software without |
| 20 |
specific prior written permission. |
| 21 |
|
| 22 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 23 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 24 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 25 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
| 26 |
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 27 |
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 28 |
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| 29 |
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 31 |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 |
|
| 33 |
----------------------------------------------------------------------------- */ |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
/* marker */ |
| 38 |
#define PICOMODULES_C |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
/* dependencies */ |
| 43 |
#include "picointernal.h" |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
/* external modules */ |
| 48 |
extern const picoModule_t picoModuleMD3; |
| 49 |
extern const picoModule_t picoModule3DS; |
| 50 |
extern const picoModule_t picoModuleASE; |
| 51 |
extern const picoModule_t picoModuleOBJ; |
| 52 |
extern const picoModule_t picoModuleMS3D; |
| 53 |
extern const picoModule_t picoModuleMDC; |
| 54 |
extern const picoModule_t picoModuleMD2; |
| 55 |
extern const picoModule_t picoModuleFM; |
| 56 |
extern const picoModule_t picoModuleLWO; |
| 57 |
extern const picoModule_t picoModuleTerrain; |
| 58 |
extern const picoModule_t picoModuleIQM; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
/* list of all supported file format modules */ |
| 63 |
const picoModule_t *picoModules[] = |
| 64 |
{ |
| 65 |
&picoModuleMD3, /* quake3 arena md3 */ |
| 66 |
&picoModule3DS, /* autodesk 3ds */ |
| 67 |
//&picoModuleASE, /* autodesk ase */ |
| 68 |
&picoModuleMS3D, /* milkshape3d */ |
| 69 |
&picoModuleMDC, /* return to castle wolfenstein mdc */ |
| 70 |
&picoModuleMD2, /* quake2 md2 */ |
| 71 |
&picoModuleFM, /* heretic2 fm */ |
| 72 |
&picoModuleLWO, /* lightwave object */ |
| 73 |
&picoModuleTerrain, /* picoterrain object */ |
| 74 |
&picoModuleOBJ, /* wavefront object */ |
| 75 |
&picoModuleIQM, /* interquake model */ |
| 76 |
NULL /* arnold */ |
| 77 |
}; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
/* |
| 82 |
PicoModuleList() |
| 83 |
returns a pointer to the module list and optionally stores |
| 84 |
the number of supported modules in 'numModules'. Note that |
| 85 |
this param can be NULL when the count is not needed. |
| 86 |
*/ |
| 87 |
|
| 88 |
const picoModule_t **PicoModuleList( int *numModules ) |
| 89 |
{ |
| 90 |
/* get module count */ |
| 91 |
if( numModules != NULL ) |
| 92 |
for( (*numModules) = 0; picoModules[ *numModules ] != NULL; (*numModules)++ ); |
| 93 |
|
| 94 |
/* return list of modules */ |
| 95 |
return (const picoModule_t**) picoModules; |
| 96 |
} |