video card wip for virtual computer

Former-commit-id: 3c71eb0e8614e92e63fd3b29906a3cfd311c916f
Former-commit-id: 3472d6eb7d03a29bfd859e9207f76aeb23cef89b
This commit is contained in:
Song Minjae
2017-02-09 22:18:27 +09:00
parent 9ddf0dee63
commit bd58c9e40b
5 changed files with 485 additions and 41 deletions

View File

@@ -84,14 +84,6 @@ internal class AILuaAPI(g: Globals, actor: ActorWithSprite) {
return t
}
fun Double.toLua() = LuaValue.valueOf(this)
fun Int.toLua() = LuaValue.valueOf(this)
fun String.toLua() = LuaValue.valueOf(this)
fun Double?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun Int?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun String?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun Boolean.toInt() = if (this) 1 else 0
operator fun LuaTable.set(index: Int, value: Int) { this[index] = value.toLua() }
}
@@ -405,3 +397,11 @@ internal class AILuaAPI(g: Globals, actor: ActorWithSprite) {
}
}
}
fun Double.toLua() = LuaValue.valueOf(this)
fun Int.toLua() = LuaValue.valueOf(this)
fun String.toLua() = LuaValue.valueOf(this)
fun Double?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun Int?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun String?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
fun Boolean.toInt() = if (this) 1 else 0