Skip to content

Commit 1c1f043

Browse files
author
Spoike
committed
preliminary .xcf support.
imgtool tweaks. some build system fixups. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5560 fc73d0e0-1445-4013-8a0c-d673dee63da5
1 parent b1f6417 commit 1c1f043

27 files changed

+1473
-291
lines changed

CMakeLists.txt

+15-13
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ IF(ZLIB_FOUND)
6161
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};ZLIB_STATIC)
6262
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES})
6363
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES})
64+
SET(FTEQCC_LIBS ${FTEQCC_LIBS} ${ZLIB_LIBRARIES})
6465
ELSE()
6566
MESSAGE(WARNING "libz library NOT available. compressed pk3 will not be available.")
6667
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_ZLIB)
67-
SET(ZLIB_LIBRARIES )
6868
ENDIF()
6969

7070
FIND_PACKAGE(BZip2)
7171
IF(BZIP2_FOUND)
72-
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};AVAIL_BZLIB)
72+
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};AVAIL_BZLIB;BZLIB_STATIC)
7373
SET(FTE_LIBS ${FTE_LIBS} bz2)
7474
SET(FTESV_LIBS ${FTESV_LIBS} bz2)
7575
MESSAGE(STATUS "bzip2 library found. bz2-compressed pk3s will work for the price of extra bloat! yay!")
@@ -723,7 +723,7 @@ ELSE()
723723
plugins/bullet/bulletplug.cpp
724724
)
725725
TARGET_INCLUDE_DIRECTORIES(bullet PUBLIC ${BULLET_INCLUDE_DIRS})
726-
SET_TARGET_PROPERTIES(bullet PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN")
726+
SET_TARGET_PROPERTIES(bullet PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
727727
SET_TARGET_PROPERTIES(bullet PROPERTIES PREFIX "fteplug_")
728728
SET_TARGET_PROPERTIES(bullet PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
729729
TARGET_LINK_LIBRARIES(bullet m ${BULLET_LIBRARIES})
@@ -767,13 +767,15 @@ ELSE()
767767
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}")
768768
SET(INSTALLTARGS ${INSTALLTARGS} iqmtool)
769769

770-
ADD_EXECUTABLE(imgtool
771-
engine/client/image.c
772-
imgtool.c
773-
)
774-
SET_TARGET_PROPERTIES(imgtool PROPERTIES COMPILE_DEFINITIONS "IMGTOOL;${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
775-
TARGET_LINK_LIBRARIES(imgtool ${FTE_LIBS} )
776-
SET(INSTALLTARGS ${INSTALLTARGS} imgtool)
770+
IF(NOT WIN32)
771+
ADD_EXECUTABLE(imgtool
772+
engine/client/image.c
773+
imgtool.c
774+
)
775+
SET_TARGET_PROPERTIES(imgtool PROPERTIES COMPILE_DEFINITIONS "IMGTOOL;${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
776+
TARGET_LINK_LIBRARIES(imgtool ${FTE_LIBS} )
777+
SET(INSTALLTARGS ${INSTALLTARGS} imgtool)
778+
ENDIF()
777779

778780
ADD_EXECUTABLE(qtv
779781
fteqtv/netchan.c
@@ -846,7 +848,7 @@ ELSE()
846848
engine/qclib/qcd_main.c
847849
)
848850
SET_TARGET_PROPERTIES(fteqcc PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON}")
849-
TARGET_LINK_LIBRARIES(fteqcc ${ZLIB_LIBRARIES} m)
851+
TARGET_LINK_LIBRARIES(fteqcc ${FTEQCC_LIBS} m)
850852
SET(INSTALLTARGS ${INSTALLTARGS} fteqcc)
851853

852854
IF(${WIN32})
@@ -864,7 +866,7 @@ ELSE()
864866
engine/qclib/qcd_main.c
865867
)
866868
SET_TARGET_PROPERTIES(fteqccgui PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON}")
867-
TARGET_LINK_LIBRARIES(fteqccgui ${ZLIB_LIBRARIES} shlwapi ole32 comctl32 comdlg32)
869+
TARGET_LINK_LIBRARIES(fteqccgui ${FTEQCC_LIBS} shlwapi ole32 comctl32 comdlg32)
868870
SET(INSTALLTARGS ${INSTALLTARGS} fteqccgui)
869871
ELSE()
870872
FIND_PACKAGE(Qt5Widgets)
@@ -900,7 +902,7 @@ ELSE()
900902
TARGET_INCLUDE_DIRECTORIES(fteqccgui PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${QSCINTILLA_INCLUDE_DIR})
901903
SET_TARGET_PROPERTIES(fteqccgui PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};${Qt5Widgets_COMPILE_DEFINITIONS}")
902904
SET_PROPERTY(TARGET fteqccgui PROPERTY POSITION_INDEPENDENT_CODE TRUE)
903-
TARGET_LINK_LIBRARIES(fteqccgui ${ZLIB_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${QSCINTILLA_LIBRARY})
905+
TARGET_LINK_LIBRARIES(fteqccgui ${FTEQCC_LIBS} ${Qt5Widgets_LIBRARIES} ${QSCINTILLA_LIBRARY})
904906
ELSE()
905907
MESSAGE(WARNING "qscintilla/qt5widgets library not detected, no fteqccgui for you")
906908
SET(INSTALLTARGS ${INSTALLTARGS} fteqccgui)

build_setup.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ ANDROID_ZIPALIGN=$ANDROIDROOT/build-tools/$ANDROIDBUILDTOOLS/zipalign #relative
3333

3434
THREADS="-j 4"
3535

36-
TARGETS_LINUX="qcc-rel rel dbg vk-rel plugins-rel plugins-dbg"
37-
TARGETS_WINDOWS="sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel"
36+
TARGETS_LINUX="qcc-rel rel dbg plugins-rel plugins-dbg" #gl-rel vk-rel
37+
TARGETS_WINDOWS="sv-rel m-rel qcc-rel qccgui-scintilla qccgui-dbg m-dbg sv-dbg plugins-dbg plugins-rel" #gl-rel vk-rel mingl-rel d3d-rel
3838

3939

4040
PLUGINS_DROID="qi ezhud irc"
@@ -382,7 +382,7 @@ if [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
382382
#linux distros vary too much with various dependancies and versions and such, so we might as well pre-build our own copies of certain libraries. this really only needs to be done once, but its safe to retry anyway.
383383
cd $SVNROOT/engine
384384
if [ "$BUILD_LINUXx86" == "y" ]; then
385-
echo "Making libraries (x86)..."
385+
echo "Making libraries (linux x86)..."
386386
make FTE_TARGET=linux32 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
387387
fi
388388
if [ "$BUILD_LINUXx64" == "y" ]; then
@@ -397,6 +397,12 @@ if [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
397397
echo "Making libraries (linux armhf)..."
398398
make FTE_TARGET=linuxarmhf makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
399399
fi
400+
if [ "$BUILD_WINDOWS" == "y" ]; then
401+
echo "Making libraries (linux armhf)..."
402+
make FTE_TARGET=win32 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
403+
echo "Making libraries (linux armhf)..."
404+
make FTE_TARGET=win64 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
405+
fi
400406
if [ "$BUILD_WINDOWS" == "y" ] && [[ "$PLUGINS_WINDOWS" =~ "ode" ]]; then
401407
echo "Prebuilding ODE library (win32)..."
402408
make FTE_TARGET=win32 plugins-rel NATIVE_PLUGINS=ode 2>&1 >>/dev/null

engine/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -2003,15 +2003,15 @@ endif
20032003
plugins-dbg:
20042004
@-mkdir -p $(DEBUG_DIR)
20052005
@if test -e ../plugins/Makefile; \
2006-
then $(MAKE) native -C ../plugins OUT_DIR="$(DEBUG_DIR)" CC="$(CC) $(W32_CFLAGS) $(DEBUG_CFLAGS)" CCX="$(CC) $(W32_CFLAGS) $(subst -Wno-pointer-sign,,$(DEBUG_CFLAGS))" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS))" FTE_TARGET="$(FTE_TARGET)"; \
2006+
then $(MAKE) native -C ../plugins OUT_DIR="$(DEBUG_DIR)" CC="$(CC) $(W32_CFLAGS) $(DEBUG_CFLAGS)" CCX="$(CC) $(W32_CFLAGS) $(subst -Wno-pointer-sign,,$(DEBUG_CFLAGS))" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS) $(BRANDFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS)) $(BRANDFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \
20072007
else echo no plugins directory installed; \
20082008
fi
20092009
plugins:
20102010

20112011
plugins-rel:
20122012
@-mkdir -p $(RELEASE_DIR)
20132013
@if test -e ../plugins/Makefile; \
2014-
then $(MAKE) native -C ../plugins OUT_DIR="$(RELEASE_DIR)" CC="$(CC) $(W32_CFLAGS) $(RELEASE_CFLAGS)" CCX="$(CXX) $(W32_CFLAGS) $(subst -Wno-pointer-sign,,$(RELEASE_CFLAGS))" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS))" FTE_TARGET="$(FTE_TARGET)"; \
2014+
then $(MAKE) native -C ../plugins OUT_DIR="$(RELEASE_DIR)" CC="$(CC) $(W32_CFLAGS) $(RELEASE_CFLAGS)" CCX="$(CXX) $(W32_CFLAGS) $(subst -Wno-pointer-sign,,$(RELEASE_CFLAGS))" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS) $(BRANDFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS)) $(BRANDFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \
20152015
else echo no plugins directory installed; \
20162016
fi
20172017
plugins-rel:
@@ -2281,9 +2281,9 @@ libs-$(ARCH)/libspeexdsp.a:
22812281
test -f speexdsp-$(SPEEXDSPVER).tar.gz || wget http://downloads.xiph.org/releases/speex/speexdsp-$(SPEEXDSPVER).tar.gz
22822282
-test -f libs-$(ARCH)/libspeexdsp.a || (mkdir -p libs-$(ARCH)/speex && cd libs-$(ARCH) && tar -xvzf ../speexdsp-$(SPEEXDSPVER).tar.gz && cd speexdsp-$(SPEEXDSPVER) && CFLAGS="$(CFLAGS) -Os" $(TOOLOVERRIDES) ./configure $(CONFIGARGS) && $(TOOLOVERRIDES) $(MAKE) && cp libspeexdsp/.libs/libspeexdsp.a ../ && cp -r include/speex/*.h ../speex/)
22832283

2284-
libs-$(ARCH)/libfreetype.a: libs-$(ARCH)/libpng.a
2284+
libs-$(ARCH)/libfreetype.a libs-$(ARCH)/ft2build.h: libs-$(ARCH)/libpng.a
22852285
test -f freetype-$(FREETYPEVER).tar.gz || wget https://download.savannah.gnu.org/releases/freetype/freetype-$(FREETYPEVER).tar.gz
2286-
-test -f libs-$(ARCH)/libfreetype.a || (mkdir -p libs-$(ARCH) && cd libs-$(ARCH) && tar -xvzf ../freetype-$(FREETYPEVER).tar.gz && cd freetype-$(FREETYPEVER) && CFLAGS="$(CFLAGS) -Os" $(TOOLOVERRIDES) ./configure CPPFLAGS=-I$(NATIVE_ABSBASE_DIR)/libs-$(ARCH)/ LDFLAGS=-L$(NATIVE_ABSBASE_DIR)/libs-$(ARCH)/ $(CONFIGARGS) --with-bzip2=no --with-harfbuzz=no && $(TOOLOVERRIDES) $(MAKE) && cp objs/.libs/libfreetype.a ../ && cp -r include/ ../)
2286+
-test -f libs-$(ARCH)/libfreetype.a || (mkdir -p libs-$(ARCH) && cd libs-$(ARCH) && tar -xvzf ../freetype-$(FREETYPEVER).tar.gz && cd freetype-$(FREETYPEVER) && CFLAGS="$(CFLAGS) -Os" $(TOOLOVERRIDES) ./configure CPPFLAGS=-I$(NATIVE_ABSBASE_DIR)/libs-$(ARCH)/ LDFLAGS=-L$(NATIVE_ABSBASE_DIR)/libs-$(ARCH)/ $(CONFIGARGS) --with-bzip2=no --with-harfbuzz=no && $(TOOLOVERRIDES) $(MAKE) && cp objs/.libs/libfreetype.a ../ && bash && cp -r include/* ../)
22872287

22882288
libs-$(ARCH)/libBulletDynamics.a:
22892289
test -f bullet3-$(BULLETVER).tar.gz || wget https://github.com/bulletphysics/bullet3/archive/$(BULLETVER).tar.gz -O bullet3-$(BULLETVER).tar.gz

engine/client/cl_main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4905,7 +4905,7 @@ void CL_Init (void)
49054905

49064906
Cmd_AddCommandD ("fog", CL_Fog_f, "fog <density> <red> <green> <blue> <alpha> <depthbias>");
49074907
Cmd_AddCommandD ("waterfog", CL_Fog_f, "waterfog <density> <red> <green> <blue> <alpha> <depthbias>");
4908-
Cmd_AddCommand ("skygroup", CL_Skygroup_f);
4908+
Cmd_AddCommandD ("skygroup", CL_Skygroup_f, "Provides a way to associate a skybox name with a series of maps, so that the requested skybox will override on a per-map basis.");
49094909
//
49104910
// Windows commands
49114911
//

engine/client/cl_pred.c

+1
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ void CL_PredictMovePNum (int seat)
10801080

10811081
if (nopred)
10821082
{
1083+
lerpangles = false;
10831084
//match interpolation info
10841085
from.frame = ((char*)cl.previouspackentities - (char*)&cl.inframes[0].packet_entities) / sizeof(inframe_t);
10851086
from.time = cl.inframes[from.frame & UPDATE_MASK].packet_entities.servertime;

0 commit comments

Comments
 (0)