mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Merge branch 'master' into win-merge
This commit is contained in:
commit
a32e2319e2
1294 changed files with 71008 additions and 79878 deletions
146
Makefile.am
146
Makefile.am
|
@ -1,15 +1,9 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS=desktop pkg-config include @top_dirs@
|
||||
DIST_SUBDIRS=desktop pkg-config include \
|
||||
libs hw nq qtv qw tools ruamoko\
|
||||
RPM debian doc vc2005 vc2008
|
||||
|
||||
## configure.ac needs to be listed here for older autoconfs
|
||||
EXTRA_DIST= ChangeLog configure.ac bootstrap \
|
||||
EXTRA_DIST = \
|
||||
ChangeLog configure.ac bootstrap \
|
||||
$(top_srcdir)/.version \
|
||||
config.d/git-version-gen \
|
||||
tools/cross/droid/cross-configure.sh \
|
||||
|
@ -26,9 +20,142 @@ EXTRA_DIST= ChangeLog configure.ac bootstrap \
|
|||
tools/gas2masm/gas2masm.dsp tools/gas2masm/gas2masm.dsw \
|
||||
tools/gas2masm/gas2masm.mak tools/gas2masm/gas2masm.mdp
|
||||
|
||||
NOCONV_DIST= $(distdir)/include/win32/resources/icon1Vista.ico \
|
||||
NOCONV_DIST= \
|
||||
$(distdir)/include/win32/resources/icon1Vista.ico \
|
||||
$(distdir)/include/win32/resources/icon1XP.ico
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
#AM_CFLAGS= @PREFER_NON_PIC@
|
||||
AM_CPPFLAGS= -I$(top_srcdir)/include $(PTHREAD_CFLAGS)
|
||||
|
||||
common_ldflags= -export-dynamic @PTHREAD_LDFLAGS@
|
||||
|
||||
TESTS =
|
||||
XFAIL_TESTS =
|
||||
bin_PROGRAMS =
|
||||
bin_SCRIPTS =
|
||||
check_PROGRAMS =
|
||||
lib_LTLIBRARIES =
|
||||
man_MANS =
|
||||
noinst_LTLIBRARIES =
|
||||
noinst_LIBRARIES =
|
||||
noinst_PROGRAMS =
|
||||
noinst_HEADERS =
|
||||
plugin_LTLIBRARIES =
|
||||
|
||||
RANLIB=touch
|
||||
ARFLAGS=cr
|
||||
|
||||
EXTRA_HEADERS =
|
||||
EXTRA_LTLIBRARIES =
|
||||
EXTRA_PROGRAMS =
|
||||
EXTRA_LIBRARIES =
|
||||
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
YFLAGS = -v -d -Wno-yacc -Werror
|
||||
PTHREAD_LDFLAGS=@PTHREAD_LDFLAGS@
|
||||
PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
|
||||
|
||||
lib_ldflags=-version-info $(QUAKE_LIBRARY_VERSION_INFO) \
|
||||
-rpath $(libdir) -no-undefined
|
||||
plugin_ldflags= @plugin_ldflags@ -avoid-version -module -rpath $(plugindir)
|
||||
plugin_libadd= @plugin_libadd@
|
||||
|
||||
SDL_LIBS= @SDL_LIBS@
|
||||
XMMS_LIBS= @XMMS_LIBS@
|
||||
|
||||
PAK=$(top_builddir)/pak$(EXEEXT)
|
||||
QFCC_DEP=qfcc$(EXEEXT)
|
||||
QFCC=$(top_builddir)/$(QFCC_DEP)
|
||||
GZ=@progs_gz@
|
||||
|
||||
V_QFCC = $(V_QFCC_@AM_V@)
|
||||
V_QFCC_ = $(V_QFCC_@AM_DEFAULT_V@)
|
||||
V_QFCC_0 = @echo " QFCC " $@;
|
||||
V_QFCC_1 =
|
||||
|
||||
V_QFCCLD = $(V_QFCCLD_@AM_V@)
|
||||
V_QFCCLD_ = $(V_QFCCLD_@AM_DEFAULT_V@)
|
||||
V_QFCCLD_0 = @echo " QFCCLD " $@;
|
||||
V_QFCCLD_1 =
|
||||
|
||||
QCSYSTEM=--no-default-paths -I$(top_srcdir) -I$(top_srcdir)/ruamoko/include -I$(top_srcdir)/include
|
||||
QCFLAGS=-qq -O -g -Werror -Wall -Wno-integer-divide
|
||||
QCPPFLAGS=$(QCSYSTEM)
|
||||
QCLINKFLAGS=--no-default-paths -Lruamoko/lib
|
||||
QCOMPILE=$(QFCC) $(QCFLAGS) $(QCPPFLAGS)
|
||||
QLINK=$(QFCC) $(QCFLAGS) $(QCLINKFLAGS)
|
||||
MKDIR_P = @MKDIR_P@
|
||||
|
||||
am__mv = mv -f
|
||||
|
||||
SUFFIXES=.o .r .pas
|
||||
.r.o:
|
||||
$(V_QFCC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
$(QCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tqo -c -o $@ $< &&\
|
||||
sed -i -e '1s@:@: $(QFCC_DEP)@' $$depbase.Tqo &&\
|
||||
$(am__mv) $$depbase.Tqo $$depbase.Qo
|
||||
.pas.o:
|
||||
$(V_QFCC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
$(QCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tqo -c -o $@ $< &&\
|
||||
sed -i -e '1s@:@: $(QFCC_DEP)@' $$depbase.Tqo &&\
|
||||
$(am__mv) $$depbase.Tqo $$depbase.Qo
|
||||
|
||||
qcautodep = $(join $(addsuffix $(DEPDIR)/,$(dir $(basename $(1)))),$(addsuffix .Qo,$(notdir $(basename $(basename $(1))))))
|
||||
r_depfiles_remade=
|
||||
pas_depfiles_remade=
|
||||
|
||||
V_GLSLANG = $(V_GLSLANG_@AM_V@)
|
||||
V_GLSLANG_ = $(V_GLSLANG_@AM_DEFAULT_V@)
|
||||
V_GLSLANG_0 = @echo " GLSLANG " $@;
|
||||
V_GLSLANG_1 =
|
||||
|
||||
V_XXD = $(V_XXD_@AM_V@)
|
||||
V_XXD_ = $(V_XXD_@AM_DEFAULT_V@)
|
||||
V_XXD_0 = @echo " XXD " $@;
|
||||
V_XXD_1 =
|
||||
|
||||
%.spv: %
|
||||
@$(mkdir_p) $(builddir)/`dirname $@`
|
||||
$(V_GLSLANG)(((($(GLSLANGVALIDATOR) -V $< -o $@; echo $$? >&3) | sed -e '1d' 1>&2) 3>&1) | (read xs; exit $$xs))
|
||||
|
||||
%.spvc: %
|
||||
@$(mkdir_p) $(builddir)/`dirname $@`
|
||||
$(V_GLSLANG)(((($(GLSLANGVALIDATOR) --vn `basename $< | tr . _` -V $< -o $@; echo $$? >&3) | sed -e '1d' 1>&2) 3>&1) | (read xs; exit $$xs))
|
||||
|
||||
shaderdir = @shaderdir@
|
||||
shader_DATA =
|
||||
|
||||
include doc/Makemodule.am
|
||||
include RPM/Makemodule.am
|
||||
include debian/Makemodule.am
|
||||
include desktop/Makemodule.am
|
||||
include pkg-config/Makemodule.am
|
||||
include include/Makemodule.am
|
||||
include libs/Makemodule.am
|
||||
include hw/Makemodule.am
|
||||
include nq/Makemodule.am
|
||||
include qtv/Makemodule.am
|
||||
include qw/Makemodule.am
|
||||
include tools/Makemodule.am
|
||||
include ruamoko/Makemodule.am
|
||||
|
||||
DISTCLEANFILES += $(r_depfiles_remade) $(pas_depfiles_remade)
|
||||
CLEANFILES += $(shader_DATA)
|
||||
|
||||
$(r_depfiles_remade):
|
||||
$(MKDIR_P) $(@D)
|
||||
echo '$@' | sed -e 's@\$(DEPDIR)/@@' -e 's@\(.*\)\.Qo$$@\1.o: $(top_srcdir)/\1.r qfcc@' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
$(pas_depfiles_remade):
|
||||
$(MKDIR_P) $(@D)
|
||||
echo '$@' | sed -e 's@\$(DEPDIR)/@@' -e 's@\(.*\)\.Qo$$@\1.o: $(top_srcdir)/\1.pas qfcc@' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade) $(r_depfiles_remade) $(pas_depfiles_remade)
|
||||
echo findme $(ruamoko_gui_libgui_a_dep)
|
||||
|
||||
changelog: ChangeLog
|
||||
ChangeLog: FORCE
|
||||
@if test -d "$(top_srcdir)/.git"; then \
|
||||
|
@ -63,7 +190,6 @@ dist-all-local: distdir
|
|||
ZIP="-r9ql" zip $(distdir).zip $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
EXTRA_DIST= build_rpm.in quakeforge.conf.in quakeforge.spec.in
|
||||
|
||||
rpm: build_rpm quakeforge.conf quakeforge.spec
|
||||
./build_rpm
|
||||
|
||||
CLEANFILES = *.rpm
|
6
RPM/Makemodule.am
Normal file
6
RPM/Makemodule.am
Normal file
|
@ -0,0 +1,6 @@
|
|||
EXTRA_DIST += RPM/build_rpm.in RPM/quakeforge.conf.in RPM/quakeforge.spec.in
|
||||
|
||||
rpm: RPM/build_rpm RPM/quakeforge.conf RPM/quakeforge.spec
|
||||
cd RPM && ./build_rpm
|
||||
|
||||
CLEANFILES += rpm/*.rpm
|
|
@ -18,7 +18,7 @@ if test "$1" = "clean"; then
|
|||
find . -name '*.orig' -type f -print0 | xargs $ARGS rm -f
|
||||
rm -f aclocal.m4 build-stamp changelog-stamp config.cache config.log \
|
||||
config.status configure configure-stamp install-sh libtool missing \
|
||||
mkinstalldirs quakeforge-config quakeforge.lsm
|
||||
mkinstalldirs quakeforge-config quakeforge.lsm test-driver
|
||||
rm -f compile config.guess config.sub depcomp ltmain.sh ylwrap
|
||||
rm -rf autom4te.cache
|
||||
rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
||||
|
|
|
@ -1,103 +1,4 @@
|
|||
Makefile
|
||||
|
||||
include/Makefile
|
||||
include/QF/Makefile
|
||||
|
||||
libs/Makefile
|
||||
libs/audio/Makefile
|
||||
libs/audio/targets/Makefile
|
||||
libs/audio/renderer/Makefile
|
||||
libs/audio/test/Makefile
|
||||
libs/console/Makefile
|
||||
libs/client/Makefile
|
||||
libs/gamecode/Makefile
|
||||
libs/gib/Makefile
|
||||
libs/image/Makefile
|
||||
libs/models/Makefile
|
||||
libs/models/alias/Makefile
|
||||
libs/models/brush/Makefile
|
||||
libs/models/iqm/Makefile
|
||||
libs/models/sprite/Makefile
|
||||
libs/models/test/Makefile
|
||||
libs/net/Makefile
|
||||
libs/net/nc/Makefile
|
||||
libs/net/nm/Makefile
|
||||
libs/qw/Makefile
|
||||
libs/ruamoko/Makefile
|
||||
libs/util/Makefile
|
||||
libs/util/test/Makefile
|
||||
libs/video/Makefile
|
||||
libs/video/renderer/Makefile
|
||||
libs/video/renderer/gl/Makefile
|
||||
libs/video/renderer/glsl/Makefile
|
||||
libs/video/renderer/sw/Makefile
|
||||
libs/video/renderer/sw32/Makefile
|
||||
libs/video/targets/Makefile
|
||||
|
||||
hw/Makefile
|
||||
hw/include/Makefile
|
||||
hw/source/Makefile
|
||||
|
||||
nq/Makefile
|
||||
nq/include/Makefile
|
||||
nq/source/Makefile
|
||||
|
||||
qtv/Makefile
|
||||
qtv/include/Makefile
|
||||
qtv/source/Makefile
|
||||
|
||||
qw/Makefile
|
||||
qw/include/Makefile
|
||||
qw/source/Makefile
|
||||
|
||||
tools/Makefile
|
||||
tools/bsp2img/Makefile
|
||||
tools/carne/Makefile
|
||||
tools/pak/Makefile
|
||||
tools/qfbsp/Makefile
|
||||
tools/qfbsp/include/Makefile
|
||||
tools/qfbsp/source/Makefile
|
||||
tools/qfcc/Makefile
|
||||
tools/qfcc/doc/Makefile
|
||||
tools/qfcc/doc/man/Makefile
|
||||
tools/qfcc/include/Makefile
|
||||
tools/qfcc/source/Makefile
|
||||
tools/qfcc/test/Makefile
|
||||
tools/qflight/Makefile
|
||||
tools/qflight/include/Makefile
|
||||
tools/qflight/source/Makefile
|
||||
tools/qflmp/Makefile
|
||||
tools/qfmodelgen/Makefile
|
||||
tools/qfmodelgen/include/Makefile
|
||||
tools/qfmodelgen/source/Makefile
|
||||
tools/qfspritegen/Makefile
|
||||
tools/qfvis/Makefile
|
||||
tools/qfvis/include/Makefile
|
||||
tools/qfvis/source/Makefile
|
||||
tools/qwaq/Makefile
|
||||
tools/qwaq/progs.src
|
||||
tools/wad/Makefile
|
||||
tools/wav/Makefile
|
||||
|
||||
ruamoko/Makefile
|
||||
ruamoko/Doxyfile
|
||||
ruamoko/include/Makefile
|
||||
ruamoko/lib/Makefile
|
||||
ruamoko/game/Makefile
|
||||
ruamoko/gui/Makefile
|
||||
ruamoko/cl_menu/Makefile
|
||||
ruamoko/scheme/Makefile
|
||||
|
||||
pkg-config/Makefile
|
||||
pkg-config/qfcc.pc
|
||||
pkg-config/quakeforge.pc
|
||||
|
||||
doc/Makefile
|
||||
doc/quakeforge.dox.conf
|
||||
doc/man/Makefile
|
||||
|
||||
debian/Makefile
|
||||
desktop/Makefile
|
||||
|
||||
vc2005/Makefile
|
||||
vc2008/Makefile
|
||||
|
|
|
@ -39,8 +39,9 @@ if test "x$HAVE_FBDEV" = xyes; then
|
|||
QW_TARGETS="$QW_TARGETS qw-client-fbdev\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-fbdev\$(EXEEXT)"
|
||||
CL_TARGETS="$CL_TARGETS FBDEV"
|
||||
VID_TARGETS="$VID_TARGETS libQFfbdev.la"
|
||||
VID_TARGETS="$VID_TARGETS libs/video/targets/libQFfbdev.la"
|
||||
QF_NEED(vid_render, [sw])
|
||||
QF_NEED(render, [sw])
|
||||
QF_NEED(models, [sw])
|
||||
QF_NEED(alias, [sw])
|
||||
QF_NEED(brush, [sw])
|
||||
|
@ -66,12 +67,22 @@ if test "x$HAVE_X" = xyes; then
|
|||
if test "x$ENABLE_clients_x11" = xyes; then
|
||||
QW_TARGETS="$QW_TARGETS qw-client-x11\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-x11\$(EXEEXT)"
|
||||
QWAQ_TARGETS="$QWAQ_TARGETS qwaq-x11\$(EXEEXT)"
|
||||
QW_DESKTOP_DATA="$QW_DESKTOP_DATA quakeforge-qw-x11.desktop"
|
||||
NQ_DESKTOP_DATA="$NQ_DESKTOP_DATA quakeforge-nq-x11.desktop"
|
||||
QWAQ_TARGETS="$QWAQ_TARGETS ruamoko/qwaq/qwaq-x11\$(EXEEXT)"
|
||||
QW_DESKTOP_DATA="$QW_DESKTOP_DATA desktop/quakeforge-qw-x11.desktop"
|
||||
NQ_DESKTOP_DATA="$NQ_DESKTOP_DATA desktop/quakeforge-nq-x11.desktop"
|
||||
CL_TARGETS="$CL_TARGETS X11"
|
||||
VID_TARGETS="$VID_TARGETS libQFx11.la"
|
||||
VID_TARGETS="$VID_TARGETS libs/video/targets/libQFx11.la"
|
||||
if test "$HAVE_VULKAN" = "yes"; then
|
||||
QF_NEED(vid_render, [vulkan])
|
||||
QF_NEED(render, [vulkan])
|
||||
QF_NEED(models, [vulkan])
|
||||
QF_NEED(alias, [vulkan])
|
||||
QF_NEED(brush, [vulkan])
|
||||
QF_NEED(iqm, [vulkan])
|
||||
QF_NEED(sprite, [vulkan])
|
||||
fi
|
||||
QF_NEED(vid_render, [sw sw32 gl glsl])
|
||||
QF_NEED(render, [sw sw32 gl glsl])
|
||||
QF_NEED(models, [sw gl glsl])
|
||||
QF_NEED(alias, [sw gl glsl])
|
||||
QF_NEED(brush, [sw gl glsl])
|
||||
|
@ -91,11 +102,20 @@ if test "x$HAVE_SDL" = xyes; then
|
|||
if test "x$ENABLE_clients_sdl" = xyes; then
|
||||
QW_TARGETS="$QW_TARGETS qw-client-sdl\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-sdl\$(EXEEXT)"
|
||||
QW_DESKTOP_DATA="$QW_DESKTOP_DATA quakeforge-qw-sdl.desktop"
|
||||
NQ_DESKTOP_DATA="$NQ_DESKTOP_DATA quakeforge-nq-sdl.desktop"
|
||||
QW_DESKTOP_DATA="$QW_DESKTOP_DATA desktop/quakeforge-qw-sdl.desktop"
|
||||
NQ_DESKTOP_DATA="$NQ_DESKTOP_DATA desktop/quakeforge-nq-sdl.desktop"
|
||||
CL_TARGETS="$CL_TARGETS SDL"
|
||||
VID_TARGETS="$VID_TARGETS libQFsdl.la"
|
||||
VID_TARGETS="$VID_TARGETS libs/video/targets/libQFsdl.la"
|
||||
if test "$HAVE_VULKAN" = "yes"; then
|
||||
QF_NEED(vid_render, [vulkan])
|
||||
QF_NEED(render, [vulkan])
|
||||
QF_NEED(alias, [vulkan])
|
||||
QF_NEED(brush, [vulkan])
|
||||
QF_NEED(iqm, [vulkan])
|
||||
QF_NEED(sprite, [vulkan])
|
||||
fi
|
||||
QF_NEED(vid_render, [sw sw32 gl glsl])
|
||||
QF_NEED(render, [sw sw32 gl glsl])
|
||||
QF_NEED(models, [sw gl glsl])
|
||||
QF_NEED(alias, [sw gl glsl])
|
||||
QF_NEED(brush, [sw gl glsl])
|
||||
|
@ -116,8 +136,9 @@ if test "x$HAVE_SVGA" = xyes; then
|
|||
QW_TARGETS="$QW_TARGETS qw-client-svga\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-svga\$(EXEEXT)"
|
||||
CL_TARGETS="$CL_TARGETS SVGAlib"
|
||||
VID_TARGETS="$VID_TARGETS libQFsvga.la"
|
||||
VID_TARGETS="$VID_TARGETS libs/video/targets/libQFsvga.la"
|
||||
QF_NEED(vid_render, [sw])
|
||||
QF_NEED(render, [sw])
|
||||
QF_NEED(models, [sw])
|
||||
QF_NEED(alias, [sw])
|
||||
QF_NEED(brush, [sw])
|
||||
|
@ -138,7 +159,7 @@ if test "x$mingw" = xyes; then
|
|||
QW_TARGETS="$QW_TARGETS qw-client-win\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-win\$(EXEEXT)"
|
||||
CL_TARGETS="$CL_TARGETS WIN"
|
||||
VID_TARGETS="$VID_TARGETS libQFwin.la"
|
||||
VID_TARGETS="$VID_TARGETS libs/video/targets/libQFwin.la"
|
||||
QF_NEED(vid_render, [sw sw32 gl glsl])
|
||||
QF_NEED(models, [sw gl glsl])
|
||||
QF_NEED(alias, [sw gl glsl])
|
||||
|
@ -166,8 +187,8 @@ if test "x$ENABLE_servers_nq" = xyes; then
|
|||
QF_NEED(libs,[util gamecode ruamoko gib image models console net])
|
||||
fi
|
||||
if test "x$ENABLE_servers_qtv" = xyes; then
|
||||
QTV_TARGETS="qtv\$(EXEEXT) $QTV_TARGETS"
|
||||
SV_TARGETS="$SV_TARGETS qtv"
|
||||
QTV_TARGETS="qtv-server\$(EXEEXT) $QTV_TARGETS"
|
||||
SV_TARGETS="$SV_TARGETS qtv-server"
|
||||
# QF_NEED(qtv, [common server])
|
||||
QF_NEED(console, [server])
|
||||
QF_NEED(top, [qtv])
|
||||
|
@ -230,7 +251,11 @@ if test "x$ENABLE_tools_qfvis" = xyes; then
|
|||
QF_NEED(libs,[util])
|
||||
fi
|
||||
if test "x$ENABLE_tools_qwaq" = xyes; then
|
||||
QF_NEED(tools,[qwaq])
|
||||
if test "x$HAVE_PANEL" = xyes -a "x$HAVE_PTHREAD" = xyes; then
|
||||
QWAQ_TARGETS="$QWAQ_TARGETS ruamoko/qwaq/qwaq-curses\$(EXEEXT)"
|
||||
fi
|
||||
QF_NEED(tools,[qfcc])
|
||||
QF_NEED(ruamoko,[qwaq])
|
||||
QF_NEED(libs,[ruamoko gamecode util])
|
||||
fi
|
||||
if test "x$ENABLE_tools_wad" = xyes; then
|
||||
|
@ -244,39 +269,52 @@ fi
|
|||
|
||||
QF_NEED(top, [libs hw nq qtv qw])
|
||||
|
||||
QF_PROCESS_NEED_DIRS(tools,[bsp2img carne pak qfbsp qfcc qflight qflmp qfmodelgen qfspritegen qfvis qwaq wad wav])
|
||||
QF_PROCESS_NEED_FUNC(tools,[bsp2img carne pak qfbsp qfcc qflight qflmp qfmodelgen qfspritegen qfvis qwaq wad wav], QF_NEED(top,tools))
|
||||
|
||||
QF_PROCESS_NEED_DIRS(libs,[util gamecode ruamoko gib audio image models video console net qw client])
|
||||
QF_PROCESS_NEED_FUNC(tools,[bsp2img carne pak qfbsp qfcc qflight qflmp qfmodelgen qfspritegen qfvis wad wav], QF_NEED(top,tools))
|
||||
|
||||
if test "$ENABLE_tools_qfcc" = "yes" -a "$ENABLE_tools_pak" = "yes"; then
|
||||
QF_NEED(top, [ruamoko])
|
||||
qfac_qfcc_include_qf="\$(qfcc_include_qf)"
|
||||
fi
|
||||
QF_SUBST(qfac_qfcc_include_qf)
|
||||
|
||||
if test x"${top_need_libs}" = xyes; then
|
||||
qfac_include_qf="\$(include_qf)"
|
||||
qfac_include_qf_gl="\$(include_qf_gl)"
|
||||
qfac_include_qf_glsl="\$(include_qf_glsl)"
|
||||
qfac_include_qf_math="\$(include_qf_math)"
|
||||
qfac_include_qf_plugin="\$(include_qf_plugin)"
|
||||
qfac_include_qf_vulkan="\$(include_qf_vulkan)"
|
||||
fi
|
||||
QF_SUBST(qfac_include_qf)
|
||||
QF_SUBST(qfac_include_qf_gl)
|
||||
QF_SUBST(qfac_include_qf_glsl)
|
||||
QF_SUBST(qfac_include_qf_math)
|
||||
QF_SUBST(qfac_include_qf_plugin)
|
||||
QF_SUBST(qfac_include_qf_vulkan)
|
||||
|
||||
progs_gz=
|
||||
if test "$HAVE_ZLIB" = "yes"; then
|
||||
progs_gz=".gz"
|
||||
fi
|
||||
QF_SUBST(progs_gz)
|
||||
|
||||
QF_PROCESS_NEED_DIRS(top, [libs hw nq qtv qw tools ruamoko])
|
||||
|
||||
QF_PROCESS_NEED_LIBS(swrend, [asm])
|
||||
QF_PROCESS_NEED_DIRS(vid_render, [gl glsl sw sw32])
|
||||
QF_PROCESS_NEED_LIBS(models, [gl glsl sw])
|
||||
QF_PROCESS_NEED_LIBS(alias, [gl glsl sw])
|
||||
QF_PROCESS_NEED_LIBS(brush, [gl glsl sw])
|
||||
QF_PROCESS_NEED_LIBS(iqm, [gl glsl sw])
|
||||
QF_PROCESS_NEED_LIBS(sprite, [gl glsl sw])
|
||||
QF_PROCESS_NEED_LIBS(render, [gl glsl sw sw32 vulkan], [libs/video/renderer])
|
||||
QF_PROCESS_NEED_LIBS(models, [gl glsl sw vulkan], [libs/models])
|
||||
QF_PROCESS_NEED_LIBS(alias, [gl glsl sw vulkan], [libs/models/alias])
|
||||
QF_PROCESS_NEED_LIBS(brush, [gl glsl sw vulkan], [libs/models/brush])
|
||||
QF_PROCESS_NEED_LIBS(iqm, [gl glsl sw vulkan], [libs/models/iqm])
|
||||
QF_PROCESS_NEED_LIBS(sprite, [gl glsl sw vulkan], [libs/models/sprite])
|
||||
|
||||
QF_PROCESS_NEED_LIBS(vid, [common sdl svga win x11])
|
||||
QF_PROCESS_NEED_LIBS(qw, [client common sdl win server], a)
|
||||
QF_PROCESS_NEED_LIBS(nq, [client common sdl win server], a)
|
||||
QF_PROCESS_NEED_LIBS(vid, [common sdl svga win x11], [libs/video/targets])
|
||||
QF_PROCESS_NEED_LIBS(qw, [client common sdl win server], [qw/source], a)
|
||||
QF_PROCESS_NEED_LIBS(nq, [client common sdl win server], [nq/source], a)
|
||||
|
||||
if test -n "$CL_TARGETS"; then
|
||||
CD_TARGETS="libQFcd.la"
|
||||
SND_TARGETS="libQFsound.la"
|
||||
CD_TARGETS="libs/audio/libQFcd.la"
|
||||
SND_TARGETS="libs/audio/libQFsound.la"
|
||||
AUDIO_TARGETS="testsound\$(EXEEXT)"
|
||||
JOY_TARGETS="libQFjs.la"
|
||||
JOY_TARGETS="libs/video/targets/libQFjs.la"
|
||||
else
|
||||
unset CDTYPE
|
||||
unset SOUND_TYPES
|
||||
|
@ -311,13 +349,13 @@ if test "x$static_plugins" = xauto; then
|
|||
fi
|
||||
fi
|
||||
if test "x$static_plugins" = xyes; then
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(vid_render, [sw sw32 glsl gl])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(console, [server], [\$(top_builddir)/libs/console], [server])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(console, [client], [\$(top_builddir)/libs/console], [client])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(vid_render, [sw sw32 glsl gl vulkan], [libs/video/renderer])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(console, [server], [libs/console], [server])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(console, [client], [libs/console], [client])
|
||||
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa], [targets])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(snd_render, [jack default], [renderer])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(cd, [xmms sdl sgi win linux file])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa], [libs/audio/targets])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(snd_render, [jack default], [libs/audio/renderer])
|
||||
QF_PROCESS_NEED_STATIC_PLUGINS(cd, [xmms sdl sgi win linux file], [libs/audio])
|
||||
AC_DEFINE(STATIC_PLUGINS, 1, [Define this if you are building static plugins])
|
||||
if test -n "$SOUND_TYPES"; then
|
||||
SOUND_TYPES="$SOUND_TYPES (static)"
|
||||
|
@ -326,12 +364,12 @@ if test "x$static_plugins" = xyes; then
|
|||
CDTYPE="$CDTYPE (static)"
|
||||
fi
|
||||
else
|
||||
QF_PROCESS_NEED_PLUGINS(vid_render, [sw sw32 glsl gl])
|
||||
QF_PROCESS_NEED_PLUGINS(console, [server], [server])
|
||||
QF_PROCESS_NEED_PLUGINS(console, [client], [client])
|
||||
QF_PROCESS_NEED_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa])
|
||||
QF_PROCESS_NEED_PLUGINS(snd_render, [jack default])
|
||||
QF_PROCESS_NEED_PLUGINS(cd, [xmms sdl sgi win linux file])
|
||||
QF_PROCESS_NEED_PLUGINS(vid_render, [sw sw32 glsl gl vulkan], [libs/video/renderer])
|
||||
QF_PROCESS_NEED_PLUGINS(console, [server], [libs/console], [server])
|
||||
QF_PROCESS_NEED_PLUGINS(console, [client], [libs/console], [client])
|
||||
QF_PROCESS_NEED_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa], [libs/audio/targets])
|
||||
QF_PROCESS_NEED_PLUGINS(snd_render, [jack default], [libs/audio/renderer])
|
||||
QF_PROCESS_NEED_PLUGINS(cd, [xmms sdl sgi win linux file], [libs/audio])
|
||||
fi
|
||||
|
||||
dnl Do not use -module here, it belongs in makefile.am due to automake
|
||||
|
@ -375,6 +413,7 @@ QF_DEPS(QFCC,
|
|||
QF_DEPS(QFCC_TEST,
|
||||
[],
|
||||
[$(top_builddir)/libs/ruamoko/libQFruamoko.la
|
||||
$(top_builddir)/libs/gamecode/libQFgamecode.la
|
||||
$(top_builddir)/libs/util/libQFutil.la],
|
||||
[$(WIN32_LIBS)],
|
||||
)
|
||||
|
@ -407,8 +446,9 @@ QF_DEPS(QFVIS,
|
|||
[$(WIN32_LIBS)],
|
||||
)
|
||||
QF_DEPS(QWAQ,
|
||||
[],
|
||||
[-I$(top_srcdir)/ruamoko/qwaq],
|
||||
[$(top_builddir)/libs/ruamoko/libQFruamoko.la
|
||||
$(top_builddir)/libs/gamecode/libQFgamecode.la
|
||||
$(top_builddir)/libs/util/libQFutil.la],
|
||||
[$(WIN32_LIBS)],
|
||||
)
|
||||
|
@ -416,6 +456,7 @@ QF_DEPS(CARNE,
|
|||
[],
|
||||
[$(top_builddir)/libs/gib/libQFgib.la
|
||||
$(top_builddir)/libs/ruamoko/libQFruamoko.la
|
||||
$(top_builddir)/libs/gamecode/libQFgamecode.la
|
||||
$(top_builddir)/libs/util/libQFutil.la],
|
||||
[$(WIN32_LIBS)],
|
||||
)
|
||||
|
|
|
@ -82,6 +82,11 @@ AC_ARG_ENABLE(optimize,
|
|||
optimize=yes
|
||||
)
|
||||
|
||||
QF_CC_OPTION(-mavx2)
|
||||
dnl fma is not used as it is the equivalent of turning on
|
||||
dnl -funsafe-math-optimizations
|
||||
dnl QF_CC_OPTION(-mfma)
|
||||
|
||||
AC_MSG_CHECKING(for optimization)
|
||||
if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -213,6 +218,16 @@ if test $CC_MAJ -gt 4 -o $CC_MAJ -eq 4 -a $CC_MIN -ge 5; then
|
|||
fi
|
||||
QF_CC_OPTION(-Wtype-limits)
|
||||
QF_CC_OPTION_TEST([-fvisibility=hidden], [VISIBILITY=-fvisibility=hidden])
|
||||
QF_CC_OPTION(-Wsuggest-attribute=pure)
|
||||
QF_CC_OPTION(-Wsuggest-attribute=const)
|
||||
QF_CC_OPTION(-Wsuggest-attribute=noreturn)
|
||||
QF_CC_OPTION(-Wsuggest-attribute=format)
|
||||
|
||||
AC_ARG_ENABLE(coverage,
|
||||
[ --enable-coverage Enable generation of data for gcov])
|
||||
if test "x$enable_coverage" = xyes; then
|
||||
QF_CC_OPTION(-fprofile-arcs -ftest-coverage)
|
||||
fi
|
||||
|
||||
dnl QuakeForge uses lots of BCPL-style (//) comments, which can cause problems
|
||||
dnl with many compilers that do not support the latest ISO standards. Well,
|
||||
|
@ -241,8 +256,7 @@ if test "x$GCC" != xyes; then
|
|||
fi
|
||||
|
||||
AC_ARG_ENABLE(Werror,
|
||||
[ --disable-Werror Do not treat warnings as errors]
|
||||
)
|
||||
[ --disable-Werror Do not treat warnings as errors])
|
||||
dnl We want warnings, lots of warnings...
|
||||
dnl The help text should be INVERTED before release!
|
||||
dnl when in git, this test defaults to ENABLED.
|
||||
|
|
|
@ -2,7 +2,9 @@ AC_ARG_ENABLE(curses,
|
|||
[ --disable-curses disable curses support]
|
||||
)
|
||||
if test "x$enable_curses" != "xno"; then
|
||||
AC_CHECK_HEADERS(curses.h)
|
||||
AC_CHECK_HEADER([curses.h],
|
||||
[AC_DEFINE([HAVE_CURSES_H], [1],
|
||||
[Define to 1 if you have <curses.h>.])])
|
||||
AC_CHECK_LIB(ncurses, initscr,
|
||||
CURSES_LIBS=-lncurses,
|
||||
AC_CHECK_LIB(pdcurses, initscr,
|
||||
|
@ -13,7 +15,32 @@ if test "x$enable_curses" != "xno"; then
|
|||
)
|
||||
)
|
||||
)
|
||||
if test "x$CURSES_LIBS" != "x"; then
|
||||
AC_DEFINE(HAVE_CURSES, 1, [Define if you have the ncurses library])
|
||||
HAVE_CURSES=yes
|
||||
else
|
||||
HAVE_CURSES=no
|
||||
fi
|
||||
else
|
||||
HAVE_CURSES=no
|
||||
CURSES_LIBS=
|
||||
fi
|
||||
AC_SUBST(CURSES_LIBS)
|
||||
|
||||
if test "x$HAVE_CURSES" == "xyes"; then
|
||||
AC_CHECK_HEADER(panel.h,
|
||||
[AC_CHECK_LIB(panel, new_panel,
|
||||
[AC_DEFINE(HAVE_PANEL, 1,
|
||||
[Define if you have the ncurses panel library])
|
||||
PANEL_LIBS=-lpanel
|
||||
HAVE_PANEL=yes],
|
||||
[HAVE_PANEL=no],
|
||||
$CURSES_LIBS
|
||||
)],
|
||||
HAVE_PANEL=no,
|
||||
[]
|
||||
)
|
||||
else
|
||||
PANEL_LIBS=
|
||||
fi
|
||||
AC_SUBST(PANEL_LIBS)
|
||||
|
|
|
@ -35,6 +35,25 @@ if test "x$ac_cv_func_dlopen" != "xyes"; then
|
|||
fi
|
||||
AC_SUBST(DL_LIBS)
|
||||
|
||||
if test "x$DL_LIBS" != "x"; then
|
||||
AC_MSG_CHECKING([for RTLD_NOW])
|
||||
AC_TRY_COMPILE(
|
||||
[#include <dlfcn.h>],
|
||||
[int foo = RTLD_NOW],
|
||||
AC_DEFINE(HAVE_RTLD_NOW, 1, [Define if you have RTLD_NOW.])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AC_MSG_CHECKING([for RTLD_DEEPBIND])
|
||||
AC_TRY_COMPILE(
|
||||
[#include <dlfcn.h>],
|
||||
[int foo = RTLD_DEEPBIND],
|
||||
AC_DEFINE(HAVE_RTLD_DEEPBIND, 1, [Define if you have RTLD_DEEPBIND.])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
fi
|
||||
|
||||
dnl Checks for stricmp/strcasecmp
|
||||
#AC_CHECK_FUNC(strcasecmp,
|
||||
# ,
|
||||
|
|
|
@ -98,6 +98,19 @@ eval expanded_plugindir="$expanded_plugindir"
|
|||
AC_DEFINE_UNQUOTED(FS_PLUGINPATH, "$expanded_plugindir", [Define this to the path from which to load plugins])
|
||||
AC_SUBST(plugindir)
|
||||
|
||||
SHADERDIR="\${libdir}/quakeforge/shaders"
|
||||
if test "x$shaderdir" = "xauto" -o "x$shaderdir" = "xyes" -o "x$shaderdir" = "x"; then
|
||||
shaderdir="$SHADERDIR"
|
||||
elif test "x$shaderdir" = xno; then
|
||||
shaderdir="."
|
||||
else
|
||||
SHADERDIR="$shaderdir"
|
||||
fi
|
||||
eval expanded_shaderdir="$shaderdir"
|
||||
eval expanded_shaderdir="$expanded_shaderdir"
|
||||
AC_DEFINE_UNQUOTED(FS_SHADERPATH, "$expanded_shaderdir", [Define this to the path from which to load shaders])
|
||||
AC_SUBST(plugindir)
|
||||
|
||||
AC_ARG_WITH(gl-driver,
|
||||
[ --with-gl-driver=NAME Name of OpenGL driver DLL/DSO],
|
||||
gl_driver=$withval,
|
||||
|
|
|
@ -9,7 +9,7 @@ AC_ARG_WITH(cpp,
|
|||
if test "x$cpp_name" != xauto; then
|
||||
CPP_NAME="$cpp_name"
|
||||
else
|
||||
CPP_NAME="cpp %d -o %o %i"
|
||||
CPP_NAME="cpp %u %d %s -o %o %i"
|
||||
case "$host_os" in
|
||||
*freebsd*)
|
||||
CPP_NAME="cpp %d %i %o"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
AC_CONFIG_FILES(RPM/Makefile RPM/quakeforge.conf RPM/quakeforge.spec)
|
||||
AC_CONFIG_FILES(RPM/quakeforge.conf RPM/quakeforge.spec)
|
||||
AC_CONFIG_FILES(RPM/build_rpm, [chmod +x RPM/build_rpm])
|
||||
|
|
|
@ -74,9 +74,9 @@ AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT],
|
|||
#endif])
|
||||
|
||||
AC_MSG_CHECKING(for __builtin_expect)
|
||||
AC_TRY_COMPILE(
|
||||
[long (*foo) (long, long) = __builtin_expect;],
|
||||
[],
|
||||
AC_TRY_LINK(
|
||||
[int x;],
|
||||
[if (__builtin_expect(!x, 1)) {}],
|
||||
AC_DEFINE(HAVE___BUILTIN_EXPECT)
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
|
|
21
config.d/vulkan.m4
Normal file
21
config.d/vulkan.m4
Normal file
|
@ -0,0 +1,21 @@
|
|||
dnl Check for vulkan support
|
||||
AC_ARG_ENABLE(vulkan,
|
||||
[ --disable-vulkan do not use Vulkan],
|
||||
HAVE_VULKAN=$enable_vulkan, HAVE_VULKAN=auto)
|
||||
if test "x$HAVE_VULKAN" != xno; then
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
AS_IF([test x"$VULKAN_SDK" != x], [
|
||||
CPPFLAGS="$CPPFLAGS -I$VULKAN_SDK/include"
|
||||
LDFLAGS="$LDFLAGS -L$VULKAN_SDK/lib"
|
||||
glslangvalidator="$VULKAN_SDK/bin/glslangValidator"
|
||||
], [glslangvalidator="glslangValidator"])
|
||||
AC_CHECK_HEADER([vulkan/vulkan.h], [HAVE_VULKAN=yes], [HAVE_VULKAN=no])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
fi
|
||||
if test "x$HAVE_VULKAN" = xyes; then
|
||||
AC_DEFINE([HAVE_VULKAN], [1], [Define if yhou have the Vulkan libs])
|
||||
fi
|
||||
AC_SUBST(VULKAN_LIBS)
|
||||
AC_SUBST(GLSLANGVALIDATOR, [$glslangvalidator])
|
||||
|
||||
AM_CONDITIONAL(X11_VULKAN, test "x$HAVE_VULKAN" = "xyes")
|
|
@ -3,7 +3,7 @@ AC_PREREQ(2.61)
|
|||
|
||||
dnl This is the only place where the package name and version appear
|
||||
AC_INIT([QuakeForge], m4_esyscmd([config.d/git-version-gen --prefix '' .tarball-version]))
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
dnl LT_INIT messes with CFLAGS (evil bastard)
|
||||
if test "x${CFLAGS-unset}" = xunset; then
|
||||
|
@ -63,6 +63,7 @@ m4_include(config.d/compression.m4)
|
|||
m4_include(config.d/mgl.m4)
|
||||
m4_include(config.d/fbdev.m4)
|
||||
m4_include(config.d/svga.m4)
|
||||
m4_include(config.d/vulkan.m4)
|
||||
m4_include(config.d/x11.m4)
|
||||
m4_include(config.d/sdl.m4)
|
||||
|
||||
|
|
23
debian/Makefile.am
vendored
23
debian/Makefile.am
vendored
|
@ -1,23 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
# find -type f | sed -e 's:^\./::g' | grep -v Makefile | sort >> Makefile.am
|
||||
|
||||
EXTRA_DIST= \
|
||||
changelog control copyright quakeforge.conf rules source/format \
|
||||
qfcc.install \
|
||||
quakeforge-alsa.install quakeforge-alsa.postinst quakeforge-alsa.prerm \
|
||||
quakeforge-common.install quakeforge-common.postinst \
|
||||
quakeforge-dev.install \
|
||||
quakeforge-gl.install \
|
||||
quakeforge-glsl.install \
|
||||
quakeforge-jack.install \
|
||||
quakeforge-maptools.install \
|
||||
quakeforge-oss.install quakeforge-oss.postinst quakeforge-oss.prerm \
|
||||
quakeforge-sdl.install \
|
||||
quakeforge-servers.install \
|
||||
quakeforge-stub.postinst \
|
||||
quakeforge-sw32.install \
|
||||
quakeforge-sw.install \
|
||||
quakeforge-utils.install \
|
||||
quakeforge-x11.install
|
28
debian/Makemodule.am
vendored
Normal file
28
debian/Makemodule.am
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
EXTRA_DIST += \
|
||||
debian/changelog \
|
||||
debian/control \
|
||||
debian/copyright \
|
||||
debian/quakeforge.conf \
|
||||
debian/rules \
|
||||
debian/source/format \
|
||||
debian/qfcc.install \
|
||||
debian/quakeforge-alsa.install \
|
||||
debian/quakeforge-alsa.postinst \
|
||||
debian/quakeforge-alsa.prerm \
|
||||
debian/quakeforge-common.install \
|
||||
debian/quakeforge-common.postinst \
|
||||
debian/quakeforge-dev.install \
|
||||
debian/quakeforge-gl.install \
|
||||
debian/quakeforge-glsl.install \
|
||||
debian/quakeforge-jack.install \
|
||||
debian/quakeforge-maptools.install \
|
||||
debian/quakeforge-oss.install \
|
||||
debian/quakeforge-oss.postinst \
|
||||
debian/quakeforge-oss.prerm \
|
||||
debian/quakeforge-sdl.install \
|
||||
debian/quakeforge-servers.install \
|
||||
debian/quakeforge-stub.postinst \
|
||||
debian/quakeforge-sw32.install \
|
||||
debian/quakeforge-sw.install \
|
||||
debian/quakeforge-utils.install \
|
||||
debian/quakeforge-x11.install
|
|
@ -1,49 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
#
|
||||
# Makefile.am
|
||||
#
|
||||
# Automake-using build system for QuakeForge
|
||||
#
|
||||
# Copyright (C) 2000 Jeff Teunissen <deek@quakeforge.net>
|
||||
#
|
||||
# This Makefile is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to:
|
||||
#
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place - Suite 330
|
||||
# Boston, MA 02111-1307, USA
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
# Stuff that is common to both client and server
|
||||
# Desktop files
|
||||
if HAVE_XDG
|
||||
desktopdir=$(datarootdir)/applications
|
||||
desktop_DATA= @NQ_DESKTOP_DATA@ @QW_DESKTOP_DATA@
|
||||
endif
|
||||
|
||||
# Stuff that doesn't get linked into an executable NEEDS to be mentioned here,
|
||||
# or it won't be distributed with 'make dist'
|
||||
|
||||
EXTRA_DIST= quakeforge-nq-glx.desktop quakeforge-nq-sdl.desktop \
|
||||
quakeforge-nq-sdl32.desktop quakeforge-nq-sgl.desktop \
|
||||
quakeforge-nq-x11.desktop quakeforge-qw-glx.desktop \
|
||||
quakeforge-qw-sdl.desktop quakeforge-qw-sdl32.desktop \
|
||||
quakeforge-qw-sgl.desktop quakeforge-qw-x11.desktop
|
||||
|
||||
# Kill the temp files, hopefully.
|
||||
CLEANFILES = *.i *.s $(YACCLEX_CLEANFILES)
|
10
desktop/Makemodule.am
Normal file
10
desktop/Makemodule.am
Normal file
|
@ -0,0 +1,10 @@
|
|||
if HAVE_XDG
|
||||
desktopdir=$(datarootdir)/applications
|
||||
desktop_DATA = @NQ_DESKTOP_DATA@ @QW_DESKTOP_DATA@
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
desktop/quakeforge-nq-sdl.desktop \
|
||||
desktop/quakeforge-nq-x11.desktop \
|
||||
desktop/quakeforge-qw-sdl.desktop \
|
||||
desktop/quakeforge-qw-x11.desktop
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge (GLX)
|
||||
GenericName=Quake (GLX)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=Game;ActionGame;
|
||||
|
||||
Exec=nq-glx
|
||||
TryExec=nq-glx
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge (SDL32)
|
||||
GenericName=Quake (SDL32)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=SDL;Game;ActionGame;
|
||||
|
||||
Exec=nq-sdl32
|
||||
TryExec=nq-sdl32
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge (SDL GL)
|
||||
GenericName=Quake (SDL GL)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=SDL;Game;ActionGame;
|
||||
|
||||
Exec=nq-sgl
|
||||
TryExec=nq-sgl
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge QuakeWorld (GLX)
|
||||
GenericName=QuakeWorld (GLX)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=Game;ActionGame;
|
||||
|
||||
Exec=qw-client-glx
|
||||
TryExec=qw-client-glx
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge QuakeWorld (SDL32)
|
||||
GenericName=QuakeWorld (SDL32)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=SDL;Game;ActionGame;
|
||||
|
||||
Exec=qw-client-sdl32
|
||||
TryExec=qw-client-sdl32
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,18 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
|
||||
Type=Application
|
||||
|
||||
Name=QuakeForge QuakeWorld (SDL GL)
|
||||
GenericName=QuakeWorld (SDL GL)
|
||||
Comment=A first person shooter game
|
||||
Comment[fr]=Un jeu de tir subjectif
|
||||
Comment[it]=Sparatutto in prima persona
|
||||
Icon=quake
|
||||
|
||||
Categories=SDL;Game;ActionGame;
|
||||
|
||||
Exec=qw-client-sgl
|
||||
TryExec=qw-client-sgl
|
||||
Terminal=false
|
||||
StartupNotify=false
|
|
@ -1,55 +0,0 @@
|
|||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
SUBDIRS= man
|
||||
|
||||
DOX= \
|
||||
bind.dox config.dox connect.dox cshifts.dox dirconf.dox faq.dox \
|
||||
filesystem.dox mapformat.dox property-list.dox qtv.dox quakeforge.dox \
|
||||
qw-cap-spec.dox qw-download-spec.dox sound.dox specifications.dox \
|
||||
surround-sound.dox timestamps.dox
|
||||
|
||||
GIB= \
|
||||
gib/GIB.lyx gib/break.gib gib/continue.gib gib/curly.gib gib/examples.sh \
|
||||
gib/for.gib gib/gib_head.eps gib/if-chain.gib gib/if-else.gib \
|
||||
gib/if-simple.gib gib/while.gib
|
||||
|
||||
PROGS= \
|
||||
progs/vm-exec.c progs/vm-mem.fig
|
||||
|
||||
EXTRA_DIST= qf.ico \
|
||||
\
|
||||
skybox.fig template.c template.h \
|
||||
quakeforge.dox.conf.in \
|
||||
\
|
||||
${DOX} ${GIB} ${PROGS} \
|
||||
\
|
||||
config/glspeed-v1.cfg config/glspeed-v3.cfg config/swspeed.cfg \
|
||||
\
|
||||
config/gib/adjustvolume.gib config/gib/infobot.gib config/gib/ln.gib \
|
||||
config/gib/qfadmin.gib config/gib/sshot.gib config/gib/zoom.gib \
|
||||
\
|
||||
qtv/qwtv.fig
|
||||
|
||||
SUFFIXES=.eps .fig .png
|
||||
.fig.png:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L png $< $@
|
||||
|
||||
.fig.eps:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L ps $< $@
|
||||
|
||||
.fig.svg:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L svg $< $@
|
||||
|
||||
clean-local:
|
||||
-rm -fr doxygen
|
||||
|
||||
progs/vm-mem.svg: progs/vm-mem.fig
|
||||
progs/vm-mem.eps: progs/vm-mem.fig
|
||||
qtv/qwtv.svg: qtv/qwtv.fig
|
||||
qtv/qwtv.eps: qtv/qwtv.fig
|
||||
|
||||
doc: quakeforge.dox.conf progs/vm-mem.svg progs/vm-mem.eps qtv/qwtv.svg qtv/qwtv.eps ${DOX}
|
||||
doxygen quakeforge.dox.conf
|
81
doc/Makemodule.am
Normal file
81
doc/Makemodule.am
Normal file
|
@ -0,0 +1,81 @@
|
|||
man_MANS += doc/man/quakeforge.1
|
||||
|
||||
DOX= \
|
||||
doc/bind.dox \
|
||||
doc/config.dox \
|
||||
doc/connect.dox \
|
||||
doc/cshifts.dox \
|
||||
doc/dirconf.dox \
|
||||
doc/faq.dox \
|
||||
doc/filesystem.dox \
|
||||
doc/mapformat.dox \
|
||||
doc/property-list.dox \
|
||||
doc/qtv.dox \
|
||||
doc/quakeforge.dox \
|
||||
doc/qw-cap-spec.dox \
|
||||
doc/qw-download-spec.dox \
|
||||
doc/sound.dox \
|
||||
doc/specifications.dox \
|
||||
doc/surround-sound.dox \
|
||||
doc/timestamps.dox
|
||||
|
||||
GIB= \
|
||||
doc/gib/GIB.lyx \
|
||||
doc/gib/break.gib \
|
||||
doc/gib/continue.gib \
|
||||
doc/gib/curly.gib \
|
||||
doc/gib/examples.sh \
|
||||
doc/gib/for.gib \
|
||||
doc/gib/gib_head.eps \
|
||||
doc/gib/if-chain.gib \
|
||||
doc/gib/if-else.gib \
|
||||
doc/gib/if-simple.gib \
|
||||
doc/gib/while.gib
|
||||
|
||||
PROGS= \
|
||||
doc/progs/vm-exec.c \
|
||||
doc/progs/vm-mem.fig
|
||||
|
||||
EXTRA_DIST += \
|
||||
${DOX} ${GIB} ${PROGS} \
|
||||
doc/qf.ico \
|
||||
doc/skybox.fig \
|
||||
doc/template.c \
|
||||
doc/template.h \
|
||||
doc/quakeforge.dox.conf.in \
|
||||
doc/config/glspeed-v1.cfg \
|
||||
doc/config/glspeed-v3.cfg \
|
||||
doc/config/swspeed.cfg \
|
||||
doc/config/gib/adjustvolume.gib \
|
||||
doc/config/gib/infobot.gib \
|
||||
doc/config/gib/ln.gib \
|
||||
doc/config/gib/qfadmin.gib \
|
||||
doc/config/gib/sshot.gib \
|
||||
doc/config/gib/zoom.gib \
|
||||
doc/man/quakeforge.1 \
|
||||
doc/qtv/qwtv.fig
|
||||
|
||||
SUFFIXES += .eps .fig .png
|
||||
.fig.png:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L png $< $@
|
||||
|
||||
.fig.eps:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L ps $< $@
|
||||
|
||||
.fig.svg:
|
||||
@mkdir -p `dirname $@`
|
||||
fig2dev -L svg $< $@
|
||||
|
||||
clean-local:
|
||||
-rm -fr doxygen
|
||||
|
||||
doc/progs/vm-mem.svg: doc/progs/vm-mem.fig
|
||||
doc/progs/vm-mem.eps: doc/progs/vm-mem.fig
|
||||
doc/qtv/qwtv.svg: doc/qtv/qwtv.fig
|
||||
doc/qtv/qwtv.eps: doc/qtv/qwtv.fig
|
||||
|
||||
.PHONY: doc
|
||||
doc: doc/quakeforge.dox.conf doc/progs/vm-mem.svg doc/progs/vm-mem.eps doc/qtv/qwtv.svg doc/qtv/qwtv.eps ${DOX}
|
||||
doxygen doc/quakeforge.dox.conf
|
|
@ -3,38 +3,39 @@
|
|||
/**
|
||||
\page connection_sequence QW Connection Sequence
|
||||
\msc
|
||||
Client,Server;
|
||||
Client=>Server [label = "getchallenge\n"];
|
||||
Server=>Client [label = "c[challenge][ext]"];
|
||||
Client=>Server [label = "connect [protover] [qport] [challenge] [userinfo]"];
|
||||
Server=>Client [label = "j"];
|
||||
Client->Server [label = "[clc_stringcmd]new"];
|
||||
Server->Client [label = "[svc_serverdata][data]"];
|
||||
|||;
|
||||
Client->Server [label = "[clc_stringcmd]soundlist [svcount] 0"];
|
||||
--- [label = "soundlist loop start"];
|
||||
Server->Client [label = "[svc_soundlist][data][next]"];
|
||||
Client->Server [label = "[clc_stringcmd]soundlist [svcount] [next]"];
|
||||
--- [label = "soundlist loop end"];
|
||||
Server->Client [label = "[svc_soundlist][data]0"];
|
||||
|||;
|
||||
Client->Server [label = "[clc_stringcmd]modellist [svcount] 0"];
|
||||
--- [label = "modellist list loop start"];
|
||||
Server->Client [label = "[svc_modellist][data][next]"];
|
||||
Client->Server [label = "[clc_stringcmd]modellist [svcount] [next]"];
|
||||
--- [label = "modellist list loop end"];
|
||||
Server->Client [label = "[svc_modellist][data]0"];
|
||||
|||;
|
||||
Client->Server [label = "[clc_stringcmd]prespawn [svcount] [n=0] [wcsum]"];
|
||||
--- [label = "prespawn loop start"];
|
||||
Server->Client [label = "[signon buffer n][stuffcmd]prespawn..."];
|
||||
Client->Server [label = "[clc_stringcmd]prespawn [svcount] [n]"];
|
||||
--- [label = "prespawn loop end"];
|
||||
Server->Client [label = "[signon buffer n][stuffcmd]spawn..."];
|
||||
|||;
|
||||
Client->Server [label = "[clc_stringcmd]spawn [svcount] 0"];
|
||||
Server->Client [label = "[spawn info][stuffcmd]skins"];
|
||||
Client->Server [label = "[clc_stringcmd]begin [svcount]"];
|
||||
#... [label = "in game message sequence"];
|
||||
Client [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black],
|
||||
Server [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client=>Server [label = "getchallenge\n", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server=>Client [label = "c[challenge][ext]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client=>Server [label = "connect [protover] [qport] [challenge] [userinfo]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server=>Client [label = "j", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]new", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[svc_serverdata][data]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
||| [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]soundlist [svcount] 0", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "soundlist loop start", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[svc_soundlist][data][next]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]soundlist [svcount] [next]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "soundlist loop end", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[svc_soundlist][data]0", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
||| [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]modellist [svcount] 0", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "modellist list loop start", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[svc_modellist][data][next]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]modellist [svcount] [next]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "modellist list loop end", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[svc_modellist][data]0", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
||| [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]prespawn [svcount] [n=0] [wcsum]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "prespawn loop start", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[signon buffer n][stuffcmd]prespawn...", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]prespawn [svcount] [n]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
--- [label = "prespawn loop end", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[signon buffer n][stuffcmd]spawn...", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
||| [linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]spawn [svcount] 0", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Server->Client [label = "[spawn info][stuffcmd]skins", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
Client->Server [label = "[clc_stringcmd]begin [svcount]", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
... [label = "in game message sequence", linecolor=white, textcolor=white, arclinecolor=white, arctextcolor=white, textbgcolor=black, arctextbgcolor=black];
|
||||
\endmsc
|
||||
*/
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
EXTRA_DIST= quakeforge.1
|
|
@ -23,6 +23,7 @@ call_progs_main (progs_t *pr, int argc, const char **argv)
|
|||
PR_RESET_PARAMS (pr);
|
||||
P_INT (pr, 0) = argc;
|
||||
P_POINTER (pr, 1) = PR_SetPointer (pr, pr_argv);
|
||||
pr->pr_argc = 2;
|
||||
PR_ExecuteProgram (pr, progs_main);
|
||||
PR_PopFrame (pr);
|
||||
PR_Zone_Free (pr, pr_argv);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Doxyfile 1.8.9.1
|
||||
# Doxyfile 1.8.16
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
|
@ -17,11 +17,11 @@
|
|||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# This tag specifies the encoding used for all characters in the configuration
|
||||
# file that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
@ -93,6 +93,14 @@ ALLOW_UNICODE_NAMES = NO
|
|||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
|
@ -179,6 +187,16 @@ SHORT_NAMES = NO
|
|||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
|
||||
# such as
|
||||
# /***************
|
||||
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
|
||||
# Javadoc-style will behave just like regular comments and it will not be
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_BANNER = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
|
||||
|
@ -226,16 +244,15 @@ TAB_SIZE = 4
|
|||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines.
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
|
||||
ALIASES = QF=QuakeForge
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
|
@ -264,17 +281,26 @@ OPTIMIZE_FOR_FORTRAN = NO
|
|||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
|
||||
# sources only. Doxygen will then generate output that is more tailored for that
|
||||
# language. For instance, namespaces will be presented as modules, types will be
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
|
||||
# .inc files as Fortran files (default is PHP), and .f files as C (default is
|
||||
# Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
|
@ -285,7 +311,7 @@ EXTENSION_MAPPING = no_extension=C
|
|||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
|
@ -293,6 +319,15 @@ EXTENSION_MAPPING = no_extension=C
|
|||
|
||||
MARKDOWN_SUPPORT = YES
|
||||
|
||||
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 5
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
# be prevented in individual cases by putting a % sign in front of the word or
|
||||
|
@ -318,7 +353,7 @@ BUILTIN_STL_SUPPORT = NO
|
|||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
|
@ -343,6 +378,13 @@ IDL_PROPERTY_SUPPORT = YES
|
|||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# If one adds a struct or class to a group and this option is enabled, then also
|
||||
# any nested class or struct is added to the same group. By default this option
|
||||
# is disabled and one has to add nested compounds explicitly via \ingroup.
|
||||
# The default value is: NO.
|
||||
|
||||
GROUP_NESTED_COMPOUNDS = YES
|
||||
|
||||
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
|
||||
# (for instance a group of public functions) to be put as a subgroup of that
|
||||
# type (e.g. under the Public Functions section). Set it to NO to prevent
|
||||
|
@ -417,6 +459,12 @@ EXTRACT_ALL = YES
|
|||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
@ -437,7 +485,7 @@ EXTRACT_STATIC = @STATIC_DOC@
|
|||
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
|
||||
# This flag is only useful for Objective-C code. When set to YES, local methods,
|
||||
# This flag is only useful for Objective-C code. If set to YES, local methods,
|
||||
# which are defined in the implementation section but not in the interface are
|
||||
# included in the documentation. If set to NO, only methods in the interface are
|
||||
# included.
|
||||
|
@ -495,7 +543,7 @@ INTERNAL_DOCS = NO
|
|||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# (including Cygwin) ands Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
@ -682,7 +730,7 @@ LAYOUT_FILE =
|
|||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
|
@ -727,11 +775,18 @@ WARN_IF_DOC_ERROR = YES
|
|||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
# will be replaced by the file and line number from which the warning originated
|
||||
|
@ -755,7 +810,7 @@ WARN_LOGFILE =
|
|||
# The INPUT tag is used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like myfile.cpp or
|
||||
# directories like /usr/src/myproject. Separate the files or directories with
|
||||
# spaces.
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = @TOPSRC@/include \
|
||||
|
@ -770,7 +825,7 @@ INPUT = @TOPSRC@/include \
|
|||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
|
@ -778,12 +833,17 @@ INPUT_ENCODING = UTF-8
|
|||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank the
|
||||
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
|
||||
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
|
||||
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
# *.h) to filter out the source-files in the directories.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.h \
|
||||
|
@ -871,9 +931,8 @@ EXAMPLE_RECURSIVE = NO
|
|||
# \image command).
|
||||
|
||||
IMAGE_PATH = @TOPSRC@/doc \
|
||||
@builddir@ \
|
||||
@builddir@/progs \
|
||||
@builddir@/qtv
|
||||
@builddir@/doc/progs \
|
||||
@builddir@/doc/qtv
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
|
@ -889,6 +948,10 @@ IMAGE_PATH = @TOPSRC@/doc \
|
|||
# Note that the filter must not add or remove lines; it is applied before the
|
||||
# code is scanned, but not when the output code is generated. If lines are added
|
||||
# or removed, the anchors will not be placed correctly.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
|
@ -898,6 +961,10 @@ INPUT_FILTER =
|
|||
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
|
||||
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
|
||||
# patterns match the file name, INPUT_FILTER is applied.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
|
||||
|
@ -950,7 +1017,7 @@ INLINE_SOURCES = NO
|
|||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# function all documented functions referencing it will be listed.
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
|
@ -982,12 +1049,12 @@ SOURCE_TOOLTIPS = YES
|
|||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
|
@ -1015,7 +1082,7 @@ VERBATIM_HEADERS = NO
|
|||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# compiled with the --with-libclang option.
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
@ -1028,6 +1095,16 @@ CLANG_ASSISTED_PARSING = NO
|
|||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
|
||||
# were built. This is equivalent to specifying the "-p" option to a clang tool,
|
||||
# such as clang-check. These options will then be passed to the parser.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
CLANG_DATABASE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1039,13 +1116,6 @@ CLANG_OPTIONS =
|
|||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 4
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
|
@ -1146,7 +1216,7 @@ HTML_EXTRA_FILES =
|
|||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
|
@ -1182,6 +1252,17 @@ HTML_COLORSTYLE_GAMMA = 100
|
|||
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
|
@ -1205,13 +1286,13 @@ HTML_INDEX_NUM_ENTRIES = 100
|
|||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# environment (see: https://developer.apple.com/xcode/), introduced with OSX
|
||||
# 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
|
@ -1250,7 +1331,7 @@ DOCSET_PUBLISHER_NAME = Publisher
|
|||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
|
@ -1326,7 +1407,7 @@ QCH_FILE =
|
|||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1334,7 +1415,7 @@ QHP_NAMESPACE = org.doxygen.Project
|
|||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
@ -1343,7 +1424,7 @@ QHP_VIRTUAL_FOLDER = doc
|
|||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1351,7 +1432,7 @@ QHP_CUST_FILTER_NAME =
|
|||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
|
@ -1359,7 +1440,7 @@ QHP_CUST_FILTER_ATTRS =
|
|||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
@ -1452,7 +1533,7 @@ EXT_LINKS_IN_WINDOW = NO
|
|||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
|
@ -1464,7 +1545,7 @@ FORMULA_FONTSIZE = 10
|
|||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
|
@ -1472,7 +1553,7 @@ FORMULA_TRANSPARENT = YES
|
|||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
USE_MATHJAX = NO
|
||||
USE_MATHJAX = YES
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
|
@ -1491,8 +1572,8 @@ MATHJAX_FORMAT = HTML-CSS
|
|||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
|
@ -1553,7 +1634,7 @@ SERVER_BASED_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
|
@ -1566,7 +1647,7 @@ EXTERNAL_SEARCH = NO
|
|||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
|
@ -1618,21 +1699,35 @@ LATEX_OUTPUT = latex
|
|||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
|
||||
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
|
||||
# chosen this is overwritten by pdflatex. For specific output languages the
|
||||
# default can have been set differently, this depends on the implementation of
|
||||
# the output language.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# Note: This tag is used in the Makefile / make.bat.
|
||||
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
|
||||
# (.tex).
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX. In case there is no backslash (\) as first character
|
||||
# it will be automatically added in the LaTeX code.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
|
@ -1648,12 +1743,15 @@ COMPACT_LATEX = YES
|
|||
# The default value is: a4.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
PAPER_TYPE = a4
|
||||
|
||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||
# that should be included in the LaTeX output. To get the times font for
|
||||
# instance you can specify
|
||||
# EXTRA_PACKAGES=times
|
||||
# that should be included in the LaTeX output. The package can be specified just
|
||||
# by its name or with the correct syntax as to be used with the LaTeX
|
||||
# \usepackage command. To get the times font for instance you can specify :
|
||||
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
|
||||
# To use the option intlimits with the amsmath package you can specify:
|
||||
# EXTRA_PACKAGES=[intlimits]{amsmath}
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
|
@ -1750,12 +1848,28 @@ LATEX_SOURCE_CODE = NO
|
|||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BIB_STYLE = plain
|
||||
|
||||
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# path from which the emoji images will be read. If a relative path is entered,
|
||||
# it will be relative to the LATEX_OUTPUT directory. If left blank the
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1795,9 +1909,9 @@ COMPACT_RTF = NO
|
|||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# configuration file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
|
@ -1806,8 +1920,8 @@ RTF_HYPERLINKS = NO
|
|||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# similar to doxygen's configuration file. A template extensions file can be
|
||||
# generated using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
@ -1893,6 +2007,13 @@ XML_OUTPUT = xml
|
|||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
|
||||
# namespace members in file scope as well, matching the HTML output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -1925,9 +2046,9 @@ DOCBOOK_PROGRAMLISTING = NO
|
|||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
|
||||
# the structure of the code including all documentation. Note that this feature
|
||||
# is still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
@ -2010,7 +2131,6 @@ SEARCH_INCLUDES = YES
|
|||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||
|
||||
INCLUDE_PATH = @TOPSRC@/include \
|
||||
@TOPSRC@/hw/include \
|
||||
@TOPSRC@/nq/include \
|
||||
@TOPSRC@/qw/include \
|
||||
@TOPSRC@/qtv/include
|
||||
|
@ -2101,12 +2221,6 @@ EXTERNAL_GROUPS = YES
|
|||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -2120,15 +2234,6 @@ PERL_PATH = /usr/bin/perl
|
|||
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
|
@ -2207,7 +2312,7 @@ COLLABORATION_GRAPH = YES
|
|||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GROUP_GRAPHS = NO
|
||||
GROUP_GRAPHS = YES
|
||||
|
||||
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
|
||||
# collaboration diagrams in a style similar to the OMG's Unified Modeling
|
||||
|
@ -2261,7 +2366,8 @@ INCLUDED_BY_GRAPH = YES
|
|||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command.
|
||||
# functions only using the \callgraph command. Disabling a call graph can be
|
||||
# accomplished by means of the command \hidecallgraph.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
|
@ -2272,7 +2378,8 @@ CALL_GRAPH = NO
|
|||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command.
|
||||
# functions only using the \callergraph command. Disabling a caller graph can be
|
||||
# accomplished by means of the command \hidecallergraph.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
|
@ -2295,13 +2402,17 @@ GRAPHICAL_HIERARCHY = YES
|
|||
DIRECTORY_GRAPH = NO
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot.
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
# output formats in the documentation of the dot tool (Graphviz (see:
|
||||
# http://www.graphviz.org/)).
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
|
||||
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
|
@ -2352,6 +2463,11 @@ DIAFILE_DIRS =
|
|||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
|
||||
# configuration file for plantuml.
|
||||
|
||||
PLANTUML_CFG_FILE =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
SUBDIRS= include source
|
1
hw/Makemodule.am
Normal file
1
hw/Makemodule.am
Normal file
|
@ -0,0 +1 @@
|
|||
include hw/source/Makemodule.am
|
|
@ -1,4 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
|
||||
EXTRA_DIST =
|
|
@ -27,27 +27,17 @@
|
|||
# $Id$
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
bin_PROGRAMS += @HW_TARGETS@
|
||||
|
||||
# Stuff that is common to both client and server
|
||||
AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/hw/include
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
EXTRA_PROGRAMS += hw-master
|
||||
|
||||
bin_PROGRAMS= @HW_TARGETS@
|
||||
|
||||
EXTRA_PROGRAMS= hw-master
|
||||
|
||||
common_ldflags= -export-dynamic
|
||||
hw_master_libs= \
|
||||
$(top_builddir)/libs/net/libnet_chan.la \
|
||||
libs/net/libnet_chan.la \
|
||||
@server_static_plugin_libs@ \
|
||||
$(top_builddir)/libs/console/libQFconsole.la \
|
||||
$(top_builddir)/libs/util/libQFutil.la
|
||||
libs/console/libQFconsole.la \
|
||||
libs/util/libQFutil.la
|
||||
|
||||
hw_master_LDFLAGS= $(common_ldflags)
|
||||
hw_master_LDADD= $(hw_master_libs) $(NET_LIBS)
|
||||
hw_master_DEPENDENCIES= $(hw_master_libs)
|
||||
hw_master_SOURCES= master.c
|
||||
|
||||
# Kill the temp files, hopefully.
|
||||
CLEANFILES = *.i *.s
|
||||
hw_master_SOURCES= hw/source/master.c
|
|
@ -121,7 +121,7 @@ FL_Add (filter_t * filter)
|
|||
filter_list = filter;
|
||||
}
|
||||
|
||||
static filter_t *
|
||||
static __attribute__((pure)) filter_t *
|
||||
FL_Find (netadr_t adr)
|
||||
{
|
||||
filter_t *filter;
|
||||
|
@ -209,7 +209,7 @@ SVL_Add (server_t *sv)
|
|||
sv_list = sv;
|
||||
}
|
||||
|
||||
static server_t *
|
||||
static __attribute__((pure)) server_t *
|
||||
SVL_Find (netadr_t adr)
|
||||
{
|
||||
server_t *sv;
|
||||
|
@ -469,13 +469,10 @@ SV_WriteFilterList (void)
|
|||
}
|
||||
|
||||
static void
|
||||
SV_Shutdown (void)
|
||||
SV_Shutdown (void *data)
|
||||
{
|
||||
NET_Shutdown ();
|
||||
|
||||
// write filter list
|
||||
SV_WriteFilterList ();
|
||||
Con_Shutdown ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -525,7 +522,7 @@ main (int argc, const char **argv)
|
|||
|
||||
mst_cbuf = Cbuf_New (&id_interp);
|
||||
|
||||
Sys_RegisterShutdown (SV_Shutdown);
|
||||
Sys_RegisterShutdown (SV_Shutdown, 0);
|
||||
|
||||
Sys_Init ();
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
AUTOMAKE_OPTIONS= foreign
|
||||
SUBDIRS = QF
|
||||
EXTRA_DIST = \
|
||||
adivtab.h alsa_funcs_list.h anorm_dots.h anorms.h asm_draw.h asm_i386.h \
|
||||
block16.h block8.h buildnum.h clview.h compat.h context_sdl.h \
|
||||
context_x11.h d_iface.h d_ifacea.h d_local.h dga_check.h exp.h fbset.h \
|
||||
garbage.h getopt.h gib_buffer.h gib_builtin.h gib_classes.h \
|
||||
gib_execute.h gib_function.h gib_handle.h gib_object.h gib_parse.h \
|
||||
gib_process.h gib_regex.h gib_semantics.h gib_thread.h gib_tree.h \
|
||||
gib_vars.h gl_warp_sin.h in_win.h logos.h mod_internal.h net_dgrm.h \
|
||||
net_loop.h net_udp.h net_vcr.h net_wins.h netchan.h netmain.h \
|
||||
noisetextures.h old_keys.h ops.h pstdint.h qfalloca.h qstring.h \
|
||||
quakeasm.h r_cvar.h r_dynamic.h r_internal.h r_local.h r_screen.h \
|
||||
r_shared.h regex.h rua_internal.h sbar.h skin_stencil.h snd_internal.h \
|
||||
sv_console.h varrays.h vgamodes.h vid_internal.h vregset.h winquake.h \
|
||||
world.h \
|
||||
\
|
||||
client/entities.h \
|
||||
\
|
||||
qw/bothdefs.h qw/msg_backbuf.h qw/msg_ucmd.h qw/pmove.h qw/protocol.h \
|
||||
\
|
||||
win32/dirent.h win32/fnmatch.h win32/stdint.h \
|
||||
\
|
||||
win32/resources/icon1Vista.ico win32/resources/icon1XP.ico \
|
||||
win32/resources/quakeforge.rc win32/resources/resource.h
|
94
include/Makemodule.am
Normal file
94
include/Makemodule.am
Normal file
|
@ -0,0 +1,94 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
include include/QF/Makemodule.am
|
||||
|
||||
EXTRA_DIST += \
|
||||
include/adivtab.h \
|
||||
include/alsa_funcs_list.h \
|
||||
include/anorm_dots.h \
|
||||
include/anorms.h \
|
||||
include/asm_draw.h \
|
||||
include/asm_i386.h \
|
||||
include/block16.h \
|
||||
include/block8.h \
|
||||
include/buildnum.h \
|
||||
include/compat.h \
|
||||
include/context_sdl.h \
|
||||
include/context_x11.h \
|
||||
include/d_iface.h \
|
||||
include/d_ifacea.h \
|
||||
include/d_local.h \
|
||||
include/dga_check.h \
|
||||
include/exp.h \
|
||||
include/fbset.h \
|
||||
include/garbage.h \
|
||||
include/getopt.h \
|
||||
include/gib_buffer.h \
|
||||
include/gib_builtin.h \
|
||||
include/gib_classes.h \
|
||||
include/gib_execute.h \
|
||||
include/gib_function.h \
|
||||
include/gib_handle.h \
|
||||
include/gib_object.h \
|
||||
include/gib_parse.h \
|
||||
include/gib_process.h \
|
||||
include/gib_regex.h \
|
||||
include/gib_semantics.h \
|
||||
include/gib_thread.h \
|
||||
include/gib_tree.h \
|
||||
include/gib_vars.h \
|
||||
include/gl_warp_sin.h \
|
||||
include/in_win.h \
|
||||
include/logos.h \
|
||||
include/mod_internal.h \
|
||||
include/net_dgrm.h \
|
||||
include/net_loop.h \
|
||||
include/net_udp.h \
|
||||
include/net_vcr.h \
|
||||
include/net_wins.h \
|
||||
include/netchan.h \
|
||||
include/netmain.h \
|
||||
include/noisetextures.h \
|
||||
include/old_keys.h \
|
||||
include/ops.h \
|
||||
include/pstdint.h \
|
||||
include/qfalloca.h \
|
||||
include/qstring.h \
|
||||
include/quakeasm.h \
|
||||
include/r_cvar.h \
|
||||
include/r_dynamic.h \
|
||||
include/r_internal.h \
|
||||
include/r_local.h \
|
||||
include/r_screen.h \
|
||||
include/r_shared.h \
|
||||
include/regex.h \
|
||||
include/rua_internal.h \
|
||||
include/sbar.h \
|
||||
include/skin_stencil.h \
|
||||
include/snd_internal.h \
|
||||
include/sv_console.h \
|
||||
include/varrays.h \
|
||||
include/vgamodes.h \
|
||||
include/vid_gl.h \
|
||||
include/vid_internal.h \
|
||||
include/vid_sw.h \
|
||||
include/vid_vulkan.h \
|
||||
include/vregset.h \
|
||||
include/winquake.h \
|
||||
include/world.h \
|
||||
include/client/effects.h \
|
||||
include/client/entities.h \
|
||||
include/client/temp_entities.h \
|
||||
include/client/locs.h \
|
||||
include/client/view.h \
|
||||
include/qw/bothdefs.h \
|
||||
include/qw/msg_backbuf.h \
|
||||
include/qw/msg_ucmd.h \
|
||||
include/qw/pmove.h \
|
||||
include/qw/protocol.h \
|
||||
include/win32/dirent.h \
|
||||
include/win32/fnmatch.h \
|
||||
include/win32/stdint.h \
|
||||
include/win32/resources/icon1Vista.ico \
|
||||
include/win32/resources/icon1XP.ico \
|
||||
include/win32/resources/quakeforge.rc \
|
||||
include/win32/resources/resource.h
|
|
@ -50,6 +50,6 @@ void gl_lightmap_init (void);
|
|||
void GL_BuildLightmaps (struct model_s **models, int num_models);
|
||||
void R_BlendLightmaps (void);
|
||||
void R_CalcLightmaps (void);
|
||||
extern void (*R_BuildLightMap) (msurface_t *surf);
|
||||
extern void (*R_BuildLightMap) (mod_brush_t *brush, msurface_t *surf);
|
||||
|
||||
#endif // __QF_GL_lightmap_h
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
void glsl_lightmap_init (void);
|
||||
void glsl_R_BuildLightmaps (struct model_s **models, int num_models);
|
||||
void glsl_R_CalcLightmaps (void);
|
||||
extern void (*glsl_R_BuildLightMap) (msurface_t *surf);
|
||||
int glsl_R_LightmapTexture (void);
|
||||
extern void (*glsl_R_BuildLightMap) (mod_brush_t *brush, msurface_t *surf);
|
||||
int glsl_R_LightmapTexture (void) __attribute__((pure));
|
||||
void glsl_R_FlushLightmaps (void);
|
||||
|
||||
#endif//__QF_GLSL_lightmap_h
|
||||
|
|
|
@ -31,15 +31,6 @@
|
|||
#include "QF/qtypes.h"
|
||||
|
||||
typedef struct scrap_s scrap_t;
|
||||
typedef struct subpic_s {
|
||||
const struct subpic_s * const next;
|
||||
const scrap_t * const scrap;
|
||||
const struct vrect_s * const rect;
|
||||
const int tnum; ///< texture number
|
||||
const int width; ///< requested width
|
||||
const int height; ///< requested height
|
||||
const float size; ///< size factor for tex coords (mult)
|
||||
} subpic_t;
|
||||
|
||||
int GLSL_LoadQuakeTexture (const char *identifier, int width, int height,
|
||||
byte *data);
|
||||
|
@ -55,10 +46,12 @@ void GLSL_TextureInit (void);
|
|||
scrap_t *GLSL_CreateScrap (int size, int format, int linear);
|
||||
void GLSL_DestroyScrap (scrap_t *scrap);
|
||||
void GLSL_ScrapClear (scrap_t *scrap);
|
||||
int GLSL_ScrapTexture (scrap_t *scrap);
|
||||
subpic_t *GLSL_ScrapSubpic (scrap_t *scrap, int width, int height); //XXX slow!
|
||||
void GLSL_SubpicDelete (subpic_t *subpic); //XXX slow!
|
||||
void GLSL_SubpicUpdate (subpic_t *subpic, byte *data, int batch);
|
||||
int GLSL_ScrapTexture (scrap_t *scrap) __attribute__((pure));
|
||||
//XXX slow!
|
||||
struct subpic_s *GLSL_ScrapSubpic (scrap_t *scrap, int width, int height);
|
||||
//XXX slow!
|
||||
void GLSL_SubpicDelete (struct subpic_s *subpic);
|
||||
void GLSL_SubpicUpdate (struct subpic_s *subpic, byte *data, int batch);
|
||||
void GLSL_ScrapFlush (scrap_t *scrap);
|
||||
|
||||
#endif//__QF_GLSL_textures_h
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
pkgincludedir = $(includedir)/QF
|
||||
nobase_pkginclude_HEADERS = \
|
||||
alloc.h bspfile.h cbuf.h cdaudio.h checksum.h clip_hull.h cmd.h \
|
||||
console.h crc.h csqc.h cvar.h dstring.h draw.h gib.h hash.h hl.h \
|
||||
idparse.h image.h in_event.h info.h input.h iqm.h joystick.h keys.h \
|
||||
link.h llist.h locs.h mathlib.h mdfour.h mersenne.h model.h modelgen.h \
|
||||
msg.h object.h pak.h pakfile.h pcx.h png.h plugin.h pr_comp.h pr_debug.h \
|
||||
pr_obj.h progs.h qargs.h qdefs.h qendian.h qfplist.h qtypes.h quakefs.h \
|
||||
quakeio.h render.h riff.h ruamoko.h screen.h script.h segtext.h set.h \
|
||||
sizebuf.h skin.h sound.h spritegn.h sys.h teamplay.h tga.h uint32.h va.h \
|
||||
ver_check.h vid.h vrect.h view.h wad.h wadfile.h winding.h zone.h \
|
||||
\
|
||||
GL/ati.h GL/defines.h GL/extensions.h GL/funcs.h GL/qf_draw.h \
|
||||
GL/qf_explosions.h GL/qf_funcs_list.h GL/qf_iqm.h GL/qf_lightmap.h \
|
||||
GL/qf_rlight.h GL/qf_rmain.h GL/qf_rsurf.h GL/qf_sky.h GL/qf_textures.h \
|
||||
GL/qf_vid.h GL/types.h \
|
||||
\
|
||||
GLSL/defines.h GLSL/funcs.h GLSL/qf_alias.h GLSL/qf_bsp.h GLSL/qf_draw.h \
|
||||
GLSL/qf_funcs_list.h GLSL/qf_iqm.h GLSL/qf_lightmap.h GLSL/qf_particles.h \
|
||||
GLSL/qf_textures.h GLSL/qf_vid.h GLSL/types.h \
|
||||
\
|
||||
math/dual.h math/half.h math/matrix3.h math/matrix4.h math/quaternion.h \
|
||||
math/vector.h \
|
||||
\
|
||||
plugin/cd.h plugin/console.h plugin/general.h plugin/input.h \
|
||||
plugin/snd_output.h plugin/snd_render.h plugin/vid_render.h
|
169
include/QF/Makemodule.am
Normal file
169
include/QF/Makemodule.am
Normal file
|
@ -0,0 +1,169 @@
|
|||
include_qf = \
|
||||
include/QF/alloc.h \
|
||||
include/QF/bspfile.h \
|
||||
include/QF/cbuf.h \
|
||||
include/QF/cdaudio.h \
|
||||
include/QF/checksum.h \
|
||||
include/QF/clip_hull.h \
|
||||
include/QF/cmd.h \
|
||||
include/QF/console.h \
|
||||
include/QF/crc.h \
|
||||
include/QF/csqc.h \
|
||||
include/QF/cvar.h \
|
||||
include/QF/darray.h \
|
||||
include/QF/dstring.h \
|
||||
include/QF/draw.h \
|
||||
include/QF/gib.h \
|
||||
include/QF/hash.h \
|
||||
include/QF/idparse.h \
|
||||
include/QF/image.h \
|
||||
include/QF/in_event.h \
|
||||
include/QF/info.h \
|
||||
include/QF/input.h \
|
||||
include/QF/iqm.h \
|
||||
include/QF/joystick.h \
|
||||
include/QF/keys.h \
|
||||
include/QF/link.h \
|
||||
include/QF/llist.h \
|
||||
include/QF/mathlib.h \
|
||||
include/QF/mdfour.h \
|
||||
include/QF/mersenne.h \
|
||||
include/QF/model.h \
|
||||
include/QF/modelgen.h \
|
||||
include/QF/msg.h \
|
||||
include/QF/object.h \
|
||||
include/QF/pak.h \
|
||||
include/QF/pakfile.h \
|
||||
include/QF/pcx.h \
|
||||
include/QF/png.h \
|
||||
include/QF/plist.h \
|
||||
include/QF/plugin.h \
|
||||
include/QF/pr_comp.h \
|
||||
include/QF/pr_debug.h \
|
||||
include/QF/pr_obj.h \
|
||||
include/QF/pr_type.h \
|
||||
include/QF/progs.h \
|
||||
include/QF/qargs.h \
|
||||
include/QF/qdefs.h \
|
||||
include/QF/qendian.h \
|
||||
include/QF/qtypes.h \
|
||||
include/QF/quakefs.h \
|
||||
include/QF/quakeio.h \
|
||||
include/QF/render.h \
|
||||
include/QF/riff.h \
|
||||
include/QF/ringbuffer.h \
|
||||
include/QF/ruamoko.h \
|
||||
include/QF/screen.h \
|
||||
include/QF/script.h \
|
||||
include/QF/segtext.h \
|
||||
include/QF/set.h \
|
||||
include/QF/sizebuf.h \
|
||||
include/QF/skin.h \
|
||||
include/QF/sound.h \
|
||||
include/QF/spritegn.h \
|
||||
include/QF/sys.h \
|
||||
include/QF/teamplay.h \
|
||||
include/QF/tga.h \
|
||||
include/QF/txtbuffer.h \
|
||||
include/QF/va.h \
|
||||
include/QF/ver_check.h \
|
||||
include/QF/vid.h \
|
||||
include/QF/vrect.h \
|
||||
include/QF/view.h \
|
||||
include/QF/wad.h \
|
||||
include/QF/wadfile.h \
|
||||
include/QF/winding.h \
|
||||
include/QF/zone.h
|
||||
|
||||
include_qf_gl = \
|
||||
include/QF/GL/ati.h \
|
||||
include/QF/GL/defines.h \
|
||||
include/QF/GL/extensions.h \
|
||||
include/QF/GL/funcs.h \
|
||||
include/QF/GL/qf_draw.h \
|
||||
include/QF/GL/qf_explosions.h \
|
||||
include/QF/GL/qf_funcs_list.h \
|
||||
include/QF/GL/qf_iqm.h \
|
||||
include/QF/GL/qf_lightmap.h \
|
||||
include/QF/GL/qf_rlight.h \
|
||||
include/QF/GL/qf_rmain.h \
|
||||
include/QF/GL/qf_rsurf.h \
|
||||
include/QF/GL/qf_sky.h \
|
||||
include/QF/GL/qf_textures.h \
|
||||
include/QF/GL/qf_vid.h \
|
||||
include/QF/GL/types.h
|
||||
|
||||
include_qf_glsl = \
|
||||
include/QF/GLSL/defines.h \
|
||||
include/QF/GLSL/funcs.h \
|
||||
include/QF/GLSL/qf_alias.h \
|
||||
include/QF/GLSL/qf_bsp.h \
|
||||
include/QF/GLSL/qf_draw.h \
|
||||
include/QF/GLSL/qf_funcs_list.h \
|
||||
include/QF/GLSL/qf_iqm.h \
|
||||
include/QF/GLSL/qf_lightmap.h \
|
||||
include/QF/GLSL/qf_particles.h \
|
||||
include/QF/GLSL/qf_textures.h \
|
||||
include/QF/GLSL/qf_vid.h \
|
||||
include/QF/GLSL/types.h
|
||||
|
||||
include_qf_math = \
|
||||
include/QF/math/dual.h \
|
||||
include/QF/math/half.h \
|
||||
include/QF/math/matrix3.h \
|
||||
include/QF/math/matrix4.h \
|
||||
include/QF/math/quaternion.h \
|
||||
include/QF/math/vector.h
|
||||
|
||||
include_qf_plugin = \
|
||||
include/QF/plugin/cd.h \
|
||||
include/QF/plugin/console.h \
|
||||
include/QF/plugin/general.h \
|
||||
include/QF/plugin/input.h \
|
||||
include/QF/plugin/snd_output.h \
|
||||
include/QF/plugin/snd_render.h \
|
||||
include/QF/plugin/vid_render.h
|
||||
|
||||
include_qf_vulkan = \
|
||||
include/QF/Vulkan/buffer.h \
|
||||
include/QF/Vulkan/command.h \
|
||||
include/QF/Vulkan/cvars.h \
|
||||
include/QF/Vulkan/descriptor.h \
|
||||
include/QF/Vulkan/device.h \
|
||||
include/QF/Vulkan/funclist.h \
|
||||
include/QF/Vulkan/image.h \
|
||||
include/QF/Vulkan/instance.h \
|
||||
include/QF/Vulkan/memory.h \
|
||||
include/QF/Vulkan/pipeline.h \
|
||||
include/QF/Vulkan/qf_draw.h \
|
||||
include/QF/Vulkan/qf_vid.h \
|
||||
include/QF/Vulkan/renderpass.h \
|
||||
include/QF/Vulkan/swapchain.h
|
||||
|
||||
# headers shared with ruamoko
|
||||
qfcc_include_qf = include/QF/keys.h
|
||||
|
||||
qf_includedir = $(includedir)/QF
|
||||
qf_gl_includedir = $(includedir)/QF/GL
|
||||
qf_glsl_includedir = $(includedir)/QF/GLSL
|
||||
qf_math_includedir = $(includedir)/QF/math
|
||||
qf_plugin_includedir = $(includedir)/QF/plugin
|
||||
qf_vulkan_includedir = $(includedir)/QF/vulkan
|
||||
qf_include_HEADERS = @qfac_include_qf@
|
||||
qf_gl_include_HEADERS = @qfac_include_qf_gl@
|
||||
qf_glsl_include_HEADERS = @qfac_include_qf_glsl@
|
||||
qf_math_include_HEADERS = @qfac_include_qf_math@
|
||||
qf_plugin_include_HEADERS = @qfac_include_qf_plugin@
|
||||
qf_vulkan_include_HEADERS = @qfac_include_qf_vulkan@
|
||||
|
||||
ruamoko_qf_includedir = $(ruamoko_includedir)/QF
|
||||
ruamoko_qf_include_HEADERS = @qfac_qfcc_include_qf@
|
||||
|
||||
EXTRA_HEADERS += \
|
||||
$(include_qf) \
|
||||
$(include_qf_gl) \
|
||||
$(include_qf_glsl) \
|
||||
$(include_qf_math) \
|
||||
$(include_qf_plugin) \
|
||||
$(include_qf_vulkan) \
|
||||
$(qfcc_include_qf)
|
22
include/QF/Vulkan/barrier.h
Normal file
22
include/QF/Vulkan/barrier.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef __QF_Vulkan_barrier_h
|
||||
#define __QF_Vulkan_barrier_h
|
||||
|
||||
typedef struct {
|
||||
VkPipelineStageFlags src;
|
||||
VkPipelineStageFlags dst;
|
||||
} qfv_pipelinestagepair_t;
|
||||
|
||||
//XXX Note: imageLayoutTransitionBarriers, imageLayoutTransitionStages and
|
||||
// the enum must be kept in sync
|
||||
enum {
|
||||
qfv_LT_Undefined_to_TransferDst,
|
||||
qfv_LT_TransferDst_to_ShaderReadOnly,
|
||||
qfv_LT_ShaderReadOnly_to_TransferDst,
|
||||
qfv_LT_Undefined_to_DepthStencil,
|
||||
qfv_LT_Undefined_to_Color,
|
||||
};
|
||||
|
||||
extern const VkImageMemoryBarrier imageLayoutTransitionBarriers[];
|
||||
extern const qfv_pipelinestagepair_t imageLayoutTransitionStages[];
|
||||
|
||||
#endif//__QF_Vulkan_barrier_h
|
48
include/QF/Vulkan/buffer.h
Normal file
48
include/QF/Vulkan/buffer.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef __QF_Vulkan_buffer_h
|
||||
#define __QF_Vulkan_buffer_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_buffertransition_s {
|
||||
VkBuffer buffer;
|
||||
VkAccessFlags srcAccess;
|
||||
VkAccessFlags dstAccess;
|
||||
uint32_t srcQueueFamily;
|
||||
uint32_t dstQueueFamily;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize size;
|
||||
} qfv_buffertransition_t;
|
||||
|
||||
typedef struct qfv_buffertransitionset_s
|
||||
DARRAY_TYPE (qfv_buffertransition_t) qfv_buffertransitionset_t;
|
||||
typedef struct qfv_bufferbarrierset_s
|
||||
DARRAY_TYPE (VkBufferMemoryBarrier) qfv_bufferbarrierset_t;
|
||||
|
||||
typedef struct qfv_bufferset_s
|
||||
DARRAY_TYPE (VkBuffer) qfv_bufferset_t;
|
||||
#define QFV_AllocBufferSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_bufferset_t, num, allocator)
|
||||
|
||||
struct qfv_device_s;
|
||||
VkBuffer QFV_CreateBuffer (struct qfv_device_s *device,
|
||||
VkDeviceSize size,
|
||||
VkBufferUsageFlags usage);
|
||||
|
||||
VkDeviceMemory QFV_AllocBufferMemory (struct qfv_device_s *device,
|
||||
VkBuffer buffer,
|
||||
VkMemoryPropertyFlags properties,
|
||||
VkDeviceSize size, VkDeviceSize offset);
|
||||
|
||||
int QFV_BindBufferMemory (struct qfv_device_s *device,
|
||||
VkBuffer buffer, VkDeviceMemory object,
|
||||
VkDeviceSize offset);
|
||||
|
||||
qfv_bufferbarrierset_t *
|
||||
QFV_CreateBufferTransitions (qfv_buffertransition_t *transitions,
|
||||
int numTransitions);
|
||||
|
||||
VkBufferView QFV_CreateBufferView (struct qfv_device_s *device,
|
||||
VkBuffer buffer, VkFormat format,
|
||||
VkDeviceSize offset, VkDeviceSize size);
|
||||
|
||||
#endif//__QF_Vulkan_buffer_h
|
43
include/QF/Vulkan/capture.h
Normal file
43
include/QF/Vulkan/capture.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef __QF_Vulkan_capture_h
|
||||
#define __QF_Vulkan_capture_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
typedef struct qfv_capture_image_s {
|
||||
VkImage image;
|
||||
VkImageLayout layout;
|
||||
VkCommandBuffer cmd;
|
||||
byte *data;
|
||||
} qfv_capture_image_t;
|
||||
|
||||
typedef struct qfv_capture_image_set_s
|
||||
DARRAY_TYPE (qfv_capture_image_t) qfv_capture_image_set_t;
|
||||
|
||||
#define QFV_AllocCaptureImageSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_capture_image_set_t, num, allocator)
|
||||
|
||||
typedef struct qfv_capture_s {
|
||||
struct qfv_device_s *device;
|
||||
|
||||
int canBlit;
|
||||
VkExtent2D extent;
|
||||
qfv_capture_image_set_t *image_set;
|
||||
size_t memsize;
|
||||
VkDeviceMemory memory;
|
||||
} qfv_capture_t;
|
||||
|
||||
struct qfv_swapchain_s;
|
||||
|
||||
qfv_capture_t *QFV_CreateCapture (struct qfv_device_s *device, int numframes,
|
||||
struct qfv_swapchain_s *swapchain,
|
||||
VkCommandPool cmdPool);
|
||||
void QFV_RenewCapture (qfv_capture_t *capture,
|
||||
struct qfv_swapchain_s *swapchain);
|
||||
void QFV_DestroyCapture (qfv_capture_t *capture);
|
||||
|
||||
VkCommandBuffer QFV_CaptureImage (qfv_capture_t *capture, VkImage scImage,
|
||||
int frame);
|
||||
const byte *QFV_CaptureData (qfv_capture_t *capture, int frame) __attribute__((pure));
|
||||
|
||||
#endif//__QF_Vulkan_capture_h
|
47
include/QF/Vulkan/command.h
Normal file
47
include/QF/Vulkan/command.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#ifndef __QF_Vulkan_command_h
|
||||
#define __QF_Vulkan_command_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_cmdbufferset_s
|
||||
DARRAY_TYPE (VkCommandBuffer) qfv_cmdbufferset_t;
|
||||
|
||||
#define QFV_AllocCommandBufferSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_cmdbufferset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_semaphoreset_s
|
||||
DARRAY_TYPE (VkSemaphore) qfv_semaphoreset_t;
|
||||
|
||||
typedef struct qfv_fenceset_s
|
||||
DARRAY_TYPE (VkFence) qfv_fenceset_t;
|
||||
|
||||
#define QFV_AllocFenceSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_fenceset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_bufferimagecopy_s
|
||||
DARRAY_TYPE (VkBufferImageCopy) qfv_bufferimagecopy_t;
|
||||
|
||||
#define QFV_AllocBufferImageCopy(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_bufferimagecopy_t, num, allocator)
|
||||
|
||||
struct qfv_queue_s;
|
||||
struct qfv_device_s;
|
||||
VkCommandPool QFV_CreateCommandPool (struct qfv_device_s *device,
|
||||
uint32_t queueFamily,
|
||||
int transient, int reset);
|
||||
/** Allocate bufferset->size command buffers
|
||||
*/
|
||||
int QFV_AllocateCommandBuffers (struct qfv_device_s *device,
|
||||
VkCommandPool pool, int secondary,
|
||||
qfv_cmdbufferset_t *bufferset);
|
||||
|
||||
VkSemaphore QFV_CreateSemaphore (struct qfv_device_s *device);
|
||||
VkFence QFV_CreateFence (struct qfv_device_s *device, int signaled);
|
||||
int QFV_QueueSubmit (struct qfv_queue_s *queue,
|
||||
qfv_semaphoreset_t *waitSemaphores,
|
||||
VkPipelineStageFlags *stages,
|
||||
qfv_cmdbufferset_t *buffers,
|
||||
qfv_semaphoreset_t *signalSemaphores, VkFence fence);
|
||||
int QFV_QueueWaitIdle (struct qfv_queue_s *queue);
|
||||
|
||||
#endif//__QF_Vulkan_command_h
|
8
include/QF/Vulkan/cvars.h
Normal file
8
include/QF/Vulkan/cvars.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef __QF_Vulkan_cvars_h
|
||||
#define __QF_Vulkan_cvars_h
|
||||
|
||||
extern struct cvar_s *vulkan_use_validation;
|
||||
extern struct cvar_s *vulkan_presentation_mode;
|
||||
extern struct cvar_s *vulkan_frame_count;
|
||||
|
||||
#endif//__QF_Vulkan_cvars_h
|
115
include/QF/Vulkan/debug.h
Normal file
115
include/QF/Vulkan/debug.h
Normal file
|
@ -0,0 +1,115 @@
|
|||
#ifndef __QF_Vulkan_debug_h
|
||||
#define __QF_Vulkan_debug_h
|
||||
|
||||
#define QFV_duCmdBeginLabel(device, cmd, name...)\
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkCmdBeginDebugUtilsLabelEXT) { \
|
||||
VkDebugUtilsLabelEXT label = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, 0, name \
|
||||
}; \
|
||||
dfunc->vkCmdBeginDebugUtilsLabelEXT (cmd, &label); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duCmdEndLabel(device, cmd) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkCmdEndDebugUtilsLabelEXT) { \
|
||||
dfunc->vkCmdEndDebugUtilsLabelEXT (cmd); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duCmdInsertLabel(device, cmd, name...) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkCmdInsertDebugUtilsLabelEXT) { \
|
||||
VkDebugUtilsLabelEXT label = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, 0, name \
|
||||
}; \
|
||||
dfunc->vkCmdInsertDebugUtilsLabelEXT (cmd, &label); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duCreateMessenger(inst, severity, type, callback, data, messenger)\
|
||||
do { \
|
||||
if (inst->funcs->vkCreateDebugUtilsMessengerEXT) { \
|
||||
VkDebugUtilsMessengerCreateInfoEXT createInfo = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, 0, 0,\
|
||||
severity, type, callback, data \
|
||||
}; \
|
||||
inst->funcs->vkCreateDebugUtilsMessengerEXT (inst, &createInfo, 0,\
|
||||
messenger); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duDestroyMessenger(inst, messenger) \
|
||||
do { \
|
||||
if (inst->funcs->vkDestroyDebugUtilsMessengerEXT) { \
|
||||
inst->funcs->vkDestroyDebugUtilsMessengerEXT (inst, messenger, 0);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duQueueBeginLabel(device, queue, name...) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkQueueBeginDebugUtilsLabelEXT) { \
|
||||
VkDebugUtilsLabelEXT label = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, 0, name \
|
||||
}; \
|
||||
dfunc->vkQueueBeginDebugUtilsLabelEXT (queue, &label); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duQueueEndLabel(device, queue) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkQueueEndDebugUtilsLabelEXT) { \
|
||||
dfunc->vkQueueEndDebugUtilsLabelEXT (queue); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duQueueInsertLabel(device, queue, name...) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkQueueInsertDebugUtilsLabelEXT) { \
|
||||
VkDebugUtilsLabelEXT label = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, 0, name \
|
||||
}; \
|
||||
dfunc->vkQueueInsertDebugUtilsLabelEXT (queue, &label); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duSetObjectName(device, type, handle, name) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkSetDebugUtilsObjectNameEXT) { \
|
||||
VkDebugUtilsObjectNameInfoEXT nameInfo = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, 0, \
|
||||
type, (uint64_t) handle, name \
|
||||
}; \
|
||||
dfunc->vkSetDebugUtilsObjectNameEXT (device->dev, &nameInfo); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duSetObjectTag(device, type, handle, name, size, tag) \
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
if (dfunc->vkSetDebugUtilsObjectTagEXT) { \
|
||||
VkDebugUtilsObjectTagInfoEXT tagInfo = { \
|
||||
VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT, 0, \
|
||||
type, handle, name, size, tag \
|
||||
}; \
|
||||
dfunc->vkSetDebugUtilsObjectTagEXT (device->dev, &tagInfo); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define QFV_duSubmitMessage(inst, severity, types, data) \
|
||||
do { \
|
||||
if (inst->funcs->vkSubmitDebugUtilsMessageEXT) { \
|
||||
inst->funcs->vkSubmitDebugUtilsMessageEXT (inst, severity, types, \
|
||||
data); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif//__QF_Vulkan_debug_h
|
62
include/QF/Vulkan/descriptor.h
Normal file
62
include/QF/Vulkan/descriptor.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
#ifndef __QF_Vulkan_descriptor_h
|
||||
#define __QF_Vulkan_descriptor_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_bindingset_s
|
||||
DARRAY_TYPE (VkDescriptorSetLayoutBinding) qfv_bindingset_t;
|
||||
|
||||
typedef struct qfv_descriptorsetlayoutset_s
|
||||
DARRAY_TYPE (VkDescriptorSetLayout) qfv_descriptorsetlayoutset_t;
|
||||
|
||||
#define QFV_AllocDescriptorSetLayoutSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_descriptorsetlayoutset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_descriptorsets_s
|
||||
DARRAY_TYPE (VkDescriptorSet) qfv_descriptorsets_t;
|
||||
|
||||
#define QFV_AllocDescriptorSets(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_descriptorsets_t, num, allocator)
|
||||
|
||||
typedef struct qfv_writedescriptorsets_s
|
||||
DARRAY_TYPE (VkWriteDescriptorSet) qfv_writedescriptorsets_t;
|
||||
|
||||
#define QFV_AllocWriteDescriptorSets(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_writedescriptorsets_t, num, allocator)
|
||||
|
||||
typedef struct qfv_copydescriptorsets_s
|
||||
DARRAY_TYPE (VkCopyDescriptorSet) qfv_copydescriptorsets_t;
|
||||
|
||||
#define QFV_AllocCopyDescriptorSets(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_descriptorsetlayoutset_t, num, allocator)
|
||||
|
||||
struct qfv_device_s;
|
||||
|
||||
VkSampler QFV_CreateSampler (struct qfv_device_s *device,
|
||||
VkFilter magFilter, VkFilter minFilter,
|
||||
VkSamplerMipmapMode mipmapMode,
|
||||
VkSamplerAddressMode addressModeU,
|
||||
VkSamplerAddressMode addressModeV,
|
||||
VkSamplerAddressMode addressModeW,
|
||||
float mipLodBias,
|
||||
VkBool32 anisotryEnable, float maxAnisotropy,
|
||||
VkBool32 compareEnable, VkCompareOp compareOp,
|
||||
float minLod, float maxLod,
|
||||
VkBorderColor borderColor,
|
||||
VkBool32 unnormalizedCoordinates);
|
||||
|
||||
VkDescriptorSetLayout
|
||||
QFV_CreateDescriptorSetLayout (struct qfv_device_s *device,
|
||||
qfv_bindingset_t *bindings);
|
||||
|
||||
VkDescriptorPool
|
||||
QFV_CreateDescriptorPool (struct qfv_device_s *device,
|
||||
VkDescriptorPoolCreateFlags flags, uint32_t maxSets,
|
||||
qfv_bindingset_t *bindings);
|
||||
|
||||
qfv_descriptorsets_t *
|
||||
QFV_AllocateDescriptorSet (struct qfv_device_s *device,
|
||||
VkDescriptorPool pool,
|
||||
qfv_descriptorsetlayoutset_t *layouts);
|
||||
|
||||
#endif//__QF_Vulkan_descriptor_h
|
39
include/QF/Vulkan/device.h
Normal file
39
include/QF/Vulkan/device.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef __QF_Vulkan_device_h
|
||||
#define __QF_Vulkan_device_h
|
||||
|
||||
typedef struct qfv_devfuncs_s {
|
||||
#define DEVICE_LEVEL_VULKAN_FUNCTION(name) PFN_##name name;
|
||||
#define DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION(name,ext) PFN_##name name;
|
||||
#include "QF/Vulkan/funclist.h"
|
||||
} qfv_devfuncs_t;
|
||||
|
||||
typedef struct qfv_queue_s {
|
||||
struct qfv_device_s *device;
|
||||
|
||||
int32_t queueFamily;
|
||||
VkQueue queue;
|
||||
} qfv_queue_t;
|
||||
|
||||
struct qfv_instance_s;
|
||||
typedef struct qfv_device_s {
|
||||
VkDevice dev;
|
||||
struct qfv_physdev_s *physDev;
|
||||
qfv_devfuncs_t *funcs;
|
||||
qfv_queue_t queue;
|
||||
struct strset_s *enabled_extensions;
|
||||
int (*extension_enabled) (struct qfv_device_s *inst,
|
||||
const char *ext);
|
||||
} qfv_device_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
qfv_device_t *QFV_CreateDevice (struct vulkan_ctx_s *ctx,
|
||||
const char **extensions);
|
||||
void QFV_DestroyDevice (qfv_device_t *device);
|
||||
int QFV_DeviceWaitIdle (qfv_device_t *device);
|
||||
|
||||
VkFormat QFV_FindSupportedFormat (qfv_device_t *device, VkImageTiling tiling,
|
||||
VkFormatFeatureFlags features,
|
||||
int numCandidates,
|
||||
const VkFormat *candidates);
|
||||
|
||||
#endif//__QF_Vulkan_device_h
|
237
include/QF/Vulkan/draw.h
Normal file
237
include/QF/Vulkan/draw.h
Normal file
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
draw.h
|
||||
|
||||
Video buffer handling definitions and prototypes
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_draw_h
|
||||
#define __QF_draw_h
|
||||
|
||||
/** \defgroup video Video Sub-sytem */
|
||||
|
||||
/** \defgroup video_renderer Renderer Sub-system
|
||||
\ingroup video
|
||||
*/
|
||||
|
||||
/** \defgroup video_renderer_draw Generic draw functions
|
||||
\ingroup video_renderer
|
||||
*/
|
||||
///@{
|
||||
|
||||
#include "QF/wad.h"
|
||||
|
||||
extern byte *draw_chars;
|
||||
|
||||
/** Initialize the draw stuff.
|
||||
*/
|
||||
void Draw_Init (void);
|
||||
|
||||
/** Draws one 8*8 graphics character with 0 being transparent.
|
||||
It can be clipped to the top of the screen to allow the console to be
|
||||
smoothly scrolled off.
|
||||
\param x horizontal location of the top left corner of the character.
|
||||
\param y vertical location of the top left corner of the character.
|
||||
\param ch 8 bit character to draw.
|
||||
\note The character drawn is from the quake character set, which is
|
||||
(by default) standard ascii for 0x20-0x7e (white). 0xa0-0xfe is
|
||||
also standard ascii (brown). 0x01-0x1f and 0x80-0x9f are
|
||||
various drawing characters, and 0x7f is a backwards arrow.
|
||||
*/
|
||||
void Draw_Character (int x, int y, unsigned ch);
|
||||
|
||||
/** Draws a character string to the screen.
|
||||
No line wrapping is performed.
|
||||
\param x horizontal location of the top left corner of the character.
|
||||
\param y vertical location of the top left corner of the character.
|
||||
\param str 8 bit character string to draw.
|
||||
\note See Draw_Character() for character set description.
|
||||
String is normal nul terminated C string.
|
||||
*/
|
||||
void Draw_String (int x, int y, const char *str);
|
||||
|
||||
/** Draws a character sub-string to the screen.
|
||||
No line wrapping is performed.
|
||||
\param x horizontal location of the top left corner of the character.
|
||||
\param y vertical location of the top left corner of the character.
|
||||
\param str 8 bit character string to draw.
|
||||
\param count Maximum characters of the string to draw.
|
||||
\note See Draw_Character() for character set description.
|
||||
Draws up to \p count characters, or stops at the first nul
|
||||
character.
|
||||
*/
|
||||
void Draw_nString (int x, int y, const char *str, int count);
|
||||
|
||||
/** Draws a character string to the screen.
|
||||
No line wrapping is performed.
|
||||
\param x horizontal location of the top left corner of the character.
|
||||
\param y vertical location of the top left corner of the character.
|
||||
\param str 8 bit character string to draw.
|
||||
\note See Draw_Character() for character set description.
|
||||
String is normal nul terminated C string.
|
||||
Characters of the string are forced to have their high bit set
|
||||
(ie, they will be in the range 0x80-0xff).
|
||||
*/
|
||||
void Draw_AltString (int x, int y, const char *str);
|
||||
|
||||
/** Draw the console background with various optional effects.
|
||||
\param lines Vertical size in pixels of the console.
|
||||
\param alpha Console transparency level (255 = opaque).
|
||||
\note \p alpha is effective only in the OpenGL renderer. Effectively
|
||||
255 (opaque) for the software renderer.
|
||||
|
||||
\c gl_conspin causes the background to spin.
|
||||
|
||||
\c gl_constretch causes the background to stretch rather than slide.
|
||||
*/
|
||||
void Draw_ConsoleBackground (int lines, byte alpha);
|
||||
|
||||
/** Draw a crosshair at the center of the screen.
|
||||
\c crosshair specifies which crosshair (1 = '+', 2 = large 'x' shape,
|
||||
3 = fancy '+' shape)
|
||||
\c cl_crossx and \c cl_crossy offset the crosshair from the center of the
|
||||
screen.
|
||||
*/
|
||||
void Draw_Crosshair (void);
|
||||
|
||||
/** Draw the specified crosshair on the screen.
|
||||
\param ch crosshair to draw
|
||||
\param x horizontal position of the center of the crosshair.
|
||||
\param y vertical position of the center of the crosshair.
|
||||
|
||||
See Draw_Crosshair() for description of crosshair values.
|
||||
*/
|
||||
void Draw_CrosshairAt (int ch, int x, int y);
|
||||
|
||||
/** Clear a rectangle with a tiled background.
|
||||
\param x horizontal position of the upper left corner of the rectangle
|
||||
\param y horizontal position of the upper left corner of the rectangle
|
||||
\param w width of the rectangle
|
||||
\param h height of the rectangle
|
||||
|
||||
The background used is the "backtile" WAD lump.
|
||||
*/
|
||||
void Draw_TileClear (int x, int y, int w, int h);
|
||||
|
||||
/** Clear a rectangle with a solid color.
|
||||
\param x horizontal position of the upper left corner of the rectangle
|
||||
\param y horizontal position of the upper left corner of the rectangle
|
||||
\param w width of the rectangle
|
||||
\param h height of the rectangle
|
||||
\param c 8 bit color index.
|
||||
|
||||
The color comes from the quake palette.
|
||||
*/
|
||||
void Draw_Fill (int x, int y, int w, int h, int c);
|
||||
|
||||
/** Draw a text box on the screen
|
||||
\param x horizontal location of the upper left corner of the box
|
||||
\param y vertical location of the upper left corner of the box
|
||||
\param width horizontal size in character cells of the region
|
||||
\param lines vertical size in character cells of the region
|
||||
\param alpha transparency of the box
|
||||
*/
|
||||
void Draw_TextBox (int x, int y, int width, int lines, byte alpha);
|
||||
|
||||
/** Darken the screen.
|
||||
*/
|
||||
void Draw_FadeScreen (void);
|
||||
|
||||
/** Shift the screen colors.
|
||||
*/
|
||||
void Draw_BlendScreen (quat_t color);
|
||||
///@}
|
||||
|
||||
/** \defgroup video_renderer_draw_qpic QPic functions
|
||||
\ingroup video_renderer_draw
|
||||
*/
|
||||
///@{
|
||||
/** Load a qpic from the filesystem.
|
||||
\param path path of the file within the quake filesystem
|
||||
\param alpha transparency level of the pic.
|
||||
\return pointer qpic data.
|
||||
\note Up to MAX_CACHED_PICS qpics can be loaded at a time this way
|
||||
*/
|
||||
qpic_t *Draw_CachePic (const char *path, qboolean alpha);
|
||||
|
||||
/** Remove a qpic from the qpic cache.
|
||||
|
||||
This affects only those qpics that were loaded via Draw_CachePic.
|
||||
|
||||
\param path path of the file within the quake filesystem
|
||||
*/
|
||||
void Draw_UncachePic (const char *path);
|
||||
|
||||
/** Create a qpic from raw data.
|
||||
|
||||
\param width The width of the pic.
|
||||
\param height The height of the pic.
|
||||
\param data The raw data bytes. The system palette will be used for
|
||||
colors.
|
||||
\return pointer qpic data.
|
||||
*/
|
||||
qpic_t *Draw_MakePic (int width, int height, const byte *data);
|
||||
|
||||
/** Destroy a qpic created by Draw_MakePic.
|
||||
|
||||
\param pic The qpic to destory.
|
||||
*/
|
||||
void Draw_DestroyPic (qpic_t *pic);
|
||||
|
||||
/** Load a qpic from gfx.wad.
|
||||
\param name name of the was lump to load
|
||||
\return pointer qpic data.
|
||||
*/
|
||||
qpic_t *Draw_PicFromWad (const char *name);
|
||||
|
||||
/** Draw a qpic to the screen
|
||||
\param x horizontal location of the upper left corner of the qpic
|
||||
\param y vertical location of the upper left corner of the qpic
|
||||
\param pic qpic to draw
|
||||
*/
|
||||
void Draw_Pic (int x, int y, qpic_t *pic);
|
||||
|
||||
/** Draw a qpic to the screen
|
||||
\param x horizontal location of the upper left corner of the qpic
|
||||
\param y vertical location of the upper left corner of the qpic
|
||||
\param pic qpic to draw
|
||||
*/
|
||||
void Draw_Picf (float x, float y, qpic_t *pic);
|
||||
|
||||
/** Draw a sub-region of a qpic to the screan
|
||||
\param x horizontal screen location of the upper left corner of the
|
||||
sub-region
|
||||
\param y vertical screen location of the upper left corner of the
|
||||
sub-region
|
||||
\param pic qpic to draw
|
||||
\param srcx horizontal qpic location of the upper left corner of the
|
||||
sub-region
|
||||
\param srcy vertical qpic location of the upper left corner of the
|
||||
sub-region
|
||||
\param width horizontal size of the sub-region to be drawn
|
||||
\param height vertical size of the sub-region to be drawn
|
||||
*/
|
||||
void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height);
|
||||
///@}
|
||||
|
||||
#endif//__QF_draw_h
|
220
include/QF/Vulkan/funclist.h
Normal file
220
include/QF/Vulkan/funclist.h
Normal file
|
@ -0,0 +1,220 @@
|
|||
#ifndef EXPORTED_VULKAN_FUNCTION
|
||||
#define EXPORTED_VULKAN_FUNCTION(function)
|
||||
#endif
|
||||
|
||||
EXPORTED_VULKAN_FUNCTION (vkGetInstanceProcAddr)
|
||||
|
||||
#undef EXPORTED_VULKAN_FUNCTION
|
||||
|
||||
#ifndef GLOBAL_LEVEL_VULKAN_FUNCTION
|
||||
#define GLOBAL_LEVEL_VULKAN_FUNCTION(function)
|
||||
#endif
|
||||
|
||||
GLOBAL_LEVEL_VULKAN_FUNCTION (vkEnumerateInstanceVersion)
|
||||
GLOBAL_LEVEL_VULKAN_FUNCTION (vkEnumerateInstanceExtensionProperties)
|
||||
GLOBAL_LEVEL_VULKAN_FUNCTION (vkEnumerateInstanceLayerProperties)
|
||||
GLOBAL_LEVEL_VULKAN_FUNCTION (vkCreateInstance)
|
||||
|
||||
#undef GLOBAL_LEVEL_VULKAN_FUNCTION
|
||||
|
||||
#ifndef INSTANCE_LEVEL_VULKAN_FUNCTION
|
||||
#define INSTANCE_LEVEL_VULKAN_FUNCTION(function)
|
||||
#endif
|
||||
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkEnumeratePhysicalDevices)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetPhysicalDeviceProperties)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetPhysicalDeviceFeatures)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetPhysicalDeviceQueueFamilyProperties)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkCreateDevice)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetDeviceProcAddr)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkDestroyInstance)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkEnumerateDeviceLayerProperties)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkEnumerateDeviceExtensionProperties)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetPhysicalDeviceMemoryProperties)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION (vkGetPhysicalDeviceFormatProperties)
|
||||
|
||||
#undef INSTANCE_LEVEL_VULKAN_FUNCTION
|
||||
|
||||
#ifndef INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
#define INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION(function, extension)
|
||||
#endif
|
||||
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCreateDebugUtilsMessengerEXT, VK_EXT_DEBUG_UTILS_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkDestroyDebugUtilsMessengerEXT, VK_EXT_DEBUG_UTILS_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkSubmitDebugUtilsMessageEXT, VK_EXT_DEBUG_UTILS_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceSurfaceSupportKHR, VK_KHR_SURFACE_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceSurfacePresentModesKHR, VK_KHR_SURFACE_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceSurfaceCapabilitiesKHR, VK_KHR_SURFACE_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceSurfaceFormatsKHR, VK_KHR_SURFACE_EXTENSION_NAME)
|
||||
INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkDestroySurfaceKHR, VK_KHR_SURFACE_EXTENSION_NAME)
|
||||
|
||||
#undef INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
|
||||
#ifndef PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
#define PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION(function, extension)
|
||||
#endif
|
||||
|
||||
#if defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceXlibPresentationSupportKHR,
|
||||
VK_KHR_XLIB_SURFACE_EXTENSION_NAME)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCreateXlibSurfaceKHR,
|
||||
VK_KHR_XLIB_SURFACE_EXTENSION_NAME)
|
||||
#elif defined(VK_USE_PLATFORM_WIN32_KHR)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceWin32PresentationSupportKHR,
|
||||
VK_KHR_WIN32_SURFACE_EXTENSION_NAME)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCreateWin32SurfaceKHR,
|
||||
VK_KHR_WIN32_SURFACE_EXTENSION_NAME)
|
||||
#elif defined(VK_USE_PLATFORM_XCB_KHR)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetPhysicalDeviceXcbPresentationSupportKHR,
|
||||
VK_KHR_XCB_SURFACE_EXTENSION_NAME)
|
||||
PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCreateXcbSurfaceKHR,
|
||||
VK_KHR_XCB_SURFACE_EXTENSION_NAME)
|
||||
#endif
|
||||
|
||||
#undef PRESENTATION_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
|
||||
#ifndef DEVICE_LEVEL_VULKAN_FUNCTION
|
||||
#define DEVICE_LEVEL_VULKAN_FUNCTION(function)
|
||||
#endif
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyDevice)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetDeviceQueue)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateCommandPool)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkResetCommandPool)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkAllocateCommandBuffers)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkBeginCommandBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkEndCommandBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkResetCommandBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateSemaphore)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateFence)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkWaitForFences)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkResetFences)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetFenceStatus)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkQueueSubmit)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkQueueWaitIdle)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDeviceWaitIdle)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyFence)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroySemaphore)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkFreeCommandBuffers)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyCommandPool)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetBufferMemoryRequirements)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkBindBufferMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateBufferView)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyBufferView)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyBuffer)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateImage)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetImageMemoryRequirements)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkBindImageMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateImageView)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyImageView)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyImage)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkAllocateMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkFreeMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkMapMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkUnmapMemory)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkFlushMappedMemoryRanges)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateSampler)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateDescriptorSetLayout)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateDescriptorPool)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkAllocateDescriptorSets)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkUpdateDescriptorSets)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkFreeDescriptorSets)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkResetDescriptorPool)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyDescriptorPool)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyDescriptorSetLayout)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroySampler)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateRenderPass)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateFramebuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyRenderPass)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyFramebuffer)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateShaderModule)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyShaderModule)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreatePipelineCache)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetPipelineCacheData)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkMergePipelineCaches)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyPipelineCache)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreatePipelineLayout)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyPipelineLayout)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateGraphicsPipelines)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCreateComputePipelines)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyPipeline)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdPipelineBarrier)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdCopyBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdCopyBufferToImage)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdCopyImageToBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdCopyImage)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBlitImage)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBeginRenderPass)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdNextSubpass)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdEndRenderPass)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBindPipeline)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdClearColorImage)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdExecuteCommands)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdPushConstants)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdPushDescriptorSetKHR)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdSetViewport)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdSetScissor)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBindVertexBuffers)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBindIndexBuffer)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdBindDescriptorSets)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdDraw)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkCmdDrawIndexed)
|
||||
|
||||
#undef DEVICE_LEVEL_VULKAN_FUNCTION
|
||||
|
||||
#ifndef DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
#define DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION(function, extension)
|
||||
#endif
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCreateSwapchainKHR, VK_KHR_SWAPCHAIN_EXTENSION_NAME)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkDestroySwapchainKHR, VK_KHR_SWAPCHAIN_EXTENSION_NAME)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkGetSwapchainImagesKHR, VK_KHR_SWAPCHAIN_EXTENSION_NAME)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkAcquireNextImageKHR, VK_KHR_SWAPCHAIN_EXTENSION_NAME)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkQueuePresentKHR, VK_KHR_SWAPCHAIN_EXTENSION_NAME)
|
||||
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCmdBeginDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCmdEndDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkCmdInsertDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkQueueBeginDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkQueueEndDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkQueueInsertDebugUtilsLabelEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkSetDebugUtilsObjectNameEXT, 0)
|
||||
DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
||||
(vkSetDebugUtilsObjectTagEXT, 0)
|
||||
|
||||
#undef DEVICE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION
|
98
include/QF/Vulkan/image.h
Normal file
98
include/QF/Vulkan/image.h
Normal file
|
@ -0,0 +1,98 @@
|
|||
#ifndef __QF_Vulkan_image_h
|
||||
#define __QF_Vulkan_image_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_imageset_s
|
||||
DARRAY_TYPE (VkImage) qfv_imageset_t;
|
||||
|
||||
#define QFV_AllocImages(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_imageset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_imageviewset_s
|
||||
DARRAY_TYPE (VkImageView) qfv_imageviewset_t;
|
||||
|
||||
#define QFV_AllocImageViews(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_imageviewset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_imageresource_s {
|
||||
struct qfv_device_s *device;
|
||||
VkImage image;
|
||||
VkDeviceMemory object;
|
||||
VkImageView view;
|
||||
} qfv_imageresource_t;
|
||||
|
||||
typedef struct qfv_imagetransition_s {
|
||||
VkImage image;
|
||||
VkAccessFlags srcAccess;
|
||||
VkAccessFlags dstAccess;
|
||||
VkImageLayout oldLayout;
|
||||
VkImageLayout newLayout;
|
||||
uint32_t srcQueueFamily;
|
||||
uint32_t dstQueueFamily;
|
||||
VkImageAspectFlags aspect;
|
||||
} qfv_imagetransition_t;
|
||||
|
||||
typedef struct qfv_imagetransitionset_s
|
||||
DARRAY_TYPE (qfv_imagetransition_t) qfv_imagetransitionset_t;
|
||||
typedef struct qfv_imagebarrierset_s
|
||||
DARRAY_TYPE (VkImageMemoryBarrier) qfv_imagebarrierset_t;
|
||||
#define QFV_AllocImageBarrierSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_imagebarrierset_t, num, allocator)
|
||||
|
||||
struct qfv_device_s;
|
||||
VkImage QFV_CreateImage (struct qfv_device_s *device, int cubemap,
|
||||
VkImageType type,
|
||||
VkFormat format,
|
||||
VkExtent3D size,
|
||||
uint32_t num_mipmaps,
|
||||
uint32_t num_layers,
|
||||
VkSampleCountFlags samples,
|
||||
VkImageUsageFlags usage_scenarios);
|
||||
|
||||
VkDeviceMemory QFV_AllocImageMemory (struct qfv_device_s *device,
|
||||
VkImage image,
|
||||
VkMemoryPropertyFlags properties,
|
||||
VkDeviceSize size, VkDeviceSize offset);
|
||||
|
||||
int QFV_BindImageMemory (struct qfv_device_s *device, VkImage image,
|
||||
VkDeviceMemory object, VkDeviceSize offset);
|
||||
|
||||
qfv_imagebarrierset_t *
|
||||
QFV_CreateImageTransitionSet (qfv_imagetransition_t *transitions,
|
||||
int numTransitions);
|
||||
|
||||
VkImageView QFV_CreateImageView (struct qfv_device_s *device,
|
||||
VkImage image, VkImageViewType type,
|
||||
VkFormat format, VkImageAspectFlags aspect);
|
||||
|
||||
size_t QFV_GetImageSize (struct qfv_device_s *device, VkImage image);
|
||||
|
||||
/** Generate all mipmaps for a given texture down to a 1x1 pixel.
|
||||
*
|
||||
* Uses the GPU blit command from one mip level to the next, thus the base mip
|
||||
* level data must have already been transfered to the image and the image is
|
||||
* expected to be in VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL. This includes any
|
||||
* array levels.
|
||||
*
|
||||
* \param device The device owning the command buffer.
|
||||
* \param cmd The command buffer to which the barrier and blit commands
|
||||
* will be written.
|
||||
* \param image The image to be processed. All array layers of the base mip
|
||||
* level must be initialized and in "transfer dst optimal"
|
||||
* layout. All remaining mip levels must be in "undefined"
|
||||
* oayout.
|
||||
* \param mips The total number of mip levels of the processed image.
|
||||
* \param width The pixel width of the base image.
|
||||
* \param height The pixel height of the base image.
|
||||
* \param layers The number of array layers in the mbase image.
|
||||
*
|
||||
* \note The processed image will be in "shader read only optimal" layout on
|
||||
* completion.
|
||||
*/
|
||||
void QFV_GenerateMipMaps (struct qfv_device_s *device, VkCommandBuffer cmd,
|
||||
VkImage image, unsigned mips,
|
||||
unsigned width, unsigned height, unsigned layers);
|
||||
int QFV_MipLevels (int width, int height) __attribute__((const));
|
||||
|
||||
#endif//__QF_Vulkan_image_h
|
67
include/QF/Vulkan/instance.h
Normal file
67
include/QF/Vulkan/instance.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
Copyright (C) 2019 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie
|
||||
Date: 2019/6/29
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_instance_h
|
||||
#define __QF_Vulkan_instance_h
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
typedef struct qfv_instfuncs_s {
|
||||
#define INSTANCE_LEVEL_VULKAN_FUNCTION(name) PFN_##name name;
|
||||
#define INSTANCE_LEVEL_VULKAN_FUNCTION_FROM_EXTENSION(name,ext) PFN_##name name;
|
||||
#include "QF/Vulkan/funclist.h"
|
||||
} qfv_instfuncs_t;
|
||||
|
||||
typedef struct qfv_physdev_s {
|
||||
struct qfv_instance_s *instance;
|
||||
VkPhysicalDevice dev;
|
||||
VkPhysicalDeviceProperties properties;
|
||||
VkPhysicalDeviceMemoryProperties memory_properties;
|
||||
} qfv_physdev_t;
|
||||
|
||||
typedef struct qfv_instance_s {
|
||||
VkInstance instance;
|
||||
qfv_instfuncs_t *funcs;
|
||||
struct strset_s *enabled_extensions;
|
||||
int (*extension_enabled) (struct qfv_instance_s *inst,
|
||||
const char *ext);
|
||||
VkDebugUtilsMessengerEXT debug_handle;
|
||||
uint32_t numDevices;
|
||||
qfv_physdev_t *devices;
|
||||
} qfv_instance_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
qfv_instance_t *QFV_CreateInstance (struct vulkan_ctx_s *ctx,
|
||||
const char *appName,
|
||||
uint32_t appVersion,
|
||||
const char **layers,
|
||||
const char **extensions);
|
||||
void QFV_DestroyInstance (qfv_instance_t *instance);
|
||||
|
||||
VkSampleCountFlagBits QFV_GetMaxSampleCount (qfv_physdev_t *physdev);
|
||||
|
||||
#endif // __QF_Vulkan_instance_h
|
22
include/QF/Vulkan/memory.h
Normal file
22
include/QF/Vulkan/memory.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef __QF_Vulkan_memory_h
|
||||
#define __QF_Vulkan_memory_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_mappedmemrange_s {
|
||||
VkDeviceMemory object;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize size;
|
||||
} qfv_mappedmemrange_t;
|
||||
|
||||
typedef struct qfv_mappedmemrangeset_s
|
||||
DARRAY_TYPE (qfv_mappedmemrange_t) qfv_mappedmemrangeset_t;
|
||||
|
||||
struct qfv_device_s;
|
||||
|
||||
void *QFV_MapMemory (struct qfv_device_s *device, VkDeviceMemory object,
|
||||
VkDeviceSize offset, VkDeviceSize size);
|
||||
void QFV_FlushMemory (struct qfv_device_s *device,
|
||||
qfv_mappedmemrangeset_t *ranges);
|
||||
|
||||
#endif//__QF_Vulkan_memory_h
|
156
include/QF/Vulkan/pipeline.h
Normal file
156
include/QF/Vulkan/pipeline.h
Normal file
|
@ -0,0 +1,156 @@
|
|||
#ifndef __QF_Vulkan_pipeline_h
|
||||
#define __QF_Vulkan_pipeline_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_pipelineshaderstateset_s
|
||||
DARRAY_TYPE (VkPipelineShaderStageCreateInfo) qfv_pipelineshaderstateset_s;
|
||||
|
||||
#define QFV_AllocPipelineShaderStageSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_pipelineshaderstateset_s, num, allocator)
|
||||
|
||||
typedef struct qfv_vertexinputbindingset_s
|
||||
DARRAY_TYPE (VkVertexInputBindingDescription) qfv_vertexinputbindingset_t;
|
||||
|
||||
#define QFV_AllocVertexInputBindingSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_vertexinputbindingset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_vertexinputattributeset_s
|
||||
DARRAY_TYPE (VkVertexInputAttributeDescription)
|
||||
qfv_vertexinputattributeset_t;
|
||||
|
||||
#define QFV_AllocVertexInputAttributeSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_vertexinputattributeset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_vertexinputstate_s {
|
||||
qfv_vertexinputbindingset_t *bindings;
|
||||
qfv_vertexinputattributeset_t *attributes;
|
||||
} qfv_vertexinputstate_t;
|
||||
|
||||
typedef struct qfv_pipelineinputassembly_s {
|
||||
VkPrimitiveTopology topology;
|
||||
VkBool32 primativeRestartEnable;
|
||||
} qfv_pipelineinputassembly_t;
|
||||
|
||||
typedef struct qfv_pipelinetessellation_s {
|
||||
uint32_t patchControlPoints;
|
||||
} qfv_pipelinetessellation_t;
|
||||
|
||||
typedef struct qfv_viewportset_s DARRAY_TYPE (VkViewport) qfv_viewportset_t;
|
||||
|
||||
#define QFV_AllocViewportSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_viewportset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_scissorsset_s DARRAY_TYPE (VkRect2D) qfv_scissorsset_t;
|
||||
|
||||
#define QFV_AllocScissorsSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_scissorsset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_viewportinfo_s {
|
||||
qfv_viewportset_t *viewportset;
|
||||
qfv_scissorsset_t *scissorsset;
|
||||
} qfv_viewportinfo_t;
|
||||
|
||||
typedef struct qfv_pipelinerasterization_s {
|
||||
VkBool32 depthClampEnable;
|
||||
VkBool32 rasterizerDiscardEnable;
|
||||
VkPolygonMode polygonMode;
|
||||
VkCullModeFlags cullMode;
|
||||
VkFrontFace frontFace;
|
||||
VkBool32 depthBiasEnable;
|
||||
float depthBiasConstantFactor;
|
||||
float depthBiasClamp;
|
||||
float depthBiasSlopeFactor;
|
||||
float lineWidth;
|
||||
} qfv_pipelinerasterization_t;
|
||||
|
||||
typedef struct qfv_pipelinemultisample_s {
|
||||
VkSampleCountFlagBits rasterizationSamples;
|
||||
VkBool32 sampleShadingEnable;
|
||||
float minSampleShading;
|
||||
const VkSampleMask *sampleMask;
|
||||
VkBool32 alphaToCoverageEnable;
|
||||
VkBool32 alphaToOneEnable;
|
||||
} qfv_pipelinemultisample_t;
|
||||
|
||||
typedef struct qfv_pipelinedepthandstencil_s {
|
||||
VkBool32 depthTestEnable;
|
||||
VkBool32 depthWriteEnable;
|
||||
VkCompareOp depthCompareOp;
|
||||
VkBool32 depthBoundsTestEnable;
|
||||
VkBool32 stencilTestEnable;
|
||||
VkStencilOpState front;
|
||||
VkStencilOpState back;
|
||||
float minDepthBounds;
|
||||
float maxDepthBounds;
|
||||
} qfv_pipelinedepthandstencil_t;
|
||||
|
||||
typedef struct qfv_blendattachmentset_s
|
||||
DARRAY_TYPE (VkPipelineColorBlendAttachmentState) qfv_blendattachmentset_t;
|
||||
|
||||
#define QFV_AllocBlendAttachmentSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_blendattachmentset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_dynamicstateset_s
|
||||
DARRAY_TYPE (VkDynamicState) qfv_dynamicstateset_t;
|
||||
|
||||
#define QFV_AllocDynamicStateSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_dynamicstateset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_pushconstantrangeset_s
|
||||
DARRAY_TYPE (VkPushConstantRange) qfv_pushconstantrangeset_t;
|
||||
|
||||
#define QFV_AllocPushConstantRangeSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_pushconstantrangeset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_pipelineset_s DARRAY_TYPE (VkPipeline) qfv_pipelineset_t;
|
||||
|
||||
#define QFV_AllocPipelineSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_pipelineset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_graphicspipelinecreateinfoset_s
|
||||
DARRAY_TYPE (VkGraphicsPipelineCreateInfo)
|
||||
qfv_graphicspipelinecreateinfoset_t;
|
||||
|
||||
#define QFV_AllocGraphicsPipelineCreateInfoSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_graphicspipelinecreateinfoset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_computepipelinecreateinfoset_s
|
||||
DARRAY_TYPE (VkComputePipelineCreateInfo)
|
||||
qfv_computepipelinecreateinfoset_t;
|
||||
|
||||
#define QFV_AllocComputePipelineCreateInfoSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_computepipelinecreateinfoset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_pipelinecacheset_s
|
||||
DARRAY_TYPE (VkPipelineCache) qfv_pipelinecacheset_t;
|
||||
|
||||
#define QFV_AllocPipelineCacheSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_pipelinecacheset_t, num, allocator)
|
||||
|
||||
struct dstring_s;
|
||||
VkPipelineCache QFV_CreatePipelineCache (struct qfv_device_s *device,
|
||||
struct dstring_s *cacheData);
|
||||
struct dstring_s *QFV_GetPipelineCacheData (struct qfv_device_s *device,
|
||||
VkPipelineCache cache);
|
||||
void QFV_MergePipelineCaches (struct qfv_device_s *device,
|
||||
VkPipelineCache targetCache,
|
||||
qfv_pipelinecacheset_t *sourceCaches);
|
||||
|
||||
struct qfv_descriptorsetlayoutset_s;
|
||||
VkPipelineLayout
|
||||
QFV_CreatePipelineLayout (struct qfv_device_s *device,
|
||||
struct qfv_descriptorsetlayoutset_s *layouts,
|
||||
qfv_pushconstantrangeset_t *pushConstants);
|
||||
qfv_pipelineset_t *
|
||||
QFV_CreateGraphicsPipelines (struct qfv_device_s *device,
|
||||
VkPipelineCache cache,
|
||||
qfv_graphicspipelinecreateinfoset_t *gpciSet);
|
||||
qfv_pipelineset_t *
|
||||
QFV_CreateComputePipelines (struct qfv_device_s *device,
|
||||
VkPipelineCache cache,
|
||||
qfv_computepipelinecreateinfoset_t *cpciSet);
|
||||
void
|
||||
QFV_DestroyPipeline (struct qfv_device_s *device, VkPipeline pipeline);
|
||||
|
||||
#endif//__QF_Vulkan_pipeline_h
|
116
include/QF/Vulkan/qf_alias.h
Normal file
116
include/QF/Vulkan/qf_alias.h
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
qf_alias.h
|
||||
|
||||
Vulkan specific alias model stuff
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2012/1/7
|
||||
Date: 2021/1/18
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_qf_alias_h
|
||||
#define __QF_Vulkan_qf_alias_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/model.h"
|
||||
#include "QF/modelgen.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
#include "QF/Vulkan/command.h"
|
||||
|
||||
typedef struct aliasvrt_s {
|
||||
float vertex[4];
|
||||
float normal[4];
|
||||
} aliasvrt_t;
|
||||
|
||||
typedef struct aliasuv_s {
|
||||
float u, v;
|
||||
} aliasuv_t;
|
||||
|
||||
typedef struct qfv_alias_mesh_s {
|
||||
VkBuffer vertex_buffer;
|
||||
VkBuffer uv_buffer;
|
||||
VkBuffer index_buffer;
|
||||
VkDeviceMemory memory;
|
||||
} qfv_alias_mesh_t;
|
||||
|
||||
typedef struct qfv_alias_skin_s {
|
||||
VkDeviceMemory memory;
|
||||
VkImage image;
|
||||
VkImageView view;
|
||||
byte colora[4];
|
||||
byte colorb[4];
|
||||
} qfv_alias_skin_t;
|
||||
|
||||
#define ALIAS_BUFFER_INFOS 1
|
||||
#define ALIAS_IMAGE_INFOS 1
|
||||
|
||||
typedef enum {
|
||||
QFV_aliasDepth,
|
||||
QFV_aliasGBuffer,
|
||||
QFV_aliasTranslucent,
|
||||
|
||||
QFV_aliasNumPasses
|
||||
} QFV_AliasSubpass;
|
||||
|
||||
typedef struct aliasframe_s {
|
||||
qfv_cmdbufferset_t cmdSet;
|
||||
VkDescriptorBufferInfo bufferInfo[ALIAS_BUFFER_INFOS];
|
||||
VkDescriptorImageInfo imageInfo[ALIAS_IMAGE_INFOS];
|
||||
VkWriteDescriptorSet descriptors[ALIAS_BUFFER_INFOS + ALIAS_IMAGE_INFOS];
|
||||
} aliasframe_t;
|
||||
|
||||
typedef struct aliasframeset_s
|
||||
DARRAY_TYPE (aliasframe_t) aliasframeset_t;
|
||||
|
||||
typedef struct aliasctx_s {
|
||||
aliasframeset_t frames;
|
||||
VkPipeline depth;
|
||||
VkPipeline gbuf;
|
||||
VkPipelineLayout layout;
|
||||
VkSampler sampler;
|
||||
} aliasctx_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
struct entity_s;
|
||||
struct mod_alias_ctx_s;
|
||||
void *Vulkan_Mod_LoadSkin (struct mod_alias_ctx_s *alias_ctx, byte *skin,
|
||||
int skinsize, int snum, int gnum, qboolean group,
|
||||
maliasskindesc_t *skindesc,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Mod_FinalizeAliasModel (struct mod_alias_ctx_s *alias_ctx,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Mod_LoadExternalSkins (struct mod_alias_ctx_s *alias_ctx,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Mod_MakeAliasModelDisplayLists (struct mod_alias_ctx_s *alias_ctx,
|
||||
void *_m, int _s, int extra,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
|
||||
void Vulkan_AliasBegin (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawAlias (struct entity_s *ent, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_AliasEnd (struct vulkan_ctx_s *ctx);
|
||||
|
||||
void Vulkan_Alias_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Alias_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_alias_h
|
175
include/QF/Vulkan/qf_bsp.h
Normal file
175
include/QF/Vulkan/qf_bsp.h
Normal file
|
@ -0,0 +1,175 @@
|
|||
/*
|
||||
qf_bsp.h
|
||||
|
||||
Vulkan specific brush model stuff
|
||||
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2012/1/7
|
||||
Date: 2021/1/18
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_qf_bsp_h
|
||||
#define __QF_Vulkan_qf_bsp_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/model.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
#include "QF/Vulkan/command.h"
|
||||
|
||||
typedef struct bspvert_s {
|
||||
quat_t vertex;
|
||||
quat_t tlst;
|
||||
} bspvert_t;
|
||||
|
||||
typedef struct elements_s {
|
||||
struct elements_s *_next;
|
||||
struct elements_s *next;
|
||||
uint32_t first_index;
|
||||
uint32_t index_count;
|
||||
} elements_t;
|
||||
|
||||
typedef struct elechain_s {
|
||||
struct elechain_s *_next;
|
||||
struct elechain_s *next;
|
||||
int index;
|
||||
elements_t *elements;
|
||||
vec_t *transform;
|
||||
float *color;
|
||||
} elechain_t;
|
||||
|
||||
typedef enum {
|
||||
qfv_bsp_texture,
|
||||
qfv_bsp_glowmap,
|
||||
qfv_bsp_lightmap,
|
||||
qfv_bsp_skysheet,
|
||||
qfv_bsp_skycube,
|
||||
} qfv_bsp_tex;
|
||||
// view matrix
|
||||
#define BSP_BUFFER_INFOS 1
|
||||
// Texture, GlowMap, LightMap, SkySheet, SkyCube
|
||||
#define BSP_IMAGE_INFOS 5
|
||||
|
||||
typedef enum {
|
||||
QFV_bspDepth,
|
||||
QFV_bspGBuffer,
|
||||
QFV_bspSky,
|
||||
QFV_bspTurb,
|
||||
|
||||
QFV_bspNumPasses
|
||||
} QFV_BspSubpass;
|
||||
|
||||
typedef struct bspframe_s {
|
||||
uint32_t *index_data; // pointer into mega-buffer for this frame (c)
|
||||
uint32_t index_offset; // offset of index_data within mega-buffer (c)
|
||||
uint32_t index_count; // number if indices queued (d)
|
||||
qfv_cmdbufferset_t cmdSet;
|
||||
VkDescriptorBufferInfo bufferInfo[BSP_BUFFER_INFOS];
|
||||
VkDescriptorImageInfo imageInfo[BSP_IMAGE_INFOS];
|
||||
VkWriteDescriptorSet descriptors[BSP_BUFFER_INFOS + BSP_IMAGE_INFOS];
|
||||
} bspframe_t;
|
||||
|
||||
typedef struct fragconst_s {
|
||||
quat_t fog;
|
||||
float time;
|
||||
} fragconst_t;
|
||||
|
||||
typedef struct bspframeset_s
|
||||
DARRAY_TYPE (bspframe_t) bspframeset_t;
|
||||
|
||||
typedef struct texchainset_s
|
||||
DARRAY_TYPE (struct vulktex_s *) texchainset_t;
|
||||
|
||||
typedef struct bspctx_s {
|
||||
instsurf_t *waterchain;
|
||||
instsurf_t **waterchain_tail;
|
||||
instsurf_t *sky_chain;
|
||||
instsurf_t **sky_chain_tail;
|
||||
|
||||
texchainset_t texture_chains;
|
||||
|
||||
// for world and non-instance models
|
||||
instsurf_t *static_instsurfs;
|
||||
instsurf_t **static_instsurfs_tail;
|
||||
instsurf_t *free_static_instsurfs;
|
||||
|
||||
// for instance models
|
||||
elechain_t *elechains;
|
||||
elechain_t **elechains_tail;
|
||||
elechain_t *free_elechains;
|
||||
elements_t *elementss;
|
||||
elements_t **elementss_tail;
|
||||
elements_t *free_elementss;
|
||||
instsurf_t *instsurfs;
|
||||
instsurf_t **instsurfs_tail;
|
||||
instsurf_t *free_instsurfs;
|
||||
|
||||
struct qfv_tex_s *default_skysheet;
|
||||
struct qfv_tex_s *skysheet_tex;
|
||||
|
||||
struct qfv_tex_s *default_skybox;
|
||||
struct qfv_tex_s *skybox_tex;
|
||||
quat_t sky_rotation[2];
|
||||
quat_t sky_velocity;
|
||||
quat_t sky_fix;
|
||||
double sky_time;
|
||||
|
||||
quat_t default_color;
|
||||
quat_t last_color;
|
||||
|
||||
struct scrap_s *light_scrap;
|
||||
struct qfv_stagebuf_s *light_stage;
|
||||
|
||||
struct bsppoly_s *polys;
|
||||
|
||||
VkSampler sampler;
|
||||
VkDeviceMemory texture_memory;
|
||||
VkPipeline depth;
|
||||
VkPipeline gbuf;
|
||||
VkPipeline skysheet;
|
||||
VkPipeline skybox;
|
||||
VkPipeline turb;
|
||||
VkPipelineLayout layout;
|
||||
size_t vertex_buffer_size;
|
||||
size_t index_buffer_size;
|
||||
VkBuffer vertex_buffer;
|
||||
VkDeviceMemory vertex_memory;
|
||||
VkBuffer index_buffer;
|
||||
VkDeviceMemory index_memory;
|
||||
bspframeset_t frames;
|
||||
} bspctx_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
void Vulkan_ClearElements (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawWorld (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawSky (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_LoadSkys (const char *sky, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_RegisterTextures (model_t **models, int num_models,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_BuildDisplayLists (model_t **models, int num_models,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Bsp_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Bsp_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawWaterSurfaces (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_bsp_h
|
62
include/QF/Vulkan/qf_compose.h
Normal file
62
include/QF/Vulkan/qf_compose.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
qf_compose.h
|
||||
|
||||
Vulkan compose pass
|
||||
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2021/2/24
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_qf_compose_h
|
||||
#define __QF_Vulkan_qf_compose_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/model.h"
|
||||
#include "QF/modelgen.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
#include "QF/Vulkan/command.h"
|
||||
|
||||
#define COMPOSE_IMAGE_INFOS 2
|
||||
|
||||
typedef struct composeframe_s {
|
||||
VkCommandBuffer cmd;
|
||||
VkDescriptorImageInfo imageInfo[COMPOSE_IMAGE_INFOS];
|
||||
VkWriteDescriptorSet descriptors[COMPOSE_IMAGE_INFOS];
|
||||
} composeframe_t;
|
||||
|
||||
typedef struct composeframeset_s
|
||||
DARRAY_TYPE (composeframe_t) composeframeset_t;
|
||||
|
||||
typedef struct composectx_s {
|
||||
composeframeset_t frames;
|
||||
VkPipeline pipeline;
|
||||
VkPipelineLayout layout;
|
||||
} composectx_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
|
||||
void Vulkan_Compose_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Compose_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Compose_Draw (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_compose_h
|
74
include/QF/Vulkan/qf_draw.h
Normal file
74
include/QF/Vulkan/qf_draw.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
qf_draw.h
|
||||
|
||||
vulkan specific draw function
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_Vulkan_qf_draw_h
|
||||
#define __QF_Vulkan_qf_draw_h
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
|
||||
void Vulkan_Draw_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Character (int x, int y, unsigned ch,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_String (int x, int y, const char *str,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_nString (int x, int y, const char *str, int count,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_AltString (int x, int y, const char *str,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_ConsoleBackground (int lines, byte alpha,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Crosshair (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_CrosshairAt (int ch, int x, int y, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_TileClear (int x, int y, int w, int h,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Fill (int x, int y, int w, int h, int c,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_TextBox (int x, int y, int width, int lines, byte alpha,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_FadeScreen (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_BlendScreen (quat_t color, struct vulkan_ctx_s *ctx);
|
||||
qpic_t *Vulkan_Draw_CachePic (const char *path, qboolean alpha,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_UncachePic (const char *path, struct vulkan_ctx_s *ctx);
|
||||
qpic_t *Vulkan_Draw_MakePic (int width, int height, const byte *data,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_DestroyPic (qpic_t *pic, struct vulkan_ctx_s *ctx);
|
||||
qpic_t *Vulkan_Draw_PicFromWad (const char *name, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Pic (int x, int y, qpic_t *pic, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_Picf (float x, float y, qpic_t *pic, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Draw_SubPic(int x, int y, qpic_t *pic,
|
||||
int srcx, int srcy, int width, int height,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
|
||||
void Vulkan_Set2D (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Set2DScaled (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_End2D (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawReset (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_FlushText (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_draw_h
|
98
include/QF/Vulkan/qf_lighting.h
Normal file
98
include/QF/Vulkan/qf_lighting.h
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
qf_lighting.h
|
||||
|
||||
Vulkan lighting pass
|
||||
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2021/2/23
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_qf_lighting_h
|
||||
#define __QF_Vulkan_qf_lighting_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/model.h"
|
||||
#include "QF/modelgen.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
#include "QF/Vulkan/command.h"
|
||||
|
||||
typedef struct qfv_light_s {
|
||||
vec3_t color;
|
||||
int data;
|
||||
vec3_t position;
|
||||
float radius;
|
||||
vec3_t direction;
|
||||
float cone;
|
||||
} qfv_light_t;
|
||||
|
||||
typedef struct qfv_lightset_s DARRAY_TYPE (qfv_light_t) qfv_lightset_t;
|
||||
typedef struct qfv_lightleafset_s DARRAY_TYPE (int) qfv_lightleafset_t;
|
||||
typedef struct qfv_lightvisset_s DARRAY_TYPE (byte) qfv_lightvisset_t;
|
||||
|
||||
#define NUM_LIGHTS 256
|
||||
#define NUM_STYLES 64
|
||||
|
||||
typedef struct qfv_light_buffer_s {
|
||||
float intensity[NUM_STYLES + 3];
|
||||
int lightCount;
|
||||
qfv_light_t lights[NUM_LIGHTS] __attribute__((aligned(16)));
|
||||
} qfv_light_buffer_t;
|
||||
|
||||
#define LIGHTING_BUFFER_INFOS 1
|
||||
#define LIGHTING_IMAGE_INFOS 5
|
||||
|
||||
typedef struct lightingframe_s {
|
||||
VkCommandBuffer cmd;
|
||||
VkBuffer light_buffer;
|
||||
VkDescriptorBufferInfo bufferInfo[LIGHTING_BUFFER_INFOS];
|
||||
VkDescriptorImageInfo imageInfo[LIGHTING_IMAGE_INFOS];
|
||||
VkWriteDescriptorSet descriptors[LIGHTING_BUFFER_INFOS
|
||||
+ LIGHTING_IMAGE_INFOS];
|
||||
// A fat PVS of leafs visible from visible leafs so hidden lights can
|
||||
// illuminate the leafs visible to the player
|
||||
byte pvs[MAP_PVS_BYTES];
|
||||
struct mleaf_s *leaf; // the last leaf used to generate the pvs
|
||||
qfv_lightvisset_t lightvis;
|
||||
} lightingframe_t;
|
||||
|
||||
typedef struct lightingframeset_s
|
||||
DARRAY_TYPE (lightingframe_t) lightingframeset_t;
|
||||
|
||||
typedef struct lightingctx_s {
|
||||
lightingframeset_t frames;
|
||||
VkPipeline pipeline;
|
||||
VkPipelineLayout layout;
|
||||
VkDeviceMemory light_memory;
|
||||
qfv_lightset_t lights;
|
||||
qfv_lightleafset_t lightleafs;
|
||||
} lightingctx_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
|
||||
void Vulkan_Lighting_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Lighting_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Lighting_Draw (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_LoadLights (model_t *model, const char *entity_data,
|
||||
struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_lighting_h
|
49
include/QF/Vulkan/qf_lightmap.h
Normal file
49
include/QF/Vulkan/qf_lightmap.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
qf_lightmap.h
|
||||
|
||||
Vulkan lightmap stuff from the renderer.
|
||||
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_Vulkan_qf_lightmap_h
|
||||
#define __QF_Vulkan_qf_lightmap_h
|
||||
|
||||
#define MAX_LIGHTMAPS 1024
|
||||
#define BLOCK_WIDTH 64
|
||||
#define BLOCK_HEIGHT 64
|
||||
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
struct model_s;
|
||||
struct mod_brush_s;
|
||||
struct msurface_s;
|
||||
|
||||
void Vulkan_lightmap_init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_BuildLightmaps (struct model_s **models, int num_models, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CalcLightmaps (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_BuildLightMap (struct mod_brush_s *brush, struct msurface_s *surf, struct vulkan_ctx_s *ctx);
|
||||
VkImageView Vulkan_LightmapImageView (struct vulkan_ctx_s *ctx) __attribute__((pure));
|
||||
void Vulkan_FlushLightmaps (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_lightmap_h
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
hl_bsp.h
|
||||
qf_main.h
|
||||
|
||||
Half Life file definitions
|
||||
Vulkan main stuff from the renderer.
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -25,16 +25,13 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __QF_Vulkan_qf_main_h
|
||||
#define __QF_Vulkan_qf_main_h
|
||||
|
||||
#ifndef _HL_BSP_H
|
||||
#define _HL_BSP_H
|
||||
struct vulkan_ctx_s;
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
void Vulkan_NewMap (model_t *worldmodel, struct model_s **models,
|
||||
int num_models, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_RenderView (struct vulkan_ctx_s *ctx);
|
||||
|
||||
extern void CL_ParseEntityLump(const char *entdata);
|
||||
extern void HL_Mod_LoadLighting (lump_t *l);
|
||||
extern void HL_Mod_LoadTextures (lump_t *l);
|
||||
extern byte *W_GetTexture(const char *name, int matchwidth, int matchheight);
|
||||
extern void W_LoadTextureWadFile (const char *filename, int complain);
|
||||
|
||||
#endif // _HL_BSP_H
|
||||
#endif//__QF_Vulkan_qf_main_h
|
|
@ -1,12 +1,14 @@
|
|||
/*
|
||||
uint32.h
|
||||
qf_model.h
|
||||
|
||||
Definitions for portable (?) unsigned int
|
||||
Vulkan specific model stuff
|
||||
|
||||
Copyright (C) 2000 Jeff Teunissen <d2deek@pmail.net>
|
||||
Copyright (C) 2012 Bill Currie <bill@taniwha.org>
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Jeff Teunissen <d2deek@pmail.net>
|
||||
Date: 01 Jan 2000
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2012/1/7
|
||||
Date: 2021/1/19
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -27,26 +29,16 @@
|
|||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_Vulkan_qf_model_h
|
||||
#define __QF_Vulkan_qf_model_h
|
||||
|
||||
#ifndef __uint32_h
|
||||
#define __uint32_h
|
||||
#include "QF/darray.h"
|
||||
#include "QF/model.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
|
||||
#ifndef int32
|
||||
# if (SIZEOF_INT == 4)
|
||||
# define int32 int
|
||||
# elif (SIZEOF_LONG == 4)
|
||||
# define int32 long
|
||||
# elif (SIZEOF_SHORT == 4)
|
||||
# define int32 short
|
||||
# else
|
||||
/* I hope this works */
|
||||
# define int32 int
|
||||
# define LARGE_INT32
|
||||
# endif
|
||||
#endif
|
||||
typedef struct modelctx_s {
|
||||
struct vulkan_ctx_s *ctx;
|
||||
VkDeviceMemory texture_memory;
|
||||
} modelctx_t;
|
||||
|
||||
#ifndef uint32
|
||||
# define uint32 unsigned int32
|
||||
#endif
|
||||
|
||||
#endif // __uint32_h
|
||||
#endif//__QF_Vulkan_qf_model_h
|
16
include/QF/Vulkan/qf_particles.h
Normal file
16
include/QF/Vulkan/qf_particles.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef __QF_Vulkan_qf_particles_h
|
||||
#define __QF_Vulkan_qf_particles_h
|
||||
|
||||
#include "QF/image.h"
|
||||
|
||||
struct cvar_s;
|
||||
struct vulkan_ctx_s;;
|
||||
|
||||
void Vulkan_ClearParticles (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_InitParticles (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_r_easter_eggs_f (struct cvar_s *var, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_r_particles_style_f (struct cvar_s *var, struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Particles_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DrawParticles (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_particles_h
|
27
include/QF/Vulkan/qf_texture.h
Normal file
27
include/QF/Vulkan/qf_texture.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef __QF_Vulkan_qf_texture_h
|
||||
#define __QF_Vulkan_qf_texture_h
|
||||
|
||||
#include "QF/image.h"
|
||||
#include "QF/Vulkan/qf_vid.h"
|
||||
|
||||
typedef struct qfv_tex_s {
|
||||
VkDeviceMemory memory;
|
||||
size_t offset;
|
||||
VkImage image;
|
||||
VkImageView view;
|
||||
} qfv_tex_t;
|
||||
|
||||
void Vulkan_ExpandPalette (byte *dst, const byte *src, const byte *palette,
|
||||
int alpha, int count);
|
||||
qfv_tex_t *Vulkan_LoadTex (struct vulkan_ctx_s *ctx, tex_t *tex, int mip,
|
||||
const char *name);
|
||||
qfv_tex_t *Vulkan_LoadEnvMap (struct vulkan_ctx_s *ctx, tex_t *tex,
|
||||
const char *name);
|
||||
qfv_tex_t *Vulkan_LoadEnvSides (struct vulkan_ctx_s *ctx, tex_t **tex,
|
||||
const char *name);
|
||||
VkImageView Vulkan_TexImageView (qfv_tex_t *tex) __attribute__((pure));
|
||||
void Vulkan_UnloadTex (struct vulkan_ctx_s *ctx, qfv_tex_t *tex);
|
||||
void Vulkan_Texture_Init (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Texture_Shutdown (struct vulkan_ctx_s *ctx);
|
||||
|
||||
#endif//__QF_Vulkan_qf_texture_h
|
87
include/QF/Vulkan/qf_vid.h
Normal file
87
include/QF/Vulkan/qf_vid.h
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
Vulkan/qf_vid.h
|
||||
|
||||
vulkan vid stuff from the renderer.
|
||||
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_Vulkan_vid_h
|
||||
#define __QF_Vulkan_vid_h
|
||||
|
||||
#include "QF/Vulkan/cvars.h"
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
#define VK_NO_PROTOTYPES
|
||||
#endif
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
//FIXME location
|
||||
typedef enum {
|
||||
QFV_passDepth, // geometry
|
||||
QFV_passTranslucent, // geometry
|
||||
QFV_passGBuffer, // geometry
|
||||
QFV_passLighting, // single quad
|
||||
QFV_passCompose, // single quad
|
||||
|
||||
QFV_NumPasses
|
||||
} QFV_Subpass;
|
||||
|
||||
enum {
|
||||
QFV_attachDepth,
|
||||
QFV_attachColor,
|
||||
QFV_attachEmission,
|
||||
QFV_attachNormal,
|
||||
QFV_attachPosition,
|
||||
QFV_attachOpaque,
|
||||
QFV_attachTranslucent,
|
||||
QFV_attachSwapchain,
|
||||
};
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
void Vulkan_DestroyFrames (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateFrames (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateCapture (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateFramebuffers (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DestroyFramebuffers (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateRenderPass (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DestroyRenderPass (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateMatrices (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_DestroyMatrices (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CalcProjectionMatrices (struct vulkan_ctx_s *ctx, float aspect);
|
||||
void Vulkan_CalcViewMatrix (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateSwapchain (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateDevice (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Init_Common (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_Shutdown_Common (struct vulkan_ctx_s *ctx);
|
||||
void Vulkan_CreateStagingBuffers (struct vulkan_ctx_s *ctx);
|
||||
|
||||
VkPipeline Vulkan_CreatePipeline (struct vulkan_ctx_s *ctx, const char *name);
|
||||
VkDescriptorPool Vulkan_CreateDescriptorPool (struct vulkan_ctx_s *ctx,
|
||||
const char *name);
|
||||
VkPipelineLayout Vulkan_CreatePipelineLayout (struct vulkan_ctx_s *ctx,
|
||||
const char *name);
|
||||
VkSampler Vulkan_CreateSampler (struct vulkan_ctx_s *ctx, const char *name);
|
||||
VkDescriptorSetLayout Vulkan_CreateDescriptorSetLayout(struct vulkan_ctx_s*ctx,
|
||||
const char *name);
|
||||
|
||||
#endif // __QF_Vulkan_vid_h
|
50
include/QF/Vulkan/renderpass.h
Normal file
50
include/QF/Vulkan/renderpass.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef __QF_Vulkan_renderpass_h
|
||||
#define __QF_Vulkan_renderpass_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
|
||||
typedef struct qfv_attachmentdescription_s
|
||||
DARRAY_TYPE (VkAttachmentDescription) qfv_attachmentdescription_t;
|
||||
|
||||
#define QFV_AllocAttachmentDescription(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_attachmentdescription_t, num, allocator)
|
||||
|
||||
typedef struct qfv_attachmentreference_s
|
||||
DARRAY_TYPE (VkAttachmentReference) qfv_attachmentreference_t;
|
||||
|
||||
#define QFV_AllocAttachmentReference(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_attachmentreference_t, num, allocator)
|
||||
|
||||
typedef struct qfv_subpassparametersset_s
|
||||
DARRAY_TYPE (VkSubpassDescription) qfv_subpassparametersset_t;
|
||||
|
||||
#define QFV_AllocSubpassParametersSet(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_subpassparametersset_t, num, allocator)
|
||||
|
||||
typedef struct qfv_subpassdependency_s
|
||||
DARRAY_TYPE (VkSubpassDependency) qfv_subpassdependency_t;
|
||||
|
||||
#define QFV_AllocSubpassDependencies(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_subpassdependency_t, num, allocator)
|
||||
|
||||
typedef struct qfv_framebufferset_s
|
||||
DARRAY_TYPE (VkFramebuffer) qfv_framebufferset_t;
|
||||
|
||||
#define QFV_AllocFrameBuffers(num, allocator) \
|
||||
DARRAY_ALLOCFIXED (qfv_framebufferset_t, num, allocator)
|
||||
|
||||
struct qfv_device_s;
|
||||
struct qfv_imageviewset_s;
|
||||
VkRenderPass
|
||||
QFV_CreateRenderPass (struct qfv_device_s *device,
|
||||
qfv_attachmentdescription_t *attachments,
|
||||
qfv_subpassparametersset_t *subpasses,
|
||||
qfv_subpassdependency_t *dependencies);
|
||||
|
||||
VkFramebuffer
|
||||
QFV_CreateFramebuffer (struct qfv_device_s *device,
|
||||
VkRenderPass renderPass,
|
||||
struct qfv_imageviewset_s *attachments,
|
||||
VkExtent2D, uint32_t layers);
|
||||
|
||||
#endif//__QF_Vulkan_renderpass_h
|
25
include/QF/Vulkan/scrap.h
Normal file
25
include/QF/Vulkan/scrap.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef __QF_Vulkan_scrap_h
|
||||
#define __QF_Vulkan_scrap_h
|
||||
|
||||
#include "QF/image.h"
|
||||
|
||||
typedef struct scrap_s scrap_t;
|
||||
|
||||
struct qfv_stagebuf_s;
|
||||
struct qfv_device_s;
|
||||
|
||||
scrap_t *QFV_CreateScrap (struct qfv_device_s *device, const char *name,
|
||||
int size, QFFormat format,
|
||||
struct qfv_stagebuf_s *stage);
|
||||
size_t QFV_ScrapSize (scrap_t *scrap) __attribute__((pure));
|
||||
void QFV_ScrapClear (scrap_t *scrap);
|
||||
void QFV_DestroyScrap (scrap_t *scrap);
|
||||
VkImageView QFV_ScrapImageView (scrap_t *scrap) __attribute__((pure));
|
||||
subpic_t *QFV_ScrapSubpic (scrap_t *scrap, int width, int height);
|
||||
void QFV_SubpicDelete (subpic_t *subpic);
|
||||
|
||||
void *QFV_SubpicBatch (subpic_t *subpic, struct qfv_stagebuf_s *stage);
|
||||
|
||||
void QFV_ScrapFlush (scrap_t *scrap);
|
||||
|
||||
#endif//__QF_Vulkan_scrap_h
|
14
include/QF/Vulkan/shader.h
Normal file
14
include/QF/Vulkan/shader.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef __QF_Vulkan_shader_h
|
||||
#define __QF_Vulkan_shader_h
|
||||
|
||||
struct qfv_device_s;
|
||||
struct vulkan_ctx_s;
|
||||
struct plitem_s;
|
||||
struct parsectx_s;
|
||||
|
||||
VkShaderModule QFV_CreateShaderModule (struct qfv_device_s *device,
|
||||
const char *path);
|
||||
void QFV_DestroyShaderModule (struct qfv_device_s *device,
|
||||
VkShaderModule module);
|
||||
|
||||
#endif//__QF_Vulkan_shader_h
|
37
include/QF/Vulkan/staging.h
Normal file
37
include/QF/Vulkan/staging.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef __QF_Vulkan_staging_h
|
||||
#define __QF_Vulkan_staging_h
|
||||
|
||||
#include "QF/ringbuffer.h"
|
||||
|
||||
typedef struct qfv_packet_s {
|
||||
struct qfv_stagebuf_s *stage; ///< staging buffer that owns this packet
|
||||
VkCommandBuffer cmd;
|
||||
VkFence fence;
|
||||
size_t offset;
|
||||
size_t length;
|
||||
} qfv_packet_t;
|
||||
|
||||
typedef struct qfv_stagebuf_s {
|
||||
struct qfv_device_s *device;
|
||||
VkBuffer buffer;
|
||||
VkDeviceMemory memory;
|
||||
RING_BUFFER(qfv_packet_t, 4) packets; ///< packets for controlling access
|
||||
size_t atom_mask; ///< for flush size rounding
|
||||
size_t size; ///< actual size of the buffer
|
||||
size_t end; ///< effective end of the buffer due to early wrap
|
||||
size_t space_start;///< beginning of available space
|
||||
size_t space_end; ///< end of available space
|
||||
void *data;
|
||||
} qfv_stagebuf_t;
|
||||
|
||||
|
||||
qfv_stagebuf_t *QFV_CreateStagingBuffer (struct qfv_device_s *device,
|
||||
const char *name, size_t size,
|
||||
VkCommandPool cmdPool);
|
||||
void QFV_DestroyStagingBuffer (qfv_stagebuf_t *stage);
|
||||
void QFV_FlushStagingBuffer (qfv_stagebuf_t *stage, size_t offset, size_t size);
|
||||
qfv_packet_t *QFV_PacketAcquire (qfv_stagebuf_t *stage);
|
||||
void *QFV_PacketExtend (qfv_packet_t *packet, size_t size);
|
||||
void QFV_PacketSubmit (qfv_packet_t *packet);
|
||||
|
||||
#endif//__QF_Vulkan_staging_h
|
25
include/QF/Vulkan/swapchain.h
Normal file
25
include/QF/Vulkan/swapchain.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef __QF_Vulkan_swapchain_h
|
||||
#define __QF_Vulkan_swapchain_h
|
||||
|
||||
typedef struct qfv_swapchain_s {
|
||||
struct qfv_device_s *device;
|
||||
VkSurfaceKHR surface;
|
||||
VkSwapchainKHR swapchain;
|
||||
VkFormat format;
|
||||
VkExtent2D extent;
|
||||
int32_t numImages;
|
||||
VkImageUsageFlags usage;
|
||||
struct qfv_imageset_s *images;
|
||||
struct qfv_imageviewset_s *imageViews;
|
||||
} qfv_swapchain_t;
|
||||
|
||||
struct vulkan_ctx_s;
|
||||
qfv_swapchain_t *QFV_CreateSwapchain (struct vulkan_ctx_s *ctx,
|
||||
VkSwapchainKHR old_swapchain);
|
||||
void QFV_DestroySwapchain (qfv_swapchain_t *swapchain);
|
||||
struct qfv_semaphore_s;
|
||||
struct qfv_fence_s;
|
||||
int QFV_AcquireNextImage (qfv_swapchain_t *swapchain, VkSemaphore semaphore,
|
||||
VkFence fence, uint32_t *imageIndex);
|
||||
|
||||
#endif//__QF_Vulkan_swapchain_h
|
|
@ -37,7 +37,7 @@
|
|||
/** \defgroup alloc High-tide allocator.
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#ifndef DEBUG_QF_MEMORY
|
||||
/** High-tide structure allocator for use in linked lists.
|
||||
|
@ -93,6 +93,6 @@
|
|||
#define FREE(n, p) do { free (p); } while (0)
|
||||
#endif
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif//__QF_alloc_h
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __bspfile_h_
|
||||
#define __bspfile_h_
|
||||
#ifndef __QF_bspfile_h
|
||||
#define __QF_bspfile_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
#include "QF/quakeio.h"
|
||||
|
@ -42,6 +42,8 @@
|
|||
#define MAX_MAP_FACES 65535 // format limit (u16)
|
||||
#define MAX_MAP_MARKSURFACES 65535 // format limit (u16)
|
||||
|
||||
#define MAP_PVS_BYTES (MAX_MAP_LEAFS / 8)
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#define BSPVERSION 29
|
||||
|
@ -310,4 +312,4 @@ void BSP_AddVisibility (bsp_t *bsp, const byte *visdata, size_t visdatasize);
|
|||
void BSP_AddEntities (bsp_t *bsp, const char *entdata, size_t entdatasize);
|
||||
void BSP_AddTextures (bsp_t *bsp, const byte *texdata, size_t texdatasize);
|
||||
|
||||
#endif//__bspfile_h_
|
||||
#endif//__QF_bspfile_h
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/** \defgroup cbuf Command buffer management.
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -100,6 +100,6 @@ void Cbuf_Execute (cbuf_t *cbuf);
|
|||
void Cbuf_Execute_Stack (cbuf_t *cbuf);
|
||||
void Cbuf_Execute_Sets (cbuf_t *cbuf);
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif//__QF_cbuf_h
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _CDAUDIO_H
|
||||
#define _CDAUDIO_H
|
||||
#ifndef __QF_cdaudio_h
|
||||
#define __QF_cdaudio_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
|
@ -35,7 +35,6 @@ void CDAudio_Play(int track, qboolean looping);
|
|||
void CDAudio_Stop(void);
|
||||
void CDAudio_Pause(void);
|
||||
void CDAudio_Resume(void);
|
||||
void CDAudio_Shutdown(void);
|
||||
void CDAudio_Update(void);
|
||||
|
||||
#endif // _CDAUDIO_H
|
||||
#endif//__QF_cdaudio_h
|
||||
|
|
143
include/QF/cexpr.h
Normal file
143
include/QF/cexpr.h
Normal file
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
cexpr.h
|
||||
|
||||
Config expression parser. Or concurrent.
|
||||
|
||||
Copyright (C) 2020 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_expr_h
|
||||
#define __QF_expr_h
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
struct exprval_s;
|
||||
struct exprctx_s;
|
||||
|
||||
typedef struct binop_s {
|
||||
int op;
|
||||
struct exprtype_s *other;
|
||||
struct exprtype_s *result;
|
||||
void (*func) (const struct exprval_s *val1,
|
||||
const struct exprval_s *val2,
|
||||
struct exprval_s *result,
|
||||
struct exprctx_s *context);
|
||||
} binop_t;
|
||||
|
||||
typedef struct unop_s {
|
||||
int op;
|
||||
struct exprtype_s *result;
|
||||
void (*func) (const struct exprval_s *val, struct exprval_s *result,
|
||||
struct exprctx_s *context);
|
||||
} unop_t;
|
||||
|
||||
typedef struct exprtype_s {
|
||||
const char *name;
|
||||
size_t size;
|
||||
binop_t *binops;
|
||||
unop_t *unops;
|
||||
void *data;
|
||||
} exprtype_t;
|
||||
|
||||
typedef struct exprval_s {
|
||||
exprtype_t *type;
|
||||
void *value;
|
||||
} exprval_t;
|
||||
|
||||
typedef struct exprlist_s {
|
||||
struct exprlist_s *next;
|
||||
exprval_t *value;
|
||||
} exprlist_t;
|
||||
|
||||
typedef struct exprsym_s {
|
||||
const char *name;
|
||||
exprtype_t *type;
|
||||
void *value;
|
||||
struct exprsym_s *next;
|
||||
} exprsym_t;
|
||||
|
||||
typedef struct exprfunc_s {
|
||||
exprtype_t *result;
|
||||
int num_params;
|
||||
exprtype_t **param_types;
|
||||
void (*func) (const exprval_t **params, exprval_t *result,
|
||||
struct exprctx_s *context);
|
||||
} exprfunc_t;
|
||||
|
||||
typedef struct exprtab_s {
|
||||
exprsym_t *symbols;
|
||||
struct hashtab_s *tab;
|
||||
} exprtab_t;
|
||||
|
||||
typedef struct exprctx_s {
|
||||
exprval_t *result;
|
||||
exprtab_t *symtab; // directly accessible symbols
|
||||
exprtab_t *external_variables; // accessible via $id
|
||||
struct memsuper_s *memsuper;
|
||||
const struct plitem_s *item;
|
||||
struct plitem_s *messages;
|
||||
struct hashlink_s **hashlinks;
|
||||
int errors;
|
||||
} exprctx_t;
|
||||
|
||||
typedef struct exprenum_s {
|
||||
exprtype_t *type;
|
||||
exprtab_t *symtab;
|
||||
} exprenum_t;
|
||||
|
||||
int cexpr_parse_enum (exprenum_t *enm, const char *str,
|
||||
const exprctx_t *context, void *data);
|
||||
binop_t *cexpr_find_cast (exprtype_t *dst_type, exprtype_t *src_type) __attribute__((pure));
|
||||
exprval_t *cexpr_value (exprtype_t *type, exprctx_t *ctx);
|
||||
exprval_t *cexpr_value_reference (exprtype_t *type, void *data, exprctx_t *ctx);
|
||||
int cexpr_eval_string (const char *str, exprctx_t *context);
|
||||
void cexpr_error(exprctx_t *ctx, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
|
||||
void cexpr_struct_getfield (const exprval_t *a, const exprval_t *b,
|
||||
exprval_t *c, exprctx_t *ctx);
|
||||
void cexpr_struct_pointer_getfield (const exprval_t *a, const exprval_t *b,
|
||||
exprval_t *c, exprctx_t *ctx);
|
||||
exprval_t *cexpr_cvar (const char *name, exprctx_t *ctx);
|
||||
exprval_t *cexpr_cvar_struct (exprctx_t *ctx);
|
||||
|
||||
void cexpr_cast_plitem (const exprval_t *val1, const exprval_t *src,
|
||||
exprval_t *result, exprctx_t *ctx);
|
||||
|
||||
void cexpr_init_symtab (exprtab_t *symtab, exprctx_t *ctx);
|
||||
|
||||
char *cexpr_yyget_text (void *scanner);
|
||||
|
||||
extern exprtype_t cexpr_int;
|
||||
extern exprtype_t cexpr_uint;
|
||||
extern exprtype_t cexpr_size_t;
|
||||
extern exprtype_t cexpr_float;
|
||||
extern exprtype_t cexpr_double;
|
||||
extern exprtype_t cexpr_vector;
|
||||
extern exprtype_t cexpr_quaternion;
|
||||
extern exprtype_t cexpr_exprval;
|
||||
extern exprtype_t cexpr_field;
|
||||
extern exprtype_t cexpr_function;
|
||||
extern exprtype_t cexpr_plitem;
|
||||
|
||||
extern binop_t cexpr_struct_binops[];
|
||||
extern binop_t cexpr_struct_pointer_binops[];
|
||||
|
||||
#endif//__QF_expr_h
|
|
@ -25,12 +25,12 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __checksum_h
|
||||
#define __checksum_h
|
||||
#ifndef __QF_checksum_h
|
||||
#define __QF_checksum_h
|
||||
|
||||
/** \addtogroup crc
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
|
@ -38,6 +38,6 @@ unsigned int Com_BlockChecksum (const void *buffer, int length);
|
|||
void Com_BlockFullChecksum (const void *buffer, int len, unsigned char *outbuf);
|
||||
byte COM_BlockSequenceCRCByte (const byte *base, int length, int sequence);
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __checksum_h
|
||||
#endif//__QF_checksum_h
|
||||
|
|
|
@ -31,12 +31,13 @@
|
|||
/** \defgroup cmd Command management.
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
#include "QF/cbuf.h"
|
||||
|
||||
typedef void (*xcommand_t) (void);
|
||||
typedef void (*xdatacmd_t) (void *data);
|
||||
|
||||
typedef enum {
|
||||
src_client, // came in over a net connection as a clc_stringcmd
|
||||
|
@ -48,6 +49,8 @@ typedef struct cmd_function_s {
|
|||
struct cmd_function_s *next;
|
||||
const char *name;
|
||||
xcommand_t function;
|
||||
xdatacmd_t datafunc;
|
||||
void *data;
|
||||
const char *description;
|
||||
} cmd_function_t;
|
||||
|
||||
|
@ -56,18 +59,21 @@ extern cmd_source_t cmd_source;
|
|||
void Cmd_Init_Hash (void);
|
||||
void Cmd_Init (void);
|
||||
|
||||
int Cmd_AddCommand (const char *cmd_name, xcommand_t function, const char *description);
|
||||
int Cmd_AddCommand (const char *cmd_name, xcommand_t function,
|
||||
const char *description);
|
||||
int Cmd_AddDataCommand (const char *cmd_name, xdatacmd_t function,
|
||||
void *data, const char *description);
|
||||
int Cmd_RemoveCommand (const char *cmd_name);
|
||||
|
||||
qboolean Cmd_Exists (const char *cmd_name);
|
||||
const char *Cmd_CompleteCommand (const char *partial);
|
||||
int Cmd_CompleteCountPossible (const char *partial);
|
||||
const char *Cmd_CompleteCommand (const char *partial) __attribute__((pure));
|
||||
int Cmd_CompleteCountPossible (const char *partial) __attribute__((pure));
|
||||
const char **Cmd_CompleteBuildList (const char *partial);
|
||||
|
||||
|
||||
int Cmd_Argc (void);
|
||||
const char *Cmd_Argv (int arg);
|
||||
const char *Cmd_Args (int start);
|
||||
int Cmd_Argc (void) __attribute__((pure));
|
||||
const char *Cmd_Argv (int arg) __attribute__((pure));
|
||||
const char *Cmd_Args (int start) __attribute__((pure));
|
||||
struct cbuf_args_s;
|
||||
int Cmd_Command (struct cbuf_args_s *args);
|
||||
int Cmd_ExecuteString (const char *text, cmd_source_t src);
|
||||
|
@ -81,6 +87,6 @@ struct cbuf_interpreter_s *Cmd_GetProvider(const char *name);
|
|||
extern struct cbuf_args_s *cmd_args;
|
||||
extern struct cvar_s *cmd_warncmd;
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif//__QF_cmd_h
|
||||
|
|
118
include/QF/cmem.h
Normal file
118
include/QF/cmem.h
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
cmem.h
|
||||
|
||||
Cache-line aligned memory allocator
|
||||
|
||||
Copyright (C) 2020 Bill Currie <bill@taniwha.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
#ifndef __QF_cmem_h
|
||||
#define __QF_cmem_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
#define MEM_LINE_SIZE 64
|
||||
#define MAX_CACHE_LINES 9
|
||||
|
||||
typedef struct memline_s {
|
||||
/* chain of free line blocks for fast allocation
|
||||
* chain begins in memsuper_t
|
||||
*/
|
||||
struct memline_s *free_next;
|
||||
struct memline_s **free_prev;
|
||||
/* chain of free line blocks within a membock for merging
|
||||
* chain begins in memblock_t
|
||||
*/
|
||||
struct memline_s *block_next;
|
||||
struct memline_s **block_prev;
|
||||
size_t size;
|
||||
/* owning block
|
||||
*/
|
||||
struct memblock_s *block;
|
||||
size_t pad[2];
|
||||
} memline_t;
|
||||
|
||||
typedef struct memsline_s {
|
||||
struct memsline_s *next;
|
||||
size_t size:2;
|
||||
size_t list:4;
|
||||
size_t prev:58; // memsline_t **
|
||||
} memsline_t;
|
||||
|
||||
typedef struct memblock_s {
|
||||
struct memblock_s *next;
|
||||
struct memblock_s **prev;
|
||||
/* The pointer to pass to free()
|
||||
*/
|
||||
void *mem;
|
||||
memline_t *free_lines;
|
||||
/* Size of memory region before block "header".
|
||||
*
|
||||
* Since large blocks are allocated with page-size alignment, odds are
|
||||
* high that the there will be many cache lines "wasted" in the space
|
||||
* between the address returned from aligned_alloc (to cache-line
|
||||
* alignment) and the block itself. Setting them up as a pool makes the
|
||||
* lines available for smaller allocations, thus reducing waste.
|
||||
*/
|
||||
size_t pre_size;
|
||||
/* Size of memory region after block "header".
|
||||
*
|
||||
* Will be 0 for blocks that were allocated exclusively for small
|
||||
* allocations, otherwise indicates the size of the allocated block.
|
||||
*/
|
||||
size_t post_size;
|
||||
/* True if the post-header block is free to be reused.
|
||||
*/
|
||||
int post_free;
|
||||
int pad;
|
||||
size_t pre_allocated;
|
||||
} memblock_t;
|
||||
|
||||
typedef struct memsuper_s {
|
||||
size_t page_size;
|
||||
size_t page_mask;
|
||||
memblock_t *memblocks;
|
||||
/* Allocated cache lines from which smaller blocks can be allocated.
|
||||
*
|
||||
* The index is the base-2 log minus 2 of the size of the elements in the
|
||||
* cache line from which an element was last freed. Only 4-32 bytes are of
|
||||
* interest because nothing smaller than 4 bytes (int/float) will be
|
||||
* allocated, and 64 bytes and up consume entire cache lines.
|
||||
*/
|
||||
memsline_t *last_freed[4];
|
||||
/* Free chache lines grouped by size.
|
||||
*
|
||||
* The index is the base-2 log of the MINIMUM number of cache lines
|
||||
* available in each block. ie, blocks with 4, 5, 6 and 7 lines will all
|
||||
* be in the third list (index 2). For 4k page sizes, only 6 lists are
|
||||
* needed (32-63 lines) because a page can hold only 62 lines (1 for the
|
||||
* control block and one to avoid a cache-line being on a page boundary).
|
||||
* Having 9 (MAX_CACHE_LINES) lists allows page sizes up to 16kB.
|
||||
*/
|
||||
memline_t *free_lines[MAX_CACHE_LINES];
|
||||
} memsuper_t;
|
||||
|
||||
memsuper_t *new_memsuper (void);
|
||||
void delete_memsuper (memsuper_t *super);
|
||||
void *cmemalloc (memsuper_t *super, size_t size);
|
||||
void cmemfree (memsuper_t *super, void *mem);
|
||||
|
||||
#endif//__QF_cmem_h
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __console_h
|
||||
#define __console_h
|
||||
#ifndef __QF_console_h
|
||||
#define __QF_console_h
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -92,8 +92,8 @@ extern struct console_data_s con_data;
|
|||
void Con_CheckResize (void);
|
||||
void Con_DrawConsole (void);
|
||||
|
||||
void Con_Printf (const char *fmt, ...);
|
||||
void Con_Print (const char *fmt, va_list args);
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
void Con_Print (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
// wrapper function to attempt to either complete the command line
|
||||
|
@ -105,7 +105,7 @@ void Con_BasicCompleteCommandLine (inputline_t *il);
|
|||
// Generic libs/util/console.c function to display a list
|
||||
// formatted in columns on the console
|
||||
void Con_DisplayList(const char **list, int con_linewidth);
|
||||
extern void (*con_list_print)(const char *fmt, ...);
|
||||
extern void (*con_list_print)(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
|
||||
inputline_t *Con_CreateInputLine (int lines, int lsize, char prompt);
|
||||
void Con_DestroyInputLine (inputline_t *inputline);
|
||||
|
@ -119,7 +119,6 @@ void Con_BufferAddText (con_buffer_t *buf, const char *text);
|
|||
|
||||
// init/shutdown functions
|
||||
void Con_Init (const char *plugin_name);
|
||||
void Con_Shutdown (void);
|
||||
void Con_ExecLine (const char *line);
|
||||
|
||||
void Con_ProcessInput (void);
|
||||
|
@ -151,4 +150,4 @@ void Menu_Leave_f (void);
|
|||
void Menu_Prev_f (void);
|
||||
void Menu_Next_f (void);
|
||||
|
||||
#endif // __console_h
|
||||
#endif//__QF_console_h
|
||||
|
|
|
@ -25,22 +25,22 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __crc_h
|
||||
#define __crc_h
|
||||
#ifndef __QF_crc_h
|
||||
#define __QF_crc_h
|
||||
|
||||
/** \defgroup crc Checksum generation.
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
void CRC_Init(unsigned short *crcvalue);
|
||||
void CRC_ProcessByte(unsigned short *crcvalue, byte data);
|
||||
void CRC_ProcessBlock (const byte *start, unsigned short *crcvalue, int count);
|
||||
unsigned short CRC_Value(unsigned short crcvalue);
|
||||
unsigned short CRC_Block (const byte *start, int count);
|
||||
unsigned short CRC_Value(unsigned short crcvalue) __attribute__((const));
|
||||
unsigned short CRC_Block (const byte *start, int count) __attribute__((pure));
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __crc_h
|
||||
#endif//__QF_crc_h
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __cvar_h
|
||||
#define __cvar_h
|
||||
#ifndef __QF_cvar_h
|
||||
#define __QF_cvar_h
|
||||
|
||||
/** \defgroup cvar Configuration variables
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
#include "QF/quakeio.h"
|
||||
|
@ -72,7 +72,7 @@ typedef struct cvar_alias_s {
|
|||
code goes "look, the user made fs_basepath already", uses the users value,
|
||||
but sets CVAR_ROM as per the call.
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
#define CVAR_NONE 0 ///< normal cvar
|
||||
#define CVAR_ARCHIVE 1 ///< set to cause it to be saved to
|
||||
///< config.cfg
|
||||
|
@ -85,7 +85,7 @@ typedef struct cvar_alias_s {
|
|||
#define CVAR_LATCH 2048 ///< will change only when C code next does
|
||||
///< a Cvar_Get(), so it can't be changed
|
||||
///< (not implemented)
|
||||
//@}
|
||||
///@}
|
||||
|
||||
|
||||
// Returns the Cvar if found, creates it with value if not. Description and
|
||||
|
@ -122,12 +122,12 @@ void Cvar_WriteVariables (QFile *f);
|
|||
|
||||
// attempts to match a partial variable name for command line completion
|
||||
// returns NULL if nothing fits
|
||||
const char *Cvar_CompleteVariable (const char *partial);
|
||||
const char *Cvar_CompleteVariable (const char *partial) __attribute__((pure));
|
||||
|
||||
// Added by EvilTypeGuy - functions for tab completion system
|
||||
// Thanks to Fett erich@heintz.com
|
||||
// Thanks to taniwha
|
||||
int Cvar_CompleteCountPossible (const char *partial);
|
||||
int Cvar_CompleteCountPossible (const char *partial) __attribute__((pure));
|
||||
const char **Cvar_CompleteBuildList (const char *partial);
|
||||
|
||||
// Returns a pointer to the Cvar, NULL if not found
|
||||
|
@ -138,6 +138,6 @@ void Cvar_Init (void);
|
|||
|
||||
extern cvar_t *cvar_vars;
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __cvar_h
|
||||
#endif//__QF_cvar_h
|
||||
|
|
370
include/QF/darray.h
Normal file
370
include/QF/darray.h
Normal file
|
@ -0,0 +1,370 @@
|
|||
/*
|
||||
darray.h
|
||||
|
||||
Dynamic arrays
|
||||
|
||||
Copyright (C) 2020 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2020/02/17
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_darray_h
|
||||
#define __QF_darray_h
|
||||
|
||||
#include "QF/sys.h"
|
||||
|
||||
/** \defgroup darray Dynamic Arrays
|
||||
\ingroup utils
|
||||
|
||||
Dynamic array container object
|
||||
*/
|
||||
///@{
|
||||
|
||||
/** The structure defs for a dynamic array with elements of the given type.
|
||||
|
||||
This is just the defs of a struct delcaration: it is useless on its own.
|
||||
The intended usage is something like:
|
||||
|
||||
typedef struct dynamic_array_s DARRAY_TYPE(int) dynamic_array_t;
|
||||
|
||||
This allows full flexibility in just how the actual type is used.
|
||||
|
||||
The \a size field is the number of elements currently in the array, and
|
||||
the \a maxSize field is the number of elements the array can hold without
|
||||
being resized.
|
||||
|
||||
The \a grow field specifies the number of elements by which \a maxSize is
|
||||
to grow when the array needs to be resized. Setting this to 0 prevents
|
||||
resizing and any attempt to do so is a fatal error.
|
||||
|
||||
\param ele_type The type to use for the element array, which is accessed
|
||||
by the \a a field.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_TYPE(ele_type) \
|
||||
{ \
|
||||
size_t size; \
|
||||
size_t maxSize; \
|
||||
size_t grow; \
|
||||
ele_type *a; \
|
||||
}
|
||||
|
||||
#define DARRAY_STATIC_INIT(g) { .grow = g }
|
||||
|
||||
/** Allocate a fixed-size array using the given allocator
|
||||
|
||||
The allocated array is initilized to be ungrowable, and with both size
|
||||
and maxSize set to the given size.
|
||||
|
||||
\param array_type Expression acceptable by typeof for determining the
|
||||
type of the array.
|
||||
\param array_size The size of the array.
|
||||
\param alloc Allocator compatible with malloc (eg, alloca).
|
||||
*/
|
||||
#define DARRAY_ALLOCFIXED(array_type, array_size, alloc) \
|
||||
({ \
|
||||
__auto_type s = (array_size); \
|
||||
typeof (array_type) *ar = alloc (sizeof(*ar) \
|
||||
+ s * sizeof (*ar->a)); \
|
||||
ar->size = ar->maxSize = s; \
|
||||
ar->grow = 0; \
|
||||
ar->a = (typeof (ar->a)) (ar + 1); \
|
||||
ar; \
|
||||
})
|
||||
|
||||
/** Allocate a fixed-size array using the given allocator
|
||||
|
||||
The allocated array is initilized to be ungrowable, and with both size
|
||||
and maxSize set to the given size.
|
||||
|
||||
\param array_type Expression acceptable by typeof for determining the
|
||||
type of the array.
|
||||
\param array_size The size of the array.
|
||||
\param alloc Allocator taking (obj, size) where obj is allocator
|
||||
specific data (eg, a memory pool).
|
||||
\param obj Additional data for the allocator.
|
||||
*/
|
||||
#define DARRAY_ALLOCFIXED_OBJ(array_type, array_size, alloc, obj) \
|
||||
({ \
|
||||
__auto_type s = (array_size); \
|
||||
typeof (array_type) *ar = alloc ((obj), \
|
||||
sizeof(*ar) \
|
||||
+ s * sizeof (*ar->a)); \
|
||||
ar->size = ar->maxSize = s; \
|
||||
ar->grow = 0; \
|
||||
ar->a = (typeof (ar->a)) (ar + 1); \
|
||||
ar; \
|
||||
})
|
||||
|
||||
/** Initialized the array.
|
||||
|
||||
The array will be initialized to be empty but with grow set to the
|
||||
specifed value.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param growSize Number of elements by which the array is to grow when
|
||||
required.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_INIT(array, growSize) \
|
||||
do { \
|
||||
__auto_type ar = (array); \
|
||||
ar->size = ar->maxSize = 0; \
|
||||
ar->grow = (growSize); \
|
||||
ar->a = 0; \
|
||||
} while (0)
|
||||
|
||||
/** Clear the array.
|
||||
|
||||
If the array can grow, its backing will be freed and maxSize and a reset,
|
||||
otherwise maxSize and a are left untouched.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_CLEAR(array) \
|
||||
do { \
|
||||
__auto_type ar = (array); \
|
||||
ar->size = 0; \
|
||||
if (ar->grow) { \
|
||||
free (ar->a); \
|
||||
ar->maxSize = 0; \
|
||||
ar->a = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/** Set the size of the array.
|
||||
|
||||
If the new size is greater than maxSize, and the array can grow (grow is
|
||||
non-zero), then maxSize will be increased to the smallest multiple of grow
|
||||
greater than or equal to size (ie, maxSize >= size, maxSize % grow == 0).
|
||||
|
||||
Attempting to increase maxSize on an array that cannot grow is an error:
|
||||
it is assumed that the array struct does not own the backing memory.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param newSize The new size of the array: newly opened slots are
|
||||
uninitialized, but old slots retain their values.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_RESIZE(array, newSize) \
|
||||
do { \
|
||||
__auto_type ar = (array); \
|
||||
size_t ns = (newSize); \
|
||||
if (__builtin_expect (ns > ar->maxSize, 0)) { \
|
||||
if (__builtin_expect (!ar->grow, 0)) { \
|
||||
Sys_Error ("Attempt to grow fixed-size darray: %s:%d", \
|
||||
__FILE__, __LINE__); \
|
||||
} \
|
||||
ar->maxSize = ar->grow * ((ns + ar->grow - 1) / ar->grow); \
|
||||
ar->a = realloc (ar->a, ar->maxSize * sizeof (*ar->a)); \
|
||||
if (__builtin_expect (!ar->a, 0)) { \
|
||||
Sys_Error ("failed to realloc darray: %s:%d", \
|
||||
__FILE__, __LINE__); \
|
||||
} \
|
||||
} \
|
||||
ar->size = ns; \
|
||||
} while (0)
|
||||
|
||||
/** Append a value to the end of the array.
|
||||
|
||||
The array is grown by one and the value written to the newly opened slot.
|
||||
|
||||
If the new array size is greater than maxSize and the array can be grown,
|
||||
the array backing will be resized to the next multiple of grow.
|
||||
|
||||
Attempting to grow an array that cannot grow is an error: it is assumed
|
||||
that the array struct does not own the backing memory.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param value The value to be appended to the array. Must be of a type
|
||||
compatible with that used for creating the array struct.
|
||||
\return The appended value: can be assigned to another compatible
|
||||
value.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_APPEND(array, value) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
typeof(ar->a[0]) ob = (value); \
|
||||
size_t sz = ar->size; \
|
||||
DARRAY_RESIZE (ar, ar->size + 1); \
|
||||
ar->a[sz] = ob; \
|
||||
})
|
||||
|
||||
/** Open a hole in the array for bulk copying of data.
|
||||
|
||||
The array is grown by the requested size, opening a hole at the specified
|
||||
index. Values beyond the index are copied to just after the newly opened
|
||||
hole.
|
||||
|
||||
If the new array size is greater than maxSize and the array can be grown,
|
||||
the array backing will be resized to the next multiple of grow.
|
||||
|
||||
Attempting to grow an array that cannot grow is an error: it is assumed
|
||||
that the array struct does not own the backing memory.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param index The index at which the hole will begin.
|
||||
\param space The sized of the hole to be opened, in array elements.
|
||||
\return The *address* of the newly opened hole: can be passed to
|
||||
memcpy and friends.
|
||||
|
||||
memcpy (DARRAY_OPEN_AT(array, index, size), data,
|
||||
size * sizeof (*data));
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_OPEN_AT(array, index, space) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
size_t po = (index); \
|
||||
size_t sp = (space); \
|
||||
if (__builtin_expect (po > ar->size, 0)) { \
|
||||
Sys_Error ("Attempt to insert elements outside darray: " \
|
||||
"%s:%d", __FILE__, __LINE__); \
|
||||
} \
|
||||
DARRAY_RESIZE (ar, ar->size + sp); \
|
||||
memmove (&ar->a[po + sp], &ar->a[po], \
|
||||
(ar->size - po - sp) * sizeof (*ar->a)); \
|
||||
&ar->a[po]; \
|
||||
})
|
||||
|
||||
/** Insert a value into the array at the specified index.
|
||||
|
||||
The array is grown by one at the specified index and the value written
|
||||
to the newly opened slot. Values beyond the index are copied to just
|
||||
after the newly opened slot.
|
||||
|
||||
If the new array size is greater than maxSize and the array can be grown,
|
||||
the array backing will be resized to the next multiple of grow.
|
||||
|
||||
Attempting to grow an array that cannot grow is an error: it is assumed
|
||||
that the array struct does not own the backing memory.
|
||||
|
||||
Attempting to insert a value beyond one past the end of the array is an
|
||||
error (inserting at index = size is valid).
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param value The value to be inserted into the array. Must be of a type
|
||||
compatible with that used for creating the array struct.
|
||||
\param index The index at which the value will be inserted
|
||||
\return The inserted value: can be assigned to another compatible
|
||||
value.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_INSERT_AT(array, value, index) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
typeof(ar->a[0]) ob = (value); \
|
||||
*DARRAY_OPEN_AT (ar, index, 1) = ob; \
|
||||
})
|
||||
|
||||
/** Close a segment of an array.
|
||||
|
||||
The values beyond the segment are copied to the beginning of the segment
|
||||
and the array size reduced by the size of the segment. All but the first
|
||||
one of the values previously in the segment are lost and gone forever.
|
||||
|
||||
Attempting to close a segment that extends outside the array is an error.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param index The index of the beginning of the segment.
|
||||
\param count The number of values in the segment.
|
||||
\return The single value at the beginning of the segment: can be
|
||||
assigned to another compatible value.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_CLOSE_AT(array, index, count) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
size_t po = (index); \
|
||||
size_t co = (count); \
|
||||
if (__builtin_expect (po + co > ar->size \
|
||||
|| po >= ar->size, 0)) { \
|
||||
Sys_Error ("Attempt to remove elements outside darray: " \
|
||||
"%s:%d", __FILE__, __LINE__); \
|
||||
} \
|
||||
__auto_type ob = ar->a[po]; \
|
||||
memmove (&ar->a[po], &ar->a[po + co], \
|
||||
(ar->size - po - co) * sizeof (ob)); \
|
||||
ar->size -= co; \
|
||||
ob; \
|
||||
})
|
||||
|
||||
/** Remove a value from an array at the specified index.
|
||||
|
||||
The values beyond the index are moved down to fill the hole left by the
|
||||
single value and the array size reduced by one.
|
||||
|
||||
Attempting to remove a value from beyond the array is an error.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\param index The index of the value to be removed.
|
||||
\return The removed value: can be assigned to another compatible
|
||||
value.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_REMOVE_AT(array, index) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
DARRAY_CLOSE_AT (ar, index, 1); \
|
||||
})
|
||||
|
||||
/** Remove (pop) a value from the end of an array.
|
||||
|
||||
The size of the array size reduced by one.
|
||||
|
||||
Attempting to remove a value from an empty array is an error.
|
||||
|
||||
\param array *Address* of the array to be modified (ie, pointer to the
|
||||
array struct instance, not the instance itself: use & for
|
||||
static instances of the array struct).
|
||||
\return The removed value: can be assigned to another compatible
|
||||
value.
|
||||
\hideinitializer
|
||||
*/
|
||||
#define DARRAY_REMOVE(array) \
|
||||
({ \
|
||||
__auto_type ar = (array); \
|
||||
DARRAY_CLOSE_AT (ar, ar->size - 1, 1); \
|
||||
})
|
||||
|
||||
///@}
|
||||
|
||||
#endif//__QF_darray_h
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _DRAW_H
|
||||
#define _DRAW_H
|
||||
#ifndef __QF_draw_h
|
||||
#define __QF_draw_h
|
||||
|
||||
/** \defgroup video Video Sub-sytem */
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
/** \defgroup video_renderer_draw Generic draw functions
|
||||
\ingroup video_renderer
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/wad.h"
|
||||
|
||||
|
@ -160,12 +160,12 @@ void Draw_FadeScreen (void);
|
|||
/** Shift the screen colors.
|
||||
*/
|
||||
void Draw_BlendScreen (quat_t color);
|
||||
//@}
|
||||
///@}
|
||||
|
||||
/** \defgroup video_renderer_draw_qpic QPic functions
|
||||
\ingroup video_renderer_draw
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
/** Load a qpic from the filesystem.
|
||||
\param path path of the file within the quake filesystem
|
||||
\param alpha transparency level of the pic.
|
||||
|
@ -232,6 +232,6 @@ void Draw_Picf (float x, float y, qpic_t *pic);
|
|||
\param height vertical size of the sub-region to be drawn
|
||||
*/
|
||||
void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height);
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // _DRAW_H
|
||||
#endif//__QF_draw_h
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __dstring_h
|
||||
#define __dstring_h
|
||||
#ifndef __QF_dstring_h
|
||||
#define __QF_dstring_h
|
||||
|
||||
/** \defgroup dstring Dynamic Strings
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -52,13 +52,13 @@ typedef struct dstring_s {
|
|||
extern dstring_mem_t dstring_default_mem;
|
||||
|
||||
// General buffer functions
|
||||
//@{
|
||||
///@{
|
||||
/** Create a new dstring. size and truesize start at 0 and no string buffer
|
||||
is allocated.
|
||||
*/
|
||||
dstring_t *_dstring_new (dstring_mem_t *mem);
|
||||
dstring_t *dstring_new (void);
|
||||
//@}
|
||||
///@}
|
||||
/** Delete a dstring. Both the string buffer and dstring object are freed.
|
||||
*/
|
||||
void dstring_delete (dstring_t *dstr);
|
||||
|
@ -103,13 +103,13 @@ void dstring_replace (dstring_t *dstr, unsigned int pos, unsigned int rlen,
|
|||
char *dstring_freeze (dstring_t *dstr);
|
||||
|
||||
// String-specific functions
|
||||
//@{
|
||||
///@{
|
||||
/** Allocate a new dstring pre-initialized as a null terminated string. size
|
||||
will be 1 and the first byte 0.
|
||||
*/
|
||||
dstring_t *_dstring_newstr (dstring_mem_t *mem);
|
||||
dstring_t *dstring_newstr (void);
|
||||
//@}
|
||||
///@}
|
||||
/** Create a new dstring from a string. Similar to strdup().
|
||||
\param str the string to copy
|
||||
\return inititialized dstring
|
||||
|
@ -160,21 +160,21 @@ void dstring_insertsubstr (dstring_t *dstr, unsigned int pos, const char *str,
|
|||
*/
|
||||
void dstring_clearstr (dstring_t *dstr);
|
||||
|
||||
//@{
|
||||
///@{
|
||||
/** Formatted printing to dstrings. Existing data is replaced by the formatted
|
||||
string.
|
||||
*/
|
||||
int dvsprintf (dstring_t *dstr, const char *fmt, va_list args);
|
||||
int dsprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
//@}
|
||||
//@{
|
||||
char *dvsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(printf,2,0)));
|
||||
char *dsprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
///@}
|
||||
///@{
|
||||
/** Formatted printing to dstrings. Formatted string is appened to the dstring.
|
||||
Embedded nulls in the dstring are ignored.
|
||||
*/
|
||||
int davsprintf (dstring_t *dstr, const char *fmt, va_list args);
|
||||
int dasprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
//@}
|
||||
char *davsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(printf,2,0)));
|
||||
char *dasprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
///@}
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __dstring_h
|
||||
#endif//__QF_dstring_h
|
||||
|
|
124
include/QF/entity.h
Normal file
124
include/QF/entity.h
Normal file
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
entity.h
|
||||
|
||||
Entity management
|
||||
|
||||
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
||||
|
||||
Author: Bill Currie <bill@taniwha.org>
|
||||
Date: 2021/02/26
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to:
|
||||
|
||||
Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330
|
||||
Boston, MA 02111-1307, USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __QF_entity_h
|
||||
#define __QF_entity_h
|
||||
|
||||
#include "QF/darray.h"
|
||||
#include "QF/mathlib.h"
|
||||
#include "QF/simd/vec4f.h"
|
||||
#include "QF/simd/mat4f.h"
|
||||
|
||||
/** \defgroup entity Entity management
|
||||
\ingroup utils
|
||||
*/
|
||||
///@{
|
||||
|
||||
typedef struct mat4fset_s DARRAY_TYPE (mat4f_t) mat4fset_t;
|
||||
typedef struct vec4fset_s DARRAY_TYPE (vec4f_t) vec4fset_t;
|
||||
typedef struct uint32set_s DARRAY_TYPE (uint32_t) uint32set_t;
|
||||
typedef struct byteset_s DARRAY_TYPE (byte) byteset_t;
|
||||
typedef struct stringset_s DARRAY_TYPE (char *) stringset_t;
|
||||
typedef struct xformset_s DARRAY_TYPE (struct transform_s *) xformset_t;
|
||||
typedef struct entityset_s DARRAY_TYPE (struct entity_s *) entityset_t;
|
||||
|
||||
#define null_transform (~0u)
|
||||
|
||||
typedef struct hierarchy_s {
|
||||
xformset_t transform;
|
||||
entityset_t entity;
|
||||
uint32set_t childCount;
|
||||
uint32set_t childIndex;
|
||||
uint32set_t parentIndex;
|
||||
stringset_t name;
|
||||
uint32set_t tag;
|
||||
byteset_t modified;
|
||||
mat4fset_t localMatrix;
|
||||
mat4fset_t localInverse;
|
||||
mat4fset_t worldMatrix;
|
||||
mat4fset_t worldInverse;
|
||||
vec4fset_t localRotation;
|
||||
vec4fset_t localScale;
|
||||
vec4fset_t worldRotation;
|
||||
vec4fset_t worldScale;
|
||||
} hierarchy_t;
|
||||
|
||||
typedef struct transform_s {
|
||||
hierarchy_t *hierarchy;
|
||||
uint32_t index;
|
||||
} transform_t;
|
||||
|
||||
transform_t *Transform_New (transform_t *parent);
|
||||
void Transform_Delete (transform_t *transform);
|
||||
transform_t *Transform_NewNamed (transform_t *parent, const char *name);
|
||||
uint32_t Transform_ChildCount (const transform_t *transform) __attribute__((pure));
|
||||
transform_t *Transform_GetChild (const transform_t *transform,
|
||||
uint32_t childIndex) __attribute__((pure));
|
||||
void Transform_SetParent (transform_t *transform, transform_t *parent);
|
||||
transform_t *Transform_GetParent (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetName (transform_t *transform, const char *name);
|
||||
const char *Transform_GetName (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetTag (transform_t *transform, uint32_t tag);
|
||||
uint32_t Transform_GetTag (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_GetLocalMatrix (const transform_t *transform, mat4f_t mat);
|
||||
void Transform_GetLocalInverse (const transform_t *transform, mat4f_t mat);
|
||||
void Transform_GetWorldMatrix (const transform_t *transform, mat4f_t mat);
|
||||
void Transform_GetWorldInverse (const transform_t *transform, mat4f_t mat);
|
||||
vec4f_t Transform_GetLocalPosition (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetLocalPosition (transform_t *transform, vec4f_t position);
|
||||
vec4f_t Transform_GetLocalRotation (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetLocalRotation (transform_t *transform, vec4f_t rotation);
|
||||
vec4f_t Transform_GetLocalScale (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetLocalScale (transform_t *transform, vec4f_t scale);
|
||||
vec4f_t Transform_GetWorldPosition (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetWorldPosition (transform_t *transform, vec4f_t position);
|
||||
vec4f_t Transform_GetWorldRotation (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetWorldRotation (transform_t *transform, vec4f_t rotation);
|
||||
vec4f_t Transform_GetWorldScale (const transform_t *transform) __attribute__((pure));
|
||||
void Transform_SetLocalTransform (transform_t *transform, vec4f_t scale,
|
||||
vec4f_t rotation, vec4f_t position);
|
||||
// NOTE: these use X: right, Y: forward, Z:up
|
||||
// aslo, not guaranteed to be normalized or even orthogonal
|
||||
vec4f_t Transform_Forward (const transform_t *transform) __attribute__((pure));
|
||||
vec4f_t Transform_Right (const transform_t *transform) __attribute__((pure));
|
||||
vec4f_t Transform_Up (const transform_t *transform) __attribute__((pure));
|
||||
// no SetWorldScale because after rotations, non uniform scale becomes shear
|
||||
|
||||
hierarchy_t *Hierarchy_New (size_t grow, int createRoot);
|
||||
hierarchy_t *Hierarchy_Copy (hierarchy_t *src);
|
||||
void Hierarchy_Delete (hierarchy_t *hierarchy);
|
||||
|
||||
void Hierarchy_UpdateMatrices (hierarchy_t *hierarchy);
|
||||
uint32_t Hierarchy_InsertHierarchy (hierarchy_t *dst, const hierarchy_t *src,
|
||||
uint32_t dstParent, uint32_t srcRoot);
|
||||
void Hierarchy_RemoveHierarchy (hierarchy_t *hierarchy, uint32_t index);
|
||||
///@}
|
||||
|
||||
#endif//__QF_entity_h
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __gib_h
|
||||
#define __gib_h
|
||||
#ifndef __QF_gib_h
|
||||
#define __QF_gib_h
|
||||
|
||||
// Dependencies
|
||||
|
||||
|
@ -182,7 +182,7 @@ extern char * const gib_null_string;
|
|||
#define GIB_CanReturn() (GIB_DATA(cbuf_active)->waitret)
|
||||
|
||||
dstring_t *GIB_Return (const char *str);
|
||||
void GIB_Error (const char *type, const char *fmt, ...);
|
||||
void GIB_Error (const char *type, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
void GIB_Builtin_Add (const char *name, void (*func) (void));
|
||||
void GIB_Builtin_Remove (const char *name);
|
||||
qboolean GIB_Builtin_Exists (const char *name);
|
||||
|
@ -199,12 +199,12 @@ void GIB_Event_Callback (gib_event_t *event, unsigned int argc, ...);
|
|||
|
||||
// Interpreter interface (for creating GIB cbufs)
|
||||
|
||||
cbuf_interpreter_t *GIB_Interpreter (void);
|
||||
cbuf_interpreter_t *GIB_Interpreter (void) __attribute__((const));
|
||||
|
||||
// Thread interface
|
||||
|
||||
void GIB_Thread_Execute (void);
|
||||
unsigned int GIB_Thread_Count (void);
|
||||
unsigned int GIB_Thread_Count (void) __attribute__((pure));
|
||||
|
||||
// Init interface
|
||||
|
||||
|
@ -214,6 +214,6 @@ void GIB_Init (qboolean sandbox);
|
|||
|
||||
unsigned long int GIB_Handle_New (gib_object_t *data);
|
||||
void GIB_Handle_Free (unsigned long int num);
|
||||
gib_object_t *GIB_Handle_Get (unsigned long int num);
|
||||
gib_object_t *GIB_Handle_Get (unsigned long int num) __attribute__((pure));
|
||||
|
||||
#endif
|
||||
#endif//__QF_gib_h
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __hash_h
|
||||
#define __hash_h
|
||||
#ifndef __QF_hash_h
|
||||
#define __QF_hash_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -34,9 +34,10 @@
|
|||
/** \defgroup hash Hash tables
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
typedef struct hashtab_s hashtab_t;
|
||||
typedef struct hashlink_s hashlink_t;
|
||||
|
||||
/** create a new hash table.
|
||||
\param tsize table size. larger values will give better distribution, but
|
||||
|
@ -45,11 +46,18 @@ typedef struct hashtab_s hashtab_t;
|
|||
inserting or finding the element. First parameter is a pointer
|
||||
to the element from which to extract the key, the second is
|
||||
the user data pointer.
|
||||
\param f a function to free the element. Only ever called from
|
||||
\param f a function to free the element. Called from only
|
||||
Hash_FlushTable and Hash_DelTable. The first parameter is the
|
||||
element to be freed and the second is the user data pointer.
|
||||
\param ud user data pointer. set to whatever you want, it will be passed
|
||||
to the get key and free functions as the second parameter.
|
||||
\param hlfl Address of opaque pointer used for per-thread allocation of
|
||||
internal memory. If null, a local static pointer will be used,
|
||||
but the hash table will not be thread-safe unless all tables
|
||||
created with a null \a hlfl (hashlink freelist) are used in
|
||||
only the one thread. However, this applys only to updating a
|
||||
hash table; hash tables that are not updated can be safely
|
||||
shared between threads.
|
||||
\return pointer to the hash table (to be passed to the other functions)
|
||||
or 0 on error.
|
||||
|
||||
|
@ -59,7 +67,8 @@ typedef struct hashtab_s hashtab_t;
|
|||
previous ones until the later one is removed (Hash_Del).
|
||||
*/
|
||||
hashtab_t *Hash_NewTable (int tsize, const char *(*gk)(const void*,void*),
|
||||
void (*f)(void*,void*), void *ud);
|
||||
void (*f)(void*,void*), void *ud,
|
||||
hashlink_t **hlfl);
|
||||
|
||||
/** change the hash and compare functions used by the Hash_*Element functions.
|
||||
the default hash function just returns the address of the element, and the
|
||||
|
@ -177,20 +186,20 @@ void Hash_Free (hashtab_t *tab, void *ele);
|
|||
|
||||
this is the same function as used internally.
|
||||
*/
|
||||
unsigned long Hash_String (const char *str);
|
||||
unsigned long Hash_String (const char *str) __attribute__((pure));
|
||||
|
||||
/** hash a buffer.
|
||||
\param buf the buffer to hash
|
||||
\param len the size of the buffer
|
||||
\return the hash value of the string.
|
||||
*/
|
||||
unsigned long Hash_Buffer (const void *buf, int len);
|
||||
unsigned long Hash_Buffer (const void *buf, int len) __attribute__((pure));
|
||||
|
||||
/** get the size of the table
|
||||
\param tab the table in question
|
||||
\return the number of elements in the table.
|
||||
*/
|
||||
size_t Hash_NumElements (hashtab_t *tab);
|
||||
size_t Hash_NumElements (hashtab_t *tab) __attribute__((pure));
|
||||
|
||||
/** list of all elements in the table.
|
||||
\param tab the table to list
|
||||
|
@ -209,6 +218,6 @@ void **Hash_GetList (hashtab_t *tab);
|
|||
*/
|
||||
void Hash_Stats (hashtab_t *tab);
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __hash_h
|
||||
#endif//__QF_hash_h
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
/** \addtogroup cbuf
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
extern const char *com_token;
|
||||
|
||||
|
@ -44,6 +44,6 @@ void COM_TokenizeString (const char *str, struct cbuf_args_s *args);
|
|||
|
||||
extern struct cbuf_interpreter_s id_interp;
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif//__QF_idparse_h
|
||||
|
|
|
@ -30,24 +30,34 @@
|
|||
#define __QF_image_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
#include "QF/quakeio.h"
|
||||
|
||||
typedef enum QFFormat {
|
||||
tex_palette = 0,
|
||||
tex_l = 0x1909, //GL_LUMINANCE
|
||||
tex_a = 0x1906, //GL_ALPHA
|
||||
tex_la = 2,
|
||||
tex_rgb = 3,
|
||||
tex_rgba = 4,
|
||||
tex_frgba = 5,
|
||||
} QFFormat;
|
||||
|
||||
// could not use texture_t as that is used for models.
|
||||
typedef struct tex_s {
|
||||
int width;
|
||||
int height;
|
||||
int format;
|
||||
const byte *palette; // 0 = 32 bit, otherwise 8
|
||||
byte data[4]; // variable length
|
||||
QFFormat format;
|
||||
int loaded; // 0 if size info only, otherwise data loaded
|
||||
const byte *palette; // 0 = 32 bit, otherwise 8
|
||||
byte *data;
|
||||
} tex_t;
|
||||
|
||||
#define tex_palette 0
|
||||
#define tex_l 0x1909 //GL_LUMINANCE
|
||||
#define tex_a 0x1906 //GL_ALPHA
|
||||
#define tex_la 2
|
||||
#define tex_rgb 3
|
||||
#define tex_rgba 4
|
||||
tex_t *LoadImage (const char *imageFile, int load);
|
||||
|
||||
tex_t *LoadImage (const char *imageFile);
|
||||
typedef struct colcache_s colcache_t;
|
||||
|
||||
#endif //__QF_image_h
|
||||
colcache_t *ColorCache_New (void);
|
||||
void ColorCache_Delete (colcache_t *cache);
|
||||
byte ConvertColor (const byte *rgb, const byte *pal, colcache_t *cache);
|
||||
tex_t *ConvertImage (const tex_t *tex, const byte *pal);
|
||||
|
||||
#endif//__QF_image_h
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _INFO_H
|
||||
#define _INFO_H
|
||||
#ifndef __QF_info_h
|
||||
#define __QF_info_h
|
||||
|
||||
/** \defgroup info Info Keys
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include <stdlib.h> // for size_t. sys/types.h SHOULD be used, but can't :(bc)
|
||||
#include <QF/qtypes.h>
|
||||
|
@ -47,10 +47,10 @@ typedef struct info_key_s {
|
|||
const char *value;
|
||||
} info_key_t;
|
||||
|
||||
qboolean Info_FilterForKey (const char *key, const char **filter_list);
|
||||
qboolean Info_FilterForKey (const char *key, const char **filter_list) __attribute__((pure));
|
||||
|
||||
void Info_Print (info_t *info);
|
||||
int Info_CurrentSize (info_t *info);
|
||||
int Info_CurrentSize (info_t *info) __attribute__((pure));
|
||||
info_key_t *Info_Key (info_t *info, const char *key);
|
||||
info_key_t **Info_KeyList (info_t *info);
|
||||
void Info_RemoveKey (info_t *info, const char *key);
|
||||
|
@ -63,6 +63,6 @@ void Info_Destroy (info_t *info);
|
|||
char *Info_MakeString (info_t *info, int (*filter)(const char *));
|
||||
void Info_AddKeys (info_t *info, info_t *keys);
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // _INFO_H
|
||||
#endif//__QF_info_h
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __QF_input_h_
|
||||
#define __QF_input_h_
|
||||
#ifndef __QF_input_h
|
||||
#define __QF_input_h
|
||||
|
||||
#include "QF/keys.h"
|
||||
|
||||
|
@ -44,8 +44,6 @@ struct cvar_s;
|
|||
void IN_Init (struct cbuf_s *cbuf);
|
||||
void IN_Init_Cvars (void);
|
||||
|
||||
void IN_Shutdown (void);
|
||||
|
||||
void IN_ProcessEvents (void);
|
||||
|
||||
void IN_UpdateGrab (struct cvar_s *);
|
||||
|
@ -75,4 +73,4 @@ void IN_LL_Grab_Input (int grab);
|
|||
|
||||
extern kbutton_t in_strafe, in_klook, in_speed, in_mlook;
|
||||
|
||||
#endif // __QF_input_h_
|
||||
#endif//__QF_input_h
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef __QF_iqm_h__
|
||||
#define __QF_iqm_h__
|
||||
#ifndef __QF_iqm_h
|
||||
#define __QF_iqm_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
|
@ -149,4 +149,4 @@ typedef struct {
|
|||
void *extra_data;
|
||||
} iqm_t;
|
||||
|
||||
#endif//__QF_iqm_h__
|
||||
#endif//__QF_iqm_h
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef __QF_joystick_h_
|
||||
#define __QF_joystick_h_
|
||||
#ifndef __QF_joystick_h
|
||||
#define __QF_joystick_h
|
||||
|
||||
#include <QF/qtypes.h>
|
||||
#include "QF/quakeio.h"
|
||||
|
@ -144,14 +144,14 @@ void JOY_Close (void);
|
|||
void JOY_Read (void);
|
||||
|
||||
|
||||
const char *JOY_GetOption_c (int i);
|
||||
int JOY_GetOption_i (const char *c);
|
||||
const char *JOY_GetOption_c (int i) __attribute__((pure));
|
||||
int JOY_GetOption_i (const char *c) __attribute__((pure));
|
||||
|
||||
const char *JOY_GetDest_c (int i);
|
||||
int JOY_GetDest_i (const char *c);
|
||||
const char *JOY_GetDest_c (int i) __attribute__((pure));
|
||||
int JOY_GetDest_i (const char *c) __attribute__((pure));
|
||||
int JOY_GetAxis_i (int dest, const char *c);
|
||||
|
||||
|
||||
void Joy_WriteBindings (QFile *f);
|
||||
|
||||
#endif // __QF_joystick_h_
|
||||
#endif//__QF_joystick_h
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef _KEYS_H
|
||||
#define _KEYS_H
|
||||
#ifndef __QF_keys_h
|
||||
#define __QF_keys_h
|
||||
|
||||
#ifndef __QFCC__
|
||||
# include "QF/qtypes.h"
|
||||
|
@ -39,7 +39,7 @@
|
|||
/** \defgroup input_keybinding Key Binding Sub-system
|
||||
\ingroup input
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
/// these are the key numbers that should be passed to Key_Event
|
||||
typedef enum {
|
||||
|
@ -227,77 +227,110 @@ typedef enum {
|
|||
|
||||
/* Numeric keypad */
|
||||
QFK_KP0 = 256,
|
||||
QFK_KP1 = 257,
|
||||
QFK_KP2 = 258,
|
||||
QFK_KP3 = 259,
|
||||
QFK_KP4 = 260,
|
||||
QFK_KP5 = 261,
|
||||
QFK_KP6 = 262,
|
||||
QFK_KP7 = 263,
|
||||
QFK_KP8 = 264,
|
||||
QFK_KP9 = 265,
|
||||
QFK_KP_PERIOD = 266,
|
||||
QFK_KP_DIVIDE = 267,
|
||||
QFK_KP_MULTIPLY = 268,
|
||||
QFK_KP_MINUS = 269,
|
||||
QFK_KP_PLUS = 270,
|
||||
QFK_KP_ENTER = 271,
|
||||
QFK_KP_EQUALS = 272,
|
||||
QFK_KP1,
|
||||
QFK_KP2,
|
||||
QFK_KP3,
|
||||
QFK_KP4,
|
||||
QFK_KP5,
|
||||
QFK_KP6,
|
||||
QFK_KP7,
|
||||
QFK_KP8,
|
||||
QFK_KP9,
|
||||
QFK_KP_PERIOD,
|
||||
QFK_KP_DIVIDE,
|
||||
QFK_KP_MULTIPLY,
|
||||
QFK_KP_MINUS,
|
||||
QFK_KP_PLUS,
|
||||
QFK_KP_ENTER,
|
||||
QFK_KP_EQUALS,
|
||||
|
||||
/* Arrows + Home/End pad */
|
||||
QFK_UP = 273,
|
||||
QFK_DOWN = 274,
|
||||
QFK_RIGHT = 275,
|
||||
QFK_LEFT = 276,
|
||||
QFK_INSERT = 277,
|
||||
QFK_HOME = 278,
|
||||
QFK_END = 279,
|
||||
QFK_PAGEUP = 280,
|
||||
QFK_PAGEDOWN = 281,
|
||||
QFK_UP,
|
||||
QFK_DOWN,
|
||||
QFK_RIGHT,
|
||||
QFK_LEFT,
|
||||
QFK_INSERT,
|
||||
QFK_HOME,
|
||||
QFK_END,
|
||||
QFK_PAGEUP,
|
||||
QFK_PAGEDOWN,
|
||||
|
||||
/* Function keys */
|
||||
QFK_F1 = 282,
|
||||
QFK_F2 = 283,
|
||||
QFK_F3 = 284,
|
||||
QFK_F4 = 285,
|
||||
QFK_F5 = 286,
|
||||
QFK_F6 = 287,
|
||||
QFK_F7 = 288,
|
||||
QFK_F8 = 289,
|
||||
QFK_F9 = 290,
|
||||
QFK_F10 = 291,
|
||||
QFK_F11 = 292,
|
||||
QFK_F12 = 293,
|
||||
QFK_F13 = 294,
|
||||
QFK_F14 = 295,
|
||||
QFK_F15 = 296,
|
||||
QFK_F1,
|
||||
QFK_F2,
|
||||
QFK_F3,
|
||||
QFK_F4,
|
||||
QFK_F5,
|
||||
QFK_F6,
|
||||
QFK_F7,
|
||||
QFK_F8,
|
||||
QFK_F9,
|
||||
QFK_F10,
|
||||
QFK_F11,
|
||||
QFK_F12,
|
||||
QFK_F13,
|
||||
QFK_F14,
|
||||
QFK_F15,
|
||||
QFK_F16,
|
||||
QFK_F17,
|
||||
QFK_F18,
|
||||
QFK_F19,
|
||||
QFK_F20,
|
||||
QFK_F21,
|
||||
QFK_F22,
|
||||
QFK_F23,
|
||||
QFK_F24,
|
||||
QFK_F25,
|
||||
QFK_F26,
|
||||
QFK_F27,
|
||||
QFK_F28,
|
||||
QFK_F29,
|
||||
QFK_F30,
|
||||
QFK_F31,
|
||||
QFK_F32,
|
||||
QFK_F33,
|
||||
QFK_F34,
|
||||
QFK_F35,
|
||||
QFK_F36,
|
||||
QFK_F37,
|
||||
QFK_F38,
|
||||
QFK_F39,
|
||||
QFK_F40,
|
||||
QFK_F41,
|
||||
QFK_F42,
|
||||
QFK_F43,
|
||||
QFK_F44,
|
||||
QFK_F45,
|
||||
QFK_F46,
|
||||
QFK_F47,
|
||||
QFK_F48,
|
||||
|
||||
/* Key state modifier keys */
|
||||
QFK_NUMLOCK = 300,
|
||||
QFK_CAPSLOCK = 301,
|
||||
QFK_SCROLLOCK = 302,
|
||||
QFK_RSHIFT = 303,
|
||||
QFK_LSHIFT = 304,
|
||||
QFK_RCTRL = 305,
|
||||
QFK_LCTRL = 306,
|
||||
QFK_RALT = 307,
|
||||
QFK_LALT = 308,
|
||||
QFK_RMETA = 309,
|
||||
QFK_LMETA = 310,
|
||||
QFK_LSUPER = 311, /* Left "Windows" key */
|
||||
QFK_RSUPER = 312, /* Right "Windows" key */
|
||||
QFK_MODE = 313, /* "Alt Gr" key */
|
||||
QFK_COMPOSE = 314, /* Multi-key compose key */
|
||||
QFK_NUMLOCK,
|
||||
QFK_CAPSLOCK,
|
||||
QFK_SCROLLOCK,
|
||||
QFK_RSHIFT,
|
||||
QFK_LSHIFT,
|
||||
QFK_RCTRL,
|
||||
QFK_LCTRL,
|
||||
QFK_RALT,
|
||||
QFK_LALT,
|
||||
QFK_RMETA,
|
||||
QFK_LMETA,
|
||||
QFK_LSUPER, /* Left "Windows" key */
|
||||
QFK_RSUPER, /* Right "Windows" key */
|
||||
QFK_MODE, /* "Alt Gr" key */
|
||||
QFK_COMPOSE, /* Multi-key compose key */
|
||||
|
||||
/* Miscellaneous function keys */
|
||||
QFK_HELP = 315,
|
||||
QFK_PRINT = 316,
|
||||
QFK_SYSREQ = 317,
|
||||
QFK_BREAK = 318,
|
||||
QFK_MENU = 319,
|
||||
QFK_POWER = 320, /* Power Macintosh power key */
|
||||
QFK_EURO = 321, /* Some european keyboards */
|
||||
QFK_UNDO = 322,
|
||||
QFK_HELP,
|
||||
QFK_PRINT,
|
||||
QFK_SYSREQ,
|
||||
QFK_BREAK,
|
||||
QFK_MENU,
|
||||
QFK_POWER, /* Power Macintosh power key */
|
||||
QFK_EURO, /* Some european keyboards */
|
||||
QFK_UNDO,
|
||||
|
||||
/* Japanese keys */
|
||||
QFK_KANJI, /* Kanji, Kanji convert */
|
||||
|
@ -544,7 +577,7 @@ void Key_Init_Cvars (void);
|
|||
\param imt_name The name of the imt to find. Case insensitive.
|
||||
\return The named imt, or null if not found.
|
||||
*/
|
||||
imt_t *Key_FindIMT (const char *imt_name);
|
||||
imt_t *Key_FindIMT (const char *imt_name) __attribute__((pure));
|
||||
|
||||
/** Create a new imt and attach it to the specified keydest target.
|
||||
|
||||
|
@ -599,7 +632,7 @@ void Key_ClearStates (void);
|
|||
\param key The key for which to get the binding.
|
||||
\return The command string bound to the key, or null if unbound.
|
||||
*/
|
||||
const char *Key_GetBinding (imt_t *imt, knum_t key);
|
||||
const char *Key_GetBinding (imt_t *imt, knum_t key) __attribute__((pure));
|
||||
|
||||
/** Bind a command string to a key in the specified input mapping table.
|
||||
|
||||
|
@ -639,7 +672,7 @@ void Key_KeydestCallback (keydest_callback_t *callback);
|
|||
\param keynum The key for which to get the string.
|
||||
\return The string representation of the key.
|
||||
*/
|
||||
const char *Key_KeynumToString (knum_t keynum);
|
||||
const char *Key_KeynumToString (knum_t keynum) __attribute__((pure));
|
||||
|
||||
/** Get the keynum for the named key.
|
||||
|
||||
|
@ -650,7 +683,7 @@ const char *Key_KeynumToString (knum_t keynum);
|
|||
\param str The name of the key.
|
||||
\return The named key if valid, otherwise -1
|
||||
*/
|
||||
int Key_StringToKeynum (const char *str);
|
||||
int Key_StringToKeynum (const char *str) __attribute__((pure));
|
||||
|
||||
struct progs_s;
|
||||
|
||||
|
@ -659,6 +692,6 @@ struct progs_s;
|
|||
void Key_Progs_Init (struct progs_s *pr);
|
||||
#endif
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // _KEYS_H
|
||||
#endif//__QF_keys_h
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _LINK_H
|
||||
#define _LINK_H
|
||||
#ifndef __QF_link_h
|
||||
#define __QF_link_h
|
||||
|
||||
// (type *)STRUCT_FROM_LINK(link_t *link, type, member)
|
||||
// ent = STRUCT_FROM_LINK(link,entity_t,order)
|
||||
|
@ -43,4 +43,4 @@ void RemoveLink (link_t *l);
|
|||
void InsertLinkBefore (link_t *l, link_t *before);
|
||||
void InsertLinkAfter (link_t *l, link_t *after);
|
||||
|
||||
#endif // _LINK_H
|
||||
#endif//__QF_link_h
|
||||
|
|
|
@ -25,21 +25,33 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _LLIST_H
|
||||
#define _LLIST_H
|
||||
#ifndef __QF_llist_h
|
||||
#define __QF_llist_h
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
/** \defgroup llist Linked lists
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
|
||||
typedef struct llist_node_s {
|
||||
struct llist_s *parent;
|
||||
struct llist_node_s *prev, *next;
|
||||
void *data;
|
||||
struct llist_s *parent; ///< The list owning this node.
|
||||
struct llist_node_s *prev; ///< The previous node in the list, or null.
|
||||
struct llist_node_s *next; ///< The flowing node in the list, or null.
|
||||
void *data; ///< The actual list item.
|
||||
} llist_node_t;
|
||||
|
||||
typedef struct llist_s {
|
||||
struct llist_node_s *start, *end, *iter;
|
||||
struct llist_node_s *start; ///< The first node in the list, or null.
|
||||
struct llist_node_s *end; ///< The last node in the list, or null.
|
||||
struct llist_node_s *iter;
|
||||
/// Function called when deleting a list item.
|
||||
/// \param element The item being deleted.
|
||||
/// \param userdata Pointer to user data supplied to llist_new().
|
||||
void (*freedata)(void *element, void *userdata);
|
||||
qboolean (*cmpdata)(const void *element, const void *comparison, void *userdata);
|
||||
qboolean (*cmpdata)(const void *element, const void *comparison,
|
||||
void *userdata);
|
||||
void *userdata;
|
||||
} llist_t;
|
||||
|
||||
|
@ -48,18 +60,56 @@ typedef qboolean (*llist_iterator_t)(void *element, llist_node_t *node);
|
|||
#define LLIST_ICAST(x) (llist_iterator_t)(x)
|
||||
#define LLIST_DATA(node, type) ((type *)((node)->data))
|
||||
|
||||
llist_t *llist_new (void (*freedata)(void *element, void *userdata), qboolean (*cmpdata)(const void *element, const void *comparison, void *userdata), void *userdata);
|
||||
/** Create a new, empty, linked list.
|
||||
|
||||
\param freedata Function to call when deleting a list item.
|
||||
\param cmpdata Function to call to compare two list items. It must
|
||||
return true when the items are the same and false when
|
||||
they differ.
|
||||
\param userdata User data pointer. Set to whatever you want, it will be
|
||||
passed to the \a freedata and \a cmpdata functions as
|
||||
their final parameter.
|
||||
\return Pointer to the list's control structure, which is to be
|
||||
passed to the other functions accessing the list.
|
||||
*/
|
||||
llist_t *llist_new (void (*freedata)(void *element, void *userdata),
|
||||
qboolean (*cmpdata)(const void *element,
|
||||
const void *comparison,
|
||||
void *userdata),
|
||||
void *userdata);
|
||||
|
||||
/** Empty a linked list.
|
||||
All of the items in the list will be deleted via the list's \a freedata
|
||||
function and the list will become empty.
|
||||
|
||||
\param list Pointer to the list's control structure created by
|
||||
llist_new(). May be null, in which case no operation is
|
||||
performed.
|
||||
*/
|
||||
void llist_flush (llist_t *list);
|
||||
|
||||
/** Delete a linked list.
|
||||
All of the items in the list will be deleted via the list's \a freedata
|
||||
function and the list will be destroyed. Do not attempt to use the list
|
||||
pointer after destroying the list.
|
||||
|
||||
\param list Pointer to the list's control structure created by
|
||||
llist_new(). May be null, in which case no operation is
|
||||
performed.
|
||||
*/
|
||||
void llist_delete (llist_t *list);
|
||||
llist_node_t *llist_append (llist_t *list, void *element);
|
||||
llist_node_t *llist_prefix (llist_t *list, void *element);
|
||||
llist_node_t *llist_getnode (llist_t *list, void *element);
|
||||
llist_node_t *llist_getnode (llist_t *list, void *element) __attribute__((pure));
|
||||
llist_node_t *llist_insertafter (llist_node_t *ref, void *element);
|
||||
llist_node_t *llist_insertbefore (llist_node_t *ref, void *element);
|
||||
void *llist_remove (llist_node_t *ref);
|
||||
unsigned int llist_size (llist_t *llist);
|
||||
unsigned int llist_size (llist_t *llist) __attribute__((pure));
|
||||
void llist_iterate (llist_t *list, llist_iterator_t iterate);
|
||||
void *llist_find (llist_t *list, void *comparison);
|
||||
llist_node_t *llist_findnode (llist_t *list, void *comparison);
|
||||
void *llist_createarray (llist_t *list, size_t esize);
|
||||
#endif
|
||||
|
||||
//@}
|
||||
|
||||
#endif//__QF_llist_h
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/** \defgroup mathlib_dual Dual and dual quaternion functions
|
||||
\ingroup utils
|
||||
*/
|
||||
//@{
|
||||
///@{
|
||||
|
||||
#include "QF/qtypes.h"
|
||||
|
||||
|
@ -189,6 +189,6 @@
|
|||
} while (0)
|
||||
#define DualQuatExpand(dq) QuatExpand ((dq).q0.q), QuatExpand ((dq).qe.q)
|
||||
|
||||
//@}
|
||||
///@}
|
||||
|
||||
#endif // __QF_math_dual_h
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue