1
0

BlockTypePalette: Refactored for usage in both directions.

Improves index() lookup speeds and allows BlockTypePalette to be used in place of ProtocolBlockTypePalette.
This commit is contained in:
Mattes D
2019-12-01 14:41:46 +01:00
parent ea1937dae4
commit 2de6b7537d
4 changed files with 158 additions and 75 deletions

View File

@@ -178,7 +178,7 @@ void PalettedBlockArea::paste(const PalettedBlockArea & aSrc, const cCuboid & aS
}
// Create a transform map from aSrc's palette to our palette:
auto paletteTransform = mPalette.createTransformMap(aSrc.mPalette);
auto paletteTransform = mPalette.createTransformMapAddMissing(aSrc.mPalette);
// Copy the data:
UInt32 srcStrideY = static_cast<UInt32>(aSrc.size().x * aSrc.size().z);