Merge branch 'master' into modern

This commit is contained in:
Christoph Oelckers 2018-06-19 00:11:59 +02:00
commit c8db149c06
9 changed files with 56 additions and 8 deletions

View file

@ -244,7 +244,7 @@ else()
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc. # If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
set( ALL_C_FLAGS "-static-libgcc" ) set( ALL_C_FLAGS "-static-libgcc" )
endif() endif()
else() elseif( NOT MINGW )
# Generic GCC/Clang requires position independent executable to be enabled explicitly # Generic GCC/Clang requires position independent executable to be enabled explicitly
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" ) set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" ) set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )

View file

@ -81,6 +81,11 @@ if( WIN32 )
find_library( DX_dinput8_LIBRARY dinput8 find_library( DX_dinput8_LIBRARY dinput8
PATHS ENV DXSDK_DIR PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} ) PATH_SUFFIXES Lib Lib/${XBITS} )
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
find_library( DX_dxguid_LIBRARY dxguid
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
endif()
# Modern versions of the Windows SDK include dinput8.lib. Unfortunately, # Modern versions of the Windows SDK include dinput8.lib. Unfortunately,
# CMake cannot find these libraries via find_library. # CMake cannot find these libraries via find_library.
@ -89,6 +94,13 @@ if( WIN32 )
set( DX_dinput8_LIBRARY dinput8 ) set( DX_dinput8_LIBRARY dinput8 )
endif() endif()
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
# Modern versions of the Windows SDK do NOT include dxguid.lib. Its contents
# were moved to dinput8.lib.
if( NOT DX_dxguid_LIBRARY )
message( STATUS "Could not find dxguid.lib. Build may fail on old Windows SDKs.")
endif()
endif()
endif() endif()
set( ZDOOM_LIBS set( ZDOOM_LIBS
@ -109,6 +121,11 @@ if( WIN32 )
set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp ) set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp )
endif() endif()
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
if( DX_dxguid_LIBRARY )
list( APPEND ZDOOM_LIBS "${DX_dxguid_LIBRARY}" )
endif()
endif()
else() else()
if( APPLE ) if( APPLE )
set( NO_GTK ON ) set( NO_GTK ON )

View file

@ -534,7 +534,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
FixPathSeperator(custwad); FixPathSeperator(custwad);
DefaultExtension(custwad, ext); DefaultExtension(custwad, ext);
bool isAbsolute = (custwad[0] == '/'); bool isAbsolute = (custwad[0] == '/');
#ifdef WINDOWS #ifdef _WIN32
isAbsolute |= (custwad.Len() >= 2 && custwad[1] == ':'); isAbsolute |= (custwad.Len() >= 2 && custwad[1] == ':');
#endif #endif
if (isAbsolute) if (isAbsolute)

View file

@ -28,6 +28,10 @@
// HEADER FILES ------------------------------------------------------------ // HEADER FILES ------------------------------------------------------------
#ifdef _WIN32
#include <direct.h>
#endif
#ifdef HAVE_FPU_CONTROL #ifdef HAVE_FPU_CONTROL
#include <fpu_control.h> #include <fpu_control.h>
#endif #endif

View file

@ -26,6 +26,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include <stddef.h> #include <stddef.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h> #include <inttypes.h>
#include "version.h" #include "version.h"

View file

@ -557,7 +557,7 @@ void FMapInfoParser::SkipToNext()
void FMapInfoParser::CheckEndOfFile(const char *block) void FMapInfoParser::CheckEndOfFile(const char *block)
{ {
if (format_type == FMT_New && !sc.Compare("}")) if (format_type == FMT_New && sc.End)
{ {
sc.ScriptError("Unexpected end of file in %s definition", block); sc.ScriptError("Unexpected end of file in %s definition", block);
} }

View file

@ -24,6 +24,12 @@
** **
*/ */
#ifdef _MSC_VER
#include <io.h>
#else
#include <unistd.h>
#endif
#include "w_wad.h" #include "w_wad.h"
#include "m_png.h" #include "m_png.h"
#include "sbar.h" #include "sbar.h"
@ -32,7 +38,6 @@
#include "bitmap.h" #include "bitmap.h"
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h>
#define _access(a,b) access(a,b) #define _access(a,b) access(a,b)
#endif #endif

View file

@ -235,7 +235,7 @@ static unsigned char *hqNxAsmHelper( void (*hqNxFunction) ( int*, unsigned char*
} }
#endif #endif
static unsigned char *hqNxHelper( void (*hqNxFunction) ( unsigned*, unsigned*, int, int ), static unsigned char *hqNxHelper( void (HQX_CALLCONV *hqNxFunction) ( unsigned*, unsigned*, int, int ),
const int N, const int N,
unsigned char *inputBuffer, unsigned char *inputBuffer,
const int inWidth, const int inWidth,

View file

@ -75,7 +75,7 @@ BEGIN
" VALUE ""FileDescription"", ""GZDoom""\r\n" " VALUE ""FileDescription"", ""GZDoom""\r\n"
" VALUE ""FileVersion"", RC_FILEVERSION2\r\n" " VALUE ""FileVersion"", RC_FILEVERSION2\r\n"
" VALUE ""InternalName"", ""GZDoom""\r\n" " VALUE ""InternalName"", ""GZDoom""\r\n"
" VALUE ""LegalCopyright"", ""Copyright \\u00A9 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al.""\r\n" " VALUE ""LegalCopyright"", ""Copyright © 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al.""\r\n"
" VALUE ""LegalTrademarks"", ""DoomR is a Registered Trademark of id Software, Inc.""\r\n" " VALUE ""LegalTrademarks"", ""DoomR is a Registered Trademark of id Software, Inc.""\r\n"
" VALUE ""OriginalFilename"", ""gzdoom.exe""\r\n" " VALUE ""OriginalFilename"", ""gzdoom.exe""\r\n"
" VALUE ""ProductName"", ""GZDoom""\r\n" " VALUE ""ProductName"", ""GZDoom""\r\n"
@ -224,6 +224,7 @@ IDD_IWADDIALOG DIALOGEX 0, 0, 224, 249
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Welcome" CAPTION "Welcome"
#ifndef __MINGW32__
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg" FONT 8, "MS Shell Dlg"
{ {
@ -243,6 +244,26 @@ FONT 8, "MS Shell Dlg"
CONTROL "Play GZDoom", IDOK, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 228, 90, 14 CONTROL "Play GZDoom", IDOK, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 228, 90, 14
CONTROL "Exit", IDCANCEL, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 166, 228, 50, 14 CONTROL "Exit", IDCANCEL, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 166, 228, 50, 14
} }
#else
// [SP] Upstreamed from Zandronum
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON IDI_ICON1,IDC_STATIC,7,7,21,20
LTEXT "Welcome to GZDoom!",IDC_STATIC,42,8,180,8
LTEXT "<Version info>",IDC_WELCOME_VERSION,42,18,180,8
GROUPBOX "IWAD selection",IDC_STATIC,8,32,208,102
LTEXT "Select which game file (IWAD) to run.",IDC_STATIC,12,44,190,8
LISTBOX IDC_IWADLIST,12,56,200,72,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Video settings",IDC_STATIC,8,138,208,28
CONTROL "Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,124,150,48,10
CONTROL "Disable autoload",IDC_WELCOME_NOAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,39,65,10
CONTROL "Lights.pk3",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,182,51,10
CONTROL "Brightmaps.pk3",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,111,182,65,10
CONTROL "Don't ask me this again",IDC_DONTASKIWAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,73,201,87,10
DEFPUSHBUTTON "Play GZDoom",IDOK,8,228,90,14
PUSHBUTTON "Exit",IDCANCEL,166,228,50,14
END
#endif
IDD_EAXPROPERTYLIST DIALOGEX 0, 0, 265, 404 IDD_EAXPROPERTYLIST DIALOGEX 0, 0, 265, 404
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VSCROLL STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VSCROLL
@ -474,7 +495,7 @@ IDB_DEADGUY BITMAP "deadguy.bmp"
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
#ifndef NO_MANIFEST #ifndef NO_MANIFEST
// CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "zdoom.exe.manifest" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "zdoom.exe.manifest"
#endif #endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -505,7 +526,7 @@ BEGIN
VALUE "FileDescription", "GZDoom" VALUE "FileDescription", "GZDoom"
VALUE "FileVersion", RC_FILEVERSION2 VALUE "FileVersion", RC_FILEVERSION2
VALUE "InternalName", "GZDoom" VALUE "InternalName", "GZDoom"
VALUE "LegalCopyright", "Copyright \u00A9 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al." VALUE "LegalCopyright", "Copyright © 1993-1996 id Software, 1998-2010 Randy Heit, 2002-2010 Christoph Oelckers, et al."
VALUE "LegalTrademarks", "DoomR is a Registered Trademark of id Software, Inc." VALUE "LegalTrademarks", "DoomR is a Registered Trademark of id Software, Inc."
VALUE "OriginalFilename", "gzdoom.exe" VALUE "OriginalFilename", "gzdoom.exe"
VALUE "ProductName", "GZDoom" VALUE "ProductName", "GZDoom"