mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-11 05:31:51 +09:00
gterm wipwipwip
This commit is contained in:
@@ -22,6 +22,8 @@ object CompressorDelegate {
|
||||
return bout.toByteArray()
|
||||
}*/
|
||||
|
||||
fun comp(str: String) = comp(str.toByteArray(VM.CHARSET))
|
||||
|
||||
fun comp(ba: ByteArray): ByteArray {
|
||||
val baos = ByteArrayOutputStream()
|
||||
val gz = GZIPOutputStream(baos)
|
||||
@@ -30,6 +32,8 @@ object CompressorDelegate {
|
||||
return baos.toByteArray()
|
||||
}
|
||||
|
||||
fun decomp(str: String) = decomp(str.toByteArray(VM.CHARSET))
|
||||
|
||||
fun decomp(ba: ByteArray): ByteArray {
|
||||
val bais = ByteArrayInputStream(ba)
|
||||
val gz = GZIPInputStream(bais)
|
||||
|
||||
@@ -54,6 +54,12 @@ class GraphicsJSR223Delegate(val vm: VM) {
|
||||
}
|
||||
}
|
||||
|
||||
fun getFramebufferScroll(): IntArray {
|
||||
getFirstGPU()?.let { return intArrayOf(it.framebufferScrollX, it.framebufferScrollY) }
|
||||
return intArrayOf(0, 0)
|
||||
}
|
||||
|
||||
|
||||
fun scrollFrame(xdelta: Int, ydelta: Int) {
|
||||
getFirstGPU()?.let {
|
||||
it.framebufferScrollX = (it.framebufferScrollX + xdelta) fmod it.framebuffer.width
|
||||
|
||||
Reference in New Issue
Block a user