Gargoyle can't do graphics and sound in JACL games anymore?

JACL was never a popular development system, and I’ve never played any of the games much.
Release 2019.1 of Gargoyle handled the graphics and sound in such titles as The Unholy Grail and The Down Dragon, but release 2022.1 does not.
The message “ERROR: Unable to draw image: 1” prints at the start.
Any ideas?

If you like, you could follow and help with the great development @cas is doing here: GitHub - garglk/garglk: A cross-platform IO layer for an interactive fiction player :slight_smile:

Thanks @cibersheep !

This issue also affects Hugo, I’ve discovered. It’s a result of syncing Gargoyle with upstream CheapGlk along with some Glk assumptions made by interpreters which aren’t valid, generally, but were valid for Gargoyle before the change.

The quick answer is that it’s an easy fix and I’ll get it in, and probably look to releasing a followup bugfix release to 2022.1 shortly, as there have been a number of other small issues fixed since 2022.1 came out…

Here’s the long answer: The Glk spec (§6.1) says that glk_fileref_create_by_name should append the suffix .glkdata for files opened with fileusage_Data. Earlier Gargoyle versions didn’t do this, and interpreters effectively were able to open arbitrarily-named files. Following the recommended Glk practice broke these games since their data files do not end in .glkdata.

I think the cleanest approach is to patch the interpreters to use glkunix_stream_open_pathname, which is guaranteed to exist on Gargoyle. This will allow Gargoyle to function in line with the spec’s recommendation while still allowing games to open arbitrary files, if necessary. I’ll hopefully have a fix in for it soon.


Yeah, that sounds like the right plan.

Pull request with the fix is here.

If you’re interested in building and testing, that’d be great. Or, there are builds available:

It’s working for the games I tested, but if you’d like to provide any feedback, that’s very welcome. Otherwise I’ll get it merged in shortly.