(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.
This commit is contained in:
truelight
2005-07-10 14:57:43 +00:00
parent b45eee3157
commit 3c9456dd45
5 changed files with 47 additions and 0 deletions

View File

@@ -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)