Okay, here's a quick change I tested on an old enough revision that I could compile it on my trusty old VC++ 2005.
In d_main.cpp, add this somewhere it makes sense near the header:
Code: Select all
CVAR(Bool, disableautoload, 0, CVAR_NOSET);
Then scroll down to AddAutoloadFiles. Replace
Code: Select all
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload"))
with
Code: Select all
if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload") && !disableautoload)
You're nearly done with the original logic. The rest is pure mindless copy-pasting then changing values.
In win32/i_system.cpp:
Code: Select all
EXTERN_CVAR (Int, vid_renderer);
EXTERN_CVAR (Bool, fullscreen);
+EXTERN_CVAR (Bool, disableautoload);
Code: Select all
// Check the current video settings.
SendDlgItemMessage( hDlg, vid_renderer ? IDC_WELCOME_OPENGL : IDC_WELCOME_SOFTWARE, BM_SETCHECK, BST_CHECKED, 0 );
SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_SETCHECK, fullscreen ? BST_CHECKED : BST_UNCHECKED, 0 );
+ SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_SETCHECK, disableautoload ? BST_CHECKED : BST_UNCHECKED, 0 );
Code: Select all
SetQueryIWad(hDlg);
vid_renderer = SendDlgItemMessage( hDlg, IDC_WELCOME_OPENGL, BM_GETCHECK, 0, 0 ) == BST_CHECKED;
fullscreen = SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_GETCHECK, 0, 0 ) == BST_CHECKED;
+ disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED;
In win32/resource.h:
Code: Select all
#define IDC_WELCOME_SOFTWARE 4021
#define IDC_WELCOME_FULLSCREEN 4022
+#define IDC_WELCOME_NOAUTOLOAD 4023
In win32/zdoom.rc:
Code: Select all
-IDD_IWADDIALOG DIALOGEX 0, 0, 224, 236
+IDD_IWADDIALOG DIALOGEX 0, 0, 224, 246
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Welcome"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON IDI_ICON1,IDC_STATIC,7,7,32,32
LTEXT "Welcome to QZDoom!",IDC_STATIC,42,8,180,8
LTEXT "<Version info>",IDC_WELCOME_VERSION,42,18,180,8
GROUPBOX "IWAD selection",IDC_STATIC,8,32,224-16,102
LTEXT "Select which game file (IWAD) to run.", IDC_STATIC,12,32+12,190,8
LISTBOX IDC_IWADLIST,12,32+24,224-24,72,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
GROUPBOX "Video settings",IDC_STATIC,8,138,224-16,48
LTEXT "Choose how QZDoom will render the game.", IDC_STATIC,12,148,190,8
CONTROL "Hardware (OpenGL)",IDC_WELCOME_OPENGL,"Button",
BS_AUTORADIOBUTTON,12,170,93,10
CONTROL "Software (Doom)",IDC_WELCOME_SOFTWARE,"Button",
BS_AUTORADIOBUTTON,12,160,93,10
CONTROL "Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 124,160,48,10
- CONTROL "Don't ask me this again",IDC_DONTASKIWAD,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,72,192,87,10
- DEFPUSHBUTTON "Play QZDoom",IDOK,8,236-18,90,14
- PUSHBUTTON "Exit",IDCANCEL,224-58,236-18,50,14
+ CONTROL "Disable autoload",IDC_WELCOME_NOAUTOLOAD,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,72,192,87,10
+ CONTROL "Don't ask me this again",IDC_DONTASKIWAD,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,72,202,87,10
+ DEFPUSHBUTTON "Play GZDoom",IDOK,8,246-18,90,14
+ PUSHBUTTON "Exit",IDCANCEL,224-58,246-18,50,14
Or you can probably do that in a more WYSIWYG way with the built-in rc editor if you don't have an express edition that stubbornly refuses to let you change whatever so you have to edit in some other text editor instead.
Buttons for enabling/disabling loadings of standard brightmaps and dynlights probably wouldn't be too hard; you'd just need to add some other CVAR and the logic for loading them accordingly in d_main.cpp. Then it's some more mindless copy-pasting and value shuffling.