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