fix: prev commit was made haphazardly

This commit is contained in:
minjaesong
2024-10-30 18:10:30 +09:00
parent 3de4018d75
commit 4cc74a85d1
2 changed files with 3 additions and 12 deletions

View File

@@ -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. * 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 override val bytesPerBlock = BYTES_PER_BLOCK
// for some reason, all the efforts of saving the memory space were futile. // for some reason, all the efforts of saving the memory space were futile.

View File

@@ -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 * 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 width: Int,
override val height: Int, override val height: Int,
disk: ClusteredFormatDOM, ): BlockLayer {
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")
})
override val bytesPerBlock = BYTES_PER_BLOCK override val bytesPerBlock = BYTES_PER_BLOCK