This commit is contained in:
Christoph Oelckers 2013-11-30 01:34:10 +01:00
commit 3fbcfa7551
4 changed files with 27 additions and 31 deletions

View file

@ -27,14 +27,17 @@ function( add_pk3 PK3_NAME PK3_DIR )
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>/${PK3_NAME}
DEPENDS zipdir ${PK3_DIR} )
DEPENDS zipdir )
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} )
DEPENDS zipdir )
endif( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE )
# Touch the zipdir executable here so that the pk3s are forced to rebuild
# each time since their dependecy has "changed."
add_custom_target( ${PK3_TARGET} ALL
COMMAND ${CMAKE_COMMAND} -E touch ${ZIPDIR_EXE}
DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} )
endfunction( add_pk3 )

View file

@ -1212,16 +1212,23 @@ if( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS )
# 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} )
else( NOT ZDOOM_OUTPUT_OLDSTYLE OR NO_GENERATOR_EXPRESSIONS )
set_target_properties( zdoom PROPERTIES
RUNTIME_OUTPUT_NAME ${ZDOOM_EXE_NAME}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${ZDOOM_OUTPUT_DIR}
RUNTIME_OUTPUT_NAME_DEBUG ${ZDOOM_EXE_NAME}d
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${ZDOOM_OUTPUT_DIR}
RUNTIME_OUTPUT_NAME_MINSIZEREL ${ZDOOM_EXE_NAME}msr
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${ZDOOM_OUTPUT_DIR}
RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${ZDOOM_EXE_NAME}rd
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${ZDOOM_OUTPUT_DIR}
)
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 )
if( NOT MSVC80 )
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP:\"$(TargetDir)${ZDOOM_EXE_NAME}.map\"")
else( NOT MSVC80 ) # 2005 doesn't support naming the map file.
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP")
endif( NOT MSVC80 )
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP")
else( ZDOOM_GENERATE_MAPFILE )
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"")
endif( ZDOOM_GENERATE_MAPFILE )
@ -1234,26 +1241,6 @@ if( MSVC )
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_EXE_NAME}.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" )
add_custom_command( TARGET zdoom POST_BUILD

View file

@ -89,6 +89,11 @@ CVAR (Bool, r_deathcamera, false, CVAR_ARCHIVE)
CVAR (Int, r_clearbuffer, 0, 0)
CVAR (Bool, r_drawvoxels, true, 0)
CVAR (Bool, r_drawplayersprites, true, 0) // [RH] Draw player sprites?
CUSTOM_CVAR(Float, r_quakeintensity, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
if (self < 0.f) self = 0.f;
else if (self > 1.f) self = 1.f;
}
DCanvas *RenderTarget; // [RH] canvas to render to
@ -837,10 +842,10 @@ void R_SetupFrame (AActor *actor)
int intensity = DEarthquake::StaticGetQuakeIntensity (camera);
if (intensity != 0)
{
viewx += ((pr_torchflicker() % (intensity<<2))
-(intensity<<1))<<FRACBITS;
viewy += ((pr_torchflicker() % (intensity<<2))
-(intensity<<1))<<FRACBITS;
fixed_t quakefactor = FLOAT2FIXED(r_quakeintensity);
viewx += quakefactor * ((pr_torchflicker() % (intensity<<2)) - (intensity<<1));
viewy += quakefactor * ((pr_torchflicker() % (intensity<<2)) - (intensity<<1));
}
}

View file

@ -686,6 +686,7 @@ OptionMenu "VideoOptions"
Option "Show player sprites", "r_drawplayersprites", "OnOff"
Option "Death camera", "r_deathcamera", "OnOff"
Option "Teleporter zoom", "telezoom", "OnOff"
Slider "Earthquake shake intensity", "r_quakeintensity", 0.0, 1.0, 0.05, 2
Option "Interpolate monster movement", "nomonsterinterpolation", "NoYes"
}