Closed JanFrederick00 closed 1 year ago
Fantastic work again! I'll try and have a proper look at this later this week.
This is superb, I haven't had time to look at all the code yet, I've just tested the functionality but it works really well so far :thumbsup:
See #14 for more information. I have added a GUI to edit the script file.![grafik](https://user-images.githubusercontent.com/44774802/194884517-56e561ea-72fd-4b45-98ca-745e3759c78f.png)
The panel on the left shows the instructions, the one on the right the constants. It is possible to manually add comments to each instruction or to auto-generate comments. When automatically commenting, the program tries to figure out the original code for some instructions.
(comments are saved in the .patch file as well)
You can add or modify constants on the right. Added constants are appended at the end of the constant list.
When hovering over a constant with the mouse, the instructions using it are highlighted on the left. When hovering over a instruction, the constant used will be highlighted (if the instruction uses one). If the function jumps, the next instruction is also highlighted.
When a constant is deleted (only works for constants that would be added by this patch) and constants after it change indices, the instructions using these constants are automatically adjusted.
Instructions can be modifed and instructions can be added between existing instructions. When hovering between instructions, a marking will apeear there. Click to insert a new Instruction. If new instructions are inserted between a jump instruction and its target, the jump instruction is automatically adjusted to jump to the correct instruction.
Left of the instructions, the instructions are highlighted by type of edit - green for added instructions, blue for commented instructions and red for modified instructions.
It is possible to edit multiple functions in one patch file.