Skip to content
This repository has been archived by the owner on Aug 16, 2020. It is now read-only.

Add autosave/restore hook system #1

Open
curiousdannii opened this issue Apr 2, 2017 · 1 comment
Open

Add autosave/restore hook system #1

curiousdannii opened this issue Apr 2, 2017 · 1 comment

Comments

@curiousdannii
Copy link
Owner

Use the same hook system as in Glulxe.

@curiousdannii
Copy link
Owner Author

@erkyrath I've been thinking about how to go about this, and I think it's going to be even more messy than normal :)

GlkOte wants to call do_autosave(), but I don't think that will work here. Emglken has to turn the synchronous glk_select() into an asynchronous one, by pausing and serialising the stack. I don't think I could get do_autosave() to call more C code (to produce a savefile for example). So I think I will make do_autosave() be almost a noop (except for clearing the autosave if it's given -1).

So to do the autosaving I think I will do that inside glk_select(). Should that work?

Actually that might be a bad idea, because for a terp like Git, it's glkop.c already tries to run the autosave hook... so maybe I'll have to localise it to Hugo's code whenever it calls glk_select().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant