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");
49 m_imagetga.loadImage = LoadTGA;
51 _QERPlugImageTable* getTable()
57 typedef SingletonModule<ImageTGAAPI> ImageTGAModule;
59 ImageTGAModule g_ImageTGAModule;
64 _QERPlugImageTable m_imagejpg;
66 typedef _QERPlugImageTable Type;
67 STRING_CONSTANT(Name, "jpg");
71 m_imagejpg.loadImage = LoadJPG;
73 _QERPlugImageTable* getTable()
79 typedef SingletonModule<ImageJPGAPI, ImageDependencies> ImageJPGModule;
81 ImageJPGModule g_ImageJPGModule;
86 _QERPlugImageTable m_imagebmp;
88 typedef _QERPlugImageTable Type;
89 STRING_CONSTANT(Name, "bmp");
93 m_imagebmp.loadImage = LoadBMP;
95 _QERPlugImageTable* getTable()
101 typedef SingletonModule<ImageBMPAPI, ImageDependencies> ImageBMPModule;
103 ImageBMPModule g_ImageBMPModule;
108 _QERPlugImageTable m_imagepcx;
110 typedef _QERPlugImageTable Type;
111 STRING_CONSTANT(Name, "pcx");
115 m_imagepcx.loadImage = LoadPCX32;
117 _QERPlugImageTable* getTable()
123 typedef SingletonModule<ImagePCXAPI, ImageDependencies> ImagePCXModule;
125 ImagePCXModule g_ImagePCXModule;
130 _QERPlugImageTable m_imagedds;
132 typedef _QERPlugImageTable Type;
133 STRING_CONSTANT(Name, "dds");
137 m_imagedds.loadImage = LoadDDS;
139 _QERPlugImageTable* getTable()
145 typedef SingletonModule<ImageDDSAPI, ImageDependencies> ImageDDSModule;
147 ImageDDSModule g_ImageDDSModule;
150 extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer& server)
152 initialiseModule(server);
154 g_ImageTGAModule.selfRegister();
155 g_ImageJPGModule.selfRegister();
156 g_ImageBMPModule.selfRegister();
157 g_ImagePCXModule.selfRegister();
158 g_ImageDDSModule.selfRegister();