From 7f9850644b2210f7134ecc36c4117bace5f25001 Mon Sep 17 00:00:00 2001 From: Sryder Date: Wed, 12 Aug 2020 00:12:42 +0100 Subject: [PATCH] A few opengl file build fixes Also ogl_win.c had a merge conflict remaining apparently. --- src/hardware/hw_cache.c | 2 +- src/hardware/hw_glob.h | 3 ++- src/hardware/hw_main.c | 4 ++-- src/hardware/hw_main.h | 1 - src/hardware/r_opengl/ogl_win.c | 15 --------------- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 4797f8c7d..cb3088cb6 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -857,7 +857,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap) return; if (levelflat->type == LEVELFLAT_FLAT) - HWR_LiterallyGetFlat(levelflat->u.flat.lumpnum); + HWR_LiterallyGetFlat(levelflat->u.flat.lumpnum, noencoremap); else if (levelflat->type == LEVELFLAT_TEXTURE) { GLMapTexture_t *grtex; diff --git a/src/hardware/hw_glob.h b/src/hardware/hw_glob.h index 1c343103d..cca13f33b 100644 --- a/src/hardware/hw_glob.h +++ b/src/hardware/hw_glob.h @@ -14,6 +14,7 @@ #define _HWR_GLOB_H_ #include "hw_defs.h" +#include "hw_main.h" #include "../m_misc.h" #include "../r_defs.h" #include "../p_setup.h" @@ -91,7 +92,7 @@ void HWR_FreeTextureCache(void); void HWR_FreeMipmapCache(void); void HWR_FreeExtraSubsectors(void); -void HWR_GetLevelFlat(levelflat_t *levelflat); +void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap); void HWR_LiterallyGetFlat(lumpnum_t flatlumpnum, boolean noencoremap); GLMapTexture_t *HWR_GetTexture(INT32 tex); void HWR_GetPatch(GLPatch_t *gpatch); diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a7b59eb97..b73dd82e2 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3107,7 +3107,7 @@ static void HWR_Subsector(size_t num) } else { - HWR_GetLevelFlat(&levelflats[*rover->bottompic], R_NoEncore(gr_frontsector, false)); + HWR_GetLevelFlat(&levelflats[*rover->bottompic], R_NoEncore(gl_frontsector, false)); light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); HWR_RenderPlane(sub, &extrasubsectors[num], false, *rover->bottomheight, (rover->flags & FF_RIPPLE ? PF_Ripple : 0)|PF_Occlude, *gl_frontsector->lightlist[light].lightlevel, &levelflats[*rover->bottompic], rover->master->frontsector, 255, *gl_frontsector->lightlist[light].extra_colormap); @@ -3152,7 +3152,7 @@ static void HWR_Subsector(size_t num) } else { - HWR_GetLevelFlat(&levelflats[*rover->toppic], R_NoEncore(gr_frontsector, true)); + HWR_GetLevelFlat(&levelflats[*rover->toppic], R_NoEncore(gl_frontsector, true)); light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); HWR_RenderPlane(sub, &extrasubsectors[num], true, *rover->topheight, (rover->flags & FF_RIPPLE ? PF_Ripple : 0)|PF_Occlude, *gl_frontsector->lightlist[light].lightlevel, &levelflats[*rover->toppic], rover->master->frontsector, 255, *gl_frontsector->lightlist[light].extra_colormap); diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index d70bb6d72..53a9aef51 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -40,7 +40,6 @@ void HWR_SetViewSize(void); void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option); void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, fixed_t vscale, INT32 option, const UINT8 *colormap); void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h); -void HWR_MakePatch(const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap); void HWR_CreatePlanePolygons(INT32 bspnum); void HWR_CreateStaticLightmaps(INT32 bspnum); void HWR_LoadTextures(size_t pnumtextures); diff --git a/src/hardware/r_opengl/ogl_win.c b/src/hardware/r_opengl/ogl_win.c index 709dea181..c9bf60144 100644 --- a/src/hardware/r_opengl/ogl_win.c +++ b/src/hardware/r_opengl/ogl_win.c @@ -566,20 +566,6 @@ EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl) // -----------------+ EXPORT void HWRAPI(SetPalette) (RGBA_t *pal) { -<<<<<<< HEAD - INT32 i; - - for (i = 0; i < 256; i++) - { - myPaletteData[i].s.red = (UINT8)MIN((pal[i].s.red*gamma->s.red)/127, 255); - myPaletteData[i].s.green = (UINT8)MIN((pal[i].s.green*gamma->s.green)/127, 255); - myPaletteData[i].s.blue = (UINT8)MIN((pal[i].s.blue*gamma->s.blue)/127, 255); - myPaletteData[i].s.alpha = pal[i].s.alpha; - } - - // on a palette change, you have to reload all of the textures - Flush(); -======= size_t palsize = (sizeof(RGBA_t) * 256); // on a palette change, you have to reload all of the textures if (memcmp(&myPaletteData, pal, palsize)) @@ -587,7 +573,6 @@ EXPORT void HWRAPI(SetPalette) (RGBA_t *pal) memcpy(&myPaletteData, pal, palsize); Flush(); } ->>>>>>> srb2/next } #endif