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;
|
||||
r32 SecondsIntoBlock = FramesIntoBlock * State->AnimationSystem.SecondsPerFrame;
|
||||
// TODO(Peter): Temporary
|
||||
switch(Block.AnimationProcHandle)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
TestPatternOne(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
||||
}break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
TestPatternTwo(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
||||
}break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
TestPatternThree(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
||||
}break;
|
||||
|
||||
// NOTE(Peter): Zero is invalid
|
||||
InvalidDefaultCase;
|
||||
}
|
||||
|
||||
u32 AnimationProcIndex = Block.AnimationProcHandle - 1;
|
||||
animation_proc* AnimationProc = GlobalAnimationClips[AnimationProcIndex].Proc;
|
||||
AnimationProc(&LayerLEDBuffers[Layer], *Assembly, SecondsIntoBlock, &State->Transient);
|
||||
}
|
||||
|
||||
// Consolidate Temp Buffers
|
||||
|
|
|
@ -29,7 +29,6 @@ STREAM #1: 3D Overhaul
|
|||
- custom sculpture update functions (for motion)
|
||||
- placing sculptures
|
||||
- editing sculpture files (change universe output)
|
||||
- led groups & subgroups - defined in file
|
||||
- motion
|
||||
|
||||
- Sculpture View
|
||||
|
|
Loading…
Reference in New Issue