2 Copyright (C) 2001-2006, William Joseph.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #include "ifilesystem.h"
34 #include "modulesystem/singletonmodule.h"
36 class ImageDependencies : public GlobalFileSystemModuleRef
42 _QERPlugImageTable m_imagetga;
44 typedef _QERPlugImageTable Type;
45 STRING_CONSTANT( Name, "tga" );
48 m_imagetga.loadImage = LoadTGA;
50 _QERPlugImageTable* getTable(){
55 typedef SingletonModule<ImageTGAAPI> ImageTGAModule;
57 ImageTGAModule g_ImageTGAModule;
62 _QERPlugImageTable m_imagejpg;
64 typedef _QERPlugImageTable Type;
65 STRING_CONSTANT( Name, "jpg" );
68 m_imagejpg.loadImage = LoadJPG;
70 _QERPlugImageTable* getTable(){
75 typedef SingletonModule<ImageJPGAPI, ImageDependencies> ImageJPGModule;
77 ImageJPGModule g_ImageJPGModule;
82 _QERPlugImageTable m_imagebmp;
84 typedef _QERPlugImageTable Type;
85 STRING_CONSTANT( Name, "bmp" );
88 m_imagebmp.loadImage = LoadBMP;
90 _QERPlugImageTable* getTable(){
95 typedef SingletonModule<ImageBMPAPI, ImageDependencies> ImageBMPModule;
97 ImageBMPModule g_ImageBMPModule;
102 _QERPlugImageTable m_imagepcx;
104 typedef _QERPlugImageTable Type;
105 STRING_CONSTANT( Name, "pcx" );
108 m_imagepcx.loadImage = LoadPCX32;
110 _QERPlugImageTable* getTable(){
115 typedef SingletonModule<ImagePCXAPI, ImageDependencies> ImagePCXModule;
117 ImagePCXModule g_ImagePCXModule;
122 _QERPlugImageTable m_imagedds;
124 typedef _QERPlugImageTable Type;
125 STRING_CONSTANT( Name, "dds" );
128 m_imagedds.loadImage = LoadDDS;
130 _QERPlugImageTable* getTable(){
135 typedef SingletonModule<ImageDDSAPI, ImageDependencies> ImageDDSModule;
137 ImageDDSModule g_ImageDDSModule;
140 extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){
141 initialiseModule( server );
143 g_ImageTGAModule.selfRegister();
144 g_ImageJPGModule.selfRegister();
145 g_ImageBMPModule.selfRegister();
146 g_ImagePCXModule.selfRegister();
147 g_ImageDDSModule.selfRegister();