blockprop: fall is now grav

This commit is contained in:
minjaesong
2019-06-11 20:55:28 +09:00
parent 196ae40bbb
commit 23b103892e
11 changed files with 139 additions and 137 deletions

View File

@@ -44,7 +44,10 @@ open class BlockLayer(val width: Int, val height: Int) : Disposable {
init {
if (!unsafeArrayInitialised) {
unsafe.setMemory(layerPtr, width * height * BYTES_PER_BLOCK.toLong(), 0)
//unsafe.setMemory(layerPtr, width * height * BYTES_PER_BLOCK.toLong(), 0) // sometimes does not work?!
for (i in 0 until width * height * BYTES_PER_BLOCK.toLong()) {
unsafe.putByte(layerPtr + i, 0)
}
unsafeArrayInitialised = true
}
}