From 268f122b23d27172b76a06b18a65b47888584d88 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 10 Nov 2021 01:36:22 +0000 Subject: [PATCH] Small fixups for the hl2 plugin. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6121 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- build_setup.sh | 22 +++++++++++----------- build_wip.sh | 10 +++++----- plugins/Makefile | 3 ++- plugins/hl2/mat_vmt.c | 12 ++++++++++++ 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/build_setup.sh b/build_setup.sh index acf885f8a..aebb921f5 100755 --- a/build_setup.sh +++ b/build_setup.sh @@ -37,26 +37,26 @@ TARGETS_LINUX="qcc-rel rel dbg plugins-rel plugins-dbg" #gl-rel vk-rel TARGETS_WINDOWS="sv-rel m-rel qcc-rel qccgui-scintilla qccgui-dbg m-dbg sv-dbg plugins-dbg plugins-rel" #gl-rel vk-rel mingl-rel d3d-rel -PLUGINS_DROID="qi ezhud irc" -PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc" -PLUGINS_LINUXx64="openxr ode qi ezhud xmpp irc" -PLUGINS_LINUXx32="qi ezhud xmpp irc" -PLUGINS_LINUXarmhf="qi ezhud xmpp irc" +PLUGINS_DROID="qi ezhud irc hl2" +PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc hl2" +PLUGINS_LINUXx64="openxr ode qi ezhud xmpp irc hl2" +PLUGINS_LINUXx32="qi ezhud xmpp irc hl2" +PLUGINS_LINUXarmhf="qi ezhud xmpp irc hl2" if [ "$(uname -m)" != "x86_64" ]; then - PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc" + PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc hl2" fi if [ "$(uname -m)" == "x86_64" ]; then - PLUGINS_LINUX64="openxr ode qi ezhud xmpp irc" + PLUGINS_LINUX64="openxr ode qi ezhud xmpp irc hl2" fi #windows is always cross compiled, so we don't have issues with non-native ffmpeg #windows doesn't cross compile, so no system dependancy issues #skip some dependancies if we're running on cygwin, ode is buggy. if [ "$(uname -s)" == "Linux" ]; then - PLUGINS_WIN32="ode qi ezhud xmpp irc" - PLUGINS_WIN64="ode qi ezhud xmpp irc" + PLUGINS_WIN32="ode qi ezhud xmpp irc hl2" + PLUGINS_WIN64="ode qi ezhud xmpp irc hl2" else - PLUGINS_WIN32="qi ezhud xmpp irc" - PLUGINS_WIN64="qi ezhud xmpp irc" + PLUGINS_WIN32="qi ezhud xmpp irc hl2" + PLUGINS_WIN64="qi ezhud xmpp irc hl2" fi echo diff --git a/build_wip.sh b/build_wip.sh index 7d5e2aaa7..f63179bbb 100755 --- a/build_wip.sh +++ b/build_wip.sh @@ -20,11 +20,11 @@ BUILD_WIN32=y BUILD_WIN64=y BUILD_ANDROID=y BUILD_WEB=y -PLUGINS_LINUXx86="qi ezhud xmpp irc" -PLUGINS_LINUXx64="qi ezhud xmpp irc" -PLUGINS_LINUXx32="qi ezhud xmpp irc" -PLUGINS_WIN32="ffmpeg ode qi ezhud xmpp irc" -PLUGINS_WIN64="ffmpeg ode qi ezhud xmpp irc" +PLUGINS_LINUXx86="qi ezhud xmpp irc hl2" +PLUGINS_LINUXx64="qi ezhud xmpp irc hl2" +PLUGINS_LINUXx32="qi ezhud xmpp irc hl2" +PLUGINS_WIN32="ffmpeg ode qi ezhud xmpp irc hl2" +PLUGINS_WIN64="ffmpeg ode qi ezhud xmpp irc hl2" THREADS="-j 4" TARGETS_LINUX="qcc-rel rel dbg vk-rel plugins-rel plugins-dbg" diff --git a/plugins/Makefile b/plugins/Makefile index a18ddcbcd..b9a012fcc 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -417,7 +417,8 @@ $(PLUG_PREFIX)openssl$(PLUG_NATIVE_EXT): net_ssl_openssl.c plugin.c #for compat with half-life 2's file formats $(PLUG_PREFIX)hl2$(PLUG_NATIVE_EXT): hl2/fs_vpk.c hl2/img_vtf.c hl2/mod_hl2.c hl2/mat_vmt.c hl2/mod_vbsp.c hl2/hl2.c plugin.c $(CC) $(BASE_CFLAGS) $(CFLAGS) -DFTEPLUGIN -DMULTITHREAD -o $@ -shared $(PLUG_CFLAGS) $^ $(PLUG_DEFFILE) $(PLUG_LDFLAGS) -#NATIVE_PLUGINS+=hl2 + $(call EMBEDMETA,hl2,$@,HL2 Formats,Provides support for various formats used by Valve's Source engine.) +NATIVE_PLUGINS+=hl2 diff --git a/plugins/hl2/mat_vmt.c b/plugins/hl2/mat_vmt.c index d10b8cbf4..b2c098961 100644 --- a/plugins/hl2/mat_vmt.c +++ b/plugins/hl2/mat_vmt.c @@ -519,6 +519,18 @@ static qboolean Shader_LoadVMT(parsestate_t *ps, const char *filename, void (*Lo static struct sbuiltin_s vmtprograms[] = { +//we don't know what renderer the engine will need... +#ifdef FTEPLUGIN + #ifndef GLQUAKE + #define GLQUAKE + #endif + #ifndef VKQUAKE + #define VKQUAKE + #endif + #ifndef D3DQUAKE + #define D3DQUAKE + #endif +#endif #include "mat_vmt_progs.h" {QR_NONE} };