DavidKinder / Git

Fast Glulx interpreter, originally written by Iain Merrick.
MIT License
46 stars 13 forks source link

Extended undo functionality #15

Closed erkyrath closed 2 years ago

erkyrath commented 2 years ago

This has been sitting around in a branch since, oh, 2015 or so...

Adds support for two new opcodes:

@hasundo S1: Test whether a VM state is available in temporary storage. S1 is set to 0 if a state is available, 1 if not. If this returns 0, then restoreundo is expected to succeed.

@discardundo: Discard a VM state (the most recently saved) from temporary storage. If none is available, this does nothing.

This is the equivalent Glulx change: https://github.com/erkyrath/glulxe/compare/8d3bee4..c2362481ce2e13deddb845d62dc29ffba81ce274

erkyrath commented 2 years ago

Test for the new opcodes:

https://github.com/erkyrath/glk-dev/blob/double/unittests/discardundotest.inf https://github.com/erkyrath/glk-dev/blob/double/unittests/discardundotest.ulx