just updating things so that I can have a backup point...

Former-commit-id: 0a5a6d7f68ee1a96562532572c8d45fe102d3c25
Former-commit-id: a1a78f61f2fe2a8707e47633caa6cd67a829b35e
This commit is contained in:
Song Minjae
2017-01-26 16:58:06 +09:00
parent 06296983b5
commit 2203f74429
16 changed files with 1765 additions and 1226 deletions

View File

@@ -34,7 +34,7 @@ constructor(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
throw ArrayIndexOutOfBoundsException("x: $x, y; $y")
frameBuffer[y * width + x] = ((c.toInt().and(0xFF)) + colourKey.shl(8)).toChar()
terminal.redraw()
//terminal.redraw()
}
fun drawBuffer(x: Int, y: Int, raw: Char): Boolean =
@@ -42,7 +42,7 @@ constructor(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
false
else {
frameBuffer[y * width + x] = raw
terminal.redraw()
//terminal.redraw()
true
}
@@ -51,7 +51,7 @@ constructor(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
val char = (other[i].toUint().shl(8) + other[i + 1].toUint()).toChar()
frameBuffer[i.ushr(1)] = char
}
terminal.redraw()
//terminal.redraw()
}
fun getBackgroundColour(x: Int, y: Int): Int {
@@ -78,7 +78,7 @@ constructor(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
drawBuffer(x, y, 0.toChar(), background.shl(4))
}
}
terminal.redraw()
//terminal.redraw()
}
fun drawFromOther(other: AAFrame) {
@@ -88,7 +88,7 @@ constructor(var width: Int, var height: Int, var terminal: SimpleTextTerminal) {
frameBuffer[y * width + x] = other.getRaw(x, y)!!
}
}
terminal.redraw()
//terminal.redraw()
}
private fun checkOOB(x: Int, y: Int) = (x < 0 || y < 0 || x >= width || y >= height)