diff --git a/GLSL/D64EXPLUS.frag b/GLSL/D64EXPLUS.frag deleted file mode 100644 index e69de29b..00000000 diff --git a/GLSL/D64EXPLUS.vert b/GLSL/D64EXPLUS.vert deleted file mode 100644 index e69de29b..00000000 diff --git a/Windows/Doom64EX+ Launcher.vcxproj b/Windows/Doom64EX+ Launcher.vcxproj deleted file mode 100644 index 314b9bca..00000000 --- a/Windows/Doom64EX+ Launcher.vcxproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {3699e72e-0323-43b5-8c8d-dcea1d8494d9} - Doom64EX+ Launcher - 10.0 - DOOM64EX+ Launcher - - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - false - - - true - - - false - - - - Level3 - true - WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - Level3 - true - true - true - _CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) - - - - - Level3 - true - _CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - Level3 - true - true - true - _CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Windows/Doom64EX+ Launcher.vcxproj.filters b/Windows/Doom64EX+ Launcher.vcxproj.filters deleted file mode 100644 index 9f4529fb..00000000 --- a/Windows/Doom64EX+ Launcher.vcxproj.filters +++ /dev/null @@ -1,46 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/demos/speedrun_penumbra_beta61_any_percent_bg_48_00.lmp b/demos/speedrun_penumbra_beta61_any_percent_bg_48_00.lmp deleted file mode 100644 index e9c4cec4..00000000 Binary files a/demos/speedrun_penumbra_beta61_any_percent_bg_48_00.lmp and /dev/null differ diff --git a/src/launcher/Launcher.c b/src/launcher/Launcher.c deleted file mode 100644 index b9e875d8..00000000 --- a/src/launcher/Launcher.c +++ /dev/null @@ -1,651 +0,0 @@ -//----------------------------------------------------------------------------- -// -// $Id: Launcher.c 968 2011-09-29 04:35:25Z svkaiser $ -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// $Author: svkaiser $ -// $Revision: 968 $ -// $Date: 2011-09-29 04:35:25 +0000 (Thu, 29 Sep 2011) $ -// -// DESCRIPTION: -// -//----------------------------------------------------------------------------- - -#include "Launcher.h" -#include "tk_lib.h" -#pragma comment(lib, "comctl32.lib") - -HINSTANCE hAppInst = NULL; -HWND hwndMain = NULL; -HWND hwndRes = NULL; -HWND hwndSkill = NULL; -HWND hwndWarp = NULL; -HWND hwndNetType = NULL; -HWND hwndPlrName = NULL; -HWND hwndIpAddr = NULL; - -wchar_t CommandLine[1024] = L""; - -POINT Resolutions[] = -{ - { 320, 240 }, - { 640, 480 }, - { 768, 576 }, - { 800, 600 }, - { 1024, 768 }, - { 1152, 864 }, - { 1280, 960 }, - { 1400, 1050 }, - { 1600, 1200 }, - { 2048, 1536 }, - { 3200, 2400 }, - { 4096, 3072 }, - { 6400, 4800 }, - - { 640, 360 }, - { 854, 480 }, - { 1024, 576 }, - { 1024, 600 }, - { 1280, 720 }, - { 1366, 768 }, - { 1600, 900 }, - { 1920, 1080 }, - { 2048, 1152 }, - { 2560, 1440 }, - { 2880, 1620 }, - { 3840, 2160 }, - - { 320, 200 }, - { 1024, 640 }, - { 1280, 600 }, - { 1280, 800 }, - { 1440, 900 }, - { 1680, 1050 }, - { 1920, 1200 }, - { 2560, 1600 }, - { 3840, 2400 }, - { 7680, 4800 }, - - { 1280, 1024 }, - { 2560, 2048 }, - { 5120, 4096 }, - - { 2560, 1080 }, - { 3840, 2160 }, - { 0, 0 } -}; - -wchar_t* Skills[4] = -{ - L"BE GENTLE!", - L"BRING IT ON!", - L"I OWN DOOM!", - L"WATCH ME DIE!" -}; - -wchar_t* NetTypes[2] = -{ - L"Listen Server", - L"Client" -}; - -static bool bDevMode = false; -static bool bFastMonsters = false; -static bool bNoMosnters = false; -static bool bNoMusic = false; -static bool bNoSound = false; -static bool bRespawnThings = false; -static bool bRespawnItems = false; - -static int iWarp = 0; -static int iSkill = 0; -static int iResolution = 0; - -static bool bWindowed = false; - -static wchar_t* sPlayerName = NULL; -static wchar_t* sIPAddress = NULL; -static wchar_t* sPort = NULL; -static bool bNetgame = false; -static bool bDeathMatch = false; -static int iNetType = 0; - -tDefTypes_t LauncherDefaults[] = -{ - {L"devmode", 'i', false, &bDevMode, NULL, NULL}, - {L"fast_monsters", 'i', false, &bFastMonsters, NULL, NULL}, - {L"no_mosnters", 'i', false, &bNoMosnters, NULL, NULL}, - {L"no_music", 'i', false, &bNoMusic, NULL, NULL}, - {L"no_sound", 'i', false, &bNoSound, NULL, NULL}, - {L"respawn_things", 'i', false, &bRespawnThings,NULL, NULL}, - {L"respawn_items", 'i', false, &bRespawnItems, NULL, NULL}, - - {L"level_warp", 'i', 0, &iWarp, NULL, NULL}, - {L"start_skill", 'i', 2, &iSkill, NULL, NULL}, - {L"video_resolution",'i', 4, &iResolution, NULL, NULL}, - - {L"windowed", 'i', true, &bWindowed, NULL, NULL}, - - {L"playername", 's', 0, NULL, L"Player", &sPlayerName}, - {L"ip_address", 's', 0, NULL, L"127.0.0.1", &sIPAddress}, - {L"port", 's', 0, NULL, L"2342", &sPort}, - {L"netgame", 'i', false, &bNetgame, NULL, NULL}, - {L"deathmatch", 'i', false, &bDeathMatch, NULL, NULL}, - {L"nettype", 'i', 0, &iNetType, NULL, NULL}, - - {NULL, '\0',0, NULL, NULL, NULL} -}; - -//************************************************************** -//************************************************************** -// L_InitConfig -// Associates the variables used for LauncherDefaults from the -// config file -//************************************************************** -//************************************************************** - -void L_InitConfig(tDefTypes_t* config, HWND hWnd) -{ - FILE* f; - wchar_t* c[32]; - tDefTypes_t* def; - int size; - - f = fopen(DefaultConfigFile, "rb"); - tk_ResetConfig(config); - - if (f) - { - fseek(f, 0, SEEK_SET); - fseek(f, 0, SEEK_END); - size = ftell(f); - fseek(f, 0, SEEK_SET); - - if (!size) - { - L_Complain(L"tk_ConfigInit: Error reading cfg file! Filesize = %i\n", size); - return; - } - - parse = (byte*)malloc(sizeof(byte) * size); - lastByte = size; - - fread(parse, size, 1, f); - - fclose(f); - - tkLine = 1; - while (tkPos != lastByte) - { - tk_getToken(); tk_toLwrToken(); - - for (def = config; def->field; def++) - { - strncpy(c, def->field, 32); - _strlwr(c); - if (!strncmp(stringToken, c, 32)) - { - tk_ProcessDefs(def); - break; - } - } - } - - tk_FreeParse(); - } - - CheckDlgButton(hWnd, IDC_DEVMODE, bDevMode); - CheckDlgButton(hWnd, IDC_FASTMONSTERS, bFastMonsters); - CheckDlgButton(hWnd, IDC_NOMONSTERS, bNoMosnters); - CheckDlgButton(hWnd, IDC_NOMUSIC, bNoMusic); - CheckDlgButton(hWnd, IDC_NOSOUND, bNoSound); - CheckDlgButton(hWnd, IDC_RESPAWN, bRespawnThings); - CheckDlgButton(hWnd, IDC_RESPAWNITEM, bRespawnItems); - - CheckDlgButton(hWnd, IDC_NETGAME, bNetgame); - CheckDlgButton(hWnd, IDC_NETDM, bDeathMatch); - - CheckDlgButton(hWnd, IDC_WINDOWED, bWindowed); -} - -//************************************************************** -//************************************************************** -// L_InitResolution -//************************************************************** -//************************************************************** - -void L_InitResolution(HWND hWnd) -{ - wchar_t* buff[30]; - POINT* p; - int i = 0; - - hwndRes = GetDlgItem(hWnd, IDC_CORES); - for (i = 0, p = Resolutions; p->x; p++, i++) - { - if (i <= 12) - sprintf(buff, "%dx%d (4:3)", p->x, p->y); - else if (i <= 24) - sprintf(buff, "%dx%d (16:9)", p->x, p->y); - else if (i <= 34) - sprintf(buff, "%dx%d (16:10)", p->x, p->y); - else if (i <= 37) - sprintf(buff, "%dx%d (5:4)", p->x, p->y); - else - sprintf(buff, "%dx%d (21:09)", p->x, p->y); - //Hack for now - GIB - SendMessageA(hwndRes, CB_ADDSTRING, 0, (LPARAM)buff); - SendMessageA(hwndRes, CB_SETITEMDATA, i, (LPARAM)i); - } - SendMessageA(hwndRes, CB_SETCURSEL, iResolution, 0); -} - -//************************************************************** -//************************************************************** -// L_InitSkills -//************************************************************** -//************************************************************** - -void L_InitSkills(HWND hWnd) -{ - int i; - - hwndSkill = GetDlgItem(hWnd, IDC_COSKILL); - for (i = 0; i < 4; i++) - { - SendMessage(hwndSkill, CB_ADDSTRING, 0, (LPARAM)Skills[i]); - SendMessage(hwndSkill, CB_SETITEMDATA, i, (LPARAM)i); - } - SendMessage(hwndSkill, CB_SETCURSEL, iSkill, 0); -} - -//************************************************************** -//************************************************************** -// L_InitNetType -//************************************************************** -//************************************************************** - -void L_InitNetType(HWND hWnd) -{ - int i; - - hwndNetType = GetDlgItem(hWnd, IDC_CONET); - for (i = 0; i < 2; i++) - { - SendMessage(hwndNetType, CB_ADDSTRING, 0, (LPARAM)NetTypes[i]); - SendMessage(hwndNetType, CB_SETITEMDATA, i, (LPARAM)i); - } - SendMessage(hwndNetType, CB_SETCURSEL, iNetType, 0); -} - -//************************************************************** -//************************************************************** -// L_InitWarp -//************************************************************** -//************************************************************** - -void L_InitWarp(HWND hWnd) -{ - int i = 0; - wchar_t* buff[2]; - - hwndWarp = GetDlgItem(hWnd, IDC_COWARP); - SendMessage(hwndWarp, CB_ADDSTRING, 0, (LPARAM)L"None"); - SendMessage(hwndWarp, CB_SETITEMDATA, 0, (LPARAM)i); - for (i = 1; i < 33; i++) - { - sprintf(buff, "%02d", i); - SendMessageA(hwndWarp, CB_ADDSTRING, 0, (LPARAM)buff); - SendMessageA(hwndWarp, CB_SETITEMDATA, i, (LPARAM)i); - } - SendMessageA(hwndWarp, CB_SETCURSEL, iWarp, 0); -} - -//************************************************************** -//************************************************************** -// L_InitName -//************************************************************** -//************************************************************** - -void L_InitName(HWND hWnd) -{ - SetDlgItemText(hWnd, IDC_PLYRNAME, sPlayerName); -} - -//************************************************************** -//************************************************************** -// L_CreateDlgSettings -// Sets all booleans and variables for the config file -//************************************************************** -//************************************************************** - -void L_CreateDlgSettings(HWND hWnd) -{ - bDevMode = IsDlgButtonChecked(hWnd, IDC_DEVMODE); - bFastMonsters = IsDlgButtonChecked(hWnd, IDC_FASTMONSTERS); - bNoMosnters = IsDlgButtonChecked(hWnd, IDC_NOMONSTERS); - bNoMusic = IsDlgButtonChecked(hWnd, IDC_NOMUSIC); - bNoSound = IsDlgButtonChecked(hWnd, IDC_NOSOUND); - bRespawnThings = IsDlgButtonChecked(hWnd, IDC_RESPAWN); - bRespawnItems = IsDlgButtonChecked(hWnd, IDC_RESPAWNITEM); - - bWindowed = IsDlgButtonChecked(hWnd, IDC_WINDOWED); - - iWarp = SendMessage(hwndWarp, CB_GETCURSEL, 0, 0); - iSkill = SendMessage(hwndSkill, CB_GETCURSEL, 0, 0); - iResolution = SendMessage(hwndRes, CB_GETCURSEL, 0, 0); - - bNetgame = IsDlgButtonChecked(hWnd, IDC_NETGAME); - bDeathMatch = IsDlgButtonChecked(hWnd, IDC_NETDM); - iNetType = SendMessage(hwndNetType, CB_GETCURSEL, 0, 0); - - GetDlgItemText(hWnd, IDC_PLYRNAME, sPlayerName, 1024); - if (sPlayerName == "") - sPlayerName = L"Player"; -} - -//************************************************************** -//************************************************************** -// L_SaveConfig -//************************************************************** -//************************************************************** - -void L_SaveConfig(HWND hWnd) -{ - L_CreateDlgSettings(hWnd); - tk_Open(); - tk_SaveConfig(LauncherDefaults); - tk_Close(); -} - -//************************************************************** -//************************************************************** -// L_CreateExecutableParam -// Assembles the path executable and arguments to CommandLine -//************************************************************** -//************************************************************** - -bool L_CreateExecutableParam(HWND hWnd) -{ - PROCESS_INFORMATION pi; - STARTUPINFO si; - wchar_t* buff[1024]; - int data; - POINT* res; - - strcpy(CommandLine, "DOOM64EX+.exe "); - - if (IsDlgButtonChecked(hWnd, IDC_DEVMODE) == BST_CHECKED) strcat(CommandLine, " -devparm"); - if (IsDlgButtonChecked(hWnd, IDC_FASTMONSTERS) == BST_CHECKED) strcat(CommandLine, " -fast"); - if (IsDlgButtonChecked(hWnd, IDC_NOMONSTERS) == BST_CHECKED) strcat(CommandLine, " -nomonsters"); - if (IsDlgButtonChecked(hWnd, IDC_NOMUSIC) == BST_CHECKED) strcat(CommandLine, " -nomusic"); - if (IsDlgButtonChecked(hWnd, IDC_NOSOUND) == BST_CHECKED) strcat(CommandLine, " -nosound"); - if (IsDlgButtonChecked(hWnd, IDC_RESPAWN) == BST_CHECKED) strcat(CommandLine, " -respawn"); - if (IsDlgButtonChecked(hWnd, IDC_RESPAWNITEM) == BST_CHECKED) strcat(CommandLine, " -respawnitem"); - - if (IsDlgButtonChecked(hWnd, IDC_NETGAME) == BST_CHECKED) - { - data = SendMessage(hwndNetType, CB_GETCURSEL, 0, 0); - switch (data) - { - case 0: - strcat(CommandLine, " -server"); - GetDlgItemText(hWnd, IDC_IPADDR, buff, 1024); - - strcat(CommandLine, " "); - strcat(CommandLine, buff); - - if ((!strcmp(buff, "")) || (!strcmp(buff, " "))) - break; - - strcat(CommandLine, " -port"); - strcat(CommandLine, " "); - strcat(CommandLine, buff); - - break; - case 1: - strcat(CommandLine, " -connect"); - GetDlgItemText(hWnd, IDC_IPADDR, buff, 1024); - - if (!strstr(buff, ".") || strlen(buff) < 7) - L_Complain(L"L_CreateExecutableParam: %s is not a valid IP Address", buff); - - strcat(CommandLine, " "); - strcat(CommandLine, buff); - break; - } - } - - strcat(CommandLine, " -playername"); - strcat(CommandLine, " "); - GetDlgItemText(hWnd, IDC_PLYRNAME, buff, 1024); - strcat(CommandLine, buff); - - if (IsDlgButtonChecked(hWnd, IDC_NETDM) == BST_CHECKED) - strcat(CommandLine, " -deathmatch"); - - if (IsDlgButtonChecked(hWnd, IDC_WINDOWED) == BST_CHECKED) - strcat(CommandLine, " -window"); - else strcat(CommandLine, " -fullscreen"); - - data = SendMessage(hwndWarp, CB_GETCURSEL, 0, 0); - if (data) - { - sprintf(buff, " -warp %Ii", SendMessage(hwndWarp, CB_GETITEMDATA, data, 0)); - strcat(CommandLine, buff); - - data = SendMessage(hwndSkill, CB_GETCURSEL, 0, 0) + 1; - sprintf(buff, " -skill %i", data); - strcat(CommandLine, buff); - } - - data = SendMessage(hwndRes, CB_GETCURSEL, 0, 0); - res = &Resolutions[data]; - sprintf(buff, " -width %i", res->x); - strcat(CommandLine, buff); - sprintf(buff, " -height %i", res->y); - strcat(CommandLine, buff); - - GetDlgItemTextA(hWnd, IDC_PARAM, buff, 1024); - strcat(CommandLine, " "); - strcat(CommandLine, buff); - - ZeroMemory(&si, sizeof(STARTUPINFO)); - si.cb = sizeof(STARTUPINFO); - if (CreateProcessA(NULL, CommandLine, NULL, NULL, FALSE, - CREATE_DEFAULT_ERROR_MODE | DETACHED_PROCESS, NULL, NULL, &si, &pi)) - { - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } - else - { - MessageBoxA(NULL, "Unable to launch the game. Make sure launcher is in the same directory as the game executable", "Error", MB_OK); - return false; - } - return true; -} - -//************************************************************** -//************************************************************** -// L_Complain -//************************************************************** -//************************************************************** - -void L_Complain(wchar_t* fmt, ...) -{ - va_list va; - wchar_t* buff[1024]; - - va_start(va, fmt); - vsprintf(buff, fmt, va); - va_end(va); - MessageBox(NULL, buff, L"Error", MB_OK); - exit(1); -} - -//************************************************************** -//************************************************************** -// L_CheckParamOptions -//************************************************************** -//************************************************************** - -void L_CheckParamOptions(HWND hWnd) -{ - wchar_t* port = L"Port (default: 2342)"; - wchar_t* ipaddress = L"IP Address"; - - if (SendMessage(hwndNetType, CB_GETCURSEL, 0, 0) == 1) - { - EnableWindow(GetDlgItem(hWnd, IDC_NETDM), 0); - EnableWindow(GetDlgItem(hWnd, IDC_DEVMODE), 0); - EnableWindow(GetDlgItem(hWnd, IDC_FASTMONSTERS), 0); - EnableWindow(GetDlgItem(hWnd, IDC_NOMONSTERS), 0); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWN), 0); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWNITEM), 0); - EnableWindow(GetDlgItem(hWnd, IDC_COWARP), 0); - EnableWindow(GetDlgItem(hWnd, IDC_COSKILL), 0); - - SendMessage(GetDlgItem(hWnd, IDC_STATIC_IP), WM_SETTEXT, 0, (LPARAM)ipaddress); - - SetDlgItemText(hWnd, IDC_IPADDR, sIPAddress); - - GetDlgItemText(hWnd, IDC_IPADDR, sIPAddress, 1024); - if (sIPAddress == "") - sIPAddress = L"127.0.0.1"; - } - else - { - EnableWindow(GetDlgItem(hWnd, IDC_NETDM), 1); - EnableWindow(GetDlgItem(hWnd, IDC_DEVMODE), 1); - EnableWindow(GetDlgItem(hWnd, IDC_FASTMONSTERS), 1); - EnableWindow(GetDlgItem(hWnd, IDC_NOMONSTERS), 1); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWN), 1); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWNITEM), 1); - EnableWindow(GetDlgItem(hWnd, IDC_COWARP), 1); - EnableWindow(GetDlgItem(hWnd, IDC_COSKILL), 1); - - SendMessage(GetDlgItem(hWnd, IDC_STATIC_IP), WM_SETTEXT, 0, (LPARAM)port); - - SetDlgItemText(hWnd, IDC_IPADDR, sPort); - - GetDlgItemText(hWnd, IDC_IPADDR, sPort, 1024); - if (sPort == "") - sPort = L"2342"; - } -} - -//************************************************************** -//************************************************************** -// L_CheckNetgameOptions -//************************************************************** -//************************************************************** - -void L_CheckNetgameOptions(HWND hWnd) -{ - if (IsDlgButtonChecked(hWnd, IDC_NETGAME) == BST_CHECKED) - { - EnableWindow(GetDlgItem(hWnd, IDC_CONET), 1); - EnableWindow(GetDlgItem(hWnd, IDC_PLYRNAME), 1); - EnableWindow(GetDlgItem(hWnd, IDC_NETDM), 1); - EnableWindow(GetDlgItem(hWnd, IDC_IPADDR), 1); - - L_CheckParamOptions(hWnd); - } - else - { - EnableWindow(GetDlgItem(hWnd, IDC_CONET), 0); - EnableWindow(GetDlgItem(hWnd, IDC_PLYRNAME), 0); - EnableWindow(GetDlgItem(hWnd, IDC_IPADDR), 0); - EnableWindow(GetDlgItem(hWnd, IDC_NETDM), 0); - - EnableWindow(GetDlgItem(hWnd, IDC_DEVMODE), 1); - EnableWindow(GetDlgItem(hWnd, IDC_FASTMONSTERS), 1); - EnableWindow(GetDlgItem(hWnd, IDC_NOMONSTERS), 1); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWN), 1); - EnableWindow(GetDlgItem(hWnd, IDC_RESPAWNITEM), 1); - EnableWindow(GetDlgItem(hWnd, IDC_COWARP), 1); - EnableWindow(GetDlgItem(hWnd, IDC_COSKILL), 1); - } -} - -//************************************************************** -//************************************************************** -// MainDlgProc -//************************************************************** -//************************************************************** - -bool __stdcall MainDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - L_InitConfig(LauncherDefaults, hWnd); - L_InitResolution(hWnd); - L_InitSkills(hWnd); - L_InitWarp(hWnd); - L_InitNetType(hWnd); - L_InitName(hWnd); - - L_CheckParamOptions(hWnd); - L_CheckNetgameOptions(hWnd); - - return TRUE; - - case WM_DESTROY: - L_SaveConfig(hWnd); - return TRUE; - - case WM_CLOSE: - EndDialog(hWnd, FALSE); - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_NETGAME: - L_CheckNetgameOptions(hWnd); - break; - - case IDC_CONET: - L_CheckParamOptions(hWnd); - break; - - case ID_BTNLAUNCH: - if (L_CreateExecutableParam(hWnd)) - SendMessageA(hWnd, WM_ENABLE, 0, 0); - break; - } - break; - } - return FALSE; -} - -//************************************************************** -//************************************************************** -// WinMain -//************************************************************** -//************************************************************** - -int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) -{ - hAppInst = hInstance; - InitCommonControls(); - - DialogBox(hAppInst, MAKEINTRESOURCE(IDD_DLGMAIN), NULL, (DLGPROC)MainDlgProc); - - return 0; -} \ No newline at end of file diff --git a/src/launcher/Launcher.h b/src/launcher/Launcher.h deleted file mode 100644 index 69a9e1ef..00000000 --- a/src/launcher/Launcher.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _LAUNCHER_H_ -#define _LAUNCHER_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "resource.h" - -typedef unsigned char byte; -typedef unsigned short word; -typedef unsigned int uint; -typedef BOOL bool; -typedef byte* cache; -typedef wchar_t* path[MAX_PATH]; - -enum { false = 0, true }; - -void L_Complain(wchar_t* fmt, ...); - -#endif diff --git a/src/launcher/Launcher.ico b/src/launcher/Launcher.ico deleted file mode 100644 index b8443c64..00000000 Binary files a/src/launcher/Launcher.ico and /dev/null differ diff --git a/src/launcher/Launcher.rc b/src/launcher/Launcher.rc deleted file mode 100644 index 3f25379b..00000000 --- a/src/launcher/Launcher.rc +++ /dev/null @@ -1,140 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN -"resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN -"#include ""afxres.h""\r\n" -"\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN -"\r\n" -"\0" -END - -#endif // APSTUDIO_INVOKED - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DLGMAIN DIALOG DISCARDABLE 0, 0, 182, 306 -STYLE DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | -WS_SYSMENU -CAPTION "DOOM64 EX+" -FONT 8, "MS Sans Serif" -BEGIN -DEFPUSHBUTTON "Launch", ID_BTNLAUNCH, 121, 285, 50, 14 -GROUPBOX "Launch Options", IDC_STATIC, 7, 7, 168, 96 -CONTROL "Devmode", IDC_DEVMODE, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 21, 46, 11 -CONTROL "Windowed", IDC_WINDOWED, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 119, 46, 11 -CONTROL "Fast Monsters", IDC_FASTMONSTERS, "Button", -BS_AUTOCHECKBOX | WS_TABSTOP, 11, 32, 59, 11 -CONTROL "No Monsters", IDC_NOMONSTERS, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 43, 59, 11 -CONTROL "No Music", IDC_NOMUSIC, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 54, 59, 11 -CONTROL "No Sound", IDC_NOSOUND, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 65, 59, 11 -CONTROL "Respawn Things", IDC_RESPAWN, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 76, 68, 11 -GROUPBOX "Display", IDC_STATIC, 7, 105, 168, 47 -GROUPBOX "Warp", IDC_STATIC, 91, 15, 80, 30 -GROUPBOX "Skill", IDC_STATIC, 91, 47, 80, 30 -COMBOBOX IDC_COWARP, 95, 26, 72, 150, CBS_DROPDOWNLIST | WS_VSCROLL | -WS_TABSTOP -COMBOBOX IDC_COSKILL, 95, 58, 73, 64, CBS_DROPDOWNLIST | WS_VSCROLL | -WS_TABSTOP -GROUPBOX "Resolution", IDC_STATIC, 86, 115, 86, 29 -COMBOBOX IDC_CORES, 91, 126, 77, 57, CBS_DROPDOWNLIST | WS_VSCROLL | -WS_TABSTOP -EDITTEXT IDC_PARAM, 13, 264, 150, 12, ES_AUTOHSCROLL -LTEXT "Other Parameters", IDC_STATIC, 14, 253, 57, 8 -CONTROL "Respawn Items", IDC_RESPAWNITEM, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 87, 68, 11 -GROUPBOX "Network", IDC_STATIC, 7, 159, 168, 87 -CONTROL "Netgame", IDC_NETGAME, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 172, 46, 11 -GROUPBOX "Network Type", IDC_STATIC, 7, 188, 69, 29 -COMBOBOX IDC_CONET, 13, 199, 59, 57, CBS_DROPDOWNLIST | WS_VSCROLL | -WS_TABSTOP -GROUPBOX "Player Name", IDC_STATIC, 84, 167, 87, 32 -EDITTEXT IDC_PLYRNAME, 90, 181, 74, 12, ES_AUTOHSCROLL -CONTROL "Deathmatch", IDC_NETDM, "Button", BS_AUTOCHECKBOX | -WS_TABSTOP, 11, 222, 54, 11 -GROUPBOX "IP Address", IDC_STATIC_IP, 84, 207, 87, 32 -EDITTEXT IDC_IPADDR, 90, 221, 74, 12, ES_AUTOHSCROLL -END - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN -IDD_DLGMAIN, DIALOG -BEGIN -LEFTMARGIN, 7 -RIGHTMARGIN, 175 -TOPMARGIN, 7 -BOTTOMMARGIN, 299 -END -END -#endif // APSTUDIO_INVOKED - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON DISCARDABLE "Launcher.ico" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED \ No newline at end of file diff --git a/src/launcher/Launcher.res b/src/launcher/Launcher.res deleted file mode 100644 index 51425e3e..00000000 Binary files a/src/launcher/Launcher.res and /dev/null differ diff --git a/src/launcher/build_win_cross.sh b/src/launcher/build_win_cross.sh deleted file mode 100755 index 7a7b5c73..00000000 --- a/src/launcher/build_win_cross.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -i686-w64-mingw32.static-windres -O coff -i Launcher.rc -o Launcher.res -i686-w64-mingw32.static-gcc -D_CRT_SECURE_NO_WARNINGS -DNDEBUG -D_WINDOWS Launcher.c tk_lib.c -o DOOM64EX-Plus-Launcher.exe -lkernel32 -luser32 -lgdi32 -lwinspool -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32 Launcher.res - diff --git a/src/launcher/resource.h b/src/launcher/resource.h deleted file mode 100644 index dd803cd3..00000000 --- a/src/launcher/resource.h +++ /dev/null @@ -1,36 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Launcher.rc -// -#define IDD_DLGMAIN 101 -#define IDI_ICON1 105 -#define ID_BTNLAUNCH 1000 -#define IDC_DEVMODE 1001 -#define IDC_WINDOWED 1002 -#define IDC_FASTMONSTERS 1003 -#define IDC_NOMONSTERS 1004 -#define IDC_NOMUSIC 1005 -#define IDC_NOSOUND 1006 -#define IDC_RESPAWN 1007 -#define IDC_RESPAWNITEM 1008 -#define IDC_NETGAME 1009 -#define IDC_NETDM 1010 -#define IDC_COWARP 1011 -#define IDC_COSKILL 1012 -#define IDC_CORES 1014 -#define IDC_PARAM 1015 -#define IDC_CONET 1016 -#define IDC_PLYRNAME 1019 -#define IDC_IPADDR 1020 -#define IDC_STATIC_IP 1021 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 106 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1022 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/src/launcher/tk_lib.c b/src/launcher/tk_lib.c deleted file mode 100644 index 4de2aa7d..00000000 --- a/src/launcher/tk_lib.c +++ /dev/null @@ -1,205 +0,0 @@ -//----------------------------------------------------------------------------- -// -// $Id: tk_lib.c 337 2009-02-01 21:27:07Z svkaiser $ -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// $Author: svkaiser $ -// $Revision: 337 $ -// $Date: 2009-02-01 21:27:07 +0000 (Sun, 01 Feb 2009) $ -// -// DESCRIPTION: -// -//----------------------------------------------------------------------------- -#ifdef RCSID -static const char rcsid[] = "$Id: tk_lib.c 337 2009-02-01 21:27:07Z svkaiser $"; -#endif - -#include -#include "tk_lib.h" - -byte* parse; -unsigned int lastByte; -unsigned int tkPos = 0; -int tkLine = 1; - -#define MAXSTRSIZE 512 - -char stringToken[32]; -int intToken; -char dataStrToken[MAXSTROKENS][64]; - -static int tkStrSlot = 0; - -static FILE* tk_file; -char* DefaultConfigFile = "launcher.cfg"; -static unsigned short dataPos = -1; - -void tk_ProcessDefs(tDefTypes_t* def) -{ - switch (def->type) - { - case 'i': - tk_getTokenNum(); - *def->value = intToken; - break; - case 's': //find a quoted string - tk_getTokenStr(); - *def->strValue = dataStrToken[tkStrSlot++]; - break; - default: - L_Complain(L"tk_ProcessDefs: Unknown type: %c", def->type); - break; - } -} - -void tk_getToken(void) -{ - bool foundToken = false; - int i = 0; - memset(&stringToken, 0, 32); - do - { - if (parse[tkPos] == '\n') tkLine++; - if (parse[tkPos] > 0x20) - { - foundToken = true; - stringToken[i++] = parse[tkPos]; - } - else if (foundToken == true) return; - } while (++tkPos != lastByte); -} - -void tk_getTokenNum(void) -{ - bool foundToken = false; - int i = 0, k; - char text[32]; - intToken = 0; - do - { - if (parse[tkPos] == '\n') tkLine++; - if (parse[tkPos] == 45 || (parse[tkPos] >= 48 && parse[tkPos] <= 57)) - { - foundToken = true; - text[i++] = parse[tkPos]; - } - else - { - if (foundToken == true) - { - int pow = 1; - for (k = i - 1; k >= 0; k--) - { - (text[k] == 45) ? intToken *= -1 : - (intToken += (text[k] - 48) * pow); - pow *= 10; - } - return; - } - else - { - if (parse[tkPos] > 0x20) - L_Complain(L"getTokenNum Line %i: Not a number..\n", tkLine); - } - } - } while (tkPos++ != lastByte); -} - -void tk_getTokenStr(void) -{ - int i = 0; - memset(&dataStrToken[tkStrSlot], 0, 64); - do - { - if (parse[tkPos] == '\n') tkLine++; - if (parse[tkPos] == '"') - { - tkPos++; - do - { - if (parse[tkPos] == '\n') - L_Complain(L"getTokenStr Line %i: Newline in string..\n", tkLine); - - if (tkPos >= lastByte) - L_Complain(L"getTokenStr Line %i: End of file before completing string..\n", tkLine); - - dataStrToken[tkStrSlot][i++] = parse[tkPos]; - } while (parse[++tkPos] != '"'); - return; - } - else if (!(parse[tkPos] <= 0x20)) L_Complain(L"getTokenStr Line %i: String does not begin with quotes..\n"); - } while (tkPos++ != lastByte); -} - -int tk_getTokenLen(void) -{ - int i; - for (i = 0;; i++) if (stringToken[i] == 0) break; - return i; -} - -void tk_toUprToken(void) -{ - int i; - for (i = 0; i < tk_getTokenLen(); i++) - if (stringToken[i] >= 'a' && stringToken[i] <= 'z') stringToken[i] -= 32; -} - -void tk_toLwrToken(void) -{ - int i; - for (i = 0; i < tk_getTokenLen(); i++) - if (stringToken[i] >= 'A' && stringToken[i] <= 'Z') stringToken[i] += 32; -} - -void tk_FreeParse(void) -{ - free(parse); - tkLine = 1; - tkPos = 0; - dataPos = -1; - lastByte = 0; -} - -void tk_ResetConfig(tDefTypes_t* cfgdefault) -{ - tDefTypes_t* def; - - for (def = cfgdefault; def->field; def++) - { - if (def->value == NULL) *def->strValue = (char*)def->defaultstring; - else *def->value = def->defaultvalue; - } -} - -void tk_Open(void) -{ - tk_file = fopen(DefaultConfigFile, "w"); -} - -void tk_Close(void) -{ - fclose(tk_file); -} - -void tk_SaveConfig(tDefTypes_t* cfg) -{ - tDefTypes_t* def; - - for (def = cfg; def->field; def++) - { - if (def->value == NULL) fprintf(tk_file, "%s \"%s\"\n", def->field, *(char**)def->strValue); - else fprintf(tk_file, "%s %i\n", def->field, *def->value); - } -} \ No newline at end of file diff --git a/src/launcher/tk_lib.h b/src/launcher/tk_lib.h deleted file mode 100644 index 1884bc94..00000000 --- a/src/launcher/tk_lib.h +++ /dev/null @@ -1,45 +0,0 @@ -/*tkParse.h (c)2006 Samuel Villarreal*/ - -#ifndef __TKLIB__ -#define __TKLIB__ - -#include -#include "Launcher.h" - -#define MAXSTROKENS 32 - -typedef struct -{ - char* field; - char type; - int defaultvalue; - int* value; - const char* defaultstring; - char** strValue; -} tDefTypes_t; - -extern byte* parse; -extern unsigned int lastByte; -extern unsigned int tkPos; -extern int tkLine; - -extern char stringToken[32]; -extern int intToken; -char dataStrToken[MAXSTROKENS][64]; - -extern char* DefaultConfigFile; - -void tk_ProcessDefs(tDefTypes_t* def); -int tk_getTokenLen(void); -void tk_getToken(void); -void tk_getTokenNum(void); -void tk_getTokenStr(void); -void tk_FreeParse(void); -void tk_toUprToken(void); -void tk_toLwrToken(void); -void tk_ResetConfig(tDefTypes_t* cfgdefault); -void tk_SaveConfig(tDefTypes_t* cfg); -void tk_Open(void); -void tk_Close(void); - -#endif \ No newline at end of file