From e2e0e630ca51a4fd80a8186c5795c96693a2815b Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Sun, 5 Feb 2023 14:04:50 -0500 Subject: fully working comp-recursive transforms! --- src/include/all.h | 13 ++++++++++--- src/include/functions.h | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/all.h b/src/include/all.h index 11957af..7d7557a 100644 --- a/src/include/all.h +++ b/src/include/all.h @@ -487,14 +487,17 @@ T_CompUVToLayerUV(layer_transforms T, uint32 FileWidth, uint32 FileHeight, uint3 static v2 T_CompPosToLayerPos(layer_transforms T, uint32 FileWidth, uint32 FileHeight, uint32 SourceWidth, uint32 SourceHeight, real32 X, real32 Y); +static layer_transforms +Transform_TestInteracts(project_state *State, block_layer *Layer, sorted_layer_array SortEntry, layer_transforms T); + +static layer_transforms +Transform_Add(layer_transforms T, layer_transforms ExtraT, real32 Width, real32 Height); + static uint8 * Render_UI(project_data *File, project_state *State, memory *Memory, ui *UI, ImDrawList *draw_list, uint8 *PointBuffer, gl_viewport_data *RenderData, sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray, layer_transforms ExtraT, sorted_property_array *SortedPropertyStart, uint16 *SortedKeyframeArray, uint32 CompIndex, int32 Frame_Current); -static layer_transforms -Transform_Add(layer_transforms T, layer_transforms ExtraT); - static v2 Transform_ScreenSpaceToLocal(layer_transforms T, uint32 FileWidth, uint32 FileHeight, uint32 SourceWidth, uint32 SourceHeight, ImVec2 CompPos, ImVec2 CompZoom, ImVec2 ViewportMin, ImVec2 Point); @@ -503,6 +506,10 @@ Transform_ScreenSpaceToLocal(layer_transforms T, uint32 FileWidth, uint32 FileHe static void Transform_ApplyInteractive(interact_transform Interact, real32 *OutputX, real32 *OutputY, real32 *OutputRotation, real32 *OutputScale); +static void +LayerIterate(project_state *State, memory *Memory, uint32 CompIndex, layer_transforms ExtraT, v2 Center, + sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray); + static void Transform_IterateOuterBounds(block_layer *Layer, uint32 Width, uint32 Height, real32 *MinX, real32 *MinY, real32 *MaxX, real32 *MaxY); static void diff --git a/src/include/functions.h b/src/include/functions.h index 4c4ea2d..3826824 100644 --- a/src/include/functions.h +++ b/src/include/functions.h @@ -44,6 +44,12 @@ static layer_transforms Transform_Inverse(layer_transforms T); static v2 T_CompPosToLayerPos(layer_transforms T, uint32 FileWidth, uint32 FileHeight, uint32 SourceWidth, uint32 SourceHeight, real32 X, real32 Y); +static layer_transforms +Transform_TestInteracts(project_state *State, block_layer *Layer, sorted_layer_array SortEntry, layer_transforms T); + +static layer_transforms +Transform_Add(layer_transforms T, layer_transforms ExtraT, real32 Width, real32 Height); + inline void ImGui_DrawCenteredRect(ImDrawList *draw_list, ImVec2 Point, real32 Width, uint32 col) -- cgit v1.2.3