Glk Object Recovery by Dannii Willis Search for other extensions by this author


Download version 1/160919For Inform 7 6M62



A low level utility library for managing Glk references after restarting or restoring

Tags glk glulx


This extension is a low level utility library for managing Glk references. When a Glulx game restarts and restores, the current Glk IO state is not reset. All the old windows, sound channels etc. will be kept as they were, even though the game file might be expecting a different state. This extension allows Inform 7 game files to ensure that the IO state is as it should be. It does this in three stages: 1. The "glulx zeroing-reference rulebook" is run. Rules should be added to reset all Glk references as if none existed. 2. The "glulx resetting-windows rulebook" etc. are run. These rulebooks will be run once for each Glk IO object which does currently exist. 3. The "glulx object-updating rulebook" is run. Rules should be added to correct the Glk IO state by, for example, closing windows which shouldn't exist, and opening windows which should but currently do not. See the extension Flexible Windows by Jon Ingold for a practical demonstration of how these rulebooks are used. This extension is released under the Creative Commons Attribution licence. Bug reports, feature requests or questions should be made at <>.