MCPcopy Create free account
hub / github.com/kiibohd/controller / Pixel_delAnimation

Function Pixel_delAnimation

Macro/PixelMap/pixel.c:1066–1089  ·  view source on GitHub ↗

Removes the first index of an animation Will be popped from the stack on the next animation processing loop

Source from the content-addressed store, hash-verified

1064// Removes the first index of an animation
1065// Will be popped from the stack on the next animation processing loop
1066uint8_t Pixel_delAnimation( uint16_t index, uint8_t finish )
1067{
1068 // Find animation by index, look for the *first* one
1069 uint16_t pos = 0;
1070 for ( ; pos < Pixel_AnimationStackSize; pos++ )
1071 {
1072 // Check if memory is unused
1073 if ( Pixel_AnimationElement_Stor[pos].index == index )
1074 {
1075 // Let animation finish it's last frame
1076 if ( finish )
1077 {
1078 Pixel_AnimationElement_Stor[pos].loops = 1;
1079 }
1080 else
1081 {
1082 Pixel_AnimationElement_Stor[pos].index = 0xFFFF;
1083 }
1084 return 1;
1085 }
1086 }
1087
1088 return 0;
1089}
1090
1091// Cleans/resets animation stack. Removes all running animations.
1092// NOTE: Does not clear the output buffer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…