mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 08:36:07 +09:00
bunch of codes:
- Test InputStream() on VirtualComputer (blocking/unblocking using simple semaphore) -- no more dirty lua impl of io.read - Typealias Kotlin 1.1 - Primitive box drawing on VideoCard - Removing unnecessary fonts Former-commit-id: cece88af3a3430678e685856eec78b4a9d598b4f Former-commit-id: 22eed3a7beb9b4cb34636cbab2ff0e94989bdb31
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
package net.torvald.terrarum.virtualcomputer.terminal
|
||||
|
||||
import net.torvald.aa.AAFrame
|
||||
import net.torvald.aa.ColouredFastFont
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gameactors.DecodeTapestry
|
||||
import net.torvald.terrarum.gameactors.abs
|
||||
import net.torvald.terrarum.gamecontroller.Key
|
||||
import net.torvald.terrarum.virtualcomputer.computer.BaseTerrarumComputer
|
||||
import net.torvald.terrarum.virtualcomputer.computer.TerrarumComputer
|
||||
import org.lwjgl.BufferUtils
|
||||
import org.lwjgl.openal.AL
|
||||
import org.lwjgl.openal.AL10
|
||||
@@ -21,7 +20,7 @@ import java.util.*
|
||||
* Created by minjaesong on 16-09-07.
|
||||
*/
|
||||
open class SimpleTextTerminal(
|
||||
phosphorColour: Color, override val width: Int, override val height: Int, private val host: BaseTerrarumComputer,
|
||||
phosphorColour: Color, override val width: Int, override val height: Int, private val host: TerrarumComputer,
|
||||
colour: Boolean = false, hires: Boolean = false
|
||||
) : Terminal {
|
||||
|
||||
@@ -64,7 +63,7 @@ open class SimpleTextTerminal(
|
||||
open protected val fontImg = Image(fontRef)
|
||||
open val fontW = fontImg.width / 16
|
||||
open val fontH = fontImg.height / 16
|
||||
open protected val font = ColouredFastFont(this, fontRef, fontW, fontH)
|
||||
open protected val font = SpriteSheetFont(SpriteSheet(fontRef, fontW, fontH), 0.toChar())
|
||||
|
||||
val borderSize = 20
|
||||
override val displayW = fontW * width + 2 * borderSize
|
||||
|
||||
Reference in New Issue
Block a user