43 static void PrintLogHeader()
47 Print(
"+====================================================================+\n");
55 int APIENTRY
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
56 LPSTR lpCmdLine,
int nCmdShow)
62 if (strstr(lpCmdLine,
"-server"))
63 ErrLog = fopen(
"serverlog.txt",
"w");
65 ErrLog = fopen(
"errlog.txt",
"w");
69 if (strstr(lpCmdLine,
"-test")) {
70 Print(
" Request TEST mode\n");
74 if (strstr(lpCmdLine,
"-fps")) {
78 if (strstr(lpCmdLine,
"-dump")) {
79 Print(
" Request dump dynamic missions\n");
83 if (strstr(lpCmdLine,
"-lan")) {
84 Print(
" Request LAN ONLY mode\n");
88 if (strstr(lpCmdLine,
"-server")) {
90 Print(
" Request Standalone Server Mode\n");
93 char* d3dinfo = strstr(lpCmdLine,
"-d3d");
95 int n = d3dinfo[4] -
'0';
135 if (server->
Init(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
136 result = server->
Run();
138 Print(
"\n+====================================================================+\n");
139 Print(
" Begin Shutdown...\n");
150 if (stars->
Init(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
151 result = stars->
Run();
153 Print(
"\n+====================================================================+\n");
154 Print(
" Begin Shutdown...\n");
165 catch (
const char* msg) {
166 Print(
" FATAL EXCEPTION: '%s'\n", msg);
174 Print(
"+====================================================================+\n");
175 Print(
" END OF LINE.\n");