From 747964808389955ec23939d6e7eb21ddf433ea93 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Mon, 26 Oct 2020 09:56:58 -0400 Subject: [PATCH] - add widescreen loader, and a bare pk3 --- CMakeLists.txt | 1 + src/common/platform/win32/i_system.cpp | 3 +++ src/common/platform/win32/resource.h | 1 + src/d_main.cpp | 7 +++++ src/win32/zdoom.rc | 37 +++++++++++++------------- wadsrc_widescreen/CMakeLists.txt | 3 +++ wadsrc_widescreen/static/credits.txt | 1 + 7 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 wadsrc_widescreen/CMakeLists.txt create mode 100644 wadsrc_widescreen/static/credits.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dabe7beda..a3763ec1f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,6 +403,7 @@ add_subdirectory( wadsrc ) add_subdirectory( wadsrc_bm ) add_subdirectory( wadsrc_lights ) add_subdirectory( wadsrc_extra ) +add_subdirectory( wadsrc_widescreen ) add_subdirectory( src ) if( NOT CMAKE_CROSSCOMPILING ) diff --git a/src/common/platform/win32/i_system.cpp b/src/common/platform/win32/i_system.cpp index 48bf64541d..6a6119bf2f 100644 --- a/src/common/platform/win32/i_system.cpp +++ b/src/common/platform/win32/i_system.cpp @@ -112,6 +112,7 @@ EXTERN_CVAR (Bool, queryiwad); EXTERN_CVAR (Bool, disableautoload) EXTERN_CVAR (Bool, autoloadlights) EXTERN_CVAR (Bool, autoloadbrightmaps) +EXTERN_CVAR (Bool, autoloadwidescreen) EXTERN_CVAR (Int, vid_preferbackend) extern HWND Window, ConWindow, GameTitleWindow; @@ -529,6 +530,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_SETCHECK, disableautoload ? BST_CHECKED : BST_UNCHECKED, 0 ); SendDlgItemMessage( hDlg, IDC_WELCOME_LIGHTS, BM_SETCHECK, autoloadlights ? BST_CHECKED : BST_UNCHECKED, 0 ); SendDlgItemMessage( hDlg, IDC_WELCOME_BRIGHTMAPS, BM_SETCHECK, autoloadbrightmaps ? BST_CHECKED : BST_UNCHECKED, 0 ); + SendDlgItemMessage( hDlg, IDC_WELCOME_WIDESCREEN, BM_SETCHECK, autoloadwidescreen ? BST_CHECKED : BST_UNCHECKED, 0 ); // Set up our version string. sprintf(szString, "Version %s.", GetVersionString()); @@ -583,6 +585,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED; autoloadlights = SendDlgItemMessage( hDlg, IDC_WELCOME_LIGHTS, BM_GETCHECK, 0, 0 ) == BST_CHECKED; autoloadbrightmaps = SendDlgItemMessage( hDlg, IDC_WELCOME_BRIGHTMAPS, BM_GETCHECK, 0, 0 ) == BST_CHECKED; + autoloadwidescreen = SendDlgItemMessage( hDlg, IDC_WELCOME_WIDESCREEN, BM_GETCHECK, 0, 0 ) == BST_CHECKED; ctrl = GetDlgItem (hDlg, IDC_IWADLIST); EndDialog(hDlg, SendMessage (ctrl, LB_GETCURSEL, 0, 0)); } diff --git a/src/common/platform/win32/resource.h b/src/common/platform/win32/resource.h index f6eff61881..f07a37083e 100644 --- a/src/common/platform/win32/resource.h +++ b/src/common/platform/win32/resource.h @@ -153,6 +153,7 @@ #define IDC_WELCOME_NOAUTOLOAD 4023 #define IDC_WELCOME_LIGHTS 4024 #define IDC_WELCOME_BRIGHTMAPS 4025 +#define IDC_WELCOME_WIDESCREEN 1087 #define IDC_WELCOME_VULKAN 4026 #define IDC_WELCOME_VULKAN1 4026 diff --git a/src/d_main.cpp b/src/d_main.cpp index 6dc9146c45..7b6cde6b27 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -287,6 +287,7 @@ CUSTOM_CVAR (String, vid_cursor, "None", CVAR_ARCHIVE | CVAR_NOINITCALL) CVAR (Bool, disableautoload, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) CVAR (Bool, autoloadbrightmaps, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) CVAR (Bool, autoloadlights, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) +CVAR (Bool, autoloadwidescreen, true, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG) CVAR (Bool, r_debug_disable_vis_filter, false, 0) CVAR(Bool, vid_fps, false, 0) CVAR(Int, vid_showpalette, 0, 0) @@ -2070,6 +2071,12 @@ static void AddAutoloadFiles(const char *autoname) if (bmwad) D_AddFile (allwads, bmwad, true, -1, GameConfig); } + if (autoloadwidescreen) + { + const char *wswad = BaseFileSearch ("game_widescreen_gfx.pk3", NULL, false, GameConfig); + if (wswad) + D_AddFile (allwads, wswad, true, -1, GameConfig); + } } if (!(gameinfo.flags & GI_SHAREWARE) && !Args->CheckParm("-noautoload") && !disableautoload) diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index a8126d5db3..0f10a1ec58 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -8,8 +8,8 @@ // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" -#include "../version.h" -#include "../gitinfo.h" +#include "../version.h" +#include "../gitinfo.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -110,9 +110,9 @@ BEGIN IDD_IWADDIALOG, DIALOG BEGIN LEFTMARGIN, 5 - RIGHTMARGIN, 222 + RIGHTMARGIN, 223 TOPMARGIN, 7 - BOTTOMMARGIN, 242 + BOTTOMMARGIN, 241 END IDD_EAXPROPERTYLIST, DIALOG @@ -202,33 +202,33 @@ END // Dialog // -IDD_IWADDIALOG DIALOGEX 0, 0, 224, 249 +IDD_IWADDIALOG DIALOGEX 0, 0, 225, 248 STYLE DS_SETFONT | 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,20,20 - LTEXT "Welcome to GZDoom!",IDC_STATIC,42,8,180,8 - LTEXT "",IDC_WELCOME_VERSION,42,18,180,8 + LTEXT "Welcome to GZDoom!",IDC_STATIC,43,8,180,8 + LTEXT "",IDC_WELCOME_VERSION,43,18,180,8 GROUPBOX "IWAD selection",IDC_STATIC,8,32,208,117 LTEXT "Select which game file (IWAD) to run.",IDC_STATIC,12,44,190,8 LISTBOX IDC_IWADLIST,12,56,200,87,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Video settings",IDC_STATIC,8,155,109,52 - CONTROL "&Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,167,48,10 - GROUPBOX "Resource settings",IDC_STATIC,123,155,95,52 - CONTROL "Disable &autoload",IDC_WELCOME_NOAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,170,65,10 - CONTROL "Load &lights",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,180,51,10 - CONTROL "Load &brightmaps",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,190,65,10 - CONTROL "&Don't ask me this again",IDC_DONTASKIWAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,73,211,87,10 - DEFPUSHBUTTON "&Play Game!",IDOK,8,228,90,14 - PUSHBUTTON "E&xit",IDCANCEL,166,228,50,14 + GROUPBOX "Video settings",IDC_STATIC,8,155,68,65 + CONTROL "&Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,206,48,10 + GROUPBOX "Extra Graphics",IDC_STATIC,159,155,59,64 + CONTROL "Disable &autoload",IDC_WELCOME_NOAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,86,166,65,10 + CONTROL "&Lights",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,165,43,10 + CONTROL "&Brightmaps",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,177,51,10 + CONTROL "&Widescreen",IDC_WELCOME_WIDESCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,188,48,12 + CONTROL "&Don't ask me again",IDC_DONTASKIWAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,83,190,72,10 + DEFPUSHBUTTON "&Play Game!",IDOK,8,227,90,14 + PUSHBUTTON "E&xit",IDCANCEL,166,227,50,14 CONTROL "&OpenGL",IDC_WELCOME_VULKAN1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,167,41,10 CONTROL "&Vulkan",IDC_WELCOME_VULKAN2,"Button",BS_AUTORADIOBUTTON,13,177,37,10 CONTROL "&SoftPoly",IDC_WELCOME_VULKAN3,"Button",BS_AUTORADIOBUTTON,13,188,43,10 END - IDD_CRASHDIALOG DIALOGEX 0, 0, 415, 308 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTROLPARENT | WS_EX_APPWINDOW @@ -356,8 +356,7 @@ BEGIN BEGIN VALUE "Translation", 0x409, 1200 END -END - +END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/wadsrc_widescreen/CMakeLists.txt b/wadsrc_widescreen/CMakeLists.txt new file mode 100644 index 0000000000..14126355a7 --- /dev/null +++ b/wadsrc_widescreen/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required( VERSION 2.4 ) + +add_pk3(game_widescreen_gfx.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static) diff --git a/wadsrc_widescreen/static/credits.txt b/wadsrc_widescreen/static/credits.txt new file mode 100644 index 0000000000..99a17a1672 --- /dev/null +++ b/wadsrc_widescreen/static/credits.txt @@ -0,0 +1 @@ +TODO: This is just a placeholder to hold the folder structure in place until the work is complete. \ No newline at end of file