mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-29 22:16:00 +00:00
#1241 Settings to show original bytes
This commit is contained in:
@@ -540,17 +540,19 @@ public abstract class Action implements GraphSourceItem {
|
||||
writer.appendNoHilight("; ");
|
||||
byte[] bytes = a.getBytes(version);
|
||||
writer.appendNoHilight(Helper.bytesToHexString(bytes));
|
||||
long fileOffset = a.getFileOffset();
|
||||
if (fileData != null && fileOffset != -1 && fileData.length > fileOffset + bytes.length - 1) {
|
||||
writer.appendNoHilight(" (");
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
writer.appendNoHilight(Helper.byteToHex(fileData[(int) (fileOffset + i)]));
|
||||
writer.appendNoHilight(" ");
|
||||
}
|
||||
if (Configuration.showOriginalBytesInPcodeHex.get()) {
|
||||
long fileOffset = a.getFileOffset();
|
||||
if (fileData != null && fileOffset != -1 && fileData.length > fileOffset + bytes.length - 1) {
|
||||
writer.appendNoHilight(" (");
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
writer.appendNoHilight(Helper.byteToHex(fileData[(int) (fileOffset + i)]));
|
||||
writer.appendNoHilight(" ");
|
||||
}
|
||||
|
||||
writer.appendNoHilight("@");
|
||||
writer.appendNoHilight(Helper.formatHex(a.getFileOffset(), 8));
|
||||
writer.appendNoHilight(")");
|
||||
writer.appendNoHilight("@");
|
||||
writer.appendNoHilight(Helper.formatHex(fileOffset, 8));
|
||||
writer.appendNoHilight(")");
|
||||
}
|
||||
}
|
||||
|
||||
writer.newLine();
|
||||
|
||||
@@ -175,6 +175,11 @@ public class Configuration {
|
||||
@ConfigurationCategory("script")
|
||||
public static final ConfigurationItem<Boolean> resolveConstants = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("script")
|
||||
@ConfigurationInternal
|
||||
public static final ConfigurationItem<Boolean> showOriginalBytesInPcodeHex = null;
|
||||
|
||||
/**
|
||||
* Limit of code subs (for obfuscated code)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user