mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- fixed compile errors.
This commit is contained in:
parent
a5054b0882
commit
4b3adf548a
2 changed files with 7 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "templates.h"
|
||||
#include "GuillotineBinPack.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -395,7 +395,7 @@ int GuillotineBinPack::ScoreBestShortSideFit(int width, int height, const Rect &
|
|||
{
|
||||
int leftoverHoriz = abs(freeRect.width - width);
|
||||
int leftoverVert = abs(freeRect.height - height);
|
||||
int leftover = min(leftoverHoriz, leftoverVert);
|
||||
int leftover = MIN(leftoverHoriz, leftoverVert);
|
||||
return leftover;
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ int GuillotineBinPack::ScoreBestLongSideFit(int width, int height, const Rect &f
|
|||
{
|
||||
int leftoverHoriz = abs(freeRect.width - width);
|
||||
int leftoverVert = abs(freeRect.height - height);
|
||||
int leftover = max(leftoverHoriz, leftoverVert);
|
||||
int leftover = MAX(leftoverHoriz, leftoverVert);
|
||||
return leftover;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include "templates.h"
|
||||
|
||||
#include "SkylineBinPack.h"
|
||||
|
||||
|
@ -131,7 +132,7 @@ bool SkylineBinPack::RectangleFits(int skylineNodeIndex, int width, int height,
|
|||
y = skyLine[skylineNodeIndex].y;
|
||||
while(widthLeft > 0)
|
||||
{
|
||||
y = max(y, skyLine[i].y);
|
||||
y = MAX(y, skyLine[i].y);
|
||||
if (y + height > binHeight)
|
||||
return false;
|
||||
widthLeft -= skyLine[i].width;
|
||||
|
@ -152,7 +153,7 @@ int SkylineBinPack::ComputeWastedArea(int skylineNodeIndex, int width, int heigh
|
|||
break;
|
||||
|
||||
int leftSide = skyLine[skylineNodeIndex].x;
|
||||
int rightSide = min(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
int rightSide = MIN(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
assert(y >= skyLine[skylineNodeIndex].y);
|
||||
wastedArea += (rightSide - leftSide) * (y - skyLine[skylineNodeIndex].y);
|
||||
}
|
||||
|
@ -179,7 +180,7 @@ void SkylineBinPack::AddWasteMapArea(int skylineNodeIndex, int width, int height
|
|||
break;
|
||||
|
||||
int leftSide = skyLine[skylineNodeIndex].x;
|
||||
int rightSide = min(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
int rightSide = MIN(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
assert(y >= skyLine[skylineNodeIndex].y);
|
||||
|
||||
Rect waste;
|
||||
|
|
Loading…
Reference in a new issue