change STBVOX_MAKE_LIGHTING to STBVOX_MAKE_LIGHTING_EXT so header file
doesn't have to see the config variables (although this way is actually more bug prone since you can now use the wrong macro)
This commit is contained in:
@ -406,12 +406,12 @@ void convert_fastchunk_inplace(fast_chunk *fc)
|
||||
bright = (lt[o]&15)*12 + 15 + (sky[o]&15)*16;
|
||||
if (bright > 255) bright = 255;
|
||||
if (bright < 32) bright = 32;
|
||||
outb[o*2+0] = STBVOX_MAKE_LIGHTING((unsigned char) bright, (rot[o*2+0]&3));
|
||||
outb[o*2+0] = STBVOX_MAKE_LIGHTING_EXT((unsigned char) bright, (rot[o*2+0]&3));
|
||||
|
||||
bright = (lt[o]>>4)*12 + 15 + (sky[o]>>4)*16;
|
||||
if (bright > 255) bright = 255;
|
||||
if (bright < 32) bright = 32;
|
||||
outb[o*2+1] = STBVOX_MAKE_LIGHTING((unsigned char) bright, (rot[o*2+1]&3));
|
||||
outb[o*2+1] = STBVOX_MAKE_LIGHTING_EXT((unsigned char) bright, (rot[o*2+1]&3));
|
||||
}
|
||||
} else {
|
||||
// @TODO: if blocktype is in between others, this breaks; need to find which side has two pointers, and use that
|
||||
@ -426,12 +426,12 @@ void convert_fastchunk_inplace(fast_chunk *fc)
|
||||
bright = (lt[o]&15)*12 + 15 + (sky[o]&15)*16;
|
||||
if (bright > 255) bright = 255;
|
||||
if (bright < 32) bright = 32;
|
||||
rot[o*2+0] = STBVOX_MAKE_LIGHTING((unsigned char) bright, (rot[o*2+0]&3));
|
||||
rot[o*2+0] = STBVOX_MAKE_LIGHTING_EXT((unsigned char) bright, (rot[o*2+0]&3));
|
||||
|
||||
bright = (lt[o]>>4)*12 + 15 + (sky[o]>>4)*16;
|
||||
if (bright > 255) bright = 255;
|
||||
if (bright < 32) bright = 32;
|
||||
rot[o*2+1] = STBVOX_MAKE_LIGHTING((unsigned char) bright, (rot[o*2+1]&3));
|
||||
rot[o*2+1] = STBVOX_MAKE_LIGHTING_EXT((unsigned char) bright, (rot[o*2+1]&3));
|
||||
}
|
||||
|
||||
memcpy(outb, rot, 4096);
|
||||
|
Reference in New Issue
Block a user