mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 16:46:07 +09:00
particles must be disposed of before overwritten
This commit is contained in:
@@ -12,8 +12,9 @@ import net.torvald.UnsafeHelper
|
||||
*/
|
||||
internal class UnsafeCvecArray(val width: Int, val height: Int) {
|
||||
|
||||
private val TOTAL_SIZE_IN_BYTES = 16L * (width + 1) * (height + 1)
|
||||
val TOTAL_SIZE_IN_BYTES = 16L * (width + 1) * (height + 1)
|
||||
private val array = UnsafeHelper.allocate(TOTAL_SIZE_IN_BYTES)
|
||||
val ptr = array.ptr
|
||||
|
||||
private inline fun toAddr(x: Int, y: Int) = 16L * (y * width + x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user