Thursday, January 15, 2015

FMod - Relative Paths

I was home sick today, so I had a good chance to make some improvements to Abiathar. I remembered somebody noticed that Abiathar requires all resources to be in the same directory. This is done so that file-only "paths" can be used so that dependency files can be worked on with multiple computers, like with Dropbox.

Unfortunately, that policy also makes it very difficult to work with the normal KeenGraph setup that was preferred by TOM because KeenGraph recommends placing all bitmaps in a subdirectory to keep the main directory clean. This is fine if you set Abiathar to load from EGA resources, but difficult to keep in sync in you load from bitmaps.

So, I reworked all the browse-for-file code to allow resources to be in the current directory or subdirectories (any depth) thereof. The Browse buttons all now figure out the relative path for the requested resource, cutting off the absolute-ness of the path. So, paths like "bmp\5TIL0000.BMP" are now OK.

To help people ease into Abiathar from TOM (and calm down the very long and detailed New Project Wizard), I added an option in the start page of the NPW to get prompted for four simple resources: gamemaps, maphead, background tileset bitmap, foreground tileset bitmap. (I'm working on support for Keen Dreams.) It usually finds the maphead all by itself after prompting for the gamemaps. It currently only does automatic checks for ModKeen-style bitmaps, so KeenGraph users have to manually select their graphics. It is certainly a lot simpler than the full NPW, but it also doesn't support special features like tileinfo. (They can always be added in Edit | Project Settings.)

These features will be released as v2.3.2 after I finish them and do more complete tests.

No comments:

Post a Comment