From 4ab6034a366602466425981b70138b3405cab78c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 18 Apr 2018 16:48:01 +0300 Subject: [PATCH] Cleaned up Windows backend from remains of Direct3D Removed obsolete CMake settings, useless #include's, dead code --- src/CMakeLists.txt | 18 ------------------ src/v_draw.cpp | 12 ------------ src/win32/win32video.cpp | 33 +-------------------------------- 3 files changed, 1 insertion(+), 62 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index de6761df93..ff47ce03e4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -62,21 +62,6 @@ if( WIN32 ) set( DX_dinput8_LIBRARY dinput8 ) else() - find_path( D3D_INCLUDE_DIR d3d9.h - PATHS ENV DXSDK_DIR - PATH_SUFFIXES Include ) - if( NOT D3D_INCLUDE_DIR ) - # Modern versions of the Windows SDK include d3d9.h. Unfortunately, - # CMake cannot find this file via find_path, so we check for it using - # CHECK_INCLUDE_FILE. - CHECK_INCLUDE_FILE( d3d9.h D3D9_H_FOUND ) - if ( NOT D3D9_H_FOUND ) - message( SEND_ERROR "Could not find DirectX 9 header files" ) - endif() - else() - include_directories( ${D3D_INCLUDE_DIR} ) - endif() - find_path( XINPUT_INCLUDE_DIR xinput.h PATHS ENV DXSDK_DIR PATH_SUFFIXES Include ) @@ -1285,9 +1270,6 @@ set_source_files_properties( ${FASTMATH_SOURCES} PROPERTIES COMPILE_FLAGS ${ZD_F set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" ) set_source_files_properties( sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" ) set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE ) -if ( WIN32 ) - set_source_files_properties( win32/fb_d3d9.cpp win32/fb_d3d9_wipe.cpp PROPERTIES COMPILE_FLAGS ${ZD_FASTMATH_FLAG} ) -endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") diff --git a/src/v_draw.cpp b/src/v_draw.cpp index f16f09d0db..ae402e02c9 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -367,17 +367,11 @@ static inline double ListGetDouble(Va_List &tags) return va_arg(tags.list, double); } -// These two options are only being used by the D3D version of the HUD weapon drawer, they serve no purpose anywhere else. static inline FSpecialColormap * ListGetSpecialColormap(Va_List &tags) { return va_arg(tags.list, FSpecialColormap *); } -static inline FColormapStyle * ListGetColormapStyle(Va_List &tags) -{ - return va_arg(tags.list, FColormapStyle *); -} - static void ListEnd(VMVa_List &tags) { } @@ -411,12 +405,6 @@ static inline FSpecialColormap * ListGetSpecialColormap(VMVa_List &tags) return nullptr; } -static inline FColormapStyle * ListGetColormapStyle(VMVa_List &tags) -{ - ThrowAbortException(X_OTHER, "Invalid tag in draw function"); - return nullptr; -} - //========================================================================== // // Main taglist parsing diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index 6a314621a3..7473cd011f 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -32,46 +32,15 @@ ** */ -#ifdef _DEBUG -#define D3D_DEBUG_INFO -#endif -#define DIRECTDRAW_VERSION 0x0300 -#define DIRECT3D_VERSION 0x0900 - #define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #include #include -#include -#include // HEADER FILES ------------------------------------------------------------ -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include - -#include "doomtype.h" - -#include "c_dispatch.h" -#include "templates.h" +#include "c_cvars.h" #include "i_system.h" -#include "i_video.h" -#include "v_video.h" -#include "v_pfx.h" -#include "stats.h" -#include "doomerrors.h" -#include "m_argv.h" -#include "r_defs.h" -#include "v_text.h" -#include "version.h" - - -#include "optwin32.h" // MACROS ------------------------------------------------------------------