diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-17 23:41:08 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-17 23:41:08 -0400 |
commit | 9062e0aae9f2f576b7a237c28028aa6b09feee5e (patch) | |
tree | 98b37bd442b9b6477f8061690744d73efeaa7d0b /main.h | |
parent | e89dc91182a94e48ca9220a2fe075db680ddff04 (diff) |
undo and pen development
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,7 +1,11 @@ enum instruction_mode { instruction_mode_scalar, +#if ARM + instruction_mode_neon, +#else instruction_mode_sse, instruction_mode_avx +#endif }; struct cache { @@ -67,8 +71,6 @@ 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 @@ -207,6 +209,8 @@ union val { struct keyframe { val Value; + // NOTE(fox): Frame values are relative to the layer's FrameOffset! This is + // done to reduce the footprint of layer moving in the undo tree. int32 FrameNumber; keyframe_type Type; bool32 IsSelected; @@ -291,17 +295,17 @@ struct source { struct layer_bitmap_info { // Image and video void *BitmapBuffer; // Each layer has a persistent bitmap that the source data gets packed into. + int32 FrameOffset; // The "true" position of the layer, separate from StartFrame. Starts at zero and only gets incremented when the layer is moved. bool32 ToUpdate = 1; gl_effect_layer Test; // TODO(fox): Find a better place to store this. Either give effects a more // fleshed-out API to add things to a struct like this or integrate into ImGui. - void *HistogramVals; // 256*5 packed floats (all channel average + RGBA). + void *HistogramVals; // 256*5 floats (all channel average + RGBA). uint16 LevelsSelector; // Which channel is currently active // Video only - int32 FrameOffset; // the "true" position of video layers, separate from StartFrame - int32 CurrentFrame = -1; // The last frame number rendered to the bitmap. + int32 CurrentFrame = -1; // The last frame number rendered to the bitmap. -1 gurantees a load upon layer creation. void *AVInfo; // Internal data containing current frame info }; @@ -364,6 +368,7 @@ struct mask_point { struct mask { mask_point Point[16]; + bool32 IsClosed; uint16 NumberOfPoints; uint16 NumberOfSelectedPoints; void *TriangulatedPointCache; |