-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Hi,
First of all, thanks for imHex. I'm using imHex to reverse-engineer savegame data formats, but the in-app pattern editor isn't really geared towards writing a lot of code. So far, I solved this by having the pattern editor just contain #include "/Users/red/MyProject/base.hexpat", and doing my editing in my editor of choice.
When even that file began to get too large, I started splitting it into sub-modules, so base.hexpat now also contains #include "/users/red/MyProject/items.hexpat" and I guess I'll do the same soon for other parts of the savegame. However, it's not suited for future sharing of those files, especially if users all need to rewrite the path.
I was hoping I could use C-like #include "./player.hexpat" but to no avail. I checked into the source, and from what I see, the resolver doesn't have a concept of __FILE__ from where to check, and I'd guess that since the pattern language is mostly ran from inside the imHex pattern editor, that notion doesn't really exist.
Therefore, I'm not entirely sure of the breadth of changes this would require, I was hoping a quick "check if path starts with a dot" (or even just "add current directory to include paths") would suffice, but I guess this goes beyond a quick one-liner.
Totally understandable if that’s out of scope for now, just felt this would be useful to point out.
And again, thanks for imHex, it's awesome!