forked from mirror/OpenTTD
(svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
This commit is contained in:
37
openttd.c
37
openttd.c
@@ -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 @@ int ttd_main(int argc, char* argv[])
|
||||
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 @@ int ttd_main(int argc, char* argv[])
|
||||
// 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 @@ int ttd_main(int argc, char* argv[])
|
||||
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 @@ int ttd_main(int argc, char* argv[])
|
||||
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 @@ int ttd_main(int argc, char* argv[])
|
||||
/* stop the AI */
|
||||
AI_Uninitialize();
|
||||
|
||||
#ifdef GPMI
|
||||
/* Uninitialize GPMI */
|
||||
gpmi_uninit();
|
||||
#endif /* GPMI */
|
||||
|
||||
/* Close all and any open filehandles */
|
||||
FioCloseAll();
|
||||
UnInitializeGame();
|
||||
|
Reference in New Issue
Block a user