diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9856143..27a985e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -783,11 +783,12 @@ int main(int argc, char *argv[]) { #endif #if DEBUG -#if 0 +#if 1 sprintf(State->DummyName, "test"); - File_Open(File, State, &Memory, State->DummyName); - State->UpdateFrame = true; - // State->MostRecentlySelectedLayer = 0; + if (File_Open(File, State, &Memory, State->DummyName)) { + State->UpdateFrame = true; + State->MostRecentlySelectedLayer = 0; + } #else // uint16 SourceIndex = Source_Generate(File, State, &Memory, (void *)"../asset/yu.webm"); // block_source *Source = (block_source *)Memory_Block_AddressAtIndex(&Memory, F_Sources, SourceIndex); @@ -877,15 +878,7 @@ int main(int argc, char *argv[]) { } break; case hotkey_newlayer_shape: { - block_composition *MainComp = (block_composition *)Memory_Block_AddressAtIndex(&Memory, F_Precomps, File->PrincipalCompIndex); - v2 Point = State->TempZoomRatio * V2(MainComp->Width, MainComp->Height); - v2 Vector = V2(0, 0); - if (State->HotkeyExtra[0] != 0) { - Vector = V2(State->HotkeyExtra[0], State->HotkeyExtra[1]); - State->HotkeyExtra[0] = 0; - State->HotkeyExtra[1] = 0; - } - Project_ShapeLayer_New(File, State, &Memory, Point, Vector); + Project_ShapeLayer_New(File, State, &Memory); } break; case hotkey_newlayer_source: { |