Commit eb1273c5 authored by Minjae Song's avatar Minjae Song

migration wip java 9 modularise

parent 50c110f3
......@@ -38,7 +38,7 @@
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
File added
File added
module terrarum {
requires gdx;
requires gdx.backend.lwjgl;
requires gdx.controllers;
requires jxinput;
requires gson;
requires GetCpuName;
requires TerrarumSansBitmap;
requires kotlin.stdlib;
requires java.desktop;
requires java.logging;
requires TerranVirtualDisk;
requires commons.codec;
requires commons.csv;
requires Terrarum.Joise;
}
\ No newline at end of file
package net.torvald.colourutil
import com.badlogic.gdx.graphics.Color
import com.jme3.math.FastMath
import net.torvald.colourutil.CIELChabUtil.toLCh
import net.torvald.colourutil.CIELChabUtil.toLab
......@@ -7,7 +8,6 @@ import net.torvald.colourutil.CIELabUtil.toLab
import net.torvald.colourutil.CIEXYZUtil.toXYZ
import net.torvald.colourutil.CIEXYZUtil.toColor
import net.torvald.colourutil.CIELabUtil.toXYZ
import com.badlogic.gdx.graphics.Color
/**
* Cylindrical modification of CIELab colour space
*
......
package net.torvald.colourutil
import com.badlogic.gdx.graphics.Color
import com.jme3.math.FastMath
import net.torvald.colourutil.CIELabUtil.toLab
import net.torvald.colourutil.CIEXYZUtil.toColor
import net.torvald.colourutil.CIEXYZUtil.toRGB
import net.torvald.colourutil.CIEXYZUtil.toXYZ
import net.torvald.colourutil.CIELabUtil.toXYZ
import com.badlogic.gdx.graphics.Color
/**
* A modification of CIEXYZ that is useful for surface colours
......
......@@ -2,7 +2,6 @@ package net.torvald.colourutil
import com.jme3.math.FastMath
import com.badlogic.gdx.graphics.Color
import net.torvald.colourutil.CIELabUtil.toXYZ
import net.torvald.colourutil.CIEXYZUtil.toColor
import net.torvald.colourutil.CIEXYZUtil.toRGB
import net.torvald.colourutil.CIEXYZUtil.toXYZ
......
package com.badlogic.gdx.graphics;
package net.torvald.gdx.graphics;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.utils.StreamUtils;
import java.io.IOException;
......
......@@ -5,23 +5,15 @@ import com.badlogic.gdx.Gdx
import com.badlogic.gdx.Screen
import com.badlogic.gdx.backends.lwjgl.LwjglApplication
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.Pixmap
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.math.Affine2
import com.jme3.math.FastMath
import net.torvald.colourutil.CIEYXY
import net.torvald.colourutil.CIEXYZUtil.toXYZ
import net.torvald.colourutil.CIEXYZUtil.toColorRaw
import net.torvald.colourutil.CIEXYZUtil.toColor
import net.torvald.colourutil.RGB
import net.torvald.terrarum.gameworld.fmod
import net.torvald.colourutil.CIEXYZUtil.toXYZ
import net.torvald.colourutil.CIEYXY
import net.torvald.terrarum.inUse
import java.awt.BorderLayout
import java.awt.Dimension
import javax.swing.*
import kotlin.math.pow
const val WIDTH = 1200
......
......@@ -6,9 +6,9 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.Pixmap
import com.badlogic.gdx.graphics.PixmapIO2
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.gdx.graphics.PixmapIO2
import net.torvald.terrarum.gdxClearAndSetBlend
import net.torvald.terrarum.inUse
import java.awt.BorderLayout
......@@ -258,7 +258,7 @@ class SpriteAssemblerPreview: Game() {
renderTexture = Texture(1, 1, Pixmap.Format.RGBA8888)
}
private val bgCol = Color(.62f,.79f,1f,1f)
private val bgCol = Color(.62f, .79f, 1f, 1f)
private var doAssemble = false
private lateinit var assembleProp: ADProperties
......
......@@ -19,6 +19,7 @@ import com.github.strikerx3.jxinput.XInputDevice;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import net.torvald.gdx.graphics.PixmapIO2;
import net.torvald.getcpuname.GetCpuName;
import net.torvald.terrarum.controller.GdxControllerAdapter;
import net.torvald.terrarum.controller.TerrarumController;
......@@ -255,8 +256,8 @@ public class AppLoader implements ApplicationListener {
public static TextureRegion logo;
public static AudioDevice audioDevice;
private Color gradWhiteTop = new Color(0xf8f8f8ff);
private Color gradWhiteBottom = new Color(0xd8d8d8ff);
private com.badlogic.gdx.graphics.Color gradWhiteTop = new com.badlogic.gdx.graphics.Color(0xf8f8f8ff);
private com.badlogic.gdx.graphics.Color gradWhiteBottom = new com.badlogic.gdx.graphics.Color(0xd8d8d8ff);
public Screen screen;
public static int screenW = 0;
......
......@@ -7,7 +7,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
import com.badlogic.gdx.graphics.*
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.ShaderProgram
import com.jme3.math.FastMath
import com.badlogic.gdx.graphics.Color
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
/**
......
......@@ -10,6 +10,7 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.badlogic.gdx.graphics.glutils.ShaderProgram
import com.badlogic.gdx.graphics.Color
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
......
package net.torvald.terrarum.blockproperties
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.AppLoader
import net.torvald.terrarum.AppLoader.printmsg
import net.torvald.terrarum.gameworld.FluidType
......@@ -110,7 +110,7 @@ object BlockCodex {
prop.shadeColG = floatVal(record, "shdg") / LightmapRenderer.MUL_FLOAT
prop.shadeColB = floatVal(record, "shdb") / LightmapRenderer.MUL_FLOAT
prop.shadeColA = floatVal(record, "shduv") / LightmapRenderer.MUL_FLOAT
prop.opacity = Color(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
prop.opacity = Cvec(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
prop.strength = intVal(record, "str")
prop.density = intVal(record, "dsty")
......@@ -119,7 +119,7 @@ object BlockCodex {
prop.lumColG = floatVal(record, "lumg") / LightmapRenderer.MUL_FLOAT
prop.lumColB = floatVal(record, "lumb") / LightmapRenderer.MUL_FLOAT
prop.lumColA = floatVal(record, "lumuv") / LightmapRenderer.MUL_FLOAT
prop.internalLumCol = Color(prop.lumColR, prop.lumColG, prop.lumColB, prop.lumColA)
prop.internalLumCol = Cvec(prop.lumColR, prop.lumColG, prop.lumColB, prop.lumColA)
prop.friction = intVal(record, "fr")
prop.viscosity = intVal(record, "vscs")
......
package net.torvald.terrarum.blockproperties
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
/**
* Created by minjaesong on 2016-02-16.
......@@ -17,7 +17,7 @@ class BlockProp {
var shadeColB = 0f
var shadeColA = 0f
lateinit var opacity: Color
lateinit var opacity: Cvec
var strength: Int = 0
var density: Int = 0
......@@ -36,12 +36,12 @@ class BlockProp {
var lumColG = 0f
var lumColB = 0f
var lumColA = 0f
lateinit var internalLumCol: Color
lateinit var internalLumCol: Cvec
/**
* @param luminosity
*/
inline val luminosity: Color
inline val luminosity: Cvec
get() = BlockPropUtil.getDynamicLumFunc(internalLumCol, dynamicLuminosityFunction)
var drop: Int = 0
......
package net.torvald.terrarum.blockproperties
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.Color
import com.jme3.math.FastMath
import net.torvald.gdx.graphics.Cvec
import net.torvald.random.HQRNG
import net.torvald.terrarum.Second
import net.torvald.terrarum.Terrarum
......@@ -37,7 +37,7 @@ object BlockPropUtil {
}
private fun getTorchFlicker(baseLum: Color): Color {
private fun getTorchFlicker(baseLum: Cvec): Cvec {
val funcY = FastMath.interpolateCatmullRom(0.0f, flickerFuncX / flickerFuncDomain,
flickerP0, flickerP1, flickerP2, flickerP3
)
......@@ -45,13 +45,13 @@ object BlockPropUtil {
return LightmapRenderer.alterBrightnessUniform(baseLum, funcY)
}
private fun getSlowBreath(baseLum: Color): Color {
private fun getSlowBreath(baseLum: Cvec): Cvec {
val funcY = FastMath.sin(FastMath.PI * breathFuncX / breathCycleDuration) * breathRange
return LightmapRenderer.alterBrightnessUniform(baseLum, funcY)
}
private fun getPulsate(baseLum: Color): Color {
private fun getPulsate(baseLum: Cvec): Cvec {
val funcY = FastMath.sin(FastMath.PI * pulsateFuncX / pulsateCycleDuration) * pulsateRange
return LightmapRenderer.alterBrightnessUniform(baseLum, funcY)
......@@ -91,7 +91,7 @@ object BlockPropUtil {
private fun linearInterpolation1D(a: Float, b: Float, x: Float) = a * (1 - x) + b * x
fun getDynamicLumFunc(baseLum: Color, type: Int): Color {
fun getDynamicLumFunc(baseLum: Cvec, type: Int): Cvec {
return when (type) {
1 -> getTorchFlicker(baseLum)
2 -> (Terrarum.ingame!!.world).globalLight.cpy().mul(LightmapRenderer.DIV_FLOAT) // current global light
......
package net.torvald.terrarum.console
import com.badlogic.gdx.graphics.Color
import net.torvald.terrarum.worlddrawer.LightmapRenderer
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.modulebasegame.weather.WeatherMixer
import net.torvald.terrarum.worlddrawer.LightmapRenderer
/**
* Created by minjaesong on 2016-02-17.
......@@ -18,7 +17,7 @@ internal object SetGlobalLightOverride : ConsoleCommand {
val g = args[2].toFloat()
val b = args[3].toFloat()
val a = args[4].toFloat()
val GL = Color(r, g, b, a)
val GL = Cvec(r, g, b, a)
WeatherMixer.globalLightOverridden = true
(Terrarum.ingame!!.world).globalLight = GL
......
package net.torvald.terrarum.gameactors
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
/**
* Created by minjaesong on 2016-02-19.
......@@ -26,7 +26,7 @@ interface Luminous {
actorValue[AVKey.LUMA] = value.a * LightmapRenderer.MUL_FLOAT
}
*/
var color: Color
var color: Cvec
/**
* Arguments:
......
package net.torvald.terrarum.gameworld
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.AppLoader.printdbg
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.blockproperties.Block
......@@ -90,7 +90,7 @@ open class GameWorld {
/** Meter per second squared. Currently only the downward gravity is supported. No reverse gravity :p */
var gravitation: Vector2 = Vector2(0.0, 9.80665)
/** 0.0..1.0+ */
var globalLight = Color(0f,0f,0f,0f)
var globalLight = Cvec(0f, 0f, 0f, 0f)
var averageTemperature = 288f // 15 deg celsius; simulates global warming
......
......@@ -5,6 +5,7 @@ import com.badlogic.gdx.InputAdapter
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.g2d.TextureRegion
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.*
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.blockproperties.BlockCodex
......@@ -279,7 +280,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
init {
gameWorld.time.setTimeOfToday(WorldTime.HOUR_SEC * 10)
gameWorld.globalLight = Color(.8f,.8f,.8f,.8f)
gameWorld.globalLight = Cvec(.8f, .8f, .8f, .8f)
essentialOverlays.add(blockPointingCursor)
......
......@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.badlogic.gdx.utils.Disposable
import com.badlogic.gdx.utils.ScreenUtils
import net.torvald.gdx.graphics.PixmapIO2
import net.torvald.terrarum.*
import net.torvald.terrarum.gameactors.ActorWithBody
import net.torvald.terrarum.gamecontroller.KeyToggler
......
package net.torvald.terrarum.modulebasegame.gameactors
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.Color
import com.jme3.math.FastMath
import net.torvald.gdx.graphics.Cvec
import net.torvald.spriteanimation.HasAssembledSprite
import net.torvald.terrarum.*
import net.torvald.terrarum.gameactors.*
......@@ -68,8 +68,8 @@ open class ActorHumanoid(
if (houseDesignation != null) houseDesignation!!.clear()
}
override var color: Color
get() = Color(
override var color: Cvec
get() = Cvec(
(actorValue.getAsFloat(AVKey.LUMR) ?: 0f) / LightmapRenderer.MUL_FLOAT,
(actorValue.getAsFloat(AVKey.LUMG) ?: 0f) / LightmapRenderer.MUL_FLOAT,
(actorValue.getAsFloat(AVKey.LUMB) ?: 0f) / LightmapRenderer.MUL_FLOAT,
......
......@@ -2,9 +2,7 @@ package net.torvald.terrarum.modulebasegame.gameactors
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.Pixmap
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.gameworld.toUint
import net.torvald.terrarum.modulebasegame.Ingame
import java.io.File
import java.nio.charset.Charset
import java.util.*
......@@ -99,9 +97,9 @@ object DecodeTapestry {
private fun Int.fourBitCol() = Color(
this.and(0xF00).shl(20) or this.and(0xF00).shl(16) or
this.and(0x0F0).shl(16) or this.and(0x0F0).shl(12) or
this.and(0x00F).shl(12) or this.and(0x00F).shl(8) or
0xFF
this.and(0x0F0).shl(16) or this.and(0x0F0).shl(12) or
this.and(0x00F).shl(12) or this.and(0x00F).shl(8) or
0xFF
)
val MAGIC = "TEAF".toByteArray(charset = Charset.forName("US-ASCII"))
......
package net.torvald.terrarum.modulebasegame.gameactors
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.ModMgr
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.blockproperties.BlockCodex
......@@ -15,7 +15,7 @@ import java.util.*
*/
internal class FixtureTikiTorch : FixtureBase(BlockBox(BlockBox.NO_COLLISION, 1, 2)), Luminous {
override var color: Color
override var color: Cvec
get() = BlockCodex[Block.TORCH].luminosity
set(value) {
throw UnsupportedOperationException()
......
......@@ -4,7 +4,6 @@ import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.gameactors.ActorWBMovable
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.modulebasegame.worldgenerator.RoguelikeRandomiser
/**
......
......@@ -2,6 +2,7 @@ package net.torvald.terrarum.modulebasegame.gameactors
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.Point2d
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.blockproperties.Block
......@@ -31,8 +32,8 @@ open class ProjectileSimple(
val speed: Int
override var color: Color
get() = (bulletDatabase[type][OFFSET_LUMINOSITY] as Color).cpy()
override var color: Cvec
get() = (bulletDatabase[type][OFFSET_LUMINOSITY] as Cvec).cpy()
set(value) {
}
/**
......@@ -118,8 +119,8 @@ open class ProjectileSimple(
val OFFSET_LUMINOSITY = 4
val bulletDatabase = arrayOf(
// damage, display colour, no gravity, speed
arrayOf(7, Color(0xFF5429_FF.toInt()), true, 40, 32),
arrayOf(8, Color(0xFF5429_FF.toInt()), true, 20, 0)
arrayOf(7, Cvec(0xFF5429_FF.toInt()), true, 40, 32),
arrayOf(8, Cvec(0xFF5429_FF.toInt()), true, 20, 0)
// ...
)
}
......
package net.torvald.terrarum.modulebasegame.gameactors
import com.badlogic.gdx.graphics.Color
import net.torvald.gdx.graphics.Cvec
import net.torvald.terrarum.gameactors.ActorWBMovable
import net.torvald.terrarum.gameactors.Hitbox
import net.torvald.terrarum.gameactors.Luminous
import net.torvald.terrarum.gameworld.GameWorld
/**
* Created by minjaesong on 2016-04-26.
......@@ -21,7 +20,7 @@ class WeaponSwung(val itemID: Int) : ActorWBMovable(RenderOrder.MIDTOP), Luminou
actorValue[AVKey.LUMINOSITY] = value
}
*/
override var color: Color
override var color: Cvec
get() = throw UnsupportedOperationException()
set(value) {
}
......
......@@ -48,7 +48,7 @@ class Notification : UICanvas() {
}
}
private val drawColor = Color(1f,1f,1f,1f)
private val drawColor = Color(1f, 1f, 1f, 1f)
override fun renderUI(batch: SpriteBatch, camera: Camera) {
blendNormal(batch)
......
......@@ -72,7 +72,7 @@ class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
private val mailCount: Int
get() = 0 // cap things at 99
private val drawCol = Color(1f,1f,1f,UIQuickslotBar.DISPLAY_OPACITY)
private val drawCol = Color(1f, 1f, 1f, UIQuickslotBar.DISPLAY_OPACITY)
private val lcdLitColELoff = Color(0xc0c0c0ff.toInt()) mul drawCol
private val lcdLitColELon = Color(0x404040ff) mul drawCol
......
......@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.*
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.badlogic.gdx.graphics.glutils.ShapeRenderer
import com.badlogic.gdx.graphics.Color
import net.torvald.terrarum.*
import net.torvald.terrarum.AppLoader.IS_DEVELOPMENT_BUILD
import net.torvald.terrarum.AppLoader.printdbg
......
......@@ -42,7 +42,7 @@ class UIQuickslotBar : UICanvas() {
override fun updateUI(delta: Float) {
}
private val drawColor = Color(1f,1f,1f,1f)
private val drawColor = Color(1f, 1f, 1f, 1f)
override fun renderUI(batch: SpriteBatch, camera: Camera) {
......
......@@ -30,7 +30,7 @@ class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas() {
private var moonDial = TextureRegionPack(ModMgr.getPath("basegame", "fonts/watch_17pxmoondial.tga"), 17, 17)
private var moonDialCount = moonDial.horizontalCount
private val drawCol = Color(1f,1f,1f,UIQuickslotBar.DISPLAY_OPACITY)
private val drawCol = Color(1f, 1f, 1f, UIQuickslotBar.DISPLAY_OPACITY)
private val lcdLitColELoff = Color(0xc0c0c0ff.toInt()) mul drawCol
private val lcdLitColELon = Color(0x404040ff) mul drawCol
......
package net.torvald.terrarum.modulebasegame.ui
import com.badlogic.gdx.graphics.Camera
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.random.HQRNG
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.LoadScreen
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.modulebasegame.BuildingMaker
import net.torvald.terrarum.ui.UICanvas
import net.torvald.terrarum.ui.UIItemTextButtonList
/*class UITitleRemoConRoot : UICanvas() {
companion object {
......
......@@ -58,7 +58,7 @@ class uiQuickslotPie : UICanvas() {
}
}
private val drawColor = Color(1f,1f,1f,1f)
private val drawColor = Color(1f, 1f, 1f, 1f)
override fun renderUI(batch: SpriteBatch, camera: Camera) {
// draw radial thingies
......
......@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.GL20
import com.badlogic.gdx.graphics.Texture
import net.torvald.colourutil.CIELuvUtil
import net.torvald.gdx.graphics.Cvec
import net.torvald.random.HQRNG
import net.torvald.terrarum.GdxColorMap
import net.torvald.terrarum.ModMgr
......@@ -51,7 +52,7 @@ internal object WeatherMixer : RNGConsumer {
lateinit var mixedWeather: BaseModularWeather
val globalLightNow = Color(0)
val globalLightNow = Cvec(0)
// Weather indices
const val WEATHER_GENERIC = "generic"
......@@ -178,10 +179,10 @@ internal object WeatherMixer : RNGConsumer {
/**
* Get a GL of specific time
*/
fun getGlobalLightOfTime(timeInSec: Int): Color =
fun getGlobalLightOfTime(timeInSec: Int): Cvec =
getGradientColour(currentWeather.skyboxGradColourMap, 2, timeInSec)
fun getGradientColour(colorMap: GdxColorMap, row: Int, timeInSec: Int): Color {
fun getGradientColour(colorMap: GdxColorMap, row: Int, timeInSec: Int): Cvec {
val dataPointDistance = WorldTime.DAY_LENGTH / colorMap.width
val phaseThis: Int = timeInSec / dataPointDistance // x-coord in gradmap
......@@ -203,7 +204,7 @@ internal object WeatherMixer : RNGConsumer {
" | ${colourThis.toStringRGB()} -[${scale.times(100).toInt()}%]-> ${colourNext.toStringRGB()}" +
" | * `$r`$g`$b`")*/
return newCol
return Cvec(newCol)
}
fun getWeatherList(classification: String) = weatherList[classification]!!
......
......@@ -4,10 +4,10 @@ import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.GL30
import com.badlogic.gdx.graphics.OrthographicCamera
import com.badlogic.gdx.graphics.Pixmap
import com.badlogic.gdx.graphics.PixmapIO2
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.FrameBuffer
import com.badlogic.gdx.utils.ScreenUtils
import net.torvald.gdx.graphics.PixmapIO2
import net.torvald.terrarum.*
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
import net.torvald.terrarum.modulebasegame.weather.WeatherMixer
......
package net.torvald.terrarum.tests
import net.torvald.terrarum.utils.JsonFetcher
import net.torvald.terrarum.utils.JsonWriter
......
package net.torvald.terrarum.tests
import net.torvald.terrarum.utils.PasswordBase32
import java.nio.charset.Charset
......
package net.torvald.terrarum.tests
import net.torvald.terrarum.modulecomputers.virtualcomputer.tvd.ByteArray64GrowableOutputStream
import net.torvald.terrarum.serialise.WriteLayerDataZip
import net.torvald.terrarum.serialise.toLittle
......
package net.torvald.terrarum.tests
import net.torvald.util.CircularArray
/**
......
package net.torvald.terrarum.tests
import kotlin.system.measureNanoTime
/**
......
package net.torvald.terrarum.tests
import net.torvald.terrarum.utils.JsonWriter
import org.dyn4j.geometry.Vector2
......
package net.torvald.terrarum.tests
import com.badlogic.gdx.*
import com.badlogic.gdx.Input.Keys.*
......
......@@ -15,22 +15,16 @@ import com.badlogic.gdx.graphics.glutils.ShaderProgram
import com.sudoplay.joise.Joise
import com.sudoplay.joise.module.ModuleBasisFunction
import com.sudoplay.joise.module.ModuleFractal
import com.sudoplay.joise.module.ModuleScaleDomain
import com.sudoplay.joise.module.ModuleScaleOffset
import net.torvald.random.HQRNG
import net.torvald.terrarum.AppLoader
import net.torvald.terrarum.AppLoader.printdbg
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.concurrent.BlockingThreadPool
import net.torvald.terrarum.concurrent.RunnableFun
import net.torvald.terrarum.concurrent.ParallelUtils.sliceEvenly
import net.torvald.terrarum.concurrent.ThreadParallel
import net.torvald.terrarum.inUse
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.roundInt