Cafu Engine
CompParticleSystemOld.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_GAMESYS_COMPONENT_PARTICLE_SYSTEM_OLD_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_PARTICLE_SYSTEM_OLD_HPP_INCLUDED
9 
10 #include "CompBase.hpp"
11 
12 
13 namespace MatSys { class RenderMaterialT; }
14 
15 
16 namespace cf
17 {
18  namespace GameSys
19  {
20  /// This component adds a particle system to its entity.
21  /// The particle system is obsolete though: This is just a quick and dirty port
22  /// of the particle system in the old game system to the new component system.
23  /// Both its interface and its implementation need a thorough overhaul.
25  {
26  public:
27 
28  /// The constructor.
30 
31  /// The copy constructor.
32  /// @param Comp The component to create a copy of.
34 
35  /// The destructor.
37 
38 
39  // Base class overrides.
41  const char* GetName() const { return "ParticleSystemOld"; }
42  unsigned int GetEditorColor() const { return 0xFFFF00; }
43 
44 
45  // The TypeSys related declarations for this class.
46  const cf::TypeSys::TypeInfoT* GetType() const { return &TypeInfo; }
47  static void* CreateInstance(const cf::TypeSys::CreateParamsT& Params);
48  static const cf::TypeSys::TypeInfoT TypeInfo;
49 
50 
51  protected:
52 
53  // The Lua API methods of this class.
54  static int EmitParticle(lua_State* LuaState);
55  static int toString(lua_State* LuaState);
56 
57  static const luaL_Reg MethodsList[]; ///< The list of Lua methods for this class.
58  static const char* DocClass;
59  static const cf::TypeSys::MethsDocT DocMethods[];
60  static const cf::TypeSys::VarsDocT DocVars[];
61 
62 
63  private:
64 
65  void InitRenderMats();
66 
67  TypeSys::VarT<std::string> m_Type; ///< The type of the particles emitted by this system.
68 
70  };
71  }
72 }
73 
74 #endif
~ComponentParticleSystemOldT()
The destructor.
Definition: CompParticleSystemOld.cpp:49
unsigned int GetEditorColor() const
Returns a color that the Map Editor can use to render the representation of this component's entity...
Definition: CompParticleSystemOld.hpp:42
ComponentParticleSystemOldT * Clone() const
The virtual copy constructor.
Definition: CompParticleSystemOld.cpp:58
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompParticleSystemOld.hpp:57
ComponentParticleSystemOldT()
The constructor.
Definition: CompParticleSystemOld.cpp:33
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
This component adds a particle system to its entity.
Definition: CompParticleSystemOld.hpp:24
Definition: TypeSys.hpp:68
const char * GetName() const
Returns the name of this component.
Definition: CompParticleSystemOld.hpp:41
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54