11#include " stdafx.h"
2- #include " process.h"
32
43#include " utils/xrLC_Light/xrlc_light.h"
5- #include " utils/xrLCUtil/LevelCompilerLoggerWindow.hpp"
6- #include " xrCore/cdecl_cast.hpp"
7- #include " utils/xrLCUtil/xrLCUtil.hpp"
84// #pragma comment(linker,"/STACK:0x800000,0x400000")
95
10- #pragma comment(lib, "comctl32.lib")
11- #pragma comment(lib, "winmm.LIB")
12-
13- ILevelCompilerLogger& Logger = LevelCompilerLoggerWindow::instance();
14-
15- CThread::LogFunc ProxyMsg = cdecl_cast([](const char * format, ...) {
16- va_list args;
17- va_start (args, format);
18- Logger.clMsgV (format, args);
19- va_end (args);
20- });
21-
22- CThreadManager::ReportStatusFunc ProxyStatus = cdecl_cast([](const char * format, ...) {
23- va_list args;
24- va_start (args, format);
25- Logger.StatusV (format, args);
26- va_end (args);
27- });
28-
29- CThreadManager::ReportProgressFunc ProxyProgress = cdecl_cast([](float progress) { Logger.Progress (progress); });
30-
316static const char * h_str =
327 " The following keys are supported / required:\n "
338 " -? or -h == this help\n "
349 " -f<NAME> == compile level in gamedata\\ levels\\ <NAME>\\\n "
35- " -o == modify build options\n "
3610 " \n "
3711 " NOTE: The last key is required for any functionality\n " ;
3812
3913void Help () { MessageBox (0 , h_str, " Command line options" , MB_OK | MB_ICONINFORMATION); }
4014void Startup (LPSTR lpCmdLine)
4115{
4216 char cmd[512 ];
43- // BOOL bModifyOptions = FALSE;
4417 bool bNet = false ;
4518 xr_strcpy (cmd, lpCmdLine);
4619 _strlwr (cmd);
@@ -54,7 +27,6 @@ void Startup(LPSTR lpCmdLine)
5427 Help ();
5528 return ;
5629 }
57- // if (strstr(cmd,"-o")) bModifyOptions = TRUE;
5830 if (strstr (cmd, " -net" ))
5931 bNet = true ;
6032 // Load project
@@ -65,7 +37,6 @@ void Startup(LPSTR lpCmdLine)
6537 xr_sprintf (temp, " %s - Detail Compiler" , name);
6638 Logger.Initialize (temp);
6739
68- // FS.update_path (name,"$game_levels$",name);
6940 FS.get_path (" $level$" )->_set (name);
7041
7142 CTimer dwStartupTime;
@@ -84,9 +55,9 @@ void Startup(LPSTR lpCmdLine)
8455
8556int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
8657{
87- // Initialize debugging
8858 xrDebug::Initialize (false );
8959 Core.Initialize (" xrDO" );
60+
9061 Startup (lpCmdLine);
9162
9263 return 0 ;
0 commit comments