From 313ca58550163380e072880b360bc6076d27c8e5 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 27 Jul 2022 15:46:42 -0400 Subject: switched threading to SDL; works on windows now --- createcalls.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'createcalls.cpp') diff --git a/createcalls.cpp b/createcalls.cpp index 0dbf75c..1c20b1a 100644 --- a/createcalls.cpp +++ b/createcalls.cpp @@ -310,6 +310,18 @@ CreateDebugLayer(project_data *File, memory *Memory, uint16 Width, uint16 Height return Layer; } +internal void +LoadTestFootage(project_data *File, project_state *State, memory *Memory) +{ + CreateLayerFromSource(File, State, Memory, "../asset/24.mp4"); + // project_layer *Layer1 = CreateDebugLayer(&File, &Memory, 9, 14); + // project_layer *Layer1 = CreateSolidLayer(&File, &Memory, 9, 13, V4(1.0, 1.0, 1.0, 1.0)); + // Layer1->x.CurrentValue.f = 7; + // Layer1->y.CurrentValue.f = 4; + // Layer1->StartFrame = 0; + // Layer1->EndFrame = File.EndFrame; +} + internal void CreateDemoScene(project_data *File, memory *Memory) { @@ -339,3 +351,22 @@ CreateDemoScene(project_data *File, memory *Memory) Layer3->x.IsToggled = true; Layer3->y.IsToggled = true; } + +internal void +CreateGrid(project_data *File, memory *Memory) { + uint16 Amount = 8; + real32 XInc = File->Width / Amount; + real32 YInc = File->Height / Amount; + for (int16 j = 0; j < 8; j++) { + for (int16 i = 0; i < 8; i++) { + project_layer *Layer = CreateSolidLayer(File, Memory, 200, 200, V4(0.6, 0.3, 0.4, 1.0)); + Layer->x.CurrentValue.f = (XInc*i); + Layer->y.CurrentValue.f = (XInc*j); + Layer->opacity.CurrentValue.f = 0.25; + Layer->StartFrame = 0; + Layer->EndFrame = File->EndFrame; + ManualKeyframeInsertF(&Layer->rotation, Memory, i, 0); + ManualKeyframeInsertF(&Layer->rotation, Memory, 40+i, 360); + } + } +} -- cgit v1.2.3