Browse Source

Restore optional optimization of GetSizeForThemeRoom

Looks like this improves performance by about 8%
pull/4997/head
Anders Jenbo 4 years ago
parent
commit
3f6e6b19db
  1. 4
      Source/levels/gendung.cpp

4
Source/levels/gendung.cpp

@ -116,6 +116,8 @@ std::optional<Size> GetSizeForThemeRoom(int floor, Point origin, int minSize, in
yArray[x]++; yArray[x]++;
} }
if (yArray[x] < minSize)
break;
} }
int xArray[20] = {}; int xArray[20] = {};
@ -129,6 +131,8 @@ std::optional<Size> GetSizeForThemeRoom(int floor, Point origin, int minSize, in
xArray[y]++; xArray[y]++;
} }
if (xArray[y] < minSize)
break;
} }
int xSmallest = xArray[0]; int xSmallest = xArray[0];

Loading…
Cancel
Save