Removes the first index of an animation Will be popped from the stack on the next animation processing loop
| 1064 | // Removes the first index of an animation |
| 1065 | // Will be popped from the stack on the next animation processing loop |
| 1066 | uint8_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 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…