summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-28 21:11:35 +0000
committerrubidium <rubidium@openttd.org>2013-06-28 21:11:35 +0000
commit5b2a5ac790c29eda37b9fcdd549bbb3801c90ead (patch)
treea4081ce8c30cd59710486e060bef7b7a1a5212ca
parent31af0a3397a08d004938f0f721adf13b6b8c390d (diff)
downloadopenttd-5b2a5ac790c29eda37b9fcdd549bbb3801c90ead.tar.xz
(svn r25506) -Document: a function, and name it slightly better
-rw-r--r--src/openttd.cpp9
-rw-r--r--src/openttd.h2
-rw-r--r--src/os/os2/os2.cpp2
-rw-r--r--src/os/unix/unix.cpp2
-rw-r--r--src/os/windows/win32.cpp2
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;
}