mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 16:07:55 +00:00
Merge branch 'maint' into maint_1.8
Conflicts: wadsrc/CMakeLists.txt
This commit is contained in:
commit
05a95f0ed0
8 changed files with 78 additions and 49 deletions
|
@ -1,6 +1,39 @@
|
||||||
cmake_minimum_required( VERSION 2.4 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
project(GZDoom)
|
project(GZDoom)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
option( NO_GENERATOR_EXPRESSIONS "Disable generator expressions (for building pk3s with IDEs)." OFF )
|
||||||
|
else(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
|
||||||
|
set( NO_GENERATOR_EXPRESSIONS ON )
|
||||||
|
endif(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7)
|
||||||
|
|
||||||
|
# Simplify pk3 building, add_pk3(filename srcdirectory)
|
||||||
|
function( add_pk3 PK3_NAME PK3_DIR )
|
||||||
|
get_target_property(ZIPDIR_EXE zipdir LOCATION)
|
||||||
|
|
||||||
|
# Generate target name. Just use "pk3" for main pk3 target.
|
||||||
|
string( REPLACE "." "_" PK3_TARGET ${PK3_NAME} )
|
||||||
|
if( ${PK3_TARGET} STREQUAL "zdoom_pk3" )
|
||||||
|
set( PK3_TARGET "pk3" )
|
||||||
|
endif( ${PK3_TARGET} STREQUAL "zdoom_pk3" )
|
||||||
|
|
||||||
|
if( NO_GENERATOR_EXPRESSIONS )
|
||||||
|
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( NO_GENERATOR_EXPRESSIONS )
|
||||||
|
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( NO_GENERATOR_EXPRESSIONS )
|
||||||
|
|
||||||
|
add_custom_target( ${PK3_TARGET} ALL
|
||||||
|
DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} )
|
||||||
|
endfunction( add_pk3 )
|
||||||
|
|
||||||
IF( NOT CMAKE_BUILD_TYPE )
|
IF( NOT CMAKE_BUILD_TYPE )
|
||||||
SET( CMAKE_BUILD_TYPE Debug CACHE STRING
|
SET( CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||||
|
|
|
@ -10,7 +10,12 @@ include( CheckCXXCompilerFlag )
|
||||||
include( FindPkgConfig )
|
include( FindPkgConfig )
|
||||||
include( FindOpenGL )
|
include( FindOpenGL )
|
||||||
|
|
||||||
option( NO_ASM "Disable assembly code" )
|
if( NOT APPLE )
|
||||||
|
option( NO_ASM "Disable assembly code" OFF )
|
||||||
|
else( NOT APPLE )
|
||||||
|
# At the moment asm code doesn't work with OS X, so disable by default
|
||||||
|
option( NO_ASM "Disable assembly code" ON )
|
||||||
|
endif( NOT APPLE )
|
||||||
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||||
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
||||||
# At least some versions of Xcode fail if you strip with the linker
|
# At least some versions of Xcode fail if you strip with the linker
|
||||||
|
|
|
@ -92,8 +92,8 @@ private:
|
||||||
|
|
||||||
struct FActionMap
|
struct FActionMap
|
||||||
{
|
{
|
||||||
unsigned int Key; // value from passing Name to MakeKey()
|
|
||||||
FButtonStatus *Button;
|
FButtonStatus *Button;
|
||||||
|
unsigned int Key; // value from passing Name to MakeKey()
|
||||||
char Name[12];
|
char Name[12];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,38 +134,38 @@ bool ParsingKeyConf;
|
||||||
|
|
||||||
FActionMap ActionMaps[] =
|
FActionMap ActionMaps[] =
|
||||||
{
|
{
|
||||||
{ 0x0d52d67b, &Button_AM_PanLeft, "am_panleft"},
|
{ &Button_AM_PanLeft, 0x0d52d67b, "am_panleft"},
|
||||||
{ 0x125f5226, &Button_User2, "user2" },
|
{ &Button_User2, 0x125f5226, "user2" },
|
||||||
{ 0x1eefa611, &Button_Jump, "jump" },
|
{ &Button_Jump, 0x1eefa611, "jump" },
|
||||||
{ 0x201f1c55, &Button_Right, "right" },
|
{ &Button_Right, 0x201f1c55, "right" },
|
||||||
{ 0x20ccc4d5, &Button_Zoom, "zoom" },
|
{ &Button_Zoom, 0x20ccc4d5, "zoom" },
|
||||||
{ 0x23a99cd7, &Button_Back, "back" },
|
{ &Button_Back, 0x23a99cd7, "back" },
|
||||||
{ 0x41df90c2, &Button_AM_ZoomIn, "am_zoomin"},
|
{ &Button_AM_ZoomIn, 0x41df90c2, "am_zoomin"},
|
||||||
{ 0x426b69e7, &Button_Reload, "reload" },
|
{ &Button_Reload, 0x426b69e7, "reload" },
|
||||||
{ 0x4463f43a, &Button_LookDown, "lookdown" },
|
{ &Button_LookDown, 0x4463f43a, "lookdown" },
|
||||||
{ 0x51f7a334, &Button_AM_ZoomOut, "am_zoomout"},
|
{ &Button_AM_ZoomOut, 0x51f7a334, "am_zoomout"},
|
||||||
{ 0x534c30ee, &Button_User4, "user4" },
|
{ &Button_User4, 0x534c30ee, "user4" },
|
||||||
{ 0x5622bf42, &Button_Attack, "attack" },
|
{ &Button_Attack, 0x5622bf42, "attack" },
|
||||||
{ 0x577712d0, &Button_User1, "user1" },
|
{ &Button_User1, 0x577712d0, "user1" },
|
||||||
{ 0x57c25cb2, &Button_Klook, "klook" },
|
{ &Button_Klook, 0x57c25cb2, "klook" },
|
||||||
{ 0x59f3e907, &Button_Forward, "forward" },
|
{ &Button_Forward, 0x59f3e907, "forward" },
|
||||||
{ 0x6167ce99, &Button_MoveDown, "movedown" },
|
{ &Button_MoveDown, 0x6167ce99, "movedown" },
|
||||||
{ 0x676885b8, &Button_AltAttack, "altattack" },
|
{ &Button_AltAttack, 0x676885b8, "altattack" },
|
||||||
{ 0x6fa41b84, &Button_MoveLeft, "moveleft" },
|
{ &Button_MoveLeft, 0x6fa41b84, "moveleft" },
|
||||||
{ 0x818f08e6, &Button_MoveRight, "moveright" },
|
{ &Button_MoveRight, 0x818f08e6, "moveright" },
|
||||||
{ 0x8197097b, &Button_AM_PanRight, "am_panright"},
|
{ &Button_AM_PanRight, 0x8197097b, "am_panright"},
|
||||||
{ 0x8d89955e, &Button_AM_PanUp, "am_panup"} ,
|
{ &Button_AM_PanUp, 0x8d89955e, "am_panup"} ,
|
||||||
{ 0xa2b62d8b, &Button_Mlook, "mlook" },
|
{ &Button_Mlook, 0xa2b62d8b, "mlook" },
|
||||||
{ 0xab2c3e71, &Button_Crouch, "crouch" },
|
{ &Button_Crouch, 0xab2c3e71, "crouch" },
|
||||||
{ 0xb000b483, &Button_Left, "left" },
|
{ &Button_Left, 0xb000b483, "left" },
|
||||||
{ 0xb62b1e49, &Button_LookUp, "lookup" },
|
{ &Button_LookUp, 0xb62b1e49, "lookup" },
|
||||||
{ 0xb6f8fe92, &Button_User3, "user3" },
|
{ &Button_User3, 0xb6f8fe92, "user3" },
|
||||||
{ 0xb7e6a54b, &Button_Strafe, "strafe" },
|
{ &Button_Strafe, 0xb7e6a54b, "strafe" },
|
||||||
{ 0xce301c81, &Button_AM_PanDown, "am_pandown"},
|
{ &Button_AM_PanDown, 0xce301c81, "am_pandown"},
|
||||||
{ 0xd5897c73, &Button_ShowScores, "showscores" },
|
{ &Button_ShowScores, 0xd5897c73, "showscores" },
|
||||||
{ 0xe0ccb317, &Button_Speed, "speed" },
|
{ &Button_Speed, 0xe0ccb317, "speed" },
|
||||||
{ 0xe0cfc260, &Button_Use, "use" },
|
{ &Button_Use, 0xe0cfc260, "use" },
|
||||||
{ 0xfdd701c7, &Button_MoveUp, "moveup" },
|
{ &Button_MoveUp, 0xfdd701c7, "moveup" },
|
||||||
};
|
};
|
||||||
#define NUM_ACTIONS countof(ActionMaps)
|
#define NUM_ACTIONS countof(ActionMaps)
|
||||||
|
|
||||||
|
|
|
@ -713,7 +713,7 @@ void D_WriteUserInfoStrings (int pnum, BYTE **stream, bool compact)
|
||||||
|
|
||||||
if (!compact)
|
if (!compact)
|
||||||
{ // In verbose mode, prepend the cvar's name
|
{ // In verbose mode, prepend the cvar's name
|
||||||
*stream += sprintf(*((char **)stream), "\\%s\\", pair->Key.GetChars());
|
*stream += sprintf(*((char **)stream), "\\%s", pair->Key.GetChars());
|
||||||
}
|
}
|
||||||
// A few of these need special handling for compatibility reasons.
|
// A few of these need special handling for compatibility reasons.
|
||||||
switch (pair->Key.GetIndex())
|
switch (pair->Key.GetIndex())
|
||||||
|
|
|
@ -5025,7 +5025,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
||||||
{
|
{
|
||||||
S_Sound(spot, chan, sid, vol, atten);
|
S_Sound(spot, chan, sid, vol, atten);
|
||||||
}
|
}
|
||||||
else if (!S_IsActorPlayingSomething(spot, chan, sid))
|
else if (!S_IsActorPlayingSomething(spot, chan & 7, sid))
|
||||||
{
|
{
|
||||||
S_Sound(spot, chan | CHAN_LOOP, sid, vol, atten);
|
S_Sound(spot, chan | CHAN_LOOP, sid, vol, atten);
|
||||||
}
|
}
|
||||||
|
|
|
@ -763,7 +763,7 @@ protected:
|
||||||
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
|
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
|
||||||
int usespecials);
|
int usespecials);
|
||||||
friend bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
friend bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
||||||
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower=false);
|
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower);
|
||||||
friend bool EV_FloorCrushStop (int tag);
|
friend bool EV_FloorCrushStop (int tag);
|
||||||
friend bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
|
friend bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
|
||||||
private:
|
private:
|
||||||
|
@ -774,7 +774,7 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line,
|
||||||
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
|
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
|
||||||
int usespecials);
|
int usespecials);
|
||||||
bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
||||||
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower);
|
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower=false);
|
||||||
bool EV_FloorCrushStop (int tag);
|
bool EV_FloorCrushStop (int tag);
|
||||||
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
|
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
|
||||||
|
|
||||||
|
|
|
@ -1683,7 +1683,7 @@ bool S_GetSoundPlayingInfo (const FPolyObj *poly, int sound_id)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool S_IsChannelUsed(AActor *actor, int channel, int *seen)
|
static bool S_IsChannelUsed(AActor *actor, int channel, int *seen)
|
||||||
{
|
{
|
||||||
if (*seen & (1 << channel))
|
if (*seen & (1 << channel))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
cmake_minimum_required( VERSION 2.4 )
|
cmake_minimum_required( VERSION 2.4 )
|
||||||
|
|
||||||
get_target_property(ZIPDIR_EXE zipdir LOCATION)
|
add_pk3(gzdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static)
|
||||||
|
|
||||||
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/gzdoom.pk3
|
|
||||||
COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/gzdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZDOOM_OUTPUT_DIR}/gzdoom.pk3 $<TARGET_FILE_DIR:zdoom>
|
|
||||||
DEPENDS zipdir ${CMAKE_CURRENT_SOURCE_DIR}/static )
|
|
||||||
|
|
||||||
add_custom_target( pk3 ALL
|
|
||||||
DEPENDS ${ZDOOM_OUTPUT_DIR}/gzdoom.pk3 )
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue