diff options
author | truelight <truelight@openttd.org> | 2005-07-10 14:57:43 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-07-10 14:57:43 +0000 |
commit | 3c9456dd45f38386b3357dee2fc93924bdd46696 (patch) | |
tree | d80479fbf61384ebe9e039f86a4290aefd69ff45 /openttd.c | |
parent | b45eee31570afd2045d199dd18a154c42952ad56 (diff) | |
download | openttd-3c9456dd45f38386b3357dee2fc93924bdd46696.tar.xz |
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
support to OpenTTD in preperation of AIScripts (long term). It is OFF
by default. Add GPMI:=1 to Makefile.config to enable.
Diffstat (limited to 'openttd.c')
-rw-r--r-- | openttd.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -37,6 +37,11 @@ #include <stdarg.h> +#ifdef GPMI +#include <gpmi.h> +#include <gpmi/packages/paths.h> +#endif /* GPMI */ + void GenerateWorld(int mode, uint log_x, uint log_y); void CallLandscapeTick(void); void IncreaseDate(void); @@ -593,6 +598,18 @@ int ttd_main(int argc, char* argv[]) DeterminePaths(); CheckExternalFiles(); +#ifdef GPMI + /* Set the debug proc */ + gpmi_debug_proc = &gpmi_debug_openttd; + + /* Initialize GPMI */ + gpmi_init(); + + /* Add our paths so we can find our own packages */ + gpmi_path_append(&gpmi_path_modules, "gpmi/modules"); + gpmi_path_append(&gpmi_path_packages, "gpmi/packages"); +#endif /* GPMI */ + #ifdef UNIX // We must fork here, or we'll end up without some resources we need (like sockets) if (_dedicated_forks) |