tapestry sprite to draw frame

This commit is contained in:
minjaesong
2022-02-28 11:39:29 +09:00
parent 142fcab930
commit 68d8bf13b7
8 changed files with 118 additions and 24 deletions

View File

@@ -203,6 +203,16 @@ object Common {
return rng
}
})
// kotlin.ByteArray
jsoner.setSerializer(ByteArray::class.java, object : Json.Serializer<ByteArray> {
override fun write(json: Json, obj: ByteArray, knownType: Class<*>?) {
json.writeValue(bytesToZipdStr(obj.iterator()))
}
override fun read(json: Json, jsonData: JsonValue, type: Class<*>?): ByteArray {
return strToBytes(StringReader(jsonData.asString())).toByteArray()
}
})
}
private data class LayerInfo(val h: String, val b: String, val x: Int, val y: Int)