diff --git a/docs/conf.py b/docs/conf.py index ede0776..13d0548 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,9 +54,9 @@ # built documents. # # The short X.Y version. -version = u'1.3.1' +version = u'1.6.0' # The full version, including alpha/beta/rc tags. -release = u'1.3.1' +release = u'1.6.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/src/main/kotlin/rhmodding/tickompiler/Utils.kt b/src/main/kotlin/rhmodding/tickompiler/Utils.kt index d74f6c0..10c0c98 100644 --- a/src/main/kotlin/rhmodding/tickompiler/Utils.kt +++ b/src/main/kotlin/rhmodding/tickompiler/Utils.kt @@ -1,6 +1,6 @@ package rhmodding.tickompiler -const val VERSION: String = "v1.6.0-DEVELOPMENT" +const val VERSION: String = "v1.6.0" const val GITHUB: String = "https://github.com/SneakySpook/Tickompiler" const val INFO_TEXT: String = """Tickompiler: A RHM tickflow compiler/decompiler written by SneakySpook and chrislo27 in Kotlin $VERSION diff --git a/src/main/kotlin/rhmodding/tickompiler/decompiler/Decompiler.kt b/src/main/kotlin/rhmodding/tickompiler/decompiler/Decompiler.kt index 6c61550..1246282 100644 --- a/src/main/kotlin/rhmodding/tickompiler/decompiler/Decompiler.kt +++ b/src/main/kotlin/rhmodding/tickompiler/decompiler/Decompiler.kt @@ -173,14 +173,10 @@ class Decompiler(val array: ByteArray, val order: ByteOrder, val functions: Func anns.forEach { val anncode = it and 0b11111111 val annArg = (it ushr 8).toInt() - if (anncode == 0L) { - specialArgStrings[annArg] = markers[args[annArg]] ?: args[annArg].toString() - } - if (anncode == 1L) { - specialArgStrings[annArg] = "u\"" + (strings[args[annArg]] ?: "") + '"' - } - if (anncode == 2L) { - specialArgStrings[annArg] = '"' + (strings[args[annArg]] ?: "") + '"' + when(anncode) { + 0L -> specialArgStrings[annArg] = markers[args[annArg]] ?: args[annArg].toString() + 1L -> specialArgStrings[annArg] = "u\"" + (strings[args[annArg]] ?: "") + '"' + 2L -> specialArgStrings[annArg] = '"' + (strings[args[annArg]] ?: "") + '"' } } @@ -195,10 +191,7 @@ class Decompiler(val array: ByteArray, val order: ByteOrder, val functions: Func builder.append(tickFlow) if (addComments == CommentType.BYTECODE) { fun Int.toLittleEndianHex(): String { - val str = this.toString(16).padStart(8, '0').toUpperCase(Locale.ROOT) - - return str -// return str.substring(6, 8) + str.substring(4, 6) + str.substring(2, 4) + str.substring(0, 2) + return toString(16).padStart(8, '0').toUpperCase(Locale.ROOT) } builder.append(" // bytecode: ${opint.toInt().toLittleEndianHex()} ${args.joinToString(" "){it.toInt().toLittleEndianHex()}}")