less ugly mapdims

replaced the mapdims array with a struct with properly identified members

also reduced the calclight postfilter to actually used map areas
This commit is contained in:
ac-stef
2014-11-12 17:52:44 +01:00
parent 9b22587e32
commit 4fdba4fa4a
8 changed files with 92 additions and 63 deletions
+2 -1
View File
@@ -178,6 +178,7 @@ VARF(ambient, 0, 0, 0xFFFFFF, if(!noteditmode("ambient")) { hdr.ambient = ambien
void calclight()
{
if(editmode) calcmapdims();
uchar r = (hdr.ambient>>16) & 0xFF, g = (hdr.ambient>>8) & 0xFF, b = hdr.ambient & 0xFF;
if(!r && !g)
{
@@ -205,7 +206,7 @@ void calclight()
seedMT(keep);
block bb = { 1, 1, ssize-2, ssize-2 };
block bb = { mapdims.x1 - 1, mapdims.y1 - 1, mapdims.x2 + 1, mapdims.y2 + 1 };
postlightarea(bb);
setvar("fullbright", 0);
lastcalclight = totalmillis;