Jump to content

Hacking the iesh


critto

Recommended Posts

I will look into the BIFF close problem - it never bothered me enough to fix it.

Re overrides, are you aware that there's core.find_file() that can use lookup path (i.e. list of dirs separated by ":") and deals with upper/lower case to find the files? Maybe it could be adapted to your needs.

Cheers, Edheldil

BTW: hacking would be easier if you could hang on our IRC :)

Link to comment
Re overrides, are you aware that there's core.find_file() that can use lookup path (i.e. list of dirs separated by ":") and deals with upper/lower case to find the files? Maybe it could be adapted to your needs.

No, I am not. I'll see if there's an application for it (sounds like it might be from your description).

 

 

BTW: hacking would be easier if you could hang on our IRC

 

I didn't know that people still hang out on IRC :) But it would definitely be useful to pop in once in a while to discuss any small questions that occur from time to time (I still have some stacked and unanswered in my todo-list).

Link to comment

So, does everyone agree on stripping trailing spaces from source code?

 

My editor is taught to do this on the fly which results in lots of unnecessary garbage inside diffs which is painful to cut out later on.

 

I can do one big push request that removes all those in one batch if this approach is acceptable.

Link to comment

What do you think about changing default command line options for diff from "aus" to "ays" in iediff tool? Personally, I found it to be easier to comprehend when changes between files are displayed in a side-by-side manner rather than in a classic patch format.

Link to comment

That's why it's an option, so dissenting people can override it. If you want I can make -as always set, so you'd only need to pass -y. Having s shouldn't be problematic as any invoker could also check the return status (0 only for identical files).

Link to comment

I've been thinking these last few days about adding effects.ids to iesh for non-gemrb installations. The catch here, however, is that one particular file format could be valid for several IE games with different sets of opcodes. Thus, some sort of mechanism for detection of game type is needed. Any good suggestions on how to approach this? That's what weidu does for GAME_IS: https://github.com/WeiDUorg/weidu/blob/174f3f58ff489391fa8f89dc4419f13878c051df/src/tppe.ml#L411

Link to comment

sure, we do similar things in gemrb. You can reuse much of Autodetect.py / AutodetectCommon.py . The effect lists can be copied over without modification.

 

I mentioned before that we support "additive" overrides for a few of these ids files, but that can be added if/when it is needed. Just ignore it for now.

Link to comment

Format.py has code that tries to locate ids files. It pretty much duplicates the core.id_to_symbol () function. It would be a good idea to remove code duplication and replace it with a function call but there are some differences in logic. The function prints extra debugging output and returns the id of a symbol if either the ids file or the symbol itself is not found.

 

The function is used heavily in the BCS format, however, so I'm unsure if changing it would break anything.

 

The next step would be extending this function further, so that it doesn't only look in the bif files but also in the override and in the iesh resource folder (in case of those effects.ids files which have to be shipped with iesh).

 

Another possibility is using MemoryStream to load up the effects.ids files into memory explicitly and store them in core.ids to avoid messing with the current logic of looking up the ids files altogether (I'd still refactor it, though).

Link to comment

I don't care that much, iesh is a tool and one that I luckily don't need to use that often (most issues are not format related). So just propose what works best for you, as things can always be changed later if a need arises.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...