]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/entity/plugin.cpp
Revert partially (auto) "reformat code! now the code is only ugly on the *inside*"
[xonotic/netradiant.git] / plugins / entity / plugin.cpp
index 58ace895bb2d9efc5167320c4ecbc10ecb8263f0..58b6fb37ee5a854d981f7b81b0ca0487d78c2567 100644 (file)
@@ -1,25 +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
-*/
-
-#include "plugin.h"
+   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 "debugging/debugging.h"
 
@@ -45,43 +43,40 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "modulesystem/singletonmodule.h"
 
 class EntityDependencies :
-  public GlobalRadiantModuleRef,
-  public GlobalOpenGLModuleRef,
-  public GlobalUndoModuleRef,
-  public GlobalSceneGraphModuleRef,
-  public GlobalShaderCacheModuleRef,
-  public GlobalSelectionModuleRef,
-  public GlobalReferenceModuleRef,
-  public GlobalFilterModuleRef,
-  public GlobalPreferenceSystemModuleRef,
-  public GlobalNamespaceModuleRef,
-  public GlobalModelSkinCacheModuleRef
+       public GlobalRadiantModuleRef,
+       public GlobalOpenGLModuleRef,
+       public GlobalUndoModuleRef,
+       public GlobalSceneGraphModuleRef,
+       public GlobalShaderCacheModuleRef,
+       public GlobalSelectionModuleRef,
+       public GlobalReferenceModuleRef,
+       public GlobalFilterModuleRef,
+       public GlobalPreferenceSystemModuleRef,
+       public GlobalNamespaceModuleRef,
+       public GlobalModelSkinCacheModuleRef
 {
 };
 
 class EntityQ3API : public TypeSystemRef
 {
-  EntityCreator* m_entityq3;
+EntityCreator* m_entityq3;
 public:
-  typedef EntityCreator Type;
-  STRING_CONSTANT(Name, "quake3");
-
-  EntityQ3API()
-  {
-    Entity_Construct();
-
-    m_entityq3 = &GetEntityCreator();
-
-    GlobalReferenceCache().setEntityCreator(*m_entityq3);
-  }
-  ~EntityQ3API()
-  {
-    Entity_Destroy();
-  }
-  EntityCreator* getTable()
-  {
-    return m_entityq3;
-  }
+typedef EntityCreator Type;
+STRING_CONSTANT( Name, "quake3" );
+
+EntityQ3API(){
+       Entity_Construct();
+
+       m_entityq3 = &GetEntityCreator();
+
+       GlobalReferenceCache().setEntityCreator( *m_entityq3 );
+}
+~EntityQ3API(){
+       Entity_Destroy();
+}
+EntityCreator* getTable(){
+       return m_entityq3;
+}
 };
 
 typedef SingletonModule<EntityQ3API, EntityDependencies> EntityQ3Module;
@@ -91,27 +86,24 @@ EntityQ3Module g_EntityQ3Module;
 
 class EntityWolfAPI : public TypeSystemRef
 {
-  EntityCreator* m_entitywolf;
+EntityCreator* m_entitywolf;
 public:
-  typedef EntityCreator Type;
-  STRING_CONSTANT(Name, "wolf");
-
-  EntityWolfAPI()
-  {
-    Entity_Construct(eGameTypeRTCW);
-
-    m_entitywolf = &GetEntityCreator();
-
-    GlobalReferenceCache().setEntityCreator(*m_entitywolf);
-  }
-  ~EntityWolfAPI()
-  {
-    Entity_Destroy();
-  }
-  EntityCreator* getTable()
-  {
-    return m_entitywolf;
-  }
+typedef EntityCreator Type;
+STRING_CONSTANT( Name, "wolf" );
+
+EntityWolfAPI(){
+       Entity_Construct( eGameTypeRTCW );
+
+       m_entitywolf = &GetEntityCreator();
+
+       GlobalReferenceCache().setEntityCreator( *m_entitywolf );
+}
+~EntityWolfAPI(){
+       Entity_Destroy();
+}
+EntityCreator* getTable(){
+       return m_entitywolf;
+}
 };
 
 typedef SingletonModule<EntityWolfAPI, EntityDependencies> EntityWolfModule;
@@ -121,27 +113,24 @@ EntityWolfModule g_EntityWolfModule;
 
 class EntityDoom3API : public TypeSystemRef
 {
-  EntityCreator* m_entitydoom3;
+EntityCreator* m_entitydoom3;
 public:
-  typedef EntityCreator Type;
-  STRING_CONSTANT(Name, "doom3");
-
-  EntityDoom3API()
-  {
-    Entity_Construct(eGameTypeDoom3);
-
-    m_entitydoom3 = &GetEntityCreator();
-
-    GlobalReferenceCache().setEntityCreator(*m_entitydoom3);
-  }
-  ~EntityDoom3API()
-  {
-    Entity_Destroy();
-  }
-  EntityCreator* getTable()
-  {
-    return m_entitydoom3;
-  }
+typedef EntityCreator Type;
+STRING_CONSTANT( Name, "doom3" );
+
+EntityDoom3API(){
+       Entity_Construct( eGameTypeDoom3 );
+
+       m_entitydoom3 = &GetEntityCreator();
+
+       GlobalReferenceCache().setEntityCreator( *m_entitydoom3 );
+}
+~EntityDoom3API(){
+       Entity_Destroy();
+}
+EntityCreator* getTable(){
+       return m_entitydoom3;
+}
 };
 
 typedef SingletonModule<EntityDoom3API, EntityDependencies> EntityDoom3Module;
@@ -149,12 +138,11 @@ typedef SingletonModule<EntityDoom3API, EntityDependencies> EntityDoom3Module;
 EntityDoom3Module g_EntityDoom3Module;
 
 
-extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer& server)
-{
-  initialiseModule(server);
+extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer& server ){
+       initialiseModule( server );
 
-  g_EntityQ3Module.selfRegister();
-  g_EntityWolfModule.selfRegister();
-  g_EntityDoom3Module.selfRegister();
-  Doom3ModelSkinCacheModule_selfRegister(server);
+       g_EntityQ3Module.selfRegister();
+       g_EntityWolfModule.selfRegister();
+       g_EntityDoom3Module.selfRegister();
+       Doom3ModelSkinCacheModule_selfRegister( server );
 }