summaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-10-05 23:49:41 -0400
committerFox Caminiti <fox@foxcam.net>2022-10-05 23:49:41 -0400
commita4c1e537b0cb2540535357d880e46f63b38c134f (patch)
treec9fafc32d0c9d2c37ba608b98ab76908d8850d8b /memory.h
parentbc1335ebbf68c805a19303469bb49759296a645f (diff)
graph edits; arch rework
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/memory.h b/memory.h
new file mode 100644
index 0000000..47c737e
--- /dev/null
+++ b/memory.h
@@ -0,0 +1,64 @@
+enum memory_table_list {
+
+ P_AVInfo,
+ P_UndoBuffer,
+ P_MiscCache,
+
+ F_File,
+ F_Precomps,
+ F_Layers,
+ F_Sources,
+ F_Properties,
+ F_Keyframes,
+ F_Effects,
+ F_Nodes,
+ F_Strings,
+
+ B_CachedBitmaps,
+};
+
+struct memory_table {
+ char *Name;
+ void *Address;
+ uint64 Size;
+ uint32 Block_ElementSize;
+};
+
+struct global_memory {
+ void *Address;
+ uint64 CurrentPosition;
+ uint64 Size;
+};
+
+enum history_action_type {
+ action_type_swap,
+ action_type_shift
+};
+
+struct history_action {
+ memory_table_list TableName;
+ history_action_type Type;
+ uint64 Size;
+ uint64 ByteOffset;
+ uint64 ShiftAmount; // Only for type_shift
+ int16 Direction; // Only for type_shift
+};
+
+struct history_entry {
+ char *Name;
+ uint16 NumberOfActions;
+};
+
+struct history_entry_list {
+ history_entry Entry[256];
+ history_action Action[1024];
+ uint16 NumberOfEntries;
+ uint16 EntryPlayhead;
+};
+
+struct memory {
+ memory_table Slot[16];
+ history_entry_list History;
+ bool32 IsFileSaved;
+};
+