Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
director_server.cpp
Go to the documentation of this file.
1 /*
2  * Vega Strike
3  * Copyright (C) 2001-2002 Daniel Horn
4  *
5  * http://vegastrike.sourceforge.net/
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program 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.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 /*
23  * xml Mission Scripting written by Alexander Rawass <alexannika@users.sourceforge.net>
24  */
25 #include "config.h"
26 #ifdef HAVE_PYTHON
27 #include <Python.h>
28 #endif
29 #include "python/python_class.h"
30 #include <boost/version.hpp>
31 #if BOOST_VERSION != 102800
32 #include <boost/python/class.hpp>
33 #else
34 #include <boost/python/detail/extension_class.hpp>
35 #endif
36 #include <math.h>
37 #include <stdlib.h>
38 #include <stdio.h>
39 #include <errno.h>
40 #ifndef WIN32
41 //this file isn't available on my system (all win32 machines?) i dun even know what it has or if we need it as I can compile without it
42 #include <unistd.h>
43 #include <pwd.h>
44 #endif
45 
46 #include "python/python_class.h"
47 
48 #include "cmd/unit_generic.h"
49 #include "mission.h"
50 
51 PYTHON_BEGIN_MODULE( Base )
52 //Nothing here, but keeps those files that do a "import Base" happy.
53 PYTHON_END_MODULE( Base )
54 
56 //Nothing here, but keeps those files that do a "import Briefing" happy.
58 
59 void InitBase()
60 {
61  Python::reseterrors();
62  PYTHON_INIT_MODULE( Base );
63  Python::reseterrors();
64 }
66 {
67  Python::reseterrors();
69  Python::reseterrors();
70 }
71 
73 {
74  double oldgametime = gametime;
75  gametime += SIMULATION_ATOM; //elapsed;
76 
77  try {
78  if (runtime.pymissions)
80  }
81  catch (...) {
82  if ( PyErr_Occurred() ) {
83  PyErr_Print();
84  PyErr_Clear();
85  fflush( stderr );
86  fflush( stdout );
87  } throw;
88  }
89 }
92 varInst* Mission::call_briefing( missionNode *node, int mode )
93 {
94  return NULL;
95 }
96