/** * Main entry point. * @return The exit code of the program. */ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int argc; char *argv[64]; // max 64 command line arguments /** \todo port FS2OTTD from OpenTTD and use here to convert command line string to UTF8 */ char *cmdline = strdup(GetCommandLine()); argc = ParseCommandLine(cmdline, argv, lengthof(argv)); int result = freerct_main(argc, argv); free(cmdline); return result; }
/** * Main entry point. * @param argc Argument count. * @param argv Argument vector. * @return The exit code of the program. */ int main(int argc, char **argv) { exit(freerct_main(argc, argv)); }