]> de.git.xonotic.org Git - voretournament/voretournament.git/blob - misc/mediasource/extra/netradiant-src/libs/picomodel/picomodules.c
Include netRadiant source in this GIT
[voretournament/voretournament.git] / misc / mediasource / extra / netradiant-src / libs / picomodel / picomodules.c
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
59
60
61 /* list of all supported file format modules */
62 const picoModule_t *picoModules[] =
63 {
64         &picoModuleMD3,         /* quake3 arena md3 */
65         &picoModule3DS,         /* autodesk 3ds */
66         &picoModuleASE,         /* autodesk ase */
67         &picoModuleMS3D,        /* milkshape3d */
68         &picoModuleMDC,         /* return to castle wolfenstein mdc */
69         &picoModuleMD2,         /* quake2 md2 */
70         &picoModuleFM,          /* heretic2 fm */
71         &picoModuleLWO,         /* lightwave object */
72         &picoModuleTerrain,     /* picoterrain object */
73         &picoModuleOBJ,         /* wavefront object */
74         NULL                            /* arnold */
75 };
76
77
78
79 /*
80 PicoModuleList()
81 returns a pointer to the module list and optionally stores
82 the number of supported modules in 'numModules'. Note that
83 this param can be NULL when the count is not needed.
84 */
85
86 const picoModule_t **PicoModuleList( int *numModules )
87 {
88         /* get module count */
89         if( numModules != NULL )
90                 for( (*numModules) = 0; picoModules[ *numModules ] != NULL; (*numModules)++ );
91         
92         /* return list of modules */
93         return (const picoModule_t**) picoModules;
94 }