Merge branch 'awful-mix-httpfixes' into 'awful-mix'

Fix super lol compile errors

See merge request SinnamonLat/Kart-Public!7
This commit is contained in:
wolfs 2020-04-18 23:34:41 -04:00
commit 783a1c78bd
5 changed files with 44 additions and 45 deletions

View file

@ -1307,7 +1307,6 @@ void D_SRB2Main(void)
#ifdef HWRENDER
if (rendermode == render_opengl)
{
INT32 i;
for (i = 0; i < numwadfiles; i++)
HWR_LoadShaders(i, (wadfiles[i]->type == RET_PK3));
}

View file

@ -579,7 +579,7 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
{
#ifdef GLENCORE
UINT8 *flat;
INT32 steppy;
size_t steppy;
#endif
size_t size, pflatsize;

View file

@ -74,7 +74,7 @@ EXPORT void HWRAPI(InitCustomShaders) (void);
EXPORT void HWRAPI(StartBatching) (void);
EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCalls, int *sNumShaders, int *sNumTextures, int *sNumPolyFlags, int *sNumColors, int *sSortTime, int *sDrawTime);
EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCalls, int *sNumShaders, int *sNumTextures, int *sNumPolyFlags, int *sNumColors);
// ==========================================================================

View file

@ -142,6 +142,7 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, UINT32 mixcolor, UIN
RGBA_t mix_color, fog_color, final_color;
INT32 mix;
float fog_alpha;
float red, green, blue;
mix_color.rgba = mixcolor;
fog_color.rgba = fadecolor;
@ -177,9 +178,9 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, UINT32 mixcolor, UIN
if (fog < 0)
fog = 0;
float red = ((fog_color.s.red/255.0f) * fog) + ((final_color.s.red/255.0f) * (1.0f - fog));
float green = ((fog_color.s.green/255.0f) * fog) + ((final_color.s.green/255.0f) * (1.0f - fog));
float blue = ((fog_color.s.blue/255.0f) * fog) + ((final_color.s.blue/255.0f) * (1.0f - fog));
red = ((fog_color.s.red/255.0f) * fog) + ((final_color.s.red/255.0f) * (1.0f - fog));
green = ((fog_color.s.green/255.0f) * fog) + ((final_color.s.green/255.0f) * (1.0f - fog));
blue = ((fog_color.s.blue/255.0f) * fog) + ((final_color.s.blue/255.0f) * (1.0f - fog));
final_color.s.red = (UINT8)(red*255.0f);
final_color.s.green = (UINT8)(green*255.0f);
final_color.s.blue = (UINT8)(blue*255.0f);
@ -1873,7 +1874,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
boolean checkforemptylines = true;
// Don't modify anything here, just check
// Kalaron: Modified for sloped linedefs
static boolean CheckClip(seg_t * seg, sector_t * afrontsector, sector_t * abacksector)
static boolean CheckClip(sector_t * afrontsector, sector_t * abacksector)
{
fixed_t frontf1,frontf2, frontc1, frontc2; // front floor/ceiling ends
fixed_t backf1, backf2, backc1, backc2; // back floor ceiling ends
@ -2008,7 +2009,7 @@ void HWR_AddLine(seg_t *line)
else
{
gr_backsector = R_FakeFlat(gr_backsector, &tempsec, NULL, NULL, true);
if (CheckClip(line, gr_frontsector, gr_backsector))
if (CheckClip(gr_frontsector, gr_backsector))
{
gld_clipper_SafeAddClipRange(angle2, angle1);
checkforemptylines = false;
@ -3102,7 +3103,6 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
{
float sprdist = sqrtf((spr->x1 - gr_viewx)*(spr->x1 - gr_viewx) + (spr->z1 - gr_viewy)*(spr->z1 - gr_viewy) + (spr->ty - gr_viewz)*(spr->ty - gr_viewz));
float distfact = ((2.0f*spr->dispoffset) + 20.0f) / sprdist;
size_t i;
for (i = 0; i < 4; i++)
{
baseWallVerts[i].x += (gr_viewx - baseWallVerts[i].x)*distfact;
@ -4813,7 +4813,7 @@ void HWR_RenderFrame(INT32 viewnumber, player_t *player, boolean skybox)
{
int dummy = 0;// the vars in RenderBatches are meant for render stats. But we don't have that stuff in this branch
// so that stuff could be removed...
HWD.pfnRenderBatches(&dummy, &dummy, &dummy, &dummy, &dummy, &dummy, &dummy, &dummy, &dummy);
HWD.pfnRenderBatches(&dummy, &dummy, &dummy, &dummy, &dummy, &dummy, &dummy);
}
// Check for new console commands.

View file

@ -1822,7 +1822,7 @@ static int comparePolygonsNoShaders(const void *p1, const void *p2)
}
// the parameters for this functions (numPolys etc.) are used to return rendering stats
EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCalls, int *sNumShaders, int *sNumTextures, int *sNumPolyFlags, int *sNumColors, int *sSortTime, int *sDrawTime)
EXPORT void HWRAPI(RenderBatches) (int *sNumPolys, int *sNumVerts, int *sNumCalls, int *sNumShaders, int *sNumTextures, int *sNumPolyFlags, int *sNumColors)
{
int finalVertexWritePos = 0;// position in finalVertexArray
int finalIndexWritePos = 0;// position in finalVertexIndexArray