mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
Conflicts: CMakeLists.txt src/CMakeLists.txt
This commit is contained in:
commit
b91d5d5eb5
29 changed files with 617 additions and 32 deletions
|
@ -1,6 +1,9 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
project(GZDoom)
|
||||
|
||||
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
include( CreateLaunchers )
|
||||
|
||||
# Generator expression are available some time in CMake 2.8. Due to
|
||||
# cmake_minimum_required, we can assume a minor version of > 7 implies major >= 2
|
||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
|
||||
|
@ -19,21 +22,31 @@ function( add_pk3 PK3_NAME PK3_DIR )
|
|||
set( PK3_TARGET "pk3" )
|
||||
endif( ${PK3_TARGET} STREQUAL "zdoom_pk3" )
|
||||
|
||||
if( NOT NO_GENERATOR_EXPRESSIONS )
|
||||
if( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE )
|
||||
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME}
|
||||
COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} $<TARGET_FILE_DIR:zdoom>
|
||||
DEPENDS zipdir ${PK3_DIR} )
|
||||
else( NOT NO_GENERATOR_EXPRESSIONS )
|
||||
else( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE )
|
||||
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME}
|
||||
COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR}
|
||||
DEPENDS zipdir ${PK3_DIR} )
|
||||
endif( NOT NO_GENERATOR_EXPRESSIONS )
|
||||
endif( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE )
|
||||
|
||||
add_custom_target( ${PK3_TARGET} ALL
|
||||
DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} )
|
||||
endfunction( add_pk3 )
|
||||
|
||||
# Macro for building libraries without debugging information
|
||||
macro( make_release_only )
|
||||
set( CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_RELEASE} )
|
||||
set( CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELEASE} )
|
||||
string( REPLACE "/MT " "/MTd " CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_RELEASE} )
|
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
string( REPLACE "/MT " "/MTd " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
endmacro( make_release_only )
|
||||
|
||||
IF( NOT CMAKE_BUILD_TYPE )
|
||||
SET( CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||
|
@ -42,6 +55,13 @@ ENDIF( NOT CMAKE_BUILD_TYPE )
|
|||
|
||||
set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created." )
|
||||
set( ZDOOM_EXE_NAME "gzdoom" CACHE FILEPATH "Name of the executable to create" )
|
||||
if( MSVC )
|
||||
# Allow the user to use ZDOOM_OUTPUT_DIR as a single release point.
|
||||
# Use zdoom, zdoomd, zdoom64, and zdoomd64 for the binary names
|
||||
option( ZDOOM_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF )
|
||||
else( MSVC )
|
||||
set( ZDOOM_OUTPUT_OLDSTYLE OFF )
|
||||
endif( MSVC )
|
||||
|
||||
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
|
||||
|
@ -56,7 +76,7 @@ find_package( ZLIB )
|
|||
if( MSVC )
|
||||
# Eliminate unreferenced functions and data
|
||||
# Perform identical COMDAT folding
|
||||
set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt" )
|
||||
set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE" )
|
||||
|
||||
# String pooling
|
||||
# Function-level linking
|
||||
|
@ -65,10 +85,10 @@ if( MSVC )
|
|||
set( ALL_C_FLAGS "/GF /Gy /GR- /fp:fast" )
|
||||
|
||||
# Avoid CRT DLL dependancies in release builds
|
||||
set( REL_C_FLAGS "/MT /Oi" )
|
||||
set( REL_C_FLAGS "/MT /Oy /Oi" )
|
||||
|
||||
# Debug allocations in debug builds
|
||||
set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC" )
|
||||
set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC /MTd" )
|
||||
|
||||
# Disable warnings for unsecure CRT functions from VC8+
|
||||
if( MSVC_VERSION GREATER 1399 )
|
||||
|
@ -79,9 +99,11 @@ if( MSVC )
|
|||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL} )
|
||||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} )
|
||||
string(REPLACE "/MDd " " " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} )
|
||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} )
|
||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL} )
|
||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} )
|
||||
string(REPLACE "/MDd " " " CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} )
|
||||
string(REPLACE " /GR" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
|
||||
endif( MSVC )
|
||||
|
||||
|
|
48
CleanDirectoryList.cmake
Normal file
48
CleanDirectoryList.cmake
Normal file
|
@ -0,0 +1,48 @@
|
|||
# - Removes duplicate entries and non-directories from a provided list
|
||||
#
|
||||
# clean_directory_list(<listvar> [<additional list items>...])
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
if(__clean_directory_list)
|
||||
return()
|
||||
endif()
|
||||
set(__clean_directory_list YES)
|
||||
|
||||
function(clean_directory_list _var)
|
||||
# combine variable's current value with additional list items
|
||||
set(_in ${${_var}} ${ARGN})
|
||||
|
||||
if(_in)
|
||||
# Initial list cleaning
|
||||
list(REMOVE_DUPLICATES _in)
|
||||
|
||||
# Grab the absolute path of each actual directory
|
||||
set(_out)
|
||||
foreach(_dir ${_in})
|
||||
if(IS_DIRECTORY "${_dir}")
|
||||
get_filename_component(_dir "${_dir}" ABSOLUTE)
|
||||
file(TO_CMAKE_PATH "${_dir}" _dir)
|
||||
list(APPEND _out "${_dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(_out)
|
||||
# Clean up the output list now
|
||||
list(REMOVE_DUPLICATES _out)
|
||||
endif()
|
||||
|
||||
# return _out
|
||||
set(${_var} "${_out}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
336
CreateLaunchers.cmake
Normal file
336
CreateLaunchers.cmake
Normal file
|
@ -0,0 +1,336 @@
|
|||
# - Create launchers to set working directory, env. vars, etc.
|
||||
#
|
||||
# include(CreateLaunchers) - to make these available
|
||||
# guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...])
|
||||
# create_default_target_launcher(<targetname>
|
||||
# [ARGS <args...>]
|
||||
# [FORWARD_ARGS]
|
||||
# [RUNTIME_LIBRARY_DIRS <dir...>]
|
||||
# [WORKING_DIRECTORY <dir>]
|
||||
# [ENVIRONMENT <VAR=value> [<VAR=value>...]])
|
||||
#
|
||||
# create_target_launcher(<targetname>
|
||||
# [ARGS <args...>]
|
||||
# [FORWARD_ARGS]
|
||||
# [RUNTIME_LIBRARY_DIRS <dir...>]
|
||||
# [WORKING_DIRECTORY <dir>]
|
||||
# [ENVIRONMENT <VAR=value> [<VAR=value>...]])
|
||||
#
|
||||
# create_generic_launcher(<launchername>
|
||||
# [RUNTIME_LIBRARY_DIRS <dir...>]
|
||||
# [WORKING_DIRECTORY <dir>]
|
||||
# [ENVIRONMENT <VAR=value> [<VAR=value>...]])
|
||||
# - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# ListFilter
|
||||
# ProgramFilesGlob
|
||||
# CleanDirectoryList
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
if(__create_launchers)
|
||||
return()
|
||||
endif()
|
||||
set(__create_launchers YES)
|
||||
|
||||
include(CleanDirectoryList)
|
||||
|
||||
# We must run the following at "include" time, not at function call time,
|
||||
# to find the path to this module rather than the path to a calling list file
|
||||
get_filename_component(_launchermoddir
|
||||
${CMAKE_CURRENT_LIST_FILE}
|
||||
PATH)
|
||||
set(_launchermoddir "${_launchermoddir}/launcher-templates")
|
||||
|
||||
macro(_launcher_system_settings)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(BITS 64)
|
||||
else()
|
||||
set(BITS 32)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Find user and system name
|
||||
set(SYSTEM_NAME $ENV{USERDOMAIN})
|
||||
set(USER_NAME $ENV{USERNAME})
|
||||
set(VCPROJ_TYPE vcproj)
|
||||
set(USERFILE_EXTENSION ${SYSTEM_NAME}.${USER_NAME}.user)
|
||||
set(LAUNCHER_LINESEP "
")
|
||||
if(MSVC90)
|
||||
set(USERFILE_VC_VERSION 9.00)
|
||||
elseif(MSVC80)
|
||||
set(USERFILE_VC_VERSION 8.00)
|
||||
elseif(MSVC71)
|
||||
set(USERFILE_VC_VERSION 7.10)
|
||||
elseif(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer
|
||||
set(LAUNCHER_LINESEP "\n")
|
||||
set(USERFILE_VC_VERSION 10.00)
|
||||
set(USERFILE_EXTENSION user)
|
||||
set(VCPROJ_TYPE vcxproj)
|
||||
endif()
|
||||
if(BITS EQUAL 64)
|
||||
set(USERFILE_PLATFORM x64)
|
||||
else()
|
||||
set(USERFILE_PLATFORM Win${BITS})
|
||||
endif()
|
||||
set(_pathdelim ";")
|
||||
set(_suffix "cmd")
|
||||
else()
|
||||
set(_pathdelim ":")
|
||||
set(USERFILE_PLATFORM ${CMAKE_SYSTEM_NAME}${BITS})
|
||||
set(_suffix "sh")
|
||||
find_package(GDB QUIET)
|
||||
if(GDB_FOUND)
|
||||
set(LAUNCHERS_GOT_GDB YES)
|
||||
if(GDB_HAS_RETURN_CHILD_RESULT)
|
||||
set(LAUNCHERS_GDB_ARG --return-child-result)
|
||||
endif()
|
||||
else()
|
||||
set(LAUNCHERS_GOT_GDB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT USERFILE_REMOTE_MACHINE)
|
||||
site_name(USERFILE_REMOTE_MACHINE)
|
||||
mark_as_advanced(USERFILE_REMOTE_MACHINE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(_launcher_process_args)
|
||||
set(_nowhere)
|
||||
set(_curdest _nowhere)
|
||||
set(_val_args
|
||||
ARGS
|
||||
RUNTIME_LIBRARY_DIRS
|
||||
WORKING_DIRECTORY
|
||||
ENVIRONMENT)
|
||||
set(_bool_args FORWARD_ARGS)
|
||||
foreach(_arg ${_val_args} ${_bool_args})
|
||||
set(${_arg})
|
||||
endforeach()
|
||||
foreach(_element ${ARGN})
|
||||
list(FIND _val_args "${_element}" _val_arg_find)
|
||||
list(FIND _bool_args "${_element}" _bool_arg_find)
|
||||
if("${_val_arg_find}" GREATER "-1")
|
||||
set(_curdest "${_element}")
|
||||
elseif("${_bool_arg_find}" GREATER "-1")
|
||||
set("${_element}" ON)
|
||||
set(_curdest _nowhere)
|
||||
else()
|
||||
list(APPEND ${_curdest} "${_element}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(_nowhere)
|
||||
message(FATAL_ERROR
|
||||
"Syntax error in use of a function in CreateLaunchers!")
|
||||
endif()
|
||||
|
||||
# Turn into a list of native paths
|
||||
set(_runtime_lib_dirs)
|
||||
foreach(_dlldir ${RUNTIME_LIBRARY_DIRS})
|
||||
file(TO_NATIVE_PATH "${_dlldir}" _path)
|
||||
set(_runtime_lib_dirs "${_runtime_lib_dirs}${_path}${_pathdelim}")
|
||||
endforeach()
|
||||
|
||||
if(NOT WORKING_DIRECTORY)
|
||||
set(WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
if(FORWARD_ARGS)
|
||||
if(WIN32)
|
||||
set(FWD_ARGS %*)
|
||||
else()
|
||||
set(FWD_ARGS $*)
|
||||
endif()
|
||||
else()
|
||||
set(FWD_ARGS)
|
||||
endif()
|
||||
|
||||
set(USERFILE_WORKING_DIRECTORY "${WORKING_DIRECTORY}")
|
||||
set(USERFILE_COMMAND_ARGUMENTS "${ARGS}")
|
||||
set(LAUNCHERSCRIPT_COMMAND_ARGUMENTS "${ARGS} ${FWD_ARGS}")
|
||||
|
||||
if(WIN32)
|
||||
set(RUNTIME_LIBRARIES_ENVIRONMENT "PATH=${_runtime_lib_dirs};%PATH%")
|
||||
file(READ
|
||||
"${_launchermoddir}/launcher.env.cmd.in"
|
||||
_cmdenv)
|
||||
else()
|
||||
if(APPLE)
|
||||
set(RUNTIME_LIBRARIES_ENVIRONMENT
|
||||
"DYLD_LIBRARY_PATH=${_runtime_lib_dirs}:$DYLD_LIBRARY_PATH")
|
||||
else()
|
||||
set(RUNTIME_LIBRARIES_ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${_runtime_lib_dirs}:$LD_LIBRARY_PATH")
|
||||
endif()
|
||||
file(READ
|
||||
"${_launchermoddir}/launcher.env.sh.in"
|
||||
_cmdenv)
|
||||
endif()
|
||||
set(USERFILE_ENVIRONMENT "${RUNTIME_LIBRARIES_ENVIRONMENT}")
|
||||
|
||||
set(USERFILE_ENV_COMMANDS)
|
||||
foreach(_arg "${RUNTIME_LIBRARIES_ENVIRONMENT}" ${ENVIRONMENT})
|
||||
string(CONFIGURE
|
||||
"@USERFILE_ENVIRONMENT@@LAUNCHER_LINESEP@@_arg@"
|
||||
USERFILE_ENVIRONMENT
|
||||
@ONLY)
|
||||
string(CONFIGURE
|
||||
"@USERFILE_ENV_COMMANDS@${_cmdenv}"
|
||||
USERFILE_ENV_COMMANDS
|
||||
@ONLY)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(_launcher_produce_vcproj_user)
|
||||
if(MSVC)
|
||||
file(READ
|
||||
"${_launchermoddir}/perconfig.${VCPROJ_TYPE}.user.in"
|
||||
_perconfig)
|
||||
set(USERFILE_CONFIGSECTIONS)
|
||||
foreach(USERFILE_CONFIGNAME ${CMAKE_CONFIGURATION_TYPES})
|
||||
get_target_property(USERFILE_${USERFILE_CONFIGNAME}_COMMAND
|
||||
${_targetname}
|
||||
LOCATION_${USERFILE_CONFIGNAME})
|
||||
file(TO_NATIVE_PATH
|
||||
"${USERFILE_${USERFILE_CONFIGNAME}_COMMAND}"
|
||||
USERFILE_${USERFILE_CONFIGNAME}_COMMAND)
|
||||
string(CONFIGURE "${_perconfig}" _temp @ONLY ESCAPE_QUOTES)
|
||||
string(CONFIGURE
|
||||
"${USERFILE_CONFIGSECTIONS}${_temp}"
|
||||
USERFILE_CONFIGSECTIONS
|
||||
ESCAPE_QUOTES)
|
||||
endforeach()
|
||||
|
||||
|
||||
configure_file("${_launchermoddir}/${VCPROJ_TYPE}.user.in"
|
||||
${VCPROJNAME}.${VCPROJ_TYPE}.${USERFILE_EXTENSION}
|
||||
@ONLY)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(_launcher_configure_executable _src _tmp _target)
|
||||
# get_filename_component(_targetname "${_target}" NAME)
|
||||
get_filename_component(_targetpath "${_target}" PATH)
|
||||
configure_file("${_src}"
|
||||
"${_tmp}"
|
||||
@ONLY)
|
||||
file(COPY "${_tmp}"
|
||||
DESTINATION "${_targetpath}"
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endmacro()
|
||||
|
||||
macro(_launcher_create_target_launcher)
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
# Multi-config generator - multiple launchers
|
||||
foreach(_config ${CMAKE_CONFIGURATION_TYPES})
|
||||
get_target_property(USERFILE_${_config}_COMMAND
|
||||
${_targetname}
|
||||
LOCATION_${_config})
|
||||
file(TO_NATIVE_PATH
|
||||
"${USERFILE_${_config}_COMMAND}"
|
||||
USERFILE_COMMAND)
|
||||
set(_fn "launch-${_targetname}-${_config}.${_suffix}")
|
||||
_launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_fn}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_fn}")
|
||||
endforeach()
|
||||
else()
|
||||
# Single-config generator - single launcher
|
||||
get_target_property(USERFILE_COMMAND
|
||||
${_targetname}
|
||||
LOCATION)
|
||||
file(TO_NATIVE_PATH
|
||||
"${USERFILE_COMMAND}"
|
||||
USERFILE_COMMAND)
|
||||
_launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-${_targetname}.${_suffix}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/launch-${_targetname}.${_suffix}"
|
||||
@ONLY)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(create_default_target_launcher _targetname)
|
||||
_launcher_system_settings()
|
||||
_launcher_process_args(${ARGN})
|
||||
|
||||
set(VCPROJNAME "${CMAKE_BINARY_DIR}/ALL_BUILD")
|
||||
_launcher_produce_vcproj_user()
|
||||
|
||||
_launcher_create_target_launcher()
|
||||
endfunction()
|
||||
|
||||
function(create_target_launcher _targetname)
|
||||
_launcher_system_settings()
|
||||
_launcher_process_args(${ARGN})
|
||||
|
||||
set(VCPROJNAME "${CMAKE_CURRENT_BINARY_DIR}/${_targetname}")
|
||||
_launcher_produce_vcproj_user()
|
||||
|
||||
_launcher_create_target_launcher()
|
||||
endfunction()
|
||||
|
||||
function(create_generic_launcher _launchername)
|
||||
_launcher_system_settings()
|
||||
_launcher_process_args(${ARGN})
|
||||
|
||||
if(NOT IS_ABSOLUTE _launchername)
|
||||
set(_launchername
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${_launchername}.${_suffix}")
|
||||
else()
|
||||
set(_launchername "${_launchername}.${_suffix}")
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(GENERIC_LAUNCHER_COMMAND "${_launchername}" PARENT_SCOPE)
|
||||
set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION)
|
||||
else()
|
||||
set(GENERIC_LAUNCHER_COMMAND sh "${_launchername}" PARENT_SCOPE)
|
||||
set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION
|
||||
"Program terminated with signal")
|
||||
endif()
|
||||
|
||||
_launcher_configure_executable("${_launchermoddir}/genericlauncher.${_suffix}.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/genericlauncher.${_suffix}.in"
|
||||
"${_launchername}")
|
||||
endfunction()
|
||||
|
||||
function(guess_runtime_library_dirs _var)
|
||||
# Start off with the link directories of the calling listfile's directory
|
||||
get_directory_property(_libdirs LINK_DIRECTORIES)
|
||||
|
||||
# Add additional libraries passed to the function
|
||||
foreach(_lib ${ARGN})
|
||||
get_filename_component(_libdir "${_lib}" PATH)
|
||||
list(APPEND _libdirs "${_libdir}")
|
||||
endforeach()
|
||||
|
||||
# Now, build a list of potential dll directories
|
||||
set(_dlldirs)
|
||||
foreach(_libdir ${_libdirs})
|
||||
# Add the libdir itself
|
||||
list(APPEND _dlldirs "${_libdir}")
|
||||
|
||||
# Look also in libdir/../bin since the dll might not be with the lib
|
||||
get_filename_component(_libdir "${_libdir}/../bin" ABSOLUTE)
|
||||
list(APPEND _dlldirs "${_libdir}")
|
||||
endforeach()
|
||||
|
||||
# Only keep the valid, unique directories
|
||||
clean_directory_list(_dlldirs)
|
||||
|
||||
# Return _dlldirs
|
||||
set(${_var} "${_dlldirs}" PARENT_SCOPE)
|
||||
endfunction()
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
# DUMB is much slower in a Debug build than a Release build, so we force a Release
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
include( CheckCXXCompilerFlag )
|
||||
|
||||
make_release_only()
|
||||
|
||||
# I don't plan on debugging this, so make it a release build.
|
||||
if( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
|
||||
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
14
launcher-templates/genericlauncher.cmd.in
Normal file
14
launcher-templates/genericlauncher.cmd.in
Normal file
|
@ -0,0 +1,14 @@
|
|||
cd @USERFILE_WORKING_DIRECTORY@
|
||||
@USERFILE_ENV_COMMANDS@
|
||||
|
||||
IF NOT [x%1]==[x--debugger] GOTO SkipDebuggingMess
|
||||
|
||||
ECHO Need to ditch the debugger!
|
||||
SHIFT /1
|
||||
%1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
GOTO EOF
|
||||
|
||||
:SkipDebuggingMess
|
||||
%*
|
||||
|
||||
:EOF
|
1
launcher-templates/launcher.env.cmd.in
Normal file
1
launcher-templates/launcher.env.cmd.in
Normal file
|
@ -0,0 +1 @@
|
|||
set @_arg@
|
28
launcher-templates/perconfig.vcproj.user.in
Normal file
28
launcher-templates/perconfig.vcproj.user.in
Normal file
|
@ -0,0 +1,28 @@
|
|||
<Configuration
|
||||
Name="@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}"
|
||||
WorkingDirectory="@USERFILE_WORKING_DIRECTORY@"
|
||||
CommandArguments="@USERFILE_COMMAND_ARGUMENTS@"
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="@USERFILE_REMOTE_MACHINE@"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment="@USERFILE_ENVIRONMENT@"
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
7
launcher-templates/perconfig.vcxproj.user.in
Normal file
7
launcher-templates/perconfig.vcxproj.user.in
Normal file
|
@ -0,0 +1,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@'">
|
||||
<LocalDebuggerEnvironment>@USERFILE_ENVIRONMENT@</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommand>${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommandArguments>@USERFILE_COMMAND_ARGUMENTS@</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>@USERFILE_WORKING_DIRECTORY@</LocalDebuggerWorkingDirectory>
|
||||
</PropertyGroup>
|
8
launcher-templates/targetlauncher.cmd.in
Normal file
8
launcher-templates/targetlauncher.cmd.in
Normal file
|
@ -0,0 +1,8 @@
|
|||
cd @USERFILE_WORKING_DIRECTORY@
|
||||
@USERFILE_ENV_COMMANDS@
|
||||
if [%1]==[--debugger] (
|
||||
SHIFT
|
||||
)
|
||||
|
||||
"@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@
|
||||
pause
|
10
launcher-templates/vcproj.user.in
Normal file
10
launcher-templates/vcproj.user.in
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioUserFile
|
||||
ProjectType="Visual C++"
|
||||
Version="@USERFILE_VC_VERSION@"
|
||||
ShowAllFiles="false"
|
||||
>
|
||||
<Configurations>
|
||||
@USERFILE_CONFIGSECTIONS@
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
4
launcher-templates/vcxproj.user.in
Normal file
4
launcher-templates/vcxproj.user.in
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
@USERFILE_CONFIGSECTIONS@
|
||||
</Project>
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
|
@ -25,7 +25,7 @@ if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE
|
|||
endif( APPLE )
|
||||
endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
||||
option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" )
|
||||
option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ON )
|
||||
|
||||
if( CMAKE_SIZEOF_VOID_P MATCHES "8" )
|
||||
set( X64 64 )
|
||||
|
@ -77,9 +77,11 @@ if( WIN32 )
|
|||
set( FMOD_SEARCH_PATHS
|
||||
"C:/Program Files/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api"
|
||||
"C:/Program Files (x86)/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api"
|
||||
# This next one is for me.
|
||||
# This next one is for Randy.
|
||||
"E:/Software/Dev/FMOD/${WIN_TYPE}/api"
|
||||
# .. and this one for Graf Zahl
|
||||
"D:/portable/FMOD SoundSystem 4.26/FMOD Programmers API WIN32/api"
|
||||
"E:/Software/Dev/FMOD/${WIN_TYPE}/api" )
|
||||
)
|
||||
set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES inc )
|
||||
set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib )
|
||||
set( NASM_NAMES nasmw nasm )
|
||||
|
@ -1199,10 +1201,49 @@ include_directories( .
|
|||
|
||||
add_dependencies( zdoom revision_check )
|
||||
|
||||
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
|
||||
# Linux distributions are slow to adopt 2.6. :(
|
||||
set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
|
||||
set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} )
|
||||
# Due to some quirks, we need to do this in this order
|
||||
if( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS )
|
||||
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
|
||||
# Linux distributions are slow to adopt 2.6. :(
|
||||
set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
|
||||
set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} )
|
||||
endif( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS )
|
||||
|
||||
if( MSVC )
|
||||
option( ZDOOM_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
|
||||
if( ZDOOM_GENERATE_MAPFILE )
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP:${ZDOOM_EXE_NAME}.map")
|
||||
else( ZDOOM_GENERATE_MAPFILE )
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"")
|
||||
endif( ZDOOM_GENERATE_MAPFILE )
|
||||
|
||||
add_custom_command(TARGET zdoom POST_BUILD
|
||||
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2
|
||||
COMMENT "Adding manifest..."
|
||||
)
|
||||
|
||||
create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
|
||||
endif( MSVC )
|
||||
|
||||
if( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSIONS )
|
||||
set_target_properties( zdoom PROPERTIES
|
||||
RUNTIME_OUTPUT_NAME ${ZDOOM_EXE_NAME}
|
||||
RUNTIME_OUTPUT_NAME_DEBUG ${ZDOOM_EXE_NAME}d
|
||||
RUNTIME_OUTPUT_NAME_MINSIZEREL ${ZDOOM_EXE_NAME}msr
|
||||
RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${ZDOOM_EXE_NAME}rd
|
||||
)
|
||||
|
||||
if( ZDOOM_GENERATE_MAPFILE )
|
||||
add_custom_command(TARGET zdoom POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zdoom> ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE_DIR:zdoom>/zdoom.map ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom>.map
|
||||
COMMENT "Copying to output directory..." )
|
||||
else( ZDOOM_GENERATE_MAPFILE )
|
||||
add_custom_command(TARGET zdoom POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zdoom> ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom>
|
||||
COMMENT "Copying to output directory..." )
|
||||
endif( ZDOOM_GENERATE_MAPFILE )
|
||||
endif( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSIONS )
|
||||
|
||||
if( NOT WIN32 )
|
||||
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${ZDOOM_EXE_NAME} ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME}; fi" )
|
||||
|
@ -1220,14 +1261,6 @@ if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE
|
|||
endif( SSE_MATTERS )
|
||||
endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
||||
if( MSVC )
|
||||
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO")
|
||||
add_custom_command(TARGET zdoom POST_BUILD
|
||||
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2
|
||||
COMMENT "Adding manifest..."
|
||||
)
|
||||
endif( MSVC )
|
||||
|
||||
source_group("Assembly Files\\ia32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_ia32/.+")
|
||||
source_group("Assembly Files\\x86_64" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_x86_64/.+")
|
||||
source_group("Audio Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/.+")
|
||||
|
|
|
@ -764,6 +764,10 @@ public:
|
|||
return (PalEntry)GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
||||
}
|
||||
|
||||
// These also set CF_INTERPVIEW for players.
|
||||
void SetPitch(int p);
|
||||
void SetAngle(angle_t ang);
|
||||
|
||||
const PClass *GetBloodType(int type = 0) const
|
||||
{
|
||||
const PClass *bloodcls;
|
||||
|
|
|
@ -627,7 +627,14 @@ void C_DoCommand (const char *cmd, int keynum)
|
|||
}
|
||||
else
|
||||
{
|
||||
new DStoredCommand (com, beg);
|
||||
if (len == 4 && strnicmp(beg, "warp", 4) == 0)
|
||||
{
|
||||
StoredWarp = beg;
|
||||
}
|
||||
else
|
||||
{
|
||||
new DStoredCommand (com, beg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -218,6 +218,7 @@ int NoWipe; // [RH] Allow wipe? (Needs to be set each time)
|
|||
bool singletics = false; // debug flag to cancel adaptiveness
|
||||
FString startmap;
|
||||
bool autostart;
|
||||
FString StoredWarp;
|
||||
bool advancedemo;
|
||||
FILE *debugfile;
|
||||
event_t events[MAXEVENTS];
|
||||
|
@ -2081,7 +2082,7 @@ static void CheckCmdLine()
|
|||
{
|
||||
startmap = "&wt@01";
|
||||
}
|
||||
autostart = false;
|
||||
autostart = StoredWarp.IsNotEmpty();
|
||||
|
||||
const char *val = Args->CheckValue ("-skill");
|
||||
if (val)
|
||||
|
@ -2518,6 +2519,11 @@ void D_DoomMain (void)
|
|||
if (demorecording)
|
||||
G_BeginRecording (startmap);
|
||||
G_InitNew (startmap, false);
|
||||
if (StoredWarp.IsNotEmpty())
|
||||
{
|
||||
AddCommandString(StoredWarp.LockBuffer());
|
||||
StoredWarp = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -198,6 +198,7 @@ typedef enum
|
|||
CF_INSTANTWEAPSWITCH= 1 << 11, // [RH] Switch weapons instantly
|
||||
CF_TOTALLYFROZEN = 1 << 12, // [RH] All players can do is press +use
|
||||
CF_PREDICTING = 1 << 13, // [RH] Player movement is being predicted
|
||||
CF_INTERPVIEW = 1 << 14, // [RH] view was changed outside of input, so interpolate one frame
|
||||
CF_DRAIN = 1 << 16, // Player owns a drain powerup
|
||||
CF_HIGHJUMP = 1 << 18, // more Skulltag flags. Implementation not guaranteed though. ;)
|
||||
CF_REFLECTION = 1 << 19,
|
||||
|
|
|
@ -59,6 +59,8 @@ extern FString startmap; // [RH] Actual map name now
|
|||
|
||||
extern bool autostart;
|
||||
|
||||
extern FString StoredWarp; // [RH] +warp at the command line
|
||||
|
||||
// Selected by user.
|
||||
EXTERN_CVAR (Int, gameskill);
|
||||
extern int NextSkill; // [RH] Skill to use at next level load
|
||||
|
|
|
@ -58,12 +58,12 @@ class AFSwordMissile : public AActor
|
|||
{
|
||||
DECLARE_CLASS (AFSwordMissile, AActor)
|
||||
public:
|
||||
int DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype);
|
||||
int DoSpecialDamage(AActor *victim, int damage, FName damagetype);
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AFSwordMissile)
|
||||
|
||||
int AFSwordMissile::DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype)
|
||||
int AFSwordMissile::DoSpecialDamage(AActor *victim, int damage, FName damagetype)
|
||||
{
|
||||
if (victim->player)
|
||||
{
|
||||
|
|
|
@ -8250,7 +8250,9 @@ scriptwait:
|
|||
if (STACK(2) == 0)
|
||||
{
|
||||
if (activator != NULL)
|
||||
activator->angle = STACK(1) << 16;
|
||||
{
|
||||
activator->SetAngle(STACK(1) << 16);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8259,7 +8261,7 @@ scriptwait:
|
|||
|
||||
while ( (actor = iterator.Next ()) )
|
||||
{
|
||||
actor->angle = STACK(1) << 16;
|
||||
actor->SetAngle(STACK(1) << 16);
|
||||
}
|
||||
}
|
||||
sp -= 2;
|
||||
|
@ -8269,7 +8271,9 @@ scriptwait:
|
|||
if (STACK(2) == 0)
|
||||
{
|
||||
if (activator != NULL)
|
||||
activator->pitch = STACK(1) << 16;
|
||||
{
|
||||
activator->SetPitch(STACK(1) << 16);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8278,7 +8282,7 @@ scriptwait:
|
|||
|
||||
while ( (actor = iterator.Next ()) )
|
||||
{
|
||||
actor->pitch = STACK(1) << 16;
|
||||
actor->SetPitch(STACK(1) << 16);
|
||||
}
|
||||
}
|
||||
sp -= 2;
|
||||
|
|
|
@ -2962,6 +2962,30 @@ void AActor::SetShade (int r, int g, int b)
|
|||
fillcolor = MAKEARGB(ColorMatcher.Pick (r, g, b), r, g, b);
|
||||
}
|
||||
|
||||
void AActor::SetPitch(int p)
|
||||
{
|
||||
if (p != pitch)
|
||||
{
|
||||
pitch = p;
|
||||
if (player != NULL)
|
||||
{
|
||||
player->cheats |= CF_INTERPVIEW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AActor::SetAngle(angle_t ang)
|
||||
{
|
||||
if (ang != angle)
|
||||
{
|
||||
angle = ang;
|
||||
if (player != NULL)
|
||||
{
|
||||
player->cheats |= CF_INTERPVIEW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_MobjThinker
|
||||
//
|
||||
|
|
|
@ -2252,6 +2252,9 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
player->inventorytics--;
|
||||
}
|
||||
// Don't interpolate the view for more than one tic
|
||||
player->cheats &= ~CF_INTERPVIEW;
|
||||
|
||||
// No-clip cheat
|
||||
if ((player->cheats & (CF_NOCLIP | CF_NOCLIP2)) == CF_NOCLIP2)
|
||||
{ // No noclip2 without noclip
|
||||
|
|
|
@ -581,6 +581,7 @@ void R_InterpolateView (player_t *player, fixed_t frac, InterpolationViewer *ivi
|
|||
viewy = iview->oviewy + FixedMul (frac, iview->nviewy - iview->oviewy);
|
||||
viewz = iview->oviewz + FixedMul (frac, iview->nviewz - iview->oviewz);
|
||||
if (player != NULL &&
|
||||
!(player->cheats & CF_INTERPVIEW) &&
|
||||
player - players == consoleplayer &&
|
||||
camera == player->mo &&
|
||||
!demoplayback &&
|
||||
|
|
|
@ -659,6 +659,17 @@ void FTextureManager::ParseCameraTexture(FScanner &sc)
|
|||
sc.UnGet ();
|
||||
}
|
||||
}
|
||||
if (sc.GetString())
|
||||
{
|
||||
if (sc.Compare("WorldPanning"))
|
||||
{
|
||||
viewer->bWorldPanning = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.UnGet();
|
||||
}
|
||||
}
|
||||
viewer->SetScaledSize(fitwidth, fitheight);
|
||||
}
|
||||
|
||||
|
|
|
@ -3935,7 +3935,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetAngle)
|
|||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_ANGLE(angle, 0);
|
||||
self->angle = angle;
|
||||
self->SetAngle(angle);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -3973,8 +3973,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetPitch)
|
|||
}
|
||||
pitch = clamp<int>(pitch, min, max);
|
||||
}
|
||||
|
||||
self->pitch = pitch;
|
||||
self->SetPitch(pitch);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.4.4)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
make_release_only()
|
||||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.7")
|
||||
|
|
Loading…
Reference in a new issue