Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "cmd/unit_generic.h"
#include "python_compile.h"
#include <compile.h>
#include <eval.h>
#include "configxml.h"
#include "vs_globals.h"
#include "vsfilesystem.h"
#include "init.h"
#include "universe_util.h"
#include "in_kb_data.h"
Go to the source code of this file.
Functions | |
char * | LoadString (const char *filename) |
std::string | getCompilingName (const std::string &name) |
void | InterpretPython (const std::string &name) |
PyCodeObject * | CompilePython (const std::string &name) |
void | CompileRunPython (const std::string &filename) |
PyObject * | CreateTuple (const std::vector< PythonBasicType > &values) |
static void | pySetScratchVector (const KBSTATE k) |
void | RunPythonPress (const KBData &s, KBSTATE k) |
void | RunPythonRelease (const KBData &s, KBSTATE k) |
void | RunPythonToggle (const KBData &s, KBSTATE k) |
void | RunPythonPhysicsFrame (const KBData &s, KBSTATE k) |
Variables | |
Hashtable< string, PyCodeObject, 1023 > | compiled_python |
PyCodeObject* CompilePython | ( | const std::string & | name) |
Definition at line 49 of file python_compile.cpp.
References fprintf, Hashtable< KEY, VALUE, SIZ >::Get(), getCompilingName(), LoadString(), and Hashtable< KEY, VALUE, SIZ >::Put().
Referenced by CompileRunPython().
void CompileRunPython | ( | const std::string & | filename) |
Definition at line 72 of file python_compile.cpp.
References CompilePython(), d, VegaConfig::getVariable(), InterpretPython(), XMLSupport::parse_bool(), and vs_config.
Referenced by ChooseNavPoint(), DockedScript(), PythonAI< SuperClass >::Factory(), PythonClass< PythonMissionBaseClass >::Factory(), RunPython(), RunPythonPhysicsFrame(), RunPythonPress(), RunPythonRelease(), and RunPythonToggle().
PyObject* CreateTuple | ( | const std::vector< PythonBasicType > & | values) |
Definition at line 99 of file python_compile.cpp.
References i.
std::string getCompilingName | ( | const std::string & | name) |
Definition at line 31 of file python_compile.cpp.
References DELIMSTR, and VSFileSystem::homedir.
Referenced by CompilePython(), and InterpretPython().
void InterpretPython | ( | const std::string & | name) |
Definition at line 37 of file python_compile.cpp.
References getCompilingName(), VSFileSystem::vs_close(), and VSFileSystem::vs_open().
Referenced by CompileRunPython().
char* LoadString | ( | const char * | filename) |
Definition at line 13 of file python_compile.cpp.
References VSFileSystem::vs_close(), VSFileSystem::vs_fseek(), VSFileSystem::vs_ftell(), VSFileSystem::vs_open(), and VSFileSystem::vs_read().
Referenced by CompilePython().
|
static |
Definition at line 110 of file python_compile.cpp.
References DOWN, PRESS, RELEASE, UniverseUtil::setScratchVector(), UP, and Vector.
Referenced by RunPythonPhysicsFrame(), RunPythonPress(), RunPythonRelease(), and RunPythonToggle().
Definition at line 158 of file python_compile.cpp.
References CompileRunPython(), KBData::data, DOWN, pySetScratchVector(), UniverseUtil::setScratchVector(), UP, and Vector.
Referenced by initGlobalCommandMap().
Definition at line 131 of file python_compile.cpp.
References CompileRunPython(), KBData::data, PRESS, pySetScratchVector(), UniverseUtil::setScratchVector(), and Vector.
Referenced by initGlobalCommandMap().
Definition at line 140 of file python_compile.cpp.
References CompileRunPython(), KBData::data, pySetScratchVector(), RELEASE, UniverseUtil::setScratchVector(), and Vector.
Referenced by initGlobalCommandMap().
Definition at line 149 of file python_compile.cpp.
References CompileRunPython(), KBData::data, PRESS, pySetScratchVector(), RELEASE, UniverseUtil::setScratchVector(), and Vector.
Referenced by initGlobalCommandMap().
Hashtable< string, PyCodeObject, 1023 > compiled_python |
Definition at line 11 of file python_compile.cpp.