v2.1.3: adjusted patch rooms to be a bit more flexible
This commit is contained in:
@@ -44,9 +44,10 @@ public class CaveRoom extends PatchRoom {
|
||||
// normal ~30% to ~40%
|
||||
// large ~40% to ~50%
|
||||
// giant ~50% to ~60%
|
||||
float fill = 0.30f + (width()*height())/1024f;
|
||||
int scale = Math.min(width()*height(), 18*18);
|
||||
float fill = 0.30f + scale/1024f;
|
||||
|
||||
setupPatch(level, fill, 3, true);
|
||||
setupPatch(level, fill, 3, connected.size() > 0);
|
||||
cleanDiagonalEdges();
|
||||
|
||||
for (int i = top + 1; i < bottom; i++) {
|
||||
|
||||
@@ -57,9 +57,10 @@ public class ChasmRoom extends PatchRoom {
|
||||
// normal ~30% to ~40%
|
||||
// large ~40% to ~50%
|
||||
// giant ~50% to ~60%
|
||||
float fill = 0.30f + (width()*height())/1024f;
|
||||
int scale = Math.min(width()*height(), 18*18);
|
||||
float fill = 0.30f + scale/1024f;
|
||||
|
||||
setupPatch(level, fill, 1, true);
|
||||
setupPatch(level, fill, 1, connected.size() > 0);
|
||||
cleanDiagonalEdges();
|
||||
|
||||
for (int i = top + 1; i < bottom; i++) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public abstract class PatchRoom extends StandardRoom {
|
||||
boolean valid;
|
||||
do {
|
||||
patch = Patch.generate(width()-2, height()-2, fill, clustering, true);
|
||||
int startPoint = 0;
|
||||
int startPoint = level.pointToCell(center());
|
||||
for (Door door : connected.values()) {
|
||||
if (door.x == left) {
|
||||
startPoint = xyToPatchCoords(door.x + 1, door.y);
|
||||
|
||||
@@ -50,9 +50,10 @@ public class RuinsRoom extends PatchRoom {
|
||||
// normal ~20% to ~30%
|
||||
// large ~30% to ~40%
|
||||
// giant ~40% to ~50%
|
||||
float fill = 0.20f + (width()*height())/1024f;
|
||||
int scale = Math.min(width()*height(), 18*18);
|
||||
float fill = 0.20f + scale/1024f;
|
||||
|
||||
setupPatch(level, fill, 0, true);
|
||||
setupPatch(level, fill, 0, connected.size() > 0);
|
||||
cleanDiagonalEdges();
|
||||
|
||||
for (int i = top + 1; i < bottom; i++) {
|
||||
|
||||
Reference in New Issue
Block a user