mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
- enable fast floating point math in the subprojects that can benefit from it: dumb, gme and gdtoa.
This commit is contained in:
parent
d25455736a
commit
e6328c8432
4 changed files with 11 additions and 2 deletions
|
@ -14,6 +14,10 @@ if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||||
endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
|
endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( MSVC )
|
||||||
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:fast" )
|
||||||
|
endif()
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS )
|
CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS )
|
||||||
if( NOT ITOA_EXISTS )
|
if( NOT ITOA_EXISTS )
|
||||||
add_definitions( -DNEED_ITOA=1 )
|
add_definitions( -DNEED_ITOA=1 )
|
||||||
|
|
|
@ -29,6 +29,11 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( MSVC )
|
||||||
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:fast" )
|
||||||
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Default emulators to build (all of them! ;)
|
# Default emulators to build (all of them! ;)
|
||||||
if (NOT DEFINED USE_GME_AY)
|
if (NOT DEFINED USE_GME_AY)
|
||||||
|
|
|
@ -5,7 +5,7 @@ set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
||||||
# Disable warnings for << operator precedence (4554) and
|
# Disable warnings for << operator precedence (4554) and
|
||||||
# unreferenced labels (4102) from VC
|
# unreferenced labels (4102) from VC
|
||||||
if( MSVC )
|
if( MSVC )
|
||||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4554 /wd4102 /fp:fast" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||||
|
|
|
@ -332,7 +332,7 @@ int APoisonCloud::DoSpecialDamage (AActor *victim, int damage, FName damagetype)
|
||||||
int damage = 15 + (pr_poisoncloudd()&15);
|
int damage = 15 + (pr_poisoncloudd()&15);
|
||||||
if (mate)
|
if (mate)
|
||||||
{
|
{
|
||||||
damage = (int)((float)damage * level.teamdamage);
|
damage = (int)((double)damage * level.teamdamage);
|
||||||
}
|
}
|
||||||
// Handle passive damage modifiers (e.g. PowerProtection)
|
// Handle passive damage modifiers (e.g. PowerProtection)
|
||||||
if (victim->Inventory != NULL)
|
if (victim->Inventory != NULL)
|
||||||
|
|
Loading…
Reference in a new issue