From aa723f7a2bf3caf19907188fa1737f03defbde50 Mon Sep 17 00:00:00 2001 From: Indev Date: Sat, 23 Mar 2024 00:46:08 +0300 Subject: [PATCH] Fix NOHW compilation (1 error and 1 warning) --- src/r_patch.c | 7 ++++++- src/w_wad.c | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/r_patch.c b/src/r_patch.c index f69be9de3..597a1a0de 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -896,7 +896,12 @@ static patch_t *R_CreateHardwarePatch(patch_t *patch) void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip) { UINT32 i; - patch_t *rotated, *hwpatch; + patch_t *rotated; + +#ifdef HWRENDER + patch_t *hwpatch; +#endif + UINT16 *rawdst, *rawconv; size_t size; INT32 bflip = (flip != 0x00); diff --git a/src/w_wad.c b/src/w_wad.c index 4c0676024..86536c03f 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -820,9 +820,11 @@ UINT16 W_InitFile(const char *filename, boolean local) wadfiles[numwadfiles] = wadfile; numwadfiles++; // must come BEFORE W_LoadDehackedLumps, so any addfile called by COM_BufInsertText called by Lua doesn't overwrite what we just loaded - // Read shaders from file - if (rendermode == render_opengl && (vid.glstate == VID_GL_LIBRARY_LOADED)) - HWR_LoadCustomShadersFromFile(numwadfiles - 1, (type == RET_PK3)); +#ifdef HWRENDER + // Read shaders from file + if (rendermode == render_opengl && (vid.glstate == VID_GL_LIBRARY_LOADED)) + HWR_LoadCustomShadersFromFile(numwadfiles - 1, (type == RET_PK3)); +#endif // TODO: HACK ALERT - Load Lua & SOC stuff right here. I feel like this should be out of this place, but... Let's stick with this for now. switch (wadfile->type)