svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22717:22875
[blender.git] / source / gameengine / Ketsji / KX_GameActuator.h
1  
2 //
3 // actuator for global game stuff
4 //
5 // $Id$
6 //
7 // ***** BEGIN GPL LICENSE BLOCK *****
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software Foundation,
21 // Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 //
23 // The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 // All rights reserved.
25 //
26 // The Original Code is: all of this file.
27 //
28 // Contributor(s): none yet.
29 //
30 // ***** END GPL LICENSE BLOCK *****
31 //
32
33 #ifndef __KX_GAMEACTUATOR
34 #define __KX_GAMEACTUATOR
35
36 #include "SCA_IActuator.h"
37
38 class KX_GameActuator : public SCA_IActuator
39 {
40         Py_Header;
41 protected:
42         int                                                     m_mode;
43         bool                                            m_restart;
44         STR_String                                      m_filename;
45         STR_String                                      m_loadinganimationname;
46         class KX_Scene*                         m_scene;
47         class KX_KetsjiEngine*          m_ketsjiengine;
48
49  public:
50         enum KX_GameActuatorMode
51         {
52                 KX_GAME_NODEF = 0,
53                 KX_GAME_LOAD,
54                 KX_GAME_START,
55                 KX_GAME_RESTART,
56                 KX_GAME_QUIT,
57                 KX_GAME_SAVECFG,
58                 KX_GAME_LOADCFG,
59                 KX_GAME_MAX
60
61         };
62
63         KX_GameActuator(SCA_IObject* gameobj,
64                                          int mode,
65                                          const STR_String& filename,
66                                          const STR_String& loadinganimationname,
67                                          KX_Scene* scene,
68                                          KX_KetsjiEngine* ketsjiEngine);
69         virtual ~KX_GameActuator();
70
71         virtual CValue* GetReplica();
72
73         virtual bool Update();
74         
75         /* --------------------------------------------------------------------- */
76         /* Python interface ---------------------------------------------------- */
77         /* --------------------------------------------------------------------- */
78         
79 }; /* end of class KX_GameActuator */
80
81 #endif
82