0 Members and 1 Guest are viewing this topic.
In other news, Frey continues kicking unprecedented levels of ass.
My BASIC program Macro is a drawing tool. There are 8 drawing commands available, and the coordinates for each are recorded and stored, along with the command number, in a single element of LM. It's almost done, but it's missing a desperately needed feature: An undo button. I can't just do the opposite of the command that was just performed, because that could change pixels that weren't changed by the instruction being undone. The only way I can see to circumvent this situation would be to remove the last element of the list and call Read to redraw the whole thing, which would be an absolute pain. Can anyone think up a more efficient way to implement an undo feature?
Before every action, you could store the screen to an OS Pic variable, and then using Undo would recall the pic var onto the screen, effectively "undoing" the last action
Quote from: squidgetx on February 25, 2011, 03:50:34 pmBefore every action, you could store the screen to an OS Pic variable, and then using Undo would recall the pic var onto the screen, effectively "undoing" the last action But that would only allow one undo. That's not enough. I want the ability to undo ad infinitum.
Then it'd requite saving infinite Pic Variables, but they are finite.
I think you could use the algorithm of a snake.
the ability to undo ad infinitum.
Quote from: Freyaday on February 25, 2011, 03:52:05 pmthe ability to undo ad infinitum.Even photoshop doesn't have this
DJ, yeah. The only program I've ever seen advertise "unlimited undos" was HxD, which has a much easier task of it than most programs because of how densely you can store hex.