From fc4e97050aeb65ef89ba4cf0badd4cf9615d50fe Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Thu, 24 Nov 2022 23:47:24 +0000 Subject: misc fixes --- main.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 950d548..10e74ec 100644 --- a/main.cpp +++ b/main.cpp @@ -184,13 +184,18 @@ Main_InputTest(project_data *File, project_state *State, memory *Memory, ui *UI, ImGui_DebugUndoTree(Memory, State); } -#if 0 if (State->Initializing == 3) { Source_UICreateButton(File, State, Memory, Sorted.CompArray, Sorted.LayerArray); block_layer *Layer = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, 0); - Layer->Block_Effect_Index[0] = Effect_Init(State, Memory, 0, Layer->Block_Effect_Count); - Layer->Block_Effect_Count = 1; + Layer->IsSelected = true; + // Layer->Block_Effect_Index[0] = Effect_Init(State, Memory, 0, Layer->Block_Effect_Count); + // Layer->Block_Effect_Count = 1; } + // if (State->Initializing == 2) { + // block_composition *MainComp = (block_composition *)Memory_Block_AddressAtIndex(Memory, F_Precomps, File->PrincipalCompIndex); + // Precomp_UICreateButton(File, State, Memory, MainComp, *Sorted.CompArray, Sorted.LayerArray); + // } +#if 0 // Layera->x.IsToggled = true; // Layera->y.IsToggled = true; // block_layer *Layerb = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, 1); @@ -588,6 +593,11 @@ int main(int argc, char *argv[]) { File->Comp_Count = 1; + { + uint16 SourceIndex = Source_Generate(File, State, &Memory, (void *)"../asset/a_small.jpg"); + block_source *Source = (block_source *)Memory_Block_AddressAtIndex(&Memory, F_Sources, File->Source_Count - 1); + Source->IsSelected = true; + } #if 0 const char *myb[] = { "../asset/hand/IMG_4239.jpg", "../asset/hand/IMG_4242.jpg", "../asset/hand/IMG_4243.jpg", "../asset/hand/IMG_4244.jpg", "../asset/hand/IMG_4248.jpg", "../asset/hand/IMG_4249.jpg" }; @@ -597,11 +607,6 @@ int main(int argc, char *argv[]) { block_source *Source = (block_source *)Memory_Block_AddressAtIndex(&Memory, F_Sources, File->Source_Count - 1); Source->IsSelected = true; } - { - uint16 SourceIndex = Source_Generate(File, State, &Memory, (void *)"../asset/hand/a.png"); - block_source *Source = (block_source *)Memory_Block_AddressAtIndex(&Memory, F_Sources, File->Source_Count - 1); - Source->IsSelected = true; - } { uint16 SourceIndex = Source_Generate(File, State, &Memory, (void *)"../asset/hand/c.png"); @@ -717,16 +722,6 @@ int main(int argc, char *argv[]) { Brush_CalcBitmapAlphaFromSize(&Memory, &State->Brush, 4); State_BindBrushTexture(&Memory, &State->Brush, 4); - File_Open(File, State, &Memory, "test"); - int h = 0, c = 0, i = 0; - int Count = File->Source_Count; - while (Block_Loop(&Memory, F_Sources, Count, &h, &c, &i)) { - block_source *Source = (block_source *)Memory_Block_AddressAtIndex(&Memory, F_Sources, i); - if (Source->Type == source_type_principal_temp) { - Source->Occupied = 0; - File->Source_Count--; - } - } #if STABLE curl_global_init(CURL_GLOBAL_ALL); @@ -760,7 +755,13 @@ int main(int argc, char *argv[]) { Assert(Debug.ScratchState == 0); +#if DEBUG + if (Debug.ReloadUI) { + Main_RenderUI(io, clear_color, window); + } +#else Main_RenderUI(io, clear_color, window); +#endif if (State->Initializing) State->Initializing--; -- cgit v1.2.3