mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
unsafeptr is now byte-aligned
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameactors
|
||||
|
||||
import net.torvald.terrarum.gameactors.ActorMovingPlatform
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2022-03-02.
|
||||
*/
|
||||
|
||||
@@ -82,11 +82,11 @@ internal object LightmapHDRMap : Disposable {
|
||||
|
||||
operator fun invoke() {
|
||||
THE_LUT.forEachIndexed { i, f ->
|
||||
ptr.setFloat(4L * i, f)
|
||||
ptr.setFloat(i.toLong(), f)
|
||||
}
|
||||
}
|
||||
|
||||
inline operator fun get(index: Int) = ptr.getFloat(4L * index)
|
||||
inline operator fun get(index: Int) = ptr.getFloat(index.toLong())
|
||||
|
||||
val lastIndex = THE_LUT.lastIndex
|
||||
val size = lastIndex + 1
|
||||
|
||||
Reference in New Issue
Block a user