openttd.c
changeset 2767 3282c77ffc27
parent 2756 0c73c4710821
child 2769 acea0abd2195
--- a/openttd.c	Sun Dec 18 08:01:05 2005 +0000
+++ b/openttd.c	Sun Dec 18 12:10:46 2005 +0000
@@ -43,11 +43,6 @@
 
 #include <stdarg.h>
 
-#ifdef GPMI
-#include <gpmi.h>
-#include <gpmi_pkg/paths.h>
-#endif /* GPMI */
-
 void GenerateWorld(int mode, uint size_x, uint size_y);
 void CallLandscapeTick(void);
 void IncreaseDate(void);
@@ -314,9 +309,6 @@
 	uint startdate = -1;
 	bool dedicated;
 
-#ifdef GPMI
-	_ai.gpmi_param[0] = 0;
-#endif /* GPMI */
 	musicdriver[0] = sounddriver[0] = videodriver[0] = 0;
 
 	_game_mode = GM_MENU;
@@ -331,9 +323,9 @@
 	//   a ':' behind it means: it need a param (e.g.: -m<driver>)
 	//   a '::' behind it means: it can optional have a param (e.g.: -d<debug>)
 	#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(WIN32)
-		optformat = "a:bm:s:v:hDfn::eit:d::r:g::G:p:c:";
+		optformat = "bm:s:v:hDfn::eit:d::r:g::G:p:c:";
 	#else
-		optformat = "a:bm:s:v:hDn::eit:d::r:g::G:p:c:"; // no fork option
+		optformat = "bm:s:v:hDn::eit:d::r:g::G:p:c:"; // no fork option
 	#endif
 
 	MyGetOptInit(&mgo, argc-1, argv+1, optformat);
@@ -359,11 +351,6 @@
 				else
 					network_conn = NULL;
 			} break;
-#ifdef GPMI
-		case 'a': ttd_strlcpy(_ai.gpmi_param, mgo.opt, sizeof(_ai.gpmi_param)); break;
-#else
-		case 'a': DEBUG(misc, 0)("The -a option only works if GPMI is compiled with OpenTTD."); break;
-#endif /* GPMI */
 		case 'b': _ai.network_client = true; break;
 		case 'r': ParseResolution(resolution, mgo.opt); break;
 		case 't': startdate = atoi(mgo.opt); break;
@@ -409,21 +396,6 @@
 	DeterminePaths();
 	CheckExternalFiles();
 
-#ifdef GPMI
-	/* Set the debug proc */
-	gpmi_debug_proc = &gpmi_debug_openttd;
-
-	/* Set the script-path (GPMI doesn't support multiple paths, yet!) */
-	gpmi_path_scripts = strdup("ai/scripts");
-
-	/* Initialize GPMI */
-	gpmi_init();
-
-	/* Add our paths so we can find our own packages */
-	gpmi_path_append(&gpmi_path_modules,  "ai/modules");
-	gpmi_path_append(&gpmi_path_packages, "ai/packages");
-#endif /* GPMI */
-
 #if defined(UNIX) && !defined(__MORPHOS__)
 	// We must fork here, or we'll end up without some resources we need (like sockets)
 	if (_dedicated_forks)
@@ -545,11 +517,6 @@
 	/* stop the AI */
 	AI_Uninitialize();
 
-#ifdef GPMI
-	/* Uninitialize GPMI */
-	gpmi_uninit();
-#endif /* GPMI */
-
 	/* Close all and any open filehandles */
 	FioCloseAll();
 	UnInitializeGame();