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 "debugging/debugging.h"
26 #include "iscenegraph.h"
28 #include "iselection.h"
33 #include "ireference.h"
35 #include "preferencesystem.h"
36 #include "qerplugin.h"
37 #include "namespace.h"
38 #include "modelskin.h"
40 #include "typesystem.h"
43 #include "skincache.h"
45 #include "modulesystem/singletonmodule.h"
47 class EntityDependencies :
48 public GlobalRadiantModuleRef,
49 public GlobalOpenGLModuleRef,
50 public GlobalUndoModuleRef,
51 public GlobalSceneGraphModuleRef,
52 public GlobalShaderCacheModuleRef,
53 public GlobalSelectionModuleRef,
54 public GlobalReferenceModuleRef,
55 public GlobalFilterModuleRef,
56 public GlobalPreferenceSystemModuleRef,
57 public GlobalNamespaceModuleRef,
58 public GlobalModelSkinCacheModuleRef
62 class EntityQ3API : public TypeSystemRef
64 EntityCreator* m_entityq3;
66 typedef EntityCreator Type;
67 STRING_CONSTANT( Name, "quake3" );
72 m_entityq3 = &GetEntityCreator();
74 GlobalReferenceCache().setEntityCreator( *m_entityq3 );
79 EntityCreator* getTable(){
84 typedef SingletonModule<EntityQ3API, EntityDependencies> EntityQ3Module;
86 EntityQ3Module g_EntityQ3Module;
89 class EntityWolfAPI : public TypeSystemRef
91 EntityCreator* m_entitywolf;
93 typedef EntityCreator Type;
94 STRING_CONSTANT( Name, "wolf" );
97 Entity_Construct( eGameTypeRTCW );
99 m_entitywolf = &GetEntityCreator();
101 GlobalReferenceCache().setEntityCreator( *m_entitywolf );
106 EntityCreator* getTable(){
111 typedef SingletonModule<EntityWolfAPI, EntityDependencies> EntityWolfModule;
113 EntityWolfModule g_EntityWolfModule;
116 class EntityDoom3API : public TypeSystemRef
118 EntityCreator* m_entitydoom3;
120 typedef EntityCreator Type;
121 STRING_CONSTANT( Name, "doom3" );
124 Entity_Construct( eGameTypeDoom3 );
126 m_entitydoom3 = &GetEntityCreator();
128 GlobalReferenceCache().setEntityCreator( *m_entitydoom3 );
133 EntityCreator* getTable(){
134 return m_entitydoom3;
138 typedef SingletonModule<EntityDoom3API, EntityDependencies> EntityDoom3Module;
140 EntityDoom3Module g_EntityDoom3Module;
143 extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){
144 initialiseModule( server );
146 g_EntityQ3Module.selfRegister();
147 g_EntityWolfModule.selfRegister();
148 g_EntityDoom3Module.selfRegister();
149 Doom3ModelSkinCacheModule_selfRegister( server );