bgbennyboy / Dinky-Explorer

An explorer/viewer/dumper tool for games using the Dinky engine. That's Return to Monkey Island, Thimbleweed Park and Delores.
35 stars 3 forks source link

Modifying files in the pack / patch RtMI's .dinky script file (GUI) #15

Closed JanFrederick00 closed 1 year ago

JanFrederick00 commented 1 year ago

See #14 for more information. I have added a GUI to edit the script file. grafik

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.

bgbennyboy commented 1 year ago

Fantastic work again! I'll try and have a proper look at this later this week.

bgbennyboy commented 1 year ago

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: