// this is a wrapper to launch EDuke32 properly from Dukester X // gcc -o duke3d_w32.exe wrapper.c #include #include #include #define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n')) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow) { int i,j; LPTSTR szCmdLine; char CmdLine[1024]; char sCmdLine[1024]; char szFileName[255]; FILE * fp=fopen("wrapper.log","w"); STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&szFileName,sizeof(szFileName)); for(i=0;i