Sunday, December 21, 2014

FMod - Fix the Overwrite Bug

Through thought-experiments, I discovered what is probably a very annoying bug in Abiathar. If all the sounds are exported and then some IMF songs are imported with Song Mappings, those later changes will be lost if the full sound set is re-imported (unless the IMF song there was also updated).

I added a last-modified date for the IMF songs, stored in the dependency file. When a song is added modified with Song Mappings, the current time is written to the chunk's entry in this table. When importing the full sound set, the file's last-modified date is checked against that of the existing song. If the file is not newer than the existing song, the data is reused from the old audio resource before it is overwritten by the recompiled version. I also added a warning to the Audio Files dialog that should prevent people from accidentally blowing away their song mappings and extra songs; the mistake was easy enough to make that I did it myself.

I also found a subtle yet major problem with the Freeform Tile Placer that made it behave exactly like the Tile Tweaker. Somewhere along the way, its tool initializer had been changed to only listen for mouse movements if a certain Keen:Next emulation feature was enabled. That was easy enough to fix, and I'm surprised nobody noticed. (Though the main person who wanted it always uses all the Keen:Next emulation features.)

Finally, I built infrastructure for helpful and hopefully unobtrusive "did you know?" tips.

No comments:

Post a Comment