diff options
-rw-r--r-- | src/openttd.cpp | 9 | ||||
-rw-r--r-- | src/openttd.h | 2 | ||||
-rw-r--r-- | src/os/os2/os2.cpp | 2 | ||||
-rw-r--r-- | src/os/unix/unix.cpp | 2 | ||||
-rw-r--r-- | src/os/windows/win32.cpp | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 35677f155..0c236a9d6 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -524,8 +524,13 @@ static const OptionData _options[] = { GETOPT_END() }; - -int ttd_main(int argc, char *argv[]) +/** + * Main entry point for this lovely game. + * @param argc The number of arguments passed to this game. + * @param argv The values of the arguments. + * @return 0 when there is no error. + */ +int openttd_main(int argc, char *argv[]) { char *musicdriver = NULL; char *sounddriver = NULL; diff --git a/src/openttd.h b/src/openttd.h index 7df5a39b1..5e360d6fc 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -75,7 +75,7 @@ extern PauseModeByte _pause_mode; void AskExitGame(); void AskExitToGameMenu(); -int ttd_main(int argc, char *argv[]); +int openttd_main(int argc, char *argv[]); void HandleExitGameRequest(); void SwitchToMode(SwitchMode new_mode); diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp index 21fd0c78b..82ba19924 100644 --- a/src/os/os2/os2.cpp +++ b/src/os/os2/os2.cpp @@ -172,7 +172,7 @@ int CDECL main(int argc, char *argv[]) { SetRandomSeed(time(NULL)); - return ttd_main(argc, argv); + return openttd_main(argc, argv); } bool GetClipboardContents(char *buffer, size_t buff_len) diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index 7cd9709f8..09bf6c6e7 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -272,7 +272,7 @@ int CDECL main(int argc, char *argv[]) signal(SIGPIPE, SIG_IGN); - ret = ttd_main(argc, argv); + ret = openttd_main(argc, argv); #ifdef WITH_COCOA cocoaReleaseAutoreleasePool(); diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 3bb22288f..30c259a64 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -462,7 +462,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi argc = ParseCommandLine(cmdline, argv, lengthof(argv)); - ttd_main(argc, argv); + openttd_main(argc, argv); return 0; } |