diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-04 12:33:54 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-04 12:33:54 -0400 |
commit | bccb1d61907fea45c5e84b29499989f7cee104a5 (patch) | |
tree | 8e70ecab3bce134d2b5100cfd67f37dee2dccda3 /main.cpp | |
parent | 8875d0226f0d38a1e5ef946e56cd15810627f5ac (diff) |
loaded bitmap wrap buffer seems stable
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -78,17 +78,21 @@ MainFunction(main_sdl *Main, memory *Memory, Bitmap_Clear(CompBuffer->UnpackedBuffer, CompBuffer->Width, CompBuffer->Height, CompBuffer->BytesPerPixel); for (int i = 0; i < File->NumberOfLayers; i++) { project_layer *Layer = File->Layer[i]; - if (State->UpdateKeyframes) { - for (int p = 0; p < Layer->NumberOfEffects; p++) { - for (int o = 0; o < Layer->Effect[p]->NumberOfProperties; o++) { - CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Effect[p]->Property[o]); - } - } - for (int r = 0; r < AmountOf(Layer->Property); r++) { - CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Property[r]); + if (Layer->StartFrame <= File->CurrentFrame && + Layer->EndFrame >= File->CurrentFrame) + { + if (State->UpdateKeyframes) { + for (int p = 0; p < Layer->NumberOfEffects; p++) { + for (int o = 0; o < Layer->Effect[p]->NumberOfProperties; o++) { + CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Effect[p]->Property[o]); + } + } + for (int r = 0; r < AmountOf(Layer->Property); r++) { + CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Property[r]); + } } + Layer_UpdateBitmap(Layer, Memory, File->CurrentFrame); } - Layer_UpdateBitmap(Layer, Memory, File->CurrentFrame); } State->UpdateKeyframes = false; QueueCurrentFrame(File, CompBuffer, State); |