List of issuesList of issues

#489 Hex decode very large integers
Author: user henke37
Date created:
Type: feature
Visibility: Everybody
Assigned to:
Labels: GUI
State: closed Help

It is very common that colors are specified as integer literals in code. This is always done using the hexadecimal literal syntax. As such, it is very difficult to read colors in decompiled code if the values aren't expressed in the correct base. Please add code that identifies obvious colors and reformats their output in the code.
user
+1 I got a lot of unreadable colors, too Why not use only hex like other (well C) decompilers do?
user
Or even better, keep a list of special numbers: 24 => 24 16711935 => 0xFF00FF 259200 => 3*60*60*24 (yes, factorized) Check, if the number is divisible by 24 or 60, or has the form 0xXXYYZZ...
developer
Sometimes decimal is much more readable than hex, so it wouldn't be so good to use always hex numbers. This is why this task was not implemented by me. Sometimes a small number can be a color (255 = 0x000000ff), so it is not obvious which number should be written in hex format.
developer
Implemented in the latest nightly build. But first you have to enable a setting: advanced settings/script/use smart number formatting. You can find the current algorithm in this file: https://github.com/jindrapetrik/jpexs-decompiler/blob/7669a6747c3dee800722d5a4deac8787f54b c2fa/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.j ava
State: new→upgraded
developer
I close this issue due to inactivity. Please create new issue if problem persists.
State: upgraded→closed
 
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic