mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
TextButtonList working kinematic background
Former-commit-id: 8976d3b3d1e40731adf13430ad747351a6401b24
This commit is contained in:
@@ -8,6 +8,7 @@ import org.luaj.vm2.lib.TwoArgFunction
|
||||
import org.luaj.vm2.lib.ZeroArgFunction
|
||||
import org.luaj.vm2.lib.jse.JsePlatform
|
||||
import net.torvald.terrarum.KVHashMap
|
||||
import net.torvald.terrarum.Millisec
|
||||
import net.torvald.terrarum.gameactors.roundInt
|
||||
import net.torvald.terrarum.virtualcomputer.luaapi.*
|
||||
import net.torvald.terrarum.virtualcomputer.peripheral.*
|
||||
@@ -361,7 +362,7 @@ class TerrarumComputer(peripheralSlots: Int) {
|
||||
// let's regard it as a tracker...
|
||||
private val beepQueue = ArrayList<Pair<Int, Double>>()
|
||||
private var beepCursor = -1
|
||||
private var beepQueueLineExecTimer = 0 // millisec
|
||||
private var beepQueueLineExecTimer: Millisec = 0
|
||||
private var beepQueueFired = false
|
||||
|
||||
private fun driveBeepQueueManager(delta: Int) {
|
||||
@@ -432,7 +433,7 @@ class TerrarumComputer(peripheralSlots: Int) {
|
||||
*
|
||||
* ,---. (true, true) ,---- (true, false) ----. (false, true) ----- (false, false)
|
||||
*/
|
||||
private fun makeAudioData(duration: Int, freq: Double,
|
||||
private fun makeAudioData(duration: Millisec, freq: Double,
|
||||
rampUp: Boolean = true, rampDown: Boolean = true): ByteBuffer {
|
||||
val audioData = BufferUtils.createByteBuffer(duration.times(sampleRate).div(1000))
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum.virtualcomputer.terminal
|
||||
|
||||
import net.torvald.terrarum.Millisec
|
||||
import org.newdawn.slick.Color
|
||||
import org.newdawn.slick.GameContainer
|
||||
import org.newdawn.slick.Graphics
|
||||
@@ -61,7 +62,7 @@ interface Terminal : Teletype {
|
||||
* @param duration: milliseconds
|
||||
* @param freg: Frequency (float)
|
||||
*/
|
||||
fun emitTone(duration: Int, freq: Double)
|
||||
fun emitTone(duration: Millisec, freq: Double)
|
||||
|
||||
override fun bell(pattern: String)
|
||||
/** Requires keyPressed() event to be processed.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.torvald.terrarum.virtualcomputer.worldobject.ui
|
||||
|
||||
import net.torvald.terrarum.Millisec
|
||||
import net.torvald.terrarum.ui.*
|
||||
import net.torvald.terrarum.ui.UICanvas.Companion.OPENCLOSE_GENERIC
|
||||
import net.torvald.terrarum.virtualcomputer.terminal.Terminal
|
||||
@@ -52,7 +53,7 @@ class UITextTerminal(val terminal: Terminal) : UICanvas, KeyboardControlled, Mou
|
||||
*
|
||||
* Timer itself is implemented in the handler.
|
||||
*/
|
||||
override var openCloseTime: Int = OPENCLOSE_GENERIC
|
||||
override var openCloseTime: Millisec = OPENCLOSE_GENERIC
|
||||
|
||||
override fun update(gc: GameContainer, delta: Int) {
|
||||
terminal.update(gc, delta)
|
||||
|
||||
Reference in New Issue
Block a user