Made classic rendererer respect per-surface light levels (#698)

This commit is contained in:
volte 2022-01-31 13:49:26 -05:00 committed by GitHub
parent 3a4ba32718
commit d37e2400bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 31 deletions

View file

@ -308,7 +308,7 @@ namespace CodeImp.DoomBuilder.Data
// Do the loading
LocalLoadResult loadResult = LocalLoadImage();
MakeUncorrectedImage(loadResult, usecolorcorrection);
MakeUncorrectedImage(loadResult);
ConvertImageFormat(loadResult, usecolorcorrection);
MakeImagePreview(loadResult);
MakeAlphaTestImage(loadResult);
@ -603,20 +603,12 @@ namespace CodeImp.DoomBuilder.Data
// Dimensions of a single preview image
const int MAX_PREVIEW_SIZE = 256; //mxd
// This makes a copy of the image before color correction or, if color correction is disabled for this image,
// just references the original bitmap.
private void MakeUncorrectedImage(LocalLoadResult loadResult, bool usecolorcorrection)
// This makes a copy of the image before color correction
private void MakeUncorrectedImage(LocalLoadResult loadResult)
{
if (loadResult.bitmap == null)
return;
if (usecolorcorrection)
{
loadResult.uncorrected = new Bitmap(loadResult.bitmap);
}
else
{
loadResult.uncorrected = loadResult.bitmap;
}
loadResult.uncorrected = new Bitmap(loadResult.bitmap);
}
// This makes a preview for the given image and updates the image settings