Bump kvector and kbox2d
This commit is contained in:
parent
02ec8454ca
commit
4e4875b5d7
@ -80,8 +80,8 @@ dependencies {
|
|||||||
implementation("net.java.dev.jna:jna:5.13.0")
|
implementation("net.java.dev.jna:jna:5.13.0")
|
||||||
implementation("com.github.jnr:jnr-ffi:2.2.13")
|
implementation("com.github.jnr:jnr-ffi:2.2.13")
|
||||||
|
|
||||||
implementation("ru.dbotthepony:kbox2d:2.4.1.2")
|
implementation("ru.dbotthepony:kbox2d:2.4.1.6")
|
||||||
implementation("ru.dbotthepony:kvector:2.2.4")
|
implementation("ru.dbotthepony:kvector:2.2.8")
|
||||||
|
|
||||||
implementation("com.github.ben-manes.caffeine:caffeine:3.1.5")
|
implementation("com.github.ben-manes.caffeine:caffeine:3.1.5")
|
||||||
}
|
}
|
||||||
|
@ -196,7 +196,7 @@ open class GLShaderProgram(val state: GLStateTracker, shaders: Iterable<GLStateT
|
|||||||
state.ensureSameThread()
|
state.ensureSameThread()
|
||||||
|
|
||||||
buff4x4.position(0)
|
buff4x4.position(0)
|
||||||
value.storeColumnRow(buff4x4)
|
value.storeRowColumn(buff4x4)
|
||||||
buff4x4.position(0)
|
buff4x4.position(0)
|
||||||
_value.position(0)
|
_value.position(0)
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ class Box2DRenderer(val state: GLStateTracker) : IDebugDraw {
|
|||||||
override var drawShapes: Boolean = false
|
override var drawShapes: Boolean = false
|
||||||
override var drawJoints: Boolean = false
|
override var drawJoints: Boolean = false
|
||||||
override var drawAABB: Boolean = false
|
override var drawAABB: Boolean = false
|
||||||
|
override var drawTreeAABB: Boolean = false
|
||||||
override var drawPairs: Boolean = false
|
override var drawPairs: Boolean = false
|
||||||
override var drawCenterOfMess: Boolean = false
|
override var drawCenterOfMess: Boolean = false
|
||||||
|
|
||||||
|
@ -205,6 +205,7 @@ abstract class Chunk<WorldType : World<WorldType, This>, This : Chunk<WorldType,
|
|||||||
changeset++
|
changeset++
|
||||||
collisionChangeset++
|
collisionChangeset++
|
||||||
this@Chunk.changeset++
|
this@Chunk.changeset++
|
||||||
|
markPhysicsDirty()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun randomLongFor(x: Int, y: Int): Long {
|
override fun randomLongFor(x: Int, y: Int): Long {
|
||||||
@ -215,20 +216,16 @@ abstract class Chunk<WorldType : World<WorldType, This>, This : Chunk<WorldType,
|
|||||||
val foreground = TileLayer()
|
val foreground = TileLayer()
|
||||||
val background = TileLayer()
|
val background = TileLayer()
|
||||||
|
|
||||||
protected val liquidStates: TwoDimensionalArray<LiquidState> = TwoDimensionalArray(CHUNK_SIZE, CHUNK_SIZE)
|
protected val liquidStates: Object2DArray<LiquidState?> = Object2DArray.nulls(CHUNK_SIZE, CHUNK_SIZE)
|
||||||
|
|
||||||
fun getLiquid(x: Int, y: Int) = liquidStates[x, y]
|
fun getLiquid(x: Int, y: Int) = liquidStates[x, y]
|
||||||
|
|
||||||
fun setLiquid(x: Int, y: Int, value: LiquidDefinition?): LiquidState? {
|
fun setLiquid(x: Int, y: Int, value: LiquidDefinition?): LiquidState? {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
val old = liquidStates.set(x, y, null)
|
liquidStates.set(x, y, null)
|
||||||
|
changeset++
|
||||||
if (old != null) {
|
liquidChangeset++
|
||||||
changeset++
|
return null
|
||||||
liquidChangeset++
|
|
||||||
}
|
|
||||||
|
|
||||||
return old
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val state = LiquidState(value)
|
val state = LiquidState(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user