Add/fix some TODOs

master
Captain Chaos 2022-08-18 11:49:48 +02:00
parent 2bae92287c
commit c208b2ae8c
3 changed files with 8 additions and 6 deletions

View File

@ -228,10 +228,11 @@ public final class TileRenderer {
for (int y = 0; y < TILE_SIZE; y++) {
if (notAllChunksPresent && (tile.getBitLayerValue(NotPresent.INSTANCE, x, y))) {
renderBuffer[x | (y << TILE_SIZE_BITS)] = notPresentColour;
} else if ((!noOpposites) && oppositesOverlap[x | (y << TILE_SIZE_BITS)] && CEILING_PATTERN[x & 0x7][y & 0x7]) {
} else if ((! noOpposites) && oppositesOverlap[x | (y << TILE_SIZE_BITS)] && CEILING_PATTERN[x & 0x7][y & 0x7]) {
renderBuffer[x | (y << TILE_SIZE_BITS)] = 0xff000000;
} else if (_void && tile.getBitLayerValue(org.pepsoft.worldpainter.layers.Void.INSTANCE, x, y)) {
renderBuffer[x | (y << TILE_SIZE_BITS)] = 0x00000000;
// TODO still render ReadOnly, and layers which might still be exported over Void
} else {
int colour = getPixelColour(tile, x, y, layers, renderers, contourLines, hideTerrain, hideFluids, bottomless, topLayersRelativeToTerrain, seed);
colour = ColourUtils.multiply(colour, getTerrainBrightenAmount());

View File

@ -328,8 +328,8 @@ public abstract class AbstractWorldExporter implements WorldExporter {
// Undo any changes we made (such as applying any combined layers)
if (dimension.undoChanges()) {
// TODO: some kind of cleverer undo mechanism (undo history
// cloning?) so we don't mess up the user's redo history
// TODO: some kind of cleverer undo mechanism (undo history cloning?) so we don't mess up the user's
// redo history
dimension.clearRedo();
dimension.armSavePoint();
}
@ -337,8 +337,8 @@ public abstract class AbstractWorldExporter implements WorldExporter {
if (ceiling != null) {
// Undo any changes we made (such as applying any combined layers)
if (ceiling.undoChanges()) {
// TODO: some kind of cleverer undo mechanism (undo history
// cloning?) so we don't mess up the user's redo history
// TODO: some kind of cleverer undo mechanism (undo history cloning?) so we don't mess up the user's
// redo history
ceiling.clearRedo();
ceiling.armSavePoint();
}
@ -409,7 +409,7 @@ public abstract class AbstractWorldExporter implements WorldExporter {
}
}
// If there are combined layers, apply them and gather any newly added layers, recursively
// If there are combined layers, replace them with their constituent layers, recursively
boolean done;
do {
done = true;

View File

@ -1253,6 +1253,7 @@ public class JavaWorldMerger extends JavaWorldExporter { // TODO can this be mad
if (dimension.getBitLayerValueAt(org.pepsoft.worldpainter.layers.Void.INSTANCE, chunkX | x, chunkZ | z)) {
// Void. Just empty the entire column
// TODO: only empty from the terrain height on downwards? or find some other way of preserving overhanging trees, that kind of thing?
// TODO: this prevents you from placing objects in the void; fix that!
for (int y = existingChunk.getHighestNonAirBlock(x, z); y >= minHeight; y--) {
existingChunk.setMaterial(x, y, z, AIR);
existingChunk.setBlockLightLevel(x, y, z, 0);