mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 22:21:05 +00:00
Merge branch 'next' into uncappedrevengeance
This commit is contained in:
commit
69c5da2720
7 changed files with 55 additions and 38 deletions
|
@ -3677,6 +3677,7 @@ udmf
|
||||||
0 = "Add tag";
|
0 = "Add tag";
|
||||||
1 = "Remove tag";
|
1 = "Remove tag";
|
||||||
2 = "Replace first tag";
|
2 = "Replace first tag";
|
||||||
|
3 = "Change trigger tag";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3699,6 +3700,7 @@ udmf
|
||||||
0 = "Add tag";
|
0 = "Add tag";
|
||||||
1 = "Remove tag";
|
1 = "Remove tag";
|
||||||
2 = "Replace first tag";
|
2 = "Replace first tag";
|
||||||
|
3 = "Change trigger tag";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1457,7 +1457,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
||||||
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER))
|
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER))
|
||||||
goopgravity = true;
|
goopgravity = true;
|
||||||
|
|
||||||
gravfactor = P_GetSectorGravityFactor(mo->subsector->sector);
|
gravfactor = P_GetSectorGravityFactor(rover->master->frontsector);
|
||||||
|
|
||||||
if (gravfactor == FRACUNIT)
|
if (gravfactor == FRACUNIT)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -4250,6 +4250,8 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = lines[i].special - 66;
|
lines[i].args[1] = lines[i].special - 66;
|
||||||
lines[i].args[2] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
lines[i].args[2] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
||||||
|
if (lines[i].flags & ML_NOCLIMB)
|
||||||
|
lines[i].args[2] *= -1;
|
||||||
lines[i].special = 66;
|
lines[i].special = 66;
|
||||||
break;
|
break;
|
||||||
case 76: //Make FOF bouncy
|
case 76: //Make FOF bouncy
|
||||||
|
@ -5554,13 +5556,13 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
lines[i].args[1] = 0;
|
lines[i].args[1] = 0;
|
||||||
if (lines[i].flags & ML_NOSKEW)
|
if (lines[i].flags & ML_NOSKEW)
|
||||||
{
|
{
|
||||||
lines[i].args[2] = lines[i].dx >> (FRACBITS + SCROLL_SHIFT);
|
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> (FRACBITS - SCROLL_SHIFT);
|
||||||
lines[i].args[3] = lines[i].dy >> (FRACBITS + SCROLL_SHIFT);
|
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> (FRACBITS - SCROLL_SHIFT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
lines[i].args[2] = lines[i].dx >> FRACBITS;
|
||||||
lines[i].args[3] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
lines[i].args[3] = lines[i].dy >> FRACBITS;
|
||||||
}
|
}
|
||||||
lines[i].args[4] = lines[i].special - 502;
|
lines[i].args[4] = lines[i].special - 502;
|
||||||
lines[i].special = 502;
|
lines[i].special = 502;
|
||||||
|
|
10
src/p_spec.c
10
src/p_spec.c
|
@ -2397,6 +2397,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
default:
|
default:
|
||||||
Tag_SectorFSet(secnum, newtag);
|
Tag_SectorFSet(secnum, newtag);
|
||||||
break;
|
break;
|
||||||
|
case TMT_TRIGGERTAG:
|
||||||
|
sectors[secnum].triggertag = newtag;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2419,6 +2422,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
default:
|
default:
|
||||||
Tag_SectorFSet(secnum, newtag);
|
Tag_SectorFSet(secnum, newtag);
|
||||||
break;
|
break;
|
||||||
|
case TMT_TRIGGERTAG:
|
||||||
|
sectors[secnum].triggertag = newtag;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7599,9 +7605,9 @@ static void P_SpawnScrollers(void)
|
||||||
if (s != (INT32)i)
|
if (s != (INT32)i)
|
||||||
{
|
{
|
||||||
if (l->args[1] != TMSD_BACK)
|
if (l->args[1] != TMSD_BACK)
|
||||||
Add_Scroller(sc_side, l->args[2] << FRACBITS, l->args[3] << FRACBITS, control, lines[s].sidenum[0], accel, 0);
|
Add_Scroller(sc_side, l->args[2] << (FRACBITS - SCROLL_SHIFT), l->args[3] << (FRACBITS - SCROLL_SHIFT), control, lines[s].sidenum[0], accel, 0);
|
||||||
if (l->args[1] != TMSD_FRONT && lines[s].sidenum[1] != 0xffff)
|
if (l->args[1] != TMSD_FRONT && lines[s].sidenum[1] != 0xffff)
|
||||||
Add_Scroller(sc_side, l->args[2] << FRACBITS, l->args[3] << FRACBITS, control, lines[s].sidenum[1], accel, 0);
|
Add_Scroller(sc_side, l->args[2] << (FRACBITS - SCROLL_SHIFT), l->args[3] << (FRACBITS - SCROLL_SHIFT), control, lines[s].sidenum[1], accel, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,6 +306,7 @@ typedef enum
|
||||||
TMT_ADD = 0,
|
TMT_ADD = 0,
|
||||||
TMT_REMOVE = 1,
|
TMT_REMOVE = 1,
|
||||||
TMT_REPLACEFIRST = 2,
|
TMT_REPLACEFIRST = 2,
|
||||||
|
TMT_TRIGGERTAG = 3,
|
||||||
} textmaptagoptions_t;
|
} textmaptagoptions_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
@ -87,39 +87,40 @@ if(${SDL2_FOUND})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
find_library(CORE_LIB CoreFoundation)
|
find_library(CORE_FOUNDATION_LIBRARY "CoreFoundation")
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
${CORE_LIB}
|
${CORE_FOUNDATION_LIBRARY}
|
||||||
SDL2
|
|
||||||
SDL2_mixer
|
|
||||||
${GME_LIBRARIES}
|
|
||||||
${OPENMPT_LIBRARIES}
|
|
||||||
${MIXERX_LIBRARIES}
|
|
||||||
${PNG_LIBRARIES}
|
|
||||||
${ZLIB_LIBRARIES}
|
|
||||||
${OPENGL_LIBRARIES}
|
|
||||||
${CURL_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||||
else()
|
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
|
||||||
${SDL2_LIBRARIES}
|
|
||||||
${SDL2_MIXER_LIBRARIES}
|
|
||||||
${GME_LIBRARIES}
|
|
||||||
${OPENMPT_LIBRARIES}
|
|
||||||
${MIXERX_LIBRARIES}
|
|
||||||
${PNG_LIBRARIES}
|
|
||||||
${ZLIB_LIBRARIES}
|
|
||||||
${OPENGL_LIBRARIES}
|
|
||||||
${CURL_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
# Configure the app bundle icon and plist properties
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_sources(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns")
|
||||||
m
|
set_target_properties(SRB2SDL2 PROPERTIES
|
||||||
rt
|
MACOSX_BUNDLE_ICON_FILE "Srb2mac"
|
||||||
)
|
MACOSX_BUNDLE_BUNDLE_NAME "Sonic Robo Blast 2"
|
||||||
endif()
|
MACOSX_BUNDLE_BUNDLE_VERSION ${SRB2_VERSION}
|
||||||
|
|
||||||
|
RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
${SDL2_LIBRARIES}
|
||||||
|
${SDL2_MIXER_LIBRARIES}
|
||||||
|
${GME_LIBRARIES}
|
||||||
|
${OPENMPT_LIBRARIES}
|
||||||
|
${MIXERX_LIBRARIES}
|
||||||
|
${PNG_LIBRARIES}
|
||||||
|
${ZLIB_LIBRARIES}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
${CURL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
|
m
|
||||||
|
rt
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
||||||
|
@ -136,8 +137,6 @@ if(${SDL2_FOUND})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES VERSION ${SRB2_VERSION})
|
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
ws2_32
|
ws2_32
|
||||||
|
@ -188,6 +187,7 @@ if(${SDL2_FOUND})
|
||||||
install(TARGETS SRB2SDL2
|
install(TARGETS SRB2SDL2
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
)
|
)
|
||||||
|
set_property(TARGET SRB2SDL2 PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
|
||||||
else()
|
else()
|
||||||
install(TARGETS SRB2SDL2 SRB2SDL2
|
install(TARGETS SRB2SDL2 SRB2SDL2
|
||||||
RUNTIME DESTINATION .
|
RUNTIME DESTINATION .
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "taglist.h"
|
#include "taglist.h"
|
||||||
#include "z_zone.h"
|
#include "z_zone.h"
|
||||||
#include "r_data.h"
|
#include "r_data.h"
|
||||||
|
#include "p_spec.h"
|
||||||
|
|
||||||
// Bit array of whether a tag exists for sectors/lines/things.
|
// Bit array of whether a tag exists for sectors/lines/things.
|
||||||
bitarray_t tags_available[BIT_ARRAY_SIZE (MAXTAGS)];
|
bitarray_t tags_available[BIT_ARRAY_SIZE (MAXTAGS)];
|
||||||
|
@ -454,6 +455,11 @@ void Tag_SectorFSet (const size_t id, const mtag_t tag)
|
||||||
Taggroup_Remove(tags_sectors, curtag, id);
|
Taggroup_Remove(tags_sectors, curtag, id);
|
||||||
Taggroup_Add(tags_sectors, tag, id);
|
Taggroup_Add(tags_sectors, tag, id);
|
||||||
Tag_FSet(&sec->tags, tag);
|
Tag_FSet(&sec->tags, tag);
|
||||||
|
|
||||||
|
// Sectors with linedef trigger effects need to have their trigger tag updated too
|
||||||
|
// This is a bit of a hack...
|
||||||
|
if (!udmf && GETSECSPECIAL(sec->special, 2) >= 1 && GETSECSPECIAL(sec->special, 2) <= 7)
|
||||||
|
sec->triggertag = tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
mtag_t Tag_NextUnused(mtag_t start)
|
mtag_t Tag_NextUnused(mtag_t start)
|
||||||
|
|
Loading…
Reference in a new issue