root/GtkRadiant/trunk/libs/picomodel/picomodules.c
| Revision 183, 3.0 kB (checked in by timo, 1 year ago) | |
|---|---|
| |
| Line | |
|---|---|
| 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 | |
| 58 | |
| 59 | |
| 60 | /* list of all supported file format modules */ |
| 61 | const picoModule_t *picoModules[] = |
| 62 | { |
| 63 | &picoModuleMD3, /* quake3 arena md3 */ |
| 64 | &picoModule3DS, /* autodesk 3ds */ |
| 65 | &picoModuleASE, /* autodesk ase */ |
| 66 | &picoModuleMS3D, /* milkshape3d */ |
| 67 | &picoModuleMDC, /* return to castle wolfenstein mdc */ |
| 68 | &picoModuleMD2, /* quake2 md2 */ |
| 69 | &picoModuleFM, /* heretic2 fm */ |
| 70 | &picoModuleOBJ, /* wavefront object */ |
| 71 | &picoModuleLWO, /* lightwave object */ |
| 72 | NULL /* arnold */ |
| 73 | }; |
| 74 | |
| 75 | |
| 76 | |
| 77 | /* |
| 78 | PicoModuleList() |
| 79 | returns a pointer to the module list and optionally stores |
| 80 | the number of supported modules in 'numModules'. Note that |
| 81 | this param can be NULL when the count is not needed. |
| 82 | */ |
| 83 | |
| 84 | const picoModule_t **PicoModuleList( int *numModules ) |
| 85 | { |
| 86 | /* get module count */ |
| 87 | if( numModules != NULL ) |
| 88 | for( (*numModules) = 0; picoModules[ *numModules ] != NULL; (*numModules)++ ); |
| 89 | |
| 90 | /* return list of modules */ |
| 91 | return (const picoModule_t**) picoModules; |
| 92 | } |
Note: See TracBrowser for help on using the browser.
