This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).
修订版 | 02682eb46c72b6c72da3640b92e1ab1346459486 (tree) |
---|---|
时间 | 2015-08-03 01:04:47 |
作者 | Benjamin Berkels <torr.samaho@quan...> |
Commiter | Benjamin Berkels |
Merged with G1.9pre-327-gb91d5d5
@@ -1,6 +1,9 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | project(Zandronum) |
3 | 3 | |
4 | +list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ) | |
5 | +include( CreateLaunchers ) | |
6 | + | |
4 | 7 | # Generator expression are available some time in CMake 2.8. Due to |
5 | 8 | # cmake_minimum_required, we can assume a minor version of > 7 implies major >= 2 |
6 | 9 | if(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7) |
@@ -19,21 +22,31 @@ | ||
19 | 22 | set( PK3_TARGET "pk3" ) |
20 | 23 | endif( ${PK3_TARGET} STREQUAL "zdoom_pk3" ) |
21 | 24 | |
22 | - if( NOT NO_GENERATOR_EXPRESSIONS ) | |
25 | + if( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
23 | 26 | add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} |
24 | 27 | COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR} |
25 | 28 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} $<TARGET_FILE_DIR:zdoom> |
26 | 29 | DEPENDS zipdir ${PK3_DIR} ) |
27 | - else( NOT NO_GENERATOR_EXPRESSIONS ) | |
30 | + else( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
28 | 31 | add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} |
29 | 32 | COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR} |
30 | 33 | DEPENDS zipdir ${PK3_DIR} ) |
31 | - endif( NOT NO_GENERATOR_EXPRESSIONS ) | |
34 | + endif( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
32 | 35 | |
33 | 36 | add_custom_target( ${PK3_TARGET} ALL |
34 | 37 | DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ) |
35 | 38 | endfunction( add_pk3 ) |
36 | 39 | |
40 | +# Macro for building libraries without debugging information | |
41 | +macro( make_release_only ) | |
42 | + set( CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_RELEASE} ) | |
43 | + set( CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELEASE} ) | |
44 | + string( REPLACE "/MT " "/MTd " CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_RELEASE} ) | |
45 | + set( CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_RELEASE} ) | |
46 | + set( CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELEASE} ) | |
47 | + string( REPLACE "/MT " "/MTd " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_RELEASE} ) | |
48 | +endmacro( make_release_only ) | |
49 | + | |
37 | 50 | IF( NOT CMAKE_BUILD_TYPE ) |
38 | 51 | SET( CMAKE_BUILD_TYPE Debug CACHE STRING |
39 | 52 | "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." |
@@ -42,6 +55,13 @@ | ||
42 | 55 | |
43 | 56 | set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created." ) |
44 | 57 | set( ZDOOM_EXE_NAME "zandronum" CACHE FILEPATH "Name of the executable to create" ) |
58 | +if( MSVC ) | |
59 | + # Allow the user to use ZDOOM_OUTPUT_DIR as a single release point. | |
60 | + # Use zdoom, zdoomd, zdoom64, and zdoomd64 for the binary names | |
61 | + option( ZDOOM_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF ) | |
62 | +else( MSVC ) | |
63 | + set( ZDOOM_OUTPUT_OLDSTYLE OFF ) | |
64 | +endif( MSVC ) | |
45 | 65 | |
46 | 66 | if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
47 | 67 | set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) |
@@ -70,7 +90,7 @@ | ||
70 | 90 | set( ALL_C_FLAGS "/GF /Gy /GR- /fp:fast" ) |
71 | 91 | |
72 | 92 | # Avoid CRT DLL dependancies in release builds |
73 | - set( REL_C_FLAGS "/MT /Oi" ) | |
93 | + set( REL_C_FLAGS "/MT /Oy /Oi" ) | |
74 | 94 | |
75 | 95 | # Debug allocations in debug builds |
76 | 96 | set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC /MTd /Gm" ) |
@@ -0,0 +1,48 @@ | ||
1 | +# - Removes duplicate entries and non-directories from a provided list | |
2 | +# | |
3 | +# clean_directory_list(<listvar> [<additional list items>...]) | |
4 | +# | |
5 | +# Requires CMake 2.6 or newer (uses the 'function' command) | |
6 | +# | |
7 | +# Original Author: | |
8 | +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |
9 | +# http://academic.cleardefinition.com | |
10 | +# Iowa State University HCI Graduate Program/VRAC | |
11 | +# | |
12 | +# Copyright Iowa State University 2009-2010. | |
13 | +# Distributed under the Boost Software License, Version 1.0. | |
14 | +# (See accompanying file LICENSE_1_0.txt or copy at | |
15 | +# http://www.boost.org/LICENSE_1_0.txt) | |
16 | + | |
17 | +if(__clean_directory_list) | |
18 | + return() | |
19 | +endif() | |
20 | +set(__clean_directory_list YES) | |
21 | + | |
22 | +function(clean_directory_list _var) | |
23 | + # combine variable's current value with additional list items | |
24 | + set(_in ${${_var}} ${ARGN}) | |
25 | + | |
26 | + if(_in) | |
27 | + # Initial list cleaning | |
28 | + list(REMOVE_DUPLICATES _in) | |
29 | + | |
30 | + # Grab the absolute path of each actual directory | |
31 | + set(_out) | |
32 | + foreach(_dir ${_in}) | |
33 | + if(IS_DIRECTORY "${_dir}") | |
34 | + get_filename_component(_dir "${_dir}" ABSOLUTE) | |
35 | + file(TO_CMAKE_PATH "${_dir}" _dir) | |
36 | + list(APPEND _out "${_dir}") | |
37 | + endif() | |
38 | + endforeach() | |
39 | + | |
40 | + if(_out) | |
41 | + # Clean up the output list now | |
42 | + list(REMOVE_DUPLICATES _out) | |
43 | + endif() | |
44 | + | |
45 | + # return _out | |
46 | + set(${_var} "${_out}" PARENT_SCOPE) | |
47 | + endif() | |
48 | +endfunction() |
@@ -0,0 +1,336 @@ | ||
1 | +# - Create launchers to set working directory, env. vars, etc. | |
2 | +# | |
3 | +# include(CreateLaunchers) - to make these available | |
4 | +# guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...]) | |
5 | +# create_default_target_launcher(<targetname> | |
6 | +# [ARGS <args...>] | |
7 | +# [FORWARD_ARGS] | |
8 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
9 | +# [WORKING_DIRECTORY <dir>] | |
10 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
11 | +# | |
12 | +# create_target_launcher(<targetname> | |
13 | +# [ARGS <args...>] | |
14 | +# [FORWARD_ARGS] | |
15 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
16 | +# [WORKING_DIRECTORY <dir>] | |
17 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
18 | +# | |
19 | +# create_generic_launcher(<launchername> | |
20 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
21 | +# [WORKING_DIRECTORY <dir>] | |
22 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
23 | +# - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION | |
24 | +# | |
25 | +# Requires these CMake modules: | |
26 | +# ListFilter | |
27 | +# ProgramFilesGlob | |
28 | +# CleanDirectoryList | |
29 | +# | |
30 | +# Requires CMake 2.6 or newer (uses the 'function' command) | |
31 | +# | |
32 | +# Original Author: | |
33 | +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |
34 | +# http://academic.cleardefinition.com | |
35 | +# Iowa State University HCI Graduate Program/VRAC | |
36 | +# | |
37 | +# Copyright Iowa State University 2009-2010. | |
38 | +# Distributed under the Boost Software License, Version 1.0. | |
39 | +# (See accompanying file LICENSE_1_0.txt or copy at | |
40 | +# http://www.boost.org/LICENSE_1_0.txt) | |
41 | + | |
42 | +if(__create_launchers) | |
43 | + return() | |
44 | +endif() | |
45 | +set(__create_launchers YES) | |
46 | + | |
47 | +include(CleanDirectoryList) | |
48 | + | |
49 | +# We must run the following at "include" time, not at function call time, | |
50 | +# to find the path to this module rather than the path to a calling list file | |
51 | +get_filename_component(_launchermoddir | |
52 | + ${CMAKE_CURRENT_LIST_FILE} | |
53 | + PATH) | |
54 | +set(_launchermoddir "${_launchermoddir}/launcher-templates") | |
55 | + | |
56 | +macro(_launcher_system_settings) | |
57 | + if(CMAKE_SIZEOF_VOID_P EQUAL 8) | |
58 | + set(BITS 64) | |
59 | + else() | |
60 | + set(BITS 32) | |
61 | + endif() | |
62 | + | |
63 | + if(WIN32) | |
64 | + # Find user and system name | |
65 | + set(SYSTEM_NAME $ENV{USERDOMAIN}) | |
66 | + set(USER_NAME $ENV{USERNAME}) | |
67 | + set(VCPROJ_TYPE vcproj) | |
68 | + set(USERFILE_EXTENSION ${SYSTEM_NAME}.${USER_NAME}.user) | |
69 | + set(LAUNCHER_LINESEP "
") | |
70 | + if(MSVC90) | |
71 | + set(USERFILE_VC_VERSION 9.00) | |
72 | + elseif(MSVC80) | |
73 | + set(USERFILE_VC_VERSION 8.00) | |
74 | + elseif(MSVC71) | |
75 | + set(USERFILE_VC_VERSION 7.10) | |
76 | + elseif(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer | |
77 | + set(LAUNCHER_LINESEP "\n") | |
78 | + set(USERFILE_VC_VERSION 10.00) | |
79 | + set(USERFILE_EXTENSION user) | |
80 | + set(VCPROJ_TYPE vcxproj) | |
81 | + endif() | |
82 | + if(BITS EQUAL 64) | |
83 | + set(USERFILE_PLATFORM x64) | |
84 | + else() | |
85 | + set(USERFILE_PLATFORM Win${BITS}) | |
86 | + endif() | |
87 | + set(_pathdelim ";") | |
88 | + set(_suffix "cmd") | |
89 | + else() | |
90 | + set(_pathdelim ":") | |
91 | + set(USERFILE_PLATFORM ${CMAKE_SYSTEM_NAME}${BITS}) | |
92 | + set(_suffix "sh") | |
93 | + find_package(GDB QUIET) | |
94 | + if(GDB_FOUND) | |
95 | + set(LAUNCHERS_GOT_GDB YES) | |
96 | + if(GDB_HAS_RETURN_CHILD_RESULT) | |
97 | + set(LAUNCHERS_GDB_ARG --return-child-result) | |
98 | + endif() | |
99 | + else() | |
100 | + set(LAUNCHERS_GOT_GDB) | |
101 | + endif() | |
102 | + endif() | |
103 | + | |
104 | + if(WIN32 AND NOT USERFILE_REMOTE_MACHINE) | |
105 | + site_name(USERFILE_REMOTE_MACHINE) | |
106 | + mark_as_advanced(USERFILE_REMOTE_MACHINE) | |
107 | + endif() | |
108 | +endmacro() | |
109 | + | |
110 | +macro(_launcher_process_args) | |
111 | + set(_nowhere) | |
112 | + set(_curdest _nowhere) | |
113 | + set(_val_args | |
114 | + ARGS | |
115 | + RUNTIME_LIBRARY_DIRS | |
116 | + WORKING_DIRECTORY | |
117 | + ENVIRONMENT) | |
118 | + set(_bool_args FORWARD_ARGS) | |
119 | + foreach(_arg ${_val_args} ${_bool_args}) | |
120 | + set(${_arg}) | |
121 | + endforeach() | |
122 | + foreach(_element ${ARGN}) | |
123 | + list(FIND _val_args "${_element}" _val_arg_find) | |
124 | + list(FIND _bool_args "${_element}" _bool_arg_find) | |
125 | + if("${_val_arg_find}" GREATER "-1") | |
126 | + set(_curdest "${_element}") | |
127 | + elseif("${_bool_arg_find}" GREATER "-1") | |
128 | + set("${_element}" ON) | |
129 | + set(_curdest _nowhere) | |
130 | + else() | |
131 | + list(APPEND ${_curdest} "${_element}") | |
132 | + endif() | |
133 | + endforeach() | |
134 | + | |
135 | + if(_nowhere) | |
136 | + message(FATAL_ERROR | |
137 | + "Syntax error in use of a function in CreateLaunchers!") | |
138 | + endif() | |
139 | + | |
140 | + # Turn into a list of native paths | |
141 | + set(_runtime_lib_dirs) | |
142 | + foreach(_dlldir ${RUNTIME_LIBRARY_DIRS}) | |
143 | + file(TO_NATIVE_PATH "${_dlldir}" _path) | |
144 | + set(_runtime_lib_dirs "${_runtime_lib_dirs}${_path}${_pathdelim}") | |
145 | + endforeach() | |
146 | + | |
147 | + if(NOT WORKING_DIRECTORY) | |
148 | + set(WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") | |
149 | + endif() | |
150 | + | |
151 | + if(FORWARD_ARGS) | |
152 | + if(WIN32) | |
153 | + set(FWD_ARGS %*) | |
154 | + else() | |
155 | + set(FWD_ARGS $*) | |
156 | + endif() | |
157 | + else() | |
158 | + set(FWD_ARGS) | |
159 | + endif() | |
160 | + | |
161 | + set(USERFILE_WORKING_DIRECTORY "${WORKING_DIRECTORY}") | |
162 | + set(USERFILE_COMMAND_ARGUMENTS "${ARGS}") | |
163 | + set(LAUNCHERSCRIPT_COMMAND_ARGUMENTS "${ARGS} ${FWD_ARGS}") | |
164 | + | |
165 | + if(WIN32) | |
166 | + set(RUNTIME_LIBRARIES_ENVIRONMENT "PATH=${_runtime_lib_dirs};%PATH%") | |
167 | + file(READ | |
168 | + "${_launchermoddir}/launcher.env.cmd.in" | |
169 | + _cmdenv) | |
170 | + else() | |
171 | + if(APPLE) | |
172 | + set(RUNTIME_LIBRARIES_ENVIRONMENT | |
173 | + "DYLD_LIBRARY_PATH=${_runtime_lib_dirs}:$DYLD_LIBRARY_PATH") | |
174 | + else() | |
175 | + set(RUNTIME_LIBRARIES_ENVIRONMENT | |
176 | + "LD_LIBRARY_PATH=${_runtime_lib_dirs}:$LD_LIBRARY_PATH") | |
177 | + endif() | |
178 | + file(READ | |
179 | + "${_launchermoddir}/launcher.env.sh.in" | |
180 | + _cmdenv) | |
181 | + endif() | |
182 | + set(USERFILE_ENVIRONMENT "${RUNTIME_LIBRARIES_ENVIRONMENT}") | |
183 | + | |
184 | + set(USERFILE_ENV_COMMANDS) | |
185 | + foreach(_arg "${RUNTIME_LIBRARIES_ENVIRONMENT}" ${ENVIRONMENT}) | |
186 | + string(CONFIGURE | |
187 | + "@USERFILE_ENVIRONMENT@@LAUNCHER_LINESEP@@_arg@" | |
188 | + USERFILE_ENVIRONMENT | |
189 | + @ONLY) | |
190 | + string(CONFIGURE | |
191 | + "@USERFILE_ENV_COMMANDS@${_cmdenv}" | |
192 | + USERFILE_ENV_COMMANDS | |
193 | + @ONLY) | |
194 | + endforeach() | |
195 | +endmacro() | |
196 | + | |
197 | +macro(_launcher_produce_vcproj_user) | |
198 | + if(MSVC) | |
199 | + file(READ | |
200 | + "${_launchermoddir}/perconfig.${VCPROJ_TYPE}.user.in" | |
201 | + _perconfig) | |
202 | + set(USERFILE_CONFIGSECTIONS) | |
203 | + foreach(USERFILE_CONFIGNAME ${CMAKE_CONFIGURATION_TYPES}) | |
204 | + get_target_property(USERFILE_${USERFILE_CONFIGNAME}_COMMAND | |
205 | + ${_targetname} | |
206 | + LOCATION_${USERFILE_CONFIGNAME}) | |
207 | + file(TO_NATIVE_PATH | |
208 | + "${USERFILE_${USERFILE_CONFIGNAME}_COMMAND}" | |
209 | + USERFILE_${USERFILE_CONFIGNAME}_COMMAND) | |
210 | + string(CONFIGURE "${_perconfig}" _temp @ONLY ESCAPE_QUOTES) | |
211 | + string(CONFIGURE | |
212 | + "${USERFILE_CONFIGSECTIONS}${_temp}" | |
213 | + USERFILE_CONFIGSECTIONS | |
214 | + ESCAPE_QUOTES) | |
215 | + endforeach() | |
216 | + | |
217 | + | |
218 | + configure_file("${_launchermoddir}/${VCPROJ_TYPE}.user.in" | |
219 | + ${VCPROJNAME}.${VCPROJ_TYPE}.${USERFILE_EXTENSION} | |
220 | + @ONLY) | |
221 | + endif() | |
222 | + | |
223 | +endmacro() | |
224 | + | |
225 | +macro(_launcher_configure_executable _src _tmp _target) | |
226 | +# get_filename_component(_targetname "${_target}" NAME) | |
227 | + get_filename_component(_targetpath "${_target}" PATH) | |
228 | + configure_file("${_src}" | |
229 | + "${_tmp}" | |
230 | + @ONLY) | |
231 | + file(COPY "${_tmp}" | |
232 | + DESTINATION "${_targetpath}" | |
233 | + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) | |
234 | +endmacro() | |
235 | + | |
236 | +macro(_launcher_create_target_launcher) | |
237 | + if(CMAKE_CONFIGURATION_TYPES) | |
238 | + # Multi-config generator - multiple launchers | |
239 | + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) | |
240 | + get_target_property(USERFILE_${_config}_COMMAND | |
241 | + ${_targetname} | |
242 | + LOCATION_${_config}) | |
243 | + file(TO_NATIVE_PATH | |
244 | + "${USERFILE_${_config}_COMMAND}" | |
245 | + USERFILE_COMMAND) | |
246 | + set(_fn "launch-${_targetname}-${_config}.${_suffix}") | |
247 | + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" | |
248 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_fn}" | |
249 | + "${CMAKE_CURRENT_BINARY_DIR}/${_fn}") | |
250 | + endforeach() | |
251 | + else() | |
252 | + # Single-config generator - single launcher | |
253 | + get_target_property(USERFILE_COMMAND | |
254 | + ${_targetname} | |
255 | + LOCATION) | |
256 | + file(TO_NATIVE_PATH | |
257 | + "${USERFILE_COMMAND}" | |
258 | + USERFILE_COMMAND) | |
259 | + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" | |
260 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-${_targetname}.${_suffix}" | |
261 | + "${CMAKE_CURRENT_BINARY_DIR}/launch-${_targetname}.${_suffix}" | |
262 | + @ONLY) | |
263 | + endif() | |
264 | +endmacro() | |
265 | + | |
266 | +function(create_default_target_launcher _targetname) | |
267 | + _launcher_system_settings() | |
268 | + _launcher_process_args(${ARGN}) | |
269 | + | |
270 | + set(VCPROJNAME "${CMAKE_BINARY_DIR}/ALL_BUILD") | |
271 | + _launcher_produce_vcproj_user() | |
272 | + | |
273 | + _launcher_create_target_launcher() | |
274 | +endfunction() | |
275 | + | |
276 | +function(create_target_launcher _targetname) | |
277 | + _launcher_system_settings() | |
278 | + _launcher_process_args(${ARGN}) | |
279 | + | |
280 | + set(VCPROJNAME "${CMAKE_CURRENT_BINARY_DIR}/${_targetname}") | |
281 | + _launcher_produce_vcproj_user() | |
282 | + | |
283 | + _launcher_create_target_launcher() | |
284 | +endfunction() | |
285 | + | |
286 | +function(create_generic_launcher _launchername) | |
287 | + _launcher_system_settings() | |
288 | + _launcher_process_args(${ARGN}) | |
289 | + | |
290 | + if(NOT IS_ABSOLUTE _launchername) | |
291 | + set(_launchername | |
292 | + "${CMAKE_CURRENT_BINARY_DIR}/${_launchername}.${_suffix}") | |
293 | + else() | |
294 | + set(_launchername "${_launchername}.${_suffix}") | |
295 | + endif() | |
296 | + if(WIN32) | |
297 | + set(GENERIC_LAUNCHER_COMMAND "${_launchername}" PARENT_SCOPE) | |
298 | + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION) | |
299 | + else() | |
300 | + set(GENERIC_LAUNCHER_COMMAND sh "${_launchername}" PARENT_SCOPE) | |
301 | + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION | |
302 | + "Program terminated with signal") | |
303 | + endif() | |
304 | + | |
305 | + _launcher_configure_executable("${_launchermoddir}/genericlauncher.${_suffix}.in" | |
306 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/genericlauncher.${_suffix}.in" | |
307 | + "${_launchername}") | |
308 | +endfunction() | |
309 | + | |
310 | +function(guess_runtime_library_dirs _var) | |
311 | + # Start off with the link directories of the calling listfile's directory | |
312 | + get_directory_property(_libdirs LINK_DIRECTORIES) | |
313 | + | |
314 | + # Add additional libraries passed to the function | |
315 | + foreach(_lib ${ARGN}) | |
316 | + get_filename_component(_libdir "${_lib}" PATH) | |
317 | + list(APPEND _libdirs "${_libdir}") | |
318 | + endforeach() | |
319 | + | |
320 | + # Now, build a list of potential dll directories | |
321 | + set(_dlldirs) | |
322 | + foreach(_libdir ${_libdirs}) | |
323 | + # Add the libdir itself | |
324 | + list(APPEND _dlldirs "${_libdir}") | |
325 | + | |
326 | + # Look also in libdir/../bin since the dll might not be with the lib | |
327 | + get_filename_component(_libdir "${_libdir}/../bin" ABSOLUTE) | |
328 | + list(APPEND _dlldirs "${_libdir}") | |
329 | + endforeach() | |
330 | + | |
331 | + # Only keep the valid, unique directories | |
332 | + clean_directory_list(_dlldirs) | |
333 | + | |
334 | + # Return _dlldirs | |
335 | + set(${_var} "${_dlldirs}" PARENT_SCOPE) | |
336 | +endfunction() |
@@ -1,5 +1,7 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | |
3 | +make_release_only() | |
4 | + | |
3 | 5 | if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
4 | 6 | set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) |
5 | 7 | endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
@@ -1,5 +1,7 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | |
3 | +make_release_only() | |
4 | + | |
3 | 5 | include( CheckFunctionExists ) |
4 | 6 | include( CheckCXXCompilerFlag ) |
5 | 7 |
@@ -1,6 +1,8 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | include( CheckCXXCompilerFlag ) |
3 | 3 | |
4 | +make_release_only() | |
5 | + | |
4 | 6 | # I don't plan on debugging this, so make it a release build. |
5 | 7 | if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) |
6 | 8 | set( CMAKE_BUILD_TYPE "RelWithDebInfo" ) |
@@ -1,5 +1,7 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | |
3 | +make_release_only() | |
4 | + | |
3 | 5 | if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
4 | 6 | set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) |
5 | 7 | endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
@@ -0,0 +1,14 @@ | ||
1 | +cd @USERFILE_WORKING_DIRECTORY@ | |
2 | +@USERFILE_ENV_COMMANDS@ | |
3 | + | |
4 | +IF NOT [x%1]==[x--debugger] GOTO SkipDebuggingMess | |
5 | + | |
6 | +ECHO Need to ditch the debugger! | |
7 | +SHIFT /1 | |
8 | +%1 %2 %3 %4 %5 %6 %7 %8 %9 | |
9 | +GOTO EOF | |
10 | + | |
11 | +:SkipDebuggingMess | |
12 | +%* | |
13 | + | |
14 | +:EOF | |
\ No newline at end of file |
@@ -0,0 +1,1 @@ | ||
1 | +set @_arg@ |
@@ -0,0 +1,28 @@ | ||
1 | + <Configuration | |
2 | + Name="@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@" | |
3 | + > | |
4 | + <DebugSettings | |
5 | + Command="${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}" | |
6 | + WorkingDirectory="@USERFILE_WORKING_DIRECTORY@" | |
7 | + CommandArguments="@USERFILE_COMMAND_ARGUMENTS@" | |
8 | + Attach="false" | |
9 | + DebuggerType="3" | |
10 | + Remote="1" | |
11 | + RemoteMachine="@USERFILE_REMOTE_MACHINE@" | |
12 | + RemoteCommand="" | |
13 | + HttpUrl="" | |
14 | + PDBPath="" | |
15 | + SQLDebugging="" | |
16 | + Environment="@USERFILE_ENVIRONMENT@" | |
17 | + EnvironmentMerge="true" | |
18 | + DebuggerFlavor="" | |
19 | + MPIRunCommand="" | |
20 | + MPIRunArguments="" | |
21 | + MPIRunWorkingDirectory="" | |
22 | + ApplicationCommand="" | |
23 | + ApplicationArguments="" | |
24 | + ShimCommand="" | |
25 | + MPIAcceptMode="" | |
26 | + MPIAcceptFilter="" | |
27 | + /> | |
28 | + </Configuration> |
@@ -0,0 +1,7 @@ | ||
1 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@'"> | |
2 | + <LocalDebuggerEnvironment>@USERFILE_ENVIRONMENT@</LocalDebuggerEnvironment> | |
3 | + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | |
4 | + <LocalDebuggerCommand>${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}</LocalDebuggerCommand> | |
5 | + <LocalDebuggerCommandArguments>@USERFILE_COMMAND_ARGUMENTS@</LocalDebuggerCommandArguments> | |
6 | + <LocalDebuggerWorkingDirectory>@USERFILE_WORKING_DIRECTORY@</LocalDebuggerWorkingDirectory> | |
7 | + </PropertyGroup> |
@@ -0,0 +1,8 @@ | ||
1 | +cd @USERFILE_WORKING_DIRECTORY@ | |
2 | +@USERFILE_ENV_COMMANDS@ | |
3 | +if [%1]==[--debugger] ( | |
4 | + SHIFT | |
5 | +) | |
6 | + | |
7 | +"@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@ | |
8 | +pause |
@@ -0,0 +1,10 @@ | ||
1 | +<?xml version="1.0" encoding="Windows-1252"?> | |
2 | +<VisualStudioUserFile | |
3 | + ProjectType="Visual C++" | |
4 | + Version="@USERFILE_VC_VERSION@" | |
5 | + ShowAllFiles="false" | |
6 | + > | |
7 | + <Configurations> | |
8 | +@USERFILE_CONFIGSECTIONS@ | |
9 | + </Configurations> | |
10 | +</VisualStudioUserFile> |
@@ -0,0 +1,4 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | +@USERFILE_CONFIGSECTIONS@ | |
4 | +</Project> |
@@ -1,5 +1,7 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | |
3 | +make_release_only() | |
4 | + | |
3 | 5 | if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
4 | 6 | set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) |
5 | 7 | endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" ) |
@@ -31,7 +31,7 @@ | ||
31 | 31 | endif( RELEASE_WITH_DEBUG_FILE ) |
32 | 32 | endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
33 | 33 | |
34 | -option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ) | |
34 | +option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ON ) | |
35 | 35 | |
36 | 36 | if( CMAKE_SIZEOF_VOID_P MATCHES "8" ) |
37 | 37 | set( X64 64 ) |
@@ -83,10 +83,11 @@ | ||
83 | 83 | set( FMOD_SEARCH_PATHS |
84 | 84 | "C:/Program Files/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api" |
85 | 85 | "C:/Program Files (x86)/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api" |
86 | - "E:/Program Files (x86)/FMOD SoundSystem/FMOD Programmers API ${WIN_TYPE}/api" | |
87 | - # This next one is for me. | |
86 | + # This next one is for Randy. | |
87 | + "E:/Software/Dev/FMOD/${WIN_TYPE}/api" | |
88 | + # .. and this one for Graf Zahl | |
88 | 89 | "D:/portable/FMOD SoundSystem 4.26/FMOD Programmers API WIN32/api" |
89 | - "E:/Software/Dev/FMOD/${WIN_TYPE}/api" ) | |
90 | + ) | |
90 | 91 | set( FMOD_INC_PATH_SUFFIXES PATH_SUFFIXES inc ) |
91 | 92 | set( FMOD_LIB_PATH_SUFFIXES PATH_SUFFIXES lib ) |
92 | 93 | set( NASM_NAMES nasmw nasm ) |
@@ -1382,10 +1383,49 @@ | ||
1382 | 1383 | |
1383 | 1384 | add_dependencies( zdoom revision_check ) |
1384 | 1385 | |
1385 | -# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4. | |
1386 | -# Linux distributions are slow to adopt 2.6. :( | |
1387 | -set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1388 | -set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} ) | |
1386 | +# Due to some quirks, we need to do this in this order | |
1387 | +if( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS ) | |
1388 | + # RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4. | |
1389 | + # Linux distributions are slow to adopt 2.6. :( | |
1390 | + set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1391 | + set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} ) | |
1392 | +endif( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS ) | |
1393 | + | |
1394 | +if( MSVC ) | |
1395 | + option( ZDOOM_GENERATE_MAPFILE "Generate .map file for debugging." OFF ) | |
1396 | + if( ZDOOM_GENERATE_MAPFILE ) | |
1397 | + set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP:${ZDOOM_EXE_NAME}.map") | |
1398 | + else( ZDOOM_GENERATE_MAPFILE ) | |
1399 | + set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"") | |
1400 | + endif( ZDOOM_GENERATE_MAPFILE ) | |
1401 | + | |
1402 | + add_custom_command(TARGET zdoom POST_BUILD | |
1403 | + COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2 | |
1404 | + COMMENT "Adding manifest..." | |
1405 | + ) | |
1406 | + | |
1407 | + create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1408 | +endif( MSVC ) | |
1409 | + | |
1410 | +if( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSIONS ) | |
1411 | + set_target_properties( zdoom PROPERTIES | |
1412 | + RUNTIME_OUTPUT_NAME ${ZDOOM_EXE_NAME} | |
1413 | + RUNTIME_OUTPUT_NAME_DEBUG ${ZDOOM_EXE_NAME}d | |
1414 | + RUNTIME_OUTPUT_NAME_MINSIZEREL ${ZDOOM_EXE_NAME}msr | |
1415 | + RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${ZDOOM_EXE_NAME}rd | |
1416 | + ) | |
1417 | + | |
1418 | + if( ZDOOM_GENERATE_MAPFILE ) | |
1419 | + add_custom_command(TARGET zdoom POST_BUILD | |
1420 | + COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zdoom> ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom> | |
1421 | + COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE_DIR:zdoom>/zdoom.map ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom>.map | |
1422 | + COMMENT "Copying to output directory..." ) | |
1423 | + else( ZDOOM_GENERATE_MAPFILE ) | |
1424 | + add_custom_command(TARGET zdoom POST_BUILD | |
1425 | + COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zdoom> ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom> | |
1426 | + COMMENT "Copying to output directory..." ) | |
1427 | + endif( ZDOOM_GENERATE_MAPFILE ) | |
1428 | +endif( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSIONS ) | |
1389 | 1429 | |
1390 | 1430 | if( NOT WIN32 ) |
1391 | 1431 | 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" ) |
@@ -1403,14 +1443,6 @@ | ||
1403 | 1443 | endif( SSE_MATTERS ) |
1404 | 1444 | endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
1405 | 1445 | |
1406 | -if( MSVC ) | |
1407 | - set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO") | |
1408 | - add_custom_command(TARGET zdoom POST_BUILD | |
1409 | - COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2 | |
1410 | - COMMENT "Adding manifest..." | |
1411 | - ) | |
1412 | -endif( MSVC ) | |
1413 | - | |
1414 | 1446 | # [EP] |
1415 | 1447 | if ( RELEASE_WITH_DEBUG_FILE ) |
1416 | 1448 | add_custom_command(TARGET zdoom POST_BUILD |
@@ -889,6 +889,10 @@ | ||
889 | 889 | return (PalEntry)GetClass()->Meta.GetMetaInt(AMETA_BloodColor); |
890 | 890 | } |
891 | 891 | |
892 | + // These also set CF_INTERPVIEW for players. | |
893 | + void SetPitch(int p); | |
894 | + void SetAngle(angle_t ang); | |
895 | + | |
892 | 896 | const PClass *GetBloodType(int type = 0) const |
893 | 897 | { |
894 | 898 | const PClass *bloodcls; |
@@ -653,7 +653,14 @@ | ||
653 | 653 | } |
654 | 654 | else |
655 | 655 | { |
656 | - new DStoredCommand (com, beg); | |
656 | + if (len == 4 && strnicmp(beg, "warp", 4) == 0) | |
657 | + { | |
658 | + StoredWarp = beg; | |
659 | + } | |
660 | + else | |
661 | + { | |
662 | + new DStoredCommand (com, beg); | |
663 | + } | |
657 | 664 | } |
658 | 665 | } |
659 | 666 | else |
@@ -245,6 +245,7 @@ | ||
245 | 245 | bool singletics = false; // debug flag to cancel adaptiveness |
246 | 246 | FString startmap; |
247 | 247 | bool autostart; |
248 | +FString StoredWarp; | |
248 | 249 | bool advancedemo; |
249 | 250 | FILE *debugfile; |
250 | 251 | event_t events[MAXEVENTS]; |
@@ -2572,7 +2573,7 @@ | ||
2572 | 2573 | else |
2573 | 2574 | startmap = "&wt@01"; |
2574 | 2575 | } |
2575 | - autostart = false; | |
2576 | + autostart = StoredWarp.IsNotEmpty(); | |
2576 | 2577 | |
2577 | 2578 | const char *val = Args->CheckValue ("-skill"); |
2578 | 2579 | if (val) |
@@ -3132,6 +3133,11 @@ | ||
3132 | 3133 | if (demorecording) |
3133 | 3134 | G_BeginRecording (startmap); |
3134 | 3135 | G_InitNew (startmap, false); |
3136 | + if (StoredWarp.IsNotEmpty()) | |
3137 | + { | |
3138 | + AddCommandString(StoredWarp.LockBuffer()); | |
3139 | + StoredWarp = NULL; | |
3140 | + } | |
3135 | 3141 | } |
3136 | 3142 | else if ( NETWORK_GetState( ) != NETSTATE_CLIENT ) |
3137 | 3143 | { |
@@ -232,6 +232,7 @@ | ||
232 | 232 | CF_TOTALLYFROZEN = 1 << 12, // [RH] All players can do is press +use |
233 | 233 | // [BC] We don't use CF_PREDICTING in ST. |
234 | 234 | //CF_PREDICTING = 1 << 13, // [RH] Player movement is being predicted |
235 | + CF_INTERPVIEW = 1 << 14, // [RH] view was changed outside of input, so interpolate one frame | |
235 | 236 | CF_DRAIN = 1 << 16, // Player owns a drain powerup |
236 | 237 | CF_HIGHJUMP = 1 << 18, // more Skulltag flags. Implementation not guaranteed though. ;) |
237 | 238 | CF_REFLECTION = 1 << 19, |
@@ -59,6 +59,8 @@ | ||
59 | 59 | |
60 | 60 | extern bool autostart; |
61 | 61 | |
62 | +extern FString StoredWarp; // [RH] +warp at the command line | |
63 | + | |
62 | 64 | // Selected by user. |
63 | 65 | EXTERN_CVAR (Int, gameskill); |
64 | 66 | extern int NextSkill; // [RH] Skill to use at next level load |
@@ -58,12 +58,12 @@ | ||
58 | 58 | { |
59 | 59 | DECLARE_CLASS (AFSwordMissile, AActor) |
60 | 60 | public: |
61 | - int DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype); | |
61 | + int DoSpecialDamage(AActor *victim, int damage, FName damagetype); | |
62 | 62 | }; |
63 | 63 | |
64 | 64 | IMPLEMENT_CLASS (AFSwordMissile) |
65 | 65 | |
66 | -int AFSwordMissile::DoSpecialDamage(AActor *victim, AActor *source, int damage, FName damagetype) | |
66 | +int AFSwordMissile::DoSpecialDamage(AActor *victim, int damage, FName damagetype) | |
67 | 67 | { |
68 | 68 | if (victim->player) |
69 | 69 | { |
@@ -9404,10 +9404,13 @@ | ||
9404 | 9404 | if (STACK(2) == 0) |
9405 | 9405 | { |
9406 | 9406 | if (activator != NULL) |
9407 | - activator->angle = STACK(1) << 16; | |
9408 | - // [BB] Tell the clients about the changed angle. | |
9409 | - if( NETWORK_GetState() == NETSTATE_SERVER ) | |
9410 | - SERVERCOMMANDS_SetThingAngleExact( activator ); | |
9407 | + { | |
9408 | + activator->SetAngle(STACK(1) << 16); | |
9409 | + | |
9410 | + // [BB] Tell the clients about the changed angle. | |
9411 | + if( NETWORK_GetState() == NETSTATE_SERVER ) | |
9412 | + SERVERCOMMANDS_SetThingAngleExact( activator ); | |
9413 | + } | |
9411 | 9414 | } |
9412 | 9415 | else |
9413 | 9416 | { |
@@ -9416,7 +9419,7 @@ | ||
9416 | 9419 | |
9417 | 9420 | while ( (actor = iterator.Next ()) ) |
9418 | 9421 | { |
9419 | - actor->angle = STACK(1) << 16; | |
9422 | + actor->SetAngle(STACK(1) << 16); | |
9420 | 9423 | // [BB] Tell the clients about the changed angle. |
9421 | 9424 | // This fixes the "rave room" in SPACEDM5.wad. |
9422 | 9425 | if( NETWORK_GetState() == NETSTATE_SERVER ) |
@@ -9430,11 +9433,13 @@ | ||
9430 | 9433 | if (STACK(2) == 0) |
9431 | 9434 | { |
9432 | 9435 | if (activator != NULL) |
9433 | - activator->pitch = STACK(1) << 16; | |
9434 | - | |
9435 | - // [BB] Tell the clients about the changed pitch. | |
9436 | - if( NETWORK_GetState() == NETSTATE_SERVER ) | |
9437 | - SERVERCOMMANDS_MoveThingExact( activator, CM_PITCH ); | |
9436 | + { | |
9437 | + activator->SetPitch(STACK(1) << 16); | |
9438 | + | |
9439 | + // [BB] Tell the clients about the changed pitch. | |
9440 | + if( NETWORK_GetState() == NETSTATE_SERVER ) | |
9441 | + SERVERCOMMANDS_MoveThingExact( activator, CM_PITCH ); | |
9442 | + } | |
9438 | 9443 | } |
9439 | 9444 | else |
9440 | 9445 | { |
@@ -9443,7 +9448,7 @@ | ||
9443 | 9448 | |
9444 | 9449 | while ( (actor = iterator.Next ()) ) |
9445 | 9450 | { |
9446 | - actor->pitch = STACK(1) << 16; | |
9451 | + actor->SetPitch(STACK(1) << 16); | |
9447 | 9452 | |
9448 | 9453 | // [BB] Tell the clients about the changed pitch. |
9449 | 9454 | if( NETWORK_GetState() == NETSTATE_SERVER ) |
@@ -3881,6 +3881,30 @@ | ||
3881 | 3881 | fillcolor = MAKEARGB(ColorMatcher.Pick (r, g, b), r, g, b); |
3882 | 3882 | } |
3883 | 3883 | |
3884 | +void AActor::SetPitch(int p) | |
3885 | +{ | |
3886 | + if (p != pitch) | |
3887 | + { | |
3888 | + pitch = p; | |
3889 | + if (player != NULL) | |
3890 | + { | |
3891 | + player->cheats |= CF_INTERPVIEW; | |
3892 | + } | |
3893 | + } | |
3894 | +} | |
3895 | + | |
3896 | +void AActor::SetAngle(angle_t ang) | |
3897 | +{ | |
3898 | + if (ang != angle) | |
3899 | + { | |
3900 | + angle = ang; | |
3901 | + if (player != NULL) | |
3902 | + { | |
3903 | + player->cheats |= CF_INTERPVIEW; | |
3904 | + } | |
3905 | + } | |
3906 | +} | |
3907 | + | |
3884 | 3908 | // |
3885 | 3909 | // P_MobjThinker |
3886 | 3910 | // |
@@ -3502,6 +3502,9 @@ | ||
3502 | 3502 | player->inventorytics--; |
3503 | 3503 | } |
3504 | 3504 | } |
3505 | + // Don't interpolate the view for more than one tic | |
3506 | + player->cheats &= ~CF_INTERPVIEW; | |
3507 | + | |
3505 | 3508 | // No-clip cheat |
3506 | 3509 | if ((player->cheats & (CF_NOCLIP | CF_NOCLIP2)) == CF_NOCLIP2) |
3507 | 3510 | { // No noclip2 without noclip |
@@ -586,6 +586,7 @@ | ||
586 | 586 | // [BC] This makes the mouse incredibly jerky for client games. |
587 | 587 | /* |
588 | 588 | if (player != NULL && |
589 | + !(player->cheats & CF_INTERPVIEW) && | |
589 | 590 | player - players == consoleplayer && |
590 | 591 | camera == player->mo && |
591 | 592 | !demoplayback && |
@@ -659,6 +659,17 @@ | ||
659 | 659 | sc.UnGet (); |
660 | 660 | } |
661 | 661 | } |
662 | + if (sc.GetString()) | |
663 | + { | |
664 | + if (sc.Compare("WorldPanning")) | |
665 | + { | |
666 | + viewer->bWorldPanning = true; | |
667 | + } | |
668 | + else | |
669 | + { | |
670 | + sc.UnGet(); | |
671 | + } | |
672 | + } | |
662 | 673 | viewer->SetScaledSize(fitwidth, fitheight); |
663 | 674 | } |
664 | 675 |
@@ -4737,7 +4737,7 @@ | ||
4737 | 4737 | { |
4738 | 4738 | ACTION_PARAM_START(1); |
4739 | 4739 | ACTION_PARAM_ANGLE(angle, 0); |
4740 | - self->angle = angle; | |
4740 | + self->SetAngle(angle); | |
4741 | 4741 | } |
4742 | 4742 | |
4743 | 4743 | //=========================================================================== |
@@ -4775,8 +4775,7 @@ | ||
4775 | 4775 | } |
4776 | 4776 | pitch = clamp<int>(pitch, min, max); |
4777 | 4777 | } |
4778 | - | |
4779 | - self->pitch = pitch; | |
4778 | + self->SetPitch(pitch); | |
4780 | 4779 | } |
4781 | 4780 | |
4782 | 4781 | //=========================================================================== |
@@ -1,6 +1,8 @@ | ||
1 | 1 | cmake_minimum_required(VERSION 2.4.4) |
2 | 2 | set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) |
3 | 3 | |
4 | +make_release_only() | |
5 | + | |
4 | 6 | project(zlib C) |
5 | 7 | |
6 | 8 | set(VERSION "1.2.7") |