changeset 20565:cc068d4ceace draft

(svn r25506) -Document: a function, and name it slightly better
author rubidium <rubidium@openttd.org>
date Fri, 28 Jun 2013 21:11:35 +0000
parents e73faccd7948
children a7ee804282fd
files src/openttd.cpp src/openttd.h src/os/os2/os2.cpp src/os/unix/unix.cpp src/os/windows/win32.cpp
diffstat 5 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -524,8 +524,13 @@
 	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;
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -75,7 +75,7 @@
 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);
--- a/src/os/os2/os2.cpp
+++ b/src/os/os2/os2.cpp
@@ -172,7 +172,7 @@
 {
 	SetRandomSeed(time(NULL));
 
-	return ttd_main(argc, argv);
+	return openttd_main(argc, argv);
 }
 
 bool GetClipboardContents(char *buffer, size_t buff_len)
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -272,7 +272,7 @@
 
 	signal(SIGPIPE, SIG_IGN);
 
-	ret = ttd_main(argc, argv);
+	ret = openttd_main(argc, argv);
 
 #ifdef WITH_COCOA
 	cocoaReleaseAutoreleasePool();
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -462,7 +462,7 @@
 
 	argc = ParseCommandLine(cmdline, argv, lengthof(argv));
 
-	ttd_main(argc, argv);
+	openttd_main(argc, argv);
 	return 0;
 }