Немного прибираемся
This commit is contained in:
parent
9ae61d6882
commit
215ae8429e
@ -166,7 +166,7 @@ fun main() {
|
||||
val item = Starbound.ITEM.values.random()
|
||||
val rand = java.util.Random()
|
||||
|
||||
for (i in 0 .. 240) {
|
||||
for (i in 0 .. 10) {
|
||||
val item = ItemEntity(client.world!!, item)
|
||||
|
||||
item.position = Vector2d(600.0 + 16.0 + i, 721.0 + 48.0)
|
||||
|
@ -30,6 +30,7 @@ import ru.dbotthepony.kstarbound.defs.item.LeveledStatusEffect
|
||||
import ru.dbotthepony.kstarbound.defs.item.LiquidItemPrototype
|
||||
import ru.dbotthepony.kstarbound.defs.item.MaterialItemPrototype
|
||||
import ru.dbotthepony.kstarbound.defs.liquid.LiquidDefinition
|
||||
import ru.dbotthepony.kstarbound.defs.parallax.ParallaxPrototype
|
||||
import ru.dbotthepony.kstarbound.defs.projectile.*
|
||||
import ru.dbotthepony.kstarbound.defs.tile.MaterialModifier
|
||||
import ru.dbotthepony.kstarbound.defs.tile.RenderParameters
|
||||
|
@ -1,32 +1,17 @@
|
||||
package ru.dbotthepony.kstarbound.client
|
||||
|
||||
import org.lwjgl.opengl.GL46.*
|
||||
import ru.dbotthepony.kstarbound.PIXELS_IN_STARBOUND_UNIT
|
||||
import ru.dbotthepony.kstarbound.PIXELS_IN_STARBOUND_UNITf
|
||||
import ru.dbotthepony.kstarbound.client.gl.BlendFunc
|
||||
import ru.dbotthepony.kstarbound.client.gl.GLFrameBuffer
|
||||
import ru.dbotthepony.kstarbound.client.gl.GLTexture2D
|
||||
import ru.dbotthepony.kstarbound.client.gl.vertex.QuadTransformers
|
||||
import ru.dbotthepony.kstarbound.client.gl.vertex.quad
|
||||
import ru.dbotthepony.kstarbound.client.gl.vertex.quadZ
|
||||
import ru.dbotthepony.kstarbound.client.render.ILayeredRenderer
|
||||
import ru.dbotthepony.kstarbound.client.render.renderLayeredList
|
||||
import ru.dbotthepony.kstarbound.defs.ParallaxPrototype
|
||||
import ru.dbotthepony.kstarbound.defs.parallax.ParallaxPrototype
|
||||
import ru.dbotthepony.kstarbound.math.encasingChunkPosAABB
|
||||
import ru.dbotthepony.kstarbound.util.DoubleEdgeProgression
|
||||
import ru.dbotthepony.kstarbound.world.*
|
||||
import ru.dbotthepony.kstarbound.world.entities.Entity
|
||||
import ru.dbotthepony.kvector.util2d.AABB
|
||||
import ru.dbotthepony.kvector.vector.Color
|
||||
import ru.dbotthepony.kvector.vector.ndouble.Vector2d
|
||||
import ru.dbotthepony.kvector.vector.nfloat.Vector2f
|
||||
import ru.dbotthepony.kvector.vector.nint.Vector2i
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import kotlin.math.PI
|
||||
import kotlin.math.cos
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.math.sin
|
||||
|
||||
class ClientWorld(
|
||||
val client: StarboundClient,
|
||||
|
@ -1,14 +0,0 @@
|
||||
package ru.dbotthepony.kstarbound.defs
|
||||
|
||||
import ru.dbotthepony.kvector.vector.nint.Vector2i
|
||||
|
||||
class AnimationDefinitionBuilder {
|
||||
var frames: String? = null
|
||||
var variants: Int? = null
|
||||
var frameNumber: Int? = null
|
||||
var animationCycle: Double? = null
|
||||
var offset: Vector2i? = null
|
||||
}
|
||||
|
||||
class AnimationDefinition {
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package ru.dbotthepony.kstarbound.defs
|
||||
|
||||
class ParticleDefinitionBuilder {
|
||||
var kind: String? = null
|
||||
var animation: String? = null
|
||||
var size: Double? = null
|
||||
var timeToLive: Double? = null
|
||||
}
|
@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableMap
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap
|
||||
import ru.dbotthepony.kstarbound.Starbound
|
||||
import ru.dbotthepony.kstarbound.defs.util.enrollMap
|
||||
import ru.dbotthepony.kstarbound.defs.util.flattenMap
|
||||
import ru.dbotthepony.kstarbound.io.json.INativeJsonHolder
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,27 @@
|
||||
package ru.dbotthepony.kstarbound.defs.parallax
|
||||
|
||||
import com.google.gson.GsonBuilder
|
||||
import ru.dbotthepony.kstarbound.io.json.BuilderAdapter
|
||||
|
||||
class ParallaxPrototype {
|
||||
var verticalOrigin = 0.0
|
||||
|
||||
var layers = Array(0) { ParallaxPrototypeLayer() }
|
||||
|
||||
companion object {
|
||||
val ADAPTER = BuilderAdapter(
|
||||
::ParallaxPrototype,
|
||||
ParallaxPrototype::verticalOrigin,
|
||||
ParallaxPrototype::layers,
|
||||
)
|
||||
|
||||
fun registerGson(gsonBuilder: GsonBuilder) {
|
||||
gsonBuilder.registerTypeAdapter(ParallaxPrototype::class.java, ADAPTER)
|
||||
gsonBuilder.registerTypeAdapter(ParallaxPrototypeLayer::class.java, ParallaxPrototypeLayer.ADAPTER)
|
||||
gsonBuilder.registerTypeAdapter(
|
||||
ParallaxPrototypeLayer.Parallax::class.java,
|
||||
ParallaxPrototypeLayer.LAYER_PARALLAX_ADAPTER
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package ru.dbotthepony.kstarbound.defs
|
||||
package ru.dbotthepony.kstarbound.defs.parallax
|
||||
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.JsonSyntaxException
|
||||
import com.google.gson.TypeAdapter
|
||||
import com.google.gson.stream.JsonReader
|
||||
@ -10,25 +9,6 @@ import ru.dbotthepony.kstarbound.io.json.BuilderAdapter
|
||||
import ru.dbotthepony.kvector.vector.ndouble.Vector2d
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class ParallaxPrototype {
|
||||
var verticalOrigin = 0.0
|
||||
|
||||
var layers = Array(0) { ParallaxPrototypeLayer() }
|
||||
|
||||
companion object {
|
||||
val ADAPTER = BuilderAdapter(::ParallaxPrototype,
|
||||
ParallaxPrototype::verticalOrigin,
|
||||
ParallaxPrototype::layers,
|
||||
)
|
||||
|
||||
fun registerGson(gsonBuilder: GsonBuilder) {
|
||||
gsonBuilder.registerTypeAdapter(ParallaxPrototype::class.java, ADAPTER)
|
||||
gsonBuilder.registerTypeAdapter(ParallaxPrototypeLayer::class.java, ParallaxPrototypeLayer.ADAPTER)
|
||||
gsonBuilder.registerTypeAdapter(ParallaxPrototypeLayer.Parallax::class.java, ParallaxPrototypeLayer.LAYER_PARALLAX_ADAPTER)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ParallaxPrototypeLayer {
|
||||
class Parallax(val x: Double, val y: Double)
|
||||
|
||||
@ -81,23 +61,23 @@ class ParallaxPrototypeLayer {
|
||||
}
|
||||
|
||||
val ADAPTER = BuilderAdapter(::ParallaxPrototypeLayer,
|
||||
ParallaxPrototypeLayer::timeOfDayCorrelation,
|
||||
ParallaxPrototypeLayer::offset,
|
||||
ParallaxPrototypeLayer::repeatY,
|
||||
ParallaxPrototypeLayer::lightMapped,
|
||||
ParallaxPrototypeLayer::tileLimitTop,
|
||||
ParallaxPrototypeLayer::parallax,
|
||||
ParallaxPrototypeLayer::unlit,
|
||||
ParallaxPrototypeLayer::nohueshift,
|
||||
ParallaxPrototypeLayer::minSpeed,
|
||||
ParallaxPrototypeLayer::maxSpeed,
|
||||
ParallaxPrototypeLayer::fadePercent,
|
||||
ParallaxPrototypeLayer::kind,
|
||||
ParallaxPrototypeLayer::baseCount,
|
||||
ParallaxPrototypeLayer::noRandomOffset,
|
||||
ParallaxPrototypeLayer::directives,
|
||||
ParallaxPrototypeLayer::frequency,
|
||||
ParallaxPrototypeLayer::modCount,
|
||||
ParallaxPrototypeLayer::timeOfDayCorrelation,
|
||||
ParallaxPrototypeLayer::offset,
|
||||
ParallaxPrototypeLayer::repeatY,
|
||||
ParallaxPrototypeLayer::lightMapped,
|
||||
ParallaxPrototypeLayer::tileLimitTop,
|
||||
ParallaxPrototypeLayer::parallax,
|
||||
ParallaxPrototypeLayer::unlit,
|
||||
ParallaxPrototypeLayer::nohueshift,
|
||||
ParallaxPrototypeLayer::minSpeed,
|
||||
ParallaxPrototypeLayer::maxSpeed,
|
||||
ParallaxPrototypeLayer::fadePercent,
|
||||
ParallaxPrototypeLayer::kind,
|
||||
ParallaxPrototypeLayer::baseCount,
|
||||
ParallaxPrototypeLayer::noRandomOffset,
|
||||
ParallaxPrototypeLayer::directives,
|
||||
ParallaxPrototypeLayer::frequency,
|
||||
ParallaxPrototypeLayer::modCount,
|
||||
)
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.kstarbound.defs
|
||||
package ru.dbotthepony.kstarbound.defs.util
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap
|
||||
|
Loading…
Reference in New Issue
Block a user