Merge branch 'srb2chat' into 'SRB2-CHAT'

fix my fucking code

See merge request SinnamonLat/SRB2!1
This commit is contained in:
Latapostrophe 2018-12-18 11:51:18 -05:00
commit cd1b929524

View file

@ -881,6 +881,7 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
{ {
UINT8 *dest; UINT8 *dest;
INT32 u, v; INT32 u, v;
UINT8 *fadetable;
UINT32 alphalevel = 0; UINT32 alphalevel = 0;
if (rendermode == render_none) if (rendermode == render_none)
@ -965,23 +966,18 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
c &= 255; c &= 255;
if (!alphalevel) { // Jimita (12-04-2018)
for (v = 0; v < h; v++, dest += vid.width) { w = min(w, vid.width);
for (u = 0; u < w; u++) { h = min(h, vid.height);
fadetable = ((UINT8 *)transtables + ((alphalevel-1)<<FF_TRANSSHIFT) + (c*256));
for (v = 0; v < h; v++, dest += vid.width)
for (u = 0; u < w; u++)
{
if (!alphalevel)
dest[u] = consolebgmap[dest[u]]; dest[u] = consolebgmap[dest[u]];
} else
}
} else { // mpc 12-04-2018
const UINT8 *fadetable = ((UINT8 *)transtables + ((alphalevel-1)<<FF_TRANSSHIFT) + (c*256));
#define clip(x,y) (x>y) ? y : x
w = clip(w,vid.width);
h = clip(h,vid.height);
for (v = 0; v < h; v++, dest += vid.width) {
for (u = 0; u < w; u++) {
dest[u] = fadetable[consolebgmap[dest[u]]]; dest[u] = fadetable[consolebgmap[dest[u]]];
} }
}
}
} }
// //