From bc8895c5fae975814757955ddf9231b8aad2f41a Mon Sep 17 00:00:00 2001 From: Eukara Date: Sat, 23 Apr 2022 20:10:18 +0000 Subject: [PATCH] Fix compiles without RTLIGHT. Update config_wastes.h git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6235 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/r_surf.c | 5 ++- engine/common/config_wastes.h | 70 ++++++++++++++++++++--------------- engine/common/q1bsp.c | 3 +- engine/gl/shader.h | 2 + 4 files changed, 49 insertions(+), 31 deletions(-) diff --git a/engine/client/r_surf.c b/engine/client/r_surf.c index 150e3aeaf..cd4a38322 100644 --- a/engine/client/r_surf.c +++ b/engine/client/r_surf.c @@ -2999,8 +2999,9 @@ void Surf_DrawWorld (void) { r_dynamic.modified = false; r_temporalscenecache.modified = false; +#ifdef RTLIGHT Sh_CheckSettings(); //fiddle with r_dynamic vs r_shadow_realtime_dlight. - +#endif COM_WorkerPartialSync(webogenerating, &webogeneratingstate, true); while (webostates) { @@ -3214,8 +3215,10 @@ void Surf_DrawWorld (void) } #endif +#ifdef RTLIGHT if (r_shadow_realtime_dlight.ival || currentmodel->type != mod_brush || !(currentmodel->fromgame == fg_quake || currentmodel->fromgame == fg_halflife) || !currentmodel->funcs.MarkLights) r_dynamic.ival = -1; +#endif Surf_PushChains(currentmodel->batches); diff --git a/engine/common/config_wastes.h b/engine/common/config_wastes.h index c5331d86f..c6a0f5204 100644 --- a/engine/common/config_wastes.h +++ b/engine/common/config_wastes.h @@ -1,22 +1,27 @@ /*** * -* Copyright (c) 2000-2019, Vera Visions. All rights reserved. +* Copyright (c) 2000-2022, Vera Visions. All rights reserved. * ****/ -/* branding defaults */ +#ifndef DEMO + #define FULLENGINENAME "The Wastes" + #define GAME_SHORTNAME "TW" + #define GAME_BASEGAMES "platform","wastes" + #define GAME_PROTOCOL "The-Wastes" +#else + #define FULLENGINENAME "The Wastes Demo" + #define GAME_SHORTNAME "TWDemo" + #define GAME_BASEGAMES "platform","demotw" + #define GAME_PROTOCOL "TW-Demo" +#endif + +#define BRANDING_ICON "wastes.ico" #define DISTRIBUTION "VTW" #define DISTRIBUTIONLONG "Vera Visions" -#define FULLENGINENAME "The Wastes" -#define ENGINEWEBSITE "https://www.vera-visions.com/" -#define BRANDING_ICON "wastes.ico" - -/* FS rebranding */ -#define GAME_SHORTNAME "TW" #define GAME_FULLNAME FULLENGINENAME -#define GAME_BASEGAMES "platform","wastes" -#define GAME_PROTOCOL "The-Wastes" #define GAME_DEFAULTPORT 23000 +#define ENGINEWEBSITE "https://www.vera-visions.com/" #ifndef GLQUAKE #define GLQUAKE @@ -41,7 +46,6 @@ #define CSQC_DAT /* clientside qcvm */ #define MENU_DAT /* persistent qcvm */ #define PSET_SCRIPT /* scripts defining particles */ -#define RTLIGHTS /* only way FTE does dlights on Q3BSP basically */ #define LOADERTHREAD /* multithreading related */ #define USEAREAGRID /* leave it on, improves performance */ #define AVAIL_DINPUT /* input for Windows */ @@ -49,6 +53,16 @@ #define AVAIL_STBI /* avoid libpng/libjpeg dependancies */ #define ENGINE_ROUTING /* engine-side, fast routing */ +#ifndef LEGACY_GPU + #define RTLIGHTS +#else + #undef RTLIGHTS +#endif + +#undef D3D9QUAKE /* MICROS~1 trash */ +#undef D3D11QUAKE /* MICROS~1 trash */ +#undef D3D8QUAKE /* MICROS~1 trash */ + /* uncompressed textures */ #define IMAGEFMT_BMP /* sprays */ #define IMAGEFMT_TGA @@ -56,10 +70,8 @@ /* compressed textures */ #define IMAGEFMT_KTX #define DECOMPRESS_ETC2 -#define DECOMPRESS_S3TC #define DECOMPRESS_RGTC -#define DECOMPRESS_BPTC -#define DECOMPRESS_ASTC +#define DECOMPRESS_S3TC /* To be able to comm with Frag-Net.com */ #define HAVE_PACKET @@ -89,25 +101,23 @@ #define TERRAIN /* audio */ -#define USEEFX -#undef AVAIL_OPENAL -#define MIXER_F32 -#define HAVE_MIXER +#define AVAIL_OPENAL #define AVAIL_OGGVORBIS #define HAVE_OPUS #define VOICECHAT -#define AVAIL_DSOUND -#undef AVAIL_XAUDIO2 -#define AVAIL_WASAPI /* Model formats, IQM/VVM and HLMDL for legacy maps */ #define INTERQUAKEMODELS #define HALFLIFEMODELS +/* physics */ +#undef USE_INTERNAL_ODE +#undef USE_INTERNAL_BULLET +#undef USERBE +#undef RAGDOLL + /* we don't need any of these */ #undef IMAGEFMT_PCX -#undef USE_INTERNAL_BULLET -#undef USE_INTERNAL_ODE #undef PACKAGE_DOOMWAD #undef DOOMWADS #undef MAP_PROC @@ -126,9 +136,8 @@ #undef PSKMODELS #undef MENU_NATIVECODE /* native menu replacing menuQC */ #undef MVD_RECORDING /* server can record MVDs. */ -#undef D3D9QUAKE /* MICROS~1 trash */ -#undef D3D11QUAKE /* MICROS~1 trash */ -#undef D3D8QUAKE /* MICROS~1 trash */ +#undef AVAIL_WASAPI /* windows advanced sound api */ +#undef AVAIL_DSOUND /* MICROS~1 trash */ #undef BOTLIB_STATIC /* q3 botlib */ #undef AVAIL_XZDEC /* .xz decompression */ #undef HAVE_SPEEX /* .xz decompression */ @@ -146,8 +155,6 @@ #undef QUAKEHUD /* support for drawing the vanilla hud */ #undef QWSKINS /* disabling this means no qw .pcx skins nor enemy/team skin/colour forcing */ #undef SVRANKING /* legacy server-side ranking system */ -#undef USERBE /* required for physics */ -#undef RAGDOLL /* ragdoll support. requires RBE support */ #define HUFFNETWORK /* crappy network compression. probably needs reseeding */ #undef SVCHAT /* ancient lame builtin to support NPC-style chat.. */ #undef VM_Q1 /* q1qvm implementation, to support ktx */ @@ -169,12 +176,13 @@ #undef SIDEVIEWS #undef MAX_SPLITS #undef SUBSERVERS /* multi-map */ +#undef HAVE_MIXER /* OpenAL only */ #undef VM_LUA /* lua game-logic */ #undef HLCLIENT /* regressed, unfinished*/ #undef HLSERVER /* regressed, unfinished */ #undef FTPSERVER #undef HAVE_JUKEBO /* includes built-in jukebox */ -#undef HAVE_MEDIA_DECODER /* can play cin/roq, more with plugins */ +#define HAVE_MEDIA_DECODER /* can play cin/roq, more with plugins */ #undef HAVE_MEDIA_ENCODER /* capture/capturedemo work */ #undef HAVE_SPEECHTOTEXT /* Windows speech-to-text thing */ #undef SAVEDGAMES @@ -226,6 +234,10 @@ -DLINK_INTERNAL_BULLET #endif +#ifdef USE_INTERNAL_ODE +-DODE_STATIC +#endif + /* disable static speex */ #ifdef HAVE_SPEEX -DNO_SPEEX diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index 5a9dee228..016bd9347 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -560,11 +560,12 @@ static void Q3BSP_ClipDecalToNodes (fragmentdecal_t *dec, mnode_t *node) { surf = *msurf; +#ifdef RTLIGHTS //only check each surface once. it can appear in multiple leafs. if (surf->shadowframe == sh_shadowframe) continue; surf->shadowframe = sh_shadowframe; - +#endif Fragment_Mesh(dec, surf->mesh, surf->texinfo); } return; diff --git a/engine/gl/shader.h b/engine/gl/shader.h index 2e681f39c..1a0ffc06d 100644 --- a/engine/gl/shader.h +++ b/engine/gl/shader.h @@ -1062,7 +1062,9 @@ void Sh_PreGenerateLights(void); //Draws lights, called from the backend void Sh_DrawLights(qbyte *vis); void Sh_GenerateFakeShadows(void); +#ifdef RTLIGHTS void Sh_CheckSettings(void); +#endif void SH_FreeShadowMesh(struct shadowmesh_s *sm); //frees all memory void Sh_Shutdown(void);