mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
fix my fucking code
This commit is contained in:
parent
2fdf27c507
commit
82601e881b
1 changed files with 15 additions and 17 deletions
|
@ -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,20 @@ 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);
|
||||||
dest[u] = consolebgmap[dest[u]];
|
if (alphalevel) // Use fadetable
|
||||||
}
|
fadetable = ((UINT8 *)transtables + ((alphalevel-1)<<FF_TRANSSHIFT) + (c*256));
|
||||||
}
|
|
||||||
} else { // mpc 12-04-2018
|
for (v = 0; v < h; v++, dest += vid.width)
|
||||||
const UINT8 *fadetable = ((UINT8 *)transtables + ((alphalevel-1)<<FF_TRANSSHIFT) + (c*256));
|
for (u = 0; u < w; u++)
|
||||||
#define clip(x,y) (x>y) ? y : x
|
{
|
||||||
w = clip(w,vid.width);
|
if (!alphalevel)
|
||||||
h = clip(h,vid.height);
|
dest[u] = consolebgmap[dest[u]];
|
||||||
for (v = 0; v < h; v++, dest += vid.width) {
|
else
|
||||||
for (u = 0; u < w; u++) {
|
dest[u] = fadetable[consolebgmap[dest[u]]];
|
||||||
dest[u] = fadetable[consolebgmap[dest[u]]];
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue