mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: prev commit was made haphazardly
This commit is contained in:
@@ -17,7 +17,7 @@ const val FLUID_MIN_MASS = 1f / 1024f //Ignore cells that are almost dry (smalle
|
||||
*
|
||||
* Created by minjaesong on 2023-10-10.
|
||||
*/
|
||||
class BlockLayerI16F16(override val width: Int, override val height: Int) : BlockLayer {
|
||||
class BlockLayerFluidI16F16(override val width: Int, override val height: Int) : BlockLayer {
|
||||
override val bytesPerBlock = BYTES_PER_BLOCK
|
||||
|
||||
// for some reason, all the efforts of saving the memory space were futile.
|
||||
|
||||
@@ -21,19 +21,10 @@ import net.torvald.unsafe.UnsafePtr
|
||||
*
|
||||
* Note to self: refrain from using shorts--just do away with two bytes: different system have different endianness
|
||||
*/
|
||||
class BlockLayerI16(
|
||||
class BlockLayerGenericI16(
|
||||
override val width: Int,
|
||||
override val height: Int,
|
||||
disk: ClusteredFormatDOM,
|
||||
layerNum: Int,
|
||||
world: GameWorld
|
||||
): BlockLayer() {
|
||||
|
||||
override val chunkPool = ChunkPool(disk, layerNum, BYTES_PER_BLOCK, world, when (layerNum) {
|
||||
TERRAIN -> ChunkPool.getRenameFunTerrain(world)
|
||||
WALL -> ChunkPool.getRenameFunTerrain(world)
|
||||
else -> throw IllegalArgumentException("Unknown layer number for I16: $layerNum")
|
||||
})
|
||||
): BlockLayer {
|
||||
|
||||
override val bytesPerBlock = BYTES_PER_BLOCK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user