summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'main.h')
-rw-r--r--main.h117
1 files changed, 63 insertions, 54 deletions
diff --git a/main.h b/main.h
index 1c9a69b..8e29917 100644
--- a/main.h
+++ b/main.h
@@ -39,6 +39,10 @@ enum blend_mode
blend_difference
};
+struct block_string {
+ uint8 Occupied;
+ char Char[1024 - sizeof(uint8)];
+};
enum interpolation_type
{
@@ -59,12 +63,19 @@ struct block_bezier {
bezier_point Point[MAX_KEYFRAMES_PER_BLOCK];
};
+struct render_state
+{
+ void *MainCompBuffer;
+};
+
struct project_state
{
bool32 UpdateKeyframes = 1;
bool32 UpdateFrame = 1; // only refreshes frame; set UpdateKeyframes to update animation
bool32 DebugDisableCache = 1;
+ render_state Render;
+
// tool Tool = tool_default;
// pen_state Pen = {};
@@ -152,6 +163,58 @@ struct property_channel {
bool32 IsToggled;
};
+struct layer_bitmap_state {
+ // Image and video
+ bool32 ToUpdate = 1;
+
+ // GL state
+ // gl_effect_layer Test;
+ // gl_effect_layer TestM;
+
+ // Video state
+ 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
+};
+
+struct block_layer {
+ uint8 Occupied;
+
+ uint16 Block_String_Index;
+ uint16 Block_Source_Index;
+ uint16 Block_Composition_Index;
+
+ uint16 Block_Mask_Index[MAX_EFFECTS];
+ uint16 Block_Mask_Count;
+
+ uint16 Block_Effect_Index[MAX_MASKS];
+ uint16 Block_Effect_Count;
+
+ blend_mode BlendMode;
+
+ union
+ {
+ property_channel Property[8];
+ struct
+ {
+ property_channel x;
+ property_channel y;
+ property_channel ax;
+ property_channel ay;
+ property_channel rotation;
+ property_channel scale;
+ property_channel opacity;
+ property_channel time;
+ };
+ };
+
+ bool32 IsSelected;
+
+ int32 Frame_Offset;
+ int32 Frame_Start;
+ int32 Frame_End;
+
+ uint32 LayerColor;
+};
#if 0
@@ -170,20 +233,6 @@ struct gl_effect_layer {
uint32 Stencil_Renderbuffer;
};
-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;
- gl_effect_layer TestM;
-
- // Video only
- 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
-};
-
// Bitmaps from files are loaded into these temporary cache blocks.
@@ -234,46 +283,6 @@ struct mask {
uint32 NumberOfVerts;
};
-struct project_layer {
- char *Name;
- blend_mode BlendMode;
-
- union
- {
- property_channel Property[8];
- struct
- {
- property_channel x;
- property_channel y;
- property_channel ax;
- property_channel ay;
- property_channel rotation;
- property_channel scale;
- property_channel opacity;
- property_channel time;
- };
- };
-
- bool32 IsSelected;
-
- source *Source;
- layer_bitmap_info BitmapInfo;
-
- effect *Effect[MAX_EFFECTS];
- uint16 NumberOfEffects;
-
- mask Mask[MAX_MASKS];
- uint16 NumberOfMasks;
-
- int32 StartFrame;
- int32 EndFrame;
-
- uint32 LayerColor;
-
- // For rendering
- transform_info TransformInfo;
-};
-
struct main_sdl
{