mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
computer with term lib: somewhat works; new cobblestone texture
Former-commit-id: 8a1a21cc1ea874ec1c243cae7b1e920bdab3be4f Former-commit-id: ee7aeb05896a36960050f0656764ccf477e5f90d
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
import net.torvald.CSVFetcher
|
||||
import net.torvald.colourutil.CIELabUtil.toXYZ
|
||||
import net.torvald.colourutil.CIELabUtil.toLab
|
||||
import net.torvald.colourutil.CIELabUtil.toRGB
|
||||
import net.torvald.colourutil.CIELuv
|
||||
import net.torvald.colourutil.CIELuvUtil.toRawRGB
|
||||
import net.torvald.colourutil.CIELuvUtil.toLuv
|
||||
import net.torvald.colourutil.RGB
|
||||
|
||||
import org.apache.commons.csv.CSVRecord
|
||||
import org.newdawn.slick.Color
|
||||
import org.newdawn.slick.GameContainer
|
||||
import org.newdawn.slick.Graphics
|
||||
import org.newdawn.slick.state.BasicGameState
|
||||
@@ -20,21 +12,10 @@ import org.newdawn.slick.state.StateBasedGame
|
||||
*/
|
||||
class StateTestingSandbox : BasicGameState() {
|
||||
|
||||
|
||||
|
||||
override fun init(container: GameContainer?, game: StateBasedGame?) {
|
||||
val records = CSVFetcher("./src/net/torvald/terrarum/tileproperties/tileprop_10bcol.csv")
|
||||
records.forEach {
|
||||
val tenOpacity = intVal(it, "opacity")
|
||||
val tenLum = intVal(it, "lumcolor")
|
||||
|
||||
val eightOpacity = tenOpacity.and(0xff) or
|
||||
tenOpacity.ushr(10).and(0xff).shl(8) or
|
||||
tenOpacity.ushr(20).and(0xff).shl(16)
|
||||
val eightLum = tenLum.and(0xff) or
|
||||
tenLum.ushr(10).and(0xff).shl(8) or
|
||||
tenLum.ushr(20).and(0xff).shl(16)
|
||||
|
||||
println("$eightOpacity\t$eightLum")
|
||||
}
|
||||
}
|
||||
|
||||
override fun update(container: GameContainer?, game: StateBasedGame?, delta: Int) {
|
||||
|
||||
Reference in New Issue
Block a user