Prevented array index out of bounds error when accessing animation procs form the GlobalAnimationClips array
This commit is contained in:
parent
337b4ac271
commit
736b7ab85e
|
@ -359,27 +359,10 @@ UPDATE_AND_RENDER(UpdateAndRender)
|
||||||
|
|
||||||
u32 FramesIntoBlock = CurrentFrame - Block.Range.Min;
|
u32 FramesIntoBlock = CurrentFrame - Block.Range.Min;
|
||||||
r32 SecondsIntoBlock = FramesIntoBlock * State->AnimationSystem.SecondsPerFrame;
|
r32 SecondsIntoBlock = FramesIntoBlock * State->AnimationSystem.SecondsPerFrame;
|
||||||
// TODO(Peter): Temporary
|
|
||||||
switch(Block.AnimationProcHandle)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
TestPatternOne(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
|
||||||
}break;
|
|
||||||
|
|
||||||
case 2:
|
u32 AnimationProcIndex = Block.AnimationProcHandle - 1;
|
||||||
{
|
animation_proc* AnimationProc = GlobalAnimationClips[AnimationProcIndex].Proc;
|
||||||
TestPatternTwo(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
AnimationProc(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
||||||
}break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
TestPatternThree(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
|
||||||
}break;
|
|
||||||
|
|
||||||
// NOTE(Peter): Zero is invalid
|
|
||||||
InvalidDefaultCase;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consolidate Temp Buffers
|
// Consolidate Temp Buffers
|
||||||
|
|
|
@ -29,7 +29,6 @@ STREAM #1: 3D Overhaul
|
||||||
- custom sculpture update functions (for motion)
|
- custom sculpture update functions (for motion)
|
||||||
- placing sculptures
|
- placing sculptures
|
||||||
- editing sculpture files (change universe output)
|
- editing sculpture files (change universe output)
|
||||||
- led groups & subgroups - defined in file
|
|
||||||
- motion
|
- motion
|
||||||
|
|
||||||
- Sculpture View
|
- Sculpture View
|
||||||
|
|
Loading…
Reference in New Issue