- replaced MIN/MAX in common code.
This commit is contained in:
parent
07a181090b
commit
eb69bbcae0
63 changed files with 200 additions and 236 deletions
|
|
@ -252,7 +252,7 @@ void DCanvas::Resize(int width, int height, bool optimizepitch)
|
|||
}
|
||||
else
|
||||
{
|
||||
Pitch = width + MAX(0, CPU.DataL1LineSize - 8);
|
||||
Pitch = width + max(0, CPU.DataL1LineSize - 8);
|
||||
}
|
||||
}
|
||||
int bytes_per_pixel = Bgra ? 4 : 1;
|
||||
|
|
@ -275,7 +275,7 @@ void V_UpdateModeSize (int width, int height)
|
|||
|
||||
// This reference size is being used so that on 800x450 (small 16:9) a scale of 2 gets used.
|
||||
|
||||
CleanXfac = std::max(std::min(screen->GetWidth() / 400, screen->GetHeight() / 240), 1);
|
||||
CleanXfac = max(min(screen->GetWidth() / 400, screen->GetHeight() / 240), 1);
|
||||
if (CleanXfac >= 4) CleanXfac--; // Otherwise we do not have enough space for the episode/skill menus in some languages.
|
||||
CleanYfac = CleanXfac;
|
||||
CleanWidth = screen->GetWidth() / CleanXfac;
|
||||
|
|
@ -292,7 +292,7 @@ void V_UpdateModeSize (int width, int height)
|
|||
else if (w < 1920) factor = 2;
|
||||
else factor = int(factor * 0.7);
|
||||
|
||||
CleanYfac_1 = CleanXfac_1 = factor;// MAX(1, int(factor * 0.7));
|
||||
CleanYfac_1 = CleanXfac_1 = factor;// max(1, int(factor * 0.7));
|
||||
CleanWidth_1 = width / CleanXfac_1;
|
||||
CleanHeight_1 = height / CleanYfac_1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue