X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=plugins%2Fimage%2Fimage.cpp;h=4f3e07a8790d45716441d958796601ad7b95564e;hb=56d943d1d6855f6cf35063b25616f88725fc3ac4;hp=4436dde448be14fa03bb5b3b52d8448c26693de2;hpb=bfc8a12a6b315ae261101a34db8ba1b682c67bb7;p=xonotic%2Fnetradiant.git diff --git a/plugins/image/image.cpp b/plugins/image/image.cpp index 4436dde4..4f3e07a8 100644 --- a/plugins/image/image.cpp +++ b/plugins/image/image.cpp @@ -1,23 +1,23 @@ /* -Copyright (C) 2001-2006, William Joseph. -All Rights Reserved. + Copyright (C) 2001-2006, William Joseph. + All Rights Reserved. -This file is part of GtkRadiant. + This file is part of GtkRadiant. -GtkRadiant is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + GtkRadiant is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -GtkRadiant is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + GtkRadiant is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with GtkRadiant; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include "image.h" @@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "bmp.h" #include "pcx.h" #include "dds.h" +#include "ktx.h" #include "modulesystem/singletonmodule.h" @@ -39,19 +40,17 @@ class ImageDependencies : public GlobalFileSystemModuleRef class ImageTGAAPI { - _QERPlugImageTable m_imagetga; +_QERPlugImageTable m_imagetga; public: - typedef _QERPlugImageTable Type; - STRING_CONSTANT(Name, "tga"); - - ImageTGAAPI() - { - m_imagetga.loadImage = LoadTGA; - } - _QERPlugImageTable* getTable() - { - return &m_imagetga; - } +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "tga" ); + +ImageTGAAPI(){ + m_imagetga.loadImage = LoadTGA; +} +_QERPlugImageTable* getTable(){ + return &m_imagetga; +} }; typedef SingletonModule ImageTGAModule; @@ -61,19 +60,17 @@ ImageTGAModule g_ImageTGAModule; class ImageJPGAPI { - _QERPlugImageTable m_imagejpg; +_QERPlugImageTable m_imagejpg; public: - typedef _QERPlugImageTable Type; - STRING_CONSTANT(Name, "jpg"); - - ImageJPGAPI() - { - m_imagejpg.loadImage = LoadJPG; - } - _QERPlugImageTable* getTable() - { - return &m_imagejpg; - } +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "jpg" ); + +ImageJPGAPI(){ + m_imagejpg.loadImage = LoadJPG; +} +_QERPlugImageTable* getTable(){ + return &m_imagejpg; +} }; typedef SingletonModule ImageJPGModule; @@ -83,19 +80,17 @@ ImageJPGModule g_ImageJPGModule; class ImageBMPAPI { - _QERPlugImageTable m_imagebmp; +_QERPlugImageTable m_imagebmp; public: - typedef _QERPlugImageTable Type; - STRING_CONSTANT(Name, "bmp"); - - ImageBMPAPI() - { - m_imagebmp.loadImage = LoadBMP; - } - _QERPlugImageTable* getTable() - { - return &m_imagebmp; - } +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "bmp" ); + +ImageBMPAPI(){ + m_imagebmp.loadImage = LoadBMP; +} +_QERPlugImageTable* getTable(){ + return &m_imagebmp; +} }; typedef SingletonModule ImageBMPModule; @@ -105,19 +100,17 @@ ImageBMPModule g_ImageBMPModule; class ImagePCXAPI { - _QERPlugImageTable m_imagepcx; +_QERPlugImageTable m_imagepcx; public: - typedef _QERPlugImageTable Type; - STRING_CONSTANT(Name, "pcx"); - - ImagePCXAPI() - { - m_imagepcx.loadImage = LoadPCX32; - } - _QERPlugImageTable* getTable() - { - return &m_imagepcx; - } +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "pcx" ); + +ImagePCXAPI(){ + m_imagepcx.loadImage = LoadPCX32; +} +_QERPlugImageTable* getTable(){ + return &m_imagepcx; +} }; typedef SingletonModule ImagePCXModule; @@ -127,19 +120,17 @@ ImagePCXModule g_ImagePCXModule; class ImageDDSAPI { - _QERPlugImageTable m_imagedds; +_QERPlugImageTable m_imagedds; public: - typedef _QERPlugImageTable Type; - STRING_CONSTANT(Name, "dds"); - - ImageDDSAPI() - { - m_imagedds.loadImage = LoadDDS; - } - _QERPlugImageTable* getTable() - { - return &m_imagedds; - } +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "dds" ); + +ImageDDSAPI(){ + m_imagedds.loadImage = LoadDDS; +} +_QERPlugImageTable* getTable(){ + return &m_imagedds; +} }; typedef SingletonModule ImageDDSModule; @@ -147,13 +138,33 @@ typedef SingletonModule ImageDDSModule; ImageDDSModule g_ImageDDSModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer& server) +class ImageKTXAPI { - initialiseModule(server); +_QERPlugImageTable m_imagektx; +public: +typedef _QERPlugImageTable Type; +STRING_CONSTANT( Name, "ktx" ); + +ImageKTXAPI(){ + m_imagektx.loadImage = LoadKTX; +} +_QERPlugImageTable* getTable(){ + return &m_imagektx; +} +}; + +typedef SingletonModule ImageKTXModule; + +ImageKTXModule g_ImageKTXModule; + + +extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){ + initialiseModule( server ); - g_ImageTGAModule.selfRegister(); - g_ImageJPGModule.selfRegister(); - g_ImageBMPModule.selfRegister(); - g_ImagePCXModule.selfRegister(); - g_ImageDDSModule.selfRegister(); + g_ImageTGAModule.selfRegister(); + g_ImageJPGModule.selfRegister(); + g_ImageBMPModule.selfRegister(); + g_ImagePCXModule.selfRegister(); + g_ImageDDSModule.selfRegister(); + g_ImageKTXModule.selfRegister(); }