41 #ifdef STARSHATTER_DEMO_RELEASE
47 static void PrintLogHeader()
51 Print(
"+====================================================================+\n");
59 int APIENTRY
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
60 LPSTR lpCmdLine,
int nCmdShow)
66 if (strstr(lpCmdLine,
"-server"))
67 ErrLog = fopen(
"serverlog.txt",
"w");
69 ErrLog = fopen(
"errlog.txt",
"w");
73 if (strstr(lpCmdLine,
"-test")) {
74 Print(
" Request TEST mode\n");
78 if (strstr(lpCmdLine,
"-fps")) {
82 if (strstr(lpCmdLine,
"-dump")) {
83 Print(
" Request dump dynamic missions\n");
87 if (strstr(lpCmdLine,
"-lan")) {
88 Print(
" Request LAN ONLY mode\n");
92 if (strstr(lpCmdLine,
"-server")) {
94 Print(
" Request Standalone Server Mode\n");
97 char* d3dinfo = strstr(lpCmdLine,
"-d3d");
99 int n = d3dinfo[4] -
'0';
101 if (n >= 0 && n <= 5)
139 if (server->
Init(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
140 result = server->
Run();
142 Print(
"\n+====================================================================+\n");
143 Print(
" Begin Shutdown...\n");
154 if (stars->
Init(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
155 result = stars->
Run();
157 Print(
"\n+====================================================================+\n");
158 Print(
" Begin Shutdown...\n");
169 catch (
const char* msg) {
170 Print(
" FATAL EXCEPTION: '%s'\n", msg);
178 Print(
"+====================================================================+\n");
179 Print(
" END OF LINE.\n");