mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-13 07:06:06 +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:
@@ -5,12 +5,12 @@ import org.luaj.vm2.LuaTable
|
||||
import org.luaj.vm2.LuaValue
|
||||
import org.luaj.vm2.lib.OneArgFunction
|
||||
import net.torvald.terrarum.gamecontroller.Key
|
||||
import net.torvald.terrarum.virtualcomputer.computer.BaseTerrarumComputer
|
||||
import net.torvald.terrarum.virtualcomputer.computer.TerrarumComputer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-09-25.
|
||||
*/
|
||||
class Input(globals: Globals, computer: BaseTerrarumComputer) {
|
||||
class Input(globals: Globals, computer: TerrarumComputer) {
|
||||
|
||||
init {
|
||||
globals["input"] = LuaTable()
|
||||
@@ -23,7 +23,7 @@ class Input(globals: Globals, computer: BaseTerrarumComputer) {
|
||||
val keys_caps = intArrayOf(Key.CAPS_LOCK, Key.BACKSPACE, Key.L_CONTROL)
|
||||
}
|
||||
|
||||
class IsKeyDown(val host: BaseTerrarumComputer) : OneArgFunction() {
|
||||
class IsKeyDown(val host: TerrarumComputer) : OneArgFunction() {
|
||||
override fun call(keyCode: LuaValue): LuaValue {
|
||||
val key = keyCode.checkint()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user