This commit is contained in:
Christoph Oelckers 2016-09-04 10:29:15 +02:00
commit 37d0f97808
3 changed files with 51 additions and 40 deletions

View file

@ -115,49 +115,59 @@ if( WIN32 )
set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib ) set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib )
set( NASM_NAMES nasmw nasm ) set( NASM_NAMES nasmw nasm )
find_path( D3D_INCLUDE_DIR d3d9.h if( NOT MSVC )
PATHS ENV DXSDK_DIR find_path( D3D_INCLUDE_DIR d3d9.h
PATH_SUFFIXES Include ) PATHS ENV DXSDK_DIR
if( NOT D3D_INCLUDE_DIR ) PATH_SUFFIXES Include )
message( SEND_ERROR "Could not find DirectX 9 header files" ) if( NOT D3D_INCLUDE_DIR )
else() message( SEND_ERROR "Could not find DirectX 9 header files" )
include_directories( ${D3D_INCLUDE_DIR} ) else()
endif() include_directories( ${D3D_INCLUDE_DIR} )
endif()
find_path( XINPUT_INCLUDE_DIR xinput.h find_path( XINPUT_INCLUDE_DIR xinput.h
PATHS ENV DXSDK_DIR PATHS ENV DXSDK_DIR
PATH_SUFFIXES Include ) PATH_SUFFIXES Include )
if( NOT XINPUT_INCLUDE_DIR ) if( NOT XINPUT_INCLUDE_DIR )
message( WARNING "Could not find xinput.h. XInput will be disabled." ) message( WARNING "Could not find xinput.h. XInput will be disabled." )
add_definitions( -DNO_XINPUT ) add_definitions( -DNO_XINPUT )
else()
include_directories( ${XINPUT_INCLUDE_DIR} )
endif()
find_library( DX_dxguid_LIBRARY dxguid
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
find_library( DX_dinput8_LIBRARY dinput8
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
set( DX_LIBS_FOUND YES )
if( NOT DX_dxguid_LIBRARY )
set( DX_LIBS_FOUND NO )
endif()
if( NOT DX_dinput8_LIBRARY )
set( DX_LIBS_FOUND NO )
endif()
if( NOT DX_LIBS_FOUND )
message( FATAL_ERROR "Could not find DirectX 9 libraries" )
endif()
set( DX_LIBS
"${DX_dxguid_LIBRARY}"
"${DX_dinput8_LIBRARY}"
)
else() else()
include_directories( ${XINPUT_INCLUDE_DIR} ) set( DX_LIBS
dxguid
dinput8
)
endif() endif()
find_library( DX_dxguid_LIBRARY dxguid set( ZDOOM_LIBS ${DX_LIBS}
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
find_library( DX_dinput8_LIBRARY dinput8
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
set( DX_LIBS_FOUND YES )
if( NOT DX_dxguid_LIBRARY )
set( DX_LIBS_FOUND NO )
endif()
if( NOT DX_dinput8_LIBRARY )
set( DX_LIBS_FOUND NO )
endif()
if( NOT DX_LIBS_FOUND )
message( FATAL_ERROR "Could not find DirectX 9 libraries" )
endif()
set( ZDOOM_LIBS
wsock32 wsock32
winmm winmm
"${DX_dxguid_LIBRARY}"
"${DX_dinput8_LIBRARY}"
ole32 ole32
user32 user32
gdi32 gdi32

View file

@ -3504,12 +3504,12 @@ class CommandIfCVarInt : public SBarInfoNegatableFlowControl
} }
else else
{ {
sc.ScriptError("Type mismatch: console variable '%s' is not of type 'bool' or 'int'.", cvarname); sc.ScriptError("Type mismatch: console variable '%s' is not of type 'bool' or 'int'.", cvarname.GetChars());
} }
} }
else else
{ {
sc.ScriptError("Unknown console variable '%s'.", cvarname); sc.ScriptError("Unknown console variable '%s'.", cvarname.GetChars());
} }
} }
void Tick(const SBarInfoMainBlock *block, const DSBarInfo *statusBar, bool hudChanged) void Tick(const SBarInfoMainBlock *block, const DSBarInfo *statusBar, bool hudChanged)

View file

@ -76,6 +76,7 @@
#include "d_player.h" #include "d_player.h"
#include "p_maputl.h" #include "p_maputl.h"
#include "p_spec.h" #include "p_spec.h"
#include "templates.h"
#include "math/cmath.h" #include "math/cmath.h"
AActor *SingleActorFromTID(int tid, AActor *defactor); AActor *SingleActorFromTID(int tid, AActor *defactor);
@ -4501,7 +4502,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS)
else { target = viewport; viewport = self; } else { target = viewport; viewport = self; }
} }
fov = MIN(fov, 360.); fov = MIN<DAngle>(fov, 360.);
if (fov > 0) if (fov > 0)
{ {