From e89dc91182a94e48ca9220a2fe075db680ddff04 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Tue, 16 Aug 2022 15:06:45 -0400 Subject: undo functional --- main.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'main.h') diff --git a/main.h b/main.h index 4e48fc5..a31bc64 100644 --- a/main.h +++ b/main.h @@ -67,10 +67,31 @@ struct cached_bitmap { uint32 Frame; // What frame it is. }; +// Some actions may require a higher-level function to undo to a satisfactory +// standard, so actions are allowed to do more than just set/swap single values. +enum action_entry_type { + action_entry_layerinit, + action_entry_default +}; + +struct action_entry { + char *Name; + action_entry_type Type; + void *ExtraPointer; + uint16 NumberOfActions; +}; + +struct action_entries { + action_entry Entry[1024]; + uint16 Index; + uint16 NumberOfEntries; +}; + struct memory { memory_table Slot[16]; cached_bitmap Bitmap[4096]; void *Scratch; // 64 MB of data + action_entries Action; }; struct property_channel; @@ -486,6 +507,7 @@ struct project_state selection_type RecentSelectionType = selection_none; bool32 IsInteracting; + real32 InteractCache[4]; // we need to store the initial position in order to record it in the undo tree transforms_hotkey_interact TransformsHotkeyInteract; int32 MsgTime; // currently in "frames" -- cgit v1.2.3