From 48b3b8699d7db88ae9307e319535c8ec5b236824 Mon Sep 17 00:00:00 2001 From: truelight Date: Sun, 10 Jul 2005 14:57:43 +0000 Subject: (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. --- openttd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'openttd.c') diff --git a/openttd.c b/openttd.c index 04c24adbd..8ec907162 100644 --- a/openttd.c +++ b/openttd.c @@ -37,6 +37,11 @@ #include +#ifdef GPMI +#include +#include +#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) -- cgit v1.2.3-54-g00ecf