undo tape erase

Discussion around programming R'n'D, its source code and its tools.

Moderators: Flumminator, Zomis

Post Reply
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

undo tape erase

Post by filbo »

This is a patch for a frequent frustration of mine: erasing the tape I
was working on by mistakenly starting a new game. e.g. I might be
using SPACE to pause when I unexpectedly die just before hitting
SPACE; therefore SPACE starts a new game on a blank tape. (Yes I
know I could make SPACE != 'start game'.)

Or I mistakenly hit ENTER on the levelset selector. Or lots of other
mishaps. I've quit in frustration over this at least 20 times...

Patch:

added the ability to undo tape erasure. When the in-memory tape
is erased with over 20 seconds of play on it, a copy is saved for
possible undo. Enter ":undo-tape" or ":ut" from the main menu to
undo tape erasure.

The guard time preserves long tapes against short abortive actions.

Note: tape undo does not pay attention to which level is loaded.
Undoing an erased tape from a different level is unlikely to be
helpful -- unless you are trying to test whether two levels are
effectively identical.
Attachments
rnd-tape-undo.patch
(3.15 KiB) Downloaded 224 times
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: undo tape erase

Post by filbo »

A slight patch to that. Now it saves short tapes (<20s) for undo, as long as it won't overwrite a longer save.
Attachments
rnd-tape-undo-2.patch
(953 Bytes) Downloaded 217 times
Post Reply